From b31388a9533d8d307e2ee242fb6d72173bd01924 Mon Sep 17 00:00:00 2001 From: Ingvar Stepanyan Date: Wed, 22 Jan 2025 18:03:06 +0000 Subject: [PATCH 1/8] Rewrite C# codegen to V9 infra --- .github/workflows/ci.yml | 2 +- .../Runtime/Internal/Autogen/IndexType.cs | 18 - .../Runtime/Internal/Autogen/IndexType.g.cs | 16 + .../Runtime/Internal/Autogen/Lifecycle.cs | 19 - .../Runtime/Internal/Autogen/Lifecycle.g.cs | 17 + .../Internal/Autogen/MiscModuleExport.cs | 17 - .../Internal/Autogen/MiscModuleExport.g.cs | 15 + .../Internal/Autogen/RawColumnDefV8.cs | 39 - .../Internal/Autogen/RawColumnDefV8.g.cs | 36 + .../Internal/Autogen/RawConstraintDataV9.cs | 17 - .../Internal/Autogen/RawConstraintDataV9.g.cs | 15 + .../Internal/Autogen/RawConstraintDefV8.cs | 43 - .../Internal/Autogen/RawConstraintDefV8.g.cs | 40 + .../Internal/Autogen/RawConstraintDefV9.cs | 38 - .../Internal/Autogen/RawConstraintDefV9.g.cs | 35 + .../Internal/Autogen/RawIndexAlgorithm.cs | 17 - .../Internal/Autogen/RawIndexAlgorithm.g.cs | 15 + .../Runtime/Internal/Autogen/RawIndexDefV8.cs | 47 - .../Internal/Autogen/RawIndexDefV8.g.cs | 44 + .../Runtime/Internal/Autogen/RawIndexDefV9.cs | 42 - .../Internal/Autogen/RawIndexDefV9.g.cs | 39 + .../Internal/Autogen/RawMiscModuleExportV9.cs | 16 - .../Autogen/RawMiscModuleExportV9.g.cs | 14 + .../Runtime/Internal/Autogen/RawModuleDef.cs | 17 - .../Internal/Autogen/RawModuleDef.g.cs | 15 + .../Internal/Autogen/RawModuleDefV8.cs | 49 - .../Internal/Autogen/RawModuleDefV8.g.cs | 46 + .../Internal/Autogen/RawModuleDefV9.cs | 59 - .../Internal/Autogen/RawModuleDefV9.g.cs | 56 + .../Internal/Autogen/RawReducerDefV9.cs | 43 - .../Internal/Autogen/RawReducerDefV9.g.cs | 40 + .../Autogen/RawRowLevelSecurityDefV9.cs | 32 - .../Autogen/RawRowLevelSecurityDefV9.g.cs | 29 + .../Internal/Autogen/RawScheduleDefV9.cs | 42 - .../Internal/Autogen/RawScheduleDefV9.g.cs | 39 + .../Internal/Autogen/RawScopedTypeNameV9.cs | 39 - .../Internal/Autogen/RawScopedTypeNameV9.g.cs | 36 + .../Internal/Autogen/RawSequenceDefV8.cs | 58 - .../Internal/Autogen/RawSequenceDefV8.g.cs | 55 + .../Internal/Autogen/RawSequenceDefV9.cs | 53 - .../Internal/Autogen/RawSequenceDefV9.g.cs | 50 + .../Runtime/Internal/Autogen/RawTableDefV8.cs | 68 - .../Internal/Autogen/RawTableDefV8.g.cs | 65 + .../Runtime/Internal/Autogen/RawTableDefV9.cs | 70 - .../Internal/Autogen/RawTableDefV9.g.cs | 67 + .../Runtime/Internal/Autogen/RawTypeDefV9.cs | 42 - .../Internal/Autogen/RawTypeDefV9.g.cs | 39 + .../Autogen/RawUniqueConstraintDataV9.cs | 32 - .../Autogen/RawUniqueConstraintDataV9.g.cs | 29 + .../Runtime/Internal/Autogen/ReducerDef.cs | 39 - .../Runtime/Internal/Autogen/ReducerDef.g.cs | 36 + .../Runtime/Internal/Autogen/TableAccess.cs | 18 - .../Runtime/Internal/Autogen/TableAccess.g.cs | 16 + .../Runtime/Internal/Autogen/TableDesc.cs | 38 - .../Runtime/Internal/Autogen/TableDesc.g.cs | 35 + .../Runtime/Internal/Autogen/TableType.cs | 18 - .../Runtime/Internal/Autogen/TableType.g.cs | 16 + .../Runtime/Internal/Autogen/TypeAlias.cs | 38 - .../Runtime/Internal/Autogen/TypeAlias.g.cs | 35 + .../Runtime/Internal/Autogen/Typespace.cs | 32 - .../Runtime/Internal/Autogen/Typespace.g.cs | 29 + crates/cli/Cargo.toml | 1 + crates/cli/examples/regen-csharp-moduledef.rs | 78 +- crates/cli/src/subcommands/generate/csharp.rs | 1288 ++++----- crates/cli/src/subcommands/generate/mod.rs | 290 +- crates/cli/src/subcommands/generate/rust.rs | 110 +- .../src/subcommands/generate/typescript.rs | 182 +- crates/cli/src/subcommands/generate/util.rs | 73 +- crates/cli/tests/codegen.rs | 20 +- .../snapshots/codegen__codegen_csharp.snap | 2524 +++++++++-------- .../snapshots/codegen__codegen_rust.snap | 818 +++--- .../codegen__codegen_typescript.snap | 342 +-- crates/schema/src/schema.rs | 6 +- modules/rust-wasm-test/src/lib.rs | 2 +- smoketests/tests/namespaces.py | 7 +- 75 files changed, 3761 insertions(+), 4101 deletions(-) delete mode 100644 crates/bindings-csharp/Runtime/Internal/Autogen/IndexType.cs create mode 100644 crates/bindings-csharp/Runtime/Internal/Autogen/IndexType.g.cs delete mode 100644 crates/bindings-csharp/Runtime/Internal/Autogen/Lifecycle.cs create mode 100644 crates/bindings-csharp/Runtime/Internal/Autogen/Lifecycle.g.cs delete mode 100644 crates/bindings-csharp/Runtime/Internal/Autogen/MiscModuleExport.cs create mode 100644 crates/bindings-csharp/Runtime/Internal/Autogen/MiscModuleExport.g.cs delete mode 100644 crates/bindings-csharp/Runtime/Internal/Autogen/RawColumnDefV8.cs create mode 100644 crates/bindings-csharp/Runtime/Internal/Autogen/RawColumnDefV8.g.cs delete mode 100644 crates/bindings-csharp/Runtime/Internal/Autogen/RawConstraintDataV9.cs create mode 100644 crates/bindings-csharp/Runtime/Internal/Autogen/RawConstraintDataV9.g.cs delete mode 100644 crates/bindings-csharp/Runtime/Internal/Autogen/RawConstraintDefV8.cs create mode 100644 crates/bindings-csharp/Runtime/Internal/Autogen/RawConstraintDefV8.g.cs delete mode 100644 crates/bindings-csharp/Runtime/Internal/Autogen/RawConstraintDefV9.cs create mode 100644 crates/bindings-csharp/Runtime/Internal/Autogen/RawConstraintDefV9.g.cs delete mode 100644 crates/bindings-csharp/Runtime/Internal/Autogen/RawIndexAlgorithm.cs create mode 100644 crates/bindings-csharp/Runtime/Internal/Autogen/RawIndexAlgorithm.g.cs delete mode 100644 crates/bindings-csharp/Runtime/Internal/Autogen/RawIndexDefV8.cs create mode 100644 crates/bindings-csharp/Runtime/Internal/Autogen/RawIndexDefV8.g.cs delete mode 100644 crates/bindings-csharp/Runtime/Internal/Autogen/RawIndexDefV9.cs create mode 100644 crates/bindings-csharp/Runtime/Internal/Autogen/RawIndexDefV9.g.cs delete mode 100644 crates/bindings-csharp/Runtime/Internal/Autogen/RawMiscModuleExportV9.cs create mode 100644 crates/bindings-csharp/Runtime/Internal/Autogen/RawMiscModuleExportV9.g.cs delete mode 100644 crates/bindings-csharp/Runtime/Internal/Autogen/RawModuleDef.cs create mode 100644 crates/bindings-csharp/Runtime/Internal/Autogen/RawModuleDef.g.cs delete mode 100644 crates/bindings-csharp/Runtime/Internal/Autogen/RawModuleDefV8.cs create mode 100644 crates/bindings-csharp/Runtime/Internal/Autogen/RawModuleDefV8.g.cs delete mode 100644 crates/bindings-csharp/Runtime/Internal/Autogen/RawModuleDefV9.cs create mode 100644 crates/bindings-csharp/Runtime/Internal/Autogen/RawModuleDefV9.g.cs delete mode 100644 crates/bindings-csharp/Runtime/Internal/Autogen/RawReducerDefV9.cs create mode 100644 crates/bindings-csharp/Runtime/Internal/Autogen/RawReducerDefV9.g.cs delete mode 100644 crates/bindings-csharp/Runtime/Internal/Autogen/RawRowLevelSecurityDefV9.cs create mode 100644 crates/bindings-csharp/Runtime/Internal/Autogen/RawRowLevelSecurityDefV9.g.cs delete mode 100644 crates/bindings-csharp/Runtime/Internal/Autogen/RawScheduleDefV9.cs create mode 100644 crates/bindings-csharp/Runtime/Internal/Autogen/RawScheduleDefV9.g.cs delete mode 100644 crates/bindings-csharp/Runtime/Internal/Autogen/RawScopedTypeNameV9.cs create mode 100644 crates/bindings-csharp/Runtime/Internal/Autogen/RawScopedTypeNameV9.g.cs delete mode 100644 crates/bindings-csharp/Runtime/Internal/Autogen/RawSequenceDefV8.cs create mode 100644 crates/bindings-csharp/Runtime/Internal/Autogen/RawSequenceDefV8.g.cs delete mode 100644 crates/bindings-csharp/Runtime/Internal/Autogen/RawSequenceDefV9.cs create mode 100644 crates/bindings-csharp/Runtime/Internal/Autogen/RawSequenceDefV9.g.cs delete mode 100644 crates/bindings-csharp/Runtime/Internal/Autogen/RawTableDefV8.cs create mode 100644 crates/bindings-csharp/Runtime/Internal/Autogen/RawTableDefV8.g.cs delete mode 100644 crates/bindings-csharp/Runtime/Internal/Autogen/RawTableDefV9.cs create mode 100644 crates/bindings-csharp/Runtime/Internal/Autogen/RawTableDefV9.g.cs delete mode 100644 crates/bindings-csharp/Runtime/Internal/Autogen/RawTypeDefV9.cs create mode 100644 crates/bindings-csharp/Runtime/Internal/Autogen/RawTypeDefV9.g.cs delete mode 100644 crates/bindings-csharp/Runtime/Internal/Autogen/RawUniqueConstraintDataV9.cs create mode 100644 crates/bindings-csharp/Runtime/Internal/Autogen/RawUniqueConstraintDataV9.g.cs delete mode 100644 crates/bindings-csharp/Runtime/Internal/Autogen/ReducerDef.cs create mode 100644 crates/bindings-csharp/Runtime/Internal/Autogen/ReducerDef.g.cs delete mode 100644 crates/bindings-csharp/Runtime/Internal/Autogen/TableAccess.cs create mode 100644 crates/bindings-csharp/Runtime/Internal/Autogen/TableAccess.g.cs delete mode 100644 crates/bindings-csharp/Runtime/Internal/Autogen/TableDesc.cs create mode 100644 crates/bindings-csharp/Runtime/Internal/Autogen/TableDesc.g.cs delete mode 100644 crates/bindings-csharp/Runtime/Internal/Autogen/TableType.cs create mode 100644 crates/bindings-csharp/Runtime/Internal/Autogen/TableType.g.cs delete mode 100644 crates/bindings-csharp/Runtime/Internal/Autogen/TypeAlias.cs create mode 100644 crates/bindings-csharp/Runtime/Internal/Autogen/TypeAlias.g.cs delete mode 100644 crates/bindings-csharp/Runtime/Internal/Autogen/Typespace.cs create mode 100644 crates/bindings-csharp/Runtime/Internal/Autogen/Typespace.g.cs diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 942548cfeff..d0be0748067 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -142,7 +142,7 @@ jobs: uses: actions/checkout@v4 with: repository: clockworklabs/spacetimedb-csharp-sdk - ref: staging + ref: ingvar/csharp-codegen-rewrite # TODO: revert to `staging` before merging path: spacetimedb-csharp-sdk - name: Setup NuGet override for C# SDK diff --git a/crates/bindings-csharp/Runtime/Internal/Autogen/IndexType.cs b/crates/bindings-csharp/Runtime/Internal/Autogen/IndexType.cs deleted file mode 100644 index fef78137521..00000000000 --- a/crates/bindings-csharp/Runtime/Internal/Autogen/IndexType.cs +++ /dev/null @@ -1,18 +0,0 @@ -// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. -// - -#nullable enable - -using System; -using SpacetimeDB; - -namespace SpacetimeDB.Internal -{ - [SpacetimeDB.Type] - public enum IndexType - { - BTree, - Hash, - } -} diff --git a/crates/bindings-csharp/Runtime/Internal/Autogen/IndexType.g.cs b/crates/bindings-csharp/Runtime/Internal/Autogen/IndexType.g.cs new file mode 100644 index 00000000000..4dcea669725 --- /dev/null +++ b/crates/bindings-csharp/Runtime/Internal/Autogen/IndexType.g.cs @@ -0,0 +1,16 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#nullable enable + +using System; + +namespace SpacetimeDB.Internal +{ + [SpacetimeDB.Type] + public enum IndexType + { + BTree, + Hash, + } +} diff --git a/crates/bindings-csharp/Runtime/Internal/Autogen/Lifecycle.cs b/crates/bindings-csharp/Runtime/Internal/Autogen/Lifecycle.cs deleted file mode 100644 index 9da28d0e61a..00000000000 --- a/crates/bindings-csharp/Runtime/Internal/Autogen/Lifecycle.cs +++ /dev/null @@ -1,19 +0,0 @@ -// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. -// - -#nullable enable - -using System; -using SpacetimeDB; - -namespace SpacetimeDB.Internal -{ - [SpacetimeDB.Type] - public enum Lifecycle - { - Init, - OnConnect, - OnDisconnect, - } -} diff --git a/crates/bindings-csharp/Runtime/Internal/Autogen/Lifecycle.g.cs b/crates/bindings-csharp/Runtime/Internal/Autogen/Lifecycle.g.cs new file mode 100644 index 00000000000..de0e7ea2206 --- /dev/null +++ b/crates/bindings-csharp/Runtime/Internal/Autogen/Lifecycle.g.cs @@ -0,0 +1,17 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#nullable enable + +using System; + +namespace SpacetimeDB.Internal +{ + [SpacetimeDB.Type] + public enum Lifecycle + { + Init, + OnConnect, + OnDisconnect, + } +} diff --git a/crates/bindings-csharp/Runtime/Internal/Autogen/MiscModuleExport.cs b/crates/bindings-csharp/Runtime/Internal/Autogen/MiscModuleExport.cs deleted file mode 100644 index c5bda8961ce..00000000000 --- a/crates/bindings-csharp/Runtime/Internal/Autogen/MiscModuleExport.cs +++ /dev/null @@ -1,17 +0,0 @@ -// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. -// - -#nullable enable - -using System; -using SpacetimeDB; - -namespace SpacetimeDB.Internal -{ - [SpacetimeDB.Type] - public partial record MiscModuleExport : SpacetimeDB.TaggedEnum<( - SpacetimeDB.Internal.TypeAlias TypeAlias, - SpacetimeDB.Unit _Reserved - )>; -} diff --git a/crates/bindings-csharp/Runtime/Internal/Autogen/MiscModuleExport.g.cs b/crates/bindings-csharp/Runtime/Internal/Autogen/MiscModuleExport.g.cs new file mode 100644 index 00000000000..a608927793a --- /dev/null +++ b/crates/bindings-csharp/Runtime/Internal/Autogen/MiscModuleExport.g.cs @@ -0,0 +1,15 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#nullable enable + +using System; + +namespace SpacetimeDB.Internal +{ + [SpacetimeDB.Type] + public partial record MiscModuleExport : SpacetimeDB.TaggedEnum<( + TypeAlias TypeAlias, + SpacetimeDB.Unit _Reserved + )>; +} diff --git a/crates/bindings-csharp/Runtime/Internal/Autogen/RawColumnDefV8.cs b/crates/bindings-csharp/Runtime/Internal/Autogen/RawColumnDefV8.cs deleted file mode 100644 index 0ca3c3d640f..00000000000 --- a/crates/bindings-csharp/Runtime/Internal/Autogen/RawColumnDefV8.cs +++ /dev/null @@ -1,39 +0,0 @@ -// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. -// - -#nullable enable - -using System; -using SpacetimeDB; -using System.Collections.Generic; -using System.Runtime.Serialization; - -namespace SpacetimeDB.Internal -{ - [SpacetimeDB.Type] - [DataContract] - public partial class RawColumnDefV8 - { - [DataMember(Name = "col_name")] - public string ColName; - [DataMember(Name = "col_type")] - public SpacetimeDB.BSATN.AlgebraicType ColType; - - public RawColumnDefV8( - string ColName, - SpacetimeDB.BSATN.AlgebraicType ColType - ) - { - this.ColName = ColName; - this.ColType = ColType; - } - - public RawColumnDefV8() - { - this.ColName = ""; - this.ColType = null!; - } - - } -} diff --git a/crates/bindings-csharp/Runtime/Internal/Autogen/RawColumnDefV8.g.cs b/crates/bindings-csharp/Runtime/Internal/Autogen/RawColumnDefV8.g.cs new file mode 100644 index 00000000000..ed73c77d986 --- /dev/null +++ b/crates/bindings-csharp/Runtime/Internal/Autogen/RawColumnDefV8.g.cs @@ -0,0 +1,36 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#nullable enable + +using System; +using System.Collections.Generic; +using System.Runtime.Serialization; + +namespace SpacetimeDB.Internal +{ + [SpacetimeDB.Type] + [DataContract] + public sealed partial class RawColumnDefV8 + { + [DataMember(Name = "col_name")] + public string ColName; + [DataMember(Name = "col_type")] + public SpacetimeDB.BSATN.AlgebraicType ColType; + + public RawColumnDefV8( + string ColName, + SpacetimeDB.BSATN.AlgebraicType ColType + ) + { + this.ColName = ColName; + this.ColType = ColType; + } + + public RawColumnDefV8() + { + this.ColName = ""; + this.ColType = null!; + } + } +} diff --git a/crates/bindings-csharp/Runtime/Internal/Autogen/RawConstraintDataV9.cs b/crates/bindings-csharp/Runtime/Internal/Autogen/RawConstraintDataV9.cs deleted file mode 100644 index bb51f8a2310..00000000000 --- a/crates/bindings-csharp/Runtime/Internal/Autogen/RawConstraintDataV9.cs +++ /dev/null @@ -1,17 +0,0 @@ -// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. -// - -#nullable enable - -using System; -using SpacetimeDB; - -namespace SpacetimeDB.Internal -{ - [SpacetimeDB.Type] - public partial record RawConstraintDataV9 : SpacetimeDB.TaggedEnum<( - SpacetimeDB.Internal.RawUniqueConstraintDataV9 Unique, - SpacetimeDB.Unit _Reserved - )>; -} diff --git a/crates/bindings-csharp/Runtime/Internal/Autogen/RawConstraintDataV9.g.cs b/crates/bindings-csharp/Runtime/Internal/Autogen/RawConstraintDataV9.g.cs new file mode 100644 index 00000000000..bea53094110 --- /dev/null +++ b/crates/bindings-csharp/Runtime/Internal/Autogen/RawConstraintDataV9.g.cs @@ -0,0 +1,15 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#nullable enable + +using System; + +namespace SpacetimeDB.Internal +{ + [SpacetimeDB.Type] + public partial record RawConstraintDataV9 : SpacetimeDB.TaggedEnum<( + RawUniqueConstraintDataV9 Unique, + SpacetimeDB.Unit _Reserved + )>; +} diff --git a/crates/bindings-csharp/Runtime/Internal/Autogen/RawConstraintDefV8.cs b/crates/bindings-csharp/Runtime/Internal/Autogen/RawConstraintDefV8.cs deleted file mode 100644 index 50428506398..00000000000 --- a/crates/bindings-csharp/Runtime/Internal/Autogen/RawConstraintDefV8.cs +++ /dev/null @@ -1,43 +0,0 @@ -// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. -// - -#nullable enable - -using System; -using SpacetimeDB; -using System.Collections.Generic; -using System.Runtime.Serialization; - -namespace SpacetimeDB.Internal -{ - [SpacetimeDB.Type] - [DataContract] - public partial class RawConstraintDefV8 - { - [DataMember(Name = "constraint_name")] - public string ConstraintName; - [DataMember(Name = "constraints")] - public byte Constraints; - [DataMember(Name = "columns")] - public System.Collections.Generic.List Columns; - - public RawConstraintDefV8( - string ConstraintName, - byte Constraints, - System.Collections.Generic.List Columns - ) - { - this.ConstraintName = ConstraintName; - this.Constraints = Constraints; - this.Columns = Columns; - } - - public RawConstraintDefV8() - { - this.ConstraintName = ""; - this.Columns = new(); - } - - } -} diff --git a/crates/bindings-csharp/Runtime/Internal/Autogen/RawConstraintDefV8.g.cs b/crates/bindings-csharp/Runtime/Internal/Autogen/RawConstraintDefV8.g.cs new file mode 100644 index 00000000000..5b245ba0a4f --- /dev/null +++ b/crates/bindings-csharp/Runtime/Internal/Autogen/RawConstraintDefV8.g.cs @@ -0,0 +1,40 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#nullable enable + +using System; +using System.Collections.Generic; +using System.Runtime.Serialization; + +namespace SpacetimeDB.Internal +{ + [SpacetimeDB.Type] + [DataContract] + public sealed partial class RawConstraintDefV8 + { + [DataMember(Name = "constraint_name")] + public string ConstraintName; + [DataMember(Name = "constraints")] + public byte Constraints; + [DataMember(Name = "columns")] + public System.Collections.Generic.List Columns; + + public RawConstraintDefV8( + string ConstraintName, + byte Constraints, + System.Collections.Generic.List Columns + ) + { + this.ConstraintName = ConstraintName; + this.Constraints = Constraints; + this.Columns = Columns; + } + + public RawConstraintDefV8() + { + this.ConstraintName = ""; + this.Columns = new(); + } + } +} diff --git a/crates/bindings-csharp/Runtime/Internal/Autogen/RawConstraintDefV9.cs b/crates/bindings-csharp/Runtime/Internal/Autogen/RawConstraintDefV9.cs deleted file mode 100644 index 17cc9a26104..00000000000 --- a/crates/bindings-csharp/Runtime/Internal/Autogen/RawConstraintDefV9.cs +++ /dev/null @@ -1,38 +0,0 @@ -// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. -// - -#nullable enable - -using System; -using SpacetimeDB; -using System.Collections.Generic; -using System.Runtime.Serialization; - -namespace SpacetimeDB.Internal -{ - [SpacetimeDB.Type] - [DataContract] - public partial class RawConstraintDefV9 - { - [DataMember(Name = "name")] - public string? Name; - [DataMember(Name = "data")] - public SpacetimeDB.Internal.RawConstraintDataV9 Data; - - public RawConstraintDefV9( - string? Name, - SpacetimeDB.Internal.RawConstraintDataV9 Data - ) - { - this.Name = Name; - this.Data = Data; - } - - public RawConstraintDefV9() - { - this.Data = null!; - } - - } -} diff --git a/crates/bindings-csharp/Runtime/Internal/Autogen/RawConstraintDefV9.g.cs b/crates/bindings-csharp/Runtime/Internal/Autogen/RawConstraintDefV9.g.cs new file mode 100644 index 00000000000..042687b059c --- /dev/null +++ b/crates/bindings-csharp/Runtime/Internal/Autogen/RawConstraintDefV9.g.cs @@ -0,0 +1,35 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#nullable enable + +using System; +using System.Collections.Generic; +using System.Runtime.Serialization; + +namespace SpacetimeDB.Internal +{ + [SpacetimeDB.Type] + [DataContract] + public sealed partial class RawConstraintDefV9 + { + [DataMember(Name = "name")] + public string? Name; + [DataMember(Name = "data")] + public RawConstraintDataV9 Data; + + public RawConstraintDefV9( + string? Name, + RawConstraintDataV9 Data + ) + { + this.Name = Name; + this.Data = Data; + } + + public RawConstraintDefV9() + { + this.Data = null!; + } + } +} diff --git a/crates/bindings-csharp/Runtime/Internal/Autogen/RawIndexAlgorithm.cs b/crates/bindings-csharp/Runtime/Internal/Autogen/RawIndexAlgorithm.cs deleted file mode 100644 index 4d2bc783901..00000000000 --- a/crates/bindings-csharp/Runtime/Internal/Autogen/RawIndexAlgorithm.cs +++ /dev/null @@ -1,17 +0,0 @@ -// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. -// - -#nullable enable - -using System; -using SpacetimeDB; - -namespace SpacetimeDB.Internal -{ - [SpacetimeDB.Type] - public partial record RawIndexAlgorithm : SpacetimeDB.TaggedEnum<( - System.Collections.Generic.List BTree, - System.Collections.Generic.List Hash - )>; -} diff --git a/crates/bindings-csharp/Runtime/Internal/Autogen/RawIndexAlgorithm.g.cs b/crates/bindings-csharp/Runtime/Internal/Autogen/RawIndexAlgorithm.g.cs new file mode 100644 index 00000000000..bf6563c58e7 --- /dev/null +++ b/crates/bindings-csharp/Runtime/Internal/Autogen/RawIndexAlgorithm.g.cs @@ -0,0 +1,15 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#nullable enable + +using System; + +namespace SpacetimeDB.Internal +{ + [SpacetimeDB.Type] + public partial record RawIndexAlgorithm : SpacetimeDB.TaggedEnum<( + System.Collections.Generic.List BTree, + System.Collections.Generic.List Hash + )>; +} diff --git a/crates/bindings-csharp/Runtime/Internal/Autogen/RawIndexDefV8.cs b/crates/bindings-csharp/Runtime/Internal/Autogen/RawIndexDefV8.cs deleted file mode 100644 index 721779ab346..00000000000 --- a/crates/bindings-csharp/Runtime/Internal/Autogen/RawIndexDefV8.cs +++ /dev/null @@ -1,47 +0,0 @@ -// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. -// - -#nullable enable - -using System; -using SpacetimeDB; -using System.Collections.Generic; -using System.Runtime.Serialization; - -namespace SpacetimeDB.Internal -{ - [SpacetimeDB.Type] - [DataContract] - public partial class RawIndexDefV8 - { - [DataMember(Name = "index_name")] - public string IndexName; - [DataMember(Name = "is_unique")] - public bool IsUnique; - [DataMember(Name = "index_type")] - public SpacetimeDB.Internal.IndexType IndexType; - [DataMember(Name = "columns")] - public System.Collections.Generic.List Columns; - - public RawIndexDefV8( - string IndexName, - bool IsUnique, - SpacetimeDB.Internal.IndexType IndexType, - System.Collections.Generic.List Columns - ) - { - this.IndexName = IndexName; - this.IsUnique = IsUnique; - this.IndexType = IndexType; - this.Columns = Columns; - } - - public RawIndexDefV8() - { - this.IndexName = ""; - this.Columns = new(); - } - - } -} diff --git a/crates/bindings-csharp/Runtime/Internal/Autogen/RawIndexDefV8.g.cs b/crates/bindings-csharp/Runtime/Internal/Autogen/RawIndexDefV8.g.cs new file mode 100644 index 00000000000..8fe89405884 --- /dev/null +++ b/crates/bindings-csharp/Runtime/Internal/Autogen/RawIndexDefV8.g.cs @@ -0,0 +1,44 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#nullable enable + +using System; +using System.Collections.Generic; +using System.Runtime.Serialization; + +namespace SpacetimeDB.Internal +{ + [SpacetimeDB.Type] + [DataContract] + public sealed partial class RawIndexDefV8 + { + [DataMember(Name = "index_name")] + public string IndexName; + [DataMember(Name = "is_unique")] + public bool IsUnique; + [DataMember(Name = "index_type")] + public IndexType IndexType; + [DataMember(Name = "columns")] + public System.Collections.Generic.List Columns; + + public RawIndexDefV8( + string IndexName, + bool IsUnique, + IndexType IndexType, + System.Collections.Generic.List Columns + ) + { + this.IndexName = IndexName; + this.IsUnique = IsUnique; + this.IndexType = IndexType; + this.Columns = Columns; + } + + public RawIndexDefV8() + { + this.IndexName = ""; + this.Columns = new(); + } + } +} diff --git a/crates/bindings-csharp/Runtime/Internal/Autogen/RawIndexDefV9.cs b/crates/bindings-csharp/Runtime/Internal/Autogen/RawIndexDefV9.cs deleted file mode 100644 index 637f3b055b5..00000000000 --- a/crates/bindings-csharp/Runtime/Internal/Autogen/RawIndexDefV9.cs +++ /dev/null @@ -1,42 +0,0 @@ -// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. -// - -#nullable enable - -using System; -using SpacetimeDB; -using System.Collections.Generic; -using System.Runtime.Serialization; - -namespace SpacetimeDB.Internal -{ - [SpacetimeDB.Type] - [DataContract] - public partial class RawIndexDefV9 - { - [DataMember(Name = "name")] - public string? Name; - [DataMember(Name = "accessor_name")] - public string? AccessorName; - [DataMember(Name = "algorithm")] - public SpacetimeDB.Internal.RawIndexAlgorithm Algorithm; - - public RawIndexDefV9( - string? Name, - string? AccessorName, - SpacetimeDB.Internal.RawIndexAlgorithm Algorithm - ) - { - this.Name = Name; - this.AccessorName = AccessorName; - this.Algorithm = Algorithm; - } - - public RawIndexDefV9() - { - this.Algorithm = null!; - } - - } -} diff --git a/crates/bindings-csharp/Runtime/Internal/Autogen/RawIndexDefV9.g.cs b/crates/bindings-csharp/Runtime/Internal/Autogen/RawIndexDefV9.g.cs new file mode 100644 index 00000000000..85f2524b963 --- /dev/null +++ b/crates/bindings-csharp/Runtime/Internal/Autogen/RawIndexDefV9.g.cs @@ -0,0 +1,39 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#nullable enable + +using System; +using System.Collections.Generic; +using System.Runtime.Serialization; + +namespace SpacetimeDB.Internal +{ + [SpacetimeDB.Type] + [DataContract] + public sealed partial class RawIndexDefV9 + { + [DataMember(Name = "name")] + public string? Name; + [DataMember(Name = "accessor_name")] + public string? AccessorName; + [DataMember(Name = "algorithm")] + public RawIndexAlgorithm Algorithm; + + public RawIndexDefV9( + string? Name, + string? AccessorName, + RawIndexAlgorithm Algorithm + ) + { + this.Name = Name; + this.AccessorName = AccessorName; + this.Algorithm = Algorithm; + } + + public RawIndexDefV9() + { + this.Algorithm = null!; + } + } +} diff --git a/crates/bindings-csharp/Runtime/Internal/Autogen/RawMiscModuleExportV9.cs b/crates/bindings-csharp/Runtime/Internal/Autogen/RawMiscModuleExportV9.cs deleted file mode 100644 index 59e6003ecfb..00000000000 --- a/crates/bindings-csharp/Runtime/Internal/Autogen/RawMiscModuleExportV9.cs +++ /dev/null @@ -1,16 +0,0 @@ -// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. -// - -#nullable enable - -using System; -using SpacetimeDB; - -namespace SpacetimeDB.Internal -{ - [SpacetimeDB.Type] - public enum RawMiscModuleExportV9 - { - } -} diff --git a/crates/bindings-csharp/Runtime/Internal/Autogen/RawMiscModuleExportV9.g.cs b/crates/bindings-csharp/Runtime/Internal/Autogen/RawMiscModuleExportV9.g.cs new file mode 100644 index 00000000000..588a21dab11 --- /dev/null +++ b/crates/bindings-csharp/Runtime/Internal/Autogen/RawMiscModuleExportV9.g.cs @@ -0,0 +1,14 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#nullable enable + +using System; + +namespace SpacetimeDB.Internal +{ + [SpacetimeDB.Type] + public enum RawMiscModuleExportV9 + { + } +} diff --git a/crates/bindings-csharp/Runtime/Internal/Autogen/RawModuleDef.cs b/crates/bindings-csharp/Runtime/Internal/Autogen/RawModuleDef.cs deleted file mode 100644 index 90ed2e35a57..00000000000 --- a/crates/bindings-csharp/Runtime/Internal/Autogen/RawModuleDef.cs +++ /dev/null @@ -1,17 +0,0 @@ -// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. -// - -#nullable enable - -using System; -using SpacetimeDB; - -namespace SpacetimeDB.Internal -{ - [SpacetimeDB.Type] - public partial record RawModuleDef : SpacetimeDB.TaggedEnum<( - SpacetimeDB.Internal.RawModuleDefV8 V8BackCompat, - SpacetimeDB.Internal.RawModuleDefV9 V9 - )>; -} diff --git a/crates/bindings-csharp/Runtime/Internal/Autogen/RawModuleDef.g.cs b/crates/bindings-csharp/Runtime/Internal/Autogen/RawModuleDef.g.cs new file mode 100644 index 00000000000..132e6910bcf --- /dev/null +++ b/crates/bindings-csharp/Runtime/Internal/Autogen/RawModuleDef.g.cs @@ -0,0 +1,15 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#nullable enable + +using System; + +namespace SpacetimeDB.Internal +{ + [SpacetimeDB.Type] + public partial record RawModuleDef : SpacetimeDB.TaggedEnum<( + RawModuleDefV8 V8BackCompat, + RawModuleDefV9 V9 + )>; +} diff --git a/crates/bindings-csharp/Runtime/Internal/Autogen/RawModuleDefV8.cs b/crates/bindings-csharp/Runtime/Internal/Autogen/RawModuleDefV8.cs deleted file mode 100644 index 65a329c59e5..00000000000 --- a/crates/bindings-csharp/Runtime/Internal/Autogen/RawModuleDefV8.cs +++ /dev/null @@ -1,49 +0,0 @@ -// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. -// - -#nullable enable - -using System; -using SpacetimeDB; -using System.Collections.Generic; -using System.Runtime.Serialization; - -namespace SpacetimeDB.Internal -{ - [SpacetimeDB.Type] - [DataContract] - public partial class RawModuleDefV8 - { - [DataMember(Name = "typespace")] - public SpacetimeDB.Internal.Typespace Typespace; - [DataMember(Name = "tables")] - public System.Collections.Generic.List Tables; - [DataMember(Name = "reducers")] - public System.Collections.Generic.List Reducers; - [DataMember(Name = "misc_exports")] - public System.Collections.Generic.List MiscExports; - - public RawModuleDefV8( - SpacetimeDB.Internal.Typespace Typespace, - System.Collections.Generic.List Tables, - System.Collections.Generic.List Reducers, - System.Collections.Generic.List MiscExports - ) - { - this.Typespace = Typespace; - this.Tables = Tables; - this.Reducers = Reducers; - this.MiscExports = MiscExports; - } - - public RawModuleDefV8() - { - this.Typespace = new(); - this.Tables = new(); - this.Reducers = new(); - this.MiscExports = new(); - } - - } -} diff --git a/crates/bindings-csharp/Runtime/Internal/Autogen/RawModuleDefV8.g.cs b/crates/bindings-csharp/Runtime/Internal/Autogen/RawModuleDefV8.g.cs new file mode 100644 index 00000000000..ff03785d36e --- /dev/null +++ b/crates/bindings-csharp/Runtime/Internal/Autogen/RawModuleDefV8.g.cs @@ -0,0 +1,46 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#nullable enable + +using System; +using System.Collections.Generic; +using System.Runtime.Serialization; + +namespace SpacetimeDB.Internal +{ + [SpacetimeDB.Type] + [DataContract] + public sealed partial class RawModuleDefV8 + { + [DataMember(Name = "typespace")] + public Typespace Typespace; + [DataMember(Name = "tables")] + public System.Collections.Generic.List Tables; + [DataMember(Name = "reducers")] + public System.Collections.Generic.List Reducers; + [DataMember(Name = "misc_exports")] + public System.Collections.Generic.List MiscExports; + + public RawModuleDefV8( + Typespace Typespace, + System.Collections.Generic.List Tables, + System.Collections.Generic.List Reducers, + System.Collections.Generic.List MiscExports + ) + { + this.Typespace = Typespace; + this.Tables = Tables; + this.Reducers = Reducers; + this.MiscExports = MiscExports; + } + + public RawModuleDefV8() + { + this.Typespace = new(); + this.Tables = new(); + this.Reducers = new(); + this.MiscExports = new(); + } + } +} diff --git a/crates/bindings-csharp/Runtime/Internal/Autogen/RawModuleDefV9.cs b/crates/bindings-csharp/Runtime/Internal/Autogen/RawModuleDefV9.cs deleted file mode 100644 index 7ac231e1d22..00000000000 --- a/crates/bindings-csharp/Runtime/Internal/Autogen/RawModuleDefV9.cs +++ /dev/null @@ -1,59 +0,0 @@ -// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. -// - -#nullable enable - -using System; -using SpacetimeDB; -using System.Collections.Generic; -using System.Runtime.Serialization; - -namespace SpacetimeDB.Internal -{ - [SpacetimeDB.Type] - [DataContract] - public partial class RawModuleDefV9 - { - [DataMember(Name = "typespace")] - public SpacetimeDB.Internal.Typespace Typespace; - [DataMember(Name = "tables")] - public System.Collections.Generic.List Tables; - [DataMember(Name = "reducers")] - public System.Collections.Generic.List Reducers; - [DataMember(Name = "types")] - public System.Collections.Generic.List Types; - [DataMember(Name = "misc_exports")] - public System.Collections.Generic.List MiscExports; - [DataMember(Name = "row_level_security")] - public System.Collections.Generic.List RowLevelSecurity; - - public RawModuleDefV9( - SpacetimeDB.Internal.Typespace Typespace, - System.Collections.Generic.List Tables, - System.Collections.Generic.List Reducers, - System.Collections.Generic.List Types, - System.Collections.Generic.List MiscExports, - System.Collections.Generic.List RowLevelSecurity - ) - { - this.Typespace = Typespace; - this.Tables = Tables; - this.Reducers = Reducers; - this.Types = Types; - this.MiscExports = MiscExports; - this.RowLevelSecurity = RowLevelSecurity; - } - - public RawModuleDefV9() - { - this.Typespace = new(); - this.Tables = new(); - this.Reducers = new(); - this.Types = new(); - this.MiscExports = new(); - this.RowLevelSecurity = new(); - } - - } -} diff --git a/crates/bindings-csharp/Runtime/Internal/Autogen/RawModuleDefV9.g.cs b/crates/bindings-csharp/Runtime/Internal/Autogen/RawModuleDefV9.g.cs new file mode 100644 index 00000000000..f8447ce68ee --- /dev/null +++ b/crates/bindings-csharp/Runtime/Internal/Autogen/RawModuleDefV9.g.cs @@ -0,0 +1,56 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#nullable enable + +using System; +using System.Collections.Generic; +using System.Runtime.Serialization; + +namespace SpacetimeDB.Internal +{ + [SpacetimeDB.Type] + [DataContract] + public sealed partial class RawModuleDefV9 + { + [DataMember(Name = "typespace")] + public Typespace Typespace; + [DataMember(Name = "tables")] + public System.Collections.Generic.List Tables; + [DataMember(Name = "reducers")] + public System.Collections.Generic.List Reducers; + [DataMember(Name = "types")] + public System.Collections.Generic.List Types; + [DataMember(Name = "misc_exports")] + public System.Collections.Generic.List MiscExports; + [DataMember(Name = "row_level_security")] + public System.Collections.Generic.List RowLevelSecurity; + + public RawModuleDefV9( + Typespace Typespace, + System.Collections.Generic.List Tables, + System.Collections.Generic.List Reducers, + System.Collections.Generic.List Types, + System.Collections.Generic.List MiscExports, + System.Collections.Generic.List RowLevelSecurity + ) + { + this.Typespace = Typespace; + this.Tables = Tables; + this.Reducers = Reducers; + this.Types = Types; + this.MiscExports = MiscExports; + this.RowLevelSecurity = RowLevelSecurity; + } + + public RawModuleDefV9() + { + this.Typespace = new(); + this.Tables = new(); + this.Reducers = new(); + this.Types = new(); + this.MiscExports = new(); + this.RowLevelSecurity = new(); + } + } +} diff --git a/crates/bindings-csharp/Runtime/Internal/Autogen/RawReducerDefV9.cs b/crates/bindings-csharp/Runtime/Internal/Autogen/RawReducerDefV9.cs deleted file mode 100644 index 4811d4cf917..00000000000 --- a/crates/bindings-csharp/Runtime/Internal/Autogen/RawReducerDefV9.cs +++ /dev/null @@ -1,43 +0,0 @@ -// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. -// - -#nullable enable - -using System; -using SpacetimeDB; -using System.Collections.Generic; -using System.Runtime.Serialization; - -namespace SpacetimeDB.Internal -{ - [SpacetimeDB.Type] - [DataContract] - public partial class RawReducerDefV9 - { - [DataMember(Name = "name")] - public string Name; - [DataMember(Name = "params")] - public List Params; - [DataMember(Name = "lifecycle")] - public SpacetimeDB.Internal.Lifecycle? Lifecycle; - - public RawReducerDefV9( - string Name, - List Params, - SpacetimeDB.Internal.Lifecycle? Lifecycle - ) - { - this.Name = Name; - this.Params = Params; - this.Lifecycle = Lifecycle; - } - - public RawReducerDefV9() - { - this.Name = ""; - this.Params = new(); - } - - } -} diff --git a/crates/bindings-csharp/Runtime/Internal/Autogen/RawReducerDefV9.g.cs b/crates/bindings-csharp/Runtime/Internal/Autogen/RawReducerDefV9.g.cs new file mode 100644 index 00000000000..964c24d833d --- /dev/null +++ b/crates/bindings-csharp/Runtime/Internal/Autogen/RawReducerDefV9.g.cs @@ -0,0 +1,40 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#nullable enable + +using System; +using System.Collections.Generic; +using System.Runtime.Serialization; + +namespace SpacetimeDB.Internal +{ + [SpacetimeDB.Type] + [DataContract] + public sealed partial class RawReducerDefV9 + { + [DataMember(Name = "name")] + public string Name; + [DataMember(Name = "params")] + public List Params; + [DataMember(Name = "lifecycle")] + public Lifecycle? Lifecycle; + + public RawReducerDefV9( + string Name, + List Params, + Lifecycle? Lifecycle + ) + { + this.Name = Name; + this.Params = Params; + this.Lifecycle = Lifecycle; + } + + public RawReducerDefV9() + { + this.Name = ""; + this.Params = new(); + } + } +} diff --git a/crates/bindings-csharp/Runtime/Internal/Autogen/RawRowLevelSecurityDefV9.cs b/crates/bindings-csharp/Runtime/Internal/Autogen/RawRowLevelSecurityDefV9.cs deleted file mode 100644 index 9b8100d0741..00000000000 --- a/crates/bindings-csharp/Runtime/Internal/Autogen/RawRowLevelSecurityDefV9.cs +++ /dev/null @@ -1,32 +0,0 @@ -// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. -// - -#nullable enable - -using System; -using SpacetimeDB; -using System.Collections.Generic; -using System.Runtime.Serialization; - -namespace SpacetimeDB.Internal -{ - [SpacetimeDB.Type] - [DataContract] - public partial class RawRowLevelSecurityDefV9 - { - [DataMember(Name = "sql")] - public string Sql; - - public RawRowLevelSecurityDefV9(string Sql) - { - this.Sql = Sql; - } - - public RawRowLevelSecurityDefV9() - { - this.Sql = ""; - } - - } -} diff --git a/crates/bindings-csharp/Runtime/Internal/Autogen/RawRowLevelSecurityDefV9.g.cs b/crates/bindings-csharp/Runtime/Internal/Autogen/RawRowLevelSecurityDefV9.g.cs new file mode 100644 index 00000000000..0b3e26f3af4 --- /dev/null +++ b/crates/bindings-csharp/Runtime/Internal/Autogen/RawRowLevelSecurityDefV9.g.cs @@ -0,0 +1,29 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#nullable enable + +using System; +using System.Collections.Generic; +using System.Runtime.Serialization; + +namespace SpacetimeDB.Internal +{ + [SpacetimeDB.Type] + [DataContract] + public sealed partial class RawRowLevelSecurityDefV9 + { + [DataMember(Name = "sql")] + public string Sql; + + public RawRowLevelSecurityDefV9(string Sql) + { + this.Sql = Sql; + } + + public RawRowLevelSecurityDefV9() + { + this.Sql = ""; + } + } +} diff --git a/crates/bindings-csharp/Runtime/Internal/Autogen/RawScheduleDefV9.cs b/crates/bindings-csharp/Runtime/Internal/Autogen/RawScheduleDefV9.cs deleted file mode 100644 index 3d137c714a3..00000000000 --- a/crates/bindings-csharp/Runtime/Internal/Autogen/RawScheduleDefV9.cs +++ /dev/null @@ -1,42 +0,0 @@ -// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. -// - -#nullable enable - -using System; -using SpacetimeDB; -using System.Collections.Generic; -using System.Runtime.Serialization; - -namespace SpacetimeDB.Internal -{ - [SpacetimeDB.Type] - [DataContract] - public partial class RawScheduleDefV9 - { - [DataMember(Name = "name")] - public string? Name; - [DataMember(Name = "reducer_name")] - public string ReducerName; - [DataMember(Name = "scheduled_at_column")] - public ushort ScheduledAtColumn; - - public RawScheduleDefV9( - string? Name, - string ReducerName, - ushort ScheduledAtColumn - ) - { - this.Name = Name; - this.ReducerName = ReducerName; - this.ScheduledAtColumn = ScheduledAtColumn; - } - - public RawScheduleDefV9() - { - this.ReducerName = ""; - } - - } -} diff --git a/crates/bindings-csharp/Runtime/Internal/Autogen/RawScheduleDefV9.g.cs b/crates/bindings-csharp/Runtime/Internal/Autogen/RawScheduleDefV9.g.cs new file mode 100644 index 00000000000..00f88884d4b --- /dev/null +++ b/crates/bindings-csharp/Runtime/Internal/Autogen/RawScheduleDefV9.g.cs @@ -0,0 +1,39 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#nullable enable + +using System; +using System.Collections.Generic; +using System.Runtime.Serialization; + +namespace SpacetimeDB.Internal +{ + [SpacetimeDB.Type] + [DataContract] + public sealed partial class RawScheduleDefV9 + { + [DataMember(Name = "name")] + public string? Name; + [DataMember(Name = "reducer_name")] + public string ReducerName; + [DataMember(Name = "scheduled_at_column")] + public ushort ScheduledAtColumn; + + public RawScheduleDefV9( + string? Name, + string ReducerName, + ushort ScheduledAtColumn + ) + { + this.Name = Name; + this.ReducerName = ReducerName; + this.ScheduledAtColumn = ScheduledAtColumn; + } + + public RawScheduleDefV9() + { + this.ReducerName = ""; + } + } +} diff --git a/crates/bindings-csharp/Runtime/Internal/Autogen/RawScopedTypeNameV9.cs b/crates/bindings-csharp/Runtime/Internal/Autogen/RawScopedTypeNameV9.cs deleted file mode 100644 index b794739ae7c..00000000000 --- a/crates/bindings-csharp/Runtime/Internal/Autogen/RawScopedTypeNameV9.cs +++ /dev/null @@ -1,39 +0,0 @@ -// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. -// - -#nullable enable - -using System; -using SpacetimeDB; -using System.Collections.Generic; -using System.Runtime.Serialization; - -namespace SpacetimeDB.Internal -{ - [SpacetimeDB.Type] - [DataContract] - public partial class RawScopedTypeNameV9 - { - [DataMember(Name = "scope")] - public System.Collections.Generic.List Scope; - [DataMember(Name = "name")] - public string Name; - - public RawScopedTypeNameV9( - System.Collections.Generic.List Scope, - string Name - ) - { - this.Scope = Scope; - this.Name = Name; - } - - public RawScopedTypeNameV9() - { - this.Scope = new(); - this.Name = ""; - } - - } -} diff --git a/crates/bindings-csharp/Runtime/Internal/Autogen/RawScopedTypeNameV9.g.cs b/crates/bindings-csharp/Runtime/Internal/Autogen/RawScopedTypeNameV9.g.cs new file mode 100644 index 00000000000..e6bde866c40 --- /dev/null +++ b/crates/bindings-csharp/Runtime/Internal/Autogen/RawScopedTypeNameV9.g.cs @@ -0,0 +1,36 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#nullable enable + +using System; +using System.Collections.Generic; +using System.Runtime.Serialization; + +namespace SpacetimeDB.Internal +{ + [SpacetimeDB.Type] + [DataContract] + public sealed partial class RawScopedTypeNameV9 + { + [DataMember(Name = "scope")] + public System.Collections.Generic.List Scope; + [DataMember(Name = "name")] + public string Name; + + public RawScopedTypeNameV9( + System.Collections.Generic.List Scope, + string Name + ) + { + this.Scope = Scope; + this.Name = Name; + } + + public RawScopedTypeNameV9() + { + this.Scope = new(); + this.Name = ""; + } + } +} diff --git a/crates/bindings-csharp/Runtime/Internal/Autogen/RawSequenceDefV8.cs b/crates/bindings-csharp/Runtime/Internal/Autogen/RawSequenceDefV8.cs deleted file mode 100644 index e8461f59269..00000000000 --- a/crates/bindings-csharp/Runtime/Internal/Autogen/RawSequenceDefV8.cs +++ /dev/null @@ -1,58 +0,0 @@ -// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. -// - -#nullable enable - -using System; -using SpacetimeDB; -using System.Collections.Generic; -using System.Runtime.Serialization; - -namespace SpacetimeDB.Internal -{ - [SpacetimeDB.Type] - [DataContract] - public partial class RawSequenceDefV8 - { - [DataMember(Name = "sequence_name")] - public string SequenceName; - [DataMember(Name = "col_pos")] - public ushort ColPos; - [DataMember(Name = "increment")] - public I128 Increment; - [DataMember(Name = "start")] - public I128? Start; - [DataMember(Name = "min_value")] - public I128? MinValue; - [DataMember(Name = "max_value")] - public I128? MaxValue; - [DataMember(Name = "allocated")] - public I128 Allocated; - - public RawSequenceDefV8( - string SequenceName, - ushort ColPos, - I128 Increment, - I128? Start, - I128? MinValue, - I128? MaxValue, - I128 Allocated - ) - { - this.SequenceName = SequenceName; - this.ColPos = ColPos; - this.Increment = Increment; - this.Start = Start; - this.MinValue = MinValue; - this.MaxValue = MaxValue; - this.Allocated = Allocated; - } - - public RawSequenceDefV8() - { - this.SequenceName = ""; - } - - } -} diff --git a/crates/bindings-csharp/Runtime/Internal/Autogen/RawSequenceDefV8.g.cs b/crates/bindings-csharp/Runtime/Internal/Autogen/RawSequenceDefV8.g.cs new file mode 100644 index 00000000000..c0ccd834c96 --- /dev/null +++ b/crates/bindings-csharp/Runtime/Internal/Autogen/RawSequenceDefV8.g.cs @@ -0,0 +1,55 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#nullable enable + +using System; +using System.Collections.Generic; +using System.Runtime.Serialization; + +namespace SpacetimeDB.Internal +{ + [SpacetimeDB.Type] + [DataContract] + public sealed partial class RawSequenceDefV8 + { + [DataMember(Name = "sequence_name")] + public string SequenceName; + [DataMember(Name = "col_pos")] + public ushort ColPos; + [DataMember(Name = "increment")] + public I128 Increment; + [DataMember(Name = "start")] + public I128? Start; + [DataMember(Name = "min_value")] + public I128? MinValue; + [DataMember(Name = "max_value")] + public I128? MaxValue; + [DataMember(Name = "allocated")] + public I128 Allocated; + + public RawSequenceDefV8( + string SequenceName, + ushort ColPos, + I128 Increment, + I128? Start, + I128? MinValue, + I128? MaxValue, + I128 Allocated + ) + { + this.SequenceName = SequenceName; + this.ColPos = ColPos; + this.Increment = Increment; + this.Start = Start; + this.MinValue = MinValue; + this.MaxValue = MaxValue; + this.Allocated = Allocated; + } + + public RawSequenceDefV8() + { + this.SequenceName = ""; + } + } +} diff --git a/crates/bindings-csharp/Runtime/Internal/Autogen/RawSequenceDefV9.cs b/crates/bindings-csharp/Runtime/Internal/Autogen/RawSequenceDefV9.cs deleted file mode 100644 index c9705bdd113..00000000000 --- a/crates/bindings-csharp/Runtime/Internal/Autogen/RawSequenceDefV9.cs +++ /dev/null @@ -1,53 +0,0 @@ -// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. -// - -#nullable enable - -using System; -using SpacetimeDB; -using System.Collections.Generic; -using System.Runtime.Serialization; - -namespace SpacetimeDB.Internal -{ - [SpacetimeDB.Type] - [DataContract] - public partial class RawSequenceDefV9 - { - [DataMember(Name = "name")] - public string? Name; - [DataMember(Name = "column")] - public ushort Column; - [DataMember(Name = "start")] - public I128? Start; - [DataMember(Name = "min_value")] - public I128? MinValue; - [DataMember(Name = "max_value")] - public I128? MaxValue; - [DataMember(Name = "increment")] - public I128 Increment; - - public RawSequenceDefV9( - string? Name, - ushort Column, - I128? Start, - I128? MinValue, - I128? MaxValue, - I128 Increment - ) - { - this.Name = Name; - this.Column = Column; - this.Start = Start; - this.MinValue = MinValue; - this.MaxValue = MaxValue; - this.Increment = Increment; - } - - public RawSequenceDefV9() - { - } - - } -} diff --git a/crates/bindings-csharp/Runtime/Internal/Autogen/RawSequenceDefV9.g.cs b/crates/bindings-csharp/Runtime/Internal/Autogen/RawSequenceDefV9.g.cs new file mode 100644 index 00000000000..002b7d6a79e --- /dev/null +++ b/crates/bindings-csharp/Runtime/Internal/Autogen/RawSequenceDefV9.g.cs @@ -0,0 +1,50 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#nullable enable + +using System; +using System.Collections.Generic; +using System.Runtime.Serialization; + +namespace SpacetimeDB.Internal +{ + [SpacetimeDB.Type] + [DataContract] + public sealed partial class RawSequenceDefV9 + { + [DataMember(Name = "name")] + public string? Name; + [DataMember(Name = "column")] + public ushort Column; + [DataMember(Name = "start")] + public I128? Start; + [DataMember(Name = "min_value")] + public I128? MinValue; + [DataMember(Name = "max_value")] + public I128? MaxValue; + [DataMember(Name = "increment")] + public I128 Increment; + + public RawSequenceDefV9( + string? Name, + ushort Column, + I128? Start, + I128? MinValue, + I128? MaxValue, + I128 Increment + ) + { + this.Name = Name; + this.Column = Column; + this.Start = Start; + this.MinValue = MinValue; + this.MaxValue = MaxValue; + this.Increment = Increment; + } + + public RawSequenceDefV9() + { + } + } +} diff --git a/crates/bindings-csharp/Runtime/Internal/Autogen/RawTableDefV8.cs b/crates/bindings-csharp/Runtime/Internal/Autogen/RawTableDefV8.cs deleted file mode 100644 index e32ed3cbffa..00000000000 --- a/crates/bindings-csharp/Runtime/Internal/Autogen/RawTableDefV8.cs +++ /dev/null @@ -1,68 +0,0 @@ -// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. -// - -#nullable enable - -using System; -using SpacetimeDB; -using System.Collections.Generic; -using System.Runtime.Serialization; - -namespace SpacetimeDB.Internal -{ - [SpacetimeDB.Type] - [DataContract] - public partial class RawTableDefV8 - { - [DataMember(Name = "table_name")] - public string TableName; - [DataMember(Name = "columns")] - public System.Collections.Generic.List Columns; - [DataMember(Name = "indexes")] - public System.Collections.Generic.List Indexes; - [DataMember(Name = "constraints")] - public System.Collections.Generic.List Constraints; - [DataMember(Name = "sequences")] - public System.Collections.Generic.List Sequences; - [DataMember(Name = "table_type")] - public string TableType; - [DataMember(Name = "table_access")] - public string TableAccess; - [DataMember(Name = "scheduled")] - public string? Scheduled; - - public RawTableDefV8( - string TableName, - System.Collections.Generic.List Columns, - System.Collections.Generic.List Indexes, - System.Collections.Generic.List Constraints, - System.Collections.Generic.List Sequences, - string TableType, - string TableAccess, - string? Scheduled - ) - { - this.TableName = TableName; - this.Columns = Columns; - this.Indexes = Indexes; - this.Constraints = Constraints; - this.Sequences = Sequences; - this.TableType = TableType; - this.TableAccess = TableAccess; - this.Scheduled = Scheduled; - } - - public RawTableDefV8() - { - this.TableName = ""; - this.Columns = new(); - this.Indexes = new(); - this.Constraints = new(); - this.Sequences = new(); - this.TableType = ""; - this.TableAccess = ""; - } - - } -} diff --git a/crates/bindings-csharp/Runtime/Internal/Autogen/RawTableDefV8.g.cs b/crates/bindings-csharp/Runtime/Internal/Autogen/RawTableDefV8.g.cs new file mode 100644 index 00000000000..7306480a4de --- /dev/null +++ b/crates/bindings-csharp/Runtime/Internal/Autogen/RawTableDefV8.g.cs @@ -0,0 +1,65 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#nullable enable + +using System; +using System.Collections.Generic; +using System.Runtime.Serialization; + +namespace SpacetimeDB.Internal +{ + [SpacetimeDB.Type] + [DataContract] + public sealed partial class RawTableDefV8 + { + [DataMember(Name = "table_name")] + public string TableName; + [DataMember(Name = "columns")] + public System.Collections.Generic.List Columns; + [DataMember(Name = "indexes")] + public System.Collections.Generic.List Indexes; + [DataMember(Name = "constraints")] + public System.Collections.Generic.List Constraints; + [DataMember(Name = "sequences")] + public System.Collections.Generic.List Sequences; + [DataMember(Name = "table_type")] + public string TableType; + [DataMember(Name = "table_access")] + public string TableAccess; + [DataMember(Name = "scheduled")] + public string? Scheduled; + + public RawTableDefV8( + string TableName, + System.Collections.Generic.List Columns, + System.Collections.Generic.List Indexes, + System.Collections.Generic.List Constraints, + System.Collections.Generic.List Sequences, + string TableType, + string TableAccess, + string? Scheduled + ) + { + this.TableName = TableName; + this.Columns = Columns; + this.Indexes = Indexes; + this.Constraints = Constraints; + this.Sequences = Sequences; + this.TableType = TableType; + this.TableAccess = TableAccess; + this.Scheduled = Scheduled; + } + + public RawTableDefV8() + { + this.TableName = ""; + this.Columns = new(); + this.Indexes = new(); + this.Constraints = new(); + this.Sequences = new(); + this.TableType = ""; + this.TableAccess = ""; + } + } +} diff --git a/crates/bindings-csharp/Runtime/Internal/Autogen/RawTableDefV9.cs b/crates/bindings-csharp/Runtime/Internal/Autogen/RawTableDefV9.cs deleted file mode 100644 index 83e69a585a8..00000000000 --- a/crates/bindings-csharp/Runtime/Internal/Autogen/RawTableDefV9.cs +++ /dev/null @@ -1,70 +0,0 @@ -// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. -// - -#nullable enable - -using System; -using SpacetimeDB; -using System.Collections.Generic; -using System.Runtime.Serialization; - -namespace SpacetimeDB.Internal -{ - [SpacetimeDB.Type] - [DataContract] - public partial class RawTableDefV9 - { - [DataMember(Name = "name")] - public string Name; - [DataMember(Name = "product_type_ref")] - public uint ProductTypeRef; - [DataMember(Name = "primary_key")] - public System.Collections.Generic.List PrimaryKey; - [DataMember(Name = "indexes")] - public System.Collections.Generic.List Indexes; - [DataMember(Name = "constraints")] - public System.Collections.Generic.List Constraints; - [DataMember(Name = "sequences")] - public System.Collections.Generic.List Sequences; - [DataMember(Name = "schedule")] - public SpacetimeDB.Internal.RawScheduleDefV9? Schedule; - [DataMember(Name = "table_type")] - public SpacetimeDB.Internal.TableType TableType; - [DataMember(Name = "table_access")] - public SpacetimeDB.Internal.TableAccess TableAccess; - - public RawTableDefV9( - string Name, - uint ProductTypeRef, - System.Collections.Generic.List PrimaryKey, - System.Collections.Generic.List Indexes, - System.Collections.Generic.List Constraints, - System.Collections.Generic.List Sequences, - SpacetimeDB.Internal.RawScheduleDefV9? Schedule, - SpacetimeDB.Internal.TableType TableType, - SpacetimeDB.Internal.TableAccess TableAccess - ) - { - this.Name = Name; - this.ProductTypeRef = ProductTypeRef; - this.PrimaryKey = PrimaryKey; - this.Indexes = Indexes; - this.Constraints = Constraints; - this.Sequences = Sequences; - this.Schedule = Schedule; - this.TableType = TableType; - this.TableAccess = TableAccess; - } - - public RawTableDefV9() - { - this.Name = ""; - this.PrimaryKey = new(); - this.Indexes = new(); - this.Constraints = new(); - this.Sequences = new(); - } - - } -} diff --git a/crates/bindings-csharp/Runtime/Internal/Autogen/RawTableDefV9.g.cs b/crates/bindings-csharp/Runtime/Internal/Autogen/RawTableDefV9.g.cs new file mode 100644 index 00000000000..5d928a74185 --- /dev/null +++ b/crates/bindings-csharp/Runtime/Internal/Autogen/RawTableDefV9.g.cs @@ -0,0 +1,67 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#nullable enable + +using System; +using System.Collections.Generic; +using System.Runtime.Serialization; + +namespace SpacetimeDB.Internal +{ + [SpacetimeDB.Type] + [DataContract] + public sealed partial class RawTableDefV9 + { + [DataMember(Name = "name")] + public string Name; + [DataMember(Name = "product_type_ref")] + public uint ProductTypeRef; + [DataMember(Name = "primary_key")] + public System.Collections.Generic.List PrimaryKey; + [DataMember(Name = "indexes")] + public System.Collections.Generic.List Indexes; + [DataMember(Name = "constraints")] + public System.Collections.Generic.List Constraints; + [DataMember(Name = "sequences")] + public System.Collections.Generic.List Sequences; + [DataMember(Name = "schedule")] + public RawScheduleDefV9? Schedule; + [DataMember(Name = "table_type")] + public TableType TableType; + [DataMember(Name = "table_access")] + public TableAccess TableAccess; + + public RawTableDefV9( + string Name, + uint ProductTypeRef, + System.Collections.Generic.List PrimaryKey, + System.Collections.Generic.List Indexes, + System.Collections.Generic.List Constraints, + System.Collections.Generic.List Sequences, + RawScheduleDefV9? Schedule, + TableType TableType, + TableAccess TableAccess + ) + { + this.Name = Name; + this.ProductTypeRef = ProductTypeRef; + this.PrimaryKey = PrimaryKey; + this.Indexes = Indexes; + this.Constraints = Constraints; + this.Sequences = Sequences; + this.Schedule = Schedule; + this.TableType = TableType; + this.TableAccess = TableAccess; + } + + public RawTableDefV9() + { + this.Name = ""; + this.PrimaryKey = new(); + this.Indexes = new(); + this.Constraints = new(); + this.Sequences = new(); + } + } +} diff --git a/crates/bindings-csharp/Runtime/Internal/Autogen/RawTypeDefV9.cs b/crates/bindings-csharp/Runtime/Internal/Autogen/RawTypeDefV9.cs deleted file mode 100644 index be2d34ce670..00000000000 --- a/crates/bindings-csharp/Runtime/Internal/Autogen/RawTypeDefV9.cs +++ /dev/null @@ -1,42 +0,0 @@ -// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. -// - -#nullable enable - -using System; -using SpacetimeDB; -using System.Collections.Generic; -using System.Runtime.Serialization; - -namespace SpacetimeDB.Internal -{ - [SpacetimeDB.Type] - [DataContract] - public partial class RawTypeDefV9 - { - [DataMember(Name = "name")] - public SpacetimeDB.Internal.RawScopedTypeNameV9 Name; - [DataMember(Name = "ty")] - public uint Ty; - [DataMember(Name = "custom_ordering")] - public bool CustomOrdering; - - public RawTypeDefV9( - SpacetimeDB.Internal.RawScopedTypeNameV9 Name, - uint Ty, - bool CustomOrdering - ) - { - this.Name = Name; - this.Ty = Ty; - this.CustomOrdering = CustomOrdering; - } - - public RawTypeDefV9() - { - this.Name = new(); - } - - } -} diff --git a/crates/bindings-csharp/Runtime/Internal/Autogen/RawTypeDefV9.g.cs b/crates/bindings-csharp/Runtime/Internal/Autogen/RawTypeDefV9.g.cs new file mode 100644 index 00000000000..1e345564227 --- /dev/null +++ b/crates/bindings-csharp/Runtime/Internal/Autogen/RawTypeDefV9.g.cs @@ -0,0 +1,39 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#nullable enable + +using System; +using System.Collections.Generic; +using System.Runtime.Serialization; + +namespace SpacetimeDB.Internal +{ + [SpacetimeDB.Type] + [DataContract] + public sealed partial class RawTypeDefV9 + { + [DataMember(Name = "name")] + public RawScopedTypeNameV9 Name; + [DataMember(Name = "ty")] + public uint Ty; + [DataMember(Name = "custom_ordering")] + public bool CustomOrdering; + + public RawTypeDefV9( + RawScopedTypeNameV9 Name, + uint Ty, + bool CustomOrdering + ) + { + this.Name = Name; + this.Ty = Ty; + this.CustomOrdering = CustomOrdering; + } + + public RawTypeDefV9() + { + this.Name = new(); + } + } +} diff --git a/crates/bindings-csharp/Runtime/Internal/Autogen/RawUniqueConstraintDataV9.cs b/crates/bindings-csharp/Runtime/Internal/Autogen/RawUniqueConstraintDataV9.cs deleted file mode 100644 index b02f8dc7e41..00000000000 --- a/crates/bindings-csharp/Runtime/Internal/Autogen/RawUniqueConstraintDataV9.cs +++ /dev/null @@ -1,32 +0,0 @@ -// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. -// - -#nullable enable - -using System; -using SpacetimeDB; -using System.Collections.Generic; -using System.Runtime.Serialization; - -namespace SpacetimeDB.Internal -{ - [SpacetimeDB.Type] - [DataContract] - public partial class RawUniqueConstraintDataV9 - { - [DataMember(Name = "columns")] - public System.Collections.Generic.List Columns; - - public RawUniqueConstraintDataV9(System.Collections.Generic.List Columns) - { - this.Columns = Columns; - } - - public RawUniqueConstraintDataV9() - { - this.Columns = new(); - } - - } -} diff --git a/crates/bindings-csharp/Runtime/Internal/Autogen/RawUniqueConstraintDataV9.g.cs b/crates/bindings-csharp/Runtime/Internal/Autogen/RawUniqueConstraintDataV9.g.cs new file mode 100644 index 00000000000..eea2961ae8d --- /dev/null +++ b/crates/bindings-csharp/Runtime/Internal/Autogen/RawUniqueConstraintDataV9.g.cs @@ -0,0 +1,29 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#nullable enable + +using System; +using System.Collections.Generic; +using System.Runtime.Serialization; + +namespace SpacetimeDB.Internal +{ + [SpacetimeDB.Type] + [DataContract] + public sealed partial class RawUniqueConstraintDataV9 + { + [DataMember(Name = "columns")] + public System.Collections.Generic.List Columns; + + public RawUniqueConstraintDataV9(System.Collections.Generic.List Columns) + { + this.Columns = Columns; + } + + public RawUniqueConstraintDataV9() + { + this.Columns = new(); + } + } +} diff --git a/crates/bindings-csharp/Runtime/Internal/Autogen/ReducerDef.cs b/crates/bindings-csharp/Runtime/Internal/Autogen/ReducerDef.cs deleted file mode 100644 index c3cfb6e7024..00000000000 --- a/crates/bindings-csharp/Runtime/Internal/Autogen/ReducerDef.cs +++ /dev/null @@ -1,39 +0,0 @@ -// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. -// - -#nullable enable - -using System; -using SpacetimeDB; -using System.Collections.Generic; -using System.Runtime.Serialization; - -namespace SpacetimeDB.Internal -{ - [SpacetimeDB.Type] - [DataContract] - public partial class ReducerDef - { - [DataMember(Name = "name")] - public string Name; - [DataMember(Name = "args")] - public System.Collections.Generic.List Args; - - public ReducerDef( - string Name, - System.Collections.Generic.List Args - ) - { - this.Name = Name; - this.Args = Args; - } - - public ReducerDef() - { - this.Name = ""; - this.Args = new(); - } - - } -} diff --git a/crates/bindings-csharp/Runtime/Internal/Autogen/ReducerDef.g.cs b/crates/bindings-csharp/Runtime/Internal/Autogen/ReducerDef.g.cs new file mode 100644 index 00000000000..0a010c1834d --- /dev/null +++ b/crates/bindings-csharp/Runtime/Internal/Autogen/ReducerDef.g.cs @@ -0,0 +1,36 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#nullable enable + +using System; +using System.Collections.Generic; +using System.Runtime.Serialization; + +namespace SpacetimeDB.Internal +{ + [SpacetimeDB.Type] + [DataContract] + public sealed partial class ReducerDef + { + [DataMember(Name = "name")] + public string Name; + [DataMember(Name = "args")] + public System.Collections.Generic.List Args; + + public ReducerDef( + string Name, + System.Collections.Generic.List Args + ) + { + this.Name = Name; + this.Args = Args; + } + + public ReducerDef() + { + this.Name = ""; + this.Args = new(); + } + } +} diff --git a/crates/bindings-csharp/Runtime/Internal/Autogen/TableAccess.cs b/crates/bindings-csharp/Runtime/Internal/Autogen/TableAccess.cs deleted file mode 100644 index eb8399d30a0..00000000000 --- a/crates/bindings-csharp/Runtime/Internal/Autogen/TableAccess.cs +++ /dev/null @@ -1,18 +0,0 @@ -// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. -// - -#nullable enable - -using System; -using SpacetimeDB; - -namespace SpacetimeDB.Internal -{ - [SpacetimeDB.Type] - public enum TableAccess - { - Public, - Private, - } -} diff --git a/crates/bindings-csharp/Runtime/Internal/Autogen/TableAccess.g.cs b/crates/bindings-csharp/Runtime/Internal/Autogen/TableAccess.g.cs new file mode 100644 index 00000000000..0ba303b9131 --- /dev/null +++ b/crates/bindings-csharp/Runtime/Internal/Autogen/TableAccess.g.cs @@ -0,0 +1,16 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#nullable enable + +using System; + +namespace SpacetimeDB.Internal +{ + [SpacetimeDB.Type] + public enum TableAccess + { + Public, + Private, + } +} diff --git a/crates/bindings-csharp/Runtime/Internal/Autogen/TableDesc.cs b/crates/bindings-csharp/Runtime/Internal/Autogen/TableDesc.cs deleted file mode 100644 index 26630eac87a..00000000000 --- a/crates/bindings-csharp/Runtime/Internal/Autogen/TableDesc.cs +++ /dev/null @@ -1,38 +0,0 @@ -// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. -// - -#nullable enable - -using System; -using SpacetimeDB; -using System.Collections.Generic; -using System.Runtime.Serialization; - -namespace SpacetimeDB.Internal -{ - [SpacetimeDB.Type] - [DataContract] - public partial class TableDesc - { - [DataMember(Name = "schema")] - public SpacetimeDB.Internal.RawTableDefV8 Schema; - [DataMember(Name = "data")] - public uint Data; - - public TableDesc( - SpacetimeDB.Internal.RawTableDefV8 Schema, - uint Data - ) - { - this.Schema = Schema; - this.Data = Data; - } - - public TableDesc() - { - this.Schema = new(); - } - - } -} diff --git a/crates/bindings-csharp/Runtime/Internal/Autogen/TableDesc.g.cs b/crates/bindings-csharp/Runtime/Internal/Autogen/TableDesc.g.cs new file mode 100644 index 00000000000..9e3e157e60d --- /dev/null +++ b/crates/bindings-csharp/Runtime/Internal/Autogen/TableDesc.g.cs @@ -0,0 +1,35 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#nullable enable + +using System; +using System.Collections.Generic; +using System.Runtime.Serialization; + +namespace SpacetimeDB.Internal +{ + [SpacetimeDB.Type] + [DataContract] + public sealed partial class TableDesc + { + [DataMember(Name = "schema")] + public RawTableDefV8 Schema; + [DataMember(Name = "data")] + public uint Data; + + public TableDesc( + RawTableDefV8 Schema, + uint Data + ) + { + this.Schema = Schema; + this.Data = Data; + } + + public TableDesc() + { + this.Schema = new(); + } + } +} diff --git a/crates/bindings-csharp/Runtime/Internal/Autogen/TableType.cs b/crates/bindings-csharp/Runtime/Internal/Autogen/TableType.cs deleted file mode 100644 index 5c20135bed7..00000000000 --- a/crates/bindings-csharp/Runtime/Internal/Autogen/TableType.cs +++ /dev/null @@ -1,18 +0,0 @@ -// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. -// - -#nullable enable - -using System; -using SpacetimeDB; - -namespace SpacetimeDB.Internal -{ - [SpacetimeDB.Type] - public enum TableType - { - System, - User, - } -} diff --git a/crates/bindings-csharp/Runtime/Internal/Autogen/TableType.g.cs b/crates/bindings-csharp/Runtime/Internal/Autogen/TableType.g.cs new file mode 100644 index 00000000000..8b935aa6408 --- /dev/null +++ b/crates/bindings-csharp/Runtime/Internal/Autogen/TableType.g.cs @@ -0,0 +1,16 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#nullable enable + +using System; + +namespace SpacetimeDB.Internal +{ + [SpacetimeDB.Type] + public enum TableType + { + System, + User, + } +} diff --git a/crates/bindings-csharp/Runtime/Internal/Autogen/TypeAlias.cs b/crates/bindings-csharp/Runtime/Internal/Autogen/TypeAlias.cs deleted file mode 100644 index 41622dcbbc3..00000000000 --- a/crates/bindings-csharp/Runtime/Internal/Autogen/TypeAlias.cs +++ /dev/null @@ -1,38 +0,0 @@ -// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. -// - -#nullable enable - -using System; -using SpacetimeDB; -using System.Collections.Generic; -using System.Runtime.Serialization; - -namespace SpacetimeDB.Internal -{ - [SpacetimeDB.Type] - [DataContract] - public partial class TypeAlias - { - [DataMember(Name = "name")] - public string Name; - [DataMember(Name = "ty")] - public uint Ty; - - public TypeAlias( - string Name, - uint Ty - ) - { - this.Name = Name; - this.Ty = Ty; - } - - public TypeAlias() - { - this.Name = ""; - } - - } -} diff --git a/crates/bindings-csharp/Runtime/Internal/Autogen/TypeAlias.g.cs b/crates/bindings-csharp/Runtime/Internal/Autogen/TypeAlias.g.cs new file mode 100644 index 00000000000..ab0fe6b202e --- /dev/null +++ b/crates/bindings-csharp/Runtime/Internal/Autogen/TypeAlias.g.cs @@ -0,0 +1,35 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#nullable enable + +using System; +using System.Collections.Generic; +using System.Runtime.Serialization; + +namespace SpacetimeDB.Internal +{ + [SpacetimeDB.Type] + [DataContract] + public sealed partial class TypeAlias + { + [DataMember(Name = "name")] + public string Name; + [DataMember(Name = "ty")] + public uint Ty; + + public TypeAlias( + string Name, + uint Ty + ) + { + this.Name = Name; + this.Ty = Ty; + } + + public TypeAlias() + { + this.Name = ""; + } + } +} diff --git a/crates/bindings-csharp/Runtime/Internal/Autogen/Typespace.cs b/crates/bindings-csharp/Runtime/Internal/Autogen/Typespace.cs deleted file mode 100644 index bf7112ca5bd..00000000000 --- a/crates/bindings-csharp/Runtime/Internal/Autogen/Typespace.cs +++ /dev/null @@ -1,32 +0,0 @@ -// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. -// - -#nullable enable - -using System; -using SpacetimeDB; -using System.Collections.Generic; -using System.Runtime.Serialization; - -namespace SpacetimeDB.Internal -{ - [SpacetimeDB.Type] - [DataContract] - public partial class Typespace - { - [DataMember(Name = "types")] - public System.Collections.Generic.List Types; - - public Typespace(System.Collections.Generic.List Types) - { - this.Types = Types; - } - - public Typespace() - { - this.Types = new(); - } - - } -} diff --git a/crates/bindings-csharp/Runtime/Internal/Autogen/Typespace.g.cs b/crates/bindings-csharp/Runtime/Internal/Autogen/Typespace.g.cs new file mode 100644 index 00000000000..c9ef1fee942 --- /dev/null +++ b/crates/bindings-csharp/Runtime/Internal/Autogen/Typespace.g.cs @@ -0,0 +1,29 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#nullable enable + +using System; +using System.Collections.Generic; +using System.Runtime.Serialization; + +namespace SpacetimeDB.Internal +{ + [SpacetimeDB.Type] + [DataContract] + public sealed partial class Typespace + { + [DataMember(Name = "types")] + public System.Collections.Generic.List Types; + + public Typespace(System.Collections.Generic.List Types) + { + this.Types = Types; + } + + public Typespace() + { + this.Types = new(); + } + } +} diff --git a/crates/cli/Cargo.toml b/crates/cli/Cargo.toml index 6dac8830805..094239b26f9 100644 --- a/crates/cli/Cargo.toml +++ b/crates/cli/Cargo.toml @@ -40,6 +40,7 @@ duct.workspace = true email_address.workspace = true futures.workspace = true flate2.workspace = true +fs-err.workspace = true http.workspace = true is-terminal.workspace = true itertools.workspace = true diff --git a/crates/cli/examples/regen-csharp-moduledef.rs b/crates/cli/examples/regen-csharp-moduledef.rs index 19becad395e..61717264cd4 100644 --- a/crates/cli/examples/regen-csharp-moduledef.rs +++ b/crates/cli/examples/regen-csharp-moduledef.rs @@ -3,7 +3,7 @@ use fs_err as fs; use regex::Regex; -use spacetimedb_cli::generate::{generate, Language}; +use spacetimedb_cli::generate::{csharp, generate}; use spacetimedb_lib::{RawModuleDef, RawModuleDefV8}; use std::path::Path; use std::sync::OnceLock; @@ -21,43 +21,6 @@ fn main() -> anyhow::Result<()> { module.add_type::(); }); - let mut results = generate( - RawModuleDef::V8BackCompat(module), - Language::Csharp, - "SpacetimeDB.Internal", - )?; - - // Someday we might replace custom BSATN types with autogenerated ones as well, - // but for now they're not very large and our copies are somewhat more optimised. - // - // Ignore those types and replace their references with our own with plain old regexes. - - results.retain(|(filename, _)| { - !(matches!(filename.as_str(), "AlgebraicType.cs" | "MapType.cs") - || filename.starts_with("_Globals") - || filename.starts_with("SumType") - || filename.starts_with("ProductType")) - }); - - for (_, code) in &mut results { - let res = regex_replace!( - code, - r"\b(SpacetimeDB\.)Internal(\.(Algebraic|Map)Type)\b", - "${1}BSATN${2}" - ); - let res = regex_replace!( - &res, - r"\b(SpacetimeDB\.)Internal\.(ProductTypeElement|SumTypeVariant)\b", - "${1}BSATN.AggregateElement" - ); - let res = regex_replace!( - &res, - r"\b(SpacetimeDB\.)Internal(\.(Product|Sum)Type)\b", - "List<${1}BSATN.AggregateElement>" - ); - *code = res.into_owned(); - } - let dir = &Path::new(concat!( env!("CARGO_MANIFEST_DIR"), "/../bindings-csharp/Runtime/Internal/Autogen" @@ -67,9 +30,42 @@ fn main() -> anyhow::Result<()> { fs::remove_dir_all(dir)?; fs::create_dir(dir)?; - for (file, content) in results { - fs::write(dir.join(file), content)?; - } + generate( + RawModuleDef::V8BackCompat(module), + &csharp::Csharp { + namespace: "SpacetimeDB.Internal", + }, + )? + .into_iter() + .map(|(filename, code)| { + // Skip anything but raw types (in particular, this will skip top-level SpacetimeDBClient.g.cs which we don't need). + let Some(filename) = filename.strip_prefix("Types/") else { + return Ok(()); + }; + + // Someday we might replace custom BSATN types with autogenerated ones as well, + // but for now they're not very large and our copies are somewhat more optimised. + // + // Ignore those types and replace their references with our own with plain old regexes. + if filename == "AlgebraicType.g.cs" || filename.starts_with("SumType") || filename.starts_with("ProductType") { + return Ok(()); + } + + let code = regex_replace!(&code, r"\bAlgebraicType\b", "SpacetimeDB.BSATN.$0"); + let code = regex_replace!( + &code, + r"\b(ProductTypeElement|SumTypeVariant)\b", + "SpacetimeDB.BSATN.AggregateElement" + ); + let code = regex_replace!( + &code, + r"\b(Product|Sum)Type\b", + "List" + ); + + fs::write(dir.join(filename), code.as_ref()) + }) + .collect::>()?; Ok(()) } diff --git a/crates/cli/src/subcommands/generate/csharp.rs b/crates/cli/src/subcommands/generate/csharp.rs index 6e56401028d..8b29071210c 100644 --- a/crates/cli/src/subcommands/generate/csharp.rs +++ b/crates/cli/src/subcommands/generate/csharp.rs @@ -1,127 +1,533 @@ // Note: the generated code depends on APIs and interfaces from crates/bindings-csharp/BSATN.Runtime. use super::util::fmt_fn; +use std::collections::BTreeSet; use std::fmt::{self, Write}; use std::ops::Deref; +use super::code_indenter::CodeIndenter; +use super::Lang; +use crate::generate::util::{ + collect_case, is_reducer_invokable, iter_indexes, iter_reducers, iter_tables, print_auto_generated_file_comment, + type_ref_name, +}; +use crate::indent_scope; use convert_case::{Case, Casing}; -use spacetimedb_lib::sats::{AlgebraicType, AlgebraicTypeRef, ArrayType, ProductType, SumType}; -use spacetimedb_lib::{ProductTypeElement, ReducerDef}; -use spacetimedb_primitives::ColList; -use spacetimedb_schema::def::{BTreeAlgorithm, IndexAlgorithm}; -use spacetimedb_schema::schema::TableSchema; +use duct::cmd; +use spacetimedb_primitives::ColId; +use spacetimedb_schema::def::{BTreeAlgorithm, IndexAlgorithm, ModuleDef, TableDef, TypeDef}; +use spacetimedb_schema::identifier::Identifier; +use spacetimedb_schema::schema::{Schema, TableSchema}; +use spacetimedb_schema::type_for_generate::{ + AlgebraicTypeDef, AlgebraicTypeUse, PlainEnumTypeDef, PrimitiveType, ProductTypeDef, SumTypeDef, + TypespaceForGenerate, +}; +use std::path::PathBuf; + +const INDENT: &str = " "; + +pub struct Csharp<'opts> { + pub namespace: &'opts str, +} -use super::code_indenter::CodeIndenter; -use super::{GenCtx, GenItem, TableDescHack}; - -const INDENT: &str = "\t"; - -fn scalar_or_string_name(b: &AlgebraicType) -> Option<&str> { - Some(match b { - AlgebraicType::Bool => "bool", - AlgebraicType::I8 => "sbyte", - AlgebraicType::U8 => "byte", - AlgebraicType::I16 => "short", - AlgebraicType::U16 => "ushort", - AlgebraicType::I32 => "int", - AlgebraicType::U32 => "uint", - AlgebraicType::I64 => "long", - AlgebraicType::U64 => "ulong", - AlgebraicType::I128 => "I128", - AlgebraicType::U128 => "U128", - AlgebraicType::I256 => "I256", - AlgebraicType::U256 => "U256", - AlgebraicType::String => "string", - AlgebraicType::F32 => "float", - AlgebraicType::F64 => "double", - AlgebraicType::Ref(_) | AlgebraicType::Sum(_) | AlgebraicType::Product(_) | AlgebraicType::Array(_) => { - return None +impl Lang for Csharp<'_> { + fn table_filename(&self, _module: &ModuleDef, table: &TableDef) -> String { + format!("Tables/{}.g.cs", table.name.deref().to_case(Case::Pascal)) + } + + fn type_filename(&self, type_name: &spacetimedb_schema::def::ScopedTypeName) -> String { + format!("Types/{}.g.cs", collect_case(Case::Pascal, type_name.name_segments())) + } + + fn reducer_filename(&self, reducer_name: &Identifier) -> String { + format!("Reducers/{}.g.cs", reducer_name.deref().to_case(Case::Pascal)) + } + + fn format_files(&self, generated_files: BTreeSet) -> anyhow::Result<()> { + cmd!( + "dotnet", + "format", + // We can't guarantee that the output lives inside a valid project or solution, + // so to avoid crash we need to use the `dotnet whitespace --folder` mode instead + // of a full style-aware formatter. Still better than nothing though. + "whitespace", + "--folder", + // Our files are marked with and will be skipped without this option. + "--include-generated", + "--include" + ) + .before_spawn(move |cmd| { + cmd.args(&generated_files); + Ok(()) + }) + .run()?; + Ok(()) + } + + fn generate_table(&self, module: &ModuleDef, table: &TableDef) -> String { + let mut output = CsharpAutogen::new( + self.namespace, + &[ + "SpacetimeDB.BSATN", + "SpacetimeDB.ClientApi", + "System.Collections.Generic", + "System.Runtime.Serialization", + ], + ); + + writeln!(output, "public sealed partial class RemoteTables"); + indented_block(&mut output, |output| { + let schema = TableSchema::from_module_def(module, table, (), 0.into()) + .validated() + .expect("Failed to generate table due to validation errors"); + let csharp_table_name = table.name.deref().to_case(Case::Pascal); + let csharp_table_class_name = csharp_table_name.clone() + "Handle"; + let table_type = type_ref_name(module, table.product_type_ref); + + writeln!( + output, + "public sealed class {csharp_table_class_name} : RemoteTableHandle" + ); + indented_block(output, |output| { + writeln!(output, "protected override string Name => \"{}\";", table.name); + writeln!(output); + + // If this is a table, we want to generate event accessor and indexes + let product_type = module.typespace_for_generate()[table.product_type_ref] + .as_product() + .unwrap(); + + let mut index_names = Vec::new(); + + for idx in iter_indexes(table) { + let Some(accessor_name) = idx.accessor_name.as_ref() else { + // If there is no accessor name, we shouldn't generate a client-side index accessor. + continue; + }; + + match &idx.algorithm { + IndexAlgorithm::BTree(BTreeAlgorithm { columns }) => { + let get_csharp_field_name_and_type = |col_pos: ColId| { + let (field_name, field_type) = &product_type.elements[col_pos.idx()]; + let csharp_field_name_pascal = field_name.deref().to_case(Case::Pascal); + let csharp_field_type = ty_fmt(module, field_type); + (csharp_field_name_pascal, csharp_field_type) + }; + + let (row_to_key, key_type) = match columns.as_singleton() { + Some(col_pos) => { + let (field_name, field_type) = get_csharp_field_name_and_type(col_pos); + (format!("row.{field_name}"), field_type.to_string()) + } + None => { + let mut key_accessors = Vec::new(); + let mut key_type_elems = Vec::new(); + for (field_name, field_type) in columns.iter().map(get_csharp_field_name_and_type) { + key_accessors.push(format!("row.{field_name}")); + key_type_elems.push(format!("{field_type} {field_name}")); + } + ( + format!("({})", key_accessors.join(", ")), + format!("({})", key_type_elems.join(", ")), + ) + } + }; + + let csharp_index_name = accessor_name.deref().to_case(Case::Pascal); + + let mut csharp_index_class_name = csharp_index_name.clone(); + let csharp_index_base_class_name = if schema.is_unique(columns) { + csharp_index_class_name += "UniqueIndex"; + "UniqueIndexBase" + } else { + csharp_index_class_name += "Index"; + "BTreeIndexBase" + }; + + writeln!(output, "public sealed class {csharp_index_class_name} : {csharp_index_base_class_name}<{key_type}>"); + indented_block(output, |output| { + writeln!( + output, + "protected override {key_type} GetKey({table_type} row) => {row_to_key};" + ); + writeln!(output); + writeln!(output, "public {csharp_index_class_name}({csharp_table_class_name} table) : base(table) {{ }}"); + }); + writeln!(output); + writeln!(output, "public readonly {csharp_index_class_name} {csharp_index_name};"); + writeln!(output); + + index_names.push(csharp_index_name); + } + _ => todo!(), + } + } + + writeln!(output, "internal {csharp_table_class_name}()"); + indented_block(output, |output| { + for csharp_index_name in &index_names { + writeln!(output, "{csharp_index_name} = new(this);"); + } + }); + + if let Some(primary_col_index) = schema.pk() { + writeln!(output); + writeln!( + output, + "protected override object GetPrimaryKey({table_type} row) => row.{col_name_pascal_case};", + col_name_pascal_case = primary_col_index.col_name.deref().to_case(Case::Pascal) + ); + } + }); + writeln!(output); + writeln!( + output, + "public readonly {csharp_table_class_name} {csharp_table_name} = new();" + ); + }); + + output.into_inner() + } + + fn generate_type(&self, module: &ModuleDef, typ: &TypeDef) -> String { + let name = collect_case(Case::Pascal, typ.name.name_segments()); + match &module.typespace_for_generate()[typ.ty] { + AlgebraicTypeDef::Sum(sum) => autogen_csharp_sum(module, name, sum, self.namespace), + AlgebraicTypeDef::Product(prod) => autogen_csharp_tuple(module, name, prod, self.namespace), + AlgebraicTypeDef::PlainEnum(plain_enum) => autogen_csharp_plain_enum(name, plain_enum, self.namespace), } - }) -} + } -fn ty_fmt<'a>(ctx: &'a GenCtx, ty: &'a AlgebraicType, namespace: &'a str) -> impl fmt::Display + 'a { - fmt_fn(move |f| match ty { - ty if ty.is_identity() => f.write_str("SpacetimeDB.Identity"), - ty if ty.is_address() => f.write_str("SpacetimeDB.Address"), - ty if ty.is_schedule_at() => f.write_str("SpacetimeDB.ScheduleAt"), - AlgebraicType::Sum(sum_type) => { - // This better be an option type - if let Some(inner_ty) = sum_type.as_option() { - write!(f, "{}?", ty_fmt(ctx, inner_ty, namespace)) + fn generate_reducer(&self, module: &ModuleDef, reducer: &spacetimedb_schema::def::ReducerDef) -> String { + let mut output = CsharpAutogen::new( + self.namespace, + &[ + "SpacetimeDB.ClientApi", + "System.Collections.Generic", + "System.Runtime.Serialization", + ], + ); + + writeln!( + output, + "public sealed partial class RemoteReducers : RemoteBase" + ); + indented_block(&mut output, |output| { + let func_name_pascal_case = reducer.name.deref().to_case(Case::Pascal); + let delegate_separator = if reducer.params_for_generate.elements.is_empty() { + "" } else { - unimplemented!() + ", " + }; + + let mut func_params: String = String::new(); + let mut func_args: String = String::new(); + + for (arg_i, (arg_name, arg_ty)) in reducer.params_for_generate.into_iter().enumerate() { + if arg_i != 0 { + func_params.push_str(", "); + func_args.push_str(", "); + } + + let arg_type_str = ty_fmt(module, arg_ty); + let arg_name = arg_name.deref().to_case(Case::Camel); + + write!(func_params, "{arg_type_str} {arg_name}").unwrap(); + write!(func_args, "{arg_name}").unwrap(); } + + writeln!( + output, + "public delegate void {func_name_pascal_case}Handler(EventContext ctx{delegate_separator}{func_params});" + ); + writeln!( + output, + "public event {func_name_pascal_case}Handler? On{func_name_pascal_case};" + ); + writeln!(output); + + if is_reducer_invokable(reducer) { + writeln!(output, "public void {func_name_pascal_case}({func_params})"); + indented_block(output, |output| { + writeln!( + output, + "conn.InternalCallReducer(new Reducer.{func_name_pascal_case}({func_args}), this.SetCallReducerFlags.{func_name_pascal_case}Flags);" + ); + }); + writeln!(output); + } + + writeln!( + output, + "public bool Invoke{func_name_pascal_case}(EventContext ctx, Reducer.{func_name_pascal_case} args)" + ); + indented_block(output, |output| { + writeln!(output, "if (On{func_name_pascal_case} == null) return false;"); + writeln!(output, "On{func_name_pascal_case}("); + // Write out arguments one per line + { + indent_scope!(output); + write!(output, "ctx"); + for (arg_name, _) in &reducer.params_for_generate { + writeln!(output, ","); + let arg_name = arg_name.deref().to_case(Case::Pascal); + write!(output, "args.{arg_name}"); + } + writeln!(output); + } + writeln!(output, ");"); + writeln!(output, "return true;"); + }); + }); + + writeln!(output); + + writeln!(output, "public abstract partial class Reducer"); + indented_block(&mut output, |output| { + autogen_csharp_product_common( + module, + output, + reducer.name.deref().to_case(Case::Pascal), + &reducer.params_for_generate, + "Reducer, IReducerArgs", + |output| { + if !reducer.params_for_generate.elements.is_empty() { + writeln!(output); + } + writeln!(output, "string IReducerArgs.ReducerName => \"{}\";", reducer.name); + }, + ); + }); + + if is_reducer_invokable(reducer) { + writeln!(output); + writeln!(output, "public sealed partial class SetReducerFlags"); + indented_block(&mut output, |output| { + let func_name_pascal_case = reducer.name.deref().to_case(Case::Pascal); + writeln!(output, "internal CallReducerFlags {func_name_pascal_case}Flags;"); + writeln!(output, "public void {func_name_pascal_case}(CallReducerFlags flags) {{ this.{func_name_pascal_case}Flags = flags; }}"); + }); } - // Arbitrary product types should fail. - AlgebraicType::Product(_) => unimplemented!(), - AlgebraicType::Array(ArrayType { elem_ty }) => { - write!( - f, - "System.Collections.Generic.List<{}>", - ty_fmt(ctx, elem_ty, namespace) - ) - } - AlgebraicType::Ref(r) => { - let name = csharp_typename(ctx, *r); - match &ctx.typespace[*r] { - AlgebraicType::Sum(sum_type) => { - if sum_type.is_simple_enum() { - let parts: Vec<&str> = name.split('.').collect(); - if parts.len() >= 2 { - let enum_namespace = parts[0]; - let enum_name = parts[1]; - write!(f, "{namespace}.{enum_namespace}.Types.{enum_name}") - } else { - write!(f, "{namespace}.{name}") - } - } else { - write!(f, "{namespace}.{name}") + + output.into_inner() + } + + fn generate_globals(&self, module: &ModuleDef) -> Vec<(String, String)> { + let mut output = CsharpAutogen::new( + self.namespace, + &[ + "SpacetimeDB.ClientApi", + "System.Collections.Generic", + "System.Runtime.Serialization", + ], + ); + + writeln!( + output, + "public sealed partial class RemoteReducers : RemoteBase" + ); + indented_block(&mut output, |output| { + writeln!( + output, + "internal RemoteReducers(DbConnection conn, SetReducerFlags SetReducerFlags) : base(conn) {{ this.SetCallReducerFlags = SetReducerFlags; }}" + ); + writeln!(output, "internal readonly SetReducerFlags SetCallReducerFlags;"); + }); + writeln!(output); + + writeln!(output, "public sealed partial class SetReducerFlags"); + indented_block(&mut output, |output| { + writeln!(output, "internal SetReducerFlags() {{ }}"); + }); + writeln!(output); + + writeln!( + output, + "public sealed record EventContext : DbContext, IEventContext" + ); + indented_block(&mut output, |output| { + writeln!(output, "public readonly RemoteReducers Reducers;"); + writeln!(output, "public readonly SetReducerFlags SetReducerFlags;"); + writeln!(output, "public readonly Event Event;"); + writeln!(output); + writeln!( + output, + "internal EventContext(DbConnection conn, Event reducerEvent) : base(conn.Db)" + ); + indented_block(output, |output| { + writeln!(output, "Reducers = conn.Reducers;"); + writeln!(output, "SetReducerFlags = conn.SetReducerFlags;"); + writeln!(output, "Event = reducerEvent;"); + }); + }); + writeln!(output); + + writeln!(output, "public abstract partial class Reducer"); + indented_block(&mut output, |output| { + // Prevent instantiation of this class from outside. + writeln!(output, "private Reducer() {{ }}"); + writeln!(output); + writeln!(output, "public sealed class StdbNone : Reducer {{}}"); + }); + writeln!(output); + + writeln!( + output, + "public sealed class DbConnection : DbConnectionBase" + ); + indented_block(&mut output, |output| { + writeln!(output, "public readonly RemoteTables Db = new();"); + writeln!(output, "public readonly RemoteReducers Reducers;"); + writeln!(output, "public readonly SetReducerFlags SetReducerFlags;"); + writeln!(output); + + writeln!(output, "public DbConnection()"); + indented_block(output, |output| { + writeln!(output, "SetReducerFlags = new();"); + writeln!(output, "Reducers = new(this, this.SetReducerFlags);"); + writeln!(output); + + for table in iter_tables(module) { + writeln!( + output, + "clientDB.AddTable(Db.{csharp_table_name});", + csharp_table_name = table.name.deref().to_case(Case::Pascal) + ); + } + }); + writeln!(output); + + writeln!(output, "protected override Reducer ToReducer(TransactionUpdate update)"); + indented_block(output, |output| { + writeln!(output, "var encodedArgs = update.ReducerCall.Args;"); + writeln!(output, "return update.ReducerCall.ReducerName switch {{"); + { + indent_scope!(output); + for reducer in iter_reducers(module) { + let reducer_str_name = &reducer.name; + let reducer_name = reducer.name.deref().to_case(Case::Pascal); + writeln!( + output, + "\"{reducer_str_name}\" => BSATNHelpers.Decode(encodedArgs)," + ); } + // Note: "" is a special case for transactions from CLI commands. + writeln!(output, "\"\" or \"\" => new Reducer.StdbNone(),"); + writeln!( + output, + r#"var reducer => throw new ArgumentOutOfRangeException("Reducer", $"Unknown reducer {{reducer}}")"# + ); } - _ => { - write!(f, "{namespace}.{name}") + writeln!(output, "}};"); + }); + writeln!(output); + + writeln!( + output, + "protected override IEventContext ToEventContext(Event reducerEvent) =>" + ); + writeln!(output, "new EventContext(this, reducerEvent);"); + writeln!(output); + + writeln!( + output, + "protected override bool Dispatch(IEventContext context, Reducer reducer)" + ); + indented_block(output, |output| { + writeln!(output, "var eventContext = (EventContext)context;"); + writeln!(output, "return reducer switch {{"); + { + indent_scope!(output); + for reducer_name in iter_reducers(module).map(|r| r.name.deref().to_case(Case::Pascal)) { + writeln!( + output, + "Reducer.{reducer_name} args => Reducers.Invoke{reducer_name}(eventContext, args)," + ); + } + writeln!(output, "Reducer.StdbNone => true,"); + writeln!( + output, + r#"_ => throw new ArgumentOutOfRangeException("Reducer", $"Unknown reducer {{reducer}}")"# + ); } - } - } - ty => f.write_str(scalar_or_string_name(ty).expect("must be a scalar/string type at this point")), - }) -} + writeln!(output, "}};"); + }); + writeln!(output); -fn default_init(ctx: &GenCtx, ty: &AlgebraicType) -> Option<&'static str> { - match ty { - // Options have a default value of null which is fine for us, and simple enums have their own default. - AlgebraicType::Sum(sum_type) if sum_type.is_option() || sum_type.is_simple_enum() => None, - // TODO: generate some proper default here (what would it be for tagged enums?). - AlgebraicType::Sum(_) => Some("null!"), - // For product types and arrays, we can use the default constructor. - AlgebraicType::Product(_) | AlgebraicType::Array(_) => Some("new()"), - // Strings must have explicit default value of "". - AlgebraicType::String => Some(r#""""#), - AlgebraicType::Ref(r) => default_init(ctx, &ctx.typespace[*r]), - _ => { - debug_assert!(ty.is_scalar()); - None - } + writeln!( + output, + "public SubscriptionBuilder SubscriptionBuilder() => new(this);" + ); + }); + + vec![("SpacetimeDBClient.g.cs".to_owned(), output.into_inner())] + } + + fn clap_value() -> clap::builder::PossibleValue { + clap::builder::PossibleValue::new("csharp").aliases(["c#", "cs"]) } } -// can maybe do something fancy with this in the future -fn csharp_typename(ctx: &GenCtx, typeref: AlgebraicTypeRef) -> &str { - ctx.names[typeref.idx()].as_deref().expect("tuples should have names") +fn ty_fmt<'a>(module: &'a ModuleDef, ty: &'a AlgebraicTypeUse) -> impl fmt::Display + 'a { + fmt_fn(move |f| match ty { + AlgebraicTypeUse::Identity => f.write_str("SpacetimeDB.Identity"), + AlgebraicTypeUse::Address => f.write_str("SpacetimeDB.Address"), + AlgebraicTypeUse::ScheduleAt => f.write_str("SpacetimeDB.ScheduleAt"), + AlgebraicTypeUse::Unit => f.write_str("SpacetimeDB.Unit"), + AlgebraicTypeUse::Option(inner_ty) => write!(f, "{}?", ty_fmt(module, inner_ty)), + AlgebraicTypeUse::Array(elem_ty) => write!(f, "System.Collections.Generic.List<{}>", ty_fmt(module, elem_ty)), + AlgebraicTypeUse::String => f.write_str("string"), + AlgebraicTypeUse::Ref(r) => f.write_str(&type_ref_name(module, *r)), + AlgebraicTypeUse::Primitive(prim) => f.write_str(match prim { + PrimitiveType::Bool => "bool", + PrimitiveType::I8 => "sbyte", + PrimitiveType::U8 => "byte", + PrimitiveType::I16 => "short", + PrimitiveType::U16 => "ushort", + PrimitiveType::I32 => "int", + PrimitiveType::U32 => "uint", + PrimitiveType::I64 => "long", + PrimitiveType::U64 => "ulong", + PrimitiveType::I128 => "I128", + PrimitiveType::U128 => "U128", + PrimitiveType::I256 => "I256", + PrimitiveType::U256 => "U256", + PrimitiveType::F32 => "float", + PrimitiveType::F64 => "double", + }), + AlgebraicTypeUse::Never => unimplemented!(), + }) } -macro_rules! indent_scope { - ($x:ident) => { - let mut $x = $x.indented(1); - }; +fn default_init(ctx: &TypespaceForGenerate, ty: &AlgebraicTypeUse) -> Option<&'static str> { + match ty { + // Options (`T?`) have a default value of null which is fine for us. + AlgebraicTypeUse::Option(_) => None, + AlgebraicTypeUse::Ref(r) => match &ctx[*r] { + // TODO: generate some proper default here (what would it be for tagged enums?). + AlgebraicTypeDef::Sum(_) => Some("null!"), + // Simple enums have their own default (variant with value of zero). + AlgebraicTypeDef::PlainEnum(_) => None, + AlgebraicTypeDef::Product(_) => Some("new()"), + }, + // See Sum(_) handling above. + AlgebraicTypeUse::ScheduleAt => Some("null!"), + AlgebraicTypeUse::Array(_) => Some("new()"), + // Strings must have explicit default value of "". + AlgebraicTypeUse::String => Some(r#""""#), + // Primitives are initialized to zero automatically. + AlgebraicTypeUse::Primitive(_) => None, + // these are structs, they are initialized to zero-filled automatically + AlgebraicTypeUse::Unit | AlgebraicTypeUse::Identity | AlgebraicTypeUse::Address => None, + AlgebraicTypeUse::Never => unimplemented!("never types are not yet supported in C# output"), + } } struct CsharpAutogen { output: CodeIndenter, } -impl std::ops::Deref for CsharpAutogen { +impl Deref for CsharpAutogen { type Target = CodeIndenter; fn deref(&self) -> &Self::Target { @@ -139,19 +545,19 @@ impl CsharpAutogen { pub fn new(namespace: &str, extra_usings: &[&str]) -> Self { let mut output = CodeIndenter::new(String::new(), INDENT); - writeln!( - output, - "// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE" - ); - writeln!(output, "// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD."); - writeln!(output, "// "); - writeln!(output); + print_auto_generated_file_comment(&mut output); writeln!(output, "#nullable enable"); writeln!(output); writeln!(output, "using System;"); - if namespace != "SpacetimeDB" { + // Don't emit `using SpacetimeDB;` if we are going to be nested in the SpacetimeDB namespace. + if namespace + .split('.') + .next() + .expect("split always returns at least one string") + != "SpacetimeDB" + { writeln!(output, "using SpacetimeDB;"); } for extra_using in extra_usings { @@ -161,171 +567,104 @@ impl CsharpAutogen { writeln!(output, "namespace {namespace}"); writeln!(output, "{{"); - output.indent(1); + Self { output } } pub fn into_inner(mut self) -> String { self.dedent(1); writeln!(self, "}}"); + self.output.into_inner() } } -pub fn autogen_csharp_sum(ctx: &GenCtx, name: &str, sum_type: &SumType, namespace: &str) -> String { +fn autogen_csharp_sum(module: &ModuleDef, sum_type_name: String, sum_type: &SumTypeDef, namespace: &str) -> String { let mut output = CsharpAutogen::new(namespace, &[]); - let mut sum_namespace = None; - let mut sum_type_name = name.replace("r#", "").to_case(Case::Pascal); - if sum_type_name.contains('.') { - let split: Vec<&str> = sum_type_name.split('.').collect(); - if split.len() != 2 { - panic!("Enum names cannot contain more than one namespace prefix. Example: MyNamespace.MyEnum"); - } - - sum_namespace = Some(split[0].to_string().to_case(Case::Pascal)); - sum_type_name = split[1].to_string().to_case(Case::Pascal); - } - - if let Some(sum_namespace) = &sum_namespace { - writeln!(output, "public partial class {sum_namespace}"); - writeln!(output, "{{"); - output.indent(1); - - writeln!(output, "public partial class Types"); - writeln!(output, "{{"); - output.indent(1); - } - writeln!(output, "[SpacetimeDB.Type]"); - - if sum_type.is_simple_enum() { - writeln!(output, "public enum {sum_type_name}"); - indented_block(&mut output, |output| { - for variant in &*sum_type.variants { - let variant_name = variant - .name - .as_ref() - .expect("All sum variants should have names!") - .replace("r#", ""); - writeln!(output, "{variant_name},"); + write!( + output, + "public partial record {sum_type_name} : SpacetimeDB.TaggedEnum<(" + ); + { + indent_scope!(output); + for (i, (variant_name, variant_ty)) in sum_type.variants.iter().enumerate() { + if i != 0 { + write!(output, ","); } - }); - } else { - write!( - output, - "public partial record {sum_type_name} : SpacetimeDB.TaggedEnum<(" - ); - { - indent_scope!(output); - for (i, variant) in sum_type.variants.iter().enumerate() { - if i != 0 { - write!(output, ","); - } + writeln!(output); + write!(output, "{} {variant_name}", ty_fmt(module, variant_ty)); + } + // If we have fewer than 2 variants, we need to add some dummy variants to make the tuple work. + match sum_type.variants.len() { + 0 => { writeln!(output); - if variant.is_unit() { - write!(output, "SpacetimeDB.Unit"); - } else { - write!(output, "{}", ty_fmt(ctx, &variant.algebraic_type, namespace)); - } - let variant_name = variant - .name - .as_ref() - .expect("All sum variants should have names!") - .replace("r#", ""); - write!(output, " {variant_name}"); + writeln!(output, "SpacetimeDB.Unit _Reserved1,"); + write!(output, "SpacetimeDB.Unit _Reserved2"); } - // If we have less than 2 variants, we need to add some dummy variants to make the tuple work. - match sum_type.variants.len() { - 0 => { - writeln!(output); - writeln!(output, "SpacetimeDB.Unit _Reserved1,"); - write!(output, "SpacetimeDB.Unit _Reserved2"); - } - 1 => { - writeln!(output, ","); - write!(output, "SpacetimeDB.Unit _Reserved"); - } - _ => {} + 1 => { + writeln!(output, ","); + write!(output, "SpacetimeDB.Unit _Reserved"); } - } - writeln!(output); - writeln!(output, ")>;"); - } - - if sum_namespace.is_some() { - for _ in 0..2 { - output.dedent(1); - writeln!(output, "}}"); + _ => {} } } + writeln!(output); + writeln!(output, ")>;"); output.into_inner() } -pub fn autogen_csharp_tuple(ctx: &GenCtx, name: &str, tuple: &ProductType, namespace: &str) -> String { - autogen_csharp_product_common_file(ctx, name, &tuple.elements, "", namespace) -} +fn autogen_csharp_plain_enum(enum_type_name: String, enum_type: &PlainEnumTypeDef, namespace: &str) -> String { + let mut output = CsharpAutogen::new(namespace, &[]); -#[allow(deprecated)] -pub fn autogen_csharp_table(ctx: &GenCtx, table: &TableDescHack, namespace: &str) -> String { - autogen_csharp_product_common_file( - ctx, - csharp_typename(ctx, table.data), - &ctx.typespace[table.data].as_product().unwrap().elements, - "IDatabaseRow", - namespace, - ) + writeln!(output, "[SpacetimeDB.Type]"); + writeln!(output, "public enum {enum_type_name}"); + indented_block(&mut output, |output| { + for variant in &*enum_type.variants { + writeln!(output, "{variant},"); + } + }); + + output.into_inner() } -fn autogen_csharp_product_common_file( - ctx: &GenCtx, - name: &str, - product_type_elems: &[ProductTypeElement], - base: &str, - namespace: &str, -) -> String { +fn autogen_csharp_tuple(module: &ModuleDef, name: String, tuple: &ProductTypeDef, namespace: &str) -> String { let mut output = CsharpAutogen::new( namespace, &["System.Collections.Generic", "System.Runtime.Serialization"], ); - autogen_csharp_product_common(ctx, &mut output, name, product_type_elems, base, namespace, |_| {}); + autogen_csharp_product_common(module, &mut output, name, tuple, "", |_| {}); output.into_inner() } fn autogen_csharp_product_common( - ctx: &GenCtx, + module: &ModuleDef, output: &mut CodeIndenter, - name: &str, - product_type_elems: &[ProductTypeElement], + name: String, + product_type: &ProductTypeDef, base: &str, - namespace: &str, extra_body: impl FnOnce(&mut CodeIndenter), ) { writeln!(output, "[SpacetimeDB.Type]"); writeln!(output, "[DataContract]"); - write!(output, "public partial class {name}"); + write!(output, "public sealed partial class {name}"); if !base.is_empty() { write!(output, " : {base}"); } writeln!(output); indented_block(output, |output| { - let fields = product_type_elems - .iter() - .map(|field| { - let orig_name = field - .name - .as_ref() - .expect("autogen'd tuples should have field names") - .replace("r#", ""); - + let fields = product_type + .into_iter() + .map(|(orig_name, ty)| { writeln!(output, "[DataMember(Name = \"{orig_name}\")]"); - let field_name = orig_name.to_case(Case::Pascal); - let ty = ty_fmt(ctx, &field.algebraic_type, namespace).to_string(); + let field_name = orig_name.deref().to_case(Case::Pascal); + let ty = ty_fmt(module, ty).to_string(); writeln!(output, "public {ty} {field_name};"); @@ -335,8 +674,9 @@ fn autogen_csharp_product_common( // If we don't have any fields, the default constructor is fine, otherwise we need to generate our own. if !fields.is_empty() { - // Generate fully-parameterized constructor. writeln!(output); + + // Generate fully-parameterized constructor. write!(output, "public {name}("); if fields.len() > 1 { writeln!(output); @@ -364,13 +704,12 @@ fn autogen_csharp_product_common( // Generate default constructor. writeln!(output, "public {name}()"); indented_block(output, |output| { - for ((field_name, _ty), field) in fields.iter().zip(product_type_elems) { - if let Some(default) = default_init(ctx, &field.algebraic_type) { + for ((field_name, _ty), (_field, field_ty)) in fields.iter().zip(product_type) { + if let Some(default) = default_init(module.typespace_for_generate(), field_ty) { writeln!(output, "this.{field_name} = {default};"); } } }); - writeln!(output); } extra_body(output); @@ -383,506 +722,3 @@ fn indented_block(output: &mut CodeIndenter, f: impl FnOnce(&mut Code writeln!(output, "}}"); res } - -fn csharp_field_type(field_type: &AlgebraicType) -> Option<&str> { - match field_type { - AlgebraicType::Product(product) => { - if product.is_identity() { - Some("SpacetimeDB.Identity") - } else if product.is_address() { - Some("SpacetimeDB.Address") - } else { - None - } - } - AlgebraicType::Sum(_) | AlgebraicType::Ref(_) => None, - ty => match scalar_or_string_name(ty) { - Some(ty) => Some(ty), - _ => None, - }, - } -} - -fn autogen_csharp_access_funcs_for_struct( - output: &mut CodeIndenter, - struct_name_pascal_case: &str, - product_type: &ProductType, - table_name: &str, - schema: &TableSchema, -) { - let csharp_table_name = table_name.to_case(Case::Pascal); - let constraints = schema.backcompat_column_constraints(); - for col in schema.columns() { - if !constraints[&ColList::new(col.col_pos)].has_unique() { - continue; - } - - let field = &product_type.elements[col.col_pos.idx()]; - let field_name = field.name.as_ref().expect("autogen'd tuples should have field names"); - let field_type = &field.algebraic_type; - let csharp_field_name_pascal = field_name.replace("r#", "").to_case(Case::Pascal); - let csharp_field_type = match csharp_field_type(field_type) { - None => continue, - Some(x) => x, - }; - writeln!(output, "public class {csharp_field_name_pascal}UniqueIndex"); - indented_block(output, |output| { - write!( - output, - "internal readonly Dictionary<{csharp_field_type}, {struct_name_pascal_case}> Cache = new(16);" - ); - writeln!(output); - - writeln!( - output, - "public {struct_name_pascal_case}? Find({csharp_field_type} value)" - ); - indented_block(output, |output| { - writeln!(output, "Cache.TryGetValue(value, out var r);"); - writeln!(output, "return r;"); - }); - writeln!(output); - }); - writeln!(output); - writeln!( - output, - "public {csharp_field_name_pascal}UniqueIndex {csharp_field_name_pascal} = new();" - ); - writeln!(output); - } - - for idx in &schema.indexes { - match &idx.index_algorithm { - IndexAlgorithm::BTree(BTreeAlgorithm { columns }) => { - let col_pos = columns.head().unwrap().idx(); - if constraints[&ColList::new(col_pos.into())].has_unique() { - continue; - } - - let field = &product_type.elements[col_pos]; - let field_name = field.name.as_ref().expect("autogen'd tuples should have field names"); - let field_type = &field.algebraic_type; - let csharp_field_name_pascal = field_name.replace("r#", "").to_case(Case::Pascal); - - // this is EXTREMELY JANKY. - // TODO(1.0): this code should be updated to not use `TableSchema` and rely on `accessor_name` instead! - let prefix_len = table_name.len() + "_".len(); - let suffix_len = "_idx_btree".len(); - let comma_separated_field_names = &idx.index_name[prefix_len..idx.index_name.len() - suffix_len]; - let csharp_index_name = comma_separated_field_names.to_case(Case::Pascal); - - let csharp_field_type = match csharp_field_type(field_type) { - None => continue, - Some(x) => x, - }; - writeln!(output, "public class {csharp_index_name}Index"); - indented_block(output, |output| { - writeln!(output, "{csharp_table_name}Handle Handle;"); - writeln!( - output, - "internal {csharp_index_name}Index({csharp_table_name}Handle handle) => Handle = handle;" - ); - writeln!( - output, - "public IEnumerable<{struct_name_pascal_case}> Filter({csharp_field_type} value) =>" - ); - { - indent_scope!(output); - writeln!(output, "Handle.Query(x => x.{csharp_field_name_pascal} == value);"); - } - }); - writeln!(output); - writeln!( - output, - "public {csharp_index_name}Index {csharp_index_name} {{ get; init; }}" - ); - writeln!(output); - } - _ => todo!(), - } - } - - writeln!(output, "internal {csharp_table_name}Handle()"); - indented_block(output, |output| { - for idx in &schema.indexes { - match &idx.index_algorithm { - IndexAlgorithm::BTree(BTreeAlgorithm { columns }) => { - let col_pos = columns.head().unwrap().idx(); - if constraints[&ColList::new(col_pos.into())].has_unique() { - continue; - } - } - _ => continue, - } - - // this is EXTREMELY JANKY. - // TODO(1.0): this code should be updated to not use `TableSchema` and rely on `accessor_name` instead! - let prefix_len = table_name.len() + "_".len(); - let suffix_len = "_idx_btree".len(); - let comma_separated_field_names = &idx.index_name[prefix_len..idx.index_name.len() - suffix_len]; - let csharp_index_name = comma_separated_field_names.to_case(Case::Pascal); - - writeln!(output, "{csharp_index_name} = new(this);"); - } - }); - - if let Some(primary_col_index) = schema.pk() { - writeln!( - output, - "public override object GetPrimaryKey(IDatabaseRow row) => (({struct_name_pascal_case})row).{col_name_pascal_case};", - col_name_pascal_case = primary_col_index.col_name.replace("r#", "").to_case(Case::Pascal) - ); - } -} - -pub fn autogen_csharp_globals(ctx: &GenCtx, items: &[GenItem], namespace: &str) -> Vec<(String, String)> { - let mut results = Vec::new(); - - let tables = items.iter().filter_map(|i| { - if let GenItem::Table(table) = i { - Some(table) - } else { - None - } - }); - - let reducers: Vec<&ReducerDef> = items - .iter() - .filter_map(|i| { - if let GenItem::Reducer(reducer) = i { - Some(reducer) - } else { - None - } - }) - .collect(); - let reducer_names: Vec = reducers - .iter() - .map(|reducer| reducer.name.deref().to_case(Case::Pascal)) - .collect(); - - let mut output = CsharpAutogen::new( - namespace, - &[ - "SpacetimeDB.ClientApi", - "System.Collections.Generic", - "System.Runtime.Serialization", - ], - ); - - writeln!(output, "public sealed class RemoteTables"); - indented_block(&mut output, |output| { - for table in tables { - let schema = &table.schema; - let name = &schema.table_name; - let csharp_name = name.as_ref().to_case(Case::Pascal); - let table_type = csharp_typename(ctx, table.data); - - writeln!( - output, - "public class {csharp_name}Handle : RemoteTableHandle" - ); - indented_block(output, |output| { - // If this is a table, we want to generate event accessor and indexes - let constraints = schema.backcompat_column_constraints(); - let mut unique_indexes = Vec::new(); - // Declare custom index dictionaries - for col in schema.columns() { - let field_name = col.col_name.replace("r#", "").to_case(Case::Pascal); - if !constraints[&ColList::new(col.col_pos)].has_unique() { - continue; - } - unique_indexes.push(field_name); - } - if !unique_indexes.is_empty() { - writeln!(output); - // OnInsert method for updating indexes - writeln!( - output, - "public override void InternalInvokeValueInserted(IDatabaseRow row)" - ); - indented_block(output, |output| { - writeln!(output, "var value = ({table_type})row;"); - for col in schema.columns() { - let field_name = col.col_name.replace("r#", "").to_case(Case::Pascal); - if !constraints[&ColList::new(col.col_pos)].has_unique() { - continue; - } - writeln!(output, "{field_name}.Cache[value.{field_name}] = value;"); - } - }); - writeln!(output); - // OnDelete method for updating indexes - writeln!( - output, - "public override void InternalInvokeValueDeleted(IDatabaseRow row)" - ); - indented_block(output, |output| { - for col in schema.columns() { - let field_name = col.col_name.replace("r#", "").to_case(Case::Pascal); - if !constraints[&ColList::new(col.col_pos)].has_unique() { - continue; - } - writeln!(output, "{field_name}.Cache.Remove((({table_type})row).{field_name});"); - } - }); - writeln!(output); - } - - // If this is a table, we want to include functions for accessing the table data - // Insert the funcs for accessing this struct - let product_type = ctx.typespace[table.data].as_product().unwrap(); - autogen_csharp_access_funcs_for_struct(output, table_type, product_type, name, schema); - writeln!(output); - }); - writeln!(output); - writeln!(output, "public readonly {csharp_name}Handle {csharp_name} = new();"); - writeln!(output); - } - }); - writeln!(output); - - writeln!(output, "public sealed class RemoteReducers : RemoteBase"); - indented_block(&mut output, |output| { - writeln!( - output, - "internal RemoteReducers(DbConnection conn, SetReducerFlags SetReducerFlags) : base(conn) {{ this.SetCallReducerFlags = SetReducerFlags; }}" - ); - writeln!(output, "internal readonly SetReducerFlags SetCallReducerFlags;"); - - for reducer in &reducers { - let func_name = &*reducer.name; - let func_name_pascal_case = func_name.to_case(Case::Pascal); - let delegate_separator = if !reducer.args.is_empty() { ", " } else { "" }; - - let mut func_params: String = String::new(); - let mut func_args: String = String::new(); - - for (arg_i, arg) in reducer.args.iter().enumerate() { - if arg_i != 0 { - func_params.push_str(", "); - func_args.push_str(", "); - } - - let name = arg - .name - .as_deref() - .unwrap_or_else(|| panic!("reducer args should have names: {func_name}")); - let arg_type_str = ty_fmt(ctx, &arg.algebraic_type, namespace); - let arg_name = name.to_case(Case::Camel); - - write!(func_params, "{arg_type_str} {arg_name}").unwrap(); - write!(func_args, "{arg_name}").unwrap(); - } - - writeln!( - output, - "public delegate void {func_name_pascal_case}Handler(EventContext ctx{delegate_separator}{func_params});" - ); - writeln!( - output, - "public event {func_name_pascal_case}Handler? On{func_name_pascal_case};" - ); - writeln!(output); - - writeln!(output, "public void {func_name_pascal_case}({func_params})"); - indented_block(output, |output| { - writeln!( - output, - "conn.InternalCallReducer(new Reducer.{func_name_pascal_case}({func_args}), this.SetCallReducerFlags.{func_name_pascal_case}Flags);" - ); - }); - writeln!(output); - - writeln!( - output, - "public bool Invoke{func_name_pascal_case}(EventContext ctx, Reducer.{func_name_pascal_case} args)" - ); - indented_block(output, |output| { - writeln!(output, "if (On{func_name_pascal_case} == null) return false;"); - writeln!(output, "On{func_name_pascal_case}("); - // Write out arguments one per line - { - indent_scope!(output); - write!(output, "ctx"); - for (i, arg) in reducer.args.iter().enumerate() { - writeln!(output, ","); - let arg_name = arg - .name - .as_deref() - .map_or_else(|| format!("Arg{i}"), |name| name.to_case(Case::Pascal)); - write!(output, "args.{arg_name}"); - } - writeln!(output); - } - writeln!(output, ");"); - writeln!(output, "return true;"); - }); - } - }); - writeln!(output); - - writeln!(output, "public sealed class SetReducerFlags"); - indented_block(&mut output, |output| { - writeln!(output, "internal SetReducerFlags() {{ }}"); - for reducer in &reducers { - let func_name = &*reducer.name; - let func_name_pascal_case = func_name.to_case(Case::Pascal); - writeln!(output, "internal CallReducerFlags {func_name_pascal_case}Flags;"); - writeln!(output, "public void {func_name_pascal_case}(CallReducerFlags flags) {{ this.{func_name_pascal_case}Flags = flags; }}"); - } - }); - writeln!(output); - - writeln!( - output, - "public partial record EventContext : DbContext, IEventContext" - ); - indented_block(&mut output, |output| { - writeln!(output, "public readonly RemoteReducers Reducers;"); - writeln!(output, "public readonly SetReducerFlags SetReducerFlags;"); - writeln!(output, "public readonly Event Event;"); - writeln!(output); - writeln!( - output, - "internal EventContext(DbConnection conn, Event reducerEvent) : base(conn.Db)" - ); - indented_block(output, |output| { - writeln!(output, "Reducers = conn.Reducers;"); - writeln!(output, "SetReducerFlags = conn.SetReducerFlags;"); - writeln!(output, "Event = reducerEvent;"); - }); - }); - writeln!(output); - - writeln!(output, "public abstract partial class Reducer"); - indented_block(&mut output, |output| { - // Prevent instantiation of this class from outside. - writeln!(output, "private Reducer() {{ }}"); - writeln!(output); - for (reducer, reducer_name) in std::iter::zip(&reducers, &reducer_names) { - let reducer_str_name = &reducer.name; - autogen_csharp_product_common( - ctx, - output, - reducer_name, - &reducer.args, - "Reducer, IReducerArgs", - namespace, - |output| { - writeln!(output, "string IReducerArgs.ReducerName => \"{reducer_str_name}\";"); - }, - ); - writeln!(output); - } - writeln!(output, "public class StdbNone : Reducer {{}}"); - writeln!(output, "public class StdbIdentityConnected : Reducer {{}}"); - writeln!(output, "public class StdbIdentityDisconnected : Reducer {{}}"); - }); - writeln!(output); - - writeln!( - output, - "public class DbConnection : DbConnectionBase" - ); - indented_block(&mut output, |output| { - writeln!(output, "public readonly RemoteTables Db = new();"); - writeln!(output, "public readonly RemoteReducers Reducers;"); - writeln!(output, "public readonly SetReducerFlags SetReducerFlags;"); - writeln!(output); - - writeln!(output, "public DbConnection()"); - indented_block(output, |output| { - writeln!(output, "SetReducerFlags = new();"); - writeln!(output, "Reducers = new(this, this.SetReducerFlags);"); - writeln!(output); - - for item in items { - if let GenItem::Table(table) = item { - writeln!( - output, - "clientDB.AddTable<{table_type}>(\"{table_name}\", Db.{csharp_table_name});", - table_type = csharp_typename(ctx, table.data), - table_name = table.schema.table_name, - csharp_table_name = table.schema.table_name.as_ref().to_case(Case::Pascal) - ); - } - } - }); - writeln!(output); - - writeln!(output, "protected override Reducer ToReducer(TransactionUpdate update)"); - indented_block(output, |output| { - writeln!(output, "var encodedArgs = update.ReducerCall.Args;"); - writeln!(output, "return update.ReducerCall.ReducerName switch {{"); - { - indent_scope!(output); - for (reducer, reducer_name) in std::iter::zip(&reducers, &reducer_names) { - let reducer_str_name = &reducer.name; - writeln!( - output, - "\"{reducer_str_name}\" => BSATNHelpers.Decode(encodedArgs)," - ); - } - writeln!(output, "\"\" => new Reducer.StdbNone(),"); - writeln!( - output, - "\"__identity_connected__\" => new Reducer.StdbIdentityConnected()," - ); - writeln!( - output, - "\"__identity_disconnected__\" => new Reducer.StdbIdentityDisconnected()," - ); - writeln!(output, "\"\" => new Reducer.StdbNone(),"); //Transaction from CLI command - writeln!( - output, - r#"var reducer => throw new ArgumentOutOfRangeException("Reducer", $"Unknown reducer {{reducer}}")"# - ); - } - writeln!(output, "}};"); - }); - writeln!(output); - - writeln!( - output, - "protected override IEventContext ToEventContext(Event reducerEvent) =>" - ); - writeln!(output, "new EventContext(this, reducerEvent);"); - writeln!(output); - - writeln!( - output, - "protected override bool Dispatch(IEventContext context, Reducer reducer)" - ); - indented_block(output, |output| { - writeln!(output, "var eventContext = (EventContext)context;"); - writeln!(output, "return reducer switch {{"); - { - indent_scope!(output); - for reducer_name in &reducer_names { - writeln!( - output, - "Reducer.{reducer_name} args => Reducers.Invoke{reducer_name}(eventContext, args)," - ); - } - writeln!(output, "Reducer.StdbNone or"); - writeln!(output, "Reducer.StdbIdentityConnected or"); - writeln!(output, "Reducer.StdbIdentityDisconnected => true,"); - writeln!( - output, - r#"_ => throw new ArgumentOutOfRangeException("Reducer", $"Unknown reducer {{reducer}}")"# - ); - } - writeln!(output, "}};"); - }); - writeln!(output); - - writeln!( - output, - "public SubscriptionBuilder SubscriptionBuilder() => new(this);" - ); - }); - - results.push(("_Globals/SpacetimeDBClient.cs".to_owned(), output.into_inner())); - results -} diff --git a/crates/cli/src/subcommands/generate/mod.rs b/crates/cli/src/subcommands/generate/mod.rs index 90205bdeabb..1e205a7cec5 100644 --- a/crates/cli/src/subcommands/generate/mod.rs +++ b/crates/cli/src/subcommands/generate/mod.rs @@ -1,32 +1,29 @@ #![warn(clippy::uninlined_format_args)] -use anyhow::Context; use clap::parser::ValueSource; use clap::Arg; use clap::ArgAction::Set; -use convert_case::{Case, Casing}; use core::mem; -use duct::cmd; -use itertools::Itertools; +use fs_err as fs; use spacetimedb::host::wasmtime::{Mem, MemView, WasmPointee as _}; -use spacetimedb_data_structures::map::HashSet; use spacetimedb_lib::de::serde::DeserializeWrapper; -use spacetimedb_lib::sats::{AlgebraicType, AlgebraicTypeRef, Typespace}; -use spacetimedb_lib::{bsatn, RawModuleDefV8, TypeAlias}; +use spacetimedb_lib::{bsatn, RawModuleDefV8}; use spacetimedb_lib::{RawModuleDef, MODULE_ABI_MAJOR_VERSION}; use spacetimedb_primitives::errno; use spacetimedb_schema; use spacetimedb_schema::def::{ModuleDef, ReducerDef, ScopedTypeName, TableDef, TypeDef}; use spacetimedb_schema::identifier::Identifier; -use spacetimedb_schema::schema::{Schema, TableSchema}; -use std::fs; use std::path::{Path, PathBuf}; use wasmtime::{Caller, StoreContextMut}; -use crate::detect::{has_rust_fmt, has_rust_up}; +use crate::generate::util::iter_reducers; use crate::util::y_or_n; use crate::Config; use crate::{build, common_args}; +use clap::builder::PossibleValue; +use std::collections::BTreeSet; +use std::io::Read; +use util::AUTO_GENERATED_PREFIX; mod code_indenter; pub mod csharp; @@ -116,7 +113,7 @@ pub async fn exec(config: Config, args: &clap::ArgMatches) -> anyhow::Result<()> let module = if let Some(mut json_module) = json_module { let DeserializeWrapper(module) = if let Some(path) = json_module.next() { - serde_json::from_slice(&std::fs::read(path)?)? + serde_json::from_slice(&fs::read(path)?)? } else { serde_json::from_reader(std::io::stdin().lock())? }; @@ -138,41 +135,55 @@ pub async fn exec(config: Config, args: &clap::ArgMatches) -> anyhow::Result<()> fs::create_dir_all(out_dir)?; - let mut paths = vec![]; - for (fname, code) in generate(module, lang, namespace.as_str())? { + let mut paths = BTreeSet::new(); + + let csharp_lang; + let lang = match lang { + Language::Csharp => { + csharp_lang = csharp::Csharp { namespace }; + &csharp_lang as &dyn Lang + } + Language::Rust => &rust::Rust, + Language::TypeScript => &typescript::TypeScript, + }; + + for (fname, code) in generate(module, lang)? { let fname = Path::new(&fname); // If a generator asks for a file in a subdirectory, create the subdirectory first. if let Some(parent) = fname.parent().filter(|p| !p.as_os_str().is_empty()) { fs::create_dir_all(out_dir.join(parent))?; } let path = out_dir.join(fname); - paths.push(path.clone()); - fs::write(path, code)?; + fs::write(&path, code)?; + paths.insert(path); } - format_files(paths.clone(), lang)?; - // TODO: We should probably just delete all generated files before we generate any, rather than selectively deleting some afterward. - let mut files_to_delete = vec![]; - for entry in fs::read_dir(out_dir)? { - let entry = entry?; - let path = entry.path(); - if path.is_file() { - if let Ok(contents) = fs::read_to_string(&path) { - if !contents.starts_with("// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB.") { - continue; - } + let mut auto_generated_buf: [u8; AUTO_GENERATED_PREFIX.len()] = [0; AUTO_GENERATED_PREFIX.len()]; + let files_to_delete = walkdir::WalkDir::new(out_dir) + .into_iter() + .map(|entry_result| { + let entry = entry_result?; + // Only delete files. + if !entry.file_type().is_file() { + return Ok(None); } - - if paths - .iter() - .any(|x| x.file_name().unwrap() == path.file_name().unwrap()) - { - continue; + let path = entry.into_path(); + // Don't delete regenerated files. + if paths.contains(&path) { + return Ok(None); } - files_to_delete.push(path); - } - } + // Only delete files that start with the auto-generated prefix. + let mut file = fs::File::open(&path)?; + Ok(match file.read_exact(&mut auto_generated_buf) { + Ok(()) => (auto_generated_buf == AUTO_GENERATED_PREFIX.as_bytes()).then_some(path), + Err(err) if err.kind() == std::io::ErrorKind::UnexpectedEof => None, + Err(err) => return Err(err.into()), + }) + }) + .filter_map(Result::transpose) + .collect::>>()?; + if !files_to_delete.is_empty() { println!("The following files were not generated by this command and will be deleted:"); for path in &files_to_delete { @@ -189,6 +200,12 @@ pub async fn exec(config: Config, args: &clap::ArgMatches) -> anyhow::Result<()> } } + if let Err(err) = lang.format_files(paths) { + // If we couldn't format the files, print a warning but don't fail the entire + // task as the output should still be usable, just less pretty. + eprintln!("Could not format generated files: {err}"); + } + println!("Generate finished successfully."); Ok(()) } @@ -204,171 +221,49 @@ impl clap::ValueEnum for Language { fn value_variants<'a>() -> &'a [Self] { &[Self::Csharp, Self::TypeScript, Self::Rust] } - fn to_possible_value(&self) -> Option { - match self { - Self::Csharp => Some(clap::builder::PossibleValue::new("csharp").aliases(["c#", "cs"])), - Self::TypeScript => Some(clap::builder::PossibleValue::new("typescript").aliases(["ts", "TS"])), - Self::Rust => Some(clap::builder::PossibleValue::new("rust").aliases(["rs", "RS"])), - } + fn to_possible_value(&self) -> Option { + Some(match self { + Self::Csharp => csharp::Csharp::clap_value(), + Self::TypeScript => typescript::TypeScript::clap_value(), + Self::Rust => rust::Rust::clap_value(), + }) } } -pub struct GenCtx { - typespace: Typespace, - names: Vec>, -} - -pub fn generate(module: RawModuleDef, lang: Language, namespace: &str) -> anyhow::Result> { - let module = ModuleDef::try_from(module)?; - Ok(match lang { - Language::Rust => generate_lang(&module, rust::Rust, namespace), - Language::TypeScript => generate_lang(&module, typescript::TypeScript, namespace), - Language::Csharp => { - let ctx = GenCtx { - typespace: module.typespace().clone(), - names: (0..module.typespace().types.len()) - .map(|r| { - module - .type_def_from_ref(AlgebraicTypeRef(r as _)) - .map(|(name, _)| name.name_segments().join(".")) - }) - .collect(), - }; - - let tableset = module.tables().map(|t| t.product_type_ref).collect::>(); - let tables = module - .tables() - .map(|table| TableDescHack { - schema: TableSchema::from_module_def(&module, table, (), 0.into()), - data: table.product_type_ref, - }) - .sorted_by(|a, b| a.schema.table_name.cmp(&b.schema.table_name)); - - // HACK: Patch the fields to have the types that point to `AlgebraicTypeRef` because all generators depend on that - // `register_table` in rt.rs resolve the types early, but the generators do it late. This impact enums where - // the enum name is not preserved in the `AlgebraicType`. - // x.schema.columns = - // RawColumnDefV8::from_product_type(typespace[x.data].as_product().unwrap().clone()); - - let types = module.types().filter(|typ| !tableset.contains(&typ.ty)).map(|typ| { - GenItem::TypeAlias(TypeAlias { - name: typ.name.name_segments().join("."), - ty: typ.ty, - }) - }); - - let reducers = module - .reducers() - .filter(|r| r.lifecycle.is_none()) - .map(|reducer| spacetimedb_lib::ReducerDef { - name: reducer.name.clone().into(), - args: reducer.params.elements.to_vec(), - }) - .sorted_by(|a, b| a.name.cmp(&b.name)); - - let items = itertools::chain!( - types, - tables.into_iter().map(GenItem::Table), - reducers.map(GenItem::Reducer), - ); - - let items: Vec = items.collect(); - let mut files: Vec<(String, String)> = items - .iter() - .filter_map(|item| item.generate(&ctx, lang, namespace)) - .collect(); - files.extend(generate_globals(&ctx, lang, namespace, &items)); - files - } - }) -} - -fn generate_lang(module: &ModuleDef, lang: impl Lang, namespace: &str) -> Vec<(String, String)> { - itertools::chain!( - module.tables().map(|tbl| { - ( - lang.table_filename(module, tbl), - lang.generate_table(module, namespace, tbl), - ) - }), - module.types().map(|typ| { - ( - lang.type_filename(&typ.name), - lang.generate_type(module, namespace, typ), - ) - }), - module.reducers().map(|reducer| { +pub fn generate(module: RawModuleDef, lang: &dyn Lang) -> anyhow::Result> { + let module = &ModuleDef::try_from(module)?; + Ok(itertools::chain!( + module + .tables() + .map(|tbl| { (lang.table_filename(module, tbl), lang.generate_table(module, tbl),) }), + module + .types() + .map(|typ| { (lang.type_filename(&typ.name), lang.generate_type(module, typ),) }), + iter_reducers(module).map(|reducer| { ( lang.reducer_filename(&reducer.name), - lang.generate_reducer(module, namespace, reducer), + lang.generate_reducer(module, reducer), ) }), - lang.generate_globals(module, namespace), + lang.generate_globals(module), ) - .collect() + .collect()) } -trait Lang { +pub trait Lang { fn table_filename(&self, module: &ModuleDef, table: &TableDef) -> String; fn type_filename(&self, type_name: &ScopedTypeName) -> String; fn reducer_filename(&self, reducer_name: &Identifier) -> String; - fn generate_table(&self, module: &ModuleDef, namespace: &str, tbl: &TableDef) -> String; - fn generate_type(&self, module: &ModuleDef, namespace: &str, typ: &TypeDef) -> String; - fn generate_reducer(&self, module: &ModuleDef, namespace: &str, reducer: &ReducerDef) -> String; - fn generate_globals(&self, module: &ModuleDef, namespace: &str) -> Vec<(String, String)>; -} - -/// Backwards-compatibible imitation of `TableDesc` that should be removed once the generators are updated to rely on `ModuleDef`. -pub struct TableDescHack { - schema: TableSchema, - data: AlgebraicTypeRef, -} - -pub enum GenItem { - Table(TableDescHack), - TypeAlias(TypeAlias), - Reducer(spacetimedb_lib::ReducerDef), -} - -fn generate_globals(ctx: &GenCtx, lang: Language, namespace: &str, items: &[GenItem]) -> Vec<(String, String)> { - match lang { - Language::Csharp => csharp::autogen_csharp_globals(ctx, items, namespace), - Language::TypeScript => unreachable!(), - Language::Rust => unreachable!(), - } -} - -impl GenItem { - fn generate(&self, ctx: &GenCtx, lang: Language, namespace: &str) -> Option<(String, String)> { - match lang { - Language::Csharp => self.generate_csharp(ctx, namespace), - Language::TypeScript => unreachable!(), - Language::Rust => unreachable!(), - } - } + fn generate_table(&self, module: &ModuleDef, tbl: &TableDef) -> String; + fn generate_type(&self, module: &ModuleDef, typ: &TypeDef) -> String; + fn generate_reducer(&self, module: &ModuleDef, reducer: &ReducerDef) -> String; + fn generate_globals(&self, module: &ModuleDef) -> Vec<(String, String)>; - fn generate_csharp(&self, ctx: &GenCtx, namespace: &str) -> Option<(String, String)> { - match self { - GenItem::Table(table) => { - let code = csharp::autogen_csharp_table(ctx, table, namespace); - Some((table.schema.table_name.as_ref().to_case(Case::Pascal) + ".cs", code)) - } - GenItem::TypeAlias(TypeAlias { name, ty }) => match &ctx.typespace[*ty] { - AlgebraicType::Sum(sum) => { - let filename = name.replace('.', ""); - let code = csharp::autogen_csharp_sum(ctx, name, sum, namespace); - Some((filename + ".cs", code)) - } - AlgebraicType::Product(prod) => { - let code = csharp::autogen_csharp_tuple(ctx, name, prod, namespace); - Some((name.clone() + ".cs", code)) - } - _ => todo!(), - }, - GenItem::Reducer(_) => None, - } - } + fn format_files(&self, generated_files: BTreeSet) -> anyhow::Result<()>; + fn clap_value() -> PossibleValue + where + Self: Sized; } pub fn extract_descriptions(wasm_file: &Path) -> anyhow::Result { @@ -423,7 +318,7 @@ fn extract_descriptions_from_module(module: wasmtime::Module) -> anyhow::Result< let module: RawModuleDef = match instance.get_func(&mut store, "__describe_module__") { Some(f) => { store.data_mut().sink = Vec::new(); - f.typed::(&store)?.call(&mut store, 1).unwrap(); + f.typed::(&store)?.call(&mut store, 1)?; let buf = mem::take(&mut store.data_mut().sink); bsatn::from_slice(&buf)? } @@ -470,26 +365,3 @@ impl WasmCtx { Ok(0) } } - -fn format_files(generated_files: Vec, lang: Language) -> anyhow::Result<()> { - match lang { - Language::Rust => { - if !has_rust_fmt() { - if has_rust_up() { - cmd!("rustup", "component", "add", "rustfmt") - .run() - .context("Failed to install rustfmt with Rustup")?; - } else { - anyhow::bail!("rustfmt is not installed. Please install it."); - } - } - for path in generated_files { - cmd!("rustfmt", "--edition", "2021", path.to_str().unwrap()).run()?; - } - } - Language::Csharp => {} - Language::TypeScript => {} - } - - Ok(()) -} diff --git a/crates/cli/src/subcommands/generate/rust.rs b/crates/cli/src/subcommands/generate/rust.rs index 259620f72f9..93489267fc3 100644 --- a/crates/cli/src/subcommands/generate/rust.rs +++ b/crates/cli/src/subcommands/generate/rust.rs @@ -1,25 +1,25 @@ use super::code_indenter::{CodeIndenter, Indenter}; -use super::util::{collect_case, is_type_filterable, print_lines, type_ref_name}; +use super::util::{collect_case, iter_reducers, print_lines, type_ref_name}; use super::Lang; -use crate::generate::util::{namespace_is_empty_or_default, print_auto_generated_file_comment}; +use crate::detect::{has_rust_fmt, has_rust_up}; +use crate::generate::util::{iter_tables, iter_types, iter_unique_cols, print_auto_generated_file_comment}; +use anyhow::Context; use convert_case::{Case, Casing}; -use itertools::Itertools; +use duct::cmd; use spacetimedb_lib::sats::AlgebraicTypeRef; -use spacetimedb_primitives::ColList; use spacetimedb_schema::def::{ModuleDef, ReducerDef, ScopedTypeName, TableDef, TypeDef}; use spacetimedb_schema::identifier::Identifier; use spacetimedb_schema::schema::{Schema, TableSchema}; -use spacetimedb_schema::type_for_generate::{AlgebraicTypeDef, AlgebraicTypeUse, PrimitiveType, ProductTypeDef}; +use spacetimedb_schema::type_for_generate::{AlgebraicTypeDef, AlgebraicTypeUse, PrimitiveType}; use std::collections::BTreeSet; use std::fmt::{self, Write}; use std::ops::Deref; +use std::path::PathBuf; /// Pairs of (module_name, TypeName). type Imports = BTreeSet; -// TODO(cloutiertyler): Rust should probably use four spaces instead of tabs -// but I'm keeping this so as to not explode the diff. -const INDENT: &str = "\t"; +const INDENT: &str = " "; pub struct Rust; @@ -40,13 +40,26 @@ impl Lang for Rust { reducer_module_name(reducer_name) + ".rs" } - fn generate_type(&self, module: &ModuleDef, namespace: &str, typ: &TypeDef) -> String { - assert!( - namespace_is_empty_or_default(namespace), - "Rust codegen does not support namespaces, as Rust equates namespaces with `mod`s. + fn format_files(&self, generated_files: BTreeSet) -> anyhow::Result<()> { + if !has_rust_fmt() { + if has_rust_up() { + cmd!("rustup", "component", "add", "rustfmt") + .run() + .context("Failed to install rustfmt with Rustup")?; + } else { + anyhow::bail!("rustfmt is not installed. Please install it."); + } + } + cmd!("rustfmt", "--edition", "2021") + .before_spawn(move |cmd| { + cmd.args(&generated_files); + Ok(()) + }) + .run()?; + Ok(()) + } -Requested namespace: {namespace}", - ); + fn generate_type(&self, module: &ModuleDef, typ: &TypeDef) -> String { let type_name = collect_case(Case::Pascal, typ.name.name_segments()); let mut output = CodeIndenter::new(String::new(), INDENT); @@ -89,14 +102,7 @@ impl __sdk::InModule for {type_name} {{ output.into_inner() } - fn generate_table(&self, module: &ModuleDef, namespace: &str, table: &TableDef) -> String { - assert!( - namespace_is_empty_or_default(namespace), - "Rust codegen does not support namespaces, as Rust equates namespaces with `mod`s. - -Requested namespace: {namespace}", - ); - + fn generate_table(&self, module: &ModuleDef, table: &TableDef) -> String { let schema = TableSchema::from_module_def(module, table, (), 0.into()) .validated() .expect("Failed to generate table due to validation errors"); @@ -326,14 +332,7 @@ pub(super) fn parse_table_update( output.into_inner() } - fn generate_reducer(&self, module: &ModuleDef, namespace: &str, reducer: &ReducerDef) -> String { - assert!( - namespace_is_empty_or_default(namespace), - "Rust codegen does not support namespaces, as Rust equates namespaces with `mod`s. - -Requested namespace: {namespace}", - ); - + fn generate_reducer(&self, module: &ModuleDef, reducer: &ReducerDef) -> String { let mut output = CodeIndenter::new(String::new(), INDENT); let out = &mut output; @@ -524,14 +523,7 @@ impl {set_reducer_flags_trait} for super::SetReducerFlags {{ output.into_inner() } - fn generate_globals(&self, module: &ModuleDef, namespace: &str) -> Vec<(String, String)> { - assert!( - namespace_is_empty_or_default(namespace), - "Rust codegen does not support namespaces, as Rust equates namespaces with `mod`s. - -Requested namespace: {namespace}", - ); - + fn generate_globals(&self, module: &ModuleDef) -> Vec<(String, String)> { let mut output = CodeIndenter::new(String::new(), INDENT); let out = &mut output; @@ -571,6 +563,10 @@ Requested namespace: {namespace}", vec![("mod.rs".to_string(), (output.into_inner()))] } + + fn clap_value() -> clap::builder::PossibleValue { + clap::builder::PossibleValue::new("rust").aliases(["rs", "RS"]) + } } pub fn write_type(module: &ModuleDef, out: &mut W, ty: &AlgebraicTypeUse) -> fmt::Result { @@ -828,9 +824,9 @@ fn reducer_flags_trait_name(reducer: &ReducerDef) -> String { /// Iterate over all of the Rust `mod`s for types, reducers and tables in the `module`. fn iter_module_names(module: &ModuleDef) -> impl Iterator + '_ { itertools::chain!( - module.types().map(|ty| type_module_name(&ty.name)).sorted(), - module.reducers().map(|r| reducer_module_name(&r.name)).sorted(), - module.tables().map(|tbl| table_module_name(&tbl.name)).sorted(), + iter_types(module).map(|ty| type_module_name(&ty.name)), + iter_reducers(module).map(|r| reducer_module_name(&r.name)), + iter_tables(module).map(|tbl| table_module_name(&tbl.name)), ) } @@ -843,7 +839,7 @@ fn print_module_decls(module: &ModuleDef, out: &mut Indenter) { /// Print appropriate reexports for all the files that will be generated for `items`. fn print_module_reexports(module: &ModuleDef, out: &mut Indenter) { - for ty in module.types().sorted_by_key(|ty| &ty.name) { + for ty in iter_types(module) { let mod_name = type_module_name(&ty.name); let type_name = collect_case(Case::Pascal, ty.name.name_segments()); writeln!(out, "pub use {mod_name}::{type_name};") @@ -869,36 +865,6 @@ fn print_module_reexports(module: &ModuleDef, out: &mut Indenter) { } } -/// Iterate over all the [`ReducerDef`]s defined by the module, in alphabetical order by name. -/// -/// Sorting is necessary to have deterministic reproducable codegen. -fn iter_reducers(module: &ModuleDef) -> impl Iterator { - module.reducers().sorted_by_key(|reducer| &reducer.name) -} - -/// Iterate over all the [`TableDef`]s defined by the module, in alphabetical order by name. -/// -/// Sorting is necessary to have deterministic reproducable codegen. -fn iter_tables(module: &ModuleDef) -> impl Iterator { - module.tables().sorted_by_key(|table| &table.name) -} - -fn iter_unique_cols<'a>( - schema: &'a TableSchema, - product_def: &'a ProductTypeDef, -) -> impl Iterator + 'a { - let constraints = schema.backcompat_column_constraints(); - schema.columns().iter().filter_map(move |field| { - constraints[&ColList::from(field.col_pos)] - .has_unique() - .then(|| { - let res @ (_, ref ty) = &product_def.elements[field.col_pos.idx()]; - is_type_filterable(ty).then_some(res) - }) - .flatten() - }) -} - fn print_reducer_enum_defn(module: &ModuleDef, out: &mut Indenter) { // Don't derive ser/de on this enum; // it's not a proper SATS enum and the derive will fail. diff --git a/crates/cli/src/subcommands/generate/typescript.rs b/crates/cli/src/subcommands/generate/typescript.rs index 6cbbf63584b..3982b1fdc29 100644 --- a/crates/cli/src/subcommands/generate/typescript.rs +++ b/crates/cli/src/subcommands/generate/typescript.rs @@ -1,4 +1,4 @@ -use crate::generate::util::namespace_is_empty_or_default; +use crate::generate::util::{is_reducer_invokable, iter_reducers, iter_tables, iter_types, iter_unique_cols}; use crate::indent_scope; use super::util::{collect_case, print_auto_generated_file_comment, type_ref_name}; @@ -8,9 +8,7 @@ use std::fmt::{self, Write}; use std::ops::Deref; use convert_case::{Case, Casing}; -use itertools::Itertools; use spacetimedb_lib::sats::AlgebraicTypeRef; -use spacetimedb_primitives::ColList; use spacetimedb_schema::def::{ModuleDef, ReducerDef, ScopedTypeName, TableDef, TypeDef}; use spacetimedb_schema::identifier::Identifier; use spacetimedb_schema::schema::{Schema, TableSchema}; @@ -18,6 +16,7 @@ use spacetimedb_schema::type_for_generate::{AlgebraicTypeDef, AlgebraicTypeUse, use super::code_indenter::{CodeIndenter, Indenter}; use super::Lang; +use std::path::PathBuf; type Imports = BTreeSet; @@ -42,15 +41,14 @@ impl Lang for TypeScript { reducer_module_name(reducer_name) + ".ts" } - fn generate_type(&self, module: &ModuleDef, namespace: &str, typ: &TypeDef) -> String { + fn format_files(&self, _generated_files: BTreeSet) -> anyhow::Result<()> { + // TODO: implement formatting. + Ok(()) + } + + fn generate_type(&self, module: &ModuleDef, typ: &TypeDef) -> String { // TODO(cloutiertyler): I do think TypeScript does support namespaces: // https://www.typescriptlang.org/docs/handbook/namespaces.html - assert!( - namespace_is_empty_or_default(namespace), - "TypeScript codegen does not support namespaces, as TypeScript equates namespaces with files. - -Requested namespace: {namespace}", - ); let type_name = collect_case(Case::Pascal, typ.name.name_segments()); let mut output = CodeIndenter::new(String::new(), INDENT); @@ -82,14 +80,7 @@ Requested namespace: {namespace}", output.into_inner() } - fn generate_table(&self, module: &ModuleDef, namespace: &str, table: &TableDef) -> String { - assert!( - namespace_is_empty_or_default(namespace), - "TypeScript codegen does not support namespaces, as TypeScript equates namespaces with files. - -Requested namespace: {namespace}", - ); - + fn generate_table(&self, module: &ModuleDef, table: &TableDef) -> String { let schema = TableSchema::from_module_def(module, table, (), 0.into()) .validated() .expect("Failed to generate table due to validation errors"); @@ -164,20 +155,16 @@ export class {table_handle} {{ }); writeln!(out, "}}"); - let constraints = schema.backcompat_column_constraints(); - - for field in schema.columns() { - if constraints[&ColList::from(field.col_pos)].has_unique() { - let (unique_field_ident, unique_field_type_use) = &product_def.elements[field.col_pos.idx()]; - let unique_field_name = unique_field_ident.deref().to_case(Case::Snake); - let unique_field_name_pascalcase = unique_field_name.to_case(Case::Pascal); + for (unique_field_ident, unique_field_type_use) in iter_unique_cols(&schema, product_def) { + let unique_field_name = unique_field_ident.deref().to_case(Case::Snake); + let unique_field_name_pascalcase = unique_field_name.to_case(Case::Pascal); - let unique_constraint = table_name_pascalcase.clone() + &unique_field_name_pascalcase + "Unique"; - let unique_field_type = type_name(module, unique_field_type_use); + let unique_constraint = table_name_pascalcase.clone() + &unique_field_name_pascalcase + "Unique"; + let unique_field_type = type_name(module, unique_field_type_use); - writeln!( - out, - "/** + writeln!( + out, + "/** * Access to the `{unique_field_name}` unique index on the table `{table_name}`, * which allows point queries on the field of the same name * via the [`{unique_constraint}.find`] method. @@ -188,33 +175,32 @@ export class {table_handle} {{ * * Get a handle on the `{unique_field_name}` unique index on the table `{table_name}`. */" + ); + writeln!(out, "{unique_field_name} = {{"); + out.with_indent(|out| { + writeln!( + out, + "// Find the subscribed row whose `{unique_field_name}` column value is equal to `col_val`," + ); + writeln!(out, "// if such a row is present in the client cache."); + writeln!( + out, + "find: (col_val: {unique_field_type}): {row_type} | undefined => {{" ); - writeln!(out, "{unique_field_name} = {{"); out.with_indent(|out| { - writeln!( - out, - "// Find the subscribed row whose `{unique_field_name}` column value is equal to `col_val`," - ); - writeln!(out, "// if such a row is present in the client cache."); - writeln!( - out, - "find: (col_val: {unique_field_type}): {row_type} | undefined => {{" - ); + writeln!(out, "for (let row of this.tableCache.iter()) {{"); out.with_indent(|out| { - writeln!(out, "for (let row of this.tableCache.iter()) {{"); + writeln!(out, "if (deepEqual(row.{unique_field_name}, col_val)) {{"); out.with_indent(|out| { - writeln!(out, "if (deepEqual(row.{unique_field_name}, col_val)) {{"); - out.with_indent(|out| { - writeln!(out, "return row;"); - }); - writeln!(out, "}}"); + writeln!(out, "return row;"); }); writeln!(out, "}}"); }); - writeln!(out, "}},"); + writeln!(out, "}}"); }); - writeln!(out, "}};"); - } + writeln!(out, "}},"); + }); + writeln!(out, "}};"); } writeln!(out); @@ -260,14 +246,7 @@ removeOnUpdate = (cb: (ctx: EventContext, onRow: {row_type}, newRow: {row_type}) output.into_inner() } - fn generate_reducer(&self, module: &ModuleDef, namespace: &str, reducer: &ReducerDef) -> String { - assert!( - namespace_is_empty_or_default(namespace), - "TypeScript codegen does not support namespaces, as TypeScript equates namespaces with files. - -Requested namespace: {namespace}", - ); - + fn generate_reducer(&self, module: &ModuleDef, reducer: &ReducerDef) -> String { let mut output = CodeIndenter::new(String::new(), INDENT); let out = &mut output; @@ -290,14 +269,7 @@ Requested namespace: {namespace}", output.into_inner() } - fn generate_globals(&self, module: &ModuleDef, namespace: &str) -> Vec<(String, String)> { - assert!( - namespace_is_empty_or_default(namespace), - "TypeScript codegen does not support namespaces, as TypeScript equates namespaces with files. - -Requested namespace: {namespace}", - ); - + fn generate_globals(&self, module: &ModuleDef) -> Vec<(String, String)> { let mut output = CodeIndenter::new(String::new(), INDENT); let out = &mut output; @@ -427,6 +399,10 @@ setReducerFlagsConstructor: () => {{ vec![("index.ts".to_string(), (output.into_inner()))] } + + fn clap_value() -> clap::builder::PossibleValue { + clap::builder::PossibleValue::new("typescript").aliases(["ts", "TS"]) + } } fn print_remote_reducers(module: &ModuleDef, out: &mut Indenter) { @@ -457,38 +433,41 @@ fn print_remote_reducers(module: &ModuleDef, out: &mut Indenter) { let arg_name_list = arg_name_list.trim_end_matches(", "); let reducer_name = &reducer.name; - let reducer_name_pascal = reducer_name.deref().to_case(Case::Pascal); - let reducer_function_name = reducer_function_name(reducer); - let reducer_variant = reducer_variant_name(&reducer.name); - if reducer.params_for_generate.elements.is_empty() { - writeln!(out, "{reducer_function_name}() {{"); - out.with_indent(|out| { - writeln!( - out, - "this.connection.callReducer(\"{reducer_name}\", new Uint8Array(0), this.setCallReducerFlags.{reducer_function_name}Flags);" - ); - }); - } else { - writeln!(out, "{reducer_function_name}({arg_list}) {{"); - out.with_indent(|out| { - writeln!(out, "const __args = {{ {arg_name_list} }};"); - writeln!(out, "let __writer = new BinaryWriter(1024);"); - writeln!( - out, - "{reducer_variant}.getTypeScriptAlgebraicType().serialize(__writer, __args);" - ); - writeln!(out, "let __argsBuffer = __writer.getBuffer();"); - writeln!(out, "this.connection.callReducer(\"{reducer_name}\", __argsBuffer, this.setCallReducerFlags.{reducer_function_name}Flags);"); - }); + + if is_reducer_invokable(reducer) { + let reducer_function_name = reducer_function_name(reducer); + let reducer_variant = reducer_variant_name(&reducer.name); + if reducer.params_for_generate.elements.is_empty() { + writeln!(out, "{reducer_function_name}() {{"); + out.with_indent(|out| { + writeln!( + out, + "this.connection.callReducer(\"{reducer_name}\", new Uint8Array(0), this.setCallReducerFlags.{reducer_function_name}Flags);" + ); + }); + } else { + writeln!(out, "{reducer_function_name}({arg_list}) {{"); + out.with_indent(|out| { + writeln!(out, "const __args = {{ {arg_name_list} }};"); + writeln!(out, "let __writer = new BinaryWriter(1024);"); + writeln!( + out, + "{reducer_variant}.getTypeScriptAlgebraicType().serialize(__writer, __args);" + ); + writeln!(out, "let __argsBuffer = __writer.getBuffer();"); + writeln!(out, "this.connection.callReducer(\"{reducer_name}\", __argsBuffer, this.setCallReducerFlags.{reducer_function_name}Flags);"); + }); + } + writeln!(out, "}}"); + out.newline(); } - writeln!(out, "}}"); - out.newline(); let arg_list_padded = if arg_list.is_empty() { String::new() } else { format!(", {arg_list}") }; + let reducer_name_pascal = reducer_name.deref().to_case(Case::Pascal); writeln!( out, "on{reducer_name_pascal}(callback: (ctx: EventContext{arg_list_padded}) => void) {{" @@ -517,7 +496,7 @@ fn print_set_reducer_flags(module: &ModuleDef, out: &mut Indenter) { writeln!(out, "export class SetReducerFlags {{"); out.indent(1); - for reducer in iter_reducers(module) { + for reducer in iter_reducers(module).filter(|r| is_reducer_invokable(r)) { let reducer_function_name = reducer_function_name(reducer); writeln!(out, "{reducer_function_name}Flags: CallReducerFlags = 'FullUpdate';"); writeln!(out, "{reducer_function_name}(flags: CallReducerFlags) {{"); @@ -1064,27 +1043,6 @@ fn print_imports(module: &ModuleDef, out: &mut Indenter, imports: Imports) { } } -/// Iterate over all the [`ReducerDef`]s defined by the module, in alphabetical order by name. -/// -/// Sorting is necessary to have deterministic reproducable codegen. -fn iter_reducers(module: &ModuleDef) -> impl Iterator { - module.reducers().sorted_by_key(|reducer| &reducer.name) -} - -/// Iterate over all the [`TableDef`]s defined by the module, in alphabetical order by name. -/// -/// Sorting is necessary to have deterministic reproducable codegen. -fn iter_tables(module: &ModuleDef) -> impl Iterator { - module.tables().sorted_by_key(|table| &table.name) -} - -/// Iterate over all the [`TypeDef`]s defined by the module, in alphabetical order by name. -/// -/// Sorting is necessary to have deterministic reproducable codegen. -fn iter_types(module: &ModuleDef) -> impl Iterator { - module.types().sorted_by_key(|table| &table.name) -} - /// Use `search_function` on `roots` to detect required imports, then print them with `print_imports`. /// /// `this_file` is passed and excluded for the case of recursive types: diff --git a/crates/cli/src/subcommands/generate/util.rs b/crates/cli/src/subcommands/generate/util.rs index 22a1fb5709e..8223efd781d 100644 --- a/crates/cli/src/subcommands/generate/util.rs +++ b/crates/cli/src/subcommands/generate/util.rs @@ -5,17 +5,20 @@ use std::{ ops::Deref, }; +use super::code_indenter::Indenter; use convert_case::{Case, Casing}; use itertools::Itertools; -use spacetimedb_lib::sats::AlgebraicTypeRef; +use spacetimedb_lib::{db::raw_def::v9::Lifecycle, sats::AlgebraicTypeRef}; +use spacetimedb_primitives::ColList; +use spacetimedb_schema::def::{IndexDef, TableDef, TypeDef}; +use spacetimedb_schema::schema::TableSchema; +use spacetimedb_schema::type_for_generate::ProductTypeDef; use spacetimedb_schema::{ - def::ModuleDef, + def::{ModuleDef, ReducerDef}, identifier::Identifier, type_for_generate::{AlgebraicTypeUse, PrimitiveType}, }; -use super::code_indenter::Indenter; - /// Turns a closure `f: Fn(&mut Formatter) -> Result` into `fmt::Display`. pub(super) fn fmt_fn(f: impl Fn(&mut Formatter) -> Result) -> impl Display { struct FDisplay(F); @@ -31,25 +34,17 @@ pub(super) fn collect_case<'a>(case: Case, segs: impl Iterator bool { - // The `spacetime generate` CLI sets a default namespace of `SpacetimeDB.Types`, - // which is intended to be consumed only by C# codegen, - // but is passed to all codegen languages including Rust and TypeScript. - // We want to assert that the user did not explicitly request a different namespace, - // since we have no way to emit one. - // So, check that the namespace either is empty or is the default. - requested_namespace.is_empty() || requested_namespace == "SpacetimeDB.Types" -} - pub(super) fn print_lines(output: &mut Indenter, lines: &[&str]) { for line in lines { writeln!(output, "{line}"); } } +pub(super) const AUTO_GENERATED_PREFIX: &str = "// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB"; + const AUTO_GENERATED_FILE_COMMENT: &[&str] = &[ "// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE", - "// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD.", + "// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD.", "", ]; @@ -69,3 +64,51 @@ pub(super) fn is_type_filterable(ty: &AlgebraicTypeUse) -> bool { _ => false, } } + +pub(super) fn is_reducer_invokable(reducer: &ReducerDef) -> bool { + reducer.lifecycle.is_none() +} + +/// Iterate over all the [`ReducerDef`]s defined by the module, in alphabetical order by name. +/// +/// The init reducer is skipped because it should never be visible to the clients. +/// Sorting is not necessary for reducers because they are already stored in an IndexMap. +pub(super) fn iter_reducers(module: &ModuleDef) -> impl Iterator { + module + .reducers() + .filter(|reducer| reducer.lifecycle != Some(Lifecycle::Init)) +} + +/// Iterate over all the [`TableDef`]s defined by the module, in alphabetical order by name. +/// +/// Sorting is necessary to have deterministic reproducable codegen. +pub(super) fn iter_tables(module: &ModuleDef) -> impl Iterator { + module.tables().sorted_by_key(|table| &table.name) +} + +pub(super) fn iter_unique_cols<'a>( + schema: &'a TableSchema, + product_def: &'a ProductTypeDef, +) -> impl Iterator + 'a { + let constraints = schema.backcompat_column_constraints(); + schema.columns().iter().filter_map(move |field| { + constraints[&ColList::from(field.col_pos)] + .has_unique() + .then(|| { + let res @ (_, ref ty) = &product_def.elements[field.col_pos.idx()]; + is_type_filterable(ty).then_some(res) + }) + .flatten() + }) +} + +pub(super) fn iter_indexes(table: &TableDef) -> impl Iterator { + table.indexes.values().sorted_by_key(|index| &index.name) +} + +/// Iterate over all the [`TypeDef`]s defined by the module, in alphabetical order by name. +/// +/// Sorting is necessary to have deterministic reproducable codegen. +pub fn iter_types(module: &ModuleDef) -> impl Iterator { + module.types().sorted_by_key(|table| &table.name) +} diff --git a/crates/cli/tests/codegen.rs b/crates/cli/tests/codegen.rs index 43e950cec83..3f6e58c80df 100644 --- a/crates/cli/tests/codegen.rs +++ b/crates/cli/tests/codegen.rs @@ -1,4 +1,4 @@ -use spacetimedb_cli::generate; +use spacetimedb_cli::generate::{csharp::Csharp, extract_descriptions, generate, rust::Rust, typescript::TypeScript}; use spacetimedb_data_structures::map::HashMap; use spacetimedb_testing::modules::{CompilationMode, CompiledModule}; use std::path::Path; @@ -12,19 +12,11 @@ fn compiled_module() -> &'static Path { } macro_rules! declare_tests { - ($($name:ident => $lang:ident $(in $namespace:literal)?,)*) => { - $( - declare_tests!(__impl $name => $lang $(in $namespace)?); - )* - }; - (__impl $name:ident => $lang:ident) => { - declare_tests!(__impl $name => $lang in ""); - }; - (__impl $name:ident => $lang:ident in $namespace:literal) => { + ($($name:ident => $lang:expr,)*) => ($( #[test] fn $name() { - let module = generate::extract_descriptions(compiled_module()).unwrap(); - let outfiles: HashMap<_, _> = generate::generate(module, generate::Language::$lang, $namespace) + let module = extract_descriptions(compiled_module()).unwrap(); + let outfiles: HashMap<_, _> = generate(module, &$lang) .unwrap() .into_iter() .collect(); @@ -32,11 +24,11 @@ macro_rules! declare_tests { insta::assert_toml_snapshot!(outfiles); }); } - }; + )*); } declare_tests! { - test_codegen_csharp => Csharp in "SpacetimeDB", + test_codegen_csharp => Csharp { namespace: "SpacetimeDB" }, test_codegen_typescript => TypeScript, test_codegen_rust => Rust, } diff --git a/crates/cli/tests/snapshots/codegen__codegen_csharp.snap b/crates/cli/tests/snapshots/codegen__codegen_csharp.snap index 96777de6536..361b7a71fbb 100644 --- a/crates/cli/tests/snapshots/codegen__codegen_csharp.snap +++ b/crates/cli/tests/snapshots/codegen__codegen_csharp.snap @@ -1,1335 +1,1625 @@ --- source: crates/cli/tests/codegen.rs expression: outfiles +snapshot_kind: text --- -"Baz.cs" = ''' +"Reducers/AddPlayer.g.cs" = ''' // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. -// +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #nullable enable using System; +using SpacetimeDB.ClientApi; using System.Collections.Generic; using System.Runtime.Serialization; namespace SpacetimeDB { - [SpacetimeDB.Type] - [DataContract] - public partial class Baz - { - [DataMember(Name = "field")] - public string Field; - - public Baz(string Field) - { - this.Field = Field; - } - - public Baz() - { - this.Field = ""; - } - - } + public sealed partial class RemoteReducers : RemoteBase + { + public delegate void AddPlayerHandler(EventContext ctx, string name); + public event AddPlayerHandler? OnAddPlayer; + + public void AddPlayer(string name) + { + conn.InternalCallReducer(new Reducer.AddPlayer(name), this.SetCallReducerFlags.AddPlayerFlags); + } + + public bool InvokeAddPlayer(EventContext ctx, Reducer.AddPlayer args) + { + if (OnAddPlayer == null) return false; + OnAddPlayer( + ctx, + args.Name + ); + return true; + } + } + + public abstract partial class Reducer + { + [SpacetimeDB.Type] + [DataContract] + public sealed partial class AddPlayer : Reducer, IReducerArgs + { + [DataMember(Name = "name")] + public string Name; + + public AddPlayer(string Name) + { + this.Name = Name; + } + + public AddPlayer() + { + this.Name = ""; + } + + string IReducerArgs.ReducerName => "add_player"; + } + } + + public sealed partial class SetReducerFlags + { + internal CallReducerFlags AddPlayerFlags; + public void AddPlayer(CallReducerFlags flags) { this.AddPlayerFlags = flags; } + } } ''' -"Foobar.cs" = ''' +"Reducers/AddPrivate.g.cs" = ''' // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. -// +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #nullable enable using System; +using SpacetimeDB.ClientApi; +using System.Collections.Generic; +using System.Runtime.Serialization; namespace SpacetimeDB { - [SpacetimeDB.Type] - public partial record Foobar : SpacetimeDB.TaggedEnum<( - SpacetimeDB.Baz Baz, - SpacetimeDB.Unit Bar, - uint Har - )>; + public sealed partial class RemoteReducers : RemoteBase + { + public delegate void AddPrivateHandler(EventContext ctx, string name); + public event AddPrivateHandler? OnAddPrivate; + + public void AddPrivate(string name) + { + conn.InternalCallReducer(new Reducer.AddPrivate(name), this.SetCallReducerFlags.AddPrivateFlags); + } + + public bool InvokeAddPrivate(EventContext ctx, Reducer.AddPrivate args) + { + if (OnAddPrivate == null) return false; + OnAddPrivate( + ctx, + args.Name + ); + return true; + } + } + + public abstract partial class Reducer + { + [SpacetimeDB.Type] + [DataContract] + public sealed partial class AddPrivate : Reducer, IReducerArgs + { + [DataMember(Name = "name")] + public string Name; + + public AddPrivate(string Name) + { + this.Name = Name; + } + + public AddPrivate() + { + this.Name = ""; + } + + string IReducerArgs.ReducerName => "add_private"; + } + } + + public sealed partial class SetReducerFlags + { + internal CallReducerFlags AddPrivateFlags; + public void AddPrivate(CallReducerFlags flags) { this.AddPrivateFlags = flags; } + } } ''' -"HasSpecialStuff.cs" = ''' +"Reducers/AssertCallerIdentityIsModuleIdentity.g.cs" = ''' // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. -// +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #nullable enable using System; +using SpacetimeDB.ClientApi; using System.Collections.Generic; using System.Runtime.Serialization; namespace SpacetimeDB { - [SpacetimeDB.Type] - [DataContract] - public partial class HasSpecialStuff : IDatabaseRow - { - [DataMember(Name = "identity")] - public SpacetimeDB.Identity Identity; - [DataMember(Name = "address")] - public SpacetimeDB.Address Address; - - public HasSpecialStuff( - SpacetimeDB.Identity Identity, - SpacetimeDB.Address Address - ) - { - this.Identity = Identity; - this.Address = Address; - } - - public HasSpecialStuff() - { - this.Identity = new(); - this.Address = new(); - } - - } + public sealed partial class RemoteReducers : RemoteBase + { + public delegate void AssertCallerIdentityIsModuleIdentityHandler(EventContext ctx); + public event AssertCallerIdentityIsModuleIdentityHandler? OnAssertCallerIdentityIsModuleIdentity; + + public void AssertCallerIdentityIsModuleIdentity() + { + conn.InternalCallReducer(new Reducer.AssertCallerIdentityIsModuleIdentity(), this.SetCallReducerFlags.AssertCallerIdentityIsModuleIdentityFlags); + } + + public bool InvokeAssertCallerIdentityIsModuleIdentity(EventContext ctx, Reducer.AssertCallerIdentityIsModuleIdentity args) + { + if (OnAssertCallerIdentityIsModuleIdentity == null) return false; + OnAssertCallerIdentityIsModuleIdentity( + ctx + ); + return true; + } + } + + public abstract partial class Reducer + { + [SpacetimeDB.Type] + [DataContract] + public sealed partial class AssertCallerIdentityIsModuleIdentity : Reducer, IReducerArgs + { + string IReducerArgs.ReducerName => "assert_caller_identity_is_module_identity"; + } + } + + public sealed partial class SetReducerFlags + { + internal CallReducerFlags AssertCallerIdentityIsModuleIdentityFlags; + public void AssertCallerIdentityIsModuleIdentity(CallReducerFlags flags) { this.AssertCallerIdentityIsModuleIdentityFlags = flags; } + } } ''' -"LoggedOutPlayer.cs" = ''' +"Reducers/ClientConnected.g.cs" = ''' // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. -// +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #nullable enable using System; +using SpacetimeDB.ClientApi; using System.Collections.Generic; using System.Runtime.Serialization; namespace SpacetimeDB { - [SpacetimeDB.Type] - [DataContract] - public partial class Player : IDatabaseRow - { - [DataMember(Name = "identity")] - public SpacetimeDB.Identity Identity; - [DataMember(Name = "player_id")] - public ulong PlayerId; - [DataMember(Name = "name")] - public string Name; - - public Player( - SpacetimeDB.Identity Identity, - ulong PlayerId, - string Name - ) - { - this.Identity = Identity; - this.PlayerId = PlayerId; - this.Name = Name; - } - - public Player() - { - this.Identity = new(); - this.Name = ""; - } - - } + public sealed partial class RemoteReducers : RemoteBase + { + public delegate void ClientConnectedHandler(EventContext ctx); + public event ClientConnectedHandler? OnClientConnected; + + public bool InvokeClientConnected(EventContext ctx, Reducer.ClientConnected args) + { + if (OnClientConnected == null) return false; + OnClientConnected( + ctx + ); + return true; + } + } + + public abstract partial class Reducer + { + [SpacetimeDB.Type] + [DataContract] + public sealed partial class ClientConnected : Reducer, IReducerArgs + { + string IReducerArgs.ReducerName => "client_connected"; + } + } } ''' -"NamespaceTestC.cs" = ''' +"Reducers/DeletePlayer.g.cs" = ''' // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. -// +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #nullable enable using System; +using SpacetimeDB.ClientApi; +using System.Collections.Generic; +using System.Runtime.Serialization; namespace SpacetimeDB { - public partial class Namespace - { - public partial class Types - { - [SpacetimeDB.Type] - public enum TestC - { - Foo, - Bar, - } - } - } + public sealed partial class RemoteReducers : RemoteBase + { + public delegate void DeletePlayerHandler(EventContext ctx, ulong id); + public event DeletePlayerHandler? OnDeletePlayer; + + public void DeletePlayer(ulong id) + { + conn.InternalCallReducer(new Reducer.DeletePlayer(id), this.SetCallReducerFlags.DeletePlayerFlags); + } + + public bool InvokeDeletePlayer(EventContext ctx, Reducer.DeletePlayer args) + { + if (OnDeletePlayer == null) return false; + OnDeletePlayer( + ctx, + args.Id + ); + return true; + } + } + + public abstract partial class Reducer + { + [SpacetimeDB.Type] + [DataContract] + public sealed partial class DeletePlayer : Reducer, IReducerArgs + { + [DataMember(Name = "id")] + public ulong Id; + + public DeletePlayer(ulong Id) + { + this.Id = Id; + } + + public DeletePlayer() + { + } + + string IReducerArgs.ReducerName => "delete_player"; + } + } + + public sealed partial class SetReducerFlags + { + internal CallReducerFlags DeletePlayerFlags; + public void DeletePlayer(CallReducerFlags flags) { this.DeletePlayerFlags = flags; } + } } ''' -"NamespaceTestF.cs" = ''' +"Reducers/DeletePlayersByName.g.cs" = ''' // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. -// +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #nullable enable using System; +using SpacetimeDB.ClientApi; +using System.Collections.Generic; +using System.Runtime.Serialization; namespace SpacetimeDB { - public partial class Namespace - { - public partial class Types - { - [SpacetimeDB.Type] - public partial record TestF : SpacetimeDB.TaggedEnum<( - SpacetimeDB.Unit Foo, - SpacetimeDB.Unit Bar, - string Baz - )>; - } - } + public sealed partial class RemoteReducers : RemoteBase + { + public delegate void DeletePlayersByNameHandler(EventContext ctx, string name); + public event DeletePlayersByNameHandler? OnDeletePlayersByName; + + public void DeletePlayersByName(string name) + { + conn.InternalCallReducer(new Reducer.DeletePlayersByName(name), this.SetCallReducerFlags.DeletePlayersByNameFlags); + } + + public bool InvokeDeletePlayersByName(EventContext ctx, Reducer.DeletePlayersByName args) + { + if (OnDeletePlayersByName == null) return false; + OnDeletePlayersByName( + ctx, + args.Name + ); + return true; + } + } + + public abstract partial class Reducer + { + [SpacetimeDB.Type] + [DataContract] + public sealed partial class DeletePlayersByName : Reducer, IReducerArgs + { + [DataMember(Name = "name")] + public string Name; + + public DeletePlayersByName(string Name) + { + this.Name = Name; + } + + public DeletePlayersByName() + { + this.Name = ""; + } + + string IReducerArgs.ReducerName => "delete_players_by_name"; + } + } + + public sealed partial class SetReducerFlags + { + internal CallReducerFlags DeletePlayersByNameFlags; + public void DeletePlayersByName(CallReducerFlags flags) { this.DeletePlayersByNameFlags = flags; } + } } ''' -"PkMultiIdentity.cs" = ''' +"Reducers/QueryPrivate.g.cs" = ''' // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. -// +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #nullable enable using System; +using SpacetimeDB.ClientApi; using System.Collections.Generic; using System.Runtime.Serialization; namespace SpacetimeDB { - [SpacetimeDB.Type] - [DataContract] - public partial class PkMultiIdentity : IDatabaseRow - { - [DataMember(Name = "id")] - public uint Id; - [DataMember(Name = "other")] - public uint Other; - - public PkMultiIdentity( - uint Id, - uint Other - ) - { - this.Id = Id; - this.Other = Other; - } - - public PkMultiIdentity() - { - } - - } + public sealed partial class RemoteReducers : RemoteBase + { + public delegate void QueryPrivateHandler(EventContext ctx); + public event QueryPrivateHandler? OnQueryPrivate; + + public void QueryPrivate() + { + conn.InternalCallReducer(new Reducer.QueryPrivate(), this.SetCallReducerFlags.QueryPrivateFlags); + } + + public bool InvokeQueryPrivate(EventContext ctx, Reducer.QueryPrivate args) + { + if (OnQueryPrivate == null) return false; + OnQueryPrivate( + ctx + ); + return true; + } + } + + public abstract partial class Reducer + { + [SpacetimeDB.Type] + [DataContract] + public sealed partial class QueryPrivate : Reducer, IReducerArgs + { + string IReducerArgs.ReducerName => "query_private"; + } + } + + public sealed partial class SetReducerFlags + { + internal CallReducerFlags QueryPrivateFlags; + public void QueryPrivate(CallReducerFlags flags) { this.QueryPrivateFlags = flags; } + } } ''' -"Player.cs" = ''' +"Reducers/RepeatingTest.g.cs" = ''' // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. -// +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #nullable enable using System; +using SpacetimeDB.ClientApi; using System.Collections.Generic; using System.Runtime.Serialization; namespace SpacetimeDB { - [SpacetimeDB.Type] - [DataContract] - public partial class Player : IDatabaseRow - { - [DataMember(Name = "identity")] - public SpacetimeDB.Identity Identity; - [DataMember(Name = "player_id")] - public ulong PlayerId; - [DataMember(Name = "name")] - public string Name; - - public Player( - SpacetimeDB.Identity Identity, - ulong PlayerId, - string Name - ) - { - this.Identity = Identity; - this.PlayerId = PlayerId; - this.Name = Name; - } - - public Player() - { - this.Identity = new(); - this.Name = ""; - } - - } + public sealed partial class RemoteReducers : RemoteBase + { + public delegate void RepeatingTestHandler(EventContext ctx, RepeatingTestArg arg); + public event RepeatingTestHandler? OnRepeatingTest; + + public void RepeatingTest(RepeatingTestArg arg) + { + conn.InternalCallReducer(new Reducer.RepeatingTest(arg), this.SetCallReducerFlags.RepeatingTestFlags); + } + + public bool InvokeRepeatingTest(EventContext ctx, Reducer.RepeatingTest args) + { + if (OnRepeatingTest == null) return false; + OnRepeatingTest( + ctx, + args.Arg + ); + return true; + } + } + + public abstract partial class Reducer + { + [SpacetimeDB.Type] + [DataContract] + public sealed partial class RepeatingTest : Reducer, IReducerArgs + { + [DataMember(Name = "arg")] + public RepeatingTestArg Arg; + + public RepeatingTest(RepeatingTestArg Arg) + { + this.Arg = Arg; + } + + public RepeatingTest() + { + this.Arg = new(); + } + + string IReducerArgs.ReducerName => "repeating_test"; + } + } + + public sealed partial class SetReducerFlags + { + internal CallReducerFlags RepeatingTestFlags; + public void RepeatingTest(CallReducerFlags flags) { this.RepeatingTestFlags = flags; } + } } ''' -"Points.cs" = ''' +"Reducers/Test.g.cs" = ''' // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. -// +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #nullable enable using System; +using SpacetimeDB.ClientApi; using System.Collections.Generic; using System.Runtime.Serialization; namespace SpacetimeDB { - [SpacetimeDB.Type] - [DataContract] - public partial class Point : IDatabaseRow - { - [DataMember(Name = "x")] - public long X; - [DataMember(Name = "y")] - public long Y; - - public Point( - long X, - long Y - ) - { - this.X = X; - this.Y = Y; - } - - public Point() - { - } - - } + public sealed partial class RemoteReducers : RemoteBase + { + public delegate void TestHandler(EventContext ctx, TestA arg, TestB arg2, NamespaceTestC arg3, NamespaceTestF arg4); + public event TestHandler? OnTest; + + public void Test(TestA arg, TestB arg2, NamespaceTestC arg3, NamespaceTestF arg4) + { + conn.InternalCallReducer(new Reducer.Test(arg, arg2, arg3, arg4), this.SetCallReducerFlags.TestFlags); + } + + public bool InvokeTest(EventContext ctx, Reducer.Test args) + { + if (OnTest == null) return false; + OnTest( + ctx, + args.Arg, + args.Arg2, + args.Arg3, + args.Arg4 + ); + return true; + } + } + + public abstract partial class Reducer + { + [SpacetimeDB.Type] + [DataContract] + public sealed partial class Test : Reducer, IReducerArgs + { + [DataMember(Name = "arg")] + public TestA Arg; + [DataMember(Name = "arg2")] + public TestB Arg2; + [DataMember(Name = "arg3")] + public NamespaceTestC Arg3; + [DataMember(Name = "arg4")] + public NamespaceTestF Arg4; + + public Test( + TestA Arg, + TestB Arg2, + NamespaceTestC Arg3, + NamespaceTestF Arg4 + ) + { + this.Arg = Arg; + this.Arg2 = Arg2; + this.Arg3 = Arg3; + this.Arg4 = Arg4; + } + + public Test() + { + this.Arg = new(); + this.Arg2 = new(); + this.Arg4 = null!; + } + + string IReducerArgs.ReducerName => "test"; + } + } + + public sealed partial class SetReducerFlags + { + internal CallReducerFlags TestFlags; + public void Test(CallReducerFlags flags) { this.TestFlags = flags; } + } } ''' -"Private.cs" = ''' +"Reducers/TestBtreeIndexArgs.g.cs" = ''' // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. -// +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #nullable enable using System; +using SpacetimeDB.ClientApi; using System.Collections.Generic; using System.Runtime.Serialization; namespace SpacetimeDB { - [SpacetimeDB.Type] - [DataContract] - public partial class Private : IDatabaseRow - { - [DataMember(Name = "name")] - public string Name; - - public Private(string Name) - { - this.Name = Name; - } - - public Private() - { - this.Name = ""; - } - - } + public sealed partial class RemoteReducers : RemoteBase + { + public delegate void TestBtreeIndexArgsHandler(EventContext ctx); + public event TestBtreeIndexArgsHandler? OnTestBtreeIndexArgs; + + public void TestBtreeIndexArgs() + { + conn.InternalCallReducer(new Reducer.TestBtreeIndexArgs(), this.SetCallReducerFlags.TestBtreeIndexArgsFlags); + } + + public bool InvokeTestBtreeIndexArgs(EventContext ctx, Reducer.TestBtreeIndexArgs args) + { + if (OnTestBtreeIndexArgs == null) return false; + OnTestBtreeIndexArgs( + ctx + ); + return true; + } + } + + public abstract partial class Reducer + { + [SpacetimeDB.Type] + [DataContract] + public sealed partial class TestBtreeIndexArgs : Reducer, IReducerArgs + { + string IReducerArgs.ReducerName => "test_btree_index_args"; + } + } + + public sealed partial class SetReducerFlags + { + internal CallReducerFlags TestBtreeIndexArgsFlags; + public void TestBtreeIndexArgs(CallReducerFlags flags) { this.TestBtreeIndexArgsFlags = flags; } + } } ''' -"RepeatingTestArg.cs" = ''' +"SpacetimeDBClient.g.cs" = ''' // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. -// +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #nullable enable using System; +using SpacetimeDB.ClientApi; using System.Collections.Generic; using System.Runtime.Serialization; namespace SpacetimeDB { - [SpacetimeDB.Type] - [DataContract] - public partial class RepeatingTestArg : IDatabaseRow - { - [DataMember(Name = "scheduled_id")] - public ulong ScheduledId; - [DataMember(Name = "scheduled_at")] - public SpacetimeDB.ScheduleAt ScheduledAt; - [DataMember(Name = "prev_time")] - public ulong PrevTime; - - public RepeatingTestArg( - ulong ScheduledId, - SpacetimeDB.ScheduleAt ScheduledAt, - ulong PrevTime - ) - { - this.ScheduledId = ScheduledId; - this.ScheduledAt = ScheduledAt; - this.PrevTime = PrevTime; - } - - public RepeatingTestArg() - { - this.ScheduledAt = null!; - } - - } + public sealed partial class RemoteReducers : RemoteBase + { + internal RemoteReducers(DbConnection conn, SetReducerFlags SetReducerFlags) : base(conn) { this.SetCallReducerFlags = SetReducerFlags; } + internal readonly SetReducerFlags SetCallReducerFlags; + } + + public sealed partial class SetReducerFlags + { + internal SetReducerFlags() { } + } + + public sealed record EventContext : DbContext, IEventContext + { + public readonly RemoteReducers Reducers; + public readonly SetReducerFlags SetReducerFlags; + public readonly Event Event; + + internal EventContext(DbConnection conn, Event reducerEvent) : base(conn.Db) + { + Reducers = conn.Reducers; + SetReducerFlags = conn.SetReducerFlags; + Event = reducerEvent; + } + } + + public abstract partial class Reducer + { + private Reducer() { } + + public sealed class StdbNone : Reducer {} + } + + public sealed class DbConnection : DbConnectionBase + { + public readonly RemoteTables Db = new(); + public readonly RemoteReducers Reducers; + public readonly SetReducerFlags SetReducerFlags; + + public DbConnection() + { + SetReducerFlags = new(); + Reducers = new(this, this.SetReducerFlags); + + clientDB.AddTable(Db.HasSpecialStuff); + clientDB.AddTable(Db.LoggedOutPlayer); + clientDB.AddTable(Db.PkMultiIdentity); + clientDB.AddTable(Db.Player); + clientDB.AddTable(Db.Points); + clientDB.AddTable(Db.Private); + clientDB.AddTable(Db.RepeatingTestArg); + clientDB.AddTable(Db.TestA); + clientDB.AddTable(Db.TestD); + clientDB.AddTable(Db.TestE); + clientDB.AddTable(Db.TestF); + } + + protected override Reducer ToReducer(TransactionUpdate update) + { + var encodedArgs = update.ReducerCall.Args; + return update.ReducerCall.ReducerName switch { + "add_player" => BSATNHelpers.Decode(encodedArgs), + "add_private" => BSATNHelpers.Decode(encodedArgs), + "assert_caller_identity_is_module_identity" => BSATNHelpers.Decode(encodedArgs), + "client_connected" => BSATNHelpers.Decode(encodedArgs), + "delete_player" => BSATNHelpers.Decode(encodedArgs), + "delete_players_by_name" => BSATNHelpers.Decode(encodedArgs), + "query_private" => BSATNHelpers.Decode(encodedArgs), + "repeating_test" => BSATNHelpers.Decode(encodedArgs), + "test" => BSATNHelpers.Decode(encodedArgs), + "test_btree_index_args" => BSATNHelpers.Decode(encodedArgs), + "" or "" => new Reducer.StdbNone(), + var reducer => throw new ArgumentOutOfRangeException("Reducer", $"Unknown reducer {reducer}") + }; + } + + protected override IEventContext ToEventContext(Event reducerEvent) => + new EventContext(this, reducerEvent); + + protected override bool Dispatch(IEventContext context, Reducer reducer) + { + var eventContext = (EventContext)context; + return reducer switch { + Reducer.AddPlayer args => Reducers.InvokeAddPlayer(eventContext, args), + Reducer.AddPrivate args => Reducers.InvokeAddPrivate(eventContext, args), + Reducer.AssertCallerIdentityIsModuleIdentity args => Reducers.InvokeAssertCallerIdentityIsModuleIdentity(eventContext, args), + Reducer.ClientConnected args => Reducers.InvokeClientConnected(eventContext, args), + Reducer.DeletePlayer args => Reducers.InvokeDeletePlayer(eventContext, args), + Reducer.DeletePlayersByName args => Reducers.InvokeDeletePlayersByName(eventContext, args), + Reducer.QueryPrivate args => Reducers.InvokeQueryPrivate(eventContext, args), + Reducer.RepeatingTest args => Reducers.InvokeRepeatingTest(eventContext, args), + Reducer.Test args => Reducers.InvokeTest(eventContext, args), + Reducer.TestBtreeIndexArgs args => Reducers.InvokeTestBtreeIndexArgs(eventContext, args), + Reducer.StdbNone => true, + _ => throw new ArgumentOutOfRangeException("Reducer", $"Unknown reducer {reducer}") + }; + } + + public SubscriptionBuilder SubscriptionBuilder() => new(this); + } } ''' -"TestA.cs" = ''' +"Tables/HasSpecialStuff.g.cs" = ''' // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. -// +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #nullable enable using System; +using SpacetimeDB.BSATN; +using SpacetimeDB.ClientApi; using System.Collections.Generic; using System.Runtime.Serialization; namespace SpacetimeDB { - [SpacetimeDB.Type] - [DataContract] - public partial class TestA : IDatabaseRow - { - [DataMember(Name = "x")] - public uint X; - [DataMember(Name = "y")] - public uint Y; - [DataMember(Name = "z")] - public string Z; - - public TestA( - uint X, - uint Y, - string Z - ) - { - this.X = X; - this.Y = Y; - this.Z = Z; - } - - public TestA() - { - this.Z = ""; - } - - } + public sealed partial class RemoteTables + { + public sealed class HasSpecialStuffHandle : RemoteTableHandle + { + protected override string Name => "has_special_stuff"; + + internal HasSpecialStuffHandle() + { + } + } + + public readonly HasSpecialStuffHandle HasSpecialStuff = new(); + } } ''' -"TestB.cs" = ''' +"Tables/LoggedOutPlayer.g.cs" = ''' // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. -// +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #nullable enable using System; +using SpacetimeDB.BSATN; +using SpacetimeDB.ClientApi; using System.Collections.Generic; using System.Runtime.Serialization; namespace SpacetimeDB { - [SpacetimeDB.Type] - [DataContract] - public partial class TestB - { - [DataMember(Name = "foo")] - public string Foo; - - public TestB(string Foo) - { - this.Foo = Foo; - } - - public TestB() - { - this.Foo = ""; - } - - } + public sealed partial class RemoteTables + { + public sealed class LoggedOutPlayerHandle : RemoteTableHandle + { + protected override string Name => "logged_out_player"; + + public sealed class IdentityUniqueIndex : UniqueIndexBase + { + protected override SpacetimeDB.Identity GetKey(Player row) => row.Identity; + + public IdentityUniqueIndex(LoggedOutPlayerHandle table) : base(table) { } + } + + public readonly IdentityUniqueIndex Identity; + + public sealed class PlayerIdUniqueIndex : UniqueIndexBase + { + protected override ulong GetKey(Player row) => row.PlayerId; + + public PlayerIdUniqueIndex(LoggedOutPlayerHandle table) : base(table) { } + } + + public readonly PlayerIdUniqueIndex PlayerId; + + internal LoggedOutPlayerHandle() + { + Identity = new(this); + PlayerId = new(this); + } + + protected override object GetPrimaryKey(Player row) => row.Identity; + } + + public readonly LoggedOutPlayerHandle LoggedOutPlayer = new(); + } } ''' -"TestD.cs" = ''' +"Tables/PkMultiIdentity.g.cs" = ''' // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. -// +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #nullable enable using System; +using SpacetimeDB.BSATN; +using SpacetimeDB.ClientApi; using System.Collections.Generic; using System.Runtime.Serialization; namespace SpacetimeDB { - [SpacetimeDB.Type] - [DataContract] - public partial class TestD : IDatabaseRow - { - [DataMember(Name = "test_c")] - public SpacetimeDB.Namespace.Types.TestC? TestC; - - public TestD(SpacetimeDB.Namespace.Types.TestC? TestC) - { - this.TestC = TestC; - } - - public TestD() - { - } - - } + public sealed partial class RemoteTables + { + public sealed class PkMultiIdentityHandle : RemoteTableHandle + { + protected override string Name => "pk_multi_identity"; + + public sealed class IdUniqueIndex : UniqueIndexBase + { + protected override uint GetKey(PkMultiIdentity row) => row.Id; + + public IdUniqueIndex(PkMultiIdentityHandle table) : base(table) { } + } + + public readonly IdUniqueIndex Id; + + public sealed class OtherUniqueIndex : UniqueIndexBase + { + protected override uint GetKey(PkMultiIdentity row) => row.Other; + + public OtherUniqueIndex(PkMultiIdentityHandle table) : base(table) { } + } + + public readonly OtherUniqueIndex Other; + + internal PkMultiIdentityHandle() + { + Id = new(this); + Other = new(this); + } + + protected override object GetPrimaryKey(PkMultiIdentity row) => row.Id; + } + + public readonly PkMultiIdentityHandle PkMultiIdentity = new(); + } } ''' -"TestE.cs" = ''' +"Tables/Player.g.cs" = ''' // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. -// +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #nullable enable using System; +using SpacetimeDB.BSATN; +using SpacetimeDB.ClientApi; using System.Collections.Generic; using System.Runtime.Serialization; namespace SpacetimeDB { - [SpacetimeDB.Type] - [DataContract] - public partial class TestE : IDatabaseRow - { - [DataMember(Name = "id")] - public ulong Id; - [DataMember(Name = "name")] - public string Name; - - public TestE( - ulong Id, - string Name - ) - { - this.Id = Id; - this.Name = Name; - } - - public TestE() - { - this.Name = ""; - } - - } + public sealed partial class RemoteTables + { + public sealed class PlayerHandle : RemoteTableHandle + { + protected override string Name => "player"; + + public sealed class IdentityUniqueIndex : UniqueIndexBase + { + protected override SpacetimeDB.Identity GetKey(Player row) => row.Identity; + + public IdentityUniqueIndex(PlayerHandle table) : base(table) { } + } + + public readonly IdentityUniqueIndex Identity; + + public sealed class PlayerIdUniqueIndex : UniqueIndexBase + { + protected override ulong GetKey(Player row) => row.PlayerId; + + public PlayerIdUniqueIndex(PlayerHandle table) : base(table) { } + } + + public readonly PlayerIdUniqueIndex PlayerId; + + internal PlayerHandle() + { + Identity = new(this); + PlayerId = new(this); + } + + protected override object GetPrimaryKey(Player row) => row.Identity; + } + + public readonly PlayerHandle Player = new(); + } } ''' -"TestF.cs" = ''' +"Tables/Points.g.cs" = ''' // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. -// +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #nullable enable using System; +using SpacetimeDB.BSATN; +using SpacetimeDB.ClientApi; using System.Collections.Generic; using System.Runtime.Serialization; namespace SpacetimeDB { - [SpacetimeDB.Type] - [DataContract] - public partial class TestFoobar : IDatabaseRow - { - [DataMember(Name = "field")] - public SpacetimeDB.Foobar Field; - - public TestFoobar(SpacetimeDB.Foobar Field) - { - this.Field = Field; - } - - public TestFoobar() - { - this.Field = null!; - } - - } + public sealed partial class RemoteTables + { + public sealed class PointsHandle : RemoteTableHandle + { + protected override string Name => "points"; + + public sealed class MultiColumnIndexIndex : BTreeIndexBase<(long X, long Y)> + { + protected override (long X, long Y) GetKey(Point row) => (row.X, row.Y); + + public MultiColumnIndexIndex(PointsHandle table) : base(table) { } + } + + public readonly MultiColumnIndexIndex MultiColumnIndex; + + internal PointsHandle() + { + MultiColumnIndex = new(this); + } + } + + public readonly PointsHandle Points = new(); + } } ''' -"_Globals/SpacetimeDBClient.cs" = ''' +"Tables/Private.g.cs" = ''' // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. -// +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #nullable enable using System; +using SpacetimeDB.BSATN; using SpacetimeDB.ClientApi; using System.Collections.Generic; using System.Runtime.Serialization; namespace SpacetimeDB { - public sealed class RemoteTables - { - public class HasSpecialStuffHandle : RemoteTableHandle - { - internal HasSpecialStuffHandle() - { - } - - } - - public readonly HasSpecialStuffHandle HasSpecialStuff = new(); - - public class LoggedOutPlayerHandle : RemoteTableHandle - { - - public override void InternalInvokeValueInserted(IDatabaseRow row) - { - var value = (Player)row; - Identity.Cache[value.Identity] = value; - PlayerId.Cache[value.PlayerId] = value; - } - - public override void InternalInvokeValueDeleted(IDatabaseRow row) - { - Identity.Cache.Remove(((Player)row).Identity); - PlayerId.Cache.Remove(((Player)row).PlayerId); - } - - public class IdentityUniqueIndex - { - internal readonly Dictionary Cache = new(16); - public Player? Find(SpacetimeDB.Identity value) - { - Cache.TryGetValue(value, out var r); - return r; - } - - } - - public IdentityUniqueIndex Identity = new(); - - public class PlayerIdUniqueIndex - { - internal readonly Dictionary Cache = new(16); - public Player? Find(ulong value) - { - Cache.TryGetValue(value, out var r); - return r; - } - - } - - public PlayerIdUniqueIndex PlayerId = new(); - - internal LoggedOutPlayerHandle() - { - } - public override object GetPrimaryKey(IDatabaseRow row) => ((Player)row).Identity; - - } - - public readonly LoggedOutPlayerHandle LoggedOutPlayer = new(); - - public class PkMultiIdentityHandle : RemoteTableHandle - { - - public override void InternalInvokeValueInserted(IDatabaseRow row) - { - var value = (PkMultiIdentity)row; - Id.Cache[value.Id] = value; - Other.Cache[value.Other] = value; - } - - public override void InternalInvokeValueDeleted(IDatabaseRow row) - { - Id.Cache.Remove(((PkMultiIdentity)row).Id); - Other.Cache.Remove(((PkMultiIdentity)row).Other); - } - - public class IdUniqueIndex - { - internal readonly Dictionary Cache = new(16); - public PkMultiIdentity? Find(uint value) - { - Cache.TryGetValue(value, out var r); - return r; - } - - } - - public IdUniqueIndex Id = new(); - - public class OtherUniqueIndex - { - internal readonly Dictionary Cache = new(16); - public PkMultiIdentity? Find(uint value) - { - Cache.TryGetValue(value, out var r); - return r; - } - - } - - public OtherUniqueIndex Other = new(); - - internal PkMultiIdentityHandle() - { - } - public override object GetPrimaryKey(IDatabaseRow row) => ((PkMultiIdentity)row).Id; - - } - - public readonly PkMultiIdentityHandle PkMultiIdentity = new(); - - public class PlayerHandle : RemoteTableHandle - { - - public override void InternalInvokeValueInserted(IDatabaseRow row) - { - var value = (Player)row; - Identity.Cache[value.Identity] = value; - PlayerId.Cache[value.PlayerId] = value; - } - - public override void InternalInvokeValueDeleted(IDatabaseRow row) - { - Identity.Cache.Remove(((Player)row).Identity); - PlayerId.Cache.Remove(((Player)row).PlayerId); - } - - public class IdentityUniqueIndex - { - internal readonly Dictionary Cache = new(16); - public Player? Find(SpacetimeDB.Identity value) - { - Cache.TryGetValue(value, out var r); - return r; - } - - } - - public IdentityUniqueIndex Identity = new(); - - public class PlayerIdUniqueIndex - { - internal readonly Dictionary Cache = new(16); - public Player? Find(ulong value) - { - Cache.TryGetValue(value, out var r); - return r; - } + public sealed partial class RemoteTables + { + public sealed class PrivateHandle : RemoteTableHandle + { + protected override string Name => "private"; + + internal PrivateHandle() + { + } + } + + public readonly PrivateHandle Private = new(); + } +} +''' +"Tables/RepeatingTestArg.g.cs" = ''' +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#nullable enable + +using System; +using SpacetimeDB.BSATN; +using SpacetimeDB.ClientApi; +using System.Collections.Generic; +using System.Runtime.Serialization; + +namespace SpacetimeDB +{ + public sealed partial class RemoteTables + { + public sealed class RepeatingTestArgHandle : RemoteTableHandle + { + protected override string Name => "repeating_test_arg"; + + public sealed class ScheduledIdUniqueIndex : UniqueIndexBase + { + protected override ulong GetKey(RepeatingTestArg row) => row.ScheduledId; + + public ScheduledIdUniqueIndex(RepeatingTestArgHandle table) : base(table) { } + } + + public readonly ScheduledIdUniqueIndex ScheduledId; + + internal RepeatingTestArgHandle() + { + ScheduledId = new(this); + } + + protected override object GetPrimaryKey(RepeatingTestArg row) => row.ScheduledId; + } + + public readonly RepeatingTestArgHandle RepeatingTestArg = new(); + } +} +''' +"Tables/TestA.g.cs" = ''' +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#nullable enable + +using System; +using SpacetimeDB.BSATN; +using SpacetimeDB.ClientApi; +using System.Collections.Generic; +using System.Runtime.Serialization; + +namespace SpacetimeDB +{ + public sealed partial class RemoteTables + { + public sealed class TestAHandle : RemoteTableHandle + { + protected override string Name => "test_a"; + + public sealed class FooIndex : BTreeIndexBase + { + protected override uint GetKey(TestA row) => row.X; + + public FooIndex(TestAHandle table) : base(table) { } + } + + public readonly FooIndex Foo; + + internal TestAHandle() + { + Foo = new(this); + } + } + + public readonly TestAHandle TestA = new(); + } +} +''' +"Tables/TestD.g.cs" = ''' +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#nullable enable + +using System; +using SpacetimeDB.BSATN; +using SpacetimeDB.ClientApi; +using System.Collections.Generic; +using System.Runtime.Serialization; + +namespace SpacetimeDB +{ + public sealed partial class RemoteTables + { + public sealed class TestDHandle : RemoteTableHandle + { + protected override string Name => "test_d"; + + internal TestDHandle() + { + } + } + + public readonly TestDHandle TestD = new(); + } +} +''' +"Tables/TestE.g.cs" = ''' +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#nullable enable + +using System; +using SpacetimeDB.BSATN; +using SpacetimeDB.ClientApi; +using System.Collections.Generic; +using System.Runtime.Serialization; + +namespace SpacetimeDB +{ + public sealed partial class RemoteTables + { + public sealed class TestEHandle : RemoteTableHandle + { + protected override string Name => "test_e"; + + public sealed class IdUniqueIndex : UniqueIndexBase + { + protected override ulong GetKey(TestE row) => row.Id; + + public IdUniqueIndex(TestEHandle table) : base(table) { } + } + + public readonly IdUniqueIndex Id; + + public sealed class NameIndex : BTreeIndexBase + { + protected override string GetKey(TestE row) => row.Name; + + public NameIndex(TestEHandle table) : base(table) { } + } + + public readonly NameIndex Name; + + internal TestEHandle() + { + Id = new(this); + Name = new(this); + } + + protected override object GetPrimaryKey(TestE row) => row.Id; + } + + public readonly TestEHandle TestE = new(); + } +} +''' +"Tables/TestF.g.cs" = ''' +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#nullable enable + +using System; +using SpacetimeDB.BSATN; +using SpacetimeDB.ClientApi; +using System.Collections.Generic; +using System.Runtime.Serialization; + +namespace SpacetimeDB +{ + public sealed partial class RemoteTables + { + public sealed class TestFHandle : RemoteTableHandle + { + protected override string Name => "test_f"; + + internal TestFHandle() + { + } + } + + public readonly TestFHandle TestF = new(); + } +} +''' +"Types/Baz.g.cs" = ''' +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#nullable enable + +using System; +using System.Collections.Generic; +using System.Runtime.Serialization; + +namespace SpacetimeDB +{ + [SpacetimeDB.Type] + [DataContract] + public sealed partial class Baz + { + [DataMember(Name = "field")] + public string Field; + + public Baz(string Field) + { + this.Field = Field; + } + + public Baz() + { + this.Field = ""; + } + } +} +''' +"Types/Foobar.g.cs" = ''' +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. - } +#nullable enable - public PlayerIdUniqueIndex PlayerId = new(); - - internal PlayerHandle() - { - } - public override object GetPrimaryKey(IDatabaseRow row) => ((Player)row).Identity; +using System; - } +namespace SpacetimeDB +{ + [SpacetimeDB.Type] + public partial record Foobar : SpacetimeDB.TaggedEnum<( + Baz Baz, + SpacetimeDB.Unit Bar, + uint Har + )>; +} +''' +"Types/HasSpecialStuff.g.cs" = ''' +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. - public readonly PlayerHandle Player = new(); - - public class PointsHandle : RemoteTableHandle - { - public class XYIndex - { - PointsHandle Handle; - internal XYIndex(PointsHandle handle) => Handle = handle; - public IEnumerable Filter(long value) => - Handle.Query(x => x.X == value); - } - - public XYIndex XY { get; init; } +#nullable enable - internal PointsHandle() - { - XY = new(this); - } - - } - - public readonly PointsHandle Points = new(); +using System; +using System.Collections.Generic; +using System.Runtime.Serialization; - public class PrivateHandle : RemoteTableHandle - { - internal PrivateHandle() - { - } +namespace SpacetimeDB +{ + [SpacetimeDB.Type] + [DataContract] + public sealed partial class HasSpecialStuff + { + [DataMember(Name = "identity")] + public SpacetimeDB.Identity Identity; + [DataMember(Name = "address")] + public SpacetimeDB.Address Address; + + public HasSpecialStuff( + SpacetimeDB.Identity Identity, + SpacetimeDB.Address Address + ) + { + this.Identity = Identity; + this.Address = Address; + } + + public HasSpecialStuff() + { + } + } +} +''' +"Types/NamespaceTestC.g.cs" = ''' +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. - } - - public readonly PrivateHandle Private = new(); - - public class RepeatingTestArgHandle : RemoteTableHandle - { +#nullable enable - public override void InternalInvokeValueInserted(IDatabaseRow row) - { - var value = (RepeatingTestArg)row; - ScheduledId.Cache[value.ScheduledId] = value; - } - - public override void InternalInvokeValueDeleted(IDatabaseRow row) - { - ScheduledId.Cache.Remove(((RepeatingTestArg)row).ScheduledId); - } +using System; - public class ScheduledIdUniqueIndex - { - internal readonly Dictionary Cache = new(16); - public RepeatingTestArg? Find(ulong value) - { - Cache.TryGetValue(value, out var r); - return r; - } - - } +namespace SpacetimeDB +{ + [SpacetimeDB.Type] + public enum NamespaceTestC + { + Foo, + Bar, + } +} +''' +"Types/NamespaceTestF.g.cs" = ''' +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. - public ScheduledIdUniqueIndex ScheduledId = new(); +#nullable enable - internal RepeatingTestArgHandle() - { - } - public override object GetPrimaryKey(IDatabaseRow row) => ((RepeatingTestArg)row).ScheduledId; +using System; - } +namespace SpacetimeDB +{ + [SpacetimeDB.Type] + public partial record NamespaceTestF : SpacetimeDB.TaggedEnum<( + SpacetimeDB.Unit Foo, + SpacetimeDB.Unit Bar, + string Baz + )>; +} +''' +"Types/PkMultiIdentity.g.cs" = ''' +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. - public readonly RepeatingTestArgHandle RepeatingTestArg = new(); +#nullable enable - public class TestAHandle : RemoteTableHandle - { - public class XIndex - { - TestAHandle Handle; - internal XIndex(TestAHandle handle) => Handle = handle; - public IEnumerable Filter(uint value) => - Handle.Query(x => x.X == value); - } - - public XIndex X { get; init; } - - internal TestAHandle() - { - X = new(this); - } - - } +using System; +using System.Collections.Generic; +using System.Runtime.Serialization; + +namespace SpacetimeDB +{ + [SpacetimeDB.Type] + [DataContract] + public sealed partial class PkMultiIdentity + { + [DataMember(Name = "id")] + public uint Id; + [DataMember(Name = "other")] + public uint Other; + + public PkMultiIdentity( + uint Id, + uint Other + ) + { + this.Id = Id; + this.Other = Other; + } + + public PkMultiIdentity() + { + } + } +} +''' +"Types/Player.g.cs" = ''' +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#nullable enable + +using System; +using System.Collections.Generic; +using System.Runtime.Serialization; + +namespace SpacetimeDB +{ + [SpacetimeDB.Type] + [DataContract] + public sealed partial class Player + { + [DataMember(Name = "identity")] + public SpacetimeDB.Identity Identity; + [DataMember(Name = "player_id")] + public ulong PlayerId; + [DataMember(Name = "name")] + public string Name; + + public Player( + SpacetimeDB.Identity Identity, + ulong PlayerId, + string Name + ) + { + this.Identity = Identity; + this.PlayerId = PlayerId; + this.Name = Name; + } + + public Player() + { + this.Name = ""; + } + } +} +''' +"Types/Point.g.cs" = ''' +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#nullable enable + +using System; +using System.Collections.Generic; +using System.Runtime.Serialization; + +namespace SpacetimeDB +{ + [SpacetimeDB.Type] + [DataContract] + public sealed partial class Point + { + [DataMember(Name = "x")] + public long X; + [DataMember(Name = "y")] + public long Y; + + public Point( + long X, + long Y + ) + { + this.X = X; + this.Y = Y; + } + + public Point() + { + } + } +} +''' +"Types/Private.g.cs" = ''' +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#nullable enable + +using System; +using System.Collections.Generic; +using System.Runtime.Serialization; - public readonly TestAHandle TestA = new(); - - public class TestDHandle : RemoteTableHandle - { - internal TestDHandle() - { - } - - } - - public readonly TestDHandle TestD = new(); - - public class TestEHandle : RemoteTableHandle - { - - public override void InternalInvokeValueInserted(IDatabaseRow row) - { - var value = (TestE)row; - Id.Cache[value.Id] = value; - } - - public override void InternalInvokeValueDeleted(IDatabaseRow row) - { - Id.Cache.Remove(((TestE)row).Id); - } - - public class IdUniqueIndex - { - internal readonly Dictionary Cache = new(16); - public TestE? Find(ulong value) - { - Cache.TryGetValue(value, out var r); - return r; - } - - } - - public IdUniqueIndex Id = new(); - - public class NameIndex - { - TestEHandle Handle; - internal NameIndex(TestEHandle handle) => Handle = handle; - public IEnumerable Filter(string value) => - Handle.Query(x => x.Name == value); - } - - public NameIndex Name { get; init; } - - internal TestEHandle() - { - Name = new(this); - } - public override object GetPrimaryKey(IDatabaseRow row) => ((TestE)row).Id; - - } - - public readonly TestEHandle TestE = new(); - - public class TestFHandle : RemoteTableHandle - { - internal TestFHandle() - { - } - - } - - public readonly TestFHandle TestF = new(); - - } - - public sealed class RemoteReducers : RemoteBase - { - internal RemoteReducers(DbConnection conn, SetReducerFlags SetReducerFlags) : base(conn) { this.SetCallReducerFlags = SetReducerFlags; } - internal readonly SetReducerFlags SetCallReducerFlags; - public delegate void AddPlayerHandler(EventContext ctx, string name); - public event AddPlayerHandler? OnAddPlayer; - - public void AddPlayer(string name) - { - conn.InternalCallReducer(new Reducer.AddPlayer(name), this.SetCallReducerFlags.AddPlayerFlags); - } - - public bool InvokeAddPlayer(EventContext ctx, Reducer.AddPlayer args) - { - if (OnAddPlayer == null) return false; - OnAddPlayer( - ctx, - args.Name - ); - return true; - } - public delegate void AddPrivateHandler(EventContext ctx, string name); - public event AddPrivateHandler? OnAddPrivate; - - public void AddPrivate(string name) - { - conn.InternalCallReducer(new Reducer.AddPrivate(name), this.SetCallReducerFlags.AddPrivateFlags); - } - - public bool InvokeAddPrivate(EventContext ctx, Reducer.AddPrivate args) - { - if (OnAddPrivate == null) return false; - OnAddPrivate( - ctx, - args.Name - ); - return true; - } - public delegate void AssertCallerIdentityIsModuleIdentityHandler(EventContext ctx); - public event AssertCallerIdentityIsModuleIdentityHandler? OnAssertCallerIdentityIsModuleIdentity; - - public void AssertCallerIdentityIsModuleIdentity() - { - conn.InternalCallReducer(new Reducer.AssertCallerIdentityIsModuleIdentity(), this.SetCallReducerFlags.AssertCallerIdentityIsModuleIdentityFlags); - } - - public bool InvokeAssertCallerIdentityIsModuleIdentity(EventContext ctx, Reducer.AssertCallerIdentityIsModuleIdentity args) - { - if (OnAssertCallerIdentityIsModuleIdentity == null) return false; - OnAssertCallerIdentityIsModuleIdentity( - ctx - ); - return true; - } - public delegate void DeletePlayerHandler(EventContext ctx, ulong id); - public event DeletePlayerHandler? OnDeletePlayer; - - public void DeletePlayer(ulong id) - { - conn.InternalCallReducer(new Reducer.DeletePlayer(id), this.SetCallReducerFlags.DeletePlayerFlags); - } - - public bool InvokeDeletePlayer(EventContext ctx, Reducer.DeletePlayer args) - { - if (OnDeletePlayer == null) return false; - OnDeletePlayer( - ctx, - args.Id - ); - return true; - } - public delegate void DeletePlayersByNameHandler(EventContext ctx, string name); - public event DeletePlayersByNameHandler? OnDeletePlayersByName; - - public void DeletePlayersByName(string name) - { - conn.InternalCallReducer(new Reducer.DeletePlayersByName(name), this.SetCallReducerFlags.DeletePlayersByNameFlags); - } - - public bool InvokeDeletePlayersByName(EventContext ctx, Reducer.DeletePlayersByName args) - { - if (OnDeletePlayersByName == null) return false; - OnDeletePlayersByName( - ctx, - args.Name - ); - return true; - } - public delegate void QueryPrivateHandler(EventContext ctx); - public event QueryPrivateHandler? OnQueryPrivate; - - public void QueryPrivate() - { - conn.InternalCallReducer(new Reducer.QueryPrivate(), this.SetCallReducerFlags.QueryPrivateFlags); - } - - public bool InvokeQueryPrivate(EventContext ctx, Reducer.QueryPrivate args) - { - if (OnQueryPrivate == null) return false; - OnQueryPrivate( - ctx - ); - return true; - } - public delegate void RepeatingTestHandler(EventContext ctx, SpacetimeDB.RepeatingTestArg arg); - public event RepeatingTestHandler? OnRepeatingTest; - - public void RepeatingTest(SpacetimeDB.RepeatingTestArg arg) - { - conn.InternalCallReducer(new Reducer.RepeatingTest(arg), this.SetCallReducerFlags.RepeatingTestFlags); - } - - public bool InvokeRepeatingTest(EventContext ctx, Reducer.RepeatingTest args) - { - if (OnRepeatingTest == null) return false; - OnRepeatingTest( - ctx, - args.Arg - ); - return true; - } - public delegate void TestHandler(EventContext ctx, SpacetimeDB.TestA arg, SpacetimeDB.TestB arg2, SpacetimeDB.Namespace.Types.TestC arg3, SpacetimeDB.Namespace.TestF arg4); - public event TestHandler? OnTest; - - public void Test(SpacetimeDB.TestA arg, SpacetimeDB.TestB arg2, SpacetimeDB.Namespace.Types.TestC arg3, SpacetimeDB.Namespace.TestF arg4) - { - conn.InternalCallReducer(new Reducer.Test(arg, arg2, arg3, arg4), this.SetCallReducerFlags.TestFlags); - } - - public bool InvokeTest(EventContext ctx, Reducer.Test args) - { - if (OnTest == null) return false; - OnTest( - ctx, - args.Arg, - args.Arg2, - args.Arg3, - args.Arg4 - ); - return true; - } - public delegate void TestBtreeIndexArgsHandler(EventContext ctx); - public event TestBtreeIndexArgsHandler? OnTestBtreeIndexArgs; - - public void TestBtreeIndexArgs() - { - conn.InternalCallReducer(new Reducer.TestBtreeIndexArgs(), this.SetCallReducerFlags.TestBtreeIndexArgsFlags); - } - - public bool InvokeTestBtreeIndexArgs(EventContext ctx, Reducer.TestBtreeIndexArgs args) - { - if (OnTestBtreeIndexArgs == null) return false; - OnTestBtreeIndexArgs( - ctx - ); - return true; - } - } - - public sealed class SetReducerFlags - { - internal SetReducerFlags() { } - internal CallReducerFlags AddPlayerFlags; - public void AddPlayer(CallReducerFlags flags) { this.AddPlayerFlags = flags; } - internal CallReducerFlags AddPrivateFlags; - public void AddPrivate(CallReducerFlags flags) { this.AddPrivateFlags = flags; } - internal CallReducerFlags AssertCallerIdentityIsModuleIdentityFlags; - public void AssertCallerIdentityIsModuleIdentity(CallReducerFlags flags) { this.AssertCallerIdentityIsModuleIdentityFlags = flags; } - internal CallReducerFlags DeletePlayerFlags; - public void DeletePlayer(CallReducerFlags flags) { this.DeletePlayerFlags = flags; } - internal CallReducerFlags DeletePlayersByNameFlags; - public void DeletePlayersByName(CallReducerFlags flags) { this.DeletePlayersByNameFlags = flags; } - internal CallReducerFlags QueryPrivateFlags; - public void QueryPrivate(CallReducerFlags flags) { this.QueryPrivateFlags = flags; } - internal CallReducerFlags RepeatingTestFlags; - public void RepeatingTest(CallReducerFlags flags) { this.RepeatingTestFlags = flags; } - internal CallReducerFlags TestFlags; - public void Test(CallReducerFlags flags) { this.TestFlags = flags; } - internal CallReducerFlags TestBtreeIndexArgsFlags; - public void TestBtreeIndexArgs(CallReducerFlags flags) { this.TestBtreeIndexArgsFlags = flags; } - } - - public partial record EventContext : DbContext, IEventContext - { - public readonly RemoteReducers Reducers; - public readonly SetReducerFlags SetReducerFlags; - public readonly Event Event; - - internal EventContext(DbConnection conn, Event reducerEvent) : base(conn.Db) - { - Reducers = conn.Reducers; - SetReducerFlags = conn.SetReducerFlags; - Event = reducerEvent; - } - } - - public abstract partial class Reducer - { - private Reducer() { } - - [SpacetimeDB.Type] - [DataContract] - public partial class AddPlayer : Reducer, IReducerArgs - { - [DataMember(Name = "name")] - public string Name; - - public AddPlayer(string Name) - { - this.Name = Name; - } - - public AddPlayer() - { - this.Name = ""; - } - - string IReducerArgs.ReducerName => "add_player"; - } - - [SpacetimeDB.Type] - [DataContract] - public partial class AddPrivate : Reducer, IReducerArgs - { - [DataMember(Name = "name")] - public string Name; - - public AddPrivate(string Name) - { - this.Name = Name; - } - - public AddPrivate() - { - this.Name = ""; - } - - string IReducerArgs.ReducerName => "add_private"; - } - - [SpacetimeDB.Type] - [DataContract] - public partial class AssertCallerIdentityIsModuleIdentity : Reducer, IReducerArgs - { - string IReducerArgs.ReducerName => "assert_caller_identity_is_module_identity"; - } - - [SpacetimeDB.Type] - [DataContract] - public partial class DeletePlayer : Reducer, IReducerArgs - { - [DataMember(Name = "id")] - public ulong Id; - - public DeletePlayer(ulong Id) - { - this.Id = Id; - } - - public DeletePlayer() - { - } - - string IReducerArgs.ReducerName => "delete_player"; - } - - [SpacetimeDB.Type] - [DataContract] - public partial class DeletePlayersByName : Reducer, IReducerArgs - { - [DataMember(Name = "name")] - public string Name; - - public DeletePlayersByName(string Name) - { - this.Name = Name; - } - - public DeletePlayersByName() - { - this.Name = ""; - } - - string IReducerArgs.ReducerName => "delete_players_by_name"; - } - - [SpacetimeDB.Type] - [DataContract] - public partial class QueryPrivate : Reducer, IReducerArgs - { - string IReducerArgs.ReducerName => "query_private"; - } - - [SpacetimeDB.Type] - [DataContract] - public partial class RepeatingTest : Reducer, IReducerArgs - { - [DataMember(Name = "arg")] - public SpacetimeDB.RepeatingTestArg Arg; - - public RepeatingTest(SpacetimeDB.RepeatingTestArg Arg) - { - this.Arg = Arg; - } - - public RepeatingTest() - { - this.Arg = new(); - } - - string IReducerArgs.ReducerName => "repeating_test"; - } - - [SpacetimeDB.Type] - [DataContract] - public partial class Test : Reducer, IReducerArgs - { - [DataMember(Name = "arg")] - public SpacetimeDB.TestA Arg; - [DataMember(Name = "arg2")] - public SpacetimeDB.TestB Arg2; - [DataMember(Name = "arg3")] - public SpacetimeDB.Namespace.Types.TestC Arg3; - [DataMember(Name = "arg4")] - public SpacetimeDB.Namespace.TestF Arg4; - - public Test( - SpacetimeDB.TestA Arg, - SpacetimeDB.TestB Arg2, - SpacetimeDB.Namespace.Types.TestC Arg3, - SpacetimeDB.Namespace.TestF Arg4 - ) - { - this.Arg = Arg; - this.Arg2 = Arg2; - this.Arg3 = Arg3; - this.Arg4 = Arg4; - } - - public Test() - { - this.Arg = new(); - this.Arg2 = new(); - this.Arg4 = null!; - } - - string IReducerArgs.ReducerName => "test"; - } - - [SpacetimeDB.Type] - [DataContract] - public partial class TestBtreeIndexArgs : Reducer, IReducerArgs - { - string IReducerArgs.ReducerName => "test_btree_index_args"; - } - - public class StdbNone : Reducer {} - public class StdbIdentityConnected : Reducer {} - public class StdbIdentityDisconnected : Reducer {} - } - - public class DbConnection : DbConnectionBase - { - public readonly RemoteTables Db = new(); - public readonly RemoteReducers Reducers; - public readonly SetReducerFlags SetReducerFlags; - - public DbConnection() - { - SetReducerFlags = new(); - Reducers = new(this, this.SetReducerFlags); - - clientDB.AddTable("has_special_stuff", Db.HasSpecialStuff); - clientDB.AddTable("logged_out_player", Db.LoggedOutPlayer); - clientDB.AddTable("pk_multi_identity", Db.PkMultiIdentity); - clientDB.AddTable("player", Db.Player); - clientDB.AddTable("points", Db.Points); - clientDB.AddTable("private", Db.Private); - clientDB.AddTable("repeating_test_arg", Db.RepeatingTestArg); - clientDB.AddTable("test_a", Db.TestA); - clientDB.AddTable("test_d", Db.TestD); - clientDB.AddTable("test_e", Db.TestE); - clientDB.AddTable("test_f", Db.TestF); - } - - protected override Reducer ToReducer(TransactionUpdate update) - { - var encodedArgs = update.ReducerCall.Args; - return update.ReducerCall.ReducerName switch { - "add_player" => BSATNHelpers.Decode(encodedArgs), - "add_private" => BSATNHelpers.Decode(encodedArgs), - "assert_caller_identity_is_module_identity" => BSATNHelpers.Decode(encodedArgs), - "delete_player" => BSATNHelpers.Decode(encodedArgs), - "delete_players_by_name" => BSATNHelpers.Decode(encodedArgs), - "query_private" => BSATNHelpers.Decode(encodedArgs), - "repeating_test" => BSATNHelpers.Decode(encodedArgs), - "test" => BSATNHelpers.Decode(encodedArgs), - "test_btree_index_args" => BSATNHelpers.Decode(encodedArgs), - "" => new Reducer.StdbNone(), - "__identity_connected__" => new Reducer.StdbIdentityConnected(), - "__identity_disconnected__" => new Reducer.StdbIdentityDisconnected(), - "" => new Reducer.StdbNone(), - var reducer => throw new ArgumentOutOfRangeException("Reducer", $"Unknown reducer {reducer}") - }; - } - - protected override IEventContext ToEventContext(Event reducerEvent) => - new EventContext(this, reducerEvent); - - protected override bool Dispatch(IEventContext context, Reducer reducer) - { - var eventContext = (EventContext)context; - return reducer switch { - Reducer.AddPlayer args => Reducers.InvokeAddPlayer(eventContext, args), - Reducer.AddPrivate args => Reducers.InvokeAddPrivate(eventContext, args), - Reducer.AssertCallerIdentityIsModuleIdentity args => Reducers.InvokeAssertCallerIdentityIsModuleIdentity(eventContext, args), - Reducer.DeletePlayer args => Reducers.InvokeDeletePlayer(eventContext, args), - Reducer.DeletePlayersByName args => Reducers.InvokeDeletePlayersByName(eventContext, args), - Reducer.QueryPrivate args => Reducers.InvokeQueryPrivate(eventContext, args), - Reducer.RepeatingTest args => Reducers.InvokeRepeatingTest(eventContext, args), - Reducer.Test args => Reducers.InvokeTest(eventContext, args), - Reducer.TestBtreeIndexArgs args => Reducers.InvokeTestBtreeIndexArgs(eventContext, args), - Reducer.StdbNone or - Reducer.StdbIdentityConnected or - Reducer.StdbIdentityDisconnected => true, - _ => throw new ArgumentOutOfRangeException("Reducer", $"Unknown reducer {reducer}") - }; - } - - public SubscriptionBuilder SubscriptionBuilder() => new(this); - } +namespace SpacetimeDB +{ + [SpacetimeDB.Type] + [DataContract] + public sealed partial class Private + { + [DataMember(Name = "name")] + public string Name; + + public Private(string Name) + { + this.Name = Name; + } + + public Private() + { + this.Name = ""; + } + } +} +''' +"Types/RepeatingTestArg.g.cs" = ''' +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#nullable enable + +using System; +using System.Collections.Generic; +using System.Runtime.Serialization; + +namespace SpacetimeDB +{ + [SpacetimeDB.Type] + [DataContract] + public sealed partial class RepeatingTestArg + { + [DataMember(Name = "scheduled_id")] + public ulong ScheduledId; + [DataMember(Name = "scheduled_at")] + public SpacetimeDB.ScheduleAt ScheduledAt; + [DataMember(Name = "prev_time")] + public ulong PrevTime; + + public RepeatingTestArg( + ulong ScheduledId, + SpacetimeDB.ScheduleAt ScheduledAt, + ulong PrevTime + ) + { + this.ScheduledId = ScheduledId; + this.ScheduledAt = ScheduledAt; + this.PrevTime = PrevTime; + } + + public RepeatingTestArg() + { + this.ScheduledAt = null!; + } + } +} +''' +"Types/TestA.g.cs" = ''' +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#nullable enable + +using System; +using System.Collections.Generic; +using System.Runtime.Serialization; + +namespace SpacetimeDB +{ + [SpacetimeDB.Type] + [DataContract] + public sealed partial class TestA + { + [DataMember(Name = "x")] + public uint X; + [DataMember(Name = "y")] + public uint Y; + [DataMember(Name = "z")] + public string Z; + + public TestA( + uint X, + uint Y, + string Z + ) + { + this.X = X; + this.Y = Y; + this.Z = Z; + } + + public TestA() + { + this.Z = ""; + } + } +} +''' +"Types/TestB.g.cs" = ''' +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#nullable enable + +using System; +using System.Collections.Generic; +using System.Runtime.Serialization; + +namespace SpacetimeDB +{ + [SpacetimeDB.Type] + [DataContract] + public sealed partial class TestB + { + [DataMember(Name = "foo")] + public string Foo; + + public TestB(string Foo) + { + this.Foo = Foo; + } + + public TestB() + { + this.Foo = ""; + } + } +} +''' +"Types/TestD.g.cs" = ''' +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#nullable enable + +using System; +using System.Collections.Generic; +using System.Runtime.Serialization; + +namespace SpacetimeDB +{ + [SpacetimeDB.Type] + [DataContract] + public sealed partial class TestD + { + [DataMember(Name = "test_c")] + public NamespaceTestC? TestC; + + public TestD(NamespaceTestC? TestC) + { + this.TestC = TestC; + } + + public TestD() + { + } + } +} +''' +"Types/TestE.g.cs" = ''' +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#nullable enable + +using System; +using System.Collections.Generic; +using System.Runtime.Serialization; + +namespace SpacetimeDB +{ + [SpacetimeDB.Type] + [DataContract] + public sealed partial class TestE + { + [DataMember(Name = "id")] + public ulong Id; + [DataMember(Name = "name")] + public string Name; + + public TestE( + ulong Id, + string Name + ) + { + this.Id = Id; + this.Name = Name; + } + + public TestE() + { + this.Name = ""; + } + } +} +''' +"Types/TestFoobar.g.cs" = ''' +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#nullable enable + +using System; +using System.Collections.Generic; +using System.Runtime.Serialization; + +namespace SpacetimeDB +{ + [SpacetimeDB.Type] + [DataContract] + public sealed partial class TestFoobar + { + [DataMember(Name = "field")] + public Foobar Field; + + public TestFoobar(Foobar Field) + { + this.Field = Field; + } + + public TestFoobar() + { + this.Field = null!; + } + } } ''' diff --git a/crates/cli/tests/snapshots/codegen__codegen_rust.snap b/crates/cli/tests/snapshots/codegen__codegen_rust.snap index fb9309449ce..52260a6b069 100644 --- a/crates/cli/tests/snapshots/codegen__codegen_rust.snap +++ b/crates/cli/tests/snapshots/codegen__codegen_rust.snap @@ -1,10 +1,11 @@ --- source: crates/cli/tests/codegen.rs expression: outfiles +snapshot_kind: text --- "add_player_reducer.rs" = ''' // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ @@ -19,13 +20,13 @@ use spacetimedb_sdk::__codegen::{ #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] pub(super) struct AddPlayerArgs { - pub name: String, + pub name: String, } impl From for super::Reducer { - fn from(args: AddPlayerArgs) -> Self { - Self::AddPlayer { - name: args.name, + fn from(args: AddPlayerArgs) -> Self { + Self::AddPlayer { + name: args.name, } } } @@ -117,7 +118,7 @@ impl set_flags_for_add_player for super::SetReducerFlags { ''' "add_private_reducer.rs" = ''' // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ @@ -132,13 +133,13 @@ use spacetimedb_sdk::__codegen::{ #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] pub(super) struct AddPrivateArgs { - pub name: String, + pub name: String, } impl From for super::Reducer { - fn from(args: AddPrivateArgs) -> Self { - Self::AddPrivate { - name: args.name, + fn from(args: AddPrivateArgs) -> Self { + Self::AddPrivate { + name: args.name, } } } @@ -230,7 +231,7 @@ impl set_flags_for_add_private for super::SetReducerFlags { ''' "assert_caller_identity_is_module_identity_reducer.rs" = ''' // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ @@ -245,11 +246,11 @@ use spacetimedb_sdk::__codegen::{ #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] pub(super) struct AssertCallerIdentityIsModuleIdentityArgs { - } + } impl From for super::Reducer { - fn from(args: AssertCallerIdentityIsModuleIdentityArgs) -> Self { - Self::AssertCallerIdentityIsModuleIdentity + fn from(args: AssertCallerIdentityIsModuleIdentityArgs) -> Self { + Self::AssertCallerIdentityIsModuleIdentity } } @@ -338,7 +339,7 @@ impl set_flags_for_assert_caller_identity_is_module_identity for super::SetReduc ''' "baz_type.rs" = ''' // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ @@ -353,7 +354,7 @@ use spacetimedb_sdk::__codegen::{ #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] pub struct Baz { - pub field: String, + pub field: String, } @@ -361,10 +362,118 @@ impl __sdk::InModule for Baz { type Module = super::RemoteModule; } +''' +"client_connected_reducer.rs" = ''' +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{ + self as __sdk, + anyhow::{self as __anyhow, Context as _}, + __lib, + __sats, + __ws, +}; + + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct ClientConnectedArgs { + } + +impl From for super::Reducer { + fn from(args: ClientConnectedArgs) -> Self { + Self::ClientConnected +} +} + +impl __sdk::InModule for ClientConnectedArgs { + type Module = super::RemoteModule; +} + +pub struct ClientConnectedCallbackId(__sdk::CallbackId); + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `client_connected`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait client_connected { + /// Request that the remote module invoke the reducer `client_connected` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed by listening for [`Self::on_client_connected`] callbacks. + fn client_connected(&self, ) -> __anyhow::Result<()>; + /// Register a callback to run whenever we are notified of an invocation of the reducer `client_connected`. + /// + /// The [`super::EventContext`] passed to the `callback` + /// will always have [`__sdk::Event::Reducer`] as its `event`, + /// but it may or may not have terminated successfully and been committed. + /// Callbacks should inspect the [`__sdk::ReducerEvent`] contained in the [`super::EventContext`] + /// to determine the reducer's status. + /// + /// The returned [`ClientConnectedCallbackId`] can be passed to [`Self::remove_on_client_connected`] + /// to cancel the callback. + fn on_client_connected(&self, callback: impl FnMut(&super::EventContext, ) + Send + 'static) -> ClientConnectedCallbackId; + /// Cancel a callback previously registered by [`Self::on_client_connected`], + /// causing it not to run in the future. + fn remove_on_client_connected(&self, callback: ClientConnectedCallbackId); +} + +impl client_connected for super::RemoteReducers { + fn client_connected(&self, ) -> __anyhow::Result<()> { + self.imp.call_reducer("client_connected", ClientConnectedArgs { }) + } + fn on_client_connected( + &self, + mut callback: impl FnMut(&super::EventContext, ) + Send + 'static, + ) -> ClientConnectedCallbackId { + ClientConnectedCallbackId(self.imp.on_reducer( + "client_connected", + Box::new(move |ctx: &super::EventContext| { + let super::EventContext { + event: __sdk::Event::Reducer(__sdk::ReducerEvent { + reducer: super::Reducer::ClientConnected { + + }, + .. + }), + .. + } = ctx else { unreachable!() }; + callback(ctx, ) + }), + )) + } + fn remove_on_client_connected(&self, callback: ClientConnectedCallbackId) { + self.imp.remove_on_reducer("client_connected", callback.0) + } +} + +#[allow(non_camel_case_types)] +#[doc(hidden)] +/// Extension trait for setting the call-flags for the reducer `client_connected`. +/// +/// Implemented for [`super::SetReducerFlags`]. +/// +/// This type is currently unstable and may be removed without a major version bump. +pub trait set_flags_for_client_connected { + /// Set the call-reducer flags for the reducer `client_connected` to `flags`. + /// + /// This type is currently unstable and may be removed without a major version bump. + fn client_connected(&self, flags: __ws::CallReducerFlags); +} + +impl set_flags_for_client_connected for super::SetReducerFlags { + fn client_connected(&self, flags: __ws::CallReducerFlags) { + self.imp.set_call_reducer_flags("client_connected", flags); + } +} + ''' "delete_player_reducer.rs" = ''' // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ @@ -379,13 +488,13 @@ use spacetimedb_sdk::__codegen::{ #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] pub(super) struct DeletePlayerArgs { - pub id: u64, + pub id: u64, } impl From for super::Reducer { - fn from(args: DeletePlayerArgs) -> Self { - Self::DeletePlayer { - id: args.id, + fn from(args: DeletePlayerArgs) -> Self { + Self::DeletePlayer { + id: args.id, } } } @@ -477,7 +586,7 @@ impl set_flags_for_delete_player for super::SetReducerFlags { ''' "delete_players_by_name_reducer.rs" = ''' // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ @@ -492,13 +601,13 @@ use spacetimedb_sdk::__codegen::{ #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] pub(super) struct DeletePlayersByNameArgs { - pub name: String, + pub name: String, } impl From for super::Reducer { - fn from(args: DeletePlayersByNameArgs) -> Self { - Self::DeletePlayersByName { - name: args.name, + fn from(args: DeletePlayersByNameArgs) -> Self { + Self::DeletePlayersByName { + name: args.name, } } } @@ -590,7 +699,7 @@ impl set_flags_for_delete_players_by_name for super::SetReducerFlags { ''' "foobar_type.rs" = ''' // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ @@ -606,11 +715,11 @@ use super::baz_type::Baz; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] pub enum Foobar { - Baz(Baz), + Baz(Baz), - Bar, + Bar, - Har(u32), + Har(u32), } @@ -623,7 +732,7 @@ impl __sdk::InModule for Foobar { ''' "has_special_stuff_table.rs" = ''' // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ @@ -707,7 +816,7 @@ impl<'ctx> __sdk::Table for HasSpecialStuffTableHandle<'ctx> { #[doc(hidden)] pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { - let _table = client_cache.get_or_make_table::("has_special_stuff"); + let _table = client_cache.get_or_make_table::("has_special_stuff"); } #[doc(hidden)] pub(super) fn parse_table_update( @@ -719,7 +828,7 @@ pub(super) fn parse_table_update( ''' "has_special_stuff_type.rs" = ''' // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ @@ -734,8 +843,8 @@ use spacetimedb_sdk::__codegen::{ #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] pub struct HasSpecialStuff { - pub identity: __sdk::Identity, - pub address: __sdk::Address, + pub identity: __sdk::Identity, + pub address: __sdk::Address, } @@ -743,118 +852,10 @@ impl __sdk::InModule for HasSpecialStuff { type Module = super::RemoteModule; } -''' -"init_reducer.rs" = ''' -// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. - -#![allow(unused, clippy::all)] -use spacetimedb_sdk::__codegen::{ - self as __sdk, - anyhow::{self as __anyhow, Context as _}, - __lib, - __sats, - __ws, -}; - - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub(super) struct InitArgs { - } - -impl From for super::Reducer { - fn from(args: InitArgs) -> Self { - Self::Init -} -} - -impl __sdk::InModule for InitArgs { - type Module = super::RemoteModule; -} - -pub struct InitCallbackId(__sdk::CallbackId); - -#[allow(non_camel_case_types)] -/// Extension trait for access to the reducer `init`. -/// -/// Implemented for [`super::RemoteReducers`]. -pub trait init { - /// Request that the remote module invoke the reducer `init` to run as soon as possible. - /// - /// This method returns immediately, and errors only if we are unable to send the request. - /// The reducer will run asynchronously in the future, - /// and its status can be observed by listening for [`Self::on_init`] callbacks. - fn init(&self, ) -> __anyhow::Result<()>; - /// Register a callback to run whenever we are notified of an invocation of the reducer `init`. - /// - /// The [`super::EventContext`] passed to the `callback` - /// will always have [`__sdk::Event::Reducer`] as its `event`, - /// but it may or may not have terminated successfully and been committed. - /// Callbacks should inspect the [`__sdk::ReducerEvent`] contained in the [`super::EventContext`] - /// to determine the reducer's status. - /// - /// The returned [`InitCallbackId`] can be passed to [`Self::remove_on_init`] - /// to cancel the callback. - fn on_init(&self, callback: impl FnMut(&super::EventContext, ) + Send + 'static) -> InitCallbackId; - /// Cancel a callback previously registered by [`Self::on_init`], - /// causing it not to run in the future. - fn remove_on_init(&self, callback: InitCallbackId); -} - -impl init for super::RemoteReducers { - fn init(&self, ) -> __anyhow::Result<()> { - self.imp.call_reducer("init", InitArgs { }) - } - fn on_init( - &self, - mut callback: impl FnMut(&super::EventContext, ) + Send + 'static, - ) -> InitCallbackId { - InitCallbackId(self.imp.on_reducer( - "init", - Box::new(move |ctx: &super::EventContext| { - let super::EventContext { - event: __sdk::Event::Reducer(__sdk::ReducerEvent { - reducer: super::Reducer::Init { - - }, - .. - }), - .. - } = ctx else { unreachable!() }; - callback(ctx, ) - }), - )) - } - fn remove_on_init(&self, callback: InitCallbackId) { - self.imp.remove_on_reducer("init", callback.0) - } -} - -#[allow(non_camel_case_types)] -#[doc(hidden)] -/// Extension trait for setting the call-flags for the reducer `init`. -/// -/// Implemented for [`super::SetReducerFlags`]. -/// -/// This type is currently unstable and may be removed without a major version bump. -pub trait set_flags_for_init { - /// Set the call-reducer flags for the reducer `init` to `flags`. - /// - /// This type is currently unstable and may be removed without a major version bump. - fn init(&self, flags: __ws::CallReducerFlags); -} - -impl set_flags_for_init for super::SetReducerFlags { - fn init(&self, flags: __ws::CallReducerFlags) { - self.imp.set_call_reducer_flags("init", flags); - } -} - ''' "logged_out_player_table.rs" = ''' // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ @@ -938,9 +939,9 @@ impl<'ctx> __sdk::Table for LoggedOutPlayerTableHandle<'ctx> { #[doc(hidden)] pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { - let _table = client_cache.get_or_make_table::("logged_out_player"); - _table.add_unique_constraint::<__sdk::Identity>("identity", |row| &row.identity); - _table.add_unique_constraint::("player_id", |row| &row.player_id); + let _table = client_cache.get_or_make_table::("logged_out_player"); + _table.add_unique_constraint::<__sdk::Identity>("identity", |row| &row.identity); + _table.add_unique_constraint::("player_id", |row| &row.player_id); } pub struct LoggedOutPlayerUpdateCallbackId(__sdk::CallbackId); @@ -1031,7 +1032,7 @@ pub(super) fn parse_table_update( ''' "mod.rs" = ''' // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ @@ -1045,8 +1046,6 @@ use spacetimedb_sdk::__codegen::{ pub mod baz_type; pub mod foobar_type; pub mod has_special_stuff_type; -pub mod namespace_test_c_type; -pub mod namespace_test_f_type; pub mod pk_multi_identity_type; pub mod player_type; pub mod point_type; @@ -1057,17 +1056,18 @@ pub mod test_b_type; pub mod test_d_type; pub mod test_e_type; pub mod test_foobar_type; +pub mod namespace_test_c_type; +pub mod namespace_test_f_type; pub mod add_player_reducer; pub mod add_private_reducer; pub mod assert_caller_identity_is_module_identity_reducer; +pub mod client_connected_reducer; pub mod delete_player_reducer; pub mod delete_players_by_name_reducer; -pub mod init_reducer; -pub mod on_connect_reducer; pub mod query_private_reducer; pub mod repeating_test_reducer; -pub mod test_btree_index_args_reducer; pub mod test_reducer; +pub mod test_btree_index_args_reducer; pub mod has_special_stuff_table; pub mod logged_out_player_table; pub mod pk_multi_identity_table; @@ -1109,10 +1109,9 @@ pub use test_f_table::*; pub use add_player_reducer::{add_player, set_flags_for_add_player, AddPlayerCallbackId}; pub use add_private_reducer::{add_private, set_flags_for_add_private, AddPrivateCallbackId}; pub use assert_caller_identity_is_module_identity_reducer::{assert_caller_identity_is_module_identity, set_flags_for_assert_caller_identity_is_module_identity, AssertCallerIdentityIsModuleIdentityCallbackId}; +pub use client_connected_reducer::{client_connected, set_flags_for_client_connected, ClientConnectedCallbackId}; pub use delete_player_reducer::{delete_player, set_flags_for_delete_player, DeletePlayerCallbackId}; pub use delete_players_by_name_reducer::{delete_players_by_name, set_flags_for_delete_players_by_name, DeletePlayersByNameCallbackId}; -pub use init_reducer::{init, set_flags_for_init, InitCallbackId}; -pub use on_connect_reducer::{on_connect, set_flags_for_on_connect, OnConnectCallbackId}; pub use query_private_reducer::{query_private, set_flags_for_query_private, QueryPrivateCallbackId}; pub use repeating_test_reducer::{repeating_test, set_flags_for_repeating_test, RepeatingTestCallbackId}; pub use test_reducer::{test, set_flags_for_test, TestCallbackId}; @@ -1126,32 +1125,31 @@ pub use test_btree_index_args_reducer::{test_btree_index_args, set_flags_for_tes /// to indicate which reducer caused the event. pub enum Reducer { - AddPlayer { - name: String, -} , - AddPrivate { - name: String, -} , - AssertCallerIdentityIsModuleIdentity , - DeletePlayer { - id: u64, -} , - DeletePlayersByName { - name: String, -} , - Init , - OnConnect , - QueryPrivate , - RepeatingTest { - arg: RepeatingTestArg, -} , - Test { - arg: TestA, - arg_2: TestB, - arg_3: NamespaceTestC, - arg_4: NamespaceTestF, -} , - TestBtreeIndexArgs , + AddPlayer { + name: String, +} , + AddPrivate { + name: String, +} , + AssertCallerIdentityIsModuleIdentity , + ClientConnected , + DeletePlayer { + id: u64, +} , + DeletePlayersByName { + name: String, +} , + QueryPrivate , + RepeatingTest { + arg: RepeatingTestArg, +} , + Test { + arg: TestA, + arg_2: TestB, + arg_3: NamespaceTestC, + arg_4: NamespaceTestF, +} , + TestBtreeIndexArgs , } @@ -1160,38 +1158,36 @@ impl __sdk::InModule for Reducer { } impl __sdk::Reducer for Reducer { - fn reducer_name(&self) -> &'static str { - match self { - Reducer::AddPlayer { .. } => "add_player", - Reducer::AddPrivate { .. } => "add_private", - Reducer::AssertCallerIdentityIsModuleIdentity => "assert_caller_identity_is_module_identity", - Reducer::DeletePlayer { .. } => "delete_player", - Reducer::DeletePlayersByName { .. } => "delete_players_by_name", - Reducer::Init => "init", - Reducer::OnConnect => "on_connect", - Reducer::QueryPrivate => "query_private", - Reducer::RepeatingTest { .. } => "repeating_test", - Reducer::Test { .. } => "test", - Reducer::TestBtreeIndexArgs => "test_btree_index_args", + fn reducer_name(&self) -> &'static str { + match self { + Reducer::AddPlayer { .. } => "add_player", + Reducer::AddPrivate { .. } => "add_private", + Reducer::AssertCallerIdentityIsModuleIdentity => "assert_caller_identity_is_module_identity", + Reducer::ClientConnected => "client_connected", + Reducer::DeletePlayer { .. } => "delete_player", + Reducer::DeletePlayersByName { .. } => "delete_players_by_name", + Reducer::QueryPrivate => "query_private", + Reducer::RepeatingTest { .. } => "repeating_test", + Reducer::Test { .. } => "test", + Reducer::TestBtreeIndexArgs => "test_btree_index_args", } } } impl TryFrom<__ws::ReducerCallInfo<__ws::BsatnFormat>> for Reducer { - type Error = __anyhow::Error; + type Error = __anyhow::Error; fn try_from(value: __ws::ReducerCallInfo<__ws::BsatnFormat>) -> __anyhow::Result { - match &value.reducer_name[..] { - "add_player" => Ok(__sdk::parse_reducer_args::("add_player", &value.args)?.into()), - "add_private" => Ok(__sdk::parse_reducer_args::("add_private", &value.args)?.into()), - "assert_caller_identity_is_module_identity" => Ok(__sdk::parse_reducer_args::("assert_caller_identity_is_module_identity", &value.args)?.into()), - "delete_player" => Ok(__sdk::parse_reducer_args::("delete_player", &value.args)?.into()), - "delete_players_by_name" => Ok(__sdk::parse_reducer_args::("delete_players_by_name", &value.args)?.into()), - "init" => Ok(__sdk::parse_reducer_args::("init", &value.args)?.into()), - "on_connect" => Ok(__sdk::parse_reducer_args::("on_connect", &value.args)?.into()), - "query_private" => Ok(__sdk::parse_reducer_args::("query_private", &value.args)?.into()), - "repeating_test" => Ok(__sdk::parse_reducer_args::("repeating_test", &value.args)?.into()), - "test" => Ok(__sdk::parse_reducer_args::("test", &value.args)?.into()), - "test_btree_index_args" => Ok(__sdk::parse_reducer_args::("test_btree_index_args", &value.args)?.into()), - _ => Err(__anyhow::anyhow!("Unknown reducer {:?}", value.reducer_name)), + match &value.reducer_name[..] { + "add_player" => Ok(__sdk::parse_reducer_args::("add_player", &value.args)?.into()), + "add_private" => Ok(__sdk::parse_reducer_args::("add_private", &value.args)?.into()), + "assert_caller_identity_is_module_identity" => Ok(__sdk::parse_reducer_args::("assert_caller_identity_is_module_identity", &value.args)?.into()), + "client_connected" => Ok(__sdk::parse_reducer_args::("client_connected", &value.args)?.into()), + "delete_player" => Ok(__sdk::parse_reducer_args::("delete_player", &value.args)?.into()), + "delete_players_by_name" => Ok(__sdk::parse_reducer_args::("delete_players_by_name", &value.args)?.into()), + "query_private" => Ok(__sdk::parse_reducer_args::("query_private", &value.args)?.into()), + "repeating_test" => Ok(__sdk::parse_reducer_args::("repeating_test", &value.args)?.into()), + "test" => Ok(__sdk::parse_reducer_args::("test", &value.args)?.into()), + "test_btree_index_args" => Ok(__sdk::parse_reducer_args::("test_btree_index_args", &value.args)?.into()), + _ => Err(__anyhow::anyhow!("Unknown reducer {:?}", value.reducer_name)), } } } @@ -1200,17 +1196,17 @@ fn try_from(value: __ws::ReducerCallInfo<__ws::BsatnFormat>) -> __anyhow::Result #[allow(non_snake_case)] #[doc(hidden)] pub struct DbUpdate { - has_special_stuff: __sdk::TableUpdate, - logged_out_player: __sdk::TableUpdate, - pk_multi_identity: __sdk::TableUpdate, - player: __sdk::TableUpdate, - points: __sdk::TableUpdate, - private: __sdk::TableUpdate, - repeating_test_arg: __sdk::TableUpdate, - test_a: __sdk::TableUpdate, - test_d: __sdk::TableUpdate, - test_e: __sdk::TableUpdate, - test_f: __sdk::TableUpdate, + has_special_stuff: __sdk::TableUpdate, + logged_out_player: __sdk::TableUpdate, + pk_multi_identity: __sdk::TableUpdate, + player: __sdk::TableUpdate, + points: __sdk::TableUpdate, + private: __sdk::TableUpdate, + repeating_test_arg: __sdk::TableUpdate, + test_a: __sdk::TableUpdate, + test_d: __sdk::TableUpdate, + test_e: __sdk::TableUpdate, + test_f: __sdk::TableUpdate, } @@ -1221,17 +1217,17 @@ impl TryFrom<__ws::DatabaseUpdate<__ws::BsatnFormat>> for DbUpdate { for table_update in raw.tables { match &table_update.table_name[..] { - "has_special_stuff" => db_update.has_special_stuff = has_special_stuff_table::parse_table_update(table_update)?, - "logged_out_player" => db_update.logged_out_player = logged_out_player_table::parse_table_update(table_update)?, - "pk_multi_identity" => db_update.pk_multi_identity = pk_multi_identity_table::parse_table_update(table_update)?, - "player" => db_update.player = player_table::parse_table_update(table_update)?, - "points" => db_update.points = points_table::parse_table_update(table_update)?, - "private" => db_update.private = private_table::parse_table_update(table_update)?, - "repeating_test_arg" => db_update.repeating_test_arg = repeating_test_arg_table::parse_table_update(table_update)?, - "test_a" => db_update.test_a = test_a_table::parse_table_update(table_update)?, - "test_d" => db_update.test_d = test_d_table::parse_table_update(table_update)?, - "test_e" => db_update.test_e = test_e_table::parse_table_update(table_update)?, - "test_f" => db_update.test_f = test_f_table::parse_table_update(table_update)?, + "has_special_stuff" => db_update.has_special_stuff = has_special_stuff_table::parse_table_update(table_update)?, + "logged_out_player" => db_update.logged_out_player = logged_out_player_table::parse_table_update(table_update)?, + "pk_multi_identity" => db_update.pk_multi_identity = pk_multi_identity_table::parse_table_update(table_update)?, + "player" => db_update.player = player_table::parse_table_update(table_update)?, + "points" => db_update.points = points_table::parse_table_update(table_update)?, + "private" => db_update.private = private_table::parse_table_update(table_update)?, + "repeating_test_arg" => db_update.repeating_test_arg = repeating_test_arg_table::parse_table_update(table_update)?, + "test_a" => db_update.test_a = test_a_table::parse_table_update(table_update)?, + "test_d" => db_update.test_d = test_d_table::parse_table_update(table_update)?, + "test_e" => db_update.test_e = test_e_table::parse_table_update(table_update)?, + "test_f" => db_update.test_f = test_f_table::parse_table_update(table_update)?, unknown => __anyhow::bail!("Unknown table {unknown:?} in DatabaseUpdate"), } @@ -1245,31 +1241,31 @@ impl __sdk::InModule for DbUpdate { } impl __sdk::DbUpdate for DbUpdate { - fn apply_to_client_cache(&self, cache: &mut __sdk::ClientCache) { - cache.apply_diff_to_table::("has_special_stuff", &self.has_special_stuff); - cache.apply_diff_to_table::("logged_out_player", &self.logged_out_player); - cache.apply_diff_to_table::("pk_multi_identity", &self.pk_multi_identity); - cache.apply_diff_to_table::("player", &self.player); - cache.apply_diff_to_table::("points", &self.points); - cache.apply_diff_to_table::("private", &self.private); - cache.apply_diff_to_table::("repeating_test_arg", &self.repeating_test_arg); - cache.apply_diff_to_table::("test_a", &self.test_a); - cache.apply_diff_to_table::("test_d", &self.test_d); - cache.apply_diff_to_table::("test_e", &self.test_e); - cache.apply_diff_to_table::("test_f", &self.test_f); + fn apply_to_client_cache(&self, cache: &mut __sdk::ClientCache) { + cache.apply_diff_to_table::("has_special_stuff", &self.has_special_stuff); + cache.apply_diff_to_table::("logged_out_player", &self.logged_out_player); + cache.apply_diff_to_table::("pk_multi_identity", &self.pk_multi_identity); + cache.apply_diff_to_table::("player", &self.player); + cache.apply_diff_to_table::("points", &self.points); + cache.apply_diff_to_table::("private", &self.private); + cache.apply_diff_to_table::("repeating_test_arg", &self.repeating_test_arg); + cache.apply_diff_to_table::("test_a", &self.test_a); + cache.apply_diff_to_table::("test_d", &self.test_d); + cache.apply_diff_to_table::("test_e", &self.test_e); + cache.apply_diff_to_table::("test_f", &self.test_f); } fn invoke_row_callbacks(&self, event: &EventContext, callbacks: &mut __sdk::DbCallbacks) { - callbacks.invoke_table_row_callbacks::("has_special_stuff", &self.has_special_stuff, event); - callbacks.invoke_table_row_callbacks::("logged_out_player", &self.logged_out_player, event); - callbacks.invoke_table_row_callbacks::("pk_multi_identity", &self.pk_multi_identity, event); - callbacks.invoke_table_row_callbacks::("player", &self.player, event); - callbacks.invoke_table_row_callbacks::("points", &self.points, event); - callbacks.invoke_table_row_callbacks::("private", &self.private, event); - callbacks.invoke_table_row_callbacks::("repeating_test_arg", &self.repeating_test_arg, event); - callbacks.invoke_table_row_callbacks::("test_a", &self.test_a, event); - callbacks.invoke_table_row_callbacks::("test_d", &self.test_d, event); - callbacks.invoke_table_row_callbacks::("test_e", &self.test_e, event); - callbacks.invoke_table_row_callbacks::("test_f", &self.test_f, event); + callbacks.invoke_table_row_callbacks::("has_special_stuff", &self.has_special_stuff, event); + callbacks.invoke_table_row_callbacks::("logged_out_player", &self.logged_out_player, event); + callbacks.invoke_table_row_callbacks::("pk_multi_identity", &self.pk_multi_identity, event); + callbacks.invoke_table_row_callbacks::("player", &self.player, event); + callbacks.invoke_table_row_callbacks::("points", &self.points, event); + callbacks.invoke_table_row_callbacks::("private", &self.private, event); + callbacks.invoke_table_row_callbacks::("repeating_test_arg", &self.repeating_test_arg, event); + callbacks.invoke_table_row_callbacks::("test_a", &self.test_a, event); + callbacks.invoke_table_row_callbacks::("test_d", &self.test_d, event); + callbacks.invoke_table_row_callbacks::("test_e", &self.test_e, event); + callbacks.invoke_table_row_callbacks::("test_f", &self.test_f, event); } } @@ -1578,34 +1574,34 @@ impl) { - has_special_stuff_table::register_table(client_cache); - logged_out_player_table::register_table(client_cache); - pk_multi_identity_table::register_table(client_cache); - player_table::register_table(client_cache); - points_table::register_table(client_cache); - private_table::register_table(client_cache); - repeating_test_arg_table::register_table(client_cache); - test_a_table::register_table(client_cache); - test_d_table::register_table(client_cache); - test_e_table::register_table(client_cache); - test_f_table::register_table(client_cache); + has_special_stuff_table::register_table(client_cache); + logged_out_player_table::register_table(client_cache); + pk_multi_identity_table::register_table(client_cache); + player_table::register_table(client_cache); + points_table::register_table(client_cache); + private_table::register_table(client_cache); + repeating_test_arg_table::register_table(client_cache); + test_a_table::register_table(client_cache); + test_d_table::register_table(client_cache); + test_e_table::register_table(client_cache); + test_f_table::register_table(client_cache); } } ''' "namespace_test_c_type.rs" = ''' // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ @@ -1619,9 +1615,9 @@ use spacetimedb_sdk::__codegen::{ #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] pub enum NamespaceTestC { - Foo, + Foo, - Bar, + Bar, } @@ -1634,7 +1630,7 @@ impl __sdk::InModule for NamespaceTestC { ''' "namespace_test_f_type.rs" = ''' // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ @@ -1649,11 +1645,11 @@ use spacetimedb_sdk::__codegen::{ #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] pub enum NamespaceTestF { - Foo, + Foo, - Bar, + Bar, - Baz(String), + Baz(String), } @@ -1663,118 +1659,10 @@ impl __sdk::InModule for NamespaceTestF { type Module = super::RemoteModule; } -''' -"on_connect_reducer.rs" = ''' -// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. - -#![allow(unused, clippy::all)] -use spacetimedb_sdk::__codegen::{ - self as __sdk, - anyhow::{self as __anyhow, Context as _}, - __lib, - __sats, - __ws, -}; - - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub(super) struct OnConnectArgs { - } - -impl From for super::Reducer { - fn from(args: OnConnectArgs) -> Self { - Self::OnConnect -} -} - -impl __sdk::InModule for OnConnectArgs { - type Module = super::RemoteModule; -} - -pub struct OnConnectCallbackId(__sdk::CallbackId); - -#[allow(non_camel_case_types)] -/// Extension trait for access to the reducer `on_connect`. -/// -/// Implemented for [`super::RemoteReducers`]. -pub trait on_connect { - /// Request that the remote module invoke the reducer `on_connect` to run as soon as possible. - /// - /// This method returns immediately, and errors only if we are unable to send the request. - /// The reducer will run asynchronously in the future, - /// and its status can be observed by listening for [`Self::on_on_connect`] callbacks. - fn on_connect(&self, ) -> __anyhow::Result<()>; - /// Register a callback to run whenever we are notified of an invocation of the reducer `on_connect`. - /// - /// The [`super::EventContext`] passed to the `callback` - /// will always have [`__sdk::Event::Reducer`] as its `event`, - /// but it may or may not have terminated successfully and been committed. - /// Callbacks should inspect the [`__sdk::ReducerEvent`] contained in the [`super::EventContext`] - /// to determine the reducer's status. - /// - /// The returned [`OnConnectCallbackId`] can be passed to [`Self::remove_on_on_connect`] - /// to cancel the callback. - fn on_on_connect(&self, callback: impl FnMut(&super::EventContext, ) + Send + 'static) -> OnConnectCallbackId; - /// Cancel a callback previously registered by [`Self::on_on_connect`], - /// causing it not to run in the future. - fn remove_on_on_connect(&self, callback: OnConnectCallbackId); -} - -impl on_connect for super::RemoteReducers { - fn on_connect(&self, ) -> __anyhow::Result<()> { - self.imp.call_reducer("on_connect", OnConnectArgs { }) - } - fn on_on_connect( - &self, - mut callback: impl FnMut(&super::EventContext, ) + Send + 'static, - ) -> OnConnectCallbackId { - OnConnectCallbackId(self.imp.on_reducer( - "on_connect", - Box::new(move |ctx: &super::EventContext| { - let super::EventContext { - event: __sdk::Event::Reducer(__sdk::ReducerEvent { - reducer: super::Reducer::OnConnect { - - }, - .. - }), - .. - } = ctx else { unreachable!() }; - callback(ctx, ) - }), - )) - } - fn remove_on_on_connect(&self, callback: OnConnectCallbackId) { - self.imp.remove_on_reducer("on_connect", callback.0) - } -} - -#[allow(non_camel_case_types)] -#[doc(hidden)] -/// Extension trait for setting the call-flags for the reducer `on_connect`. -/// -/// Implemented for [`super::SetReducerFlags`]. -/// -/// This type is currently unstable and may be removed without a major version bump. -pub trait set_flags_for_on_connect { - /// Set the call-reducer flags for the reducer `on_connect` to `flags`. - /// - /// This type is currently unstable and may be removed without a major version bump. - fn on_connect(&self, flags: __ws::CallReducerFlags); -} - -impl set_flags_for_on_connect for super::SetReducerFlags { - fn on_connect(&self, flags: __ws::CallReducerFlags) { - self.imp.set_call_reducer_flags("on_connect", flags); - } -} - ''' "pk_multi_identity_table.rs" = ''' // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ @@ -1858,9 +1746,9 @@ impl<'ctx> __sdk::Table for PkMultiIdentityTableHandle<'ctx> { #[doc(hidden)] pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { - let _table = client_cache.get_or_make_table::("pk_multi_identity"); - _table.add_unique_constraint::("id", |row| &row.id); - _table.add_unique_constraint::("other", |row| &row.other); + let _table = client_cache.get_or_make_table::("pk_multi_identity"); + _table.add_unique_constraint::("id", |row| &row.id); + _table.add_unique_constraint::("other", |row| &row.other); } pub struct PkMultiIdentityUpdateCallbackId(__sdk::CallbackId); @@ -1951,7 +1839,7 @@ pub(super) fn parse_table_update( ''' "pk_multi_identity_type.rs" = ''' // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ @@ -1966,8 +1854,8 @@ use spacetimedb_sdk::__codegen::{ #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] pub struct PkMultiIdentity { - pub id: u32, - pub other: u32, + pub id: u32, + pub other: u32, } @@ -1978,7 +1866,7 @@ impl __sdk::InModule for PkMultiIdentity { ''' "player_table.rs" = ''' // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ @@ -2062,9 +1950,9 @@ impl<'ctx> __sdk::Table for PlayerTableHandle<'ctx> { #[doc(hidden)] pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { - let _table = client_cache.get_or_make_table::("player"); - _table.add_unique_constraint::<__sdk::Identity>("identity", |row| &row.identity); - _table.add_unique_constraint::("player_id", |row| &row.player_id); + let _table = client_cache.get_or_make_table::("player"); + _table.add_unique_constraint::<__sdk::Identity>("identity", |row| &row.identity); + _table.add_unique_constraint::("player_id", |row| &row.player_id); } pub struct PlayerUpdateCallbackId(__sdk::CallbackId); @@ -2155,7 +2043,7 @@ pub(super) fn parse_table_update( ''' "player_type.rs" = ''' // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ @@ -2170,9 +2058,9 @@ use spacetimedb_sdk::__codegen::{ #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] pub struct Player { - pub identity: __sdk::Identity, - pub player_id: u64, - pub name: String, + pub identity: __sdk::Identity, + pub player_id: u64, + pub name: String, } @@ -2183,7 +2071,7 @@ impl __sdk::InModule for Player { ''' "point_type.rs" = ''' // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ @@ -2198,8 +2086,8 @@ use spacetimedb_sdk::__codegen::{ #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] pub struct Point { - pub x: i64, - pub y: i64, + pub x: i64, + pub y: i64, } @@ -2210,7 +2098,7 @@ impl __sdk::InModule for Point { ''' "points_table.rs" = ''' // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ @@ -2294,7 +2182,7 @@ impl<'ctx> __sdk::Table for PointsTableHandle<'ctx> { #[doc(hidden)] pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { - let _table = client_cache.get_or_make_table::("points"); + let _table = client_cache.get_or_make_table::("points"); } #[doc(hidden)] pub(super) fn parse_table_update( @@ -2306,7 +2194,7 @@ pub(super) fn parse_table_update( ''' "private_table.rs" = ''' // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ @@ -2390,7 +2278,7 @@ impl<'ctx> __sdk::Table for PrivateTableHandle<'ctx> { #[doc(hidden)] pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { - let _table = client_cache.get_or_make_table::("private"); + let _table = client_cache.get_or_make_table::("private"); } #[doc(hidden)] pub(super) fn parse_table_update( @@ -2402,7 +2290,7 @@ pub(super) fn parse_table_update( ''' "private_type.rs" = ''' // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ @@ -2417,7 +2305,7 @@ use spacetimedb_sdk::__codegen::{ #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] pub struct Private { - pub name: String, + pub name: String, } @@ -2428,7 +2316,7 @@ impl __sdk::InModule for Private { ''' "query_private_reducer.rs" = ''' // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ @@ -2443,11 +2331,11 @@ use spacetimedb_sdk::__codegen::{ #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] pub(super) struct QueryPrivateArgs { - } + } impl From for super::Reducer { - fn from(args: QueryPrivateArgs) -> Self { - Self::QueryPrivate + fn from(args: QueryPrivateArgs) -> Self { + Self::QueryPrivate } } @@ -2536,7 +2424,7 @@ impl set_flags_for_query_private for super::SetReducerFlags { ''' "repeating_test_arg_table.rs" = ''' // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ @@ -2620,8 +2508,8 @@ impl<'ctx> __sdk::Table for RepeatingTestArgTableHandle<'ctx> { #[doc(hidden)] pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { - let _table = client_cache.get_or_make_table::("repeating_test_arg"); - _table.add_unique_constraint::("scheduled_id", |row| &row.scheduled_id); + let _table = client_cache.get_or_make_table::("repeating_test_arg"); + _table.add_unique_constraint::("scheduled_id", |row| &row.scheduled_id); } pub struct RepeatingTestArgUpdateCallbackId(__sdk::CallbackId); @@ -2682,7 +2570,7 @@ pub(super) fn parse_table_update( ''' "repeating_test_arg_type.rs" = ''' // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ @@ -2697,9 +2585,9 @@ use spacetimedb_sdk::__codegen::{ #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] pub struct RepeatingTestArg { - pub scheduled_id: u64, - pub scheduled_at: __sdk::ScheduleAt, - pub prev_time: u64, + pub scheduled_id: u64, + pub scheduled_at: __sdk::ScheduleAt, + pub prev_time: u64, } @@ -2710,7 +2598,7 @@ impl __sdk::InModule for RepeatingTestArg { ''' "repeating_test_reducer.rs" = ''' // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ @@ -2726,13 +2614,13 @@ use super::repeating_test_arg_type::RepeatingTestArg; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] pub(super) struct RepeatingTestArgs { - pub arg: RepeatingTestArg, + pub arg: RepeatingTestArg, } impl From for super::Reducer { - fn from(args: RepeatingTestArgs) -> Self { - Self::RepeatingTest { - arg: args.arg, + fn from(args: RepeatingTestArgs) -> Self { + Self::RepeatingTest { + arg: args.arg, } } } @@ -2824,7 +2712,7 @@ impl set_flags_for_repeating_test for super::SetReducerFlags { ''' "test_a_table.rs" = ''' // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ @@ -2908,7 +2796,7 @@ impl<'ctx> __sdk::Table for TestATableHandle<'ctx> { #[doc(hidden)] pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { - let _table = client_cache.get_or_make_table::("test_a"); + let _table = client_cache.get_or_make_table::("test_a"); } #[doc(hidden)] pub(super) fn parse_table_update( @@ -2920,7 +2808,7 @@ pub(super) fn parse_table_update( ''' "test_a_type.rs" = ''' // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ @@ -2935,9 +2823,9 @@ use spacetimedb_sdk::__codegen::{ #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] pub struct TestA { - pub x: u32, - pub y: u32, - pub z: String, + pub x: u32, + pub y: u32, + pub z: String, } @@ -2948,7 +2836,7 @@ impl __sdk::InModule for TestA { ''' "test_b_type.rs" = ''' // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ @@ -2963,7 +2851,7 @@ use spacetimedb_sdk::__codegen::{ #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] pub struct TestB { - pub foo: String, + pub foo: String, } @@ -2974,7 +2862,7 @@ impl __sdk::InModule for TestB { ''' "test_btree_index_args_reducer.rs" = ''' // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ @@ -2989,11 +2877,11 @@ use spacetimedb_sdk::__codegen::{ #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] pub(super) struct TestBtreeIndexArgsArgs { - } + } impl From for super::Reducer { - fn from(args: TestBtreeIndexArgsArgs) -> Self { - Self::TestBtreeIndexArgs + fn from(args: TestBtreeIndexArgsArgs) -> Self { + Self::TestBtreeIndexArgs } } @@ -3082,7 +2970,7 @@ impl set_flags_for_test_btree_index_args for super::SetReducerFlags { ''' "test_d_table.rs" = ''' // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ @@ -3167,7 +3055,7 @@ impl<'ctx> __sdk::Table for TestDTableHandle<'ctx> { #[doc(hidden)] pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { - let _table = client_cache.get_or_make_table::("test_d"); + let _table = client_cache.get_or_make_table::("test_d"); } #[doc(hidden)] pub(super) fn parse_table_update( @@ -3179,7 +3067,7 @@ pub(super) fn parse_table_update( ''' "test_d_type.rs" = ''' // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ @@ -3195,7 +3083,7 @@ use super::namespace_test_c_type::NamespaceTestC; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] pub struct TestD { - pub test_c: Option::, + pub test_c: Option::, } @@ -3206,7 +3094,7 @@ impl __sdk::InModule for TestD { ''' "test_e_table.rs" = ''' // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ @@ -3290,8 +3178,8 @@ impl<'ctx> __sdk::Table for TestETableHandle<'ctx> { #[doc(hidden)] pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { - let _table = client_cache.get_or_make_table::("test_e"); - _table.add_unique_constraint::("id", |row| &row.id); + let _table = client_cache.get_or_make_table::("test_e"); + _table.add_unique_constraint::("id", |row| &row.id); } pub struct TestEUpdateCallbackId(__sdk::CallbackId); @@ -3352,7 +3240,7 @@ pub(super) fn parse_table_update( ''' "test_e_type.rs" = ''' // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ @@ -3367,8 +3255,8 @@ use spacetimedb_sdk::__codegen::{ #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] pub struct TestE { - pub id: u64, - pub name: String, + pub id: u64, + pub name: String, } @@ -3379,7 +3267,7 @@ impl __sdk::InModule for TestE { ''' "test_f_table.rs" = ''' // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ @@ -3464,7 +3352,7 @@ impl<'ctx> __sdk::Table for TestFTableHandle<'ctx> { #[doc(hidden)] pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { - let _table = client_cache.get_or_make_table::("test_f"); + let _table = client_cache.get_or_make_table::("test_f"); } #[doc(hidden)] pub(super) fn parse_table_update( @@ -3476,7 +3364,7 @@ pub(super) fn parse_table_update( ''' "test_foobar_type.rs" = ''' // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ @@ -3492,7 +3380,7 @@ use super::foobar_type::Foobar; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] pub struct TestFoobar { - pub field: Foobar, + pub field: Foobar, } @@ -3503,7 +3391,7 @@ impl __sdk::InModule for TestFoobar { ''' "test_reducer.rs" = ''' // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ @@ -3522,19 +3410,19 @@ use super::namespace_test_f_type::NamespaceTestF; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] pub(super) struct TestArgs { - pub arg: TestA, - pub arg_2: TestB, - pub arg_3: NamespaceTestC, - pub arg_4: NamespaceTestF, + pub arg: TestA, + pub arg_2: TestB, + pub arg_3: NamespaceTestC, + pub arg_4: NamespaceTestF, } impl From for super::Reducer { - fn from(args: TestArgs) -> Self { - Self::Test { - arg: args.arg, - arg_2: args.arg_2, - arg_3: args.arg_3, - arg_4: args.arg_4, + fn from(args: TestArgs) -> Self { + Self::Test { + arg: args.arg, + arg_2: args.arg_2, + arg_3: args.arg_3, + arg_4: args.arg_4, } } } diff --git a/crates/cli/tests/snapshots/codegen__codegen_typescript.snap b/crates/cli/tests/snapshots/codegen__codegen_typescript.snap index 2fe25ab926b..098e4af34b7 100644 --- a/crates/cli/tests/snapshots/codegen__codegen_typescript.snap +++ b/crates/cli/tests/snapshots/codegen__codegen_typescript.snap @@ -5,7 +5,7 @@ snapshot_kind: text --- "add_player_reducer.ts" = ''' // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. import { // @ts-ignore @@ -77,7 +77,7 @@ export namespace AddPlayer { ''' "add_private_reducer.ts" = ''' // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. import { // @ts-ignore @@ -149,7 +149,7 @@ export namespace AddPrivate { ''' "assert_caller_identity_is_module_identity_reducer.ts" = ''' // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. import { // @ts-ignore @@ -218,7 +218,7 @@ export namespace AssertCallerIdentityIsModuleIdentity { ''' "baz_type.ts" = ''' // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. import { // @ts-ignore @@ -287,10 +287,79 @@ export namespace Baz { } +''' +"client_connected_reducer.ts" = ''' +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +import { + // @ts-ignore + Address, + // @ts-ignore + AlgebraicType, + // @ts-ignore + AlgebraicValue, + // @ts-ignore + BinaryReader, + // @ts-ignore + BinaryWriter, + // @ts-ignore + CallReducerFlags, + // @ts-ignore + DBConnectionBuilder, + // @ts-ignore + DBConnectionImpl, + // @ts-ignore + DBContext, + // @ts-ignore + Event, + // @ts-ignore + EventContextInterface, + // @ts-ignore + Identity, + // @ts-ignore + ProductType, + // @ts-ignore + ProductTypeElement, + // @ts-ignore + SumType, + // @ts-ignore + SumTypeVariant, + // @ts-ignore + TableCache, + // @ts-ignore + deepEqual, +} from "@clockworklabs/spacetimedb-sdk"; + +export type ClientConnected = {}; + +/** + * A namespace for generated helper functions. + */ +export namespace ClientConnected { + /** + * A function which returns this type represented as an AlgebraicType. + * This function is derived from the AlgebraicType used to generate this type. + */ + export function getTypeScriptAlgebraicType(): AlgebraicType { + return AlgebraicType.createProductType([ + ]); + } + + export function serialize(writer: BinaryWriter, value: ClientConnected): void { + ClientConnected.getTypeScriptAlgebraicType().serialize(writer, value); + } + + export function deserialize(reader: BinaryReader): ClientConnected { + return ClientConnected.getTypeScriptAlgebraicType().deserialize(reader); + } + +} + ''' "delete_player_reducer.ts" = ''' // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. import { // @ts-ignore @@ -362,7 +431,7 @@ export namespace DeletePlayer { ''' "delete_players_by_name_reducer.ts" = ''' // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. import { // @ts-ignore @@ -434,7 +503,7 @@ export namespace DeletePlayersByName { ''' "foobar_type.ts" = ''' // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. import { // @ts-ignore @@ -522,7 +591,7 @@ export default Foobar; ''' "has_special_stuff_table.ts" = ''' // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. import { // @ts-ignore @@ -610,7 +679,7 @@ export class HasSpecialStuffTableHandle { ''' "has_special_stuff_type.ts" = ''' // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. import { // @ts-ignore @@ -684,7 +753,7 @@ export namespace HasSpecialStuff { ''' "index.ts" = ''' // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. import { // @ts-ignore @@ -732,14 +801,12 @@ import { AddPrivate } from "./add_private_reducer.ts"; export { AddPrivate }; import { AssertCallerIdentityIsModuleIdentity } from "./assert_caller_identity_is_module_identity_reducer.ts"; export { AssertCallerIdentityIsModuleIdentity }; +import { ClientConnected } from "./client_connected_reducer.ts"; +export { ClientConnected }; import { DeletePlayer } from "./delete_player_reducer.ts"; export { DeletePlayer }; import { DeletePlayersByName } from "./delete_players_by_name_reducer.ts"; export { DeletePlayersByName }; -import { Init } from "./init_reducer.ts"; -export { Init }; -import { OnConnect } from "./on_connect_reducer.ts"; -export { OnConnect }; import { QueryPrivate } from "./query_private_reducer.ts"; export { QueryPrivate }; import { RepeatingTest } from "./repeating_test_reducer.ts"; @@ -870,6 +937,10 @@ const REMOTE_MODULE = { reducerName: "assert_caller_identity_is_module_identity", argsType: AssertCallerIdentityIsModuleIdentity.getTypeScriptAlgebraicType(), }, + client_connected: { + reducerName: "client_connected", + argsType: ClientConnected.getTypeScriptAlgebraicType(), + }, delete_player: { reducerName: "delete_player", argsType: DeletePlayer.getTypeScriptAlgebraicType(), @@ -878,14 +949,6 @@ const REMOTE_MODULE = { reducerName: "delete_players_by_name", argsType: DeletePlayersByName.getTypeScriptAlgebraicType(), }, - init: { - reducerName: "init", - argsType: Init.getTypeScriptAlgebraicType(), - }, - on_connect: { - reducerName: "on_connect", - argsType: OnConnect.getTypeScriptAlgebraicType(), - }, query_private: { reducerName: "query_private", argsType: QueryPrivate.getTypeScriptAlgebraicType(), @@ -927,10 +990,9 @@ export type Reducer = never | { name: "AddPlayer", args: AddPlayer } | { name: "AddPrivate", args: AddPrivate } | { name: "AssertCallerIdentityIsModuleIdentity", args: AssertCallerIdentityIsModuleIdentity } +| { name: "ClientConnected", args: ClientConnected } | { name: "DeletePlayer", args: DeletePlayer } | { name: "DeletePlayersByName", args: DeletePlayersByName } -| { name: "Init", args: Init } -| { name: "OnConnect", args: OnConnect } | { name: "QueryPrivate", args: QueryPrivate } | { name: "RepeatingTest", args: RepeatingTest } | { name: "Test", args: Test } @@ -984,6 +1046,14 @@ export class RemoteReducers { this.connection.offReducer("assert_caller_identity_is_module_identity", callback); } + onClientConnected(callback: (ctx: EventContext) => void) { + this.connection.onReducer("client_connected", callback); + } + + removeOnClientConnected(callback: (ctx: EventContext) => void) { + this.connection.offReducer("client_connected", callback); + } + deletePlayer(id: bigint) { const __args = { id }; let __writer = new BinaryWriter(1024); @@ -1016,30 +1086,6 @@ export class RemoteReducers { this.connection.offReducer("delete_players_by_name", callback); } - init() { - this.connection.callReducer("init", new Uint8Array(0), this.setCallReducerFlags.initFlags); - } - - onInit(callback: (ctx: EventContext) => void) { - this.connection.onReducer("init", callback); - } - - removeOnInit(callback: (ctx: EventContext) => void) { - this.connection.offReducer("init", callback); - } - - onConnect() { - this.connection.callReducer("on_connect", new Uint8Array(0), this.setCallReducerFlags.onConnectFlags); - } - - onOnConnect(callback: (ctx: EventContext) => void) { - this.connection.onReducer("on_connect", callback); - } - - removeOnOnConnect(callback: (ctx: EventContext) => void) { - this.connection.offReducer("on_connect", callback); - } - queryPrivate() { this.connection.callReducer("query_private", new Uint8Array(0), this.setCallReducerFlags.queryPrivateFlags); } @@ -1124,16 +1170,6 @@ export class SetReducerFlags { this.deletePlayersByNameFlags = flags; } - initFlags: CallReducerFlags = 'FullUpdate'; - init(flags: CallReducerFlags) { - this.initFlags = flags; - } - - onConnectFlags: CallReducerFlags = 'FullUpdate'; - onConnect(flags: CallReducerFlags) { - this.onConnectFlags = flags; - } - queryPrivateFlags: CallReducerFlags = 'FullUpdate'; queryPrivate(flags: CallReducerFlags) { this.queryPrivateFlags = flags; @@ -1211,79 +1247,10 @@ export class DBConnection extends DBConnectionImpl; -''' -"init_reducer.ts" = ''' -// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. - -import { - // @ts-ignore - Address, - // @ts-ignore - AlgebraicType, - // @ts-ignore - AlgebraicValue, - // @ts-ignore - BinaryReader, - // @ts-ignore - BinaryWriter, - // @ts-ignore - CallReducerFlags, - // @ts-ignore - DBConnectionBuilder, - // @ts-ignore - DBConnectionImpl, - // @ts-ignore - DBContext, - // @ts-ignore - Event, - // @ts-ignore - EventContextInterface, - // @ts-ignore - Identity, - // @ts-ignore - ProductType, - // @ts-ignore - ProductTypeElement, - // @ts-ignore - SumType, - // @ts-ignore - SumTypeVariant, - // @ts-ignore - TableCache, - // @ts-ignore - deepEqual, -} from "@clockworklabs/spacetimedb-sdk"; - -export type Init = {}; - -/** - * A namespace for generated helper functions. - */ -export namespace Init { - /** - * A function which returns this type represented as an AlgebraicType. - * This function is derived from the AlgebraicType used to generate this type. - */ - export function getTypeScriptAlgebraicType(): AlgebraicType { - return AlgebraicType.createProductType([ - ]); - } - - export function serialize(writer: BinaryWriter, value: Init): void { - Init.getTypeScriptAlgebraicType().serialize(writer, value); - } - - export function deserialize(reader: BinaryReader): Init { - return Init.getTypeScriptAlgebraicType().deserialize(reader); - } - -} - ''' "logged_out_player_table.ts" = ''' // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. import { // @ts-ignore @@ -1423,7 +1390,7 @@ export class LoggedOutPlayerTableHandle { ''' "namespace_test_c_type.ts" = ''' // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. import { // @ts-ignore @@ -1505,7 +1472,7 @@ export default NamespaceTestC; ''' "namespace_test_f_type.ts" = ''' // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. import { // @ts-ignore @@ -1587,79 +1554,10 @@ export type NamespaceTestF = NamespaceTestF.Foo | NamespaceTestF.Bar | Namespace export default NamespaceTestF; -''' -"on_connect_reducer.ts" = ''' -// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. - -import { - // @ts-ignore - Address, - // @ts-ignore - AlgebraicType, - // @ts-ignore - AlgebraicValue, - // @ts-ignore - BinaryReader, - // @ts-ignore - BinaryWriter, - // @ts-ignore - CallReducerFlags, - // @ts-ignore - DBConnectionBuilder, - // @ts-ignore - DBConnectionImpl, - // @ts-ignore - DBContext, - // @ts-ignore - Event, - // @ts-ignore - EventContextInterface, - // @ts-ignore - Identity, - // @ts-ignore - ProductType, - // @ts-ignore - ProductTypeElement, - // @ts-ignore - SumType, - // @ts-ignore - SumTypeVariant, - // @ts-ignore - TableCache, - // @ts-ignore - deepEqual, -} from "@clockworklabs/spacetimedb-sdk"; - -export type OnConnect = {}; - -/** - * A namespace for generated helper functions. - */ -export namespace OnConnect { - /** - * A function which returns this type represented as an AlgebraicType. - * This function is derived from the AlgebraicType used to generate this type. - */ - export function getTypeScriptAlgebraicType(): AlgebraicType { - return AlgebraicType.createProductType([ - ]); - } - - export function serialize(writer: BinaryWriter, value: OnConnect): void { - OnConnect.getTypeScriptAlgebraicType().serialize(writer, value); - } - - export function deserialize(reader: BinaryReader): OnConnect { - return OnConnect.getTypeScriptAlgebraicType().deserialize(reader); - } - -} - ''' "pk_multi_identity_table.ts" = ''' // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. import { // @ts-ignore @@ -1799,7 +1697,7 @@ export class PkMultiIdentityTableHandle { ''' "pk_multi_identity_type.ts" = ''' // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. import { // @ts-ignore @@ -1873,7 +1771,7 @@ export namespace PkMultiIdentity { ''' "player_table.ts" = ''' // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. import { // @ts-ignore @@ -2013,7 +1911,7 @@ export class PlayerTableHandle { ''' "player_type.ts" = ''' // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. import { // @ts-ignore @@ -2089,7 +1987,7 @@ export namespace Player { ''' "point_type.ts" = ''' // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. import { // @ts-ignore @@ -2163,7 +2061,7 @@ export namespace Point { ''' "points_table.ts" = ''' // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. import { // @ts-ignore @@ -2251,7 +2149,7 @@ export class PointsTableHandle { ''' "private_table.ts" = ''' // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. import { // @ts-ignore @@ -2339,7 +2237,7 @@ export class PrivateTableHandle { ''' "private_type.ts" = ''' // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. import { // @ts-ignore @@ -2411,7 +2309,7 @@ export namespace Private { ''' "query_private_reducer.ts" = ''' // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. import { // @ts-ignore @@ -2480,7 +2378,7 @@ export namespace QueryPrivate { ''' "repeating_test_arg_table.ts" = ''' // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. import { // @ts-ignore @@ -2598,7 +2496,7 @@ export class RepeatingTestArgTableHandle { ''' "repeating_test_arg_type.ts" = ''' // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. import { // @ts-ignore @@ -2674,7 +2572,7 @@ export namespace RepeatingTestArg { ''' "repeating_test_reducer.ts" = ''' // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. import { // @ts-ignore @@ -2749,7 +2647,7 @@ export namespace RepeatingTest { ''' "test_a_table.ts" = ''' // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. import { // @ts-ignore @@ -2837,7 +2735,7 @@ export class TestATableHandle { ''' "test_a_type.ts" = ''' // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. import { // @ts-ignore @@ -2913,7 +2811,7 @@ export namespace TestA { ''' "test_b_type.ts" = ''' // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. import { // @ts-ignore @@ -2985,7 +2883,7 @@ export namespace TestB { ''' "test_btree_index_args_reducer.ts" = ''' // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. import { // @ts-ignore @@ -3054,7 +2952,7 @@ export namespace TestBtreeIndexArgs { ''' "test_d_table.ts" = ''' // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. import { // @ts-ignore @@ -3145,7 +3043,7 @@ export class TestDTableHandle { ''' "test_d_type.ts" = ''' // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. import { // @ts-ignore @@ -3220,7 +3118,7 @@ export namespace TestD { ''' "test_e_table.ts" = ''' // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. import { // @ts-ignore @@ -3338,7 +3236,7 @@ export class TestETableHandle { ''' "test_e_type.ts" = ''' // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. import { // @ts-ignore @@ -3412,7 +3310,7 @@ export namespace TestE { ''' "test_f_table.ts" = ''' // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. import { // @ts-ignore @@ -3503,7 +3401,7 @@ export class TestFTableHandle { ''' "test_foobar_type.ts" = ''' // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. import { // @ts-ignore @@ -3578,7 +3476,7 @@ export namespace TestFoobar { ''' "test_reducer.ts" = ''' // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. import { // @ts-ignore diff --git a/crates/schema/src/schema.rs b/crates/schema/src/schema.rs index 1e64c63bd32..5ecacbdb92e 100644 --- a/crates/schema/src/schema.rs +++ b/crates/schema/src/schema.rs @@ -291,11 +291,11 @@ impl TableSchema { } /// Is there a unique constraint for this set of columns? - pub fn is_unique(&self, cols: &ColSet) -> bool { + pub fn is_unique(&self, cols: &ColList) -> bool { self.constraints .iter() .filter_map(|cs| cs.data.unique_columns()) - .any(|unique_cols| unique_cols == cols) + .any(|unique_cols| **unique_cols == *cols) } /// Project the fields from the supplied `indexes`. @@ -357,7 +357,7 @@ impl TableSchema { /// Resolves the constraints per each column. If the column don't have one, auto-generate [Constraints::unset()]. /// This guarantee all columns can be queried for it constraints. pub fn backcompat_column_constraints(&self) -> BTreeMap { - let mut result = combine_constraints(self.backcompat_constraints_iter()); + let mut result = self.backcompat_constraints(); for col in &self.columns { result.entry(col_list![col.col_pos]).or_insert(Constraints::unset()); } diff --git a/modules/rust-wasm-test/src/lib.rs b/modules/rust-wasm-test/src/lib.rs index 1ef2a66f74f..1b1f46a1882 100644 --- a/modules/rust-wasm-test/src/lib.rs +++ b/modules/rust-wasm-test/src/lib.rs @@ -239,7 +239,7 @@ pub fn delete_players_by_name(ctx: &ReducerContext, name: String) -> Result<(), } #[spacetimedb::reducer(client_connected)] -fn on_connect(_ctx: &ReducerContext) {} +fn client_connected(_ctx: &ReducerContext) {} // We can derive `Deserialize` for lifetime generic types: diff --git a/smoketests/tests/namespaces.py b/smoketests/tests/namespaces.py index b6c18338830..e0da0db729f 100644 --- a/smoketests/tests/namespaces.py +++ b/smoketests/tests/namespaces.py @@ -23,7 +23,8 @@ def test_spacetimedb_ns_csharp(self): with tempfile.TemporaryDirectory() as tmpdir: self.spacetime("generate", "--out-dir", tmpdir, "--lang=cs", "--project-path", self.project_path) - self.assertEqual(count_matches(tmpdir, f"namespace {namespace}"), 2) + self.assertEqual(count_matches(tmpdir, f"namespace {namespace}"), 7) + self.assertEqual(count_matches(tmpdir, "using SpacetimeDB;"), 0) def test_custom_ns_csharp(self): """Ensure that when a custom namespace is specified on the command line, it actually gets used in generation""" @@ -33,5 +34,5 @@ def test_custom_ns_csharp(self): with tempfile.TemporaryDirectory() as tmpdir: self.spacetime("generate", "--out-dir", tmpdir, "--lang=cs", "--namespace", namespace, "--project-path", self.project_path) - self.assertEqual(count_matches(tmpdir, f"namespace {namespace}"), 2) - self.assertEqual(count_matches(tmpdir, "using SpacetimeDB;"), 2) + self.assertEqual(count_matches(tmpdir, f"namespace {namespace}"), 7) + self.assertEqual(count_matches(tmpdir, "using SpacetimeDB;"), 7) From fe13df05de02bf98ea1c957fd01cfe45620ff273 Mon Sep 17 00:00:00 2001 From: Ingvar Stepanyan Date: Thu, 30 Jan 2025 17:35:12 +0000 Subject: [PATCH 2/8] Merge RemoteTables and ClientCache as per TODO --- crates/cli/src/subcommands/generate/csharp.rs | 80 +++++++++---------- 1 file changed, 40 insertions(+), 40 deletions(-) diff --git a/crates/cli/src/subcommands/generate/csharp.rs b/crates/cli/src/subcommands/generate/csharp.rs index 8b29071210c..6f0bcde5cd1 100644 --- a/crates/cli/src/subcommands/generate/csharp.rs +++ b/crates/cli/src/subcommands/generate/csharp.rs @@ -163,7 +163,10 @@ impl Lang for Csharp<'_> { } } - writeln!(output, "internal {csharp_table_class_name}()"); + writeln!( + output, + "internal {csharp_table_class_name}(DbConnection conn) : base(conn)" + ); indented_block(output, |output| { for csharp_index_name in &index_names { writeln!(output, "{csharp_index_name} = new(this);"); @@ -180,10 +183,7 @@ impl Lang for Csharp<'_> { } }); writeln!(output); - writeln!( - output, - "public readonly {csharp_table_class_name} {csharp_table_name} = new();" - ); + writeln!(output, "public readonly {csharp_table_class_name} {csharp_table_name};"); }); output.into_inner() @@ -208,10 +208,7 @@ impl Lang for Csharp<'_> { ], ); - writeln!( - output, - "public sealed partial class RemoteReducers : RemoteBase" - ); + writeln!(output, "public sealed partial class RemoteReducers : RemoteBase"); indented_block(&mut output, |output| { let func_name_pascal_case = reducer.name.deref().to_case(Case::Pascal); let delegate_separator = if reducer.params_for_generate.elements.is_empty() { @@ -305,7 +302,7 @@ impl Lang for Csharp<'_> { indented_block(&mut output, |output| { let func_name_pascal_case = reducer.name.deref().to_case(Case::Pascal); writeln!(output, "internal CallReducerFlags {func_name_pascal_case}Flags;"); - writeln!(output, "public void {func_name_pascal_case}(CallReducerFlags flags) {{ this.{func_name_pascal_case}Flags = flags; }}"); + writeln!(output, "public void {func_name_pascal_case}(CallReducerFlags flags) => {func_name_pascal_case}Flags = flags;"); }); } @@ -322,41 +319,53 @@ impl Lang for Csharp<'_> { ], ); - writeln!( - output, - "public sealed partial class RemoteReducers : RemoteBase" - ); + writeln!(output, "public sealed partial class RemoteReducers : RemoteBase"); indented_block(&mut output, |output| { writeln!( output, - "internal RemoteReducers(DbConnection conn, SetReducerFlags SetReducerFlags) : base(conn) {{ this.SetCallReducerFlags = SetReducerFlags; }}" + "internal RemoteReducers(DbConnection conn, SetReducerFlags flags) : base(conn) => SetCallReducerFlags = flags;" ); writeln!(output, "internal readonly SetReducerFlags SetCallReducerFlags;"); }); writeln!(output); - writeln!(output, "public sealed partial class SetReducerFlags"); + writeln!(output, "public sealed partial class RemoteTables : RemoteTablesBase"); indented_block(&mut output, |output| { - writeln!(output, "internal SetReducerFlags() {{ }}"); + writeln!(output, "public RemoteTables(DbConnection conn)"); + indented_block(output, |output| { + for table in iter_tables(module) { + writeln!( + output, + "AddTable({} = new(conn));", + table.name.deref().to_case(Case::Pascal) + ); + } + }); }); writeln!(output); - writeln!( - output, - "public sealed record EventContext : DbContext, IEventContext" - ); + writeln!(output, "public sealed partial class SetReducerFlags {{ }}"); + + writeln!(output, "public sealed class EventContext: IEventContext"); indented_block(&mut output, |output| { - writeln!(output, "public readonly RemoteReducers Reducers;"); - writeln!(output, "public readonly SetReducerFlags SetReducerFlags;"); + writeln!(output, "private readonly DbConnection conn;"); writeln!(output, "public readonly Event Event;"); writeln!(output); + + writeln!(output, "public RemoteTables Db => conn.Db;"); + writeln!(output, "public RemoteReducers Reducers => conn.Reducers;"); writeln!( output, - "internal EventContext(DbConnection conn, Event reducerEvent) : base(conn.Db)" + "public SetReducerFlags SetReducerFlags => conn.SetReducerFlags;" + ); + writeln!(output); + + writeln!( + output, + "internal EventContext(DbConnection conn, Event reducerEvent)" ); indented_block(output, |output| { - writeln!(output, "Reducers = conn.Reducers;"); - writeln!(output, "SetReducerFlags = conn.SetReducerFlags;"); + writeln!(output, "this.conn = conn;"); writeln!(output, "Event = reducerEvent;"); }); }); @@ -373,27 +382,18 @@ impl Lang for Csharp<'_> { writeln!( output, - "public sealed class DbConnection : DbConnectionBase" + "public sealed class DbConnection : DbConnectionBase" ); indented_block(&mut output, |output| { - writeln!(output, "public readonly RemoteTables Db = new();"); + writeln!(output, "public override RemoteTables Db {{ get; }}"); writeln!(output, "public readonly RemoteReducers Reducers;"); - writeln!(output, "public readonly SetReducerFlags SetReducerFlags;"); + writeln!(output, "public readonly SetReducerFlags SetReducerFlags = new();"); writeln!(output); writeln!(output, "public DbConnection()"); indented_block(output, |output| { - writeln!(output, "SetReducerFlags = new();"); - writeln!(output, "Reducers = new(this, this.SetReducerFlags);"); - writeln!(output); - - for table in iter_tables(module) { - writeln!( - output, - "clientDB.AddTable(Db.{csharp_table_name});", - csharp_table_name = table.name.deref().to_case(Case::Pascal) - ); - } + writeln!(output, "Db = new(this);"); + writeln!(output, "Reducers = new(this, SetReducerFlags);"); }); writeln!(output); From 9b3b5d1f0e4748e9d172a1d4a4e5fad989ab3e14 Mon Sep 17 00:00:00 2001 From: Ingvar Stepanyan Date: Thu, 30 Jan 2025 17:36:34 +0000 Subject: [PATCH 3/8] Update snapshot --- .../snapshots/codegen__codegen_csharp.snap | 140 +++++++++--------- 1 file changed, 72 insertions(+), 68 deletions(-) diff --git a/crates/cli/tests/snapshots/codegen__codegen_csharp.snap b/crates/cli/tests/snapshots/codegen__codegen_csharp.snap index 361b7a71fbb..144e40dff40 100644 --- a/crates/cli/tests/snapshots/codegen__codegen_csharp.snap +++ b/crates/cli/tests/snapshots/codegen__codegen_csharp.snap @@ -16,7 +16,7 @@ using System.Runtime.Serialization; namespace SpacetimeDB { - public sealed partial class RemoteReducers : RemoteBase + public sealed partial class RemoteReducers : RemoteBase { public delegate void AddPlayerHandler(EventContext ctx, string name); public event AddPlayerHandler? OnAddPlayer; @@ -63,7 +63,7 @@ namespace SpacetimeDB public sealed partial class SetReducerFlags { internal CallReducerFlags AddPlayerFlags; - public void AddPlayer(CallReducerFlags flags) { this.AddPlayerFlags = flags; } + public void AddPlayer(CallReducerFlags flags) => AddPlayerFlags = flags; } } ''' @@ -80,7 +80,7 @@ using System.Runtime.Serialization; namespace SpacetimeDB { - public sealed partial class RemoteReducers : RemoteBase + public sealed partial class RemoteReducers : RemoteBase { public delegate void AddPrivateHandler(EventContext ctx, string name); public event AddPrivateHandler? OnAddPrivate; @@ -127,7 +127,7 @@ namespace SpacetimeDB public sealed partial class SetReducerFlags { internal CallReducerFlags AddPrivateFlags; - public void AddPrivate(CallReducerFlags flags) { this.AddPrivateFlags = flags; } + public void AddPrivate(CallReducerFlags flags) => AddPrivateFlags = flags; } } ''' @@ -144,7 +144,7 @@ using System.Runtime.Serialization; namespace SpacetimeDB { - public sealed partial class RemoteReducers : RemoteBase + public sealed partial class RemoteReducers : RemoteBase { public delegate void AssertCallerIdentityIsModuleIdentityHandler(EventContext ctx); public event AssertCallerIdentityIsModuleIdentityHandler? OnAssertCallerIdentityIsModuleIdentity; @@ -177,7 +177,7 @@ namespace SpacetimeDB public sealed partial class SetReducerFlags { internal CallReducerFlags AssertCallerIdentityIsModuleIdentityFlags; - public void AssertCallerIdentityIsModuleIdentity(CallReducerFlags flags) { this.AssertCallerIdentityIsModuleIdentityFlags = flags; } + public void AssertCallerIdentityIsModuleIdentity(CallReducerFlags flags) => AssertCallerIdentityIsModuleIdentityFlags = flags; } } ''' @@ -194,7 +194,7 @@ using System.Runtime.Serialization; namespace SpacetimeDB { - public sealed partial class RemoteReducers : RemoteBase + public sealed partial class RemoteReducers : RemoteBase { public delegate void ClientConnectedHandler(EventContext ctx); public event ClientConnectedHandler? OnClientConnected; @@ -233,7 +233,7 @@ using System.Runtime.Serialization; namespace SpacetimeDB { - public sealed partial class RemoteReducers : RemoteBase + public sealed partial class RemoteReducers : RemoteBase { public delegate void DeletePlayerHandler(EventContext ctx, ulong id); public event DeletePlayerHandler? OnDeletePlayer; @@ -279,7 +279,7 @@ namespace SpacetimeDB public sealed partial class SetReducerFlags { internal CallReducerFlags DeletePlayerFlags; - public void DeletePlayer(CallReducerFlags flags) { this.DeletePlayerFlags = flags; } + public void DeletePlayer(CallReducerFlags flags) => DeletePlayerFlags = flags; } } ''' @@ -296,7 +296,7 @@ using System.Runtime.Serialization; namespace SpacetimeDB { - public sealed partial class RemoteReducers : RemoteBase + public sealed partial class RemoteReducers : RemoteBase { public delegate void DeletePlayersByNameHandler(EventContext ctx, string name); public event DeletePlayersByNameHandler? OnDeletePlayersByName; @@ -343,7 +343,7 @@ namespace SpacetimeDB public sealed partial class SetReducerFlags { internal CallReducerFlags DeletePlayersByNameFlags; - public void DeletePlayersByName(CallReducerFlags flags) { this.DeletePlayersByNameFlags = flags; } + public void DeletePlayersByName(CallReducerFlags flags) => DeletePlayersByNameFlags = flags; } } ''' @@ -360,7 +360,7 @@ using System.Runtime.Serialization; namespace SpacetimeDB { - public sealed partial class RemoteReducers : RemoteBase + public sealed partial class RemoteReducers : RemoteBase { public delegate void QueryPrivateHandler(EventContext ctx); public event QueryPrivateHandler? OnQueryPrivate; @@ -393,7 +393,7 @@ namespace SpacetimeDB public sealed partial class SetReducerFlags { internal CallReducerFlags QueryPrivateFlags; - public void QueryPrivate(CallReducerFlags flags) { this.QueryPrivateFlags = flags; } + public void QueryPrivate(CallReducerFlags flags) => QueryPrivateFlags = flags; } } ''' @@ -410,7 +410,7 @@ using System.Runtime.Serialization; namespace SpacetimeDB { - public sealed partial class RemoteReducers : RemoteBase + public sealed partial class RemoteReducers : RemoteBase { public delegate void RepeatingTestHandler(EventContext ctx, RepeatingTestArg arg); public event RepeatingTestHandler? OnRepeatingTest; @@ -457,7 +457,7 @@ namespace SpacetimeDB public sealed partial class SetReducerFlags { internal CallReducerFlags RepeatingTestFlags; - public void RepeatingTest(CallReducerFlags flags) { this.RepeatingTestFlags = flags; } + public void RepeatingTest(CallReducerFlags flags) => RepeatingTestFlags = flags; } } ''' @@ -474,7 +474,7 @@ using System.Runtime.Serialization; namespace SpacetimeDB { - public sealed partial class RemoteReducers : RemoteBase + public sealed partial class RemoteReducers : RemoteBase { public delegate void TestHandler(EventContext ctx, TestA arg, TestB arg2, NamespaceTestC arg3, NamespaceTestF arg4); public event TestHandler? OnTest; @@ -540,7 +540,7 @@ namespace SpacetimeDB public sealed partial class SetReducerFlags { internal CallReducerFlags TestFlags; - public void Test(CallReducerFlags flags) { this.TestFlags = flags; } + public void Test(CallReducerFlags flags) => TestFlags = flags; } } ''' @@ -557,7 +557,7 @@ using System.Runtime.Serialization; namespace SpacetimeDB { - public sealed partial class RemoteReducers : RemoteBase + public sealed partial class RemoteReducers : RemoteBase { public delegate void TestBtreeIndexArgsHandler(EventContext ctx); public event TestBtreeIndexArgsHandler? OnTestBtreeIndexArgs; @@ -590,7 +590,7 @@ namespace SpacetimeDB public sealed partial class SetReducerFlags { internal CallReducerFlags TestBtreeIndexArgsFlags; - public void TestBtreeIndexArgs(CallReducerFlags flags) { this.TestBtreeIndexArgsFlags = flags; } + public void TestBtreeIndexArgs(CallReducerFlags flags) => TestBtreeIndexArgsFlags = flags; } } ''' @@ -607,27 +607,43 @@ using System.Runtime.Serialization; namespace SpacetimeDB { - public sealed partial class RemoteReducers : RemoteBase + public sealed partial class RemoteReducers : RemoteBase { - internal RemoteReducers(DbConnection conn, SetReducerFlags SetReducerFlags) : base(conn) { this.SetCallReducerFlags = SetReducerFlags; } + internal RemoteReducers(DbConnection conn, SetReducerFlags flags) : base(conn) => SetCallReducerFlags = flags; internal readonly SetReducerFlags SetCallReducerFlags; } - public sealed partial class SetReducerFlags + public sealed partial class RemoteTables : RemoteTablesBase { - internal SetReducerFlags() { } + public RemoteTables(DbConnection conn) + { + AddTable(HasSpecialStuff = new(conn)); + AddTable(LoggedOutPlayer = new(conn)); + AddTable(PkMultiIdentity = new(conn)); + AddTable(Player = new(conn)); + AddTable(Points = new(conn)); + AddTable(Private = new(conn)); + AddTable(RepeatingTestArg = new(conn)); + AddTable(TestA = new(conn)); + AddTable(TestD = new(conn)); + AddTable(TestE = new(conn)); + AddTable(TestF = new(conn)); + } } - public sealed record EventContext : DbContext, IEventContext + public sealed partial class SetReducerFlags { } + public sealed class EventContext: IEventContext { - public readonly RemoteReducers Reducers; - public readonly SetReducerFlags SetReducerFlags; + private readonly DbConnection conn; public readonly Event Event; - internal EventContext(DbConnection conn, Event reducerEvent) : base(conn.Db) + public RemoteTables Db => conn.Db; + public RemoteReducers Reducers => conn.Reducers; + public SetReducerFlags SetReducerFlags => conn.SetReducerFlags; + + internal EventContext(DbConnection conn, Event reducerEvent) { - Reducers = conn.Reducers; - SetReducerFlags = conn.SetReducerFlags; + this.conn = conn; Event = reducerEvent; } } @@ -639,28 +655,16 @@ namespace SpacetimeDB public sealed class StdbNone : Reducer {} } - public sealed class DbConnection : DbConnectionBase + public sealed class DbConnection : DbConnectionBase { - public readonly RemoteTables Db = new(); + public override RemoteTables Db { get; } public readonly RemoteReducers Reducers; - public readonly SetReducerFlags SetReducerFlags; + public readonly SetReducerFlags SetReducerFlags = new(); public DbConnection() { - SetReducerFlags = new(); - Reducers = new(this, this.SetReducerFlags); - - clientDB.AddTable(Db.HasSpecialStuff); - clientDB.AddTable(Db.LoggedOutPlayer); - clientDB.AddTable(Db.PkMultiIdentity); - clientDB.AddTable(Db.Player); - clientDB.AddTable(Db.Points); - clientDB.AddTable(Db.Private); - clientDB.AddTable(Db.RepeatingTestArg); - clientDB.AddTable(Db.TestA); - clientDB.AddTable(Db.TestD); - clientDB.AddTable(Db.TestE); - clientDB.AddTable(Db.TestF); + Db = new(this); + Reducers = new(this, SetReducerFlags); } protected override Reducer ToReducer(TransactionUpdate update) @@ -728,12 +732,12 @@ namespace SpacetimeDB { protected override string Name => "has_special_stuff"; - internal HasSpecialStuffHandle() + internal HasSpecialStuffHandle(DbConnection conn) : base(conn) { } } - public readonly HasSpecialStuffHandle HasSpecialStuff = new(); + public readonly HasSpecialStuffHandle HasSpecialStuff; } } ''' @@ -775,7 +779,7 @@ namespace SpacetimeDB public readonly PlayerIdUniqueIndex PlayerId; - internal LoggedOutPlayerHandle() + internal LoggedOutPlayerHandle(DbConnection conn) : base(conn) { Identity = new(this); PlayerId = new(this); @@ -784,7 +788,7 @@ namespace SpacetimeDB protected override object GetPrimaryKey(Player row) => row.Identity; } - public readonly LoggedOutPlayerHandle LoggedOutPlayer = new(); + public readonly LoggedOutPlayerHandle LoggedOutPlayer; } } ''' @@ -826,7 +830,7 @@ namespace SpacetimeDB public readonly OtherUniqueIndex Other; - internal PkMultiIdentityHandle() + internal PkMultiIdentityHandle(DbConnection conn) : base(conn) { Id = new(this); Other = new(this); @@ -835,7 +839,7 @@ namespace SpacetimeDB protected override object GetPrimaryKey(PkMultiIdentity row) => row.Id; } - public readonly PkMultiIdentityHandle PkMultiIdentity = new(); + public readonly PkMultiIdentityHandle PkMultiIdentity; } } ''' @@ -877,7 +881,7 @@ namespace SpacetimeDB public readonly PlayerIdUniqueIndex PlayerId; - internal PlayerHandle() + internal PlayerHandle(DbConnection conn) : base(conn) { Identity = new(this); PlayerId = new(this); @@ -886,7 +890,7 @@ namespace SpacetimeDB protected override object GetPrimaryKey(Player row) => row.Identity; } - public readonly PlayerHandle Player = new(); + public readonly PlayerHandle Player; } } ''' @@ -919,13 +923,13 @@ namespace SpacetimeDB public readonly MultiColumnIndexIndex MultiColumnIndex; - internal PointsHandle() + internal PointsHandle(DbConnection conn) : base(conn) { MultiColumnIndex = new(this); } } - public readonly PointsHandle Points = new(); + public readonly PointsHandle Points; } } ''' @@ -949,12 +953,12 @@ namespace SpacetimeDB { protected override string Name => "private"; - internal PrivateHandle() + internal PrivateHandle(DbConnection conn) : base(conn) { } } - public readonly PrivateHandle Private = new(); + public readonly PrivateHandle Private; } } ''' @@ -987,7 +991,7 @@ namespace SpacetimeDB public readonly ScheduledIdUniqueIndex ScheduledId; - internal RepeatingTestArgHandle() + internal RepeatingTestArgHandle(DbConnection conn) : base(conn) { ScheduledId = new(this); } @@ -995,7 +999,7 @@ namespace SpacetimeDB protected override object GetPrimaryKey(RepeatingTestArg row) => row.ScheduledId; } - public readonly RepeatingTestArgHandle RepeatingTestArg = new(); + public readonly RepeatingTestArgHandle RepeatingTestArg; } } ''' @@ -1028,13 +1032,13 @@ namespace SpacetimeDB public readonly FooIndex Foo; - internal TestAHandle() + internal TestAHandle(DbConnection conn) : base(conn) { Foo = new(this); } } - public readonly TestAHandle TestA = new(); + public readonly TestAHandle TestA; } } ''' @@ -1058,12 +1062,12 @@ namespace SpacetimeDB { protected override string Name => "test_d"; - internal TestDHandle() + internal TestDHandle(DbConnection conn) : base(conn) { } } - public readonly TestDHandle TestD = new(); + public readonly TestDHandle TestD; } } ''' @@ -1105,7 +1109,7 @@ namespace SpacetimeDB public readonly NameIndex Name; - internal TestEHandle() + internal TestEHandle(DbConnection conn) : base(conn) { Id = new(this); Name = new(this); @@ -1114,7 +1118,7 @@ namespace SpacetimeDB protected override object GetPrimaryKey(TestE row) => row.Id; } - public readonly TestEHandle TestE = new(); + public readonly TestEHandle TestE; } } ''' @@ -1138,12 +1142,12 @@ namespace SpacetimeDB { protected override string Name => "test_f"; - internal TestFHandle() + internal TestFHandle(DbConnection conn) : base(conn) { } } - public readonly TestFHandle TestF = new(); + public readonly TestFHandle TestF; } } ''' From 100dc37d8e8c0d9d727bd041217428acd07e12ee Mon Sep 17 00:00:00 2001 From: James Gilles Date: Mon, 3 Feb 2025 12:32:09 -0500 Subject: [PATCH 4/8] Update sdk test module_bindings --- .../tests/test-client/src/module_bindings/byte_struct_type.rs | 2 +- .../src/module_bindings/delete_large_table_reducer.rs | 4 ++-- .../src/module_bindings/delete_pk_address_reducer.rs | 2 +- .../test-client/src/module_bindings/delete_pk_bool_reducer.rs | 2 +- .../src/module_bindings/delete_pk_i_128_reducer.rs | 2 +- .../test-client/src/module_bindings/delete_pk_i_16_reducer.rs | 2 +- .../src/module_bindings/delete_pk_i_256_reducer.rs | 2 +- .../test-client/src/module_bindings/delete_pk_i_32_reducer.rs | 2 +- .../test-client/src/module_bindings/delete_pk_i_64_reducer.rs | 2 +- .../test-client/src/module_bindings/delete_pk_i_8_reducer.rs | 2 +- .../src/module_bindings/delete_pk_identity_reducer.rs | 2 +- .../src/module_bindings/delete_pk_string_reducer.rs | 2 +- .../src/module_bindings/delete_pk_u_128_reducer.rs | 2 +- .../test-client/src/module_bindings/delete_pk_u_16_reducer.rs | 2 +- .../src/module_bindings/delete_pk_u_256_reducer.rs | 2 +- .../test-client/src/module_bindings/delete_pk_u_32_reducer.rs | 2 +- .../test-client/src/module_bindings/delete_pk_u_64_reducer.rs | 2 +- .../test-client/src/module_bindings/delete_pk_u_8_reducer.rs | 2 +- .../src/module_bindings/delete_unique_address_reducer.rs | 2 +- .../src/module_bindings/delete_unique_bool_reducer.rs | 2 +- .../src/module_bindings/delete_unique_i_128_reducer.rs | 2 +- .../src/module_bindings/delete_unique_i_16_reducer.rs | 2 +- .../src/module_bindings/delete_unique_i_256_reducer.rs | 2 +- .../src/module_bindings/delete_unique_i_32_reducer.rs | 2 +- .../src/module_bindings/delete_unique_i_64_reducer.rs | 2 +- .../src/module_bindings/delete_unique_i_8_reducer.rs | 2 +- .../src/module_bindings/delete_unique_identity_reducer.rs | 2 +- .../src/module_bindings/delete_unique_string_reducer.rs | 2 +- .../src/module_bindings/delete_unique_u_128_reducer.rs | 2 +- .../src/module_bindings/delete_unique_u_16_reducer.rs | 2 +- .../src/module_bindings/delete_unique_u_256_reducer.rs | 2 +- .../src/module_bindings/delete_unique_u_32_reducer.rs | 2 +- .../src/module_bindings/delete_unique_u_64_reducer.rs | 2 +- .../src/module_bindings/delete_unique_u_8_reducer.rs | 2 +- .../test-client/src/module_bindings/enum_with_payload_type.rs | 2 +- .../src/module_bindings/every_primitive_struct_type.rs | 2 +- .../test-client/src/module_bindings/every_vec_struct_type.rs | 2 +- .../test-client/src/module_bindings/indexed_table_2_table.rs | 4 ++-- .../test-client/src/module_bindings/indexed_table_2_type.rs | 4 ++-- .../test-client/src/module_bindings/indexed_table_table.rs | 4 ++-- .../test-client/src/module_bindings/indexed_table_type.rs | 4 ++-- .../src/module_bindings/insert_caller_one_address_reducer.rs | 2 +- .../src/module_bindings/insert_caller_one_identity_reducer.rs | 2 +- .../src/module_bindings/insert_caller_pk_address_reducer.rs | 2 +- .../src/module_bindings/insert_caller_pk_identity_reducer.rs | 2 +- .../module_bindings/insert_caller_unique_address_reducer.rs | 2 +- .../module_bindings/insert_caller_unique_identity_reducer.rs | 2 +- .../src/module_bindings/insert_caller_vec_address_reducer.rs | 2 +- .../src/module_bindings/insert_caller_vec_identity_reducer.rs | 2 +- .../src/module_bindings/insert_large_table_reducer.rs | 2 +- .../src/module_bindings/insert_one_address_reducer.rs | 2 +- .../src/module_bindings/insert_one_bool_reducer.rs | 2 +- .../src/module_bindings/insert_one_byte_struct_reducer.rs | 2 +- .../module_bindings/insert_one_enum_with_payload_reducer.rs | 2 +- .../insert_one_every_primitive_struct_reducer.rs | 2 +- .../module_bindings/insert_one_every_vec_struct_reducer.rs | 2 +- .../src/module_bindings/insert_one_f_32_reducer.rs | 2 +- .../src/module_bindings/insert_one_f_64_reducer.rs | 2 +- .../src/module_bindings/insert_one_i_128_reducer.rs | 2 +- .../src/module_bindings/insert_one_i_16_reducer.rs | 2 +- .../src/module_bindings/insert_one_i_256_reducer.rs | 2 +- .../src/module_bindings/insert_one_i_32_reducer.rs | 2 +- .../src/module_bindings/insert_one_i_64_reducer.rs | 2 +- .../test-client/src/module_bindings/insert_one_i_8_reducer.rs | 2 +- .../src/module_bindings/insert_one_identity_reducer.rs | 2 +- .../src/module_bindings/insert_one_simple_enum_reducer.rs | 2 +- .../src/module_bindings/insert_one_string_reducer.rs | 2 +- .../src/module_bindings/insert_one_u_128_reducer.rs | 2 +- .../src/module_bindings/insert_one_u_16_reducer.rs | 2 +- .../src/module_bindings/insert_one_u_256_reducer.rs | 2 +- .../src/module_bindings/insert_one_u_32_reducer.rs | 2 +- .../src/module_bindings/insert_one_u_64_reducer.rs | 2 +- .../test-client/src/module_bindings/insert_one_u_8_reducer.rs | 2 +- .../src/module_bindings/insert_one_unit_struct_reducer.rs | 2 +- .../insert_option_every_primitive_struct_reducer.rs | 2 +- .../src/module_bindings/insert_option_i_32_reducer.rs | 2 +- .../src/module_bindings/insert_option_identity_reducer.rs | 2 +- .../src/module_bindings/insert_option_simple_enum_reducer.rs | 2 +- .../src/module_bindings/insert_option_string_reducer.rs | 2 +- .../module_bindings/insert_option_vec_option_i_32_reducer.rs | 2 +- .../src/module_bindings/insert_pk_address_reducer.rs | 2 +- .../test-client/src/module_bindings/insert_pk_bool_reducer.rs | 2 +- .../src/module_bindings/insert_pk_i_128_reducer.rs | 2 +- .../test-client/src/module_bindings/insert_pk_i_16_reducer.rs | 2 +- .../src/module_bindings/insert_pk_i_256_reducer.rs | 2 +- .../test-client/src/module_bindings/insert_pk_i_32_reducer.rs | 2 +- .../test-client/src/module_bindings/insert_pk_i_64_reducer.rs | 2 +- .../test-client/src/module_bindings/insert_pk_i_8_reducer.rs | 2 +- .../src/module_bindings/insert_pk_identity_reducer.rs | 2 +- .../src/module_bindings/insert_pk_string_reducer.rs | 2 +- .../src/module_bindings/insert_pk_u_128_reducer.rs | 2 +- .../test-client/src/module_bindings/insert_pk_u_16_reducer.rs | 2 +- .../src/module_bindings/insert_pk_u_256_reducer.rs | 2 +- .../test-client/src/module_bindings/insert_pk_u_32_reducer.rs | 2 +- .../test-client/src/module_bindings/insert_pk_u_64_reducer.rs | 2 +- .../test-client/src/module_bindings/insert_pk_u_8_reducer.rs | 2 +- .../module_bindings/insert_primitives_as_strings_reducer.rs | 2 +- .../src/module_bindings/insert_table_holds_table_reducer.rs | 2 +- .../src/module_bindings/insert_unique_address_reducer.rs | 2 +- .../src/module_bindings/insert_unique_bool_reducer.rs | 2 +- .../src/module_bindings/insert_unique_i_128_reducer.rs | 2 +- .../src/module_bindings/insert_unique_i_16_reducer.rs | 2 +- .../src/module_bindings/insert_unique_i_256_reducer.rs | 2 +- .../src/module_bindings/insert_unique_i_32_reducer.rs | 2 +- .../src/module_bindings/insert_unique_i_64_reducer.rs | 2 +- .../src/module_bindings/insert_unique_i_8_reducer.rs | 2 +- .../src/module_bindings/insert_unique_identity_reducer.rs | 2 +- .../src/module_bindings/insert_unique_string_reducer.rs | 2 +- .../src/module_bindings/insert_unique_u_128_reducer.rs | 2 +- .../src/module_bindings/insert_unique_u_16_reducer.rs | 2 +- .../src/module_bindings/insert_unique_u_256_reducer.rs | 2 +- .../src/module_bindings/insert_unique_u_32_reducer.rs | 2 +- .../src/module_bindings/insert_unique_u_64_reducer.rs | 2 +- .../src/module_bindings/insert_unique_u_8_reducer.rs | 2 +- .../src/module_bindings/insert_vec_address_reducer.rs | 2 +- .../src/module_bindings/insert_vec_bool_reducer.rs | 2 +- .../src/module_bindings/insert_vec_byte_struct_reducer.rs | 2 +- .../module_bindings/insert_vec_enum_with_payload_reducer.rs | 2 +- .../insert_vec_every_primitive_struct_reducer.rs | 2 +- .../module_bindings/insert_vec_every_vec_struct_reducer.rs | 2 +- .../src/module_bindings/insert_vec_f_32_reducer.rs | 2 +- .../src/module_bindings/insert_vec_f_64_reducer.rs | 2 +- .../src/module_bindings/insert_vec_i_128_reducer.rs | 2 +- .../src/module_bindings/insert_vec_i_16_reducer.rs | 2 +- .../src/module_bindings/insert_vec_i_256_reducer.rs | 2 +- .../src/module_bindings/insert_vec_i_32_reducer.rs | 2 +- .../src/module_bindings/insert_vec_i_64_reducer.rs | 2 +- .../test-client/src/module_bindings/insert_vec_i_8_reducer.rs | 2 +- .../src/module_bindings/insert_vec_identity_reducer.rs | 2 +- .../src/module_bindings/insert_vec_simple_enum_reducer.rs | 2 +- .../src/module_bindings/insert_vec_string_reducer.rs | 2 +- .../src/module_bindings/insert_vec_u_128_reducer.rs | 2 +- .../src/module_bindings/insert_vec_u_16_reducer.rs | 2 +- .../src/module_bindings/insert_vec_u_256_reducer.rs | 2 +- .../src/module_bindings/insert_vec_u_32_reducer.rs | 2 +- .../src/module_bindings/insert_vec_u_64_reducer.rs | 2 +- .../test-client/src/module_bindings/insert_vec_u_8_reducer.rs | 2 +- .../src/module_bindings/insert_vec_unit_struct_reducer.rs | 2 +- .../test-client/src/module_bindings/large_table_table.rs | 2 +- .../tests/test-client/src/module_bindings/large_table_type.rs | 2 +- crates/sdk/tests/test-client/src/module_bindings/mod.rs | 2 +- .../test-client/src/module_bindings/no_op_succeeds_reducer.rs | 2 +- .../test-client/src/module_bindings/one_address_table.rs | 2 +- .../tests/test-client/src/module_bindings/one_address_type.rs | 2 +- .../tests/test-client/src/module_bindings/one_bool_table.rs | 2 +- .../tests/test-client/src/module_bindings/one_bool_type.rs | 2 +- .../test-client/src/module_bindings/one_byte_struct_table.rs | 2 +- .../test-client/src/module_bindings/one_byte_struct_type.rs | 2 +- .../src/module_bindings/one_enum_with_payload_table.rs | 2 +- .../src/module_bindings/one_enum_with_payload_type.rs | 2 +- .../src/module_bindings/one_every_primitive_struct_table.rs | 2 +- .../src/module_bindings/one_every_primitive_struct_type.rs | 2 +- .../src/module_bindings/one_every_vec_struct_table.rs | 2 +- .../src/module_bindings/one_every_vec_struct_type.rs | 2 +- .../tests/test-client/src/module_bindings/one_f_32_table.rs | 2 +- .../tests/test-client/src/module_bindings/one_f_32_type.rs | 2 +- .../tests/test-client/src/module_bindings/one_f_64_table.rs | 2 +- .../tests/test-client/src/module_bindings/one_f_64_type.rs | 2 +- .../tests/test-client/src/module_bindings/one_i_128_table.rs | 2 +- .../tests/test-client/src/module_bindings/one_i_128_type.rs | 2 +- .../tests/test-client/src/module_bindings/one_i_16_table.rs | 2 +- .../tests/test-client/src/module_bindings/one_i_16_type.rs | 2 +- .../tests/test-client/src/module_bindings/one_i_256_table.rs | 2 +- .../tests/test-client/src/module_bindings/one_i_256_type.rs | 2 +- .../tests/test-client/src/module_bindings/one_i_32_table.rs | 2 +- .../tests/test-client/src/module_bindings/one_i_32_type.rs | 2 +- .../tests/test-client/src/module_bindings/one_i_64_table.rs | 2 +- .../tests/test-client/src/module_bindings/one_i_64_type.rs | 2 +- .../tests/test-client/src/module_bindings/one_i_8_table.rs | 2 +- .../sdk/tests/test-client/src/module_bindings/one_i_8_type.rs | 2 +- .../test-client/src/module_bindings/one_identity_table.rs | 2 +- .../test-client/src/module_bindings/one_identity_type.rs | 2 +- .../test-client/src/module_bindings/one_simple_enum_table.rs | 2 +- .../test-client/src/module_bindings/one_simple_enum_type.rs | 2 +- .../tests/test-client/src/module_bindings/one_string_table.rs | 2 +- .../tests/test-client/src/module_bindings/one_string_type.rs | 2 +- .../tests/test-client/src/module_bindings/one_u_128_table.rs | 2 +- .../tests/test-client/src/module_bindings/one_u_128_type.rs | 2 +- .../tests/test-client/src/module_bindings/one_u_16_table.rs | 2 +- .../tests/test-client/src/module_bindings/one_u_16_type.rs | 2 +- .../tests/test-client/src/module_bindings/one_u_256_table.rs | 2 +- .../tests/test-client/src/module_bindings/one_u_256_type.rs | 2 +- .../tests/test-client/src/module_bindings/one_u_32_table.rs | 2 +- .../tests/test-client/src/module_bindings/one_u_32_type.rs | 2 +- .../tests/test-client/src/module_bindings/one_u_64_table.rs | 2 +- .../tests/test-client/src/module_bindings/one_u_64_type.rs | 2 +- .../tests/test-client/src/module_bindings/one_u_8_table.rs | 2 +- .../sdk/tests/test-client/src/module_bindings/one_u_8_type.rs | 2 +- .../test-client/src/module_bindings/one_unit_struct_table.rs | 2 +- .../test-client/src/module_bindings/one_unit_struct_type.rs | 2 +- .../module_bindings/option_every_primitive_struct_table.rs | 2 +- .../src/module_bindings/option_every_primitive_struct_type.rs | 2 +- .../test-client/src/module_bindings/option_i_32_table.rs | 2 +- .../tests/test-client/src/module_bindings/option_i_32_type.rs | 2 +- .../test-client/src/module_bindings/option_identity_table.rs | 2 +- .../test-client/src/module_bindings/option_identity_type.rs | 2 +- .../src/module_bindings/option_simple_enum_table.rs | 2 +- .../src/module_bindings/option_simple_enum_type.rs | 2 +- .../test-client/src/module_bindings/option_string_table.rs | 2 +- .../test-client/src/module_bindings/option_string_type.rs | 2 +- .../src/module_bindings/option_vec_option_i_32_table.rs | 2 +- .../src/module_bindings/option_vec_option_i_32_type.rs | 2 +- .../tests/test-client/src/module_bindings/pk_address_table.rs | 2 +- .../tests/test-client/src/module_bindings/pk_address_type.rs | 2 +- .../tests/test-client/src/module_bindings/pk_bool_table.rs | 2 +- .../sdk/tests/test-client/src/module_bindings/pk_bool_type.rs | 2 +- .../tests/test-client/src/module_bindings/pk_i_128_table.rs | 2 +- .../tests/test-client/src/module_bindings/pk_i_128_type.rs | 2 +- .../tests/test-client/src/module_bindings/pk_i_16_table.rs | 2 +- .../sdk/tests/test-client/src/module_bindings/pk_i_16_type.rs | 2 +- .../tests/test-client/src/module_bindings/pk_i_256_table.rs | 2 +- .../tests/test-client/src/module_bindings/pk_i_256_type.rs | 2 +- .../tests/test-client/src/module_bindings/pk_i_32_table.rs | 2 +- .../sdk/tests/test-client/src/module_bindings/pk_i_32_type.rs | 2 +- .../tests/test-client/src/module_bindings/pk_i_64_table.rs | 2 +- .../sdk/tests/test-client/src/module_bindings/pk_i_64_type.rs | 2 +- .../sdk/tests/test-client/src/module_bindings/pk_i_8_table.rs | 2 +- .../sdk/tests/test-client/src/module_bindings/pk_i_8_type.rs | 2 +- .../test-client/src/module_bindings/pk_identity_table.rs | 2 +- .../tests/test-client/src/module_bindings/pk_identity_type.rs | 2 +- .../tests/test-client/src/module_bindings/pk_string_table.rs | 2 +- .../tests/test-client/src/module_bindings/pk_string_type.rs | 2 +- .../tests/test-client/src/module_bindings/pk_u_128_table.rs | 2 +- .../tests/test-client/src/module_bindings/pk_u_128_type.rs | 2 +- .../tests/test-client/src/module_bindings/pk_u_16_table.rs | 2 +- .../sdk/tests/test-client/src/module_bindings/pk_u_16_type.rs | 2 +- .../tests/test-client/src/module_bindings/pk_u_256_table.rs | 2 +- .../tests/test-client/src/module_bindings/pk_u_256_type.rs | 2 +- .../tests/test-client/src/module_bindings/pk_u_32_table.rs | 2 +- .../sdk/tests/test-client/src/module_bindings/pk_u_32_type.rs | 2 +- .../tests/test-client/src/module_bindings/pk_u_64_table.rs | 2 +- .../sdk/tests/test-client/src/module_bindings/pk_u_64_type.rs | 2 +- .../sdk/tests/test-client/src/module_bindings/pk_u_8_table.rs | 2 +- .../sdk/tests/test-client/src/module_bindings/pk_u_8_type.rs | 2 +- .../test-client/src/module_bindings/scheduled_table_table.rs | 4 ++-- .../test-client/src/module_bindings/scheduled_table_type.rs | 4 ++-- .../src/module_bindings/send_scheduled_message_reducer.rs | 4 ++-- .../tests/test-client/src/module_bindings/simple_enum_type.rs | 2 +- .../src/module_bindings/table_holds_table_table.rs | 2 +- .../test-client/src/module_bindings/table_holds_table_type.rs | 2 +- .../test-client/src/module_bindings/unique_address_table.rs | 2 +- .../test-client/src/module_bindings/unique_address_type.rs | 2 +- .../test-client/src/module_bindings/unique_bool_table.rs | 2 +- .../tests/test-client/src/module_bindings/unique_bool_type.rs | 2 +- .../test-client/src/module_bindings/unique_i_128_table.rs | 2 +- .../test-client/src/module_bindings/unique_i_128_type.rs | 2 +- .../test-client/src/module_bindings/unique_i_16_table.rs | 2 +- .../tests/test-client/src/module_bindings/unique_i_16_type.rs | 2 +- .../test-client/src/module_bindings/unique_i_256_table.rs | 2 +- .../test-client/src/module_bindings/unique_i_256_type.rs | 2 +- .../test-client/src/module_bindings/unique_i_32_table.rs | 2 +- .../tests/test-client/src/module_bindings/unique_i_32_type.rs | 2 +- .../test-client/src/module_bindings/unique_i_64_table.rs | 2 +- .../tests/test-client/src/module_bindings/unique_i_64_type.rs | 2 +- .../tests/test-client/src/module_bindings/unique_i_8_table.rs | 2 +- .../tests/test-client/src/module_bindings/unique_i_8_type.rs | 2 +- .../test-client/src/module_bindings/unique_identity_table.rs | 2 +- .../test-client/src/module_bindings/unique_identity_type.rs | 2 +- .../test-client/src/module_bindings/unique_string_table.rs | 2 +- .../test-client/src/module_bindings/unique_string_type.rs | 2 +- .../test-client/src/module_bindings/unique_u_128_table.rs | 2 +- .../test-client/src/module_bindings/unique_u_128_type.rs | 2 +- .../test-client/src/module_bindings/unique_u_16_table.rs | 2 +- .../tests/test-client/src/module_bindings/unique_u_16_type.rs | 2 +- .../test-client/src/module_bindings/unique_u_256_table.rs | 2 +- .../test-client/src/module_bindings/unique_u_256_type.rs | 2 +- .../test-client/src/module_bindings/unique_u_32_table.rs | 2 +- .../tests/test-client/src/module_bindings/unique_u_32_type.rs | 2 +- .../test-client/src/module_bindings/unique_u_64_table.rs | 2 +- .../tests/test-client/src/module_bindings/unique_u_64_type.rs | 2 +- .../tests/test-client/src/module_bindings/unique_u_8_table.rs | 2 +- .../tests/test-client/src/module_bindings/unique_u_8_type.rs | 2 +- .../tests/test-client/src/module_bindings/unit_struct_type.rs | 2 +- .../src/module_bindings/update_pk_address_reducer.rs | 2 +- .../test-client/src/module_bindings/update_pk_bool_reducer.rs | 2 +- .../src/module_bindings/update_pk_i_128_reducer.rs | 2 +- .../test-client/src/module_bindings/update_pk_i_16_reducer.rs | 2 +- .../src/module_bindings/update_pk_i_256_reducer.rs | 2 +- .../test-client/src/module_bindings/update_pk_i_32_reducer.rs | 2 +- .../test-client/src/module_bindings/update_pk_i_64_reducer.rs | 2 +- .../test-client/src/module_bindings/update_pk_i_8_reducer.rs | 2 +- .../src/module_bindings/update_pk_identity_reducer.rs | 2 +- .../src/module_bindings/update_pk_string_reducer.rs | 2 +- .../src/module_bindings/update_pk_u_128_reducer.rs | 2 +- .../test-client/src/module_bindings/update_pk_u_16_reducer.rs | 2 +- .../src/module_bindings/update_pk_u_256_reducer.rs | 2 +- .../test-client/src/module_bindings/update_pk_u_32_reducer.rs | 2 +- .../test-client/src/module_bindings/update_pk_u_64_reducer.rs | 2 +- .../test-client/src/module_bindings/update_pk_u_8_reducer.rs | 2 +- .../src/module_bindings/update_unique_address_reducer.rs | 2 +- .../src/module_bindings/update_unique_bool_reducer.rs | 2 +- .../src/module_bindings/update_unique_i_128_reducer.rs | 2 +- .../src/module_bindings/update_unique_i_16_reducer.rs | 2 +- .../src/module_bindings/update_unique_i_256_reducer.rs | 2 +- .../src/module_bindings/update_unique_i_32_reducer.rs | 2 +- .../src/module_bindings/update_unique_i_64_reducer.rs | 2 +- .../src/module_bindings/update_unique_i_8_reducer.rs | 2 +- .../src/module_bindings/update_unique_identity_reducer.rs | 2 +- .../src/module_bindings/update_unique_string_reducer.rs | 2 +- .../src/module_bindings/update_unique_u_128_reducer.rs | 2 +- .../src/module_bindings/update_unique_u_16_reducer.rs | 2 +- .../src/module_bindings/update_unique_u_256_reducer.rs | 2 +- .../src/module_bindings/update_unique_u_32_reducer.rs | 2 +- .../src/module_bindings/update_unique_u_64_reducer.rs | 2 +- .../src/module_bindings/update_unique_u_8_reducer.rs | 2 +- .../test-client/src/module_bindings/vec_address_table.rs | 2 +- .../tests/test-client/src/module_bindings/vec_address_type.rs | 2 +- .../tests/test-client/src/module_bindings/vec_bool_table.rs | 2 +- .../tests/test-client/src/module_bindings/vec_bool_type.rs | 2 +- .../test-client/src/module_bindings/vec_byte_struct_table.rs | 2 +- .../test-client/src/module_bindings/vec_byte_struct_type.rs | 2 +- .../src/module_bindings/vec_enum_with_payload_table.rs | 2 +- .../src/module_bindings/vec_enum_with_payload_type.rs | 2 +- .../src/module_bindings/vec_every_primitive_struct_table.rs | 2 +- .../src/module_bindings/vec_every_primitive_struct_type.rs | 2 +- .../src/module_bindings/vec_every_vec_struct_table.rs | 2 +- .../src/module_bindings/vec_every_vec_struct_type.rs | 2 +- .../tests/test-client/src/module_bindings/vec_f_32_table.rs | 2 +- .../tests/test-client/src/module_bindings/vec_f_32_type.rs | 2 +- .../tests/test-client/src/module_bindings/vec_f_64_table.rs | 2 +- .../tests/test-client/src/module_bindings/vec_f_64_type.rs | 2 +- .../tests/test-client/src/module_bindings/vec_i_128_table.rs | 2 +- .../tests/test-client/src/module_bindings/vec_i_128_type.rs | 2 +- .../tests/test-client/src/module_bindings/vec_i_16_table.rs | 2 +- .../tests/test-client/src/module_bindings/vec_i_16_type.rs | 2 +- .../tests/test-client/src/module_bindings/vec_i_256_table.rs | 2 +- .../tests/test-client/src/module_bindings/vec_i_256_type.rs | 2 +- .../tests/test-client/src/module_bindings/vec_i_32_table.rs | 2 +- .../tests/test-client/src/module_bindings/vec_i_32_type.rs | 2 +- .../tests/test-client/src/module_bindings/vec_i_64_table.rs | 2 +- .../tests/test-client/src/module_bindings/vec_i_64_type.rs | 2 +- .../tests/test-client/src/module_bindings/vec_i_8_table.rs | 2 +- .../sdk/tests/test-client/src/module_bindings/vec_i_8_type.rs | 2 +- .../test-client/src/module_bindings/vec_identity_table.rs | 2 +- .../test-client/src/module_bindings/vec_identity_type.rs | 2 +- .../test-client/src/module_bindings/vec_simple_enum_table.rs | 2 +- .../test-client/src/module_bindings/vec_simple_enum_type.rs | 2 +- .../tests/test-client/src/module_bindings/vec_string_table.rs | 2 +- .../tests/test-client/src/module_bindings/vec_string_type.rs | 2 +- .../tests/test-client/src/module_bindings/vec_u_128_table.rs | 2 +- .../tests/test-client/src/module_bindings/vec_u_128_type.rs | 2 +- .../tests/test-client/src/module_bindings/vec_u_16_table.rs | 2 +- .../tests/test-client/src/module_bindings/vec_u_16_type.rs | 2 +- .../tests/test-client/src/module_bindings/vec_u_256_table.rs | 2 +- .../tests/test-client/src/module_bindings/vec_u_256_type.rs | 2 +- .../tests/test-client/src/module_bindings/vec_u_32_table.rs | 2 +- .../tests/test-client/src/module_bindings/vec_u_32_type.rs | 2 +- .../tests/test-client/src/module_bindings/vec_u_64_table.rs | 2 +- .../tests/test-client/src/module_bindings/vec_u_64_type.rs | 2 +- .../tests/test-client/src/module_bindings/vec_u_8_table.rs | 2 +- .../sdk/tests/test-client/src/module_bindings/vec_u_8_type.rs | 2 +- .../test-client/src/module_bindings/vec_unit_struct_table.rs | 2 +- .../test-client/src/module_bindings/vec_unit_struct_type.rs | 2 +- 353 files changed, 361 insertions(+), 361 deletions(-) diff --git a/crates/sdk/tests/test-client/src/module_bindings/byte_struct_type.rs b/crates/sdk/tests/test-client/src/module_bindings/byte_struct_type.rs index c5fd30b759b..92ee50861a7 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/byte_struct_type.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/byte_struct_type.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/delete_large_table_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/delete_large_table_reducer.rs index 0fea77eea6a..4d94e21b94d 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/delete_large_table_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/delete_large_table_reducer.rs @@ -1,7 +1,7 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. -#![allow(unused)] +#![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ self as __sdk, __lib, __sats, __ws, anyhow::{self as __anyhow, Context as _}, diff --git a/crates/sdk/tests/test-client/src/module_bindings/delete_pk_address_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/delete_pk_address_reducer.rs index e6102243531..525cf570367 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/delete_pk_address_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/delete_pk_address_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/delete_pk_bool_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/delete_pk_bool_reducer.rs index ff5425a8bc0..bfc5f1b4f8a 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/delete_pk_bool_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/delete_pk_bool_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/delete_pk_i_128_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/delete_pk_i_128_reducer.rs index bfaa2955688..8fa02360b08 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/delete_pk_i_128_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/delete_pk_i_128_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/delete_pk_i_16_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/delete_pk_i_16_reducer.rs index 5e743ddddd4..815d62b217a 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/delete_pk_i_16_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/delete_pk_i_16_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/delete_pk_i_256_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/delete_pk_i_256_reducer.rs index 73baddf540a..1f58609cad5 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/delete_pk_i_256_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/delete_pk_i_256_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/delete_pk_i_32_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/delete_pk_i_32_reducer.rs index 0951b6adde2..a355dc3ade5 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/delete_pk_i_32_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/delete_pk_i_32_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/delete_pk_i_64_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/delete_pk_i_64_reducer.rs index 2ad6fc0d931..82653a22c9e 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/delete_pk_i_64_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/delete_pk_i_64_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/delete_pk_i_8_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/delete_pk_i_8_reducer.rs index aaaff26ff8d..fa715781e12 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/delete_pk_i_8_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/delete_pk_i_8_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/delete_pk_identity_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/delete_pk_identity_reducer.rs index 691c49e9819..e81f812d76c 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/delete_pk_identity_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/delete_pk_identity_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/delete_pk_string_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/delete_pk_string_reducer.rs index 5ae35a64df7..48c04b53e4b 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/delete_pk_string_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/delete_pk_string_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/delete_pk_u_128_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/delete_pk_u_128_reducer.rs index 5a20e5330a6..ec6afa4a5c4 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/delete_pk_u_128_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/delete_pk_u_128_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/delete_pk_u_16_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/delete_pk_u_16_reducer.rs index a9d219e920f..441b6791c3d 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/delete_pk_u_16_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/delete_pk_u_16_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/delete_pk_u_256_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/delete_pk_u_256_reducer.rs index 54f9733c1c5..84d2a9c7e9c 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/delete_pk_u_256_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/delete_pk_u_256_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/delete_pk_u_32_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/delete_pk_u_32_reducer.rs index b351df7904d..0e4058bec72 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/delete_pk_u_32_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/delete_pk_u_32_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/delete_pk_u_64_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/delete_pk_u_64_reducer.rs index 1a75bc90226..62dda6f1f79 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/delete_pk_u_64_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/delete_pk_u_64_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/delete_pk_u_8_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/delete_pk_u_8_reducer.rs index 7dfffc24d38..3925f01fbd0 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/delete_pk_u_8_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/delete_pk_u_8_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/delete_unique_address_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/delete_unique_address_reducer.rs index c5f5fa209f8..d2d102e1326 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/delete_unique_address_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/delete_unique_address_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/delete_unique_bool_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/delete_unique_bool_reducer.rs index 6506d1fa91a..0c78a875e2c 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/delete_unique_bool_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/delete_unique_bool_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/delete_unique_i_128_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/delete_unique_i_128_reducer.rs index c2f8ae65edf..cafdbfb2d6d 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/delete_unique_i_128_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/delete_unique_i_128_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/delete_unique_i_16_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/delete_unique_i_16_reducer.rs index 1baf42d4851..519115979b0 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/delete_unique_i_16_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/delete_unique_i_16_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/delete_unique_i_256_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/delete_unique_i_256_reducer.rs index b6d8c8f3824..a33aba4480c 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/delete_unique_i_256_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/delete_unique_i_256_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/delete_unique_i_32_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/delete_unique_i_32_reducer.rs index 4f5fc074aa6..3be6590aebf 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/delete_unique_i_32_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/delete_unique_i_32_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/delete_unique_i_64_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/delete_unique_i_64_reducer.rs index bac7702d0ce..c042219c449 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/delete_unique_i_64_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/delete_unique_i_64_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/delete_unique_i_8_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/delete_unique_i_8_reducer.rs index 8738db50a9e..8c075f4ddb6 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/delete_unique_i_8_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/delete_unique_i_8_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/delete_unique_identity_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/delete_unique_identity_reducer.rs index c11388a6bbd..dd9ce51f1a4 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/delete_unique_identity_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/delete_unique_identity_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/delete_unique_string_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/delete_unique_string_reducer.rs index d3968add368..51d70004ee4 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/delete_unique_string_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/delete_unique_string_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/delete_unique_u_128_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/delete_unique_u_128_reducer.rs index e3eca93b225..6eb3d9b4d99 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/delete_unique_u_128_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/delete_unique_u_128_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/delete_unique_u_16_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/delete_unique_u_16_reducer.rs index 65c8c4bb2ad..b25ab5e09b3 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/delete_unique_u_16_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/delete_unique_u_16_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/delete_unique_u_256_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/delete_unique_u_256_reducer.rs index ca2093f7d84..afa976e442a 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/delete_unique_u_256_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/delete_unique_u_256_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/delete_unique_u_32_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/delete_unique_u_32_reducer.rs index 6fd5afb6b88..b485e5edf24 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/delete_unique_u_32_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/delete_unique_u_32_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/delete_unique_u_64_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/delete_unique_u_64_reducer.rs index c4684cbbe59..f3945639c91 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/delete_unique_u_64_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/delete_unique_u_64_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/delete_unique_u_8_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/delete_unique_u_8_reducer.rs index 8de2d10143b..bd8e88a93f8 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/delete_unique_u_8_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/delete_unique_u_8_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/enum_with_payload_type.rs b/crates/sdk/tests/test-client/src/module_bindings/enum_with_payload_type.rs index 4645b669dfa..d5138b2af33 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/enum_with_payload_type.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/enum_with_payload_type.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/every_primitive_struct_type.rs b/crates/sdk/tests/test-client/src/module_bindings/every_primitive_struct_type.rs index 29d6988fab3..f636f6e3e01 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/every_primitive_struct_type.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/every_primitive_struct_type.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/every_vec_struct_type.rs b/crates/sdk/tests/test-client/src/module_bindings/every_vec_struct_type.rs index baec1db4896..b4aee5f4b0c 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/every_vec_struct_type.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/every_vec_struct_type.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/indexed_table_2_table.rs b/crates/sdk/tests/test-client/src/module_bindings/indexed_table_2_table.rs index 1fa90b9aab6..4bf58929ac7 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/indexed_table_2_table.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/indexed_table_2_table.rs @@ -1,7 +1,7 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. -#![allow(unused)] +#![allow(unused, clippy::all)] use super::indexed_table_2_type::IndexedTable2; use spacetimedb_sdk::__codegen::{ self as __sdk, __lib, __sats, __ws, diff --git a/crates/sdk/tests/test-client/src/module_bindings/indexed_table_2_type.rs b/crates/sdk/tests/test-client/src/module_bindings/indexed_table_2_type.rs index ffcb7ba9cd9..9e3364d21a1 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/indexed_table_2_type.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/indexed_table_2_type.rs @@ -1,7 +1,7 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. -#![allow(unused)] +#![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ self as __sdk, __lib, __sats, __ws, anyhow::{self as __anyhow, Context as _}, diff --git a/crates/sdk/tests/test-client/src/module_bindings/indexed_table_table.rs b/crates/sdk/tests/test-client/src/module_bindings/indexed_table_table.rs index 2e5e209fec8..948ad0d4a2c 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/indexed_table_table.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/indexed_table_table.rs @@ -1,7 +1,7 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. -#![allow(unused)] +#![allow(unused, clippy::all)] use super::indexed_table_type::IndexedTable; use spacetimedb_sdk::__codegen::{ self as __sdk, __lib, __sats, __ws, diff --git a/crates/sdk/tests/test-client/src/module_bindings/indexed_table_type.rs b/crates/sdk/tests/test-client/src/module_bindings/indexed_table_type.rs index 91e70cc981c..fbbc1caaedb 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/indexed_table_type.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/indexed_table_type.rs @@ -1,7 +1,7 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. -#![allow(unused)] +#![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ self as __sdk, __lib, __sats, __ws, anyhow::{self as __anyhow, Context as _}, diff --git a/crates/sdk/tests/test-client/src/module_bindings/insert_caller_one_address_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/insert_caller_one_address_reducer.rs index 2d770b14228..9db76a00f78 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/insert_caller_one_address_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/insert_caller_one_address_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/insert_caller_one_identity_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/insert_caller_one_identity_reducer.rs index a81a4ba57ef..ed0c8d70ea2 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/insert_caller_one_identity_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/insert_caller_one_identity_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/insert_caller_pk_address_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/insert_caller_pk_address_reducer.rs index fdb74a6e528..e394d625ca9 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/insert_caller_pk_address_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/insert_caller_pk_address_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/insert_caller_pk_identity_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/insert_caller_pk_identity_reducer.rs index 46019f4f966..1f6a6120948 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/insert_caller_pk_identity_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/insert_caller_pk_identity_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/insert_caller_unique_address_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/insert_caller_unique_address_reducer.rs index b261c0d7e5b..a0be6317c4f 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/insert_caller_unique_address_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/insert_caller_unique_address_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/insert_caller_unique_identity_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/insert_caller_unique_identity_reducer.rs index 8c2aa8d8fce..5ac73659322 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/insert_caller_unique_identity_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/insert_caller_unique_identity_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/insert_caller_vec_address_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/insert_caller_vec_address_reducer.rs index 2125615ca78..f9876fc1d99 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/insert_caller_vec_address_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/insert_caller_vec_address_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/insert_caller_vec_identity_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/insert_caller_vec_identity_reducer.rs index 632f23a6f5d..8583f3f3bf1 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/insert_caller_vec_identity_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/insert_caller_vec_identity_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/insert_large_table_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/insert_large_table_reducer.rs index a266e255a5a..51cb48354b6 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/insert_large_table_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/insert_large_table_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/insert_one_address_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/insert_one_address_reducer.rs index d35b71a8f99..3070431cc13 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/insert_one_address_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/insert_one_address_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/insert_one_bool_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/insert_one_bool_reducer.rs index d9c97267a06..9e74a46814e 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/insert_one_bool_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/insert_one_bool_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/insert_one_byte_struct_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/insert_one_byte_struct_reducer.rs index e80c4149e9c..e591f4ae238 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/insert_one_byte_struct_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/insert_one_byte_struct_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/insert_one_enum_with_payload_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/insert_one_enum_with_payload_reducer.rs index 7e6f19ffaaa..26f45802114 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/insert_one_enum_with_payload_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/insert_one_enum_with_payload_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/insert_one_every_primitive_struct_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/insert_one_every_primitive_struct_reducer.rs index daf98a04b2d..962b5c0740e 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/insert_one_every_primitive_struct_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/insert_one_every_primitive_struct_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/insert_one_every_vec_struct_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/insert_one_every_vec_struct_reducer.rs index 890d01f661e..7787396281f 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/insert_one_every_vec_struct_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/insert_one_every_vec_struct_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/insert_one_f_32_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/insert_one_f_32_reducer.rs index 4d33724a317..2cf35ec5f49 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/insert_one_f_32_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/insert_one_f_32_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/insert_one_f_64_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/insert_one_f_64_reducer.rs index 3fb0c4ab154..51a2901b15e 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/insert_one_f_64_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/insert_one_f_64_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/insert_one_i_128_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/insert_one_i_128_reducer.rs index 57cf0b9ecaa..48f9e75881b 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/insert_one_i_128_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/insert_one_i_128_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/insert_one_i_16_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/insert_one_i_16_reducer.rs index dfa9e370459..ee6a38a756c 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/insert_one_i_16_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/insert_one_i_16_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/insert_one_i_256_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/insert_one_i_256_reducer.rs index 1d7a945d80f..fcc3d510c49 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/insert_one_i_256_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/insert_one_i_256_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/insert_one_i_32_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/insert_one_i_32_reducer.rs index 4375bc61c21..697a34119d5 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/insert_one_i_32_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/insert_one_i_32_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/insert_one_i_64_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/insert_one_i_64_reducer.rs index b78061946ae..9e89e95409b 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/insert_one_i_64_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/insert_one_i_64_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/insert_one_i_8_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/insert_one_i_8_reducer.rs index 52b47033267..5b1cbaeaf3f 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/insert_one_i_8_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/insert_one_i_8_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/insert_one_identity_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/insert_one_identity_reducer.rs index 39ed922f2d9..188605b2b0c 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/insert_one_identity_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/insert_one_identity_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/insert_one_simple_enum_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/insert_one_simple_enum_reducer.rs index 97152d07cd1..56c84381bfd 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/insert_one_simple_enum_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/insert_one_simple_enum_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/insert_one_string_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/insert_one_string_reducer.rs index f8dd988a6c3..f529cb15253 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/insert_one_string_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/insert_one_string_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/insert_one_u_128_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/insert_one_u_128_reducer.rs index f06609dba11..da1b2d985c2 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/insert_one_u_128_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/insert_one_u_128_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/insert_one_u_16_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/insert_one_u_16_reducer.rs index 6f51172f962..97ec576054c 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/insert_one_u_16_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/insert_one_u_16_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/insert_one_u_256_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/insert_one_u_256_reducer.rs index 1f6a2328b61..4ee72e0fa66 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/insert_one_u_256_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/insert_one_u_256_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/insert_one_u_32_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/insert_one_u_32_reducer.rs index ace4946417e..4fdd4882413 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/insert_one_u_32_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/insert_one_u_32_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/insert_one_u_64_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/insert_one_u_64_reducer.rs index a7a4377a25e..354349c3d3c 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/insert_one_u_64_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/insert_one_u_64_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/insert_one_u_8_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/insert_one_u_8_reducer.rs index b3fab1a58a2..6997291a5b9 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/insert_one_u_8_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/insert_one_u_8_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/insert_one_unit_struct_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/insert_one_unit_struct_reducer.rs index 9aa9fba7b8c..a0449be5bcd 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/insert_one_unit_struct_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/insert_one_unit_struct_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/insert_option_every_primitive_struct_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/insert_option_every_primitive_struct_reducer.rs index cd623ab5780..fdd9293e013 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/insert_option_every_primitive_struct_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/insert_option_every_primitive_struct_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/insert_option_i_32_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/insert_option_i_32_reducer.rs index 661bc44d535..921f81b090c 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/insert_option_i_32_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/insert_option_i_32_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/insert_option_identity_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/insert_option_identity_reducer.rs index db21e005987..2d83ba9375a 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/insert_option_identity_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/insert_option_identity_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/insert_option_simple_enum_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/insert_option_simple_enum_reducer.rs index 6535618c11d..d2f337e7523 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/insert_option_simple_enum_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/insert_option_simple_enum_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/insert_option_string_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/insert_option_string_reducer.rs index c5cb5fbd192..4a79ece5d79 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/insert_option_string_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/insert_option_string_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/insert_option_vec_option_i_32_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/insert_option_vec_option_i_32_reducer.rs index fbabce0c30f..33508389247 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/insert_option_vec_option_i_32_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/insert_option_vec_option_i_32_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/insert_pk_address_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/insert_pk_address_reducer.rs index 05e01a0618b..f7babfa682e 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/insert_pk_address_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/insert_pk_address_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/insert_pk_bool_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/insert_pk_bool_reducer.rs index 4b41e6a3c67..9ae246c1b23 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/insert_pk_bool_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/insert_pk_bool_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/insert_pk_i_128_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/insert_pk_i_128_reducer.rs index e1f3ce479ff..abeaa0eb0fe 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/insert_pk_i_128_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/insert_pk_i_128_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/insert_pk_i_16_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/insert_pk_i_16_reducer.rs index 4a0c190066b..764d1907fac 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/insert_pk_i_16_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/insert_pk_i_16_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/insert_pk_i_256_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/insert_pk_i_256_reducer.rs index 696735a6bea..09a30d8621f 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/insert_pk_i_256_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/insert_pk_i_256_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/insert_pk_i_32_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/insert_pk_i_32_reducer.rs index ce20a840b54..2c33c02c2ac 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/insert_pk_i_32_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/insert_pk_i_32_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/insert_pk_i_64_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/insert_pk_i_64_reducer.rs index 471b9027f17..2e47bc50942 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/insert_pk_i_64_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/insert_pk_i_64_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/insert_pk_i_8_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/insert_pk_i_8_reducer.rs index 63bf150d1f7..961363d0415 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/insert_pk_i_8_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/insert_pk_i_8_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/insert_pk_identity_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/insert_pk_identity_reducer.rs index e125de5ee45..2622918065e 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/insert_pk_identity_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/insert_pk_identity_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/insert_pk_string_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/insert_pk_string_reducer.rs index da1d54ed482..4805ddaf0f3 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/insert_pk_string_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/insert_pk_string_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/insert_pk_u_128_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/insert_pk_u_128_reducer.rs index fe4fe1b4a46..ce3e661376c 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/insert_pk_u_128_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/insert_pk_u_128_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/insert_pk_u_16_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/insert_pk_u_16_reducer.rs index 6913ac64da3..8959a33dab7 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/insert_pk_u_16_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/insert_pk_u_16_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/insert_pk_u_256_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/insert_pk_u_256_reducer.rs index 2bc43e48e4e..d993ae552d2 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/insert_pk_u_256_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/insert_pk_u_256_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/insert_pk_u_32_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/insert_pk_u_32_reducer.rs index 763f58194eb..173aba69a49 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/insert_pk_u_32_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/insert_pk_u_32_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/insert_pk_u_64_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/insert_pk_u_64_reducer.rs index 7fa70dcee58..60d57c52fd8 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/insert_pk_u_64_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/insert_pk_u_64_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/insert_pk_u_8_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/insert_pk_u_8_reducer.rs index 43d0ca10215..b8b61e64e83 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/insert_pk_u_8_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/insert_pk_u_8_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/insert_primitives_as_strings_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/insert_primitives_as_strings_reducer.rs index 7bc6106bcd2..98b57fef4f9 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/insert_primitives_as_strings_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/insert_primitives_as_strings_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/insert_table_holds_table_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/insert_table_holds_table_reducer.rs index 678ceccb5ab..02f11d35502 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/insert_table_holds_table_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/insert_table_holds_table_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/insert_unique_address_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/insert_unique_address_reducer.rs index 19784993daa..3e725f4b544 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/insert_unique_address_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/insert_unique_address_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/insert_unique_bool_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/insert_unique_bool_reducer.rs index 08d1b0767d4..9f0f0955aa0 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/insert_unique_bool_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/insert_unique_bool_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/insert_unique_i_128_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/insert_unique_i_128_reducer.rs index 2317b84c508..3f3cac76ad2 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/insert_unique_i_128_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/insert_unique_i_128_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/insert_unique_i_16_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/insert_unique_i_16_reducer.rs index 88489d85241..e43ec9d1ba6 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/insert_unique_i_16_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/insert_unique_i_16_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/insert_unique_i_256_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/insert_unique_i_256_reducer.rs index 6840b74cb4a..96ce9ab7819 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/insert_unique_i_256_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/insert_unique_i_256_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/insert_unique_i_32_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/insert_unique_i_32_reducer.rs index a9d704d74c2..7e0c380455d 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/insert_unique_i_32_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/insert_unique_i_32_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/insert_unique_i_64_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/insert_unique_i_64_reducer.rs index a2c4ef0b7ca..be9e6da9915 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/insert_unique_i_64_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/insert_unique_i_64_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/insert_unique_i_8_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/insert_unique_i_8_reducer.rs index 4efa2218ac5..d5effc15c56 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/insert_unique_i_8_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/insert_unique_i_8_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/insert_unique_identity_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/insert_unique_identity_reducer.rs index 739f224638b..3e54c48b950 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/insert_unique_identity_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/insert_unique_identity_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/insert_unique_string_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/insert_unique_string_reducer.rs index 500728491cf..90b7a37c72a 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/insert_unique_string_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/insert_unique_string_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/insert_unique_u_128_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/insert_unique_u_128_reducer.rs index 086d888d0f9..16b65193bca 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/insert_unique_u_128_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/insert_unique_u_128_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/insert_unique_u_16_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/insert_unique_u_16_reducer.rs index 715be058934..86d2bfd1c7d 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/insert_unique_u_16_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/insert_unique_u_16_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/insert_unique_u_256_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/insert_unique_u_256_reducer.rs index c43e3079ca0..3553f02acff 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/insert_unique_u_256_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/insert_unique_u_256_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/insert_unique_u_32_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/insert_unique_u_32_reducer.rs index 79e2861d507..8336b909030 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/insert_unique_u_32_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/insert_unique_u_32_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/insert_unique_u_64_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/insert_unique_u_64_reducer.rs index 49d01d3155b..014ab34113f 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/insert_unique_u_64_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/insert_unique_u_64_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/insert_unique_u_8_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/insert_unique_u_8_reducer.rs index f35018c3e4f..9e1702619cb 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/insert_unique_u_8_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/insert_unique_u_8_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/insert_vec_address_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/insert_vec_address_reducer.rs index 53e1817a605..f9e028166c8 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/insert_vec_address_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/insert_vec_address_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/insert_vec_bool_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/insert_vec_bool_reducer.rs index 2772f2d5ac3..d58ed5cb1ac 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/insert_vec_bool_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/insert_vec_bool_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/insert_vec_byte_struct_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/insert_vec_byte_struct_reducer.rs index a19ed703af0..9460aaa7f3f 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/insert_vec_byte_struct_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/insert_vec_byte_struct_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/insert_vec_enum_with_payload_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/insert_vec_enum_with_payload_reducer.rs index 7c6caa59384..d6e3998f262 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/insert_vec_enum_with_payload_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/insert_vec_enum_with_payload_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/insert_vec_every_primitive_struct_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/insert_vec_every_primitive_struct_reducer.rs index 8e49f504b0e..54065fe90c4 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/insert_vec_every_primitive_struct_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/insert_vec_every_primitive_struct_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/insert_vec_every_vec_struct_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/insert_vec_every_vec_struct_reducer.rs index 7c11b08fce7..f52b8e90a12 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/insert_vec_every_vec_struct_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/insert_vec_every_vec_struct_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/insert_vec_f_32_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/insert_vec_f_32_reducer.rs index d7883386be9..1ac3e75af5c 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/insert_vec_f_32_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/insert_vec_f_32_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/insert_vec_f_64_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/insert_vec_f_64_reducer.rs index 3f62bbb9add..d041b6fa02b 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/insert_vec_f_64_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/insert_vec_f_64_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/insert_vec_i_128_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/insert_vec_i_128_reducer.rs index d994110e25b..388a4c9c4ed 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/insert_vec_i_128_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/insert_vec_i_128_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/insert_vec_i_16_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/insert_vec_i_16_reducer.rs index 5fcafcfdef7..fb461c48abc 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/insert_vec_i_16_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/insert_vec_i_16_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/insert_vec_i_256_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/insert_vec_i_256_reducer.rs index 503cf5a8f78..968fe998f8e 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/insert_vec_i_256_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/insert_vec_i_256_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/insert_vec_i_32_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/insert_vec_i_32_reducer.rs index 13ff3e19e84..0e029600b5c 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/insert_vec_i_32_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/insert_vec_i_32_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/insert_vec_i_64_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/insert_vec_i_64_reducer.rs index c2793f64805..34b5d2a27bf 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/insert_vec_i_64_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/insert_vec_i_64_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/insert_vec_i_8_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/insert_vec_i_8_reducer.rs index f2ccaf5c318..192a05b83c6 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/insert_vec_i_8_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/insert_vec_i_8_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/insert_vec_identity_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/insert_vec_identity_reducer.rs index 93229901bf7..b125a175f87 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/insert_vec_identity_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/insert_vec_identity_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/insert_vec_simple_enum_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/insert_vec_simple_enum_reducer.rs index b0db02d985c..9e8155e0e01 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/insert_vec_simple_enum_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/insert_vec_simple_enum_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/insert_vec_string_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/insert_vec_string_reducer.rs index 9232af49235..faf9e1bdbab 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/insert_vec_string_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/insert_vec_string_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/insert_vec_u_128_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/insert_vec_u_128_reducer.rs index 2e83a2aa1fc..7424de6424f 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/insert_vec_u_128_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/insert_vec_u_128_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/insert_vec_u_16_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/insert_vec_u_16_reducer.rs index 04d280ae4bb..ad30a30f0d8 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/insert_vec_u_16_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/insert_vec_u_16_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/insert_vec_u_256_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/insert_vec_u_256_reducer.rs index fd4ffc0270f..a077f35ed17 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/insert_vec_u_256_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/insert_vec_u_256_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/insert_vec_u_32_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/insert_vec_u_32_reducer.rs index d356c500c63..d1eb14846c2 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/insert_vec_u_32_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/insert_vec_u_32_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/insert_vec_u_64_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/insert_vec_u_64_reducer.rs index 276b599a119..ef80f9e417a 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/insert_vec_u_64_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/insert_vec_u_64_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/insert_vec_u_8_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/insert_vec_u_8_reducer.rs index 1dbc062ea0f..13903200530 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/insert_vec_u_8_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/insert_vec_u_8_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/insert_vec_unit_struct_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/insert_vec_unit_struct_reducer.rs index f50f1fbd259..1c879b970f5 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/insert_vec_unit_struct_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/insert_vec_unit_struct_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/large_table_table.rs b/crates/sdk/tests/test-client/src/module_bindings/large_table_table.rs index 80c4881102b..669c4d4c1a4 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/large_table_table.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/large_table_table.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use super::byte_struct_type::ByteStruct; diff --git a/crates/sdk/tests/test-client/src/module_bindings/large_table_type.rs b/crates/sdk/tests/test-client/src/module_bindings/large_table_type.rs index 2ccc3830951..9e7d05b5cc2 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/large_table_type.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/large_table_type.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/mod.rs b/crates/sdk/tests/test-client/src/module_bindings/mod.rs index 2b3883fca11..b552c2d6de6 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/mod.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/mod.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/no_op_succeeds_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/no_op_succeeds_reducer.rs index 6a4698a4e1b..ff1b2e5dd53 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/no_op_succeeds_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/no_op_succeeds_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/one_address_table.rs b/crates/sdk/tests/test-client/src/module_bindings/one_address_table.rs index 7fd6411b4cb..c8f36c1fe0b 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/one_address_table.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/one_address_table.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use super::one_address_type::OneAddress; diff --git a/crates/sdk/tests/test-client/src/module_bindings/one_address_type.rs b/crates/sdk/tests/test-client/src/module_bindings/one_address_type.rs index 3837af21433..4490f1456cc 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/one_address_type.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/one_address_type.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/one_bool_table.rs b/crates/sdk/tests/test-client/src/module_bindings/one_bool_table.rs index 2a54044d28c..e51b8b84dad 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/one_bool_table.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/one_bool_table.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use super::one_bool_type::OneBool; diff --git a/crates/sdk/tests/test-client/src/module_bindings/one_bool_type.rs b/crates/sdk/tests/test-client/src/module_bindings/one_bool_type.rs index 7656d10cdf7..1d8bc0ef869 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/one_bool_type.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/one_bool_type.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/one_byte_struct_table.rs b/crates/sdk/tests/test-client/src/module_bindings/one_byte_struct_table.rs index 8d8af27e93f..7d98c518f66 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/one_byte_struct_table.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/one_byte_struct_table.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use super::byte_struct_type::ByteStruct; diff --git a/crates/sdk/tests/test-client/src/module_bindings/one_byte_struct_type.rs b/crates/sdk/tests/test-client/src/module_bindings/one_byte_struct_type.rs index 57377a95780..2715619b5c6 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/one_byte_struct_type.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/one_byte_struct_type.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/one_enum_with_payload_table.rs b/crates/sdk/tests/test-client/src/module_bindings/one_enum_with_payload_table.rs index 0aa6f1a171a..449aa1724a8 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/one_enum_with_payload_table.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/one_enum_with_payload_table.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use super::enum_with_payload_type::EnumWithPayload; diff --git a/crates/sdk/tests/test-client/src/module_bindings/one_enum_with_payload_type.rs b/crates/sdk/tests/test-client/src/module_bindings/one_enum_with_payload_type.rs index f021d21574f..0998a3aa6bc 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/one_enum_with_payload_type.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/one_enum_with_payload_type.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/one_every_primitive_struct_table.rs b/crates/sdk/tests/test-client/src/module_bindings/one_every_primitive_struct_table.rs index b35334270ae..266582d171b 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/one_every_primitive_struct_table.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/one_every_primitive_struct_table.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use super::every_primitive_struct_type::EveryPrimitiveStruct; diff --git a/crates/sdk/tests/test-client/src/module_bindings/one_every_primitive_struct_type.rs b/crates/sdk/tests/test-client/src/module_bindings/one_every_primitive_struct_type.rs index 305b37d69f0..480cf8ca32f 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/one_every_primitive_struct_type.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/one_every_primitive_struct_type.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/one_every_vec_struct_table.rs b/crates/sdk/tests/test-client/src/module_bindings/one_every_vec_struct_table.rs index 38388fcab74..1bd0f3e2a4f 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/one_every_vec_struct_table.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/one_every_vec_struct_table.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use super::every_vec_struct_type::EveryVecStruct; diff --git a/crates/sdk/tests/test-client/src/module_bindings/one_every_vec_struct_type.rs b/crates/sdk/tests/test-client/src/module_bindings/one_every_vec_struct_type.rs index abdc53ebeb0..51f5d44a85a 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/one_every_vec_struct_type.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/one_every_vec_struct_type.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/one_f_32_table.rs b/crates/sdk/tests/test-client/src/module_bindings/one_f_32_table.rs index 23e1cbcf296..c5671c38c4b 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/one_f_32_table.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/one_f_32_table.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use super::one_f_32_type::OneF32; diff --git a/crates/sdk/tests/test-client/src/module_bindings/one_f_32_type.rs b/crates/sdk/tests/test-client/src/module_bindings/one_f_32_type.rs index 2d402aa1e25..8ea5e7e3cdf 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/one_f_32_type.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/one_f_32_type.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/one_f_64_table.rs b/crates/sdk/tests/test-client/src/module_bindings/one_f_64_table.rs index 78e71e53600..d492c8e9a43 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/one_f_64_table.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/one_f_64_table.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use super::one_f_64_type::OneF64; diff --git a/crates/sdk/tests/test-client/src/module_bindings/one_f_64_type.rs b/crates/sdk/tests/test-client/src/module_bindings/one_f_64_type.rs index 6e00cefe9ed..420fa9aba67 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/one_f_64_type.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/one_f_64_type.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/one_i_128_table.rs b/crates/sdk/tests/test-client/src/module_bindings/one_i_128_table.rs index 5bb984be538..78e982a9aef 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/one_i_128_table.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/one_i_128_table.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use super::one_i_128_type::OneI128; diff --git a/crates/sdk/tests/test-client/src/module_bindings/one_i_128_type.rs b/crates/sdk/tests/test-client/src/module_bindings/one_i_128_type.rs index a448d82449c..a5299ce437a 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/one_i_128_type.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/one_i_128_type.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/one_i_16_table.rs b/crates/sdk/tests/test-client/src/module_bindings/one_i_16_table.rs index 841e987ce98..6fc5d565069 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/one_i_16_table.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/one_i_16_table.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use super::one_i_16_type::OneI16; diff --git a/crates/sdk/tests/test-client/src/module_bindings/one_i_16_type.rs b/crates/sdk/tests/test-client/src/module_bindings/one_i_16_type.rs index dd9190a0bf0..70d7de7f74d 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/one_i_16_type.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/one_i_16_type.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/one_i_256_table.rs b/crates/sdk/tests/test-client/src/module_bindings/one_i_256_table.rs index ccb92b804b1..447e2eb1cc3 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/one_i_256_table.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/one_i_256_table.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use super::one_i_256_type::OneI256; diff --git a/crates/sdk/tests/test-client/src/module_bindings/one_i_256_type.rs b/crates/sdk/tests/test-client/src/module_bindings/one_i_256_type.rs index f072866e467..6efee2c4fa7 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/one_i_256_type.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/one_i_256_type.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/one_i_32_table.rs b/crates/sdk/tests/test-client/src/module_bindings/one_i_32_table.rs index 65dcb7ac9d8..2b868d9955e 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/one_i_32_table.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/one_i_32_table.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use super::one_i_32_type::OneI32; diff --git a/crates/sdk/tests/test-client/src/module_bindings/one_i_32_type.rs b/crates/sdk/tests/test-client/src/module_bindings/one_i_32_type.rs index 03c4b0357e3..05ff455fe13 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/one_i_32_type.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/one_i_32_type.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/one_i_64_table.rs b/crates/sdk/tests/test-client/src/module_bindings/one_i_64_table.rs index 12f24e31067..52b9fa9c399 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/one_i_64_table.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/one_i_64_table.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use super::one_i_64_type::OneI64; diff --git a/crates/sdk/tests/test-client/src/module_bindings/one_i_64_type.rs b/crates/sdk/tests/test-client/src/module_bindings/one_i_64_type.rs index 6d80b76147f..917f510a32c 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/one_i_64_type.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/one_i_64_type.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/one_i_8_table.rs b/crates/sdk/tests/test-client/src/module_bindings/one_i_8_table.rs index bf5363e4143..0f898a41957 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/one_i_8_table.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/one_i_8_table.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use super::one_i_8_type::OneI8; diff --git a/crates/sdk/tests/test-client/src/module_bindings/one_i_8_type.rs b/crates/sdk/tests/test-client/src/module_bindings/one_i_8_type.rs index 78dff559228..5229cb36d22 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/one_i_8_type.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/one_i_8_type.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/one_identity_table.rs b/crates/sdk/tests/test-client/src/module_bindings/one_identity_table.rs index c2429d9092a..5dca3e14350 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/one_identity_table.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/one_identity_table.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use super::one_identity_type::OneIdentity; diff --git a/crates/sdk/tests/test-client/src/module_bindings/one_identity_type.rs b/crates/sdk/tests/test-client/src/module_bindings/one_identity_type.rs index 3e86c9856d5..56070fdd227 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/one_identity_type.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/one_identity_type.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/one_simple_enum_table.rs b/crates/sdk/tests/test-client/src/module_bindings/one_simple_enum_table.rs index 9a6f77225f4..bb5ca7c531c 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/one_simple_enum_table.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/one_simple_enum_table.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use super::one_simple_enum_type::OneSimpleEnum; diff --git a/crates/sdk/tests/test-client/src/module_bindings/one_simple_enum_type.rs b/crates/sdk/tests/test-client/src/module_bindings/one_simple_enum_type.rs index 3c2d2924fe1..cf97d19006e 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/one_simple_enum_type.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/one_simple_enum_type.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/one_string_table.rs b/crates/sdk/tests/test-client/src/module_bindings/one_string_table.rs index d28b2a048dc..3a3f5528eee 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/one_string_table.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/one_string_table.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use super::one_string_type::OneString; diff --git a/crates/sdk/tests/test-client/src/module_bindings/one_string_type.rs b/crates/sdk/tests/test-client/src/module_bindings/one_string_type.rs index 003623900fa..ec7bbe3ab60 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/one_string_type.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/one_string_type.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/one_u_128_table.rs b/crates/sdk/tests/test-client/src/module_bindings/one_u_128_table.rs index 8d32a4758d8..c677f7035ff 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/one_u_128_table.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/one_u_128_table.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use super::one_u_128_type::OneU128; diff --git a/crates/sdk/tests/test-client/src/module_bindings/one_u_128_type.rs b/crates/sdk/tests/test-client/src/module_bindings/one_u_128_type.rs index aaa5c93ad97..b2d7cf8ae07 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/one_u_128_type.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/one_u_128_type.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/one_u_16_table.rs b/crates/sdk/tests/test-client/src/module_bindings/one_u_16_table.rs index 40a2629550a..12ae7a5396b 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/one_u_16_table.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/one_u_16_table.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use super::one_u_16_type::OneU16; diff --git a/crates/sdk/tests/test-client/src/module_bindings/one_u_16_type.rs b/crates/sdk/tests/test-client/src/module_bindings/one_u_16_type.rs index b563f6bc05b..d8a9f5d8eb0 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/one_u_16_type.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/one_u_16_type.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/one_u_256_table.rs b/crates/sdk/tests/test-client/src/module_bindings/one_u_256_table.rs index 05d5addc292..7579d8f12bc 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/one_u_256_table.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/one_u_256_table.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use super::one_u_256_type::OneU256; diff --git a/crates/sdk/tests/test-client/src/module_bindings/one_u_256_type.rs b/crates/sdk/tests/test-client/src/module_bindings/one_u_256_type.rs index cf06ee53e07..268f27ce9a4 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/one_u_256_type.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/one_u_256_type.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/one_u_32_table.rs b/crates/sdk/tests/test-client/src/module_bindings/one_u_32_table.rs index f77011c5d28..18a4dbbae01 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/one_u_32_table.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/one_u_32_table.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use super::one_u_32_type::OneU32; diff --git a/crates/sdk/tests/test-client/src/module_bindings/one_u_32_type.rs b/crates/sdk/tests/test-client/src/module_bindings/one_u_32_type.rs index 91793087f68..1a42f13a644 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/one_u_32_type.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/one_u_32_type.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/one_u_64_table.rs b/crates/sdk/tests/test-client/src/module_bindings/one_u_64_table.rs index 30b2ccd3623..0762112dc72 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/one_u_64_table.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/one_u_64_table.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use super::one_u_64_type::OneU64; diff --git a/crates/sdk/tests/test-client/src/module_bindings/one_u_64_type.rs b/crates/sdk/tests/test-client/src/module_bindings/one_u_64_type.rs index 4c357887e21..5f0a207d238 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/one_u_64_type.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/one_u_64_type.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/one_u_8_table.rs b/crates/sdk/tests/test-client/src/module_bindings/one_u_8_table.rs index 978840efe6a..d42cf838caa 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/one_u_8_table.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/one_u_8_table.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use super::one_u_8_type::OneU8; diff --git a/crates/sdk/tests/test-client/src/module_bindings/one_u_8_type.rs b/crates/sdk/tests/test-client/src/module_bindings/one_u_8_type.rs index 7905002dd53..4acce66b9b0 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/one_u_8_type.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/one_u_8_type.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/one_unit_struct_table.rs b/crates/sdk/tests/test-client/src/module_bindings/one_unit_struct_table.rs index 5c32dcd278f..83688e99b79 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/one_unit_struct_table.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/one_unit_struct_table.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use super::one_unit_struct_type::OneUnitStruct; diff --git a/crates/sdk/tests/test-client/src/module_bindings/one_unit_struct_type.rs b/crates/sdk/tests/test-client/src/module_bindings/one_unit_struct_type.rs index f3833f60b60..f266d8a9b67 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/one_unit_struct_type.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/one_unit_struct_type.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/option_every_primitive_struct_table.rs b/crates/sdk/tests/test-client/src/module_bindings/option_every_primitive_struct_table.rs index 85dce217368..b1beff5c300 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/option_every_primitive_struct_table.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/option_every_primitive_struct_table.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use super::every_primitive_struct_type::EveryPrimitiveStruct; diff --git a/crates/sdk/tests/test-client/src/module_bindings/option_every_primitive_struct_type.rs b/crates/sdk/tests/test-client/src/module_bindings/option_every_primitive_struct_type.rs index ee9e368ff82..f830c34d6ac 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/option_every_primitive_struct_type.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/option_every_primitive_struct_type.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/option_i_32_table.rs b/crates/sdk/tests/test-client/src/module_bindings/option_i_32_table.rs index 8151e5d6ead..f3165cee495 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/option_i_32_table.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/option_i_32_table.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use super::option_i_32_type::OptionI32; diff --git a/crates/sdk/tests/test-client/src/module_bindings/option_i_32_type.rs b/crates/sdk/tests/test-client/src/module_bindings/option_i_32_type.rs index 56a4e38692d..2e7e6a5e17c 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/option_i_32_type.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/option_i_32_type.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/option_identity_table.rs b/crates/sdk/tests/test-client/src/module_bindings/option_identity_table.rs index 5fa67319c5e..ef616203e4c 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/option_identity_table.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/option_identity_table.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use super::option_identity_type::OptionIdentity; diff --git a/crates/sdk/tests/test-client/src/module_bindings/option_identity_type.rs b/crates/sdk/tests/test-client/src/module_bindings/option_identity_type.rs index 8cef15f62be..cc6c8788f04 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/option_identity_type.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/option_identity_type.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/option_simple_enum_table.rs b/crates/sdk/tests/test-client/src/module_bindings/option_simple_enum_table.rs index 569d1b1d858..e22c85e3c7e 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/option_simple_enum_table.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/option_simple_enum_table.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use super::option_simple_enum_type::OptionSimpleEnum; diff --git a/crates/sdk/tests/test-client/src/module_bindings/option_simple_enum_type.rs b/crates/sdk/tests/test-client/src/module_bindings/option_simple_enum_type.rs index 624c46e426a..861bbeed47b 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/option_simple_enum_type.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/option_simple_enum_type.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/option_string_table.rs b/crates/sdk/tests/test-client/src/module_bindings/option_string_table.rs index ae64a2ac809..0a93eaa6604 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/option_string_table.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/option_string_table.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use super::option_string_type::OptionString; diff --git a/crates/sdk/tests/test-client/src/module_bindings/option_string_type.rs b/crates/sdk/tests/test-client/src/module_bindings/option_string_type.rs index bbeb4d21eee..93e40c78b00 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/option_string_type.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/option_string_type.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/option_vec_option_i_32_table.rs b/crates/sdk/tests/test-client/src/module_bindings/option_vec_option_i_32_table.rs index 571c34db057..82b7027fa1c 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/option_vec_option_i_32_table.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/option_vec_option_i_32_table.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use super::option_vec_option_i_32_type::OptionVecOptionI32; diff --git a/crates/sdk/tests/test-client/src/module_bindings/option_vec_option_i_32_type.rs b/crates/sdk/tests/test-client/src/module_bindings/option_vec_option_i_32_type.rs index eec3a51129a..b2e1fe9386d 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/option_vec_option_i_32_type.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/option_vec_option_i_32_type.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/pk_address_table.rs b/crates/sdk/tests/test-client/src/module_bindings/pk_address_table.rs index 69b21eb9595..df051394c9c 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/pk_address_table.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/pk_address_table.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use super::pk_address_type::PkAddress; diff --git a/crates/sdk/tests/test-client/src/module_bindings/pk_address_type.rs b/crates/sdk/tests/test-client/src/module_bindings/pk_address_type.rs index ba820098deb..fec260c0046 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/pk_address_type.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/pk_address_type.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/pk_bool_table.rs b/crates/sdk/tests/test-client/src/module_bindings/pk_bool_table.rs index bb0026436a4..8befbf2c181 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/pk_bool_table.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/pk_bool_table.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use super::pk_bool_type::PkBool; diff --git a/crates/sdk/tests/test-client/src/module_bindings/pk_bool_type.rs b/crates/sdk/tests/test-client/src/module_bindings/pk_bool_type.rs index 858ced44137..9d070824864 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/pk_bool_type.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/pk_bool_type.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/pk_i_128_table.rs b/crates/sdk/tests/test-client/src/module_bindings/pk_i_128_table.rs index a2e06922724..08773e3cc88 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/pk_i_128_table.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/pk_i_128_table.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use super::pk_i_128_type::PkI128; diff --git a/crates/sdk/tests/test-client/src/module_bindings/pk_i_128_type.rs b/crates/sdk/tests/test-client/src/module_bindings/pk_i_128_type.rs index c34f458389d..b0e473e5dbc 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/pk_i_128_type.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/pk_i_128_type.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/pk_i_16_table.rs b/crates/sdk/tests/test-client/src/module_bindings/pk_i_16_table.rs index 2badcb965d0..94e57f3cc0e 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/pk_i_16_table.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/pk_i_16_table.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use super::pk_i_16_type::PkI16; diff --git a/crates/sdk/tests/test-client/src/module_bindings/pk_i_16_type.rs b/crates/sdk/tests/test-client/src/module_bindings/pk_i_16_type.rs index 1803d2bb228..4efa42eb9ac 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/pk_i_16_type.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/pk_i_16_type.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/pk_i_256_table.rs b/crates/sdk/tests/test-client/src/module_bindings/pk_i_256_table.rs index 0739ab41357..115f653ff7f 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/pk_i_256_table.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/pk_i_256_table.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use super::pk_i_256_type::PkI256; diff --git a/crates/sdk/tests/test-client/src/module_bindings/pk_i_256_type.rs b/crates/sdk/tests/test-client/src/module_bindings/pk_i_256_type.rs index 800798f4a48..6ea1adb14b5 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/pk_i_256_type.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/pk_i_256_type.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/pk_i_32_table.rs b/crates/sdk/tests/test-client/src/module_bindings/pk_i_32_table.rs index 4e5ffa9473b..2b17529dbf2 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/pk_i_32_table.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/pk_i_32_table.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use super::pk_i_32_type::PkI32; diff --git a/crates/sdk/tests/test-client/src/module_bindings/pk_i_32_type.rs b/crates/sdk/tests/test-client/src/module_bindings/pk_i_32_type.rs index 25d1ab0f8a6..d7b0bc1ff37 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/pk_i_32_type.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/pk_i_32_type.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/pk_i_64_table.rs b/crates/sdk/tests/test-client/src/module_bindings/pk_i_64_table.rs index 8274c0b526a..311d02672e1 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/pk_i_64_table.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/pk_i_64_table.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use super::pk_i_64_type::PkI64; diff --git a/crates/sdk/tests/test-client/src/module_bindings/pk_i_64_type.rs b/crates/sdk/tests/test-client/src/module_bindings/pk_i_64_type.rs index a367e4fb403..05b23809e1d 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/pk_i_64_type.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/pk_i_64_type.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/pk_i_8_table.rs b/crates/sdk/tests/test-client/src/module_bindings/pk_i_8_table.rs index 69c3d19a211..c9895b6a38c 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/pk_i_8_table.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/pk_i_8_table.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use super::pk_i_8_type::PkI8; diff --git a/crates/sdk/tests/test-client/src/module_bindings/pk_i_8_type.rs b/crates/sdk/tests/test-client/src/module_bindings/pk_i_8_type.rs index 0dbcc8cf195..577b029df15 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/pk_i_8_type.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/pk_i_8_type.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/pk_identity_table.rs b/crates/sdk/tests/test-client/src/module_bindings/pk_identity_table.rs index 4b5f950644b..2a1d5ef57fa 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/pk_identity_table.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/pk_identity_table.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use super::pk_identity_type::PkIdentity; diff --git a/crates/sdk/tests/test-client/src/module_bindings/pk_identity_type.rs b/crates/sdk/tests/test-client/src/module_bindings/pk_identity_type.rs index 2828da420db..65a4538b9a0 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/pk_identity_type.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/pk_identity_type.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/pk_string_table.rs b/crates/sdk/tests/test-client/src/module_bindings/pk_string_table.rs index e9c6830d39f..2c681397d77 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/pk_string_table.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/pk_string_table.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use super::pk_string_type::PkString; diff --git a/crates/sdk/tests/test-client/src/module_bindings/pk_string_type.rs b/crates/sdk/tests/test-client/src/module_bindings/pk_string_type.rs index 2ff13b471b1..b25fb5efc3c 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/pk_string_type.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/pk_string_type.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/pk_u_128_table.rs b/crates/sdk/tests/test-client/src/module_bindings/pk_u_128_table.rs index d29f66edf2f..6333b37a42f 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/pk_u_128_table.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/pk_u_128_table.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use super::pk_u_128_type::PkU128; diff --git a/crates/sdk/tests/test-client/src/module_bindings/pk_u_128_type.rs b/crates/sdk/tests/test-client/src/module_bindings/pk_u_128_type.rs index 2ee2b553149..40d026fe4c4 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/pk_u_128_type.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/pk_u_128_type.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/pk_u_16_table.rs b/crates/sdk/tests/test-client/src/module_bindings/pk_u_16_table.rs index 4db27242b60..bd1096b2578 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/pk_u_16_table.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/pk_u_16_table.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use super::pk_u_16_type::PkU16; diff --git a/crates/sdk/tests/test-client/src/module_bindings/pk_u_16_type.rs b/crates/sdk/tests/test-client/src/module_bindings/pk_u_16_type.rs index feb72604c26..af14e95d2be 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/pk_u_16_type.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/pk_u_16_type.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/pk_u_256_table.rs b/crates/sdk/tests/test-client/src/module_bindings/pk_u_256_table.rs index d58e4dda0e3..d73f6a8620f 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/pk_u_256_table.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/pk_u_256_table.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use super::pk_u_256_type::PkU256; diff --git a/crates/sdk/tests/test-client/src/module_bindings/pk_u_256_type.rs b/crates/sdk/tests/test-client/src/module_bindings/pk_u_256_type.rs index 11950100b3b..73aaad923b6 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/pk_u_256_type.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/pk_u_256_type.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/pk_u_32_table.rs b/crates/sdk/tests/test-client/src/module_bindings/pk_u_32_table.rs index dcf02fcf97a..6d3e72d7eb3 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/pk_u_32_table.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/pk_u_32_table.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use super::pk_u_32_type::PkU32; diff --git a/crates/sdk/tests/test-client/src/module_bindings/pk_u_32_type.rs b/crates/sdk/tests/test-client/src/module_bindings/pk_u_32_type.rs index f460970abb6..1d582fcd917 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/pk_u_32_type.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/pk_u_32_type.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/pk_u_64_table.rs b/crates/sdk/tests/test-client/src/module_bindings/pk_u_64_table.rs index 20036b3db4c..1928d695f4b 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/pk_u_64_table.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/pk_u_64_table.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use super::pk_u_64_type::PkU64; diff --git a/crates/sdk/tests/test-client/src/module_bindings/pk_u_64_type.rs b/crates/sdk/tests/test-client/src/module_bindings/pk_u_64_type.rs index 5247eb536da..7426ea7a336 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/pk_u_64_type.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/pk_u_64_type.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/pk_u_8_table.rs b/crates/sdk/tests/test-client/src/module_bindings/pk_u_8_table.rs index 1c4ff1573ff..e6f1c8815dc 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/pk_u_8_table.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/pk_u_8_table.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use super::pk_u_8_type::PkU8; diff --git a/crates/sdk/tests/test-client/src/module_bindings/pk_u_8_type.rs b/crates/sdk/tests/test-client/src/module_bindings/pk_u_8_type.rs index 609ebfb2b33..abd66c26138 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/pk_u_8_type.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/pk_u_8_type.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/scheduled_table_table.rs b/crates/sdk/tests/test-client/src/module_bindings/scheduled_table_table.rs index cd9cf2faeda..e3cef277122 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/scheduled_table_table.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/scheduled_table_table.rs @@ -1,7 +1,7 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. -#![allow(unused)] +#![allow(unused, clippy::all)] use super::scheduled_table_type::ScheduledTable; use spacetimedb_sdk::__codegen::{ self as __sdk, __lib, __sats, __ws, diff --git a/crates/sdk/tests/test-client/src/module_bindings/scheduled_table_type.rs b/crates/sdk/tests/test-client/src/module_bindings/scheduled_table_type.rs index 2d2b4433987..02703af96b6 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/scheduled_table_type.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/scheduled_table_type.rs @@ -1,7 +1,7 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. -#![allow(unused)] +#![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ self as __sdk, __lib, __sats, __ws, anyhow::{self as __anyhow, Context as _}, diff --git a/crates/sdk/tests/test-client/src/module_bindings/send_scheduled_message_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/send_scheduled_message_reducer.rs index d78e550ce2e..e96409692d3 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/send_scheduled_message_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/send_scheduled_message_reducer.rs @@ -1,7 +1,7 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. -#![allow(unused)] +#![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ self as __sdk, __lib, __sats, __ws, anyhow::{self as __anyhow, Context as _}, diff --git a/crates/sdk/tests/test-client/src/module_bindings/simple_enum_type.rs b/crates/sdk/tests/test-client/src/module_bindings/simple_enum_type.rs index 6cc59f8170e..4cdf9c5cb09 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/simple_enum_type.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/simple_enum_type.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/table_holds_table_table.rs b/crates/sdk/tests/test-client/src/module_bindings/table_holds_table_table.rs index 767485ee816..89c5c280157 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/table_holds_table_table.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/table_holds_table_table.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use super::one_u_8_type::OneU8; diff --git a/crates/sdk/tests/test-client/src/module_bindings/table_holds_table_type.rs b/crates/sdk/tests/test-client/src/module_bindings/table_holds_table_type.rs index 1a156bb7327..d1526635136 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/table_holds_table_type.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/table_holds_table_type.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/unique_address_table.rs b/crates/sdk/tests/test-client/src/module_bindings/unique_address_table.rs index eb46ff1e4f7..418a02647ef 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/unique_address_table.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/unique_address_table.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use super::unique_address_type::UniqueAddress; diff --git a/crates/sdk/tests/test-client/src/module_bindings/unique_address_type.rs b/crates/sdk/tests/test-client/src/module_bindings/unique_address_type.rs index 37132a341fb..5dec2616e47 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/unique_address_type.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/unique_address_type.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/unique_bool_table.rs b/crates/sdk/tests/test-client/src/module_bindings/unique_bool_table.rs index 122d184fd81..9828062f553 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/unique_bool_table.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/unique_bool_table.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use super::unique_bool_type::UniqueBool; diff --git a/crates/sdk/tests/test-client/src/module_bindings/unique_bool_type.rs b/crates/sdk/tests/test-client/src/module_bindings/unique_bool_type.rs index dd287a78aa7..d82b68d4e87 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/unique_bool_type.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/unique_bool_type.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/unique_i_128_table.rs b/crates/sdk/tests/test-client/src/module_bindings/unique_i_128_table.rs index cdd92e38e4f..fe44c994241 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/unique_i_128_table.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/unique_i_128_table.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use super::unique_i_128_type::UniqueI128; diff --git a/crates/sdk/tests/test-client/src/module_bindings/unique_i_128_type.rs b/crates/sdk/tests/test-client/src/module_bindings/unique_i_128_type.rs index 5538f70d147..39a40ce9504 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/unique_i_128_type.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/unique_i_128_type.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/unique_i_16_table.rs b/crates/sdk/tests/test-client/src/module_bindings/unique_i_16_table.rs index 794f48e7ebe..61ea6a341b9 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/unique_i_16_table.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/unique_i_16_table.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use super::unique_i_16_type::UniqueI16; diff --git a/crates/sdk/tests/test-client/src/module_bindings/unique_i_16_type.rs b/crates/sdk/tests/test-client/src/module_bindings/unique_i_16_type.rs index 3d943fc946f..323da0fae5e 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/unique_i_16_type.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/unique_i_16_type.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/unique_i_256_table.rs b/crates/sdk/tests/test-client/src/module_bindings/unique_i_256_table.rs index e5b695d2e2e..e488b288df7 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/unique_i_256_table.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/unique_i_256_table.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use super::unique_i_256_type::UniqueI256; diff --git a/crates/sdk/tests/test-client/src/module_bindings/unique_i_256_type.rs b/crates/sdk/tests/test-client/src/module_bindings/unique_i_256_type.rs index b9731cff41d..86a6f48eb24 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/unique_i_256_type.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/unique_i_256_type.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/unique_i_32_table.rs b/crates/sdk/tests/test-client/src/module_bindings/unique_i_32_table.rs index f8f13d83c94..0dd4692f249 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/unique_i_32_table.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/unique_i_32_table.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use super::unique_i_32_type::UniqueI32; diff --git a/crates/sdk/tests/test-client/src/module_bindings/unique_i_32_type.rs b/crates/sdk/tests/test-client/src/module_bindings/unique_i_32_type.rs index f1def977350..4b4010b66d0 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/unique_i_32_type.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/unique_i_32_type.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/unique_i_64_table.rs b/crates/sdk/tests/test-client/src/module_bindings/unique_i_64_table.rs index 20eb262ec34..f63c6aa8689 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/unique_i_64_table.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/unique_i_64_table.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use super::unique_i_64_type::UniqueI64; diff --git a/crates/sdk/tests/test-client/src/module_bindings/unique_i_64_type.rs b/crates/sdk/tests/test-client/src/module_bindings/unique_i_64_type.rs index 825c60654ad..a7d0a2a577b 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/unique_i_64_type.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/unique_i_64_type.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/unique_i_8_table.rs b/crates/sdk/tests/test-client/src/module_bindings/unique_i_8_table.rs index 9fba86d2e25..af9d6cd9146 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/unique_i_8_table.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/unique_i_8_table.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use super::unique_i_8_type::UniqueI8; diff --git a/crates/sdk/tests/test-client/src/module_bindings/unique_i_8_type.rs b/crates/sdk/tests/test-client/src/module_bindings/unique_i_8_type.rs index 23c9f9084a8..b25898eda05 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/unique_i_8_type.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/unique_i_8_type.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/unique_identity_table.rs b/crates/sdk/tests/test-client/src/module_bindings/unique_identity_table.rs index c81699fcd8d..0780e5e2096 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/unique_identity_table.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/unique_identity_table.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use super::unique_identity_type::UniqueIdentity; diff --git a/crates/sdk/tests/test-client/src/module_bindings/unique_identity_type.rs b/crates/sdk/tests/test-client/src/module_bindings/unique_identity_type.rs index 42a36b46b04..c96fef01cd4 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/unique_identity_type.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/unique_identity_type.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/unique_string_table.rs b/crates/sdk/tests/test-client/src/module_bindings/unique_string_table.rs index b5e359fea6a..435d55da721 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/unique_string_table.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/unique_string_table.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use super::unique_string_type::UniqueString; diff --git a/crates/sdk/tests/test-client/src/module_bindings/unique_string_type.rs b/crates/sdk/tests/test-client/src/module_bindings/unique_string_type.rs index 0173ae21524..9f5e8e4a977 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/unique_string_type.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/unique_string_type.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/unique_u_128_table.rs b/crates/sdk/tests/test-client/src/module_bindings/unique_u_128_table.rs index b808781d6fd..62578f7f7e3 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/unique_u_128_table.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/unique_u_128_table.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use super::unique_u_128_type::UniqueU128; diff --git a/crates/sdk/tests/test-client/src/module_bindings/unique_u_128_type.rs b/crates/sdk/tests/test-client/src/module_bindings/unique_u_128_type.rs index 24e9c473e70..c7f399fb30f 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/unique_u_128_type.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/unique_u_128_type.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/unique_u_16_table.rs b/crates/sdk/tests/test-client/src/module_bindings/unique_u_16_table.rs index 9705fb340ca..a2c3023d5ee 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/unique_u_16_table.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/unique_u_16_table.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use super::unique_u_16_type::UniqueU16; diff --git a/crates/sdk/tests/test-client/src/module_bindings/unique_u_16_type.rs b/crates/sdk/tests/test-client/src/module_bindings/unique_u_16_type.rs index a4a20dfe29c..4d96ff4c49f 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/unique_u_16_type.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/unique_u_16_type.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/unique_u_256_table.rs b/crates/sdk/tests/test-client/src/module_bindings/unique_u_256_table.rs index 4042fc21f80..8cbbf7a3337 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/unique_u_256_table.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/unique_u_256_table.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use super::unique_u_256_type::UniqueU256; diff --git a/crates/sdk/tests/test-client/src/module_bindings/unique_u_256_type.rs b/crates/sdk/tests/test-client/src/module_bindings/unique_u_256_type.rs index 6a27554ef4d..5faf4d45602 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/unique_u_256_type.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/unique_u_256_type.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/unique_u_32_table.rs b/crates/sdk/tests/test-client/src/module_bindings/unique_u_32_table.rs index 4914eecd9a4..402b8788ab0 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/unique_u_32_table.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/unique_u_32_table.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use super::unique_u_32_type::UniqueU32; diff --git a/crates/sdk/tests/test-client/src/module_bindings/unique_u_32_type.rs b/crates/sdk/tests/test-client/src/module_bindings/unique_u_32_type.rs index c7843c0e95d..8f6e90ad469 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/unique_u_32_type.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/unique_u_32_type.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/unique_u_64_table.rs b/crates/sdk/tests/test-client/src/module_bindings/unique_u_64_table.rs index 6251511fa42..dfb35a4cbe0 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/unique_u_64_table.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/unique_u_64_table.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use super::unique_u_64_type::UniqueU64; diff --git a/crates/sdk/tests/test-client/src/module_bindings/unique_u_64_type.rs b/crates/sdk/tests/test-client/src/module_bindings/unique_u_64_type.rs index e9a6f583e31..52190db4c49 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/unique_u_64_type.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/unique_u_64_type.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/unique_u_8_table.rs b/crates/sdk/tests/test-client/src/module_bindings/unique_u_8_table.rs index 3c6b593a634..9230f89268b 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/unique_u_8_table.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/unique_u_8_table.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use super::unique_u_8_type::UniqueU8; diff --git a/crates/sdk/tests/test-client/src/module_bindings/unique_u_8_type.rs b/crates/sdk/tests/test-client/src/module_bindings/unique_u_8_type.rs index 93d89dd560e..d57b0d1595f 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/unique_u_8_type.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/unique_u_8_type.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/unit_struct_type.rs b/crates/sdk/tests/test-client/src/module_bindings/unit_struct_type.rs index 4c3bd546dc4..9e86abc8286 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/unit_struct_type.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/unit_struct_type.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/update_pk_address_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/update_pk_address_reducer.rs index dcc50470b9f..6aca4efc05d 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/update_pk_address_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/update_pk_address_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/update_pk_bool_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/update_pk_bool_reducer.rs index 4a24b104250..84248f50e90 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/update_pk_bool_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/update_pk_bool_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/update_pk_i_128_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/update_pk_i_128_reducer.rs index 28d25c8c960..294242cfb87 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/update_pk_i_128_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/update_pk_i_128_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/update_pk_i_16_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/update_pk_i_16_reducer.rs index 4c173740908..7a110b60648 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/update_pk_i_16_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/update_pk_i_16_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/update_pk_i_256_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/update_pk_i_256_reducer.rs index a06ff9b2825..c3e15e4c2cd 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/update_pk_i_256_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/update_pk_i_256_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/update_pk_i_32_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/update_pk_i_32_reducer.rs index 28cb61d0c82..3a6cd23dca1 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/update_pk_i_32_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/update_pk_i_32_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/update_pk_i_64_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/update_pk_i_64_reducer.rs index 0c3db6a7a7f..5331e2a2ae0 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/update_pk_i_64_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/update_pk_i_64_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/update_pk_i_8_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/update_pk_i_8_reducer.rs index 5a6af1863bb..84f3fd7264e 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/update_pk_i_8_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/update_pk_i_8_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/update_pk_identity_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/update_pk_identity_reducer.rs index 41fc6531ce2..a4812a14c0b 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/update_pk_identity_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/update_pk_identity_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/update_pk_string_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/update_pk_string_reducer.rs index a19a526f3b6..13e0bb45fe8 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/update_pk_string_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/update_pk_string_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/update_pk_u_128_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/update_pk_u_128_reducer.rs index 18467fccb45..bd65f21f969 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/update_pk_u_128_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/update_pk_u_128_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/update_pk_u_16_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/update_pk_u_16_reducer.rs index 4fa4026b60e..b4582e96c70 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/update_pk_u_16_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/update_pk_u_16_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/update_pk_u_256_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/update_pk_u_256_reducer.rs index 092f575fdda..7c97985d1e9 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/update_pk_u_256_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/update_pk_u_256_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/update_pk_u_32_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/update_pk_u_32_reducer.rs index dbae45dad02..737f1c1818a 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/update_pk_u_32_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/update_pk_u_32_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/update_pk_u_64_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/update_pk_u_64_reducer.rs index 700828a9e24..1afffe6f3da 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/update_pk_u_64_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/update_pk_u_64_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/update_pk_u_8_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/update_pk_u_8_reducer.rs index 165585d32a3..760a9ab14b5 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/update_pk_u_8_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/update_pk_u_8_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/update_unique_address_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/update_unique_address_reducer.rs index d2ae74d97d7..0e8fe7a0a25 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/update_unique_address_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/update_unique_address_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/update_unique_bool_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/update_unique_bool_reducer.rs index 18c5293f5c5..bc21dbcc7cf 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/update_unique_bool_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/update_unique_bool_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/update_unique_i_128_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/update_unique_i_128_reducer.rs index 80c21017f66..9b0ca3138b3 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/update_unique_i_128_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/update_unique_i_128_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/update_unique_i_16_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/update_unique_i_16_reducer.rs index 26af3ea23b7..a8bd516c1f0 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/update_unique_i_16_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/update_unique_i_16_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/update_unique_i_256_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/update_unique_i_256_reducer.rs index 5ec25586e5f..c4bdb2ce4e2 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/update_unique_i_256_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/update_unique_i_256_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/update_unique_i_32_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/update_unique_i_32_reducer.rs index fcc81b8c9c7..277123f5a15 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/update_unique_i_32_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/update_unique_i_32_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/update_unique_i_64_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/update_unique_i_64_reducer.rs index c89bfeedb68..a6a975f732b 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/update_unique_i_64_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/update_unique_i_64_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/update_unique_i_8_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/update_unique_i_8_reducer.rs index c4a2f7d06ec..265d0b9123b 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/update_unique_i_8_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/update_unique_i_8_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/update_unique_identity_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/update_unique_identity_reducer.rs index 83ad3c82bf6..ef8dfe0e222 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/update_unique_identity_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/update_unique_identity_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/update_unique_string_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/update_unique_string_reducer.rs index 56f18f71a69..07447d5a378 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/update_unique_string_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/update_unique_string_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/update_unique_u_128_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/update_unique_u_128_reducer.rs index 6d204fb359c..100136e3ad2 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/update_unique_u_128_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/update_unique_u_128_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/update_unique_u_16_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/update_unique_u_16_reducer.rs index 53fda531df3..dde019a48b7 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/update_unique_u_16_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/update_unique_u_16_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/update_unique_u_256_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/update_unique_u_256_reducer.rs index b6b0390d294..221f922da26 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/update_unique_u_256_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/update_unique_u_256_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/update_unique_u_32_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/update_unique_u_32_reducer.rs index d27c82e8679..0854f463e2b 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/update_unique_u_32_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/update_unique_u_32_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/update_unique_u_64_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/update_unique_u_64_reducer.rs index 77916e64195..cf127c63787 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/update_unique_u_64_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/update_unique_u_64_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/update_unique_u_8_reducer.rs b/crates/sdk/tests/test-client/src/module_bindings/update_unique_u_8_reducer.rs index 9e4c0be0b06..98ae9df2d24 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/update_unique_u_8_reducer.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/update_unique_u_8_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/vec_address_table.rs b/crates/sdk/tests/test-client/src/module_bindings/vec_address_table.rs index 3eef5be3238..1c0ca2f5a5f 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/vec_address_table.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/vec_address_table.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use super::vec_address_type::VecAddress; diff --git a/crates/sdk/tests/test-client/src/module_bindings/vec_address_type.rs b/crates/sdk/tests/test-client/src/module_bindings/vec_address_type.rs index a6647ee2aff..adafa81ae36 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/vec_address_type.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/vec_address_type.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/vec_bool_table.rs b/crates/sdk/tests/test-client/src/module_bindings/vec_bool_table.rs index 1977bf6d7f0..5ce88c1c4d0 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/vec_bool_table.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/vec_bool_table.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use super::vec_bool_type::VecBool; diff --git a/crates/sdk/tests/test-client/src/module_bindings/vec_bool_type.rs b/crates/sdk/tests/test-client/src/module_bindings/vec_bool_type.rs index 15835cc2d0c..a8b0e65e90d 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/vec_bool_type.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/vec_bool_type.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/vec_byte_struct_table.rs b/crates/sdk/tests/test-client/src/module_bindings/vec_byte_struct_table.rs index d9c22eb99e0..0f3e3f13206 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/vec_byte_struct_table.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/vec_byte_struct_table.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use super::byte_struct_type::ByteStruct; diff --git a/crates/sdk/tests/test-client/src/module_bindings/vec_byte_struct_type.rs b/crates/sdk/tests/test-client/src/module_bindings/vec_byte_struct_type.rs index c48ec5b10cf..14d064a4457 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/vec_byte_struct_type.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/vec_byte_struct_type.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/vec_enum_with_payload_table.rs b/crates/sdk/tests/test-client/src/module_bindings/vec_enum_with_payload_table.rs index ded4a772e08..0f3d5bc9b59 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/vec_enum_with_payload_table.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/vec_enum_with_payload_table.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use super::enum_with_payload_type::EnumWithPayload; diff --git a/crates/sdk/tests/test-client/src/module_bindings/vec_enum_with_payload_type.rs b/crates/sdk/tests/test-client/src/module_bindings/vec_enum_with_payload_type.rs index 62a1895a55f..591a8ee7d61 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/vec_enum_with_payload_type.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/vec_enum_with_payload_type.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/vec_every_primitive_struct_table.rs b/crates/sdk/tests/test-client/src/module_bindings/vec_every_primitive_struct_table.rs index e4fc7f6b30e..6f7da9fb129 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/vec_every_primitive_struct_table.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/vec_every_primitive_struct_table.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use super::every_primitive_struct_type::EveryPrimitiveStruct; diff --git a/crates/sdk/tests/test-client/src/module_bindings/vec_every_primitive_struct_type.rs b/crates/sdk/tests/test-client/src/module_bindings/vec_every_primitive_struct_type.rs index 0ebeec88fac..40084e18096 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/vec_every_primitive_struct_type.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/vec_every_primitive_struct_type.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/vec_every_vec_struct_table.rs b/crates/sdk/tests/test-client/src/module_bindings/vec_every_vec_struct_table.rs index 714784cf566..d4267b89702 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/vec_every_vec_struct_table.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/vec_every_vec_struct_table.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use super::every_vec_struct_type::EveryVecStruct; diff --git a/crates/sdk/tests/test-client/src/module_bindings/vec_every_vec_struct_type.rs b/crates/sdk/tests/test-client/src/module_bindings/vec_every_vec_struct_type.rs index 53e1d2a6546..99856b7243a 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/vec_every_vec_struct_type.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/vec_every_vec_struct_type.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/vec_f_32_table.rs b/crates/sdk/tests/test-client/src/module_bindings/vec_f_32_table.rs index 26985d46c86..bd33332f56c 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/vec_f_32_table.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/vec_f_32_table.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use super::vec_f_32_type::VecF32; diff --git a/crates/sdk/tests/test-client/src/module_bindings/vec_f_32_type.rs b/crates/sdk/tests/test-client/src/module_bindings/vec_f_32_type.rs index 91e7b68f490..43add31497e 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/vec_f_32_type.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/vec_f_32_type.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/vec_f_64_table.rs b/crates/sdk/tests/test-client/src/module_bindings/vec_f_64_table.rs index b6a7e16c906..5ec4d4a779c 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/vec_f_64_table.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/vec_f_64_table.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use super::vec_f_64_type::VecF64; diff --git a/crates/sdk/tests/test-client/src/module_bindings/vec_f_64_type.rs b/crates/sdk/tests/test-client/src/module_bindings/vec_f_64_type.rs index 23a8f4f4920..f02e72a5798 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/vec_f_64_type.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/vec_f_64_type.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/vec_i_128_table.rs b/crates/sdk/tests/test-client/src/module_bindings/vec_i_128_table.rs index 2d851e53651..04e0e45fcb2 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/vec_i_128_table.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/vec_i_128_table.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use super::vec_i_128_type::VecI128; diff --git a/crates/sdk/tests/test-client/src/module_bindings/vec_i_128_type.rs b/crates/sdk/tests/test-client/src/module_bindings/vec_i_128_type.rs index 34eea1725ed..a9a1f99c504 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/vec_i_128_type.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/vec_i_128_type.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/vec_i_16_table.rs b/crates/sdk/tests/test-client/src/module_bindings/vec_i_16_table.rs index 246ec785127..6c11d876265 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/vec_i_16_table.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/vec_i_16_table.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use super::vec_i_16_type::VecI16; diff --git a/crates/sdk/tests/test-client/src/module_bindings/vec_i_16_type.rs b/crates/sdk/tests/test-client/src/module_bindings/vec_i_16_type.rs index 6fca9905dd3..af1564c1af2 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/vec_i_16_type.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/vec_i_16_type.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/vec_i_256_table.rs b/crates/sdk/tests/test-client/src/module_bindings/vec_i_256_table.rs index 6eb48ca378b..1b4150266f5 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/vec_i_256_table.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/vec_i_256_table.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use super::vec_i_256_type::VecI256; diff --git a/crates/sdk/tests/test-client/src/module_bindings/vec_i_256_type.rs b/crates/sdk/tests/test-client/src/module_bindings/vec_i_256_type.rs index 9727c53980c..181c785df94 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/vec_i_256_type.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/vec_i_256_type.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/vec_i_32_table.rs b/crates/sdk/tests/test-client/src/module_bindings/vec_i_32_table.rs index a7a26c433e0..8ca01b1e572 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/vec_i_32_table.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/vec_i_32_table.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use super::vec_i_32_type::VecI32; diff --git a/crates/sdk/tests/test-client/src/module_bindings/vec_i_32_type.rs b/crates/sdk/tests/test-client/src/module_bindings/vec_i_32_type.rs index 76025b990f4..b4a3ceab35d 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/vec_i_32_type.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/vec_i_32_type.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/vec_i_64_table.rs b/crates/sdk/tests/test-client/src/module_bindings/vec_i_64_table.rs index c1064196391..7bd6b07bddd 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/vec_i_64_table.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/vec_i_64_table.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use super::vec_i_64_type::VecI64; diff --git a/crates/sdk/tests/test-client/src/module_bindings/vec_i_64_type.rs b/crates/sdk/tests/test-client/src/module_bindings/vec_i_64_type.rs index 068041fb66f..b5e7a84ef1b 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/vec_i_64_type.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/vec_i_64_type.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/vec_i_8_table.rs b/crates/sdk/tests/test-client/src/module_bindings/vec_i_8_table.rs index 6497a066785..0c0b8f379e7 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/vec_i_8_table.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/vec_i_8_table.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use super::vec_i_8_type::VecI8; diff --git a/crates/sdk/tests/test-client/src/module_bindings/vec_i_8_type.rs b/crates/sdk/tests/test-client/src/module_bindings/vec_i_8_type.rs index 03a95fea3bd..071e5cf5f34 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/vec_i_8_type.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/vec_i_8_type.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/vec_identity_table.rs b/crates/sdk/tests/test-client/src/module_bindings/vec_identity_table.rs index 4d803d84411..f842df581d3 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/vec_identity_table.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/vec_identity_table.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use super::vec_identity_type::VecIdentity; diff --git a/crates/sdk/tests/test-client/src/module_bindings/vec_identity_type.rs b/crates/sdk/tests/test-client/src/module_bindings/vec_identity_type.rs index 86a1d1680ab..34660babf71 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/vec_identity_type.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/vec_identity_type.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/vec_simple_enum_table.rs b/crates/sdk/tests/test-client/src/module_bindings/vec_simple_enum_table.rs index 0ce3d14bb9e..a94c148bf4b 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/vec_simple_enum_table.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/vec_simple_enum_table.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use super::simple_enum_type::SimpleEnum; diff --git a/crates/sdk/tests/test-client/src/module_bindings/vec_simple_enum_type.rs b/crates/sdk/tests/test-client/src/module_bindings/vec_simple_enum_type.rs index 202debbe0a3..0f46e14d157 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/vec_simple_enum_type.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/vec_simple_enum_type.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/vec_string_table.rs b/crates/sdk/tests/test-client/src/module_bindings/vec_string_table.rs index cf31c5fa1dc..0ee2d468108 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/vec_string_table.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/vec_string_table.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use super::vec_string_type::VecString; diff --git a/crates/sdk/tests/test-client/src/module_bindings/vec_string_type.rs b/crates/sdk/tests/test-client/src/module_bindings/vec_string_type.rs index 2c14715fcb0..6ad84b9de00 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/vec_string_type.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/vec_string_type.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/vec_u_128_table.rs b/crates/sdk/tests/test-client/src/module_bindings/vec_u_128_table.rs index 884f848dc64..54070fff317 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/vec_u_128_table.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/vec_u_128_table.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use super::vec_u_128_type::VecU128; diff --git a/crates/sdk/tests/test-client/src/module_bindings/vec_u_128_type.rs b/crates/sdk/tests/test-client/src/module_bindings/vec_u_128_type.rs index 047cdc4fb2f..d489b7ad0a5 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/vec_u_128_type.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/vec_u_128_type.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/vec_u_16_table.rs b/crates/sdk/tests/test-client/src/module_bindings/vec_u_16_table.rs index d1846c8ed32..a9e8006eb63 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/vec_u_16_table.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/vec_u_16_table.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use super::vec_u_16_type::VecU16; diff --git a/crates/sdk/tests/test-client/src/module_bindings/vec_u_16_type.rs b/crates/sdk/tests/test-client/src/module_bindings/vec_u_16_type.rs index d0f5421b1c7..4de701773e9 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/vec_u_16_type.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/vec_u_16_type.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/vec_u_256_table.rs b/crates/sdk/tests/test-client/src/module_bindings/vec_u_256_table.rs index 6eb5917a193..8ba9a6c54c4 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/vec_u_256_table.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/vec_u_256_table.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use super::vec_u_256_type::VecU256; diff --git a/crates/sdk/tests/test-client/src/module_bindings/vec_u_256_type.rs b/crates/sdk/tests/test-client/src/module_bindings/vec_u_256_type.rs index 9b92af058d7..055687d9450 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/vec_u_256_type.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/vec_u_256_type.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/vec_u_32_table.rs b/crates/sdk/tests/test-client/src/module_bindings/vec_u_32_table.rs index 1bcad2e5bec..392d04791b0 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/vec_u_32_table.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/vec_u_32_table.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use super::vec_u_32_type::VecU32; diff --git a/crates/sdk/tests/test-client/src/module_bindings/vec_u_32_type.rs b/crates/sdk/tests/test-client/src/module_bindings/vec_u_32_type.rs index 1302c3b0b02..ba3d7c87f87 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/vec_u_32_type.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/vec_u_32_type.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/vec_u_64_table.rs b/crates/sdk/tests/test-client/src/module_bindings/vec_u_64_table.rs index 90368ad9f3a..7cf92ec0664 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/vec_u_64_table.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/vec_u_64_table.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use super::vec_u_64_type::VecU64; diff --git a/crates/sdk/tests/test-client/src/module_bindings/vec_u_64_type.rs b/crates/sdk/tests/test-client/src/module_bindings/vec_u_64_type.rs index 8abc7c5184a..a136afdbd67 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/vec_u_64_type.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/vec_u_64_type.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/vec_u_8_table.rs b/crates/sdk/tests/test-client/src/module_bindings/vec_u_8_table.rs index 10a9faa936c..fe310fad1c1 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/vec_u_8_table.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/vec_u_8_table.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use super::vec_u_8_type::VecU8; diff --git a/crates/sdk/tests/test-client/src/module_bindings/vec_u_8_type.rs b/crates/sdk/tests/test-client/src/module_bindings/vec_u_8_type.rs index a4868325638..056e5c0b942 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/vec_u_8_type.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/vec_u_8_type.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/test-client/src/module_bindings/vec_unit_struct_table.rs b/crates/sdk/tests/test-client/src/module_bindings/vec_unit_struct_table.rs index 827cbb20d1d..09f4971ca52 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/vec_unit_struct_table.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/vec_unit_struct_table.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use super::unit_struct_type::UnitStruct; diff --git a/crates/sdk/tests/test-client/src/module_bindings/vec_unit_struct_type.rs b/crates/sdk/tests/test-client/src/module_bindings/vec_unit_struct_type.rs index 4a93a4e57de..f651ea4345f 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/vec_unit_struct_type.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/vec_unit_struct_type.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ From dd17f203013a8b434bcddf26155484e27370dd58 Mon Sep 17 00:00:00 2001 From: James Gilles Date: Mon, 3 Feb 2025 12:33:22 -0500 Subject: [PATCH 5/8] Avoid name conflict in generated C# code --- crates/cli/src/subcommands/generate/csharp.rs | 2 +- .../snapshots/codegen__codegen_csharp.snap | 43 +++++++++---- .../snapshots/codegen__codegen_rust.snap | 63 ++++++++++++++++++- .../codegen__codegen_typescript.snap | 45 ++++++++++++- .../src/module_bindings/connected_table.rs | 2 +- .../src/module_bindings/connected_type.rs | 2 +- .../src/module_bindings/disconnected_table.rs | 2 +- .../src/module_bindings/disconnected_type.rs | 2 +- .../identity_connected_reducer.rs | 21 +++---- .../identity_disconnected_reducer.rs | 20 +++--- .../src/module_bindings/mod.rs | 21 ++++--- modules/rust-wasm-test/src/lib.rs | 3 +- 12 files changed, 176 insertions(+), 50 deletions(-) diff --git a/crates/cli/src/subcommands/generate/csharp.rs b/crates/cli/src/subcommands/generate/csharp.rs index 6f0bcde5cd1..66a2b82ede6 100644 --- a/crates/cli/src/subcommands/generate/csharp.rs +++ b/crates/cli/src/subcommands/generate/csharp.rs @@ -89,7 +89,7 @@ impl Lang for Csharp<'_> { "public sealed class {csharp_table_class_name} : RemoteTableHandle" ); indented_block(output, |output| { - writeln!(output, "protected override string Name => \"{}\";", table.name); + writeln!(output, "protected override string RemoteTableName => \"{}\";", table.name); writeln!(output); // If this is a table, we want to generate event accessor and indexes diff --git a/crates/cli/tests/snapshots/codegen__codegen_csharp.snap b/crates/cli/tests/snapshots/codegen__codegen_csharp.snap index 144e40dff40..1b39d791f93 100644 --- a/crates/cli/tests/snapshots/codegen__codegen_csharp.snap +++ b/crates/cli/tests/snapshots/codegen__codegen_csharp.snap @@ -1,7 +1,6 @@ --- source: crates/cli/tests/codegen.rs expression: outfiles -snapshot_kind: text --- "Reducers/AddPlayer.g.cs" = ''' // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE @@ -730,7 +729,7 @@ namespace SpacetimeDB { public sealed class HasSpecialStuffHandle : RemoteTableHandle { - protected override string Name => "has_special_stuff"; + protected override string RemoteTableName => "has_special_stuff"; internal HasSpecialStuffHandle(DbConnection conn) : base(conn) { @@ -759,7 +758,7 @@ namespace SpacetimeDB { public sealed class LoggedOutPlayerHandle : RemoteTableHandle { - protected override string Name => "logged_out_player"; + protected override string RemoteTableName => "logged_out_player"; public sealed class IdentityUniqueIndex : UniqueIndexBase { @@ -770,6 +769,15 @@ namespace SpacetimeDB public readonly IdentityUniqueIndex Identity; + public sealed class NameUniqueIndex : UniqueIndexBase + { + protected override string GetKey(Player row) => row.Name; + + public NameUniqueIndex(LoggedOutPlayerHandle table) : base(table) { } + } + + public readonly NameUniqueIndex Name; + public sealed class PlayerIdUniqueIndex : UniqueIndexBase { protected override ulong GetKey(Player row) => row.PlayerId; @@ -782,6 +790,7 @@ namespace SpacetimeDB internal LoggedOutPlayerHandle(DbConnection conn) : base(conn) { Identity = new(this); + Name = new(this); PlayerId = new(this); } @@ -810,7 +819,7 @@ namespace SpacetimeDB { public sealed class PkMultiIdentityHandle : RemoteTableHandle { - protected override string Name => "pk_multi_identity"; + protected override string RemoteTableName => "pk_multi_identity"; public sealed class IdUniqueIndex : UniqueIndexBase { @@ -861,7 +870,7 @@ namespace SpacetimeDB { public sealed class PlayerHandle : RemoteTableHandle { - protected override string Name => "player"; + protected override string RemoteTableName => "player"; public sealed class IdentityUniqueIndex : UniqueIndexBase { @@ -872,6 +881,15 @@ namespace SpacetimeDB public readonly IdentityUniqueIndex Identity; + public sealed class NameUniqueIndex : UniqueIndexBase + { + protected override string GetKey(Player row) => row.Name; + + public NameUniqueIndex(PlayerHandle table) : base(table) { } + } + + public readonly NameUniqueIndex Name; + public sealed class PlayerIdUniqueIndex : UniqueIndexBase { protected override ulong GetKey(Player row) => row.PlayerId; @@ -884,6 +902,7 @@ namespace SpacetimeDB internal PlayerHandle(DbConnection conn) : base(conn) { Identity = new(this); + Name = new(this); PlayerId = new(this); } @@ -912,7 +931,7 @@ namespace SpacetimeDB { public sealed class PointsHandle : RemoteTableHandle { - protected override string Name => "points"; + protected override string RemoteTableName => "points"; public sealed class MultiColumnIndexIndex : BTreeIndexBase<(long X, long Y)> { @@ -951,7 +970,7 @@ namespace SpacetimeDB { public sealed class PrivateHandle : RemoteTableHandle { - protected override string Name => "private"; + protected override string RemoteTableName => "private"; internal PrivateHandle(DbConnection conn) : base(conn) { @@ -980,7 +999,7 @@ namespace SpacetimeDB { public sealed class RepeatingTestArgHandle : RemoteTableHandle { - protected override string Name => "repeating_test_arg"; + protected override string RemoteTableName => "repeating_test_arg"; public sealed class ScheduledIdUniqueIndex : UniqueIndexBase { @@ -1021,7 +1040,7 @@ namespace SpacetimeDB { public sealed class TestAHandle : RemoteTableHandle { - protected override string Name => "test_a"; + protected override string RemoteTableName => "test_a"; public sealed class FooIndex : BTreeIndexBase { @@ -1060,7 +1079,7 @@ namespace SpacetimeDB { public sealed class TestDHandle : RemoteTableHandle { - protected override string Name => "test_d"; + protected override string RemoteTableName => "test_d"; internal TestDHandle(DbConnection conn) : base(conn) { @@ -1089,7 +1108,7 @@ namespace SpacetimeDB { public sealed class TestEHandle : RemoteTableHandle { - protected override string Name => "test_e"; + protected override string RemoteTableName => "test_e"; public sealed class IdUniqueIndex : UniqueIndexBase { @@ -1140,7 +1159,7 @@ namespace SpacetimeDB { public sealed class TestFHandle : RemoteTableHandle { - protected override string Name => "test_f"; + protected override string RemoteTableName => "test_f"; internal TestFHandle(DbConnection conn) : base(conn) { diff --git a/crates/cli/tests/snapshots/codegen__codegen_rust.snap b/crates/cli/tests/snapshots/codegen__codegen_rust.snap index 52260a6b069..0c3dd731f55 100644 --- a/crates/cli/tests/snapshots/codegen__codegen_rust.snap +++ b/crates/cli/tests/snapshots/codegen__codegen_rust.snap @@ -1,7 +1,6 @@ --- source: crates/cli/tests/codegen.rs expression: outfiles -snapshot_kind: text --- "add_player_reducer.rs" = ''' // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE @@ -942,6 +941,7 @@ pub(super) fn register_table(client_cache: &mut __sdk::ClientCache("logged_out_player"); _table.add_unique_constraint::<__sdk::Identity>("identity", |row| &row.identity); _table.add_unique_constraint::("player_id", |row| &row.player_id); + _table.add_unique_constraint::("name", |row| &row.name); } pub struct LoggedOutPlayerUpdateCallbackId(__sdk::CallbackId); @@ -1029,6 +1029,36 @@ pub(super) fn parse_table_update( self.imp.find(col_val) } } + + /// Access to the `name` unique index on the table `logged_out_player`, + /// which allows point queries on the field of the same name + /// via the [`LoggedOutPlayerNameUnique::find`] method. + /// + /// Users are encouraged not to explicitly reference this type, + /// but to directly chain method calls, + /// like `ctx.db.logged_out_player().name().find(...)`. + pub struct LoggedOutPlayerNameUnique<'ctx> { + imp: __sdk::UniqueConstraintHandle, + phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, + } + + impl<'ctx> LoggedOutPlayerTableHandle<'ctx> { + /// Get a handle on the `name` unique index on the table `logged_out_player`. + pub fn name(&self) -> LoggedOutPlayerNameUnique<'ctx> { + LoggedOutPlayerNameUnique { + imp: self.imp.get_unique_constraint::("name"), + phantom: std::marker::PhantomData, + } + } + } + + impl<'ctx> LoggedOutPlayerNameUnique<'ctx> { + /// Find the subscribed row whose `name` column value is equal to `col_val`, + /// if such a row is present in the client cache. + pub fn find(&self, col_val: &String) -> Option { + self.imp.find(col_val) + } + } ''' "mod.rs" = ''' // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE @@ -1953,6 +1983,7 @@ pub(super) fn register_table(client_cache: &mut __sdk::ClientCache("player"); _table.add_unique_constraint::<__sdk::Identity>("identity", |row| &row.identity); _table.add_unique_constraint::("player_id", |row| &row.player_id); + _table.add_unique_constraint::("name", |row| &row.name); } pub struct PlayerUpdateCallbackId(__sdk::CallbackId); @@ -2040,6 +2071,36 @@ pub(super) fn parse_table_update( self.imp.find(col_val) } } + + /// Access to the `name` unique index on the table `player`, + /// which allows point queries on the field of the same name + /// via the [`PlayerNameUnique::find`] method. + /// + /// Users are encouraged not to explicitly reference this type, + /// but to directly chain method calls, + /// like `ctx.db.player().name().find(...)`. + pub struct PlayerNameUnique<'ctx> { + imp: __sdk::UniqueConstraintHandle, + phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, + } + + impl<'ctx> PlayerTableHandle<'ctx> { + /// Get a handle on the `name` unique index on the table `player`. + pub fn name(&self) -> PlayerNameUnique<'ctx> { + PlayerNameUnique { + imp: self.imp.get_unique_constraint::("name"), + phantom: std::marker::PhantomData, + } + } + } + + impl<'ctx> PlayerNameUnique<'ctx> { + /// Find the subscribed row whose `name` column value is equal to `col_val`, + /// if such a row is present in the client cache. + pub fn find(&self, col_val: &String) -> Option { + self.imp.find(col_val) + } + } ''' "player_type.rs" = ''' // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE diff --git a/crates/cli/tests/snapshots/codegen__codegen_typescript.snap b/crates/cli/tests/snapshots/codegen__codegen_typescript.snap index 098e4af34b7..6e74e910b5e 100644 --- a/crates/cli/tests/snapshots/codegen__codegen_typescript.snap +++ b/crates/cli/tests/snapshots/codegen__codegen_typescript.snap @@ -1,7 +1,6 @@ --- source: crates/cli/tests/codegen.rs expression: outfiles -snapshot_kind: text --- "add_player_reducer.ts" = ''' // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE @@ -1362,6 +1361,28 @@ export class LoggedOutPlayerTableHandle { } }, }; + /** + * Access to the `name` unique index on the table `logged_out_player`, + * which allows point queries on the field of the same name + * via the [`LoggedOutPlayerNameUnique.find`] method. + * + * Users are encouraged not to explicitly reference this type, + * but to directly chain method calls, + * like `ctx.db.loggedOutPlayer.name().find(...)`. + * + * Get a handle on the `name` unique index on the table `logged_out_player`. + */ + name = { + // Find the subscribed row whose `name` column value is equal to `col_val`, + // if such a row is present in the client cache. + find: (col_val: string): Player | undefined => { + for (let row of this.tableCache.iter()) { + if (deepEqual(row.name, col_val)) { + return row; + } + } + }, + }; onInsert = (cb: (ctx: EventContext, row: Player) => void) => { return this.tableCache.onInsert(cb); @@ -1883,6 +1904,28 @@ export class PlayerTableHandle { } }, }; + /** + * Access to the `name` unique index on the table `player`, + * which allows point queries on the field of the same name + * via the [`PlayerNameUnique.find`] method. + * + * Users are encouraged not to explicitly reference this type, + * but to directly chain method calls, + * like `ctx.db.player.name().find(...)`. + * + * Get a handle on the `name` unique index on the table `player`. + */ + name = { + // Find the subscribed row whose `name` column value is equal to `col_val`, + // if such a row is present in the client cache. + find: (col_val: string): Player | undefined => { + for (let row of this.tableCache.iter()) { + if (deepEqual(row.name, col_val)) { + return row; + } + } + }, + }; onInsert = (cb: (ctx: EventContext, row: Player) => void) => { return this.tableCache.onInsert(cb); diff --git a/crates/sdk/tests/connect_disconnect_client/src/module_bindings/connected_table.rs b/crates/sdk/tests/connect_disconnect_client/src/module_bindings/connected_table.rs index 712d787f3a2..ea180f6388d 100644 --- a/crates/sdk/tests/connect_disconnect_client/src/module_bindings/connected_table.rs +++ b/crates/sdk/tests/connect_disconnect_client/src/module_bindings/connected_table.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use super::connected_type::Connected; diff --git a/crates/sdk/tests/connect_disconnect_client/src/module_bindings/connected_type.rs b/crates/sdk/tests/connect_disconnect_client/src/module_bindings/connected_type.rs index f3078eec471..16bd5dcc765 100644 --- a/crates/sdk/tests/connect_disconnect_client/src/module_bindings/connected_type.rs +++ b/crates/sdk/tests/connect_disconnect_client/src/module_bindings/connected_type.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/connect_disconnect_client/src/module_bindings/disconnected_table.rs b/crates/sdk/tests/connect_disconnect_client/src/module_bindings/disconnected_table.rs index 6f6ba11fd34..86588faca4e 100644 --- a/crates/sdk/tests/connect_disconnect_client/src/module_bindings/disconnected_table.rs +++ b/crates/sdk/tests/connect_disconnect_client/src/module_bindings/disconnected_table.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use super::disconnected_type::Disconnected; diff --git a/crates/sdk/tests/connect_disconnect_client/src/module_bindings/disconnected_type.rs b/crates/sdk/tests/connect_disconnect_client/src/module_bindings/disconnected_type.rs index 295a9af015c..3a69b48871a 100644 --- a/crates/sdk/tests/connect_disconnect_client/src/module_bindings/disconnected_type.rs +++ b/crates/sdk/tests/connect_disconnect_client/src/module_bindings/disconnected_type.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ diff --git a/crates/sdk/tests/connect_disconnect_client/src/module_bindings/identity_connected_reducer.rs b/crates/sdk/tests/connect_disconnect_client/src/module_bindings/identity_connected_reducer.rs index 13002531ccb..4f4f250c1fd 100644 --- a/crates/sdk/tests/connect_disconnect_client/src/module_bindings/identity_connected_reducer.rs +++ b/crates/sdk/tests/connect_disconnect_client/src/module_bindings/identity_connected_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ @@ -24,17 +24,17 @@ impl __sdk::InModule for IdentityConnectedArgs { pub struct IdentityConnectedCallbackId(__sdk::CallbackId); #[allow(non_camel_case_types)] -/// Extension trait for access to the reducer `__identity_connected__`. +/// Extension trait for access to the reducer `identity_connected`. /// /// Implemented for [`super::RemoteReducers`]. pub trait identity_connected { - /// Request that the remote module invoke the reducer `__identity_connected__` to run as soon as possible. + /// Request that the remote module invoke the reducer `identity_connected` to run as soon as possible. /// /// This method returns immediately, and errors only if we are unable to send the request. /// The reducer will run asynchronously in the future, /// and its status can be observed by listening for [`Self::on_identity_connected`] callbacks. fn identity_connected(&self) -> __anyhow::Result<()>; - /// Register a callback to run whenever we are notified of an invocation of the reducer `__identity_connected__`. + /// Register a callback to run whenever we are notified of an invocation of the reducer `identity_connected`. /// /// The [`super::EventContext`] passed to the `callback` /// will always have [`__sdk::Event::Reducer`] as its `event`, @@ -55,15 +55,14 @@ pub trait identity_connected { impl identity_connected for super::RemoteReducers { fn identity_connected(&self) -> __anyhow::Result<()> { - self.imp - .call_reducer("__identity_connected__", IdentityConnectedArgs {}) + self.imp.call_reducer("identity_connected", IdentityConnectedArgs {}) } fn on_identity_connected( &self, mut callback: impl FnMut(&super::EventContext) + Send + 'static, ) -> IdentityConnectedCallbackId { IdentityConnectedCallbackId(self.imp.on_reducer( - "__identity_connected__", + "identity_connected", Box::new(move |ctx: &super::EventContext| { let super::EventContext { event: @@ -81,19 +80,19 @@ impl identity_connected for super::RemoteReducers { )) } fn remove_on_identity_connected(&self, callback: IdentityConnectedCallbackId) { - self.imp.remove_on_reducer("__identity_connected__", callback.0) + self.imp.remove_on_reducer("identity_connected", callback.0) } } #[allow(non_camel_case_types)] #[doc(hidden)] -/// Extension trait for setting the call-flags for the reducer `__identity_connected__`. +/// Extension trait for setting the call-flags for the reducer `identity_connected`. /// /// Implemented for [`super::SetReducerFlags`]. /// /// This type is currently unstable and may be removed without a major version bump. pub trait set_flags_for_identity_connected { - /// Set the call-reducer flags for the reducer `__identity_connected__` to `flags`. + /// Set the call-reducer flags for the reducer `identity_connected` to `flags`. /// /// This type is currently unstable and may be removed without a major version bump. fn identity_connected(&self, flags: __ws::CallReducerFlags); @@ -101,6 +100,6 @@ pub trait set_flags_for_identity_connected { impl set_flags_for_identity_connected for super::SetReducerFlags { fn identity_connected(&self, flags: __ws::CallReducerFlags) { - self.imp.set_call_reducer_flags("__identity_connected__", flags); + self.imp.set_call_reducer_flags("identity_connected", flags); } } diff --git a/crates/sdk/tests/connect_disconnect_client/src/module_bindings/identity_disconnected_reducer.rs b/crates/sdk/tests/connect_disconnect_client/src/module_bindings/identity_disconnected_reducer.rs index 41dc34ff8e3..21cc8aceef8 100644 --- a/crates/sdk/tests/connect_disconnect_client/src/module_bindings/identity_disconnected_reducer.rs +++ b/crates/sdk/tests/connect_disconnect_client/src/module_bindings/identity_disconnected_reducer.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ @@ -24,17 +24,17 @@ impl __sdk::InModule for IdentityDisconnectedArgs { pub struct IdentityDisconnectedCallbackId(__sdk::CallbackId); #[allow(non_camel_case_types)] -/// Extension trait for access to the reducer `__identity_disconnected__`. +/// Extension trait for access to the reducer `identity_disconnected`. /// /// Implemented for [`super::RemoteReducers`]. pub trait identity_disconnected { - /// Request that the remote module invoke the reducer `__identity_disconnected__` to run as soon as possible. + /// Request that the remote module invoke the reducer `identity_disconnected` to run as soon as possible. /// /// This method returns immediately, and errors only if we are unable to send the request. /// The reducer will run asynchronously in the future, /// and its status can be observed by listening for [`Self::on_identity_disconnected`] callbacks. fn identity_disconnected(&self) -> __anyhow::Result<()>; - /// Register a callback to run whenever we are notified of an invocation of the reducer `__identity_disconnected__`. + /// Register a callback to run whenever we are notified of an invocation of the reducer `identity_disconnected`. /// /// The [`super::EventContext`] passed to the `callback` /// will always have [`__sdk::Event::Reducer`] as its `event`, @@ -56,14 +56,14 @@ pub trait identity_disconnected { impl identity_disconnected for super::RemoteReducers { fn identity_disconnected(&self) -> __anyhow::Result<()> { self.imp - .call_reducer("__identity_disconnected__", IdentityDisconnectedArgs {}) + .call_reducer("identity_disconnected", IdentityDisconnectedArgs {}) } fn on_identity_disconnected( &self, mut callback: impl FnMut(&super::EventContext) + Send + 'static, ) -> IdentityDisconnectedCallbackId { IdentityDisconnectedCallbackId(self.imp.on_reducer( - "__identity_disconnected__", + "identity_disconnected", Box::new(move |ctx: &super::EventContext| { let super::EventContext { event: @@ -81,19 +81,19 @@ impl identity_disconnected for super::RemoteReducers { )) } fn remove_on_identity_disconnected(&self, callback: IdentityDisconnectedCallbackId) { - self.imp.remove_on_reducer("__identity_disconnected__", callback.0) + self.imp.remove_on_reducer("identity_disconnected", callback.0) } } #[allow(non_camel_case_types)] #[doc(hidden)] -/// Extension trait for setting the call-flags for the reducer `__identity_disconnected__`. +/// Extension trait for setting the call-flags for the reducer `identity_disconnected`. /// /// Implemented for [`super::SetReducerFlags`]. /// /// This type is currently unstable and may be removed without a major version bump. pub trait set_flags_for_identity_disconnected { - /// Set the call-reducer flags for the reducer `__identity_disconnected__` to `flags`. + /// Set the call-reducer flags for the reducer `identity_disconnected` to `flags`. /// /// This type is currently unstable and may be removed without a major version bump. fn identity_disconnected(&self, flags: __ws::CallReducerFlags); @@ -101,6 +101,6 @@ pub trait set_flags_for_identity_disconnected { impl set_flags_for_identity_disconnected for super::SetReducerFlags { fn identity_disconnected(&self, flags: __ws::CallReducerFlags) { - self.imp.set_call_reducer_flags("__identity_disconnected__", flags); + self.imp.set_call_reducer_flags("identity_disconnected", flags); } } diff --git a/crates/sdk/tests/connect_disconnect_client/src/module_bindings/mod.rs b/crates/sdk/tests/connect_disconnect_client/src/module_bindings/mod.rs index 94806d96908..3c789a9f32e 100644 --- a/crates/sdk/tests/connect_disconnect_client/src/module_bindings/mod.rs +++ b/crates/sdk/tests/connect_disconnect_client/src/module_bindings/mod.rs @@ -1,5 +1,5 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{ @@ -44,8 +44,8 @@ impl __sdk::InModule for Reducer { impl __sdk::Reducer for Reducer { fn reducer_name(&self) -> &'static str { match self { - Reducer::IdentityConnected => "__identity_connected__", - Reducer::IdentityDisconnected => "__identity_disconnected__", + Reducer::IdentityConnected => "identity_connected", + Reducer::IdentityDisconnected => "identity_disconnected", } } } @@ -53,13 +53,16 @@ impl TryFrom<__ws::ReducerCallInfo<__ws::BsatnFormat>> for Reducer { type Error = __anyhow::Error; fn try_from(value: __ws::ReducerCallInfo<__ws::BsatnFormat>) -> __anyhow::Result { match &value.reducer_name[..] { - "__identity_connected__" => Ok(__sdk::parse_reducer_args::< - identity_connected_reducer::IdentityConnectedArgs, - >("__identity_connected__", &value.args)? - .into()), - "__identity_disconnected__" => Ok(__sdk::parse_reducer_args::< + "identity_connected" => Ok( + __sdk::parse_reducer_args::( + "identity_connected", + &value.args, + )? + .into(), + ), + "identity_disconnected" => Ok(__sdk::parse_reducer_args::< identity_disconnected_reducer::IdentityDisconnectedArgs, - >("__identity_disconnected__", &value.args)? + >("identity_disconnected", &value.args)? .into()), _ => Err(__anyhow::anyhow!("Unknown reducer {:?}", value.reducer_name)), } diff --git a/modules/rust-wasm-test/src/lib.rs b/modules/rust-wasm-test/src/lib.rs index 1b1f46a1882..78aea825720 100644 --- a/modules/rust-wasm-test/src/lib.rs +++ b/modules/rust-wasm-test/src/lib.rs @@ -370,5 +370,6 @@ pub struct Player { #[auto_inc] #[unique] player_id: u64, + #[unique] // fields called "name" previously caused name collisions in generated table handles name: String, -} +} \ No newline at end of file From fb344d7c77fc7359e20857456f0aeb2e99ce3ac6 Mon Sep 17 00:00:00 2001 From: James Gilles Date: Mon, 3 Feb 2025 12:36:03 -0500 Subject: [PATCH 6/8] cargo fmt --- crates/cli/src/subcommands/generate/csharp.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/crates/cli/src/subcommands/generate/csharp.rs b/crates/cli/src/subcommands/generate/csharp.rs index 66a2b82ede6..0606983818c 100644 --- a/crates/cli/src/subcommands/generate/csharp.rs +++ b/crates/cli/src/subcommands/generate/csharp.rs @@ -89,7 +89,11 @@ impl Lang for Csharp<'_> { "public sealed class {csharp_table_class_name} : RemoteTableHandle" ); indented_block(output, |output| { - writeln!(output, "protected override string RemoteTableName => \"{}\";", table.name); + writeln!( + output, + "protected override string RemoteTableName => \"{}\";", + table.name + ); writeln!(output); // If this is a table, we want to generate event accessor and indexes From 12255185a1318be8ac23d3aee855c73c44fa0893 Mon Sep 17 00:00:00 2001 From: James Gilles Date: Mon, 3 Feb 2025 12:37:28 -0500 Subject: [PATCH 7/8] fmt once more --- modules/rust-wasm-test/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/rust-wasm-test/src/lib.rs b/modules/rust-wasm-test/src/lib.rs index 78aea825720..598e53464b4 100644 --- a/modules/rust-wasm-test/src/lib.rs +++ b/modules/rust-wasm-test/src/lib.rs @@ -372,4 +372,4 @@ pub struct Player { player_id: u64, #[unique] // fields called "name" previously caused name collisions in generated table handles name: String, -} \ No newline at end of file +} From 221e91cf7839aa11681fc54b3fee0a23be3c4219 Mon Sep 17 00:00:00 2001 From: James Gilles Date: Wed, 5 Feb 2025 16:49:09 -0500 Subject: [PATCH 8/8] Make C# SDK CI point to correct branch again --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d0be0748067..942548cfeff 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -142,7 +142,7 @@ jobs: uses: actions/checkout@v4 with: repository: clockworklabs/spacetimedb-csharp-sdk - ref: ingvar/csharp-codegen-rewrite # TODO: revert to `staging` before merging + ref: staging path: spacetimedb-csharp-sdk - name: Setup NuGet override for C# SDK