Skip to content

Commit f531e6c

Browse files
committed
Merge branch 'master' into shub/moduledef-pretty-print
2 parents 0e73fef + f274414 commit f531e6c

File tree

147 files changed

+4034
-1406
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

147 files changed

+4034
-1406
lines changed

.github/workflows/bottest.yml

Lines changed: 0 additions & 133 deletions
This file was deleted.

.github/workflows/bottest_tracing_fix.patch

Lines changed: 0 additions & 13 deletions
This file was deleted.

LICENSE.txt

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,34 @@ License text copyright (c) 2017 MariaDB Corporation Ab, All Rights Reserved.
4040

4141
-----------------------------------------------------------------------------
4242

43+
Base License and Subdirectory Specific Licenses
44+
45+
1. Repository-Wide License
46+
Except as provided in Section 2 below, the contents of this repository are licensed under the Business Source License (“BSL”), which includes a change date resulting in a licensing change to the GNU Affero General Public License v3.0 with Linking Exception on that date. See the full text of the BSL and AGPL with Linking Exception in this file below.
47+
48+
2. Subdirectory-Specific Licenses
49+
Certain subdirectories within this repository are licensed under different terms.
50+
51+
If a subdirectory contains its own LICENSE or LICENSE.txt file, the terms in that file apply exclusively to all files and subfolders within that subdirectory.
52+
53+
In the event of any conflict between this base license and a subdirectory’s license, the base license will govern for that subdirectory’s contents.
54+
55+
3. Contributor Acknowledgement
56+
By contributing to this repository, you agree that:
57+
58+
Your contributions will be licensed under the license applicable to the directory or subdirectory in which your contribution is made.
59+
60+
If you contribute to multiple subdirectories, the applicable license for each subdirectory will apply to your contributions in that subdirectory.
61+
62+
4. Reading the Applicable License
63+
Before using, modifying, or distributing code from this repository, you must read:
64+
65+
This base LICENSE.txt file for the overall repository license.
66+
67+
Any LICENSE or LICENSE.txt file in a subdirectory that you intend to use or contribute to.
68+
69+
-----------------------------------------------------------------------------
70+
4371
Business Source License 1.1
4472

4573
Terms

crates/auth/LICENSE

Whitespace-only changes.

crates/auth/LICENSE

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../licenses/BSL.txt

crates/bench/LICENSE

Whitespace-only changes.

crates/bench/LICENSE

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../licenses/BSL.txt

crates/bench/src/spacetime_module.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,11 @@ impl<L: ModuleLanguage> BenchDatabase for SpacetimeModule<L> {
6969
L::get_module().load_module(config, Some(&path)).await
7070
});
7171

72-
for table in module.client.module.info.module_def.tables() {
72+
let module_info = module.client.module().info;
73+
for table in module_info.module_def.tables() {
7374
log::trace!("SPACETIME_MODULE: LOADED TABLE: {table:?}");
7475
}
75-
for reducer in module.client.module.info.module_def.reducers() {
76+
for reducer in module_info.module_def.reducers() {
7677
log::trace!("SPACETIME_MODULE: LOADED REDUCER: {reducer:?}");
7778
}
7879
Ok(SpacetimeModule {
@@ -102,7 +103,7 @@ impl<L: ModuleLanguage> BenchDatabase for SpacetimeModule<L> {
102103
module.call_reducer_binary(&name, ProductValue::new(&[])).await?;
103104
*/
104105
// workaround for now
105-
module.client.module.clear_table(&table_id.pascal_case)?;
106+
module.client.module().clear_table(&table_id.pascal_case)?;
106107
Ok(())
107108
})
108109
}

crates/bindings-csharp/BSATN.Runtime/Builtins.cs

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -432,6 +432,33 @@ public record struct TimeDuration(long Microseconds) : IStructuralReadWrite
432432
{
433433
public static readonly TimeDuration ZERO = new(0);
434434

435+
/// <summary>
436+
/// Returns a <see cref="TimeDuration"/> that represents a specified number of <paramref name="milliseconds"/>, accurate to the nearest microsecond.
437+
/// </summary>
438+
public static TimeDuration FromMilliseconds(double milliseconds) =>
439+
new((long)(milliseconds * 1000L));
440+
441+
/// <summary>
442+
/// Returns a <see cref="TimeDuration"/> that represents a specified number of <paramref name="seconds"/>, accurate to the nearest microsecond.
443+
/// </summary>
444+
public static TimeDuration FromSeconds(double seconds) =>
445+
new((long)(seconds * Util.MicrosecondsPerSecond));
446+
447+
/// <summary>
448+
/// Returns a <see cref="TimeDuration"/> that represents a specified number of 60-second <paramref name="minutes"/>.
449+
/// </summary>
450+
public static TimeDuration FromMinutes(double minutes) => FromSeconds(minutes * 60);
451+
452+
/// <summary>
453+
/// Returns a <see cref="TimeDuration"/> that represents a specified number of 60-minute <paramref name="hours"/>.
454+
/// </summary>
455+
public static TimeDuration FromHours(double hours) => FromMinutes(hours * 60);
456+
457+
/// <summary>
458+
/// Returns a <see cref="TimeDuration"/> that represents a specified number of 24-hour <paramref name="days"/>.
459+
/// </summary>
460+
public static TimeDuration FromDays(double days) => FromHours(days * 24);
461+
435462
public static implicit operator TimeSpan(TimeDuration d) =>
436463
new(d.Microseconds * Util.TicksPerMicrosecond);
437464

crates/bindings-csharp/LICENSE

Whitespace-only changes.

0 commit comments

Comments
 (0)