From 40f239ed20ae764584ebf023044f000214632ae5 Mon Sep 17 00:00:00 2001 From: Shubham Mishra Date: Wed, 11 Feb 2026 18:30:53 +0530 Subject: [PATCH 001/133] table -> accessor: rust --- crates/bindings-macro/src/lib.rs | 1 + crates/bindings-macro/src/table.rs | 18 +++++----- .../test-app/server/src/lib.rs | 6 ++-- .../test-react-router-app/server/src/lib.rs | 6 ++-- crates/bindings/src/lib.rs | 16 ++++----- crates/bindings/src/table.rs | 18 +++++----- crates/bindings/tests/ui/reducers.rs | 4 +-- crates/bindings/tests/ui/tables.rs | 8 ++--- crates/bindings/tests/ui/views-more.rs | 2 +- crates/bindings/tests/ui/views.rs | 6 ++-- .../add-remove-index-indexed/src/lib.rs | 4 +-- .../modules/add-remove-index/src/lib.rs | 4 +-- .../modules/autoinc-basic/src/lib.rs | 2 +- .../modules/autoinc-unique/src/lib.rs | 2 +- .../smoketests/modules/call-empty/src/lib.rs | 2 +- .../modules/call-reducer-procedure/src/lib.rs | 2 +- .../src/lib.rs | 2 +- .../client-connection-reject/src/lib.rs | 2 +- .../modules/confirmed-reads/src/lib.rs | 2 +- .../modules/delete-database/src/lib.rs | 4 +-- crates/smoketests/modules/describe/src/lib.rs | 2 +- crates/smoketests/modules/dml/src/lib.rs | 2 +- .../fail-initial-publish-broken/src/lib.rs | 2 +- .../fail-initial-publish-fixed/src/lib.rs | 2 +- .../smoketests/modules/filtering/src/lib.rs | 8 ++--- .../modules/hotswap-basic/src/lib.rs | 2 +- .../modules/hotswap-updated/src/lib.rs | 4 +-- .../modules/module-nested-op/src/lib.rs | 4 +-- .../modules/modules-add-table/src/lib.rs | 4 +-- .../modules/modules-basic/src/lib.rs | 2 +- .../modules/modules-breaking/src/lib.rs | 2 +- .../smoketests/modules/namespaces/src/lib.rs | 2 +- .../modules/new-user-flow/src/lib.rs | 2 +- .../modules/permissions-private/src/lib.rs | 4 +-- crates/smoketests/modules/pg-wire/src/lib.rs | 22 ++++++------ .../restart-connected-client/src/lib.rs | 2 +- .../modules/restart-person/src/lib.rs | 2 +- .../modules/rls-no-filter/src/lib.rs | 2 +- .../modules/rls-with-filter/src/lib.rs | 2 +- crates/smoketests/modules/rls/src/lib.rs | 2 +- .../modules/schedule-cancel/src/lib.rs | 2 +- .../modules/schedule-procedure/src/lib.rs | 2 +- .../modules/schedule-subscribe/src/lib.rs | 2 +- .../modules/schedule-volatile/src/lib.rs | 2 +- .../smoketests/modules/sql-format/src/lib.rs | 16 ++++----- .../modules/upload-module-2/src/lib.rs | 2 +- .../views-auto-migrate-updated/src/lib.rs | 2 +- .../modules/views-auto-migrate/src/lib.rs | 2 +- .../smoketests/modules/views-basic/src/lib.rs | 2 +- .../modules/views-broken-namespace/src/lib.rs | 2 +- .../modules/views-drop-view/src/lib.rs | 2 +- .../smoketests/modules/views-query/src/lib.rs | 4 +-- .../modules/views-recovered/src/lib.rs | 2 +- .../smoketests/modules/views-sql/src/lib.rs | 6 ++-- .../modules/views-subscribe/src/lib.rs | 2 +- .../modules/views-trapped/src/lib.rs | 2 +- crates/smoketests/src/lib.rs | 2 +- crates/smoketests/tests/auto_migration.rs | 22 ++++++------ .../smoketests/tests/fail_initial_publish.rs | 2 +- crates/smoketests/tests/rls.rs | 2 +- demo/Blackholio/server-rust/src/lib.rs | 26 +++++++------- modules/benchmarks/src/circles.rs | 6 ++-- modules/benchmarks/src/ia_loop.rs | 16 ++++----- modules/benchmarks/src/synthetic.rs | 12 +++---- modules/keynote-benchmarks/src/lib.rs | 4 +-- modules/module-test/src/lib.rs | 30 ++++++++-------- modules/perf-test/src/lib.rs | 2 +- .../sdk-test-connect-disconnect/src/lib.rs | 4 +-- modules/sdk-test-procedure/src/lib.rs | 8 ++--- modules/sdk-test-view/src/lib.rs | 6 ++-- modules/sdk-test/src/lib.rs | 14 ++++---- smoketests/tests/add_remove_index.py | 8 ++--- smoketests/tests/auto_inc.py | 4 +-- smoketests/tests/auto_migration.py | 20 +++++------ smoketests/tests/call.py | 4 +-- smoketests/tests/clear_database.py | 4 +-- ...ient_connected_error_rejects_connection.py | 2 +- smoketests/tests/delete_database.py | 4 +-- smoketests/tests/describe.py | 2 +- smoketests/tests/dml.py | 2 +- smoketests/tests/fail_initial_publish.py | 4 +-- smoketests/tests/filtering.py | 8 ++--- smoketests/tests/module_nested_op.py | 4 +-- smoketests/tests/modules.py | 18 +++++----- smoketests/tests/new_user_flow.py | 2 +- smoketests/tests/permissions.py | 4 +-- smoketests/tests/pg_wire.py | 22 ++++++------ smoketests/tests/replication.py | 6 ++-- smoketests/tests/rls.py | 6 ++-- smoketests/tests/schedule_reducer.py | 8 ++--- smoketests/tests/sql.py | 16 ++++----- smoketests/tests/teams.py | 12 +++---- smoketests/tests/views.py | 34 +++++++++---------- smoketests/tests/zz_docker.py | 6 ++-- templates/basic-rs/spacetimedb/src/lib.rs | 2 +- .../chat-console-rs/spacetimedb/src/lib.rs | 4 +-- 96 files changed, 300 insertions(+), 299 deletions(-) diff --git a/crates/bindings-macro/src/lib.rs b/crates/bindings-macro/src/lib.rs index b06e98ab8f9..93622f7eab6 100644 --- a/crates/bindings-macro/src/lib.rs +++ b/crates/bindings-macro/src/lib.rs @@ -39,6 +39,7 @@ mod sym { }; } + symbol!(accessor); symbol!(at); symbol!(auto_inc); symbol!(btree); diff --git a/crates/bindings-macro/src/table.rs b/crates/bindings-macro/src/table.rs index 7bc2940d548..1b3f01212da 100644 --- a/crates/bindings-macro/src/table.rs +++ b/crates/bindings-macro/src/table.rs @@ -17,7 +17,7 @@ use syn::{parse_quote, Ident, Path, Token}; pub(crate) struct TableArgs { access: Option, scheduled: Option, - name: Ident, + accessor: Ident, indices: Vec, } @@ -69,7 +69,7 @@ impl TableArgs { pub(crate) fn parse(input: TokenStream, struct_ident: &Ident) -> syn::Result { let mut access = None; let mut scheduled = None; - let mut name = None; + let mut accessor = None; let mut indices = Vec::new(); syn::meta::parser(|meta| { match_meta!(match meta { @@ -81,10 +81,10 @@ impl TableArgs { check_duplicate_msg(&access, &meta, "already specified access level")?; access = Some(TableAccess::Private(meta.path.span())); } - sym::name => { - check_duplicate(&name, &meta)?; + sym::accessor => { + check_duplicate(&accessor, &meta)?; let value = meta.value()?; - name = Some(value.parse()?); + accessor = Some(value.parse()?); } sym::index => indices.push(IndexArg::parse_meta(meta)?), sym::scheduled => { @@ -95,17 +95,17 @@ impl TableArgs { Ok(()) }) .parse2(input)?; - let name = name.ok_or_else(|| { + let accessor = accessor.ok_or_else(|| { let table = struct_ident.to_string().to_snake_case(); syn::Error::new( Span::call_site(), - format_args!("must specify table name, e.g. `#[spacetimedb::table(name = {table})]"), + format_args!("must specify table name, e.g. `#[spacetimedb::table(accessor = {table})]"), ) })?; Ok(TableArgs { access, scheduled, - name, + accessor, indices, }) } @@ -672,7 +672,7 @@ pub(crate) fn table_impl(mut args: TableArgs, item: &syn::DeriveInput) -> syn::R let sats_ty = sats::sats_type_from_derive(item, quote!(spacetimedb::spacetimedb_lib))?; let original_struct_ident = sats_ty.ident; - let table_ident = &args.name; + let table_ident = &args.accessor; let view_trait_ident = format_ident!("{}__view", table_ident); let query_trait_ident = format_ident!("{}__query", table_ident); let query_cols_struct = format_ident!("{}Cols", original_struct_ident); diff --git a/crates/bindings-typescript/test-app/server/src/lib.rs b/crates/bindings-typescript/test-app/server/src/lib.rs index 853c91632e1..d7f9cbb7474 100644 --- a/crates/bindings-typescript/test-app/server/src/lib.rs +++ b/crates/bindings-typescript/test-app/server/src/lib.rs @@ -1,6 +1,6 @@ use spacetimedb::{reducer, table, Identity, ReducerContext, SpacetimeType, Table}; -#[table(name = player, public)] +#[table(accessor = player, public)] pub struct Player { #[primary_key] #[auto_inc] @@ -16,14 +16,14 @@ pub struct Point { pub y: u16, } -#[table(name = user, public)] +#[table(accessor = user, public)] pub struct User { #[primary_key] pub identity: Identity, pub username: String, } -#[table(name = unindexed_player, public)] +#[table(accessor = unindexed_player, public)] pub struct UnindexedPlayer { #[primary_key] #[auto_inc] diff --git a/crates/bindings-typescript/test-react-router-app/server/src/lib.rs b/crates/bindings-typescript/test-react-router-app/server/src/lib.rs index 496acfd090f..fe2f325f560 100644 --- a/crates/bindings-typescript/test-react-router-app/server/src/lib.rs +++ b/crates/bindings-typescript/test-react-router-app/server/src/lib.rs @@ -1,14 +1,14 @@ use spacetimedb::{reducer, table, Identity, ReducerContext, Table}; -#[table(public, name = counter)] +#[table(public, accessor = counter)] struct Counter { #[primary_key] id: u32, count: u32, } -#[table(public, name = user)] -#[table(public, name = offline_user)] +#[table(public, accessor = user)] +#[table(public, accessor = offline_user)] struct User { #[primary_key] identity: Identity, diff --git a/crates/bindings/src/lib.rs b/crates/bindings/src/lib.rs index ab8da2c663c..16e1aa68763 100644 --- a/crates/bindings/src/lib.rs +++ b/crates/bindings/src/lib.rs @@ -117,7 +117,7 @@ pub use spacetimedb_bindings_macro::client_visibility_filter; /// ```ignore /// use spacetimedb::{table, ReducerContext}; /// -/// #[table(name = user, public, +/// #[table(accessor = user, public, /// index(name = popularity_and_username, btree(columns = [popularity, username])), /// )] /// pub struct User { @@ -194,7 +194,7 @@ pub use spacetimedb_bindings_macro::client_visibility_filter; /// For a table *table*, use `ctx.db.{table}()` to do this. /// For example: /// ```ignore -/// #[table(name = user)] +/// #[table(accessor = user)] /// pub struct User { /// #[auto_inc] /// #[primary_key] @@ -314,7 +314,7 @@ pub use spacetimedb_bindings_macro::client_visibility_filter; /// /// type CountryCode = String; /// -/// #[table(name = country)] +/// #[table(accessor = country)] /// struct Country { /// #[unique] /// code: CountryCode, @@ -378,7 +378,7 @@ pub use spacetimedb_bindings_macro::client_visibility_filter; /// /// # Generated code /// -/// For each `[table(name = {name})]` annotation on a type `{T}`, generates a struct +/// For each `[table(accessor = {name})]` annotation on a type `{T}`, generates a struct /// `{name}__TableHandle` implementing [`Table`](crate::Table), and a trait that allows looking up such a /// `{name}Handle` in a [`ReducerContext`]. /// @@ -577,7 +577,7 @@ pub use spacetimedb_bindings_macro::table; /// /// // First, we declare the table with scheduling information. /// -/// #[table(name = send_message_schedule, scheduled(send_message))] +/// #[table(accessor = send_message_schedule, scheduled(send_message))] /// struct SendMessageSchedule { /// // Mandatory fields: /// // ============================ @@ -768,7 +768,7 @@ pub use spacetimedb_bindings_macro::procedure; /// use spacetimedb::{view, table, AnonymousViewContext, SpacetimeType, ViewContext}; /// use spacetimedb_lib::Identity; /// -/// #[table(name = player)] +/// #[table(accessor = player)] /// struct Player { /// #[auto_inc] /// #[primary_key] @@ -797,7 +797,7 @@ pub use spacetimedb_bindings_macro::procedure; /// id: u64, /// } /// -/// #[table(name = location, index(name = coordinates, btree(columns = [x, y])))] +/// #[table(accessor = location, index(name = coordinates, btree(columns = [x, y])))] /// struct Location { /// #[unique] /// player_id: u64, @@ -955,7 +955,7 @@ pub struct ReducerContext { /// # #![cfg(target_arch = "wasm32")] /// use spacetimedb::{table, reducer, ReducerContext}; /// - /// #[table(name = book)] + /// #[table(accessor = book)] /// #[derive(Debug)] /// struct Book { /// #[primary_key] diff --git a/crates/bindings/src/table.rs b/crates/bindings/src/table.rs index d7cbdd9b39a..158b8a6129f 100644 --- a/crates/bindings/src/table.rs +++ b/crates/bindings/src/table.rs @@ -286,7 +286,7 @@ pub trait Column { /// # #[cfg(target_arch = "wasm32")] mod demo { /// use spacetimedb::{table, UniqueColumn, ReducerContext, DbContext}; /// -/// #[table(name = user)] +/// #[table(accessor = user)] /// struct User { /// #[primary_key] /// id: u32, @@ -484,7 +484,7 @@ pub trait IndexIsPointed: Index {} /// # #[cfg(target_arch = "wasm32")] mod demo { /// use spacetimedb::{table, PointIndex, ReducerContext, DbContext}; /// -/// #[table(name = user, +/// #[table(accessor = user, /// index(name = dogs_and_name, hash(columns = [dogs, name])))] /// struct User { /// id: u32, @@ -505,7 +505,7 @@ pub trait IndexIsPointed: Index {} /// # #[cfg(target_arch = "wasm32")] mod demo { /// use spacetimedb::{table, PointIndex, ReducerContext, DbContext}; /// -/// #[table(name = user)] +/// #[table(accessor = user)] /// struct User { /// id: u32, /// username: String, @@ -539,7 +539,7 @@ impl PointIndex /// # #[cfg(target_arch = "wasm32")] mod demo { /// use spacetimedb::{table, ReducerContext, PointIndex}; /// - /// #[table(name = user, + /// #[table(accessor = user, /// index(name = dogs_and_name, hash(columns = [dogs, name])))] /// struct User { /// id: u32, @@ -581,7 +581,7 @@ impl PointIndex /// # #[cfg(target_arch = "wasm32")] mod demo { /// use spacetimedb::{table, ReducerContext, PointIndex}; /// - /// #[table(name = user, + /// #[table(accessor = user, /// index(name = dogs_and_name, hash(columns = [dogs, name])))] /// struct User { /// id: u32, @@ -724,7 +724,7 @@ pub trait IndexIsRanged: Index {} /// # #[cfg(target_arch = "wasm32")] mod demo { /// use spacetimedb::{table, RangedIndex, ReducerContext, DbContext}; /// -/// #[table(name = user, +/// #[table(accessor = user, /// index(name = dogs_and_name, btree(columns = [dogs, name])))] /// struct User { /// id: u32, @@ -745,7 +745,7 @@ pub trait IndexIsRanged: Index {} /// # #[cfg(target_arch = "wasm32")] mod demo { /// use spacetimedb::{table, RangedIndex, ReducerContext, DbContext}; /// -/// #[table(name = user)] +/// #[table(accessor = user)] /// struct User { /// id: u32, /// username: String, @@ -781,7 +781,7 @@ impl RangedIndex /// # #[cfg(target_arch = "wasm32")] mod demo { /// use spacetimedb::{table, ReducerContext, RangedIndex}; /// - /// #[table(name = user, + /// #[table(accessor = user, /// index(name = dogs_and_name, btree(columns = [dogs, name])))] /// struct User { /// id: u32, @@ -863,7 +863,7 @@ impl RangedIndex /// # #[cfg(target_arch = "wasm32")] mod demo { /// use spacetimedb::{table, ReducerContext, RangedIndex}; /// - /// #[table(name = user, + /// #[table(accessor = user, /// index(name = dogs_and_name, btree(columns = [dogs, name])))] /// struct User { /// id: u32, diff --git a/crates/bindings/tests/ui/reducers.rs b/crates/bindings/tests/ui/reducers.rs index f35b22db275..659c3f16472 100644 --- a/crates/bindings/tests/ui/reducers.rs +++ b/crates/bindings/tests/ui/reducers.rs @@ -25,7 +25,7 @@ fn missing_ctx(_a: u8) {} #[spacetimedb::reducer] fn ctx_by_val(_ctx: ReducerContext, _a: u8) {} -#[spacetimedb::table(name = scheduled_table_missing_rows, scheduled(scheduled_table_missing_rows_reducer))] +#[spacetimedb::table(accessor = scheduled_table_missing_rows, scheduled(scheduled_table_missing_rows_reducer))] struct ScheduledTableMissingRows { x: u8, y: u8, @@ -34,7 +34,7 @@ struct ScheduledTableMissingRows { // #[spacetimedb::reducer] // fn scheduled_table_missing_rows_reducer(_ctx: &ReducerContext, _: &ScheduledTableMissingRows) {} -#[spacetimedb::table(name = scheduled_table, scheduled(scheduled_table_reducer))] +#[spacetimedb::table(accessor = scheduled_table, scheduled(scheduled_table_reducer))] struct ScheduledTable { #[primary_key] #[auto_inc] diff --git a/crates/bindings/tests/ui/tables.rs b/crates/bindings/tests/ui/tables.rs index ce63cc27461..16869fbeb88 100644 --- a/crates/bindings/tests/ui/tables.rs +++ b/crates/bindings/tests/ui/tables.rs @@ -1,16 +1,16 @@ struct Test; -#[spacetimedb::table(name = table)] +#[spacetimedb::table(accessor = table)] struct Table { x: Test, } -#[spacetimedb::table(name = type_param)] +#[spacetimedb::table(accessor = type_param)] struct TypeParam { t: T, } -#[spacetimedb::table(name = const_param)] +#[spacetimedb::table(accessor = const_param)] struct ConstParam {} #[derive(spacetimedb::SpacetimeType)] @@ -18,7 +18,7 @@ struct Alpha { beta: u8, } -#[spacetimedb::table(name = delta)] +#[spacetimedb::table(accessor = delta)] struct Delta { #[unique] #[index(btree)] diff --git a/crates/bindings/tests/ui/views-more.rs b/crates/bindings/tests/ui/views-more.rs index b904c834e29..d55d38e6567 100644 --- a/crates/bindings/tests/ui/views-more.rs +++ b/crates/bindings/tests/ui/views-more.rs @@ -1,6 +1,6 @@ use spacetimedb::{table, view, Identity, Query, ViewContext}; -#[table(name = player_info)] +#[table(accessor = player_info)] struct PlayerInfo { #[unique] identity: Identity, diff --git a/crates/bindings/tests/ui/views.rs b/crates/bindings/tests/ui/views.rs index f05092569fb..71b38cecf0d 100644 --- a/crates/bindings/tests/ui/views.rs +++ b/crates/bindings/tests/ui/views.rs @@ -1,6 +1,6 @@ use spacetimedb::{reducer, table, view, AnonymousViewContext, Identity, Query, ReducerContext, ViewContext}; -#[table(name = test)] +#[table(accessor = test)] struct Test { #[unique] id: u32, @@ -64,7 +64,7 @@ fn read_only_btree_index_no_delete(ctx: &ReducerContext) { read_only.db.test().x().delete(0u32..); } -#[table(name = player)] +#[table(accessor = player)] struct Player { #[unique] identity: Identity, @@ -145,7 +145,7 @@ fn sched_table_view(_: &ViewContext, _args: ScheduledTable) -> Vec { } -#[table(name = player_info)] +#[table(accessor = player_info)] struct PlayerInfo { #[unique] identity: Identity, diff --git a/crates/smoketests/modules/add-remove-index-indexed/src/lib.rs b/crates/smoketests/modules/add-remove-index-indexed/src/lib.rs index 61ca3204d23..1993db7fed1 100644 --- a/crates/smoketests/modules/add-remove-index-indexed/src/lib.rs +++ b/crates/smoketests/modules/add-remove-index-indexed/src/lib.rs @@ -1,9 +1,9 @@ use spacetimedb::{ReducerContext, Table}; -#[spacetimedb::table(name = t1)] +#[spacetimedb::table(accessor = t1)] pub struct T1 { #[index(btree)] id: u64 } -#[spacetimedb::table(name = t2)] +#[spacetimedb::table(accessor = t2)] pub struct T2 { #[index(btree)] id: u64 } #[spacetimedb::reducer(init)] diff --git a/crates/smoketests/modules/add-remove-index/src/lib.rs b/crates/smoketests/modules/add-remove-index/src/lib.rs index 9da55e6b50d..2e98cbcb190 100644 --- a/crates/smoketests/modules/add-remove-index/src/lib.rs +++ b/crates/smoketests/modules/add-remove-index/src/lib.rs @@ -1,9 +1,9 @@ use spacetimedb::{ReducerContext, Table}; -#[spacetimedb::table(name = t1)] +#[spacetimedb::table(accessor = t1)] pub struct T1 { id: u64 } -#[spacetimedb::table(name = t2)] +#[spacetimedb::table(accessor = t2)] pub struct T2 { id: u64 } #[spacetimedb::reducer(init)] diff --git a/crates/smoketests/modules/autoinc-basic/src/lib.rs b/crates/smoketests/modules/autoinc-basic/src/lib.rs index 53542d417cb..a05cc0bb4e8 100644 --- a/crates/smoketests/modules/autoinc-basic/src/lib.rs +++ b/crates/smoketests/modules/autoinc-basic/src/lib.rs @@ -5,7 +5,7 @@ macro_rules! autoinc_basic { ($($ty:ident),*) => { $( paste::paste! { - #[spacetimedb::table(name = [])] + #[spacetimedb::table(accessor = [])] pub struct [] { #[auto_inc] key_col: $ty, diff --git a/crates/smoketests/modules/autoinc-unique/src/lib.rs b/crates/smoketests/modules/autoinc-unique/src/lib.rs index 34eb522981d..a20e6ad2a0c 100644 --- a/crates/smoketests/modules/autoinc-unique/src/lib.rs +++ b/crates/smoketests/modules/autoinc-unique/src/lib.rs @@ -6,7 +6,7 @@ macro_rules! autoinc_unique { ($($ty:ident),*) => { $( paste::paste! { - #[spacetimedb::table(name = [])] + #[spacetimedb::table(accessor = [])] pub struct [] { #[auto_inc] #[unique] diff --git a/crates/smoketests/modules/call-empty/src/lib.rs b/crates/smoketests/modules/call-empty/src/lib.rs index b3fae90457d..6ba7bdccec2 100644 --- a/crates/smoketests/modules/call-empty/src/lib.rs +++ b/crates/smoketests/modules/call-empty/src/lib.rs @@ -1,4 +1,4 @@ -#[spacetimedb::table(name = person)] +#[spacetimedb::table(accessor = person)] pub struct Person { name: String, } diff --git a/crates/smoketests/modules/call-reducer-procedure/src/lib.rs b/crates/smoketests/modules/call-reducer-procedure/src/lib.rs index da300398ff7..09c2c060ef3 100644 --- a/crates/smoketests/modules/call-reducer-procedure/src/lib.rs +++ b/crates/smoketests/modules/call-reducer-procedure/src/lib.rs @@ -1,6 +1,6 @@ use spacetimedb::{log, ProcedureContext, ReducerContext}; -#[spacetimedb::table(name = person)] +#[spacetimedb::table(accessor = person)] pub struct Person { name: String, } diff --git a/crates/smoketests/modules/client-connection-disconnect-panic/src/lib.rs b/crates/smoketests/modules/client-connection-disconnect-panic/src/lib.rs index 1409706b15b..cfb212ad580 100644 --- a/crates/smoketests/modules/client-connection-disconnect-panic/src/lib.rs +++ b/crates/smoketests/modules/client-connection-disconnect-panic/src/lib.rs @@ -1,6 +1,6 @@ use spacetimedb::{ReducerContext, Table}; -#[spacetimedb::table(name = all_u8s, public)] +#[spacetimedb::table(accessor = all_u8s, public)] pub struct AllU8s { number: u8, } diff --git a/crates/smoketests/modules/client-connection-reject/src/lib.rs b/crates/smoketests/modules/client-connection-reject/src/lib.rs index c96118d3007..7a9d11675e6 100644 --- a/crates/smoketests/modules/client-connection-reject/src/lib.rs +++ b/crates/smoketests/modules/client-connection-reject/src/lib.rs @@ -1,6 +1,6 @@ use spacetimedb::{ReducerContext, Table}; -#[spacetimedb::table(name = all_u8s, public)] +#[spacetimedb::table(accessor = all_u8s, public)] pub struct AllU8s { number: u8, } diff --git a/crates/smoketests/modules/confirmed-reads/src/lib.rs b/crates/smoketests/modules/confirmed-reads/src/lib.rs index 93a2d37d27d..58422214d80 100644 --- a/crates/smoketests/modules/confirmed-reads/src/lib.rs +++ b/crates/smoketests/modules/confirmed-reads/src/lib.rs @@ -1,6 +1,6 @@ use spacetimedb::{ReducerContext, Table}; -#[spacetimedb::table(name = person, public)] +#[spacetimedb::table(accessor = person, public)] pub struct Person { name: String, } diff --git a/crates/smoketests/modules/delete-database/src/lib.rs b/crates/smoketests/modules/delete-database/src/lib.rs index fbb51b1112d..85d74acb944 100644 --- a/crates/smoketests/modules/delete-database/src/lib.rs +++ b/crates/smoketests/modules/delete-database/src/lib.rs @@ -1,13 +1,13 @@ use spacetimedb::{ReducerContext, Table, duration}; -#[spacetimedb::table(name = counter, public)] +#[spacetimedb::table(accessor = counter, public)] pub struct Counter { #[primary_key] id: u64, val: u64 } -#[spacetimedb::table(name = scheduled_counter, public, scheduled(inc, at = sched_at))] +#[spacetimedb::table(accessor = scheduled_counter, public, scheduled(inc, at = sched_at))] pub struct ScheduledCounter { #[primary_key] #[auto_inc] diff --git a/crates/smoketests/modules/describe/src/lib.rs b/crates/smoketests/modules/describe/src/lib.rs index 36c6926b612..c6e695e24cb 100644 --- a/crates/smoketests/modules/describe/src/lib.rs +++ b/crates/smoketests/modules/describe/src/lib.rs @@ -1,6 +1,6 @@ use spacetimedb::{log, ReducerContext, Table}; -#[spacetimedb::table(name = person)] +#[spacetimedb::table(accessor = person)] pub struct Person { name: String, } diff --git a/crates/smoketests/modules/dml/src/lib.rs b/crates/smoketests/modules/dml/src/lib.rs index d893e880cbf..249cceae9b1 100644 --- a/crates/smoketests/modules/dml/src/lib.rs +++ b/crates/smoketests/modules/dml/src/lib.rs @@ -1,4 +1,4 @@ -#[spacetimedb::table(name = t, public)] +#[spacetimedb::table(accessor = t, public)] pub struct T { name: String, } diff --git a/crates/smoketests/modules/fail-initial-publish-broken/src/lib.rs b/crates/smoketests/modules/fail-initial-publish-broken/src/lib.rs index 900ca9c6ade..c895135085d 100644 --- a/crates/smoketests/modules/fail-initial-publish-broken/src/lib.rs +++ b/crates/smoketests/modules/fail-initial-publish-broken/src/lib.rs @@ -1,6 +1,6 @@ use spacetimedb::{client_visibility_filter, Filter}; -#[spacetimedb::table(name = person, public)] +#[spacetimedb::table(accessor = person, public)] pub struct Person { name: String, } diff --git a/crates/smoketests/modules/fail-initial-publish-fixed/src/lib.rs b/crates/smoketests/modules/fail-initial-publish-fixed/src/lib.rs index 0ad76a464b3..c258b6ca1eb 100644 --- a/crates/smoketests/modules/fail-initial-publish-fixed/src/lib.rs +++ b/crates/smoketests/modules/fail-initial-publish-fixed/src/lib.rs @@ -1,6 +1,6 @@ use spacetimedb::{client_visibility_filter, Filter}; -#[spacetimedb::table(name = person, public)] +#[spacetimedb::table(accessor = person, public)] pub struct Person { name: String, } diff --git a/crates/smoketests/modules/filtering/src/lib.rs b/crates/smoketests/modules/filtering/src/lib.rs index 40597ee8b78..d306c25d19c 100644 --- a/crates/smoketests/modules/filtering/src/lib.rs +++ b/crates/smoketests/modules/filtering/src/lib.rs @@ -1,6 +1,6 @@ use spacetimedb::{log, Identity, ReducerContext, Table}; -#[spacetimedb::table(name = person)] +#[spacetimedb::table(accessor = person)] pub struct Person { #[unique] id: i32, @@ -75,7 +75,7 @@ pub fn find_person_by_nick_read_only(ctx: &ReducerContext, nick: String) { } } -#[spacetimedb::table(name = nonunique_person)] +#[spacetimedb::table(accessor = nonunique_person)] pub struct NonuniquePerson { #[index(btree)] id: i32, @@ -118,7 +118,7 @@ pub fn find_nonunique_non_humans(ctx: &ReducerContext) { } // Ensure that [Identity] is filterable and a legal unique column. -#[spacetimedb::table(name = identified_person)] +#[spacetimedb::table(accessor = identified_person)] struct IdentifiedPerson { #[unique] identity: Identity, @@ -147,7 +147,7 @@ fn find_identified_person(ctx: &ReducerContext, id_number: u64) { } // Ensure that indices on non-unique columns behave as we expect. -#[spacetimedb::table(name = indexed_person)] +#[spacetimedb::table(accessor = indexed_person)] struct IndexedPerson { #[unique] id: i32, diff --git a/crates/smoketests/modules/hotswap-basic/src/lib.rs b/crates/smoketests/modules/hotswap-basic/src/lib.rs index 0933c72c471..d9458ef4e84 100644 --- a/crates/smoketests/modules/hotswap-basic/src/lib.rs +++ b/crates/smoketests/modules/hotswap-basic/src/lib.rs @@ -1,6 +1,6 @@ use spacetimedb::{ReducerContext, Table}; -#[spacetimedb::table(name = person, public)] +#[spacetimedb::table(accessor = person, public)] pub struct Person { #[primary_key] #[auto_inc] diff --git a/crates/smoketests/modules/hotswap-updated/src/lib.rs b/crates/smoketests/modules/hotswap-updated/src/lib.rs index 0a197954d83..58cbc185bb9 100644 --- a/crates/smoketests/modules/hotswap-updated/src/lib.rs +++ b/crates/smoketests/modules/hotswap-updated/src/lib.rs @@ -1,6 +1,6 @@ use spacetimedb::{ReducerContext, Table}; -#[spacetimedb::table(name = person, public)] +#[spacetimedb::table(accessor = person, public)] pub struct Person { #[primary_key] #[auto_inc] @@ -13,7 +13,7 @@ pub fn add_person(ctx: &ReducerContext, name: String) { ctx.db.person().insert(Person { id: 0, name }); } -#[spacetimedb::table(name = pet, public)] +#[spacetimedb::table(accessor = pet, public)] pub struct Pet { #[primary_key] species: String, diff --git a/crates/smoketests/modules/module-nested-op/src/lib.rs b/crates/smoketests/modules/module-nested-op/src/lib.rs index 888afb44d05..fea0f2c55a9 100644 --- a/crates/smoketests/modules/module-nested-op/src/lib.rs +++ b/crates/smoketests/modules/module-nested-op/src/lib.rs @@ -1,13 +1,13 @@ use spacetimedb::{log, ReducerContext, Table}; -#[spacetimedb::table(name = account)] +#[spacetimedb::table(accessor = account)] pub struct Account { name: String, #[unique] id: i32, } -#[spacetimedb::table(name = friends)] +#[spacetimedb::table(accessor = friends)] pub struct Friends { friend_1: i32, friend_2: i32, diff --git a/crates/smoketests/modules/modules-add-table/src/lib.rs b/crates/smoketests/modules/modules-add-table/src/lib.rs index 62e69ae3bc3..2a9b00a6d83 100644 --- a/crates/smoketests/modules/modules-add-table/src/lib.rs +++ b/crates/smoketests/modules/modules-add-table/src/lib.rs @@ -1,6 +1,6 @@ use spacetimedb::{log, ReducerContext}; -#[spacetimedb::table(name = person)] +#[spacetimedb::table(accessor = person)] pub struct Person { #[primary_key] #[auto_inc] @@ -8,7 +8,7 @@ pub struct Person { name: String, } -#[spacetimedb::table(name = pets)] +#[spacetimedb::table(accessor = pets)] pub struct Pet { species: String, } diff --git a/crates/smoketests/modules/modules-basic/src/lib.rs b/crates/smoketests/modules/modules-basic/src/lib.rs index e20a7b171bd..85a7f61ade7 100644 --- a/crates/smoketests/modules/modules-basic/src/lib.rs +++ b/crates/smoketests/modules/modules-basic/src/lib.rs @@ -1,6 +1,6 @@ use spacetimedb::{log, ReducerContext, Table}; -#[spacetimedb::table(name = person)] +#[spacetimedb::table(accessor = person)] pub struct Person { #[primary_key] #[auto_inc] diff --git a/crates/smoketests/modules/modules-breaking/src/lib.rs b/crates/smoketests/modules/modules-breaking/src/lib.rs index d0609a457d9..99862b8dfe6 100644 --- a/crates/smoketests/modules/modules-breaking/src/lib.rs +++ b/crates/smoketests/modules/modules-breaking/src/lib.rs @@ -1,4 +1,4 @@ -#[spacetimedb::table(name = person)] +#[spacetimedb::table(accessor = person)] pub struct Person { #[primary_key] #[auto_inc] diff --git a/crates/smoketests/modules/namespaces/src/lib.rs b/crates/smoketests/modules/namespaces/src/lib.rs index b55824a656c..e03cee881e1 100644 --- a/crates/smoketests/modules/namespaces/src/lib.rs +++ b/crates/smoketests/modules/namespaces/src/lib.rs @@ -1,6 +1,6 @@ use spacetimedb::{ReducerContext, Table}; -#[spacetimedb::table(name = person, public)] +#[spacetimedb::table(accessor = person, public)] pub struct Person { name: String, } diff --git a/crates/smoketests/modules/new-user-flow/src/lib.rs b/crates/smoketests/modules/new-user-flow/src/lib.rs index 44ec244e73f..100c13245a5 100644 --- a/crates/smoketests/modules/new-user-flow/src/lib.rs +++ b/crates/smoketests/modules/new-user-flow/src/lib.rs @@ -1,6 +1,6 @@ use spacetimedb::{log, ReducerContext, Table}; -#[spacetimedb::table(name = person)] +#[spacetimedb::table(accessor = person)] pub struct Person { name: String } diff --git a/crates/smoketests/modules/permissions-private/src/lib.rs b/crates/smoketests/modules/permissions-private/src/lib.rs index 0c3ae36d933..3ae7f55380f 100644 --- a/crates/smoketests/modules/permissions-private/src/lib.rs +++ b/crates/smoketests/modules/permissions-private/src/lib.rs @@ -1,11 +1,11 @@ use spacetimedb::{ReducerContext, Table}; -#[spacetimedb::table(name = secret, private)] +#[spacetimedb::table(accessor = secret, private)] pub struct Secret { answer: u8, } -#[spacetimedb::table(name = common_knowledge, public)] +#[spacetimedb::table(accessor = common_knowledge, public)] pub struct CommonKnowledge { thing: String, } diff --git a/crates/smoketests/modules/pg-wire/src/lib.rs b/crates/smoketests/modules/pg-wire/src/lib.rs index 53729e3155c..d1e92fc1614 100644 --- a/crates/smoketests/modules/pg-wire/src/lib.rs +++ b/crates/smoketests/modules/pg-wire/src/lib.rs @@ -2,7 +2,7 @@ use spacetimedb::sats::{i256, u256}; use spacetimedb::{ConnectionId, Identity, ReducerContext, SpacetimeType, Table, Timestamp, TimeDuration, Uuid}; #[derive(Copy, Clone)] -#[spacetimedb::table(name = t_ints, public)] +#[spacetimedb::table(accessor = t_ints, public)] pub struct TInts { i8: i8, i16: i16, @@ -12,13 +12,13 @@ pub struct TInts { i256: i256, } -#[spacetimedb::table(name = t_ints_tuple, public)] +#[spacetimedb::table(accessor = t_ints_tuple, public)] pub struct TIntsTuple { tuple: TInts, } #[derive(Copy, Clone)] -#[spacetimedb::table(name = t_uints, public)] +#[spacetimedb::table(accessor = t_uints, public)] pub struct TUints { u8: u8, u16: u16, @@ -28,13 +28,13 @@ pub struct TUints { u256: u256, } -#[spacetimedb::table(name = t_uints_tuple, public)] +#[spacetimedb::table(accessor = t_uints_tuple, public)] pub struct TUintsTuple { tuple: TUints, } #[derive(Clone)] -#[spacetimedb::table(name = t_others, public)] +#[spacetimedb::table(accessor = t_others, public)] pub struct TOthers { bool: bool, f32: f32, @@ -48,7 +48,7 @@ pub struct TOthers { uuid: Uuid, } -#[spacetimedb::table(name = t_others_tuple, public)] +#[spacetimedb::table(accessor = t_others_tuple, public)] pub struct TOthersTuple { tuple: TOthers } @@ -65,19 +65,19 @@ pub enum Color { } #[derive(Copy, Clone)] -#[spacetimedb::table(name = t_simple_enum, public)] +#[spacetimedb::table(accessor = t_simple_enum, public)] pub struct TSimpleEnum { id: u32, action: Action, } -#[spacetimedb::table(name = t_enum, public)] +#[spacetimedb::table(accessor = t_enum, public)] pub struct TEnum { id: u32, color: Color, } -#[spacetimedb::table(name = t_nested, public)] +#[spacetimedb::table(accessor = t_nested, public)] pub struct TNested { en: TEnum, se: TSimpleEnum, @@ -85,14 +85,14 @@ pub struct TNested { } #[derive(Clone)] -#[spacetimedb::table(name = t_enums)] +#[spacetimedb::table(accessor = t_enums)] pub struct TEnums { bool_opt: Option, bool_result: Result, action: Action, } -#[spacetimedb::table(name = t_enums_tuple)] +#[spacetimedb::table(accessor = t_enums_tuple)] pub struct TEnumsTuple { tuple: TEnums, } diff --git a/crates/smoketests/modules/restart-connected-client/src/lib.rs b/crates/smoketests/modules/restart-connected-client/src/lib.rs index 650068def10..c60668be041 100644 --- a/crates/smoketests/modules/restart-connected-client/src/lib.rs +++ b/crates/smoketests/modules/restart-connected-client/src/lib.rs @@ -1,7 +1,7 @@ use log::info; use spacetimedb::{ConnectionId, Identity, ReducerContext, Table}; -#[spacetimedb::table(name = connected_client)] +#[spacetimedb::table(accessor = connected_client)] pub struct ConnectedClient { identity: Identity, connection_id: ConnectionId, diff --git a/crates/smoketests/modules/restart-person/src/lib.rs b/crates/smoketests/modules/restart-person/src/lib.rs index daa485e9e32..5d6859f8dd5 100644 --- a/crates/smoketests/modules/restart-person/src/lib.rs +++ b/crates/smoketests/modules/restart-person/src/lib.rs @@ -1,6 +1,6 @@ use spacetimedb::{log, ReducerContext, Table}; -#[spacetimedb::table(name = person, index(name = name_idx, btree(columns = [name])))] +#[spacetimedb::table(accessor = person, index(name = name_idx, btree(columns = [name])))] pub struct Person { #[primary_key] #[auto_inc] diff --git a/crates/smoketests/modules/rls-no-filter/src/lib.rs b/crates/smoketests/modules/rls-no-filter/src/lib.rs index f1bf20aeed0..afd45f07210 100644 --- a/crates/smoketests/modules/rls-no-filter/src/lib.rs +++ b/crates/smoketests/modules/rls-no-filter/src/lib.rs @@ -1,6 +1,6 @@ use spacetimedb::{Identity, ReducerContext, Table}; -#[spacetimedb::table(name = users, public)] +#[spacetimedb::table(accessor = users, public)] pub struct Users { name: String, identity: Identity, diff --git a/crates/smoketests/modules/rls-with-filter/src/lib.rs b/crates/smoketests/modules/rls-with-filter/src/lib.rs index c766424bfdc..1a5a70ab7ed 100644 --- a/crates/smoketests/modules/rls-with-filter/src/lib.rs +++ b/crates/smoketests/modules/rls-with-filter/src/lib.rs @@ -1,6 +1,6 @@ use spacetimedb::{Identity, ReducerContext, Table}; -#[spacetimedb::table(name = users, public)] +#[spacetimedb::table(accessor = users, public)] pub struct Users { name: String, identity: Identity, diff --git a/crates/smoketests/modules/rls/src/lib.rs b/crates/smoketests/modules/rls/src/lib.rs index c766424bfdc..1a5a70ab7ed 100644 --- a/crates/smoketests/modules/rls/src/lib.rs +++ b/crates/smoketests/modules/rls/src/lib.rs @@ -1,6 +1,6 @@ use spacetimedb::{Identity, ReducerContext, Table}; -#[spacetimedb::table(name = users, public)] +#[spacetimedb::table(accessor = users, public)] pub struct Users { name: String, identity: Identity, diff --git a/crates/smoketests/modules/schedule-cancel/src/lib.rs b/crates/smoketests/modules/schedule-cancel/src/lib.rs index 2b1395fb2be..1e22e67bff7 100644 --- a/crates/smoketests/modules/schedule-cancel/src/lib.rs +++ b/crates/smoketests/modules/schedule-cancel/src/lib.rs @@ -17,7 +17,7 @@ fn init(ctx: &ReducerContext) { do_cancel(ctx, schedule.scheduled_id); } -#[spacetimedb::table(name = scheduled_reducer_args, public, scheduled(reducer))] +#[spacetimedb::table(accessor = scheduled_reducer_args, public, scheduled(reducer))] pub struct ScheduledReducerArgs { #[primary_key] #[auto_inc] diff --git a/crates/smoketests/modules/schedule-procedure/src/lib.rs b/crates/smoketests/modules/schedule-procedure/src/lib.rs index ab8345848f5..7c49de6e215 100644 --- a/crates/smoketests/modules/schedule-procedure/src/lib.rs +++ b/crates/smoketests/modules/schedule-procedure/src/lib.rs @@ -1,6 +1,6 @@ use spacetimedb::{duration, log, ProcedureContext, ReducerContext, Table, Timestamp}; -#[spacetimedb::table(name = scheduled_table, public, scheduled(my_procedure, at = sched_at))] +#[spacetimedb::table(accessor = scheduled_table, public, scheduled(my_procedure, at = sched_at))] pub struct ScheduledTable { #[primary_key] #[auto_inc] diff --git a/crates/smoketests/modules/schedule-subscribe/src/lib.rs b/crates/smoketests/modules/schedule-subscribe/src/lib.rs index d332979b0c7..65948edfb83 100644 --- a/crates/smoketests/modules/schedule-subscribe/src/lib.rs +++ b/crates/smoketests/modules/schedule-subscribe/src/lib.rs @@ -1,6 +1,6 @@ use spacetimedb::{log, duration, ReducerContext, Table, Timestamp}; -#[spacetimedb::table(name = scheduled_table, public, scheduled(my_reducer, at = sched_at))] +#[spacetimedb::table(accessor = scheduled_table, public, scheduled(my_reducer, at = sched_at))] pub struct ScheduledTable { #[primary_key] #[auto_inc] diff --git a/crates/smoketests/modules/schedule-volatile/src/lib.rs b/crates/smoketests/modules/schedule-volatile/src/lib.rs index edd8a8f1882..e9f8557250f 100644 --- a/crates/smoketests/modules/schedule-volatile/src/lib.rs +++ b/crates/smoketests/modules/schedule-volatile/src/lib.rs @@ -1,6 +1,6 @@ use spacetimedb::{ReducerContext, Table}; -#[spacetimedb::table(name = my_table, public)] +#[spacetimedb::table(accessor = my_table, public)] pub struct MyTable { x: String, } diff --git a/crates/smoketests/modules/sql-format/src/lib.rs b/crates/smoketests/modules/sql-format/src/lib.rs index 46be87cda38..dc06aaf59cb 100644 --- a/crates/smoketests/modules/sql-format/src/lib.rs +++ b/crates/smoketests/modules/sql-format/src/lib.rs @@ -2,7 +2,7 @@ use spacetimedb::sats::{i256, u256}; use spacetimedb::{ConnectionId, Identity, ReducerContext, Table, Timestamp, TimeDuration, SpacetimeType, Uuid}; #[derive(Copy, Clone)] -#[spacetimedb::table(name = t_ints)] +#[spacetimedb::table(accessor = t_ints)] pub struct TInts { i8: i8, i16: i16, @@ -12,13 +12,13 @@ pub struct TInts { i256: i256, } -#[spacetimedb::table(name = t_ints_tuple)] +#[spacetimedb::table(accessor = t_ints_tuple)] pub struct TIntsTuple { tuple: TInts, } #[derive(Copy, Clone)] -#[spacetimedb::table(name = t_uints)] +#[spacetimedb::table(accessor = t_uints)] pub struct TUints { u8: u8, u16: u16, @@ -28,13 +28,13 @@ pub struct TUints { u256: u256, } -#[spacetimedb::table(name = t_uints_tuple)] +#[spacetimedb::table(accessor = t_uints_tuple)] pub struct TUintsTuple { tuple: TUints, } #[derive(Clone)] -#[spacetimedb::table(name = t_others)] +#[spacetimedb::table(accessor = t_others)] pub struct TOthers { bool: bool, f32: f32, @@ -48,7 +48,7 @@ pub struct TOthers { uuid: Uuid, } -#[spacetimedb::table(name = t_others_tuple)] +#[spacetimedb::table(accessor = t_others_tuple)] pub struct TOthersTuple { tuple: TOthers } @@ -60,14 +60,14 @@ pub enum Action { } #[derive(Clone)] -#[spacetimedb::table(name = t_enums)] +#[spacetimedb::table(accessor = t_enums)] pub struct TEnums { bool_opt: Option, bool_result: Result, action: Action, } -#[spacetimedb::table(name = t_enums_tuple)] +#[spacetimedb::table(accessor = t_enums_tuple)] pub struct TEnumsTuple { tuple: TEnums, } diff --git a/crates/smoketests/modules/upload-module-2/src/lib.rs b/crates/smoketests/modules/upload-module-2/src/lib.rs index ee897c9aad4..a2ba45fd351 100644 --- a/crates/smoketests/modules/upload-module-2/src/lib.rs +++ b/crates/smoketests/modules/upload-module-2/src/lib.rs @@ -1,6 +1,6 @@ use spacetimedb::{log, duration, ReducerContext, Table, Timestamp}; -#[spacetimedb::table(name = scheduled_message, public, scheduled(my_repeating_reducer))] +#[spacetimedb::table(accessor = scheduled_message, public, scheduled(my_repeating_reducer))] pub struct ScheduledMessage { #[primary_key] #[auto_inc] diff --git a/crates/smoketests/modules/views-auto-migrate-updated/src/lib.rs b/crates/smoketests/modules/views-auto-migrate-updated/src/lib.rs index 107067cfce3..62aa4faea31 100644 --- a/crates/smoketests/modules/views-auto-migrate-updated/src/lib.rs +++ b/crates/smoketests/modules/views-auto-migrate-updated/src/lib.rs @@ -1,7 +1,7 @@ use spacetimedb::ViewContext; #[derive(Copy, Clone)] -#[spacetimedb::table(name = player_state)] +#[spacetimedb::table(accessor = player_state)] pub struct PlayerState { #[primary_key] id: u64, diff --git a/crates/smoketests/modules/views-auto-migrate/src/lib.rs b/crates/smoketests/modules/views-auto-migrate/src/lib.rs index e294e09992b..0d5f5d97f49 100644 --- a/crates/smoketests/modules/views-auto-migrate/src/lib.rs +++ b/crates/smoketests/modules/views-auto-migrate/src/lib.rs @@ -1,7 +1,7 @@ use spacetimedb::ViewContext; #[derive(Copy, Clone)] -#[spacetimedb::table(name = player_state)] +#[spacetimedb::table(accessor = player_state)] pub struct PlayerState { #[primary_key] id: u64, diff --git a/crates/smoketests/modules/views-basic/src/lib.rs b/crates/smoketests/modules/views-basic/src/lib.rs index b28d064c222..8550053c593 100644 --- a/crates/smoketests/modules/views-basic/src/lib.rs +++ b/crates/smoketests/modules/views-basic/src/lib.rs @@ -1,7 +1,7 @@ use spacetimedb::ViewContext; #[derive(Copy, Clone)] -#[spacetimedb::table(name = player_state)] +#[spacetimedb::table(accessor = player_state)] pub struct PlayerState { #[primary_key] id: u64, diff --git a/crates/smoketests/modules/views-broken-namespace/src/lib.rs b/crates/smoketests/modules/views-broken-namespace/src/lib.rs index e3570c007b1..6302bda8563 100644 --- a/crates/smoketests/modules/views-broken-namespace/src/lib.rs +++ b/crates/smoketests/modules/views-broken-namespace/src/lib.rs @@ -1,6 +1,6 @@ use spacetimedb::ViewContext; -#[spacetimedb::table(name = person, public)] +#[spacetimedb::table(accessor = person, public)] pub struct Person { name: String, } diff --git a/crates/smoketests/modules/views-drop-view/src/lib.rs b/crates/smoketests/modules/views-drop-view/src/lib.rs index bcdef5244c0..6ca42b02876 100644 --- a/crates/smoketests/modules/views-drop-view/src/lib.rs +++ b/crates/smoketests/modules/views-drop-view/src/lib.rs @@ -1,5 +1,5 @@ #[derive(Copy, Clone)] -#[spacetimedb::table(name = player_state)] +#[spacetimedb::table(accessor = player_state)] pub struct PlayerState { #[primary_key] id: u64, diff --git a/crates/smoketests/modules/views-query/src/lib.rs b/crates/smoketests/modules/views-query/src/lib.rs index f7f0487ccde..b1bbda9be76 100644 --- a/crates/smoketests/modules/views-query/src/lib.rs +++ b/crates/smoketests/modules/views-query/src/lib.rs @@ -1,6 +1,6 @@ use spacetimedb::{Query, ReducerContext, Table, ViewContext}; -#[spacetimedb::table(name = user, public)] +#[spacetimedb::table(accessor = user, public)] pub struct User { #[primary_key] identity: u8, @@ -8,7 +8,7 @@ pub struct User { online: bool, } -#[spacetimedb::table(name = person, public)] +#[spacetimedb::table(accessor = person, public)] pub struct Person { #[primary_key] identity: u8, diff --git a/crates/smoketests/modules/views-recovered/src/lib.rs b/crates/smoketests/modules/views-recovered/src/lib.rs index 107067cfce3..62aa4faea31 100644 --- a/crates/smoketests/modules/views-recovered/src/lib.rs +++ b/crates/smoketests/modules/views-recovered/src/lib.rs @@ -1,7 +1,7 @@ use spacetimedb::ViewContext; #[derive(Copy, Clone)] -#[spacetimedb::table(name = player_state)] +#[spacetimedb::table(accessor = player_state)] pub struct PlayerState { #[primary_key] id: u64, diff --git a/crates/smoketests/modules/views-sql/src/lib.rs b/crates/smoketests/modules/views-sql/src/lib.rs index 5c1a14923b3..705ae349a58 100644 --- a/crates/smoketests/modules/views-sql/src/lib.rs +++ b/crates/smoketests/modules/views-sql/src/lib.rs @@ -1,8 +1,8 @@ use spacetimedb::{AnonymousViewContext, ReducerContext, Table, ViewContext}; #[derive(Copy, Clone)] -#[spacetimedb::table(name = player_state)] -#[spacetimedb::table(name = player_level)] +#[spacetimedb::table(accessor = player_state)] +#[spacetimedb::table(accessor = player_level)] pub struct PlayerState { #[primary_key] id: u64, @@ -11,7 +11,7 @@ pub struct PlayerState { } #[derive(Clone)] -#[spacetimedb::table(name = player_info, index(name=age_level_index, btree(columns = [age, level])))] +#[spacetimedb::table(accessor = player_info, index(name=age_level_index, btree(columns = [age, level])))] pub struct PlayerInfo { #[primary_key] id: u64, diff --git a/crates/smoketests/modules/views-subscribe/src/lib.rs b/crates/smoketests/modules/views-subscribe/src/lib.rs index acb6ef7348a..c227c97d74e 100644 --- a/crates/smoketests/modules/views-subscribe/src/lib.rs +++ b/crates/smoketests/modules/views-subscribe/src/lib.rs @@ -1,6 +1,6 @@ use spacetimedb::{Identity, ReducerContext, Table, ViewContext}; -#[spacetimedb::table(name = player_state)] +#[spacetimedb::table(accessor = player_state)] pub struct PlayerState { #[primary_key] identity: Identity, diff --git a/crates/smoketests/modules/views-trapped/src/lib.rs b/crates/smoketests/modules/views-trapped/src/lib.rs index 3b4d851296e..fb80c195dcc 100644 --- a/crates/smoketests/modules/views-trapped/src/lib.rs +++ b/crates/smoketests/modules/views-trapped/src/lib.rs @@ -1,7 +1,7 @@ use spacetimedb::ViewContext; #[derive(Copy, Clone)] -#[spacetimedb::table(name = player_state)] +#[spacetimedb::table(accessor = player_state)] pub struct PlayerState { #[primary_key] id: u64, diff --git a/crates/smoketests/src/lib.rs b/crates/smoketests/src/lib.rs index d69b2ee115e..d413ac68545 100644 --- a/crates/smoketests/src/lib.rs +++ b/crates/smoketests/src/lib.rs @@ -28,7 +28,7 @@ //! const MODULE_CODE: &str = r#" //! use spacetimedb::{table, reducer}; //! -//! #[spacetimedb::table(name = person, public)] +//! #[spacetimedb::table(accessor = person, public)] //! pub struct Person { //! name: String, //! } diff --git a/crates/smoketests/tests/auto_migration.rs b/crates/smoketests/tests/auto_migration.rs index 8f06ae76e4e..93f575edb4d 100644 --- a/crates/smoketests/tests/auto_migration.rs +++ b/crates/smoketests/tests/auto_migration.rs @@ -3,7 +3,7 @@ use spacetimedb_smoketests::Smoketest; const MODULE_CODE_SIMPLE: &str = r#" use spacetimedb::{log, ReducerContext, Table}; -#[spacetimedb::table(name = person)] +#[spacetimedb::table(accessor = person)] pub struct Person { name: String, } @@ -24,7 +24,7 @@ pub fn print_persons(ctx: &ReducerContext, prefix: String) { const MODULE_CODE_UPDATED_INCOMPATIBLE: &str = r#" use spacetimedb::{log, ReducerContext, Table}; -#[spacetimedb::table(name = person)] +#[spacetimedb::table(accessor = person)] pub struct Person { name: String, age: u128, @@ -62,7 +62,7 @@ const MODULE_CODE_INIT: &str = r#" use spacetimedb::{log, ReducerContext, Table, SpacetimeType}; use PersonKind::*; -#[spacetimedb::table(name = person, public)] +#[spacetimedb::table(accessor = person, public)] pub struct Person { name: String, kind: PersonKind, @@ -82,7 +82,7 @@ pub fn print_persons(ctx: &ReducerContext, prefix: String) { } } -#[spacetimedb::table(name = point_mass)] +#[spacetimedb::table(accessor = point_mass)] pub struct PointMass { mass: f64, position: Vector2, @@ -94,7 +94,7 @@ pub struct Vector2 { y: f64, } -#[spacetimedb::table(name = person_info)] +#[spacetimedb::table(accessor = person_info)] pub struct PersonInfo { #[primary_key] id: u64, @@ -118,7 +118,7 @@ const MODULE_CODE_UPDATED: &str = r#" use spacetimedb::{log, ReducerContext, Table, SpacetimeType}; use PersonKind::*; -#[spacetimedb::table(name = person, public)] +#[spacetimedb::table(accessor = person, public)] pub struct Person { name: String, kind: PersonKind, @@ -138,7 +138,7 @@ pub fn print_persons(ctx: &ReducerContext, prefix: String) { } } -#[spacetimedb::table(name = point_mass)] +#[spacetimedb::table(accessor = point_mass)] pub struct PointMass { mass: f64, position: Vector2, @@ -150,7 +150,7 @@ pub struct Vector2 { y: f64, } -#[spacetimedb::table(name = person_info)] +#[spacetimedb::table(accessor = person_info)] pub struct PersonInfo { #[primary_key] #[auto_inc] @@ -178,7 +178,7 @@ fn kind_to_string(kind: PersonKind) -> &'static str { } } -#[spacetimedb::table(name = book, public)] +#[spacetimedb::table(accessor = book, public)] pub struct Book { isbn: String, } @@ -278,7 +278,7 @@ const MODULE_CODE_ADD_TABLE_COLUMNS_UPDATED: &str = r#" use spacetimedb::{log, ReducerContext, Table}; #[derive(Debug)] -#[spacetimedb::table(name = person)] +#[spacetimedb::table(accessor = person)] pub struct Person { #[index(btree)] name: String, @@ -310,7 +310,7 @@ const MODULE_CODE_ADD_TABLE_COLUMNS_UPDATED_AGAIN: &str = r#" use spacetimedb::{log, ReducerContext, Table}; #[derive(Debug)] -#[spacetimedb::table(name = person)] +#[spacetimedb::table(accessor = person)] pub struct Person { name: String, age: u16, diff --git a/crates/smoketests/tests/fail_initial_publish.rs b/crates/smoketests/tests/fail_initial_publish.rs index 70ac7e1dd29..ea901b4fad3 100644 --- a/crates/smoketests/tests/fail_initial_publish.rs +++ b/crates/smoketests/tests/fail_initial_publish.rs @@ -4,7 +4,7 @@ use spacetimedb_smoketests::Smoketest; const MODULE_CODE_BROKEN: &str = r#" use spacetimedb::{client_visibility_filter, Filter}; -#[spacetimedb::table(name = person, public)] +#[spacetimedb::table(accessor = person, public)] pub struct Person { name: String, } diff --git a/crates/smoketests/tests/rls.rs b/crates/smoketests/tests/rls.rs index 91059b3edb5..af88bc42c14 100644 --- a/crates/smoketests/tests/rls.rs +++ b/crates/smoketests/tests/rls.rs @@ -33,7 +33,7 @@ fn test_rls_rules() { const MODULE_CODE_BROKEN_RLS: &str = r#" use spacetimedb::{client_visibility_filter, Filter, Identity}; -#[spacetimedb::table(name = user)] +#[spacetimedb::table(accessor = user)] pub struct User { identity: Identity, } diff --git a/demo/Blackholio/server-rust/src/lib.rs b/demo/Blackholio/server-rust/src/lib.rs index f12d554cf3f..290bc2e1aeb 100644 --- a/demo/Blackholio/server-rust/src/lib.rs +++ b/demo/Blackholio/server-rust/src/lib.rs @@ -27,15 +27,15 @@ const SPLIT_GRAV_PULL_BEFORE_RECOMBINE_SEC: f32 = 2.0; const ALLOWED_SPLIT_CIRCLE_OVERLAP_PCT: f32 = 0.9; const SELF_COLLISION_SPEED: f32 = 0.05; //1 == instantly separate circles. less means separation takes time -#[spacetimedb::table(name = config, public)] +#[spacetimedb::table(accessor = config, public)] pub struct Config { #[primary_key] pub id: i32, pub world_size: i64, } -#[spacetimedb::table(name = entity, public)] -#[spacetimedb::table(name = logged_out_entity)] +#[spacetimedb::table(accessor = entity, public)] +#[spacetimedb::table(accessor = logged_out_entity)] #[derive(Debug, Clone)] pub struct Entity { #[auto_inc] @@ -45,8 +45,8 @@ pub struct Entity { pub mass: i32, } -#[spacetimedb::table(name = circle, public)] -#[spacetimedb::table(name = logged_out_circle)] +#[spacetimedb::table(accessor = circle, public)] +#[spacetimedb::table(accessor = logged_out_circle)] #[derive(Debug, Clone)] pub struct Circle { #[primary_key] @@ -58,8 +58,8 @@ pub struct Circle { pub last_split_time: Timestamp, } -#[spacetimedb::table(name = player, public)] -#[spacetimedb::table(name = logged_out_player)] +#[spacetimedb::table(accessor = player, public)] +#[spacetimedb::table(accessor = logged_out_player)] #[derive(Debug, Clone)] pub struct Player { #[primary_key] @@ -70,13 +70,13 @@ pub struct Player { name: String, } -#[spacetimedb::table(name = food, public)] +#[spacetimedb::table(accessor = food, public)] pub struct Food { #[primary_key] pub entity_id: i32, } -#[spacetimedb::table(name = move_all_players_timer, scheduled(move_all_players))] +#[spacetimedb::table(accessor = move_all_players_timer, scheduled(move_all_players))] pub struct MoveAllPlayersTimer { #[primary_key] #[auto_inc] @@ -84,7 +84,7 @@ pub struct MoveAllPlayersTimer { scheduled_at: spacetimedb::ScheduleAt, } -#[spacetimedb::table(name = spawn_food_timer, scheduled(spawn_food))] +#[spacetimedb::table(accessor = spawn_food_timer, scheduled(spawn_food))] pub struct SpawnFoodTimer { #[primary_key] #[auto_inc] @@ -92,7 +92,7 @@ pub struct SpawnFoodTimer { scheduled_at: spacetimedb::ScheduleAt, } -#[spacetimedb::table(name = circle_decay_timer, scheduled(circle_decay))] +#[spacetimedb::table(accessor = circle_decay_timer, scheduled(circle_decay))] pub struct CircleDecayTimer { #[primary_key] #[auto_inc] @@ -100,7 +100,7 @@ pub struct CircleDecayTimer { scheduled_at: spacetimedb::ScheduleAt, } -#[spacetimedb::table(name = circle_recombine_timer, scheduled(circle_recombine))] +#[spacetimedb::table(accessor = circle_recombine_timer, scheduled(circle_recombine))] pub struct CircleRecombineTimer { #[primary_key] #[auto_inc] @@ -109,7 +109,7 @@ pub struct CircleRecombineTimer { player_id: i32, } -#[spacetimedb::table(name = consume_entity_timer, scheduled(consume_entity))] +#[spacetimedb::table(accessor = consume_entity_timer, scheduled(consume_entity))] pub struct ConsumeEntityTimer { #[primary_key] #[auto_inc] diff --git a/modules/benchmarks/src/circles.rs b/modules/benchmarks/src/circles.rs index bfec6a95a9c..caeaef26bc9 100644 --- a/modules/benchmarks/src/circles.rs +++ b/modules/benchmarks/src/circles.rs @@ -11,7 +11,7 @@ pub struct Vector2 { // ---------- schemas ---------- -#[spacetimedb::table(name = entity)] +#[spacetimedb::table(accessor = entity)] pub struct Entity { #[auto_inc] #[primary_key] @@ -30,7 +30,7 @@ impl Entity { } } -#[spacetimedb::table(name = circle)] +#[spacetimedb::table(accessor = circle)] pub struct Circle { #[primary_key] pub entity_id: u32, @@ -53,7 +53,7 @@ impl Circle { } } -#[spacetimedb::table(name = food)] +#[spacetimedb::table(accessor = food)] pub struct Food { #[primary_key] pub entity_id: u32, diff --git a/modules/benchmarks/src/ia_loop.rs b/modules/benchmarks/src/ia_loop.rs index ae530e9e6ba..c7565d6fc57 100644 --- a/modules/benchmarks/src/ia_loop.rs +++ b/modules/benchmarks/src/ia_loop.rs @@ -6,7 +6,7 @@ use crate::Load; use spacetimedb::{log, ReducerContext, SpacetimeType, Table}; use std::hash::{Hash, Hasher}; -#[spacetimedb::table(name = velocity)] +#[spacetimedb::table(accessor = velocity)] pub struct Velocity { #[primary_key] pub entity_id: u32, @@ -21,7 +21,7 @@ impl Velocity { } } -#[spacetimedb::table(name = position)] +#[spacetimedb::table(accessor = position)] pub struct Position { #[primary_key] pub entity_id: u32, @@ -68,7 +68,7 @@ pub enum AgentAction { Fighting, } -#[spacetimedb::table(name = game_enemy_ai_agent_state)] +#[spacetimedb::table(accessor = game_enemy_ai_agent_state)] #[derive(Clone)] pub struct GameEnemyAiAgentState { #[primary_key] @@ -78,7 +78,7 @@ pub struct GameEnemyAiAgentState { pub action: AgentAction, } -#[spacetimedb::table(name = game_targetable_state)] +#[spacetimedb::table(accessor = game_targetable_state)] #[derive(Clone)] pub struct GameTargetableState { #[primary_key] @@ -86,7 +86,7 @@ pub struct GameTargetableState { pub quad: i64, } -#[spacetimedb::table(name = game_live_targetable_state)] +#[spacetimedb::table(accessor = game_live_targetable_state)] pub struct GameLiveTargetableState { #[unique] pub entity_id: u64, @@ -94,7 +94,7 @@ pub struct GameLiveTargetableState { pub quad: i64, } -#[spacetimedb::table(name = game_mobile_entity_state)] +#[spacetimedb::table(accessor = game_mobile_entity_state)] pub struct GameMobileEntityState { #[primary_key] pub entity_id: u64, @@ -105,7 +105,7 @@ pub struct GameMobileEntityState { pub timestamp: u64, } -#[spacetimedb::table(name = game_enemy_state)] +#[spacetimedb::table(accessor = game_enemy_state)] #[derive(Clone)] pub struct GameEnemyState { #[primary_key] @@ -120,7 +120,7 @@ pub struct SmallHexTile { pub dimension: u32, } -#[spacetimedb::table(name = game_herd_cache)] +#[spacetimedb::table(accessor = game_herd_cache)] #[derive(Clone, Debug)] pub struct GameHerdCache { #[primary_key] diff --git a/modules/benchmarks/src/synthetic.rs b/modules/benchmarks/src/synthetic.rs index 10f2999c8d7..55cb68d81bf 100644 --- a/modules/benchmarks/src/synthetic.rs +++ b/modules/benchmarks/src/synthetic.rs @@ -28,7 +28,7 @@ use std::hint::black_box; // ---------- schemas ---------- -#[spacetimedb::table(name = unique_0_u32_u64_str)] +#[spacetimedb::table(accessor = unique_0_u32_u64_str)] pub struct unique_0_u32_u64_str_t { #[unique] id: u32, @@ -36,14 +36,14 @@ pub struct unique_0_u32_u64_str_t { name: String, } -#[spacetimedb::table(name = no_index_u32_u64_str)] +#[spacetimedb::table(accessor = no_index_u32_u64_str)] pub struct no_index_u32_u64_str_t { id: u32, age: u64, name: String, } -#[spacetimedb::table(name = btree_each_column_u32_u64_str)] +#[spacetimedb::table(accessor = btree_each_column_u32_u64_str)] pub struct btree_each_column_u32_u64_str_t { #[index(btree)] id: u32, @@ -53,7 +53,7 @@ pub struct btree_each_column_u32_u64_str_t { name: String, } -#[spacetimedb::table(name = unique_0_u32_u64_u64)] +#[spacetimedb::table(accessor = unique_0_u32_u64_u64)] pub struct unique_0_u32_u64_u64_t { #[unique] id: u32, @@ -61,14 +61,14 @@ pub struct unique_0_u32_u64_u64_t { y: u64, } -#[spacetimedb::table(name = no_index_u32_u64_u64)] +#[spacetimedb::table(accessor = no_index_u32_u64_u64)] pub struct no_index_u32_u64_u64_t { id: u32, x: u64, y: u64, } -#[spacetimedb::table(name = btree_each_column_u32_u64_u64)] +#[spacetimedb::table(accessor = btree_each_column_u32_u64_u64)] pub struct btree_each_column_u32_u64_u64_t { #[index(btree)] id: u32, diff --git a/modules/keynote-benchmarks/src/lib.rs b/modules/keynote-benchmarks/src/lib.rs index e7a8c47feca..700ee0a3abc 100644 --- a/modules/keynote-benchmarks/src/lib.rs +++ b/modules/keynote-benchmarks/src/lib.rs @@ -2,7 +2,7 @@ use core::ops::AddAssign; use spacetimedb::{log_stopwatch::LogStopwatch, rand::Rng, reducer, table, DbContext, ReducerContext, Table}; #[derive(Clone, Copy, Debug)] -#[table(name = position, public)] +#[table(accessor = position, public)] #[repr(C)] pub struct Position { #[primary_key] @@ -14,7 +14,7 @@ pub struct Position { } #[derive(Clone, Copy, Debug)] -#[table(name = velocity, public)] +#[table(accessor = velocity, public)] #[repr(C)] pub struct Velocity { #[primary_key] diff --git a/modules/module-test/src/lib.rs b/modules/module-test/src/lib.rs index 433796e5b60..be69a2898a5 100644 --- a/modules/module-test/src/lib.rs +++ b/modules/module-test/src/lib.rs @@ -15,7 +15,7 @@ pub type TestAlias = TestA; // ───────────────────────────────────────────────────────────────────────────── #[cfg(feature = "test-add-column")] -#[spacetimedb::table(name = person, public, index(name = age, btree(columns = [age])))] +#[spacetimedb::table(accessor = person, public, index(name = age, btree(columns = [age])))] pub struct Person { #[primary_key] #[auto_inc] @@ -27,7 +27,7 @@ pub struct Person { } #[cfg(not(feature = "test-add-column"))] -#[spacetimedb::table(name = person, public, index(name = age, btree(columns = [age])))] +#[spacetimedb::table(accessor = person, public, index(name = age, btree(columns = [age])))] pub struct Person { #[primary_key] #[auto_inc] @@ -37,12 +37,12 @@ pub struct Person { } #[cfg(not(feature = "test-remove-table"))] -#[spacetimedb::table(name = table_to_remove)] +#[spacetimedb::table(accessor = table_to_remove)] pub struct RemoveTable { pub id: u32, } -#[spacetimedb::table(name = test_a, index(name = foo, btree(columns = [x])))] +#[spacetimedb::table(accessor = test_a, index(name = foo, btree(columns = [x])))] pub struct TestA { pub x: u32, pub y: u32, @@ -62,7 +62,7 @@ pub enum TestC { } const DEFAULT_TEST_C: TestC = TestC::Foo; -#[table(name = test_d, public)] +#[table(accessor = test_d, public)] pub struct TestD { #[default(Some(DEFAULT_TEST_C))] test_c: Option, @@ -77,7 +77,7 @@ const fn get_table_access(_: impl Fn(&spacetimedb::Loca // This table was specified as public. const _: () = assert!(matches!(get_table_access(test_d::test_d), TableAccess::Public)); -#[spacetimedb::table(name = test_e)] +#[spacetimedb::table(accessor = test_e)] #[derive(Debug)] pub struct TestE { #[primary_key] @@ -99,7 +99,7 @@ pub enum Foobar { Har(u32), } -#[table(name = test_f, public)] +#[table(accessor = test_f, public)] pub struct TestFoobar { pub field: Foobar, } @@ -118,17 +118,17 @@ const _: () = assert!(matches!(get_table_access(test_e::test_e), TableAccess::Pr // FIXME: Table named "private" doesn't compile in C# // Must be commented here because the schemas are compared between Rust and C# // in the testing. -// #[spacetimedb::table(name = private)] +// #[spacetimedb::table(accessor = private)] // pub struct Private { // name: String, // } -#[spacetimedb::table(name = private_table, private)] +#[spacetimedb::table(accessor = private_table, private)] pub struct PrivateTable { name: String, } -#[spacetimedb::table(name = points, private, index(name = multi_column_index, btree(columns = [x, y])))] +#[spacetimedb::table(accessor = points, private, index(name = multi_column_index, btree(columns = [x, y])))] pub struct Point { x: i64, y: i64, @@ -138,7 +138,7 @@ pub struct Point { const _: () = assert!(matches!(get_table_access(points::points), TableAccess::Private)); // Test we can compile multiple constraints -#[spacetimedb::table(name = pk_multi_identity)] +#[spacetimedb::table(accessor = pk_multi_identity)] struct PkMultiIdentity { #[primary_key] id: u32, @@ -150,7 +150,7 @@ struct PkMultiIdentity { // #[spacetimedb::migrate] // pub fn migrate() {} -#[spacetimedb::table(name = repeating_test_arg, scheduled(repeating_test))] +#[spacetimedb::table(accessor = repeating_test_arg, scheduled(repeating_test))] pub struct RepeatingTestArg { #[primary_key] #[auto_inc] @@ -159,7 +159,7 @@ pub struct RepeatingTestArg { prev_time: Timestamp, } -#[spacetimedb::table(name = has_special_stuff)] +#[spacetimedb::table(accessor = has_special_stuff)] pub struct HasSpecialStuff { identity: Identity, connection_id: ConnectionId, @@ -172,8 +172,8 @@ pub struct HasSpecialStuff { /// would try to emit its own `impl` block for `SpacetimeType` (and some other traits), /// resulting in duplicate/conflicting trait definitions. /// See e.g. [SpacetimeDB issue #2097](https://github.com/clockworklabs/SpacetimeDB/issues/2097). -#[spacetimedb::table(public, name = player)] -#[spacetimedb::table(public, name = logged_out_player)] +#[spacetimedb::table(public, accessor = player)] +#[spacetimedb::table(public, accessor = logged_out_player)] pub struct Player { #[primary_key] identity: Identity, diff --git a/modules/perf-test/src/lib.rs b/modules/perf-test/src/lib.rs index 893bc6778e7..bff54a8cfe4 100644 --- a/modules/perf-test/src/lib.rs +++ b/modules/perf-test/src/lib.rs @@ -1,6 +1,6 @@ use spacetimedb::{log_stopwatch::LogStopwatch, ReducerContext, Table}; -#[spacetimedb::table(name = location, index(name = coordinates, btree(columns = [x, z, dimension])))] +#[spacetimedb::table(accessor = location, index(name = coordinates, btree(columns = [x, z, dimension])))] #[derive(Debug, PartialEq, Eq)] pub struct Location { #[primary_key] diff --git a/modules/sdk-test-connect-disconnect/src/lib.rs b/modules/sdk-test-connect-disconnect/src/lib.rs index 4a733969c01..33f8392cb30 100644 --- a/modules/sdk-test-connect-disconnect/src/lib.rs +++ b/modules/sdk-test-connect-disconnect/src/lib.rs @@ -10,12 +10,12 @@ //! - Observe the presence of one row with the client's `Identity`. use spacetimedb::{Identity, ReducerContext, Table}; -#[spacetimedb::table(name = connected, public)] +#[spacetimedb::table(accessor = connected, public)] pub struct Connected { identity: Identity, } -#[spacetimedb::table(name = disconnected, public)] +#[spacetimedb::table(accessor = disconnected, public)] pub struct Disconnected { identity: Identity, } diff --git a/modules/sdk-test-procedure/src/lib.rs b/modules/sdk-test-procedure/src/lib.rs index 0ee22cba1b6..960b316d958 100644 --- a/modules/sdk-test-procedure/src/lib.rs +++ b/modules/sdk-test-procedure/src/lib.rs @@ -62,7 +62,7 @@ fn invalid_request(ctx: &mut ProcedureContext) -> String { } } -#[table(public, name = my_table)] +#[table(public, accessor = my_table)] struct MyTable { field: ReturnStruct, } @@ -117,7 +117,7 @@ fn schedule_proc(ctx: &ReducerContext) { }); } -#[table(name = scheduled_proc_table, scheduled(scheduled_proc))] +#[table(accessor = scheduled_proc_table, scheduled(scheduled_proc))] struct ScheduledProcTable { #[primary_key] #[auto_inc] @@ -143,7 +143,7 @@ fn scheduled_proc(ctx: &mut ProcedureContext, data: ScheduledProcTable) { }); } -#[table(name = proc_inserts_into, public)] +#[table(accessor = proc_inserts_into, public)] struct ProcInsertsInto { reducer_ts: Timestamp, procedure_ts: Timestamp, @@ -151,7 +151,7 @@ struct ProcInsertsInto { y: u8, } -#[table(public, name = pk_uuid)] +#[table(public, accessor = pk_uuid)] struct PkUuid { u: Uuid, data: u8, diff --git a/modules/sdk-test-view/src/lib.rs b/modules/sdk-test-view/src/lib.rs index e00f64bdccc..99e58707164 100644 --- a/modules/sdk-test-view/src/lib.rs +++ b/modules/sdk-test-view/src/lib.rs @@ -2,7 +2,7 @@ use spacetimedb::{ reducer, table, view, AnonymousViewContext, Identity, ReducerContext, SpacetimeType, Table, ViewContext, }; -#[table(name = player, public)] +#[table(accessor = player, public)] struct Player { #[primary_key] #[auto_inc] @@ -11,7 +11,7 @@ struct Player { identity: Identity, } -#[table(name = player_level, public)] +#[table(accessor = player_level, public)] struct PlayerLevel { #[unique] entity_id: u64, @@ -19,7 +19,7 @@ struct PlayerLevel { level: u64, } -#[table(name = player_location)] +#[table(accessor = player_location)] pub struct PlayerLocation { #[unique] pub entity_id: u64, diff --git a/modules/sdk-test/src/lib.rs b/modules/sdk-test/src/lib.rs index 26c19064d3f..79f21ba54a8 100644 --- a/modules/sdk-test/src/lib.rs +++ b/modules/sdk-test/src/lib.rs @@ -237,7 +237,7 @@ macro_rules! define_tables { // Define a table. (@one $name:ident { $($ops:tt)* } $($(#[$attr:meta])* $field_name:ident $ty:ty),* $(,)*) => { paste::paste! { - #[spacetimedb::table(name = [<$name:snake>], public)] + #[spacetimedb::table(accessor = [<$name:snake>], public)] pub struct $name { $($(#[$attr])* pub $field_name : $ty,)* } @@ -790,7 +790,7 @@ fn no_op_succeeds(_ctx: &ReducerContext) {} #[spacetimedb::client_visibility_filter] const ONE_U8_VISIBLE: spacetimedb::Filter = spacetimedb::Filter::Sql("SELECT * FROM one_u8"); -#[spacetimedb::table(name = scheduled_table, scheduled(send_scheduled_message), public)] +#[spacetimedb::table(accessor = scheduled_table, scheduled(send_scheduled_message), public)] pub struct ScheduledTable { #[primary_key] #[auto_inc] @@ -806,19 +806,19 @@ fn send_scheduled_message(_ctx: &ReducerContext, arg: ScheduledTable) { let _ = arg.scheduled_id; } -#[spacetimedb::table(name = indexed_table)] +#[spacetimedb::table(accessor = indexed_table)] struct IndexedTable { #[index(btree)] player_id: u32, } -#[spacetimedb::table(name = indexed_table_2, index(name=player_id_snazz_index, btree(columns = [player_id, player_snazz])))] +#[spacetimedb::table(accessor = indexed_table_2, index(name=player_id_snazz_index, btree(columns = [player_id, player_snazz])))] struct IndexedTable2 { player_id: u32, player_snazz: f32, } -#[spacetimedb::table(name = btree_u32, public)] +#[spacetimedb::table(accessor = btree_u32, public)] struct BTreeU32 { #[index(btree)] n: u32, @@ -828,7 +828,7 @@ struct BTreeU32 { #[spacetimedb::client_visibility_filter] const USERS_FILTER: spacetimedb::Filter = spacetimedb::Filter::Sql("SELECT * FROM users WHERE identity = :sender"); -#[spacetimedb::table(name = users, public)] +#[spacetimedb::table(accessor = users, public)] struct Users { #[primary_key] identity: Identity, @@ -841,7 +841,7 @@ fn insert_user(ctx: &ReducerContext, name: String, identity: Identity) -> anyhow Ok(()) } -#[spacetimedb::table(name = indexed_simple_enum, public)] +#[spacetimedb::table(accessor = indexed_simple_enum, public)] struct IndexedSimpleEnum { #[index(btree)] n: SimpleEnum, diff --git a/smoketests/tests/add_remove_index.py b/smoketests/tests/add_remove_index.py index e541c14bf97..1848b163a7d 100644 --- a/smoketests/tests/add_remove_index.py +++ b/smoketests/tests/add_remove_index.py @@ -6,10 +6,10 @@ class AddRemoveIndex(Smoketest): MODULE_CODE = """ use spacetimedb::{ReducerContext, Table}; -#[spacetimedb::table(name = t1)] +#[spacetimedb::table(accessor = t1)] pub struct T1 { id: u64 } -#[spacetimedb::table(name = t2)] +#[spacetimedb::table(accessor = t2)] pub struct T2 { id: u64 } #[spacetimedb::reducer(init)] @@ -23,10 +23,10 @@ class AddRemoveIndex(Smoketest): MODULE_CODE_INDEXED = """ use spacetimedb::{ReducerContext, Table}; -#[spacetimedb::table(name = t1)] +#[spacetimedb::table(accessor = t1)] pub struct T1 { #[index(btree)] id: u64 } -#[spacetimedb::table(name = t2)] +#[spacetimedb::table(accessor = t2)] pub struct T2 { #[index(btree)] id: u64 } #[spacetimedb::reducer(init)] diff --git a/smoketests/tests/auto_inc.py b/smoketests/tests/auto_inc.py index 1fe4ae0c86c..8882c1c5dee 100644 --- a/smoketests/tests/auto_inc.py +++ b/smoketests/tests/auto_inc.py @@ -14,7 +14,7 @@ class IntTests: autoinc1_template = string.Template(""" -#[spacetimedb::table(name = person_$KEY_TY)] +#[spacetimedb::table(accessor = person_$KEY_TY)] pub struct Person_$KEY_TY { #[auto_inc] key_col: $KEY_TY, @@ -61,7 +61,7 @@ def do_test_autoinc(self, int_ty): autoinc2_template = string.Template(""" -#[spacetimedb::table(name = person_$KEY_TY)] +#[spacetimedb::table(accessor = person_$KEY_TY)] pub struct Person_$KEY_TY { #[auto_inc] #[unique] diff --git a/smoketests/tests/auto_migration.py b/smoketests/tests/auto_migration.py index f21832f4cde..0ae8b702a95 100644 --- a/smoketests/tests/auto_migration.py +++ b/smoketests/tests/auto_migration.py @@ -8,7 +8,7 @@ class AddTableAutoMigration(Smoketest): use spacetimedb::{log, ReducerContext, Table, SpacetimeType}; use PersonKind::*; -#[spacetimedb::table(name = person, public)] +#[spacetimedb::table(accessor = person, public)] pub struct Person { name: String, kind: PersonKind, @@ -28,7 +28,7 @@ class AddTableAutoMigration(Smoketest): } } -#[spacetimedb::table(name = point_mass)] +#[spacetimedb::table(accessor = point_mass)] pub struct PointMass { mass: f64, /// This used to cause an error when check_compatible did not resolve types in a `ModuleDef`. @@ -44,7 +44,7 @@ class AddTableAutoMigration(Smoketest): MODULE_CODE = MODULE_CODE_INIT + """ -#[spacetimedb::table(name = person_info)] +#[spacetimedb::table(accessor = person_info)] pub struct PersonInfo { #[primary_key] id: u64, @@ -68,7 +68,7 @@ class AddTableAutoMigration(Smoketest): MODULE_CODE_INIT + """ -#[spacetimedb::table(name = person_info)] +#[spacetimedb::table(accessor = person_info)] pub struct PersonInfo { #[primary_key] #[auto_inc] @@ -96,7 +96,7 @@ class AddTableAutoMigration(Smoketest): } } -#[spacetimedb::table(name = book, public)] +#[spacetimedb::table(accessor = book, public)] pub struct Book { isbn: String, } @@ -165,7 +165,7 @@ class RejectTableChanges(Smoketest): MODULE_CODE = """ use spacetimedb::{log, ReducerContext, Table}; -#[spacetimedb::table(name = person)] +#[spacetimedb::table(accessor = person)] pub struct Person { name: String, } @@ -186,7 +186,7 @@ class RejectTableChanges(Smoketest): MODULE_CODE_UPDATED = """ use spacetimedb::{log, ReducerContext, Table}; -#[spacetimedb::table(name = person)] +#[spacetimedb::table(accessor = person)] pub struct Person { name: String, age: u128, @@ -221,7 +221,7 @@ class AddTableColumns(Smoketest): use spacetimedb::{log, ReducerContext, Table}; #[derive(Debug)] -#[spacetimedb::table(name = person)] +#[spacetimedb::table(accessor = person)] pub struct Person { name: String, } @@ -243,7 +243,7 @@ class AddTableColumns(Smoketest): use spacetimedb::{log, ReducerContext, Table}; #[derive(Debug)] -#[spacetimedb::table(name = person)] +#[spacetimedb::table(accessor = person)] pub struct Person { // Add indexes to verify they are handled correctly during migration, // issue #3441 @@ -277,7 +277,7 @@ class AddTableColumns(Smoketest): use spacetimedb::{log, ReducerContext, Table}; #[derive(Debug)] -#[spacetimedb::table(name = person)] +#[spacetimedb::table(accessor = person)] pub struct Person { name: String, age: u16, diff --git a/smoketests/tests/call.py b/smoketests/tests/call.py index 6d3dea7912c..f6682220f0c 100644 --- a/smoketests/tests/call.py +++ b/smoketests/tests/call.py @@ -6,7 +6,7 @@ class CallReducerProcedure(Smoketest): MODULE_CODE = """ use spacetimedb::{log, ProcedureContext, ReducerContext, Table}; -#[spacetimedb::table(name = person)] +#[spacetimedb::table(accessor = person)] pub struct Person { name: String, } @@ -79,7 +79,7 @@ class CallEmptyReducerProcedure(Smoketest): MODULE_CODE = """ use spacetimedb::{log, ReducerContext, Table}; -#[spacetimedb::table(name = person)] +#[spacetimedb::table(accessor = person)] pub struct Person { name: String, } diff --git a/smoketests/tests/clear_database.py b/smoketests/tests/clear_database.py index 0b13ae75a8f..0cec997aae3 100644 --- a/smoketests/tests/clear_database.py +++ b/smoketests/tests/clear_database.py @@ -8,14 +8,14 @@ class ClearDatabase(Smoketest): MODULE_CODE = """ use spacetimedb::{ReducerContext, Table, duration}; -#[spacetimedb::table(name = counter, public)] +#[spacetimedb::table(accessor = counter, public)] pub struct Counter { #[primary_key] id: u64, val: u64 } -#[spacetimedb::table(name = scheduled_counter, public, scheduled(inc, at = sched_at))] +#[spacetimedb::table(accessor = scheduled_counter, public, scheduled(inc, at = sched_at))] pub struct ScheduledCounter { #[primary_key] #[auto_inc] diff --git a/smoketests/tests/client_connected_error_rejects_connection.py b/smoketests/tests/client_connected_error_rejects_connection.py index 8654643ad19..848e1aacfe3 100644 --- a/smoketests/tests/client_connected_error_rejects_connection.py +++ b/smoketests/tests/client_connected_error_rejects_connection.py @@ -3,7 +3,7 @@ MODULE_HEADER = """ use spacetimedb::{ReducerContext, Table}; -#[spacetimedb::table(name = all_u8s, public)] +#[spacetimedb::table(accessor = all_u8s, public)] pub struct AllU8s { number: u8, } diff --git a/smoketests/tests/delete_database.py b/smoketests/tests/delete_database.py index 42addaed281..bf9e3d11a3b 100644 --- a/smoketests/tests/delete_database.py +++ b/smoketests/tests/delete_database.py @@ -7,14 +7,14 @@ class DeleteDatabase(Smoketest): MODULE_CODE = """ use spacetimedb::{ReducerContext, Table, duration}; -#[spacetimedb::table(name = counter, public)] +#[spacetimedb::table(accessor = counter, public)] pub struct Counter { #[primary_key] id: u64, val: u64 } -#[spacetimedb::table(name = scheduled_counter, public, scheduled(inc, at = sched_at))] +#[spacetimedb::table(accessor = scheduled_counter, public, scheduled(inc, at = sched_at))] pub struct ScheduledCounter { #[primary_key] #[auto_inc] diff --git a/smoketests/tests/describe.py b/smoketests/tests/describe.py index e9e28a72ea0..ca1a0120a3d 100644 --- a/smoketests/tests/describe.py +++ b/smoketests/tests/describe.py @@ -4,7 +4,7 @@ class ModuleDescription(Smoketest): MODULE_CODE = """ use spacetimedb::{log, ReducerContext, Table}; -#[spacetimedb::table(name = person)] +#[spacetimedb::table(accessor = person)] pub struct Person { name: String, } diff --git a/smoketests/tests/dml.py b/smoketests/tests/dml.py index d022e20762b..ab2a743c824 100644 --- a/smoketests/tests/dml.py +++ b/smoketests/tests/dml.py @@ -4,7 +4,7 @@ class Dml(Smoketest): MODULE_CODE = """ use spacetimedb::{ReducerContext, Table}; -#[spacetimedb::table(name = t, public)] +#[spacetimedb::table(accessor = t, public)] pub struct T { name: String, } diff --git a/smoketests/tests/fail_initial_publish.py b/smoketests/tests/fail_initial_publish.py index 6e9bba75a5b..f5943f48ed3 100644 --- a/smoketests/tests/fail_initial_publish.py +++ b/smoketests/tests/fail_initial_publish.py @@ -7,7 +7,7 @@ class FailInitialPublish(Smoketest): MODULE_CODE_BROKEN = """ use spacetimedb::{client_visibility_filter, Filter}; -#[spacetimedb::table(name = person, public)] +#[spacetimedb::table(accessor = person, public)] pub struct Person { name: String, } @@ -20,7 +20,7 @@ class FailInitialPublish(Smoketest): MODULE_CODE_FIXED = """ use spacetimedb::{client_visibility_filter, Filter}; -#[spacetimedb::table(name = person, public)] +#[spacetimedb::table(accessor = person, public)] pub struct Person { name: String, } diff --git a/smoketests/tests/filtering.py b/smoketests/tests/filtering.py index 864bdb4b6f0..32c98a4a9b8 100644 --- a/smoketests/tests/filtering.py +++ b/smoketests/tests/filtering.py @@ -4,7 +4,7 @@ class Filtering(Smoketest): MODULE_CODE = """ use spacetimedb::{log, Identity, ReducerContext, Table}; -#[spacetimedb::table(name = person)] +#[spacetimedb::table(accessor = person)] pub struct Person { #[unique] id: i32, @@ -79,7 +79,7 @@ class Filtering(Smoketest): } } -#[spacetimedb::table(name = nonunique_person)] +#[spacetimedb::table(accessor = nonunique_person)] pub struct NonuniquePerson { #[index(btree)] id: i32, @@ -122,7 +122,7 @@ class Filtering(Smoketest): } // Ensure that [Identity] is filterable and a legal unique column. -#[spacetimedb::table(name = identified_person)] +#[spacetimedb::table(accessor = identified_person)] struct IdentifiedPerson { #[unique] identity: Identity, @@ -151,7 +151,7 @@ class Filtering(Smoketest): } // Ensure that indices on non-unique columns behave as we expect. -#[spacetimedb::table(name = indexed_person)] +#[spacetimedb::table(accessor = indexed_person)] struct IndexedPerson { #[unique] id: i32, diff --git a/smoketests/tests/module_nested_op.py b/smoketests/tests/module_nested_op.py index 999026eb7ae..c9419364e31 100644 --- a/smoketests/tests/module_nested_op.py +++ b/smoketests/tests/module_nested_op.py @@ -4,14 +4,14 @@ class ModuleNestedOp(Smoketest): MODULE_CODE = """ use spacetimedb::{log, ReducerContext, Table}; -#[spacetimedb::table(name = account)] +#[spacetimedb::table(accessor = account)] pub struct Account { name: String, #[unique] id: i32, } -#[spacetimedb::table(name = friends)] +#[spacetimedb::table(accessor = friends)] pub struct Friends { friend_1: i32, friend_2: i32, diff --git a/smoketests/tests/modules.py b/smoketests/tests/modules.py index d4f3e06feb0..7efb0976652 100644 --- a/smoketests/tests/modules.py +++ b/smoketests/tests/modules.py @@ -9,7 +9,7 @@ class UpdateModule(Smoketest): MODULE_CODE = """ use spacetimedb::{log, ReducerContext, Table}; -#[spacetimedb::table(name = person)] +#[spacetimedb::table(accessor = person)] pub struct Person { #[primary_key] #[auto_inc] @@ -31,7 +31,7 @@ class UpdateModule(Smoketest): } """ MODULE_CODE_B = """ -#[spacetimedb::table(name = person)] +#[spacetimedb::table(accessor = person)] pub struct Person { #[primary_key] #[auto_inc] @@ -44,7 +44,7 @@ class UpdateModule(Smoketest): MODULE_CODE_C = """ use spacetimedb::{log, ReducerContext, Table}; -#[spacetimedb::table(name = person)] +#[spacetimedb::table(accessor = person)] pub struct Person { #[primary_key] #[auto_inc] @@ -52,7 +52,7 @@ class UpdateModule(Smoketest): name: String, } -#[spacetimedb::table(name = pets)] +#[spacetimedb::table(accessor = pets)] pub struct Pet { species: String, } @@ -104,7 +104,7 @@ class UploadModule1(Smoketest): MODULE_CODE = """ use spacetimedb::{log, ReducerContext, Table}; -#[spacetimedb::table(name = person)] +#[spacetimedb::table(accessor = person)] pub struct Person { name: String, } @@ -142,7 +142,7 @@ class UploadModule2(Smoketest): use spacetimedb::{log, duration, ReducerContext, Table, Timestamp}; -#[spacetimedb::table(name = scheduled_message, public, scheduled(my_repeating_reducer))] +#[spacetimedb::table(accessor = scheduled_message, public, scheduled(my_repeating_reducer))] pub struct ScheduledMessage { #[primary_key] #[auto_inc] @@ -177,7 +177,7 @@ class HotswapModule(Smoketest): MODULE_CODE = """ use spacetimedb::{ReducerContext, Table}; -#[spacetimedb::table(name = person)] +#[spacetimedb::table(accessor = person)] pub struct Person { #[primary_key] #[auto_inc] @@ -194,7 +194,7 @@ class HotswapModule(Smoketest): MODULE_CODE_B = """ use spacetimedb::{ReducerContext, Table}; -#[spacetimedb::table(name = person)] +#[spacetimedb::table(accessor = person)] pub struct Person { #[primary_key] #[auto_inc] @@ -207,7 +207,7 @@ class HotswapModule(Smoketest): ctx.db.person().insert(Person { id: 0, name }); } -#[spacetimedb::table(name = pet)] +#[spacetimedb::table(accessor = pet)] pub struct Pet { #[primary_key] species: String, diff --git a/smoketests/tests/new_user_flow.py b/smoketests/tests/new_user_flow.py index 0adacb11d55..3549f986379 100644 --- a/smoketests/tests/new_user_flow.py +++ b/smoketests/tests/new_user_flow.py @@ -6,7 +6,7 @@ class NewUserFlow(Smoketest): MODULE_CODE = """ use spacetimedb::{log, ReducerContext, Table}; -#[spacetimedb::table(name = person)] +#[spacetimedb::table(accessor = person)] pub struct Person { name: String } diff --git a/smoketests/tests/permissions.py b/smoketests/tests/permissions.py index bdb4a73e23e..25258acaa2c 100644 --- a/smoketests/tests/permissions.py +++ b/smoketests/tests/permissions.py @@ -80,12 +80,12 @@ class PrivateTablePermissions(Smoketest): MODULE_CODE = """ use spacetimedb::{ReducerContext, Table}; -#[spacetimedb::table(name = secret, private)] +#[spacetimedb::table(accessor = secret, private)] pub struct Secret { answer: u8, } -#[spacetimedb::table(name = common_knowledge, public)] +#[spacetimedb::table(accessor = common_knowledge, public)] pub struct CommonKnowledge { thing: String, } diff --git a/smoketests/tests/pg_wire.py b/smoketests/tests/pg_wire.py index 7bcf1fb1043..853d82b523c 100644 --- a/smoketests/tests/pg_wire.py +++ b/smoketests/tests/pg_wire.py @@ -11,7 +11,7 @@ class SqlFormat(Smoketest): use spacetimedb::{ConnectionId, Identity, ReducerContext, SpacetimeType, Table, Timestamp, TimeDuration, Uuid}; #[derive(Copy, Clone)] -#[spacetimedb::table(name = t_ints, public)] +#[spacetimedb::table(accessor = t_ints, public)] pub struct TInts { i8: i8, i16: i16, @@ -21,13 +21,13 @@ class SqlFormat(Smoketest): i256: i256, } -#[spacetimedb::table(name = t_ints_tuple, public)] +#[spacetimedb::table(accessor = t_ints_tuple, public)] pub struct TIntsTuple { tuple: TInts, } #[derive(Copy, Clone)] -#[spacetimedb::table(name = t_uints, public)] +#[spacetimedb::table(accessor = t_uints, public)] pub struct TUints { u8: u8, u16: u16, @@ -37,13 +37,13 @@ class SqlFormat(Smoketest): u256: u256, } -#[spacetimedb::table(name = t_uints_tuple, public)] +#[spacetimedb::table(accessor = t_uints_tuple, public)] pub struct TUintsTuple { tuple: TUints, } #[derive(Clone)] -#[spacetimedb::table(name = t_others, public)] +#[spacetimedb::table(accessor = t_others, public)] pub struct TOthers { bool: bool, f32: f32, @@ -57,7 +57,7 @@ class SqlFormat(Smoketest): uuid: Uuid, } -#[spacetimedb::table(name = t_others_tuple, public)] +#[spacetimedb::table(accessor = t_others_tuple, public)] pub struct TOthersTuple { tuple: TOthers } @@ -74,19 +74,19 @@ class SqlFormat(Smoketest): } #[derive(Copy, Clone)] -#[spacetimedb::table(name = t_simple_enum, public)] +#[spacetimedb::table(accessor = t_simple_enum, public)] pub struct TSimpleEnum { id : u32, action: Action, } -#[spacetimedb::table(name = t_enum, public)] +#[spacetimedb::table(accessor = t_enum, public)] pub struct TEnum { id : u32, color: Color, } -#[spacetimedb::table(name = t_nested, public)] +#[spacetimedb::table(accessor = t_nested, public)] pub struct TNested { en: TEnum, se: TSimpleEnum, @@ -94,14 +94,14 @@ class SqlFormat(Smoketest): } #[derive(Clone)] -#[spacetimedb::table(name = t_enums)] +#[spacetimedb::table(accessor = t_enums)] pub struct TEnums { bool_opt: Option, bool_result: Result, action: Action, } -#[spacetimedb::table(name = t_enums_tuple)] +#[spacetimedb::table(accessor = t_enums_tuple)] pub struct TEnumsTuple { tuple: TEnums, } diff --git a/smoketests/tests/replication.py b/smoketests/tests/replication.py index be2a331517e..3e64d15a341 100644 --- a/smoketests/tests/replication.py +++ b/smoketests/tests/replication.py @@ -158,7 +158,7 @@ class ReplicationTest(Smoketest): MODULE_CODE = """ use spacetimedb::{duration, ReducerContext, Table}; -#[spacetimedb::table(name = counter, public)] +#[spacetimedb::table(accessor = counter, public)] pub struct Counter { #[primary_key] #[auto_inc] @@ -167,7 +167,7 @@ class ReplicationTest(Smoketest): value: u64, } -#[spacetimedb::table(name = schedule_counter, public, scheduled(increment, at = sched_at))] +#[spacetimedb::table(accessor = schedule_counter, public, scheduled(increment, at = sched_at))] pub struct ScheduledCounter { #[primary_key] #[auto_inc] @@ -207,7 +207,7 @@ class ReplicationTest(Smoketest): }); } -#[spacetimedb::table(name = message, public)] +#[spacetimedb::table(accessor = message, public)] pub struct Message { #[primary_key] #[auto_inc] diff --git a/smoketests/tests/rls.py b/smoketests/tests/rls.py index 102c3378a9e..187b451630e 100644 --- a/smoketests/tests/rls.py +++ b/smoketests/tests/rls.py @@ -6,7 +6,7 @@ class Rls(Smoketest): MODULE_CODE = """ use spacetimedb::{Identity, ReducerContext, Table}; -#[spacetimedb::table(name = users, public)] +#[spacetimedb::table(accessor = users, public)] pub struct Users { name: String, identity: Identity, @@ -55,7 +55,7 @@ class BrokenRls(Smoketest): MODULE_CODE_BROKEN = """ use spacetimedb::{client_visibility_filter, Filter}; -#[spacetimedb::table(name = user)] +#[spacetimedb::table(accessor = user)] pub struct User { identity: Identity, } @@ -80,7 +80,7 @@ class DisconnectRls(Smoketest): MODULE_CODE = """ use spacetimedb::{Identity, ReducerContext, Table}; -#[spacetimedb::table(name = users, public)] +#[spacetimedb::table(accessor = users, public)] pub struct Users { name: String, identity: Identity, diff --git a/smoketests/tests/schedule_reducer.py b/smoketests/tests/schedule_reducer.py index ec37052c8b3..95eb13159f6 100644 --- a/smoketests/tests/schedule_reducer.py +++ b/smoketests/tests/schedule_reducer.py @@ -24,7 +24,7 @@ class CancelReducer(Smoketest): do_cancel(ctx, schedule.scheduled_id); } -#[spacetimedb::table(name = scheduled_reducer_args, public, scheduled(reducer))] +#[spacetimedb::table(accessor = scheduled_reducer_args, public, scheduled(reducer))] pub struct ScheduledReducerArgs { #[primary_key] #[auto_inc] @@ -59,7 +59,7 @@ class SubscribeScheduledTable(Smoketest): MODULE_CODE = """ use spacetimedb::{log, duration, ReducerContext, Table, Timestamp}; -#[spacetimedb::table(name = scheduled_table, public, scheduled(my_reducer, at = sched_at))] +#[spacetimedb::table(accessor = scheduled_table, public, scheduled(my_reducer, at = sched_at))] pub struct ScheduledTable { #[primary_key] #[auto_inc] @@ -150,7 +150,7 @@ class SubscribeScheduledProcedureTable(Smoketest): MODULE_CODE = """ use spacetimedb::{log, duration, ReducerContext, ProcedureContext, Table, Timestamp}; -#[spacetimedb::table(name = scheduled_table, public, scheduled(my_procedure, at = sched_at))] +#[spacetimedb::table(accessor = scheduled_table, public, scheduled(my_procedure, at = sched_at))] pub struct ScheduledTable { #[primary_key] #[auto_inc] @@ -242,7 +242,7 @@ class VolatileNonatomicScheduleImmediate(Smoketest): MODULE_CODE = """ use spacetimedb::{ReducerContext, Table}; -#[spacetimedb::table(name = my_table, public)] +#[spacetimedb::table(accessor = my_table, public)] pub struct MyTable { x: String, } diff --git a/smoketests/tests/sql.py b/smoketests/tests/sql.py index 7efc26cfe34..16aeb82887f 100644 --- a/smoketests/tests/sql.py +++ b/smoketests/tests/sql.py @@ -7,7 +7,7 @@ class SqlFormat(Smoketest): use spacetimedb::{ConnectionId, Identity, ReducerContext, Table, Timestamp, TimeDuration, SpacetimeType, Uuid}; #[derive(Copy, Clone)] -#[spacetimedb::table(name = t_ints)] +#[spacetimedb::table(accessor = t_ints)] pub struct TInts { i8: i8, i16: i16, @@ -17,13 +17,13 @@ class SqlFormat(Smoketest): i256: i256, } -#[spacetimedb::table(name = t_ints_tuple)] +#[spacetimedb::table(accessor = t_ints_tuple)] pub struct TIntsTuple { tuple: TInts, } #[derive(Copy, Clone)] -#[spacetimedb::table(name = t_uints)] +#[spacetimedb::table(accessor = t_uints)] pub struct TUints { u8: u8, u16: u16, @@ -33,13 +33,13 @@ class SqlFormat(Smoketest): u256: u256, } -#[spacetimedb::table(name = t_uints_tuple)] +#[spacetimedb::table(accessor = t_uints_tuple)] pub struct TUintsTuple { tuple: TUints, } #[derive(Clone)] -#[spacetimedb::table(name = t_others)] +#[spacetimedb::table(accessor = t_others)] pub struct TOthers { bool: bool, f32: f32, @@ -53,7 +53,7 @@ class SqlFormat(Smoketest): uuid: Uuid, } -#[spacetimedb::table(name = t_others_tuple)] +#[spacetimedb::table(accessor = t_others_tuple)] pub struct TOthersTuple { tuple: TOthers } @@ -65,14 +65,14 @@ class SqlFormat(Smoketest): } #[derive(Clone)] -#[spacetimedb::table(name = t_enums)] +#[spacetimedb::table(accessor = t_enums)] pub struct TEnums { bool_opt: Option, bool_result: Result, action: Action, } -#[spacetimedb::table(name = t_enums_tuple)] +#[spacetimedb::table(accessor = t_enums_tuple)] pub struct TEnumsTuple { tuple: TEnums, } diff --git a/smoketests/tests/teams.py b/smoketests/tests/teams.py index f49e946c2c6..48c087e3ee6 100644 --- a/smoketests/tests/teams.py +++ b/smoketests/tests/teams.py @@ -209,7 +209,7 @@ def tearDown(self): class TeamsMutableSql(TeamsPermissionsTest): MODULE_CODE = """ -#[spacetimedb::table(name = person, public)] +#[spacetimedb::table(accessor = person, public)] struct Person { name: String, } @@ -257,35 +257,35 @@ def test_org_permissions_mut_sql_org_members(self): class TeamsPublishDatabase(TeamsPermissionsTest): MODULE_CODE = """ -#[spacetimedb::table(name = person, public)] +#[spacetimedb::table(accessor = person, public)] struct Person { name: String, } """ MODULE_CODE_OWNER = MODULE_CODE + """ -#[spacetimedb::table(name = owner)] +#[spacetimedb::table(accessor = owner)] struct Owner { name: String, } """ MODULE_CODE_ADMIN = MODULE_CODE_OWNER + """ -#[spacetimedb::table(name = admin)] +#[spacetimedb::table(accessor = admin)] struct Admin { name: String, } """ MODULE_CODE_DEVELOPER = MODULE_CODE_ADMIN + """ -#[spacetimedb::table(name = developer)] +#[spacetimedb::table(accessor = developer)] struct Developer { name: String, } """ MODULE_CODE_VIEWER = MODULE_CODE_DEVELOPER + """ -#[spacetimedb::table(name = viewer)] +#[spacetimedb::table(accessor = viewer)] struct Viewer { name: String, } diff --git a/smoketests/tests/views.py b/smoketests/tests/views.py index 23b29541789..ac475ce243c 100644 --- a/smoketests/tests/views.py +++ b/smoketests/tests/views.py @@ -5,7 +5,7 @@ class Views(Smoketest): use spacetimedb::ViewContext; #[derive(Copy, Clone)] -#[spacetimedb::table(name = player_state)] +#[spacetimedb::table(accessor = player_state)] pub struct PlayerState { #[primary_key] id: u64, @@ -41,7 +41,7 @@ class FailPublish(Smoketest): MODULE_CODE_BROKEN_NAMESPACE = """ use spacetimedb::ViewContext; -#[spacetimedb::table(name = person, public)] +#[spacetimedb::table(accessor = person, public)] pub struct Person { name: String, } @@ -93,8 +93,8 @@ class SqlViews(Smoketest): use spacetimedb::{AnonymousViewContext, ReducerContext, Table, ViewContext}; #[derive(Copy, Clone)] -#[spacetimedb::table(name = player_state)] -#[spacetimedb::table(name = player_level)] +#[spacetimedb::table(accessor = player_state)] +#[spacetimedb::table(accessor = player_level)] pub struct PlayerState { #[primary_key] id: u64, @@ -104,7 +104,7 @@ class SqlViews(Smoketest): #[derive(Clone)] -#[spacetimedb::table(name = player_info, index(name=age_level_index, btree(columns = [age, level])))] +#[spacetimedb::table(accessor = player_info, index(name=age_level_index, btree(columns = [age, level])))] pub struct PlayerInfo { #[primary_key] id: u64, @@ -359,7 +359,7 @@ class AutoMigrateViews(Smoketest): MODULE_CODE = """ use spacetimedb::ViewContext; #[derive(Copy, Clone)] -#[spacetimedb::table(name = player_state)] +#[spacetimedb::table(accessor = player_state)] pub struct PlayerState { #[primary_key] id: u64, @@ -376,7 +376,7 @@ class AutoMigrateViews(Smoketest): use spacetimedb::ViewContext; #[derive(Copy, Clone)] -#[spacetimedb::table(name = player_state)] +#[spacetimedb::table(accessor = player_state)] pub struct PlayerState { #[primary_key] id: u64, @@ -431,7 +431,7 @@ class AutoMigrateDropView(Smoketest): use spacetimedb::ViewContext; #[derive(Copy, Clone)] -#[spacetimedb::table(name = player_state)] +#[spacetimedb::table(accessor = player_state)] pub struct PlayerState { #[primary_key] id: u64, @@ -447,7 +447,7 @@ class AutoMigrateDropView(Smoketest): MODULE_CODE_DROP_VIEW = """ #[derive(Copy, Clone)] -#[spacetimedb::table(name = player_state)] +#[spacetimedb::table(accessor = player_state)] pub struct PlayerState { #[primary_key] id: u64, @@ -466,7 +466,7 @@ def test_auto_migration_drop_view(self): class AutoMigrateAddView(Smoketest): MODULE_CODE = """ #[derive(Copy, Clone)] -#[spacetimedb::table(name = player_state)] +#[spacetimedb::table(accessor = player_state)] pub struct PlayerState { #[primary_key] id: u64, @@ -479,7 +479,7 @@ class AutoMigrateAddView(Smoketest): use spacetimedb::ViewContext; #[derive(Copy, Clone)] -#[spacetimedb::table(name = player_state)] +#[spacetimedb::table(accessor = player_state)] pub struct PlayerState { #[primary_key] id: u64, @@ -504,7 +504,7 @@ class AutoMigrateViewsTrapped(Smoketest): MODULE_CODE = """ use spacetimedb::ViewContext; #[derive(Copy, Clone)] -#[spacetimedb::table(name = player_state)] +#[spacetimedb::table(accessor = player_state)] pub struct PlayerState { #[primary_key] id: u64, @@ -521,7 +521,7 @@ class AutoMigrateViewsTrapped(Smoketest): use spacetimedb::ViewContext; #[derive(Copy, Clone)] -#[spacetimedb::table(name = player_state)] +#[spacetimedb::table(accessor = player_state)] pub struct PlayerState { #[primary_key] id: u64, @@ -538,7 +538,7 @@ class AutoMigrateViewsTrapped(Smoketest): use spacetimedb::ViewContext; #[derive(Copy, Clone)] -#[spacetimedb::table(name = player_state)] +#[spacetimedb::table(accessor = player_state)] pub struct PlayerState { #[primary_key] id: u64, @@ -599,7 +599,7 @@ class SubscribeViews(Smoketest): MODULE_CODE = """ use spacetimedb::{Identity, ReducerContext, Table, ViewContext}; -#[spacetimedb::table(name = player_state)] +#[spacetimedb::table(accessor = player_state)] pub struct PlayerState { #[primary_key] identity: Identity, @@ -669,7 +669,7 @@ class QueryView(Smoketest): MODULE_CODE = """ use spacetimedb::{Query, ReducerContext, Table, ViewContext}; -#[spacetimedb::table(name = user, public)] +#[spacetimedb::table(accessor = user, public)] pub struct User { #[primary_key] identity: u8, @@ -677,7 +677,7 @@ class QueryView(Smoketest): online: bool, } -#[spacetimedb::table(name = person, public)] +#[spacetimedb::table(accessor = person, public)] pub struct Person { #[primary_key] identity: u8, diff --git a/smoketests/tests/zz_docker.py b/smoketests/tests/zz_docker.py index 71ddf173093..c1286bbde1d 100644 --- a/smoketests/tests/zz_docker.py +++ b/smoketests/tests/zz_docker.py @@ -11,7 +11,7 @@ class DockerRestartModule(Smoketest): MODULE_CODE = """ use spacetimedb::{log, ReducerContext, Table}; -#[spacetimedb::table(name = person, index(name = name_idx, btree(columns = [name])))] +#[spacetimedb::table(accessor = person, index(name = name_idx, btree(columns = [name])))] pub struct Person { #[primary_key] #[auto_inc] @@ -57,7 +57,7 @@ class DockerRestartSql(Smoketest): MODULE_CODE = """ use spacetimedb::{log, ReducerContext, Table}; -#[spacetimedb::table(name = person, index(name = name_idx, btree(columns = [name])))] +#[spacetimedb::table(accessor = person, index(name = name_idx, btree(columns = [name])))] pub struct Person { #[primary_key] #[auto_inc] @@ -103,7 +103,7 @@ class DockerRestartAutoDisconnect(Smoketest): use log::info; use spacetimedb::{ConnectionId, Identity, ReducerContext, Table}; -#[spacetimedb::table(name = connected_client)] +#[spacetimedb::table(accessor = connected_client)] pub struct ConnectedClient { identity: Identity, connection_id: ConnectionId, diff --git a/templates/basic-rs/spacetimedb/src/lib.rs b/templates/basic-rs/spacetimedb/src/lib.rs index b55824a656c..e03cee881e1 100644 --- a/templates/basic-rs/spacetimedb/src/lib.rs +++ b/templates/basic-rs/spacetimedb/src/lib.rs @@ -1,6 +1,6 @@ use spacetimedb::{ReducerContext, Table}; -#[spacetimedb::table(name = person, public)] +#[spacetimedb::table(accessor = person, public)] pub struct Person { name: String, } diff --git a/templates/chat-console-rs/spacetimedb/src/lib.rs b/templates/chat-console-rs/spacetimedb/src/lib.rs index d00949f5858..e3917229efc 100644 --- a/templates/chat-console-rs/spacetimedb/src/lib.rs +++ b/templates/chat-console-rs/spacetimedb/src/lib.rs @@ -1,6 +1,6 @@ use spacetimedb::{Identity, ReducerContext, Table, Timestamp}; -#[spacetimedb::table(name = user, public)] +#[spacetimedb::table(accessor = user, public)] pub struct User { #[primary_key] identity: Identity, @@ -8,7 +8,7 @@ pub struct User { online: bool, } -#[spacetimedb::table(name = message, public)] +#[spacetimedb::table(accessor = message, public)] pub struct Message { sender: Identity, sent: Timestamp, From 3b3b287cafe6cd11bb044005e4d109aef17a2887 Mon Sep 17 00:00:00 2001 From: Shubham Mishra Date: Wed, 11 Feb 2026 18:50:50 +0530 Subject: [PATCH 002/133] exlude test-app --- crates/bindings-typescript/test-app/server/src/lib.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/bindings-typescript/test-app/server/src/lib.rs b/crates/bindings-typescript/test-app/server/src/lib.rs index d7f9cbb7474..853c91632e1 100644 --- a/crates/bindings-typescript/test-app/server/src/lib.rs +++ b/crates/bindings-typescript/test-app/server/src/lib.rs @@ -1,6 +1,6 @@ use spacetimedb::{reducer, table, Identity, ReducerContext, SpacetimeType, Table}; -#[table(accessor = player, public)] +#[table(name = player, public)] pub struct Player { #[primary_key] #[auto_inc] @@ -16,14 +16,14 @@ pub struct Point { pub y: u16, } -#[table(accessor = user, public)] +#[table(name = user, public)] pub struct User { #[primary_key] pub identity: Identity, pub username: String, } -#[table(accessor = unindexed_player, public)] +#[table(name = unindexed_player, public)] pub struct UnindexedPlayer { #[primary_key] #[auto_inc] From 055d11151a23b7a13e772b0b49c8de67ef24eac2 Mon Sep 17 00:00:00 2001 From: Shubham Mishra Date: Wed, 11 Feb 2026 19:01:17 +0530 Subject: [PATCH 003/133] ts: name -> accessor --- crates/bindings-typescript/src/lib/table.ts | 14 ++++++------ .../src/server/schema.test-d.ts | 2 +- .../src/server/view.test-d.ts | 10 ++++----- .../tests/column_metadata_validation.test.ts | 22 +++++++++---------- .../bindings-typescript/tests/query.test.ts | 4 ++-- modules/benchmarks-ts/src/schema.ts | 22 +++++++++---------- .../src/index.ts | 4 ++-- modules/sdk-test-procedure-ts/src/index.ts | 8 +++---- modules/sdk-test-ts/src/index.ts | 12 +++++----- .../chat-react-ts/spacetimedb/src/index.ts | 4 ++-- 10 files changed, 51 insertions(+), 51 deletions(-) diff --git a/crates/bindings-typescript/src/lib/table.ts b/crates/bindings-typescript/src/lib/table.ts index dae029287f8..bcb9910f796 100644 --- a/crates/bindings-typescript/src/lib/table.ts +++ b/crates/bindings-typescript/src/lib/table.ts @@ -156,14 +156,14 @@ type NormalizeIndexColumns< /** * Options for configuring a database table. - * - `name`: The name of the table. + * - `accessor`: The name of the table. * - `public`: Whether the table is publicly accessible. Defaults to `false`. * - `indexes`: An array of index configurations for the table. * - `constraints`: An array of constraint configurations for the table. * - `scheduled`: The name of the reducer to be executed based on the scheduled rows in this table. */ export type TableOpts = { - name: string; + accessor: string; public?: boolean; indexes?: IndexOpts[]; // declarative multi‑column indexes constraints?: ConstraintOpts[]; @@ -234,17 +234,17 @@ export interface TableMethods /** * Defines a database table with schema and options. * - * @param opts - Table configuration including name, indexes, and access control + * @param opts - Table configuration including accessor, indexes, and access control * @param row - Product type defining the table's row structure * @returns Table handle for use in schema() function * * @example * ```ts * const playerTable = table( - * { name: 'player', public: true }, + * { accessor: 'player', public: true }, * { * id: t.u32().primaryKey(), - * name: t.string().index('btree') + * accessor: t.string().index('btree') * } * ); * ``` @@ -284,9 +284,9 @@ export function table>( >, ] : [] -): TableSchema, OptsIndices> { +): TableSchema, OptsIndices> { const { - name, + accessor: name, public: isPublic = false, indexes: userIndexes = [], scheduled, diff --git a/crates/bindings-typescript/src/server/schema.test-d.ts b/crates/bindings-typescript/src/server/schema.test-d.ts index cc8e5a8d967..857402d246e 100644 --- a/crates/bindings-typescript/src/server/schema.test-d.ts +++ b/crates/bindings-typescript/src/server/schema.test-d.ts @@ -4,7 +4,7 @@ import t from '../lib/type_builders'; const person = table( { - name: 'person', + accessor: 'person', indexes: [ { name: 'id_name_idx', diff --git a/crates/bindings-typescript/src/server/view.test-d.ts b/crates/bindings-typescript/src/server/view.test-d.ts index 8e5b7fbff7b..dc16ac002fa 100644 --- a/crates/bindings-typescript/src/server/view.test-d.ts +++ b/crates/bindings-typescript/src/server/view.test-d.ts @@ -4,7 +4,7 @@ import t from '../lib/type_builders'; const person = table( { - name: 'person', + accessor: 'person', indexes: [ { name: 'name_id_idx', @@ -20,7 +20,7 @@ const person = table( ); const personWithExtra = table( - { name: 'personWithExtra' }, + { accessor: 'personWithExtra' }, { id: t.u32(), name: t.string(), @@ -29,14 +29,14 @@ const personWithExtra = table( ); const personWithMissing = table( - { name: 'personWithMissing' }, + { accessor: 'personWithMissing' }, { id: t.u32(), } ); const personReordered = table( - { name: 'personReordered' }, + { accessor: 'personReordered' }, { name: t.string(), id: t.u32(), @@ -45,7 +45,7 @@ const personReordered = table( const order = table( { - name: 'order', + accessor: 'order', indexes: [ { name: 'id_person_id', // We are adding this to make sure `person_id` still isn't considered indexed. diff --git a/crates/bindings-typescript/tests/column_metadata_validation.test.ts b/crates/bindings-typescript/tests/column_metadata_validation.test.ts index 7c126d05b74..06cc18545b2 100644 --- a/crates/bindings-typescript/tests/column_metadata_validation.test.ts +++ b/crates/bindings-typescript/tests/column_metadata_validation.test.ts @@ -19,7 +19,7 @@ import { table } from '../src/lib/table'; // Valid: default alone const validDefault = table( - { name: 'valid_default' }, + { accessor: 'valid_default' }, { id: t.u64().primaryKey(), score: t.u32().default(0), @@ -28,7 +28,7 @@ const validDefault = table( // Valid: primaryKey alone const validPrimaryKey = table( - { name: 'valid_primary_key' }, + { accessor: 'valid_primary_key' }, { id: t.u64().primaryKey(), name: t.string(), @@ -37,7 +37,7 @@ const validPrimaryKey = table( // Valid: unique alone const validUnique = table( - { name: 'valid_unique' }, + { accessor: 'valid_unique' }, { id: t.u64().primaryKey(), email: t.string().unique(), @@ -46,7 +46,7 @@ const validUnique = table( // Valid: autoInc alone const validAutoInc = table( - { name: 'valid_auto_inc' }, + { accessor: 'valid_auto_inc' }, { id: t.u64().primaryKey().autoInc(), name: t.string(), @@ -55,7 +55,7 @@ const validAutoInc = table( // Valid: index with default const validIndexWithDefault = table( - { name: 'valid_index_default' }, + { accessor: 'valid_index_default' }, { id: t.u64().primaryKey(), score: t.u32().index().default(0), @@ -69,7 +69,7 @@ const validIndexWithDefault = table( // Invalid: default + primaryKey // @ts-expect-error - default() cannot be combined with primaryKey() const invalidDefaultPrimaryKey = table( - { name: 'invalid_default_pk' }, + { accessor: 'invalid_default_pk' }, { id: t.u64().default(0n).primaryKey(), name: t.string(), @@ -79,7 +79,7 @@ const invalidDefaultPrimaryKey = table( // Invalid: primaryKey + default // @ts-expect-error - primaryKey() cannot be combined with default() const invalidPrimaryKeyDefault = table( - { name: 'invalid_pk_default' }, + { accessor: 'invalid_pk_default' }, { id: t.u64().primaryKey().default(0n), name: t.string(), @@ -89,7 +89,7 @@ const invalidPrimaryKeyDefault = table( // Invalid: default + unique // @ts-expect-error - default() cannot be combined with unique() const invalidDefaultUnique = table( - { name: 'invalid_default_unique' }, + { accessor: 'invalid_default_unique' }, { id: t.u64().primaryKey(), email: t.string().default('').unique(), @@ -99,7 +99,7 @@ const invalidDefaultUnique = table( // Invalid: unique + default // @ts-expect-error - unique() cannot be combined with default() const invalidUniqueDefault = table( - { name: 'invalid_unique_default' }, + { accessor: 'invalid_unique_default' }, { id: t.u64().primaryKey(), email: t.string().unique().default(''), @@ -109,7 +109,7 @@ const invalidUniqueDefault = table( // Invalid: default + autoInc // @ts-expect-error - default() cannot be combined with autoInc() const invalidDefaultAutoInc = table( - { name: 'invalid_default_autoinc' }, + { accessor: 'invalid_default_autoinc' }, { id: t.u64().default(0n).autoInc(), name: t.string(), @@ -119,7 +119,7 @@ const invalidDefaultAutoInc = table( // Invalid: autoInc + default // @ts-expect-error - autoInc() cannot be combined with default() const invalidAutoIncDefault = table( - { name: 'invalid_autoinc_default' }, + { accessor: 'invalid_autoinc_default' }, { id: t.u64().autoInc().default(0n), name: t.string(), diff --git a/crates/bindings-typescript/tests/query.test.ts b/crates/bindings-typescript/tests/query.test.ts index 5b6da7d0d5c..570dde10c0a 100644 --- a/crates/bindings-typescript/tests/query.test.ts +++ b/crates/bindings-typescript/tests/query.test.ts @@ -14,7 +14,7 @@ import { t } from '../src/lib/type_builders'; const personTable = table( { - name: 'person', + accessor: 'person', indexes: [ { @@ -33,7 +33,7 @@ const personTable = table( const ordersTable = table( { - name: 'orders', + accessor: 'orders', indexes: [ { name: 'orders_person_id_idx', diff --git a/modules/benchmarks-ts/src/schema.ts b/modules/benchmarks-ts/src/schema.ts index 12b8f277272..4cf989781b9 100644 --- a/modules/benchmarks-ts/src/schema.ts +++ b/modules/benchmarks-ts/src/schema.ts @@ -80,27 +80,27 @@ export const btree_each_column_u32_u64_u64_tRow = t.row({ }); const unique_0_u32_u64_strTable = table( - { name: 'unique_0_u32_u64_str' }, + { accessor: 'unique_0_u32_u64_str' }, unique_0_u32_u64_str_tRow ); const no_index_u32_u64_strTable = table( - { name: 'no_index_u32_u64_str' }, + { accessor: 'no_index_u32_u64_str' }, no_index_u32_u64_str_tRow ); const btree_each_column_u32_u64_strTable = table( - { name: 'btree_each_column_u32_u64_str' }, + { accessor: 'btree_each_column_u32_u64_str' }, btree_each_column_u32_u64_str_tRow ); const unique_0_u32_u64_u64Table = table( - { name: 'unique_0_u32_u64_u64' }, + { accessor: 'unique_0_u32_u64_u64' }, unique_0_u32_u64_u64_tRow ); const no_index_u32_u64_u64Table = table( - { name: 'no_index_u32_u64_u64' }, + { accessor: 'no_index_u32_u64_u64' }, no_index_u32_u64_u64_tRow ); const btree_each_column_u32_u64_u64Table = table( - { name: 'btree_each_column_u32_u64_u64' }, + { accessor: 'btree_each_column_u32_u64_u64' }, btree_each_column_u32_u64_u64_tRow ); @@ -192,31 +192,31 @@ const velocityTable = table({ name: 'velocity' }, velocity); const positionTable = table({ name: 'position' }, position); const gameEnemyAiAgentStateTable = table( { - name: 'game_enemy_ai_agent_state', + accessor: 'game_enemy_ai_agent_state', }, gameEnemyAiAgentState ); const gameTargetableStateTable = table( { - name: 'game_targetable_state', + accessor: 'game_targetable_state', }, gameTargetableState ); const gameLiveTargetableStateTable = table( { - name: 'game_live_targetable_state', + accessor: 'game_live_targetable_state', }, gameLiveTargetableState ); const gameEnemyStateTable = table( { - name: 'game_enemy_state', + accessor: 'game_enemy_state', }, gameEnemyState ); const gameHerdCacheTable = table( { - name: 'game_herd_cache', + accessor: 'game_herd_cache', }, gameHerdCache ); diff --git a/modules/sdk-test-connect-disconnect-ts/src/index.ts b/modules/sdk-test-connect-disconnect-ts/src/index.ts index f9f36546b4b..30cc02e2bb6 100644 --- a/modules/sdk-test-connect-disconnect-ts/src/index.ts +++ b/modules/sdk-test-connect-disconnect-ts/src/index.ts @@ -4,12 +4,12 @@ import { schema, t, table } from 'spacetimedb/server'; const Connected = table( - { name: 'connected', public: true }, + { accessor: 'connected', public: true }, { identity: t.identity() } ); const Disconnected = table( - { name: 'disconnected', public: true }, + { accessor: 'disconnected', public: true }, { identity: t.identity() } ); diff --git a/modules/sdk-test-procedure-ts/src/index.ts b/modules/sdk-test-procedure-ts/src/index.ts index aef58a94a34..9191f8ce500 100644 --- a/modules/sdk-test-procedure-ts/src/index.ts +++ b/modules/sdk-test-procedure-ts/src/index.ts @@ -22,12 +22,12 @@ const ReturnEnum = t.enum('ReturnEnum', { }); const MyTable = table( - { name: 'my_table', public: true }, + { accessor: 'my_table', public: true }, { field: ReturnStruct } ); const PkTable = table( - { name: 'pk_uuid', public: true }, + { accessor: 'pk_uuid', public: true }, {u: t.uuid().primaryKey(), data: t.i32()} ); @@ -39,7 +39,7 @@ const ScheduledProcTable = t.row({ y: t.u8(), }); const ScheduledProcTableTable = table( - { name: 'scheduled_proc_table', scheduled: 'scheduled_proc' }, + { accessor: 'scheduled_proc_table', scheduled: 'scheduled_proc' }, ScheduledProcTable ); @@ -50,7 +50,7 @@ const ProcInsertsInto = t.row({ y: t.u8(), }); const ProcInsertsIntoTable = table( - { name: 'proc_inserts_into', public: true }, + { accessor: 'proc_inserts_into', public: true }, ProcInsertsInto ); diff --git a/modules/sdk-test-ts/src/index.ts b/modules/sdk-test-ts/src/index.ts index 92666b04136..35869166d67 100644 --- a/modules/sdk-test-ts/src/index.ts +++ b/modules/sdk-test-ts/src/index.ts @@ -806,7 +806,7 @@ const allTableDefs: ExtractTables = allTables.map( const ScheduledTable = table( { - name: 'scheduled_table', + accessor: 'scheduled_table', scheduled: 'send_scheduled_message', public: true, }, @@ -818,13 +818,13 @@ const ScheduledTable = table( ); const IndexedTable = table( - { name: 'indexed_table' }, + { accessor: 'indexed_table' }, { player_id: t.u32().index('btree') } ); const IndexedTable2 = table( { - name: 'indexed_table_2', + accessor: 'indexed_table_2', indexes: [ { name: 'player_id_snazz_index', @@ -840,7 +840,7 @@ const IndexedTable2 = table( ); const BTreeU32 = table( - { name: 'btree_u32', public: true }, + { accessor: 'btree_u32', public: true }, t.row('BTreeU32', { n: t.u32().index('btree'), data: t.i32(), @@ -848,7 +848,7 @@ const BTreeU32 = table( ); const Users = table( - { name: 'users', public: true }, + { accessor: 'users', public: true }, { identity: t.identity().primaryKey(), name: t.string(), @@ -856,7 +856,7 @@ const Users = table( ); const IndexedSimpleEnum = table( - { name: 'indexed_simple_enum', public: true }, + { accessor: 'indexed_simple_enum', public: true }, { n: SimpleEnum.index('btree') } ); diff --git a/templates/chat-react-ts/spacetimedb/src/index.ts b/templates/chat-react-ts/spacetimedb/src/index.ts index f432aa73bf2..a441aef301f 100644 --- a/templates/chat-react-ts/spacetimedb/src/index.ts +++ b/templates/chat-react-ts/spacetimedb/src/index.ts @@ -4,7 +4,7 @@ import { schema, t, table, SenderError } from 'spacetimedb/server'; const User = table( - { name: 'user', public: true }, + { accessor: 'user', public: true }, { identity: t.identity().primaryKey(), name: t.string().optional(), @@ -13,7 +13,7 @@ const User = table( ); const Message = table( - { name: 'message', public: true }, + { accessor: 'message', public: true }, { sender: t.identity(), sent: t.timestamp(), text: t.string() } ); From 3deab9d349398df1514d81a462787e0fb9257888 Mon Sep 17 00:00:00 2001 From: Shubham Mishra Date: Wed, 11 Feb 2026 19:21:18 +0530 Subject: [PATCH 004/133] Revert "ts: name -> accessor" This reverts commit 055d11151a23b7a13e772b0b49c8de67ef24eac2. --- crates/bindings-typescript/src/lib/table.ts | 14 ++++++------ .../src/server/schema.test-d.ts | 2 +- .../src/server/view.test-d.ts | 10 ++++----- .../tests/column_metadata_validation.test.ts | 22 +++++++++---------- .../bindings-typescript/tests/query.test.ts | 4 ++-- modules/benchmarks-ts/src/schema.ts | 22 +++++++++---------- .../src/index.ts | 4 ++-- modules/sdk-test-procedure-ts/src/index.ts | 8 +++---- modules/sdk-test-ts/src/index.ts | 12 +++++----- .../chat-react-ts/spacetimedb/src/index.ts | 4 ++-- 10 files changed, 51 insertions(+), 51 deletions(-) diff --git a/crates/bindings-typescript/src/lib/table.ts b/crates/bindings-typescript/src/lib/table.ts index bcb9910f796..dae029287f8 100644 --- a/crates/bindings-typescript/src/lib/table.ts +++ b/crates/bindings-typescript/src/lib/table.ts @@ -156,14 +156,14 @@ type NormalizeIndexColumns< /** * Options for configuring a database table. - * - `accessor`: The name of the table. + * - `name`: The name of the table. * - `public`: Whether the table is publicly accessible. Defaults to `false`. * - `indexes`: An array of index configurations for the table. * - `constraints`: An array of constraint configurations for the table. * - `scheduled`: The name of the reducer to be executed based on the scheduled rows in this table. */ export type TableOpts = { - accessor: string; + name: string; public?: boolean; indexes?: IndexOpts[]; // declarative multi‑column indexes constraints?: ConstraintOpts[]; @@ -234,17 +234,17 @@ export interface TableMethods /** * Defines a database table with schema and options. * - * @param opts - Table configuration including accessor, indexes, and access control + * @param opts - Table configuration including name, indexes, and access control * @param row - Product type defining the table's row structure * @returns Table handle for use in schema() function * * @example * ```ts * const playerTable = table( - * { accessor: 'player', public: true }, + * { name: 'player', public: true }, * { * id: t.u32().primaryKey(), - * accessor: t.string().index('btree') + * name: t.string().index('btree') * } * ); * ``` @@ -284,9 +284,9 @@ export function table>( >, ] : [] -): TableSchema, OptsIndices> { +): TableSchema, OptsIndices> { const { - accessor: name, + name, public: isPublic = false, indexes: userIndexes = [], scheduled, diff --git a/crates/bindings-typescript/src/server/schema.test-d.ts b/crates/bindings-typescript/src/server/schema.test-d.ts index 857402d246e..cc8e5a8d967 100644 --- a/crates/bindings-typescript/src/server/schema.test-d.ts +++ b/crates/bindings-typescript/src/server/schema.test-d.ts @@ -4,7 +4,7 @@ import t from '../lib/type_builders'; const person = table( { - accessor: 'person', + name: 'person', indexes: [ { name: 'id_name_idx', diff --git a/crates/bindings-typescript/src/server/view.test-d.ts b/crates/bindings-typescript/src/server/view.test-d.ts index dc16ac002fa..8e5b7fbff7b 100644 --- a/crates/bindings-typescript/src/server/view.test-d.ts +++ b/crates/bindings-typescript/src/server/view.test-d.ts @@ -4,7 +4,7 @@ import t from '../lib/type_builders'; const person = table( { - accessor: 'person', + name: 'person', indexes: [ { name: 'name_id_idx', @@ -20,7 +20,7 @@ const person = table( ); const personWithExtra = table( - { accessor: 'personWithExtra' }, + { name: 'personWithExtra' }, { id: t.u32(), name: t.string(), @@ -29,14 +29,14 @@ const personWithExtra = table( ); const personWithMissing = table( - { accessor: 'personWithMissing' }, + { name: 'personWithMissing' }, { id: t.u32(), } ); const personReordered = table( - { accessor: 'personReordered' }, + { name: 'personReordered' }, { name: t.string(), id: t.u32(), @@ -45,7 +45,7 @@ const personReordered = table( const order = table( { - accessor: 'order', + name: 'order', indexes: [ { name: 'id_person_id', // We are adding this to make sure `person_id` still isn't considered indexed. diff --git a/crates/bindings-typescript/tests/column_metadata_validation.test.ts b/crates/bindings-typescript/tests/column_metadata_validation.test.ts index 06cc18545b2..7c126d05b74 100644 --- a/crates/bindings-typescript/tests/column_metadata_validation.test.ts +++ b/crates/bindings-typescript/tests/column_metadata_validation.test.ts @@ -19,7 +19,7 @@ import { table } from '../src/lib/table'; // Valid: default alone const validDefault = table( - { accessor: 'valid_default' }, + { name: 'valid_default' }, { id: t.u64().primaryKey(), score: t.u32().default(0), @@ -28,7 +28,7 @@ const validDefault = table( // Valid: primaryKey alone const validPrimaryKey = table( - { accessor: 'valid_primary_key' }, + { name: 'valid_primary_key' }, { id: t.u64().primaryKey(), name: t.string(), @@ -37,7 +37,7 @@ const validPrimaryKey = table( // Valid: unique alone const validUnique = table( - { accessor: 'valid_unique' }, + { name: 'valid_unique' }, { id: t.u64().primaryKey(), email: t.string().unique(), @@ -46,7 +46,7 @@ const validUnique = table( // Valid: autoInc alone const validAutoInc = table( - { accessor: 'valid_auto_inc' }, + { name: 'valid_auto_inc' }, { id: t.u64().primaryKey().autoInc(), name: t.string(), @@ -55,7 +55,7 @@ const validAutoInc = table( // Valid: index with default const validIndexWithDefault = table( - { accessor: 'valid_index_default' }, + { name: 'valid_index_default' }, { id: t.u64().primaryKey(), score: t.u32().index().default(0), @@ -69,7 +69,7 @@ const validIndexWithDefault = table( // Invalid: default + primaryKey // @ts-expect-error - default() cannot be combined with primaryKey() const invalidDefaultPrimaryKey = table( - { accessor: 'invalid_default_pk' }, + { name: 'invalid_default_pk' }, { id: t.u64().default(0n).primaryKey(), name: t.string(), @@ -79,7 +79,7 @@ const invalidDefaultPrimaryKey = table( // Invalid: primaryKey + default // @ts-expect-error - primaryKey() cannot be combined with default() const invalidPrimaryKeyDefault = table( - { accessor: 'invalid_pk_default' }, + { name: 'invalid_pk_default' }, { id: t.u64().primaryKey().default(0n), name: t.string(), @@ -89,7 +89,7 @@ const invalidPrimaryKeyDefault = table( // Invalid: default + unique // @ts-expect-error - default() cannot be combined with unique() const invalidDefaultUnique = table( - { accessor: 'invalid_default_unique' }, + { name: 'invalid_default_unique' }, { id: t.u64().primaryKey(), email: t.string().default('').unique(), @@ -99,7 +99,7 @@ const invalidDefaultUnique = table( // Invalid: unique + default // @ts-expect-error - unique() cannot be combined with default() const invalidUniqueDefault = table( - { accessor: 'invalid_unique_default' }, + { name: 'invalid_unique_default' }, { id: t.u64().primaryKey(), email: t.string().unique().default(''), @@ -109,7 +109,7 @@ const invalidUniqueDefault = table( // Invalid: default + autoInc // @ts-expect-error - default() cannot be combined with autoInc() const invalidDefaultAutoInc = table( - { accessor: 'invalid_default_autoinc' }, + { name: 'invalid_default_autoinc' }, { id: t.u64().default(0n).autoInc(), name: t.string(), @@ -119,7 +119,7 @@ const invalidDefaultAutoInc = table( // Invalid: autoInc + default // @ts-expect-error - autoInc() cannot be combined with default() const invalidAutoIncDefault = table( - { accessor: 'invalid_autoinc_default' }, + { name: 'invalid_autoinc_default' }, { id: t.u64().autoInc().default(0n), name: t.string(), diff --git a/crates/bindings-typescript/tests/query.test.ts b/crates/bindings-typescript/tests/query.test.ts index 570dde10c0a..5b6da7d0d5c 100644 --- a/crates/bindings-typescript/tests/query.test.ts +++ b/crates/bindings-typescript/tests/query.test.ts @@ -14,7 +14,7 @@ import { t } from '../src/lib/type_builders'; const personTable = table( { - accessor: 'person', + name: 'person', indexes: [ { @@ -33,7 +33,7 @@ const personTable = table( const ordersTable = table( { - accessor: 'orders', + name: 'orders', indexes: [ { name: 'orders_person_id_idx', diff --git a/modules/benchmarks-ts/src/schema.ts b/modules/benchmarks-ts/src/schema.ts index 4cf989781b9..12b8f277272 100644 --- a/modules/benchmarks-ts/src/schema.ts +++ b/modules/benchmarks-ts/src/schema.ts @@ -80,27 +80,27 @@ export const btree_each_column_u32_u64_u64_tRow = t.row({ }); const unique_0_u32_u64_strTable = table( - { accessor: 'unique_0_u32_u64_str' }, + { name: 'unique_0_u32_u64_str' }, unique_0_u32_u64_str_tRow ); const no_index_u32_u64_strTable = table( - { accessor: 'no_index_u32_u64_str' }, + { name: 'no_index_u32_u64_str' }, no_index_u32_u64_str_tRow ); const btree_each_column_u32_u64_strTable = table( - { accessor: 'btree_each_column_u32_u64_str' }, + { name: 'btree_each_column_u32_u64_str' }, btree_each_column_u32_u64_str_tRow ); const unique_0_u32_u64_u64Table = table( - { accessor: 'unique_0_u32_u64_u64' }, + { name: 'unique_0_u32_u64_u64' }, unique_0_u32_u64_u64_tRow ); const no_index_u32_u64_u64Table = table( - { accessor: 'no_index_u32_u64_u64' }, + { name: 'no_index_u32_u64_u64' }, no_index_u32_u64_u64_tRow ); const btree_each_column_u32_u64_u64Table = table( - { accessor: 'btree_each_column_u32_u64_u64' }, + { name: 'btree_each_column_u32_u64_u64' }, btree_each_column_u32_u64_u64_tRow ); @@ -192,31 +192,31 @@ const velocityTable = table({ name: 'velocity' }, velocity); const positionTable = table({ name: 'position' }, position); const gameEnemyAiAgentStateTable = table( { - accessor: 'game_enemy_ai_agent_state', + name: 'game_enemy_ai_agent_state', }, gameEnemyAiAgentState ); const gameTargetableStateTable = table( { - accessor: 'game_targetable_state', + name: 'game_targetable_state', }, gameTargetableState ); const gameLiveTargetableStateTable = table( { - accessor: 'game_live_targetable_state', + name: 'game_live_targetable_state', }, gameLiveTargetableState ); const gameEnemyStateTable = table( { - accessor: 'game_enemy_state', + name: 'game_enemy_state', }, gameEnemyState ); const gameHerdCacheTable = table( { - accessor: 'game_herd_cache', + name: 'game_herd_cache', }, gameHerdCache ); diff --git a/modules/sdk-test-connect-disconnect-ts/src/index.ts b/modules/sdk-test-connect-disconnect-ts/src/index.ts index 30cc02e2bb6..f9f36546b4b 100644 --- a/modules/sdk-test-connect-disconnect-ts/src/index.ts +++ b/modules/sdk-test-connect-disconnect-ts/src/index.ts @@ -4,12 +4,12 @@ import { schema, t, table } from 'spacetimedb/server'; const Connected = table( - { accessor: 'connected', public: true }, + { name: 'connected', public: true }, { identity: t.identity() } ); const Disconnected = table( - { accessor: 'disconnected', public: true }, + { name: 'disconnected', public: true }, { identity: t.identity() } ); diff --git a/modules/sdk-test-procedure-ts/src/index.ts b/modules/sdk-test-procedure-ts/src/index.ts index 9191f8ce500..aef58a94a34 100644 --- a/modules/sdk-test-procedure-ts/src/index.ts +++ b/modules/sdk-test-procedure-ts/src/index.ts @@ -22,12 +22,12 @@ const ReturnEnum = t.enum('ReturnEnum', { }); const MyTable = table( - { accessor: 'my_table', public: true }, + { name: 'my_table', public: true }, { field: ReturnStruct } ); const PkTable = table( - { accessor: 'pk_uuid', public: true }, + { name: 'pk_uuid', public: true }, {u: t.uuid().primaryKey(), data: t.i32()} ); @@ -39,7 +39,7 @@ const ScheduledProcTable = t.row({ y: t.u8(), }); const ScheduledProcTableTable = table( - { accessor: 'scheduled_proc_table', scheduled: 'scheduled_proc' }, + { name: 'scheduled_proc_table', scheduled: 'scheduled_proc' }, ScheduledProcTable ); @@ -50,7 +50,7 @@ const ProcInsertsInto = t.row({ y: t.u8(), }); const ProcInsertsIntoTable = table( - { accessor: 'proc_inserts_into', public: true }, + { name: 'proc_inserts_into', public: true }, ProcInsertsInto ); diff --git a/modules/sdk-test-ts/src/index.ts b/modules/sdk-test-ts/src/index.ts index 35869166d67..92666b04136 100644 --- a/modules/sdk-test-ts/src/index.ts +++ b/modules/sdk-test-ts/src/index.ts @@ -806,7 +806,7 @@ const allTableDefs: ExtractTables = allTables.map( const ScheduledTable = table( { - accessor: 'scheduled_table', + name: 'scheduled_table', scheduled: 'send_scheduled_message', public: true, }, @@ -818,13 +818,13 @@ const ScheduledTable = table( ); const IndexedTable = table( - { accessor: 'indexed_table' }, + { name: 'indexed_table' }, { player_id: t.u32().index('btree') } ); const IndexedTable2 = table( { - accessor: 'indexed_table_2', + name: 'indexed_table_2', indexes: [ { name: 'player_id_snazz_index', @@ -840,7 +840,7 @@ const IndexedTable2 = table( ); const BTreeU32 = table( - { accessor: 'btree_u32', public: true }, + { name: 'btree_u32', public: true }, t.row('BTreeU32', { n: t.u32().index('btree'), data: t.i32(), @@ -848,7 +848,7 @@ const BTreeU32 = table( ); const Users = table( - { accessor: 'users', public: true }, + { name: 'users', public: true }, { identity: t.identity().primaryKey(), name: t.string(), @@ -856,7 +856,7 @@ const Users = table( ); const IndexedSimpleEnum = table( - { accessor: 'indexed_simple_enum', public: true }, + { name: 'indexed_simple_enum', public: true }, { n: SimpleEnum.index('btree') } ); diff --git a/templates/chat-react-ts/spacetimedb/src/index.ts b/templates/chat-react-ts/spacetimedb/src/index.ts index a441aef301f..f432aa73bf2 100644 --- a/templates/chat-react-ts/spacetimedb/src/index.ts +++ b/templates/chat-react-ts/spacetimedb/src/index.ts @@ -4,7 +4,7 @@ import { schema, t, table, SenderError } from 'spacetimedb/server'; const User = table( - { accessor: 'user', public: true }, + { name: 'user', public: true }, { identity: t.identity().primaryKey(), name: t.string().optional(), @@ -13,7 +13,7 @@ const User = table( ); const Message = table( - { accessor: 'message', public: true }, + { name: 'message', public: true }, { sender: t.identity(), sent: t.timestamp(), text: t.string() } ); From f14234d9e048553517238b4bd642be787e8d300c Mon Sep 17 00:00:00 2001 From: Shubham Mishra Date: Wed, 11 Feb 2026 20:06:12 +0530 Subject: [PATCH 005/133] indexarg to accessor --- crates/bindings-macro/src/table.rs | 26 +- crates/bindings/src/lib.rs | 6 +- crates/bindings/src/table.rs | 12 +- .../codegen__codegen_typescript.snap.new | 1278 +++++++++++++++++ .../modules/restart-person/src/lib.rs | 2 +- .../smoketests/modules/views-sql/src/lib.rs | 2 +- modules/module-test/src/lib.rs | 8 +- modules/perf-test/src/lib.rs | 2 +- modules/sdk-test/src/lib.rs | 2 +- 9 files changed, 1310 insertions(+), 28 deletions(-) create mode 100644 crates/codegen/tests/snapshots/codegen__codegen_typescript.snap.new diff --git a/crates/bindings-macro/src/table.rs b/crates/bindings-macro/src/table.rs index 1b3f01212da..17eb6a4ca78 100644 --- a/crates/bindings-macro/src/table.rs +++ b/crates/bindings-macro/src/table.rs @@ -45,17 +45,21 @@ struct ScheduledArg { } struct IndexArg { - name: Ident, + accessor: Ident, is_unique: bool, kind: IndexType, } impl IndexArg { - fn new(name: Ident, kind: IndexType) -> Self { + fn new(accessor: Ident, kind: IndexType) -> Self { // We don't know if its unique yet. // We'll discover this once we have collected constraints. let is_unique = false; - Self { name, is_unique, kind } + Self { + accessor, + is_unique, + kind, + } } } @@ -152,14 +156,14 @@ impl ScheduledArg { impl IndexArg { fn parse_meta(meta: ParseNestedMeta) -> syn::Result { - let mut name = None; + let mut accessor = None; let mut algo = None; meta.parse_nested_meta(|meta| { match_meta!(match meta { - sym::name => { - check_duplicate(&name, &meta)?; - name = Some(meta.value()?.parse()?); + sym::accessor => { + check_duplicate(&accessor, &meta)?; + accessor = Some(meta.value()?.parse()?); } sym::btree => { check_duplicate_msg(&algo, &meta, "index algorithm specified twice")?; @@ -176,7 +180,7 @@ impl IndexArg { }); Ok(()) })?; - let name = name.ok_or_else(|| meta.error("missing index name, e.g. name = my_index"))?; + let accessor = accessor.ok_or_else(|| meta.error("missing index name, e.g. accessor = my_index"))?; let kind = algo.ok_or_else(|| { meta.error( "missing index algorithm, e.g., `btree(columns = [col1, col2])`, \ @@ -184,7 +188,7 @@ impl IndexArg { ) })?; - Ok(IndexArg::new(name, kind)) + Ok(IndexArg::new(accessor, kind)) } fn parse_columns(meta: &ParseNestedMeta) -> syn::Result>> { @@ -306,7 +310,7 @@ impl IndexArg { Ok(ValidatedIndex { is_unique: self.is_unique, index_name, - accessor_name: &self.name, + accessor_name: &self.accessor, kind, }) } @@ -799,7 +803,7 @@ pub(crate) fn table_impl(mut args: TableArgs, item: &syn::DeriveInput) -> syn::R let name = unique_col.ident.clone(); let columns = vec![name.clone()]; args.indices.push(IndexArg { - name, + accessor: name, is_unique: true, kind: IndexType::BTree { columns }, }) diff --git a/crates/bindings/src/lib.rs b/crates/bindings/src/lib.rs index 16e1aa68763..d76e40709c2 100644 --- a/crates/bindings/src/lib.rs +++ b/crates/bindings/src/lib.rs @@ -118,7 +118,7 @@ pub use spacetimedb_bindings_macro::client_visibility_filter; /// use spacetimedb::{table, ReducerContext}; /// /// #[table(accessor = user, public, -/// index(name = popularity_and_username, btree(columns = [popularity, username])), +/// index(accessor = popularity_and_username, btree(columns = [popularity, username])), /// )] /// pub struct User { /// #[auto_inc] @@ -227,7 +227,7 @@ pub use spacetimedb_bindings_macro::client_visibility_filter; /// ### `index(...)` /// /// You can specify an index on one or more of the table's columns with the syntax: -/// `index(name = my_index, btree(columns = [a, b, c]))` +/// `index(accessor = my_index, btree(columns = [a, b, c]))` /// /// You can also just put `#[index(btree)]` on the field itself if you only need /// a single-column index; see column attributes below. @@ -797,7 +797,7 @@ pub use spacetimedb_bindings_macro::procedure; /// id: u64, /// } /// -/// #[table(accessor = location, index(name = coordinates, btree(columns = [x, y])))] +/// #[table(accessor = location, index(accessor = coordinates, btree(columns = [x, y])))] /// struct Location { /// #[unique] /// player_id: u64, diff --git a/crates/bindings/src/table.rs b/crates/bindings/src/table.rs index 158b8a6129f..603a31af041 100644 --- a/crates/bindings/src/table.rs +++ b/crates/bindings/src/table.rs @@ -485,7 +485,7 @@ pub trait IndexIsPointed: Index {} /// use spacetimedb::{table, PointIndex, ReducerContext, DbContext}; /// /// #[table(accessor = user, -/// index(name = dogs_and_name, hash(columns = [dogs, name])))] +/// index(accessor = dogs_and_name, hash(columns = [dogs, name])))] /// struct User { /// id: u32, /// name: String, @@ -540,7 +540,7 @@ impl PointIndex /// use spacetimedb::{table, ReducerContext, PointIndex}; /// /// #[table(accessor = user, - /// index(name = dogs_and_name, hash(columns = [dogs, name])))] + /// index(accessor = dogs_and_name, hash(columns = [dogs, name])))] /// struct User { /// id: u32, /// name: String, @@ -582,7 +582,7 @@ impl PointIndex /// use spacetimedb::{table, ReducerContext, PointIndex}; /// /// #[table(accessor = user, - /// index(name = dogs_and_name, hash(columns = [dogs, name])))] + /// index(accessor = dogs_and_name, hash(columns = [dogs, name])))] /// struct User { /// id: u32, /// name: String, @@ -725,7 +725,7 @@ pub trait IndexIsRanged: Index {} /// use spacetimedb::{table, RangedIndex, ReducerContext, DbContext}; /// /// #[table(accessor = user, -/// index(name = dogs_and_name, btree(columns = [dogs, name])))] +/// index(accessor = dogs_and_name, btree(columns = [dogs, name])))] /// struct User { /// id: u32, /// name: String, @@ -782,7 +782,7 @@ impl RangedIndex /// use spacetimedb::{table, ReducerContext, RangedIndex}; /// /// #[table(accessor = user, - /// index(name = dogs_and_name, btree(columns = [dogs, name])))] + /// index(accessor = dogs_and_name, btree(columns = [dogs, name])))] /// struct User { /// id: u32, /// name: String, @@ -864,7 +864,7 @@ impl RangedIndex /// use spacetimedb::{table, ReducerContext, RangedIndex}; /// /// #[table(accessor = user, - /// index(name = dogs_and_name, btree(columns = [dogs, name])))] + /// index(accessor = dogs_and_name, btree(columns = [dogs, name])))] /// struct User { /// id: u32, /// name: String, diff --git a/crates/codegen/tests/snapshots/codegen__codegen_typescript.snap.new b/crates/codegen/tests/snapshots/codegen__codegen_typescript.snap.new new file mode 100644 index 00000000000..77917f07eef --- /dev/null +++ b/crates/codegen/tests/snapshots/codegen__codegen_typescript.snap.new @@ -0,0 +1,1278 @@ +--- +source: crates/codegen/tests/codegen.rs +assertion_line: 37 +expression: outfiles +--- +"add_player_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. + +/* eslint-disable */ +/* tslint:disable */ +import { + TypeBuilder as __TypeBuilder, + t as __t, + type AlgebraicTypeType as __AlgebraicTypeType, + type Infer as __Infer, +} from "spacetimedb"; + +export default { + name: __t.string(), +}; +''' +"add_private_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. + +/* eslint-disable */ +/* tslint:disable */ +import { + TypeBuilder as __TypeBuilder, + t as __t, + type AlgebraicTypeType as __AlgebraicTypeType, + type Infer as __Infer, +} from "spacetimedb"; + +export default { + name: __t.string(), +}; +''' +"add_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. + +/* eslint-disable */ +/* tslint:disable */ +import { + TypeBuilder as __TypeBuilder, + t as __t, + type AlgebraicTypeType as __AlgebraicTypeType, + type Infer as __Infer, +} from "spacetimedb"; + +export default { + name: __t.string(), + age: __t.u8(), +}; +''' +"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 YOUR MODULE SOURCE CODE INSTEAD. + +/* eslint-disable */ +/* tslint:disable */ +import { + TypeBuilder as __TypeBuilder, + t as __t, + type AlgebraicTypeType as __AlgebraicTypeType, + type Infer as __Infer, +} from "spacetimedb"; + +export default {}; +''' +"baz_type.ts" = ''' +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +/* eslint-disable */ +/* tslint:disable */ +import { + TypeBuilder as __TypeBuilder, + t as __t, + type AlgebraicTypeType as __AlgebraicTypeType, + type Infer as __Infer, +} from "spacetimedb"; + +export default __t.object("Baz", { + field: __t.string(), +}); + + +''' +"delete_player_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. + +/* eslint-disable */ +/* tslint:disable */ +import { + TypeBuilder as __TypeBuilder, + t as __t, + type AlgebraicTypeType as __AlgebraicTypeType, + type Infer as __Infer, +} from "spacetimedb"; + +export default { + id: __t.u64(), +}; +''' +"delete_players_by_name_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. + +/* eslint-disable */ +/* tslint:disable */ +import { + TypeBuilder as __TypeBuilder, + t as __t, + type AlgebraicTypeType as __AlgebraicTypeType, + type Infer as __Infer, +} from "spacetimedb"; + +export default { + name: __t.string(), +}; +''' +"foobar_type.ts" = ''' +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +/* eslint-disable */ +/* tslint:disable */ +import { + TypeBuilder as __TypeBuilder, + t as __t, + type AlgebraicTypeType as __AlgebraicTypeType, + type Infer as __Infer, +} from "spacetimedb"; +import Baz from "./baz_type"; + + +// The tagged union or sum type for the algebraic type `Foobar`. +const Foobar = __t.enum("Foobar", {get Baz() { + return Baz; + }, + Bar: __t.unit(), + Har: __t.u32(), +}); + +export default Foobar; + + +''' +"get_my_schema_via_http_procedure.ts" = ''' +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +/* eslint-disable */ +/* tslint:disable */ +import { + TypeBuilder as __TypeBuilder, + t as __t, + type AlgebraicTypeType as __AlgebraicTypeType, + type Infer as __Infer, +} from "spacetimedb"; + +export const params = { +}; +export const returnType = __t.string()''' +"has_special_stuff_table.ts" = ''' +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +/* eslint-disable */ +/* tslint:disable */ +import { + TypeBuilder as __TypeBuilder, + t as __t, + type AlgebraicTypeType as __AlgebraicTypeType, + type Infer as __Infer, +} from "spacetimedb"; + +export default __t.row({ + identity: __t.identity(), + connectionId: __t.connectionId().name("connection_id"), +}); +''' +"has_special_stuff_type.ts" = ''' +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +/* eslint-disable */ +/* tslint:disable */ +import { + TypeBuilder as __TypeBuilder, + t as __t, + type AlgebraicTypeType as __AlgebraicTypeType, + type Infer as __Infer, +} from "spacetimedb"; + +export default __t.object("HasSpecialStuff", { + identity: __t.identity(), + connectionId: __t.connectionId(), +}); + + +''' +"index.ts" = ''' +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +VERSION_COMMENT + +/* eslint-disable */ +/* tslint:disable */ +import { + DbConnectionBuilder as __DbConnectionBuilder, + DbConnectionImpl as __DbConnectionImpl, + SubscriptionBuilderImpl as __SubscriptionBuilderImpl, + TypeBuilder as __TypeBuilder, + Uuid as __Uuid, + convertToAccessorMap as __convertToAccessorMap, + makeQueryBuilder as __makeQueryBuilder, + procedureSchema as __procedureSchema, + procedures as __procedures, + reducerSchema as __reducerSchema, + reducers as __reducers, + schema as __schema, + t as __t, + table as __table, + type AlgebraicTypeType as __AlgebraicTypeType, + type DbConnectionConfig as __DbConnectionConfig, + type ErrorContextInterface as __ErrorContextInterface, + type Event as __Event, + type EventContextInterface as __EventContextInterface, + type Infer as __Infer, + type QueryBuilder as __QueryBuilder, + type ReducerEventContextInterface as __ReducerEventContextInterface, + type RemoteModule as __RemoteModule, + type SubscriptionEventContextInterface as __SubscriptionEventContextInterface, + type SubscriptionHandleImpl as __SubscriptionHandleImpl, +} from "spacetimedb"; + +// Import and reexport all reducer arg types +import AddReducer from "./add_reducer"; +export { AddReducer }; +import AddPlayerReducer from "./add_player_reducer"; +export { AddPlayerReducer }; +import AddPrivateReducer from "./add_private_reducer"; +export { AddPrivateReducer }; +import AssertCallerIdentityIsModuleIdentityReducer from "./assert_caller_identity_is_module_identity_reducer"; +export { AssertCallerIdentityIsModuleIdentityReducer }; +import DeletePlayerReducer from "./delete_player_reducer"; +export { DeletePlayerReducer }; +import DeletePlayersByNameReducer from "./delete_players_by_name_reducer"; +export { DeletePlayersByNameReducer }; +import ListOverAgeReducer from "./list_over_age_reducer"; +export { ListOverAgeReducer }; +import LogModuleIdentityReducer from "./log_module_identity_reducer"; +export { LogModuleIdentityReducer }; +import QueryPrivateReducer from "./query_private_reducer"; +export { QueryPrivateReducer }; +import SayHelloReducer from "./say_hello_reducer"; +export { SayHelloReducer }; +import TestReducer from "./test_reducer"; +export { TestReducer }; +import TestBtreeIndexArgsReducer from "./test_btree_index_args_reducer"; +export { TestBtreeIndexArgsReducer }; + +// Import and reexport all procedure arg types +import * as GetMySchemaViaHttpProcedure from "./get_my_schema_via_http_procedure"; +export { GetMySchemaViaHttpProcedure }; +import * as ReturnValueProcedure from "./return_value_procedure"; +export { ReturnValueProcedure }; +import * as SleepOneSecondProcedure from "./sleep_one_second_procedure"; +export { SleepOneSecondProcedure }; +import * as WithTxProcedure from "./with_tx_procedure"; +export { WithTxProcedure }; + +// Import and reexport all table handle types +import HasSpecialStuffRow from "./has_special_stuff_table"; +export { HasSpecialStuffRow }; +import LoggedOutPlayerRow from "./logged_out_player_table"; +export { LoggedOutPlayerRow }; +import MyPlayerRow from "./my_player_table"; +export { MyPlayerRow }; +import PersonRow from "./person_table"; +export { PersonRow }; +import PkMultiIdentityRow from "./pk_multi_identity_table"; +export { PkMultiIdentityRow }; +import PlayerRow from "./player_table"; +export { PlayerRow }; +import PointsRow from "./points_table"; +export { PointsRow }; +import PrivateTableRow from "./private_table_table"; +export { PrivateTableRow }; +import RepeatingTestArgRow from "./repeating_test_arg_table"; +export { RepeatingTestArgRow }; +import TableToRemoveRow from "./table_to_remove_table"; +export { TableToRemoveRow }; +import TestARow from "./test_a_table"; +export { TestARow }; +import TestDRow from "./test_d_table"; +export { TestDRow }; +import TestERow from "./test_e_table"; +export { TestERow }; +import TestFRow from "./test_f_table"; +export { TestFRow }; + +// Import and reexport all types +import Baz from "./baz_type"; +export { Baz }; +import Foobar from "./foobar_type"; +export { Foobar }; +import HasSpecialStuff from "./has_special_stuff_type"; +export { HasSpecialStuff }; +import Person from "./person_type"; +export { Person }; +import PkMultiIdentity from "./pk_multi_identity_type"; +export { PkMultiIdentity }; +import Player from "./player_type"; +export { Player }; +import Point from "./point_type"; +export { Point }; +import PrivateTable from "./private_table_type"; +export { PrivateTable }; +import RemoveTable from "./remove_table_type"; +export { RemoveTable }; +import RepeatingTestArg from "./repeating_test_arg_type"; +export { RepeatingTestArg }; +import TestA from "./test_a_type"; +export { TestA }; +import TestB from "./test_b_type"; +export { TestB }; +import TestD from "./test_d_type"; +export { TestD }; +import TestE from "./test_e_type"; +export { TestE }; +import TestFoobar from "./test_foobar_type"; +export { TestFoobar }; +import NamespaceTestC from "./namespace_test_c_type"; +export { NamespaceTestC }; +import NamespaceTestF from "./namespace_test_f_type"; +export { NamespaceTestF }; + +/** The schema information for all tables in this module. This is defined the same was as the tables would have been defined in the server. */ +const tablesSchema = __schema( + __table({ + name: 'has_special_stuff', + indexes: [ + ], + constraints: [ + ], + }, HasSpecialStuffRow), + __table({ + name: 'logged_out_player', + indexes: [ + { name: 'logged_out_player_identity_idx_btree', algorithm: 'btree', columns: [ + 'identity', + ] }, + { name: 'logged_out_player_name_idx_btree', algorithm: 'btree', columns: [ + 'name', + ] }, + { name: 'logged_out_player_player_id_idx_btree', algorithm: 'btree', columns: [ + 'playerId', + ] }, + ], + constraints: [ + { name: 'logged_out_player_identity_key', constraint: 'unique', columns: ['identity'] }, + { name: 'logged_out_player_name_key', constraint: 'unique', columns: ['name'] }, + { name: 'logged_out_player_player_id_key', constraint: 'unique', columns: ['playerId'] }, + ], + }, LoggedOutPlayerRow), + __table({ + name: 'person', + indexes: [ + { name: 'person_age_idx_btree', algorithm: 'btree', columns: [ + 'age', + ] }, + { name: 'person_id_idx_btree', algorithm: 'btree', columns: [ + 'id', + ] }, + ], + constraints: [ + { name: 'person_id_key', constraint: 'unique', columns: ['id'] }, + ], + }, PersonRow), + __table({ + name: 'pk_multi_identity', + indexes: [ + { name: 'pk_multi_identity_id_idx_btree', algorithm: 'btree', columns: [ + 'id', + ] }, + { name: 'pk_multi_identity_other_idx_btree', algorithm: 'btree', columns: [ + 'other', + ] }, + ], + constraints: [ + { name: 'pk_multi_identity_id_key', constraint: 'unique', columns: ['id'] }, + { name: 'pk_multi_identity_other_key', constraint: 'unique', columns: ['other'] }, + ], + }, PkMultiIdentityRow), + __table({ + name: 'player', + indexes: [ + { name: 'player_identity_idx_btree', algorithm: 'btree', columns: [ + 'identity', + ] }, + { name: 'player_name_idx_btree', algorithm: 'btree', columns: [ + 'name', + ] }, + { name: 'player_player_id_idx_btree', algorithm: 'btree', columns: [ + 'playerId', + ] }, + ], + constraints: [ + { name: 'player_identity_key', constraint: 'unique', columns: ['identity'] }, + { name: 'player_name_key', constraint: 'unique', columns: ['name'] }, + { name: 'player_player_id_key', constraint: 'unique', columns: ['playerId'] }, + ], + }, PlayerRow), + __table({ + name: 'points', + indexes: [ + { name: 'points_x_y_idx_btree', algorithm: 'btree', columns: [ + 'x', + 'y', + ] }, + ], + constraints: [ + ], + }, PointsRow), + __table({ + name: 'private_table', + indexes: [ + ], + constraints: [ + ], + }, PrivateTableRow), + __table({ + name: 'repeating_test_arg', + indexes: [ + { name: 'repeating_test_arg_scheduled_id_idx_btree', algorithm: 'btree', columns: [ + 'scheduledId', + ] }, + ], + constraints: [ + { name: 'repeating_test_arg_scheduled_id_key', constraint: 'unique', columns: ['scheduledId'] }, + ], + }, RepeatingTestArgRow), + __table({ + name: 'table_to_remove', + indexes: [ + ], + constraints: [ + ], + }, TableToRemoveRow), + __table({ + name: 'test_a', + indexes: [ + { name: 'test_a_x_idx_btree', algorithm: 'btree', columns: [ + 'x', + ] }, + ], + constraints: [ + ], + }, TestARow), + __table({ + name: 'test_d', + indexes: [ + ], + constraints: [ + ], + }, TestDRow), + __table({ + name: 'test_e', + indexes: [ + { name: 'test_e_id_idx_btree', algorithm: 'btree', columns: [ + 'id', + ] }, + { name: 'test_e_name_idx_btree', algorithm: 'btree', columns: [ + 'name', + ] }, + ], + constraints: [ + { name: 'test_e_id_key', constraint: 'unique', columns: ['id'] }, + ], + }, TestERow), + __table({ + name: 'test_f', + indexes: [ + ], + constraints: [ + ], + }, TestFRow), + __table({ + name: 'my_player', + indexes: [ + ], + constraints: [ + ], + }, MyPlayerRow), +); + +/** The schema information for all reducers in this module. This is defined the same way as the reducers would have been defined in the server, except the body of the reducer is omitted in code generation. */ +const reducersSchema = __reducers( + __reducerSchema("add", AddReducer), + __reducerSchema("add_player", AddPlayerReducer), + __reducerSchema("add_private", AddPrivateReducer), + __reducerSchema("assert_caller_identity_is_module_identity", AssertCallerIdentityIsModuleIdentityReducer), + __reducerSchema("delete_player", DeletePlayerReducer), + __reducerSchema("delete_players_by_name", DeletePlayersByNameReducer), + __reducerSchema("list_over_age", ListOverAgeReducer), + __reducerSchema("log_module_identity", LogModuleIdentityReducer), + __reducerSchema("query_private", QueryPrivateReducer), + __reducerSchema("say_hello", SayHelloReducer), + __reducerSchema("test", TestReducer), + __reducerSchema("test_btree_index_args", TestBtreeIndexArgsReducer), +); + +/** The schema information for all procedures in this module. This is defined the same way as the procedures would have been defined in the server. */ +const proceduresSchema = __procedures( + __procedureSchema("get_my_schema_via_http", GetMySchemaViaHttpProcedure.params, GetMySchemaViaHttpProcedure.returnType), + __procedureSchema("return_value", ReturnValueProcedure.params, ReturnValueProcedure.returnType), + __procedureSchema("sleep_one_second", SleepOneSecondProcedure.params, SleepOneSecondProcedure.returnType), + __procedureSchema("with_tx", WithTxProcedure.params, WithTxProcedure.returnType), +); + +/** The remote SpacetimeDB module schema, both runtime and type information. */ +const REMOTE_MODULE = { + versionInfo: { + cliVersion: "1.12.0" as const, + }, + tables: tablesSchema.schemaType.tables, + reducers: reducersSchema.reducersType.reducers, + ...proceduresSchema, +} satisfies __RemoteModule< + typeof tablesSchema.schemaType, + typeof reducersSchema.reducersType, + typeof proceduresSchema +>; + +/** The tables available in this remote SpacetimeDB module. */ +export const tables = __convertToAccessorMap(tablesSchema.schemaType.tables); + +/** A typed query builder for this remote SpacetimeDB module. */ +export const query: __QueryBuilder = __makeQueryBuilder(tablesSchema.schemaType); + +/** The reducers available in this remote SpacetimeDB module. */ +export const reducers = __convertToAccessorMap(reducersSchema.reducersType.reducers); + +/** The context type returned in callbacks for all possible events. */ +export type EventContext = __EventContextInterface; +/** The context type returned in callbacks for reducer events. */ +export type ReducerEventContext = __ReducerEventContextInterface; +/** The context type returned in callbacks for subscription events. */ +export type SubscriptionEventContext = __SubscriptionEventContextInterface; +/** The context type returned in callbacks for error events. */ +export type ErrorContext = __ErrorContextInterface; +/** The subscription handle type to manage active subscriptions created from a {@link SubscriptionBuilder}. */ +export type SubscriptionHandle = __SubscriptionHandleImpl; + +/** Builder class to configure a new subscription to the remote SpacetimeDB instance. */ +export class SubscriptionBuilder extends __SubscriptionBuilderImpl {} + +/** Builder class to configure a new database connection to the remote SpacetimeDB instance. */ +export class DbConnectionBuilder extends __DbConnectionBuilder {} + +/** The typed database connection to manage connections to the remote SpacetimeDB instance. This class has type information specific to the generated module. */ +export class DbConnection extends __DbConnectionImpl { + /** Creates a new {@link DbConnectionBuilder} to configure and connect to the remote SpacetimeDB instance. */ + static builder = (): DbConnectionBuilder => { + return new DbConnectionBuilder(REMOTE_MODULE, (config: __DbConnectionConfig) => new DbConnection(config)); + }; + + /** Creates a new {@link SubscriptionBuilder} to configure a subscription to the remote SpacetimeDB instance. */ + override subscriptionBuilder = (): SubscriptionBuilder => { + return new SubscriptionBuilder(this); + }; +} + +''' +"list_over_age_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. + +/* eslint-disable */ +/* tslint:disable */ +import { + TypeBuilder as __TypeBuilder, + t as __t, + type AlgebraicTypeType as __AlgebraicTypeType, + type Infer as __Infer, +} from "spacetimedb"; + +export default { + age: __t.u8(), +}; +''' +"log_module_identity_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. + +/* eslint-disable */ +/* tslint:disable */ +import { + TypeBuilder as __TypeBuilder, + t as __t, + type AlgebraicTypeType as __AlgebraicTypeType, + type Infer as __Infer, +} from "spacetimedb"; + +export default {}; +''' +"logged_out_player_table.ts" = ''' +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +/* eslint-disable */ +/* tslint:disable */ +import { + TypeBuilder as __TypeBuilder, + t as __t, + type AlgebraicTypeType as __AlgebraicTypeType, + type Infer as __Infer, +} from "spacetimedb"; + +export default __t.row({ + identity: __t.identity().primaryKey(), + playerId: __t.u64().name("player_id"), + name: __t.string(), +}); +''' +"my_player_table.ts" = ''' +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +/* eslint-disable */ +/* tslint:disable */ +import { + TypeBuilder as __TypeBuilder, + t as __t, + type AlgebraicTypeType as __AlgebraicTypeType, + type Infer as __Infer, +} from "spacetimedb"; + +export default __t.row({ + identity: __t.identity(), + playerId: __t.u64().name("player_id"), + name: __t.string(), +}); +''' +"namespace_test_c_type.ts" = ''' +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +/* eslint-disable */ +/* tslint:disable */ +import { + TypeBuilder as __TypeBuilder, + t as __t, + type AlgebraicTypeType as __AlgebraicTypeType, + type Infer as __Infer, +} from "spacetimedb"; + +// The tagged union or sum type for the algebraic type `NamespaceTestC`. +const NamespaceTestC = __t.enum("NamespaceTestC", {Foo: __t.unit(), + Bar: __t.unit(), +}); + +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 YOUR MODULE SOURCE CODE INSTEAD. + +/* eslint-disable */ +/* tslint:disable */ +import { + TypeBuilder as __TypeBuilder, + t as __t, + type AlgebraicTypeType as __AlgebraicTypeType, + type Infer as __Infer, +} from "spacetimedb"; + +// The tagged union or sum type for the algebraic type `NamespaceTestF`. +const NamespaceTestF = __t.enum("NamespaceTestF", {Foo: __t.unit(), + Bar: __t.unit(), + Baz: __t.string(), +}); + +export default NamespaceTestF; + + +''' +"person_table.ts" = ''' +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +/* eslint-disable */ +/* tslint:disable */ +import { + TypeBuilder as __TypeBuilder, + t as __t, + type AlgebraicTypeType as __AlgebraicTypeType, + type Infer as __Infer, +} from "spacetimedb"; + +export default __t.row({ + id: __t.u32().primaryKey(), + name: __t.string(), + age: __t.u8(), +}); +''' +"person_type.ts" = ''' +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +/* eslint-disable */ +/* tslint:disable */ +import { + TypeBuilder as __TypeBuilder, + t as __t, + type AlgebraicTypeType as __AlgebraicTypeType, + type Infer as __Infer, +} from "spacetimedb"; + +export default __t.object("Person", { + id: __t.u32(), + name: __t.string(), + age: __t.u8(), +}); + + +''' +"pk_multi_identity_table.ts" = ''' +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +/* eslint-disable */ +/* tslint:disable */ +import { + TypeBuilder as __TypeBuilder, + t as __t, + type AlgebraicTypeType as __AlgebraicTypeType, + type Infer as __Infer, +} from "spacetimedb"; + +export default __t.row({ + id: __t.u32().primaryKey(), + other: __t.u32(), +}); +''' +"pk_multi_identity_type.ts" = ''' +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +/* eslint-disable */ +/* tslint:disable */ +import { + TypeBuilder as __TypeBuilder, + t as __t, + type AlgebraicTypeType as __AlgebraicTypeType, + type Infer as __Infer, +} from "spacetimedb"; + +export default __t.object("PkMultiIdentity", { + id: __t.u32(), + other: __t.u32(), +}); + + +''' +"player_table.ts" = ''' +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +/* eslint-disable */ +/* tslint:disable */ +import { + TypeBuilder as __TypeBuilder, + t as __t, + type AlgebraicTypeType as __AlgebraicTypeType, + type Infer as __Infer, +} from "spacetimedb"; + +export default __t.row({ + identity: __t.identity().primaryKey(), + playerId: __t.u64().name("player_id"), + name: __t.string(), +}); +''' +"player_type.ts" = ''' +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +/* eslint-disable */ +/* tslint:disable */ +import { + TypeBuilder as __TypeBuilder, + t as __t, + type AlgebraicTypeType as __AlgebraicTypeType, + type Infer as __Infer, +} from "spacetimedb"; + +export default __t.object("Player", { + identity: __t.identity(), + playerId: __t.u64(), + name: __t.string(), +}); + + +''' +"point_type.ts" = ''' +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +/* eslint-disable */ +/* tslint:disable */ +import { + TypeBuilder as __TypeBuilder, + t as __t, + type AlgebraicTypeType as __AlgebraicTypeType, + type Infer as __Infer, +} from "spacetimedb"; + +export default __t.object("Point", { + x: __t.i64(), + y: __t.i64(), +}); + + +''' +"points_table.ts" = ''' +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +/* eslint-disable */ +/* tslint:disable */ +import { + TypeBuilder as __TypeBuilder, + t as __t, + type AlgebraicTypeType as __AlgebraicTypeType, + type Infer as __Infer, +} from "spacetimedb"; + +export default __t.row({ + x: __t.i64(), + y: __t.i64(), +}); +''' +"private_table_table.ts" = ''' +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +/* eslint-disable */ +/* tslint:disable */ +import { + TypeBuilder as __TypeBuilder, + t as __t, + type AlgebraicTypeType as __AlgebraicTypeType, + type Infer as __Infer, +} from "spacetimedb"; + +export default __t.row({ + name: __t.string(), +}); +''' +"private_table_type.ts" = ''' +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +/* eslint-disable */ +/* tslint:disable */ +import { + TypeBuilder as __TypeBuilder, + t as __t, + type AlgebraicTypeType as __AlgebraicTypeType, + type Infer as __Infer, +} from "spacetimedb"; + +export default __t.object("PrivateTable", { + name: __t.string(), +}); + + +''' +"query_private_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. + +/* eslint-disable */ +/* tslint:disable */ +import { + TypeBuilder as __TypeBuilder, + t as __t, + type AlgebraicTypeType as __AlgebraicTypeType, + type Infer as __Infer, +} from "spacetimedb"; + +export default {}; +''' +"remove_table_type.ts" = ''' +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +/* eslint-disable */ +/* tslint:disable */ +import { + TypeBuilder as __TypeBuilder, + t as __t, + type AlgebraicTypeType as __AlgebraicTypeType, + type Infer as __Infer, +} from "spacetimedb"; + +export default __t.object("RemoveTable", { + id: __t.u32(), +}); + + +''' +"repeating_test_arg_table.ts" = ''' +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +/* eslint-disable */ +/* tslint:disable */ +import { + TypeBuilder as __TypeBuilder, + t as __t, + type AlgebraicTypeType as __AlgebraicTypeType, + type Infer as __Infer, +} from "spacetimedb"; + +export default __t.row({ + scheduledId: __t.u64().primaryKey().name("scheduled_id"), + scheduledAt: __t.scheduleAt().name("scheduled_at"), + prevTime: __t.timestamp().name("prev_time"), +}); +''' +"repeating_test_arg_type.ts" = ''' +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +/* eslint-disable */ +/* tslint:disable */ +import { + TypeBuilder as __TypeBuilder, + t as __t, + type AlgebraicTypeType as __AlgebraicTypeType, + type Infer as __Infer, +} from "spacetimedb"; + +export default __t.object("RepeatingTestArg", { + scheduledId: __t.u64(), + scheduledAt: __t.scheduleAt(), + prevTime: __t.timestamp(), +}); + + +''' +"return_value_procedure.ts" = ''' +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +/* eslint-disable */ +/* tslint:disable */ +import { + TypeBuilder as __TypeBuilder, + t as __t, + type AlgebraicTypeType as __AlgebraicTypeType, + type Infer as __Infer, +} from "spacetimedb"; + +import Baz from "./baz_type"; + +export const params = { + foo: __t.u64(), +}; +export const returnType = Baz''' +"say_hello_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. + +/* eslint-disable */ +/* tslint:disable */ +import { + TypeBuilder as __TypeBuilder, + t as __t, + type AlgebraicTypeType as __AlgebraicTypeType, + type Infer as __Infer, +} from "spacetimedb"; + +export default {}; +''' +"sleep_one_second_procedure.ts" = ''' +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +/* eslint-disable */ +/* tslint:disable */ +import { + TypeBuilder as __TypeBuilder, + t as __t, + type AlgebraicTypeType as __AlgebraicTypeType, + type Infer as __Infer, +} from "spacetimedb"; + +export const params = { +}; +export const returnType = __t.unit()''' +"table_to_remove_table.ts" = ''' +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +/* eslint-disable */ +/* tslint:disable */ +import { + TypeBuilder as __TypeBuilder, + t as __t, + type AlgebraicTypeType as __AlgebraicTypeType, + type Infer as __Infer, +} from "spacetimedb"; + +export default __t.row({ + id: __t.u32(), +}); +''' +"test_a_table.ts" = ''' +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +/* eslint-disable */ +/* tslint:disable */ +import { + TypeBuilder as __TypeBuilder, + t as __t, + type AlgebraicTypeType as __AlgebraicTypeType, + type Infer as __Infer, +} from "spacetimedb"; + +export default __t.row({ + x: __t.u32(), + y: __t.u32(), + z: __t.string(), +}); +''' +"test_a_type.ts" = ''' +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +/* eslint-disable */ +/* tslint:disable */ +import { + TypeBuilder as __TypeBuilder, + t as __t, + type AlgebraicTypeType as __AlgebraicTypeType, + type Infer as __Infer, +} from "spacetimedb"; + +export default __t.object("TestA", { + x: __t.u32(), + y: __t.u32(), + z: __t.string(), +}); + + +''' +"test_b_type.ts" = ''' +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +/* eslint-disable */ +/* tslint:disable */ +import { + TypeBuilder as __TypeBuilder, + t as __t, + type AlgebraicTypeType as __AlgebraicTypeType, + type Infer as __Infer, +} from "spacetimedb"; + +export default __t.object("TestB", { + foo: __t.string(), +}); + + +''' +"test_btree_index_args_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. + +/* eslint-disable */ +/* tslint:disable */ +import { + TypeBuilder as __TypeBuilder, + t as __t, + type AlgebraicTypeType as __AlgebraicTypeType, + type Infer as __Infer, +} from "spacetimedb"; + +export default {}; +''' +"test_d_table.ts" = ''' +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +/* eslint-disable */ +/* tslint:disable */ +import { + TypeBuilder as __TypeBuilder, + t as __t, + type AlgebraicTypeType as __AlgebraicTypeType, + type Infer as __Infer, +} from "spacetimedb"; +import NamespaceTestC from "./namespace_test_c_type"; + + +export default __t.row({ + get testC() { + return __t.option(NamespaceTestC).name("test_c"); + }, +}); +''' +"test_d_type.ts" = ''' +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +/* eslint-disable */ +/* tslint:disable */ +import { + TypeBuilder as __TypeBuilder, + t as __t, + type AlgebraicTypeType as __AlgebraicTypeType, + type Infer as __Infer, +} from "spacetimedb"; +import NamespaceTestC from "./namespace_test_c_type"; + + +export default __t.object("TestD", { + get testC() { + return __t.option(NamespaceTestC); + }, +}); + + +''' +"test_e_table.ts" = ''' +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +/* eslint-disable */ +/* tslint:disable */ +import { + TypeBuilder as __TypeBuilder, + t as __t, + type AlgebraicTypeType as __AlgebraicTypeType, + type Infer as __Infer, +} from "spacetimedb"; + +export default __t.row({ + id: __t.u64().primaryKey(), + name: __t.string(), +}); +''' +"test_e_type.ts" = ''' +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +/* eslint-disable */ +/* tslint:disable */ +import { + TypeBuilder as __TypeBuilder, + t as __t, + type AlgebraicTypeType as __AlgebraicTypeType, + type Infer as __Infer, +} from "spacetimedb"; + +export default __t.object("TestE", { + id: __t.u64(), + name: __t.string(), +}); + + +''' +"test_f_table.ts" = ''' +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +/* eslint-disable */ +/* tslint:disable */ +import { + TypeBuilder as __TypeBuilder, + t as __t, + type AlgebraicTypeType as __AlgebraicTypeType, + type Infer as __Infer, +} from "spacetimedb"; +import Foobar from "./foobar_type"; + + +export default __t.row({ + get field() { + return Foobar; + }, +}); +''' +"test_foobar_type.ts" = ''' +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +/* eslint-disable */ +/* tslint:disable */ +import { + TypeBuilder as __TypeBuilder, + t as __t, + type AlgebraicTypeType as __AlgebraicTypeType, + type Infer as __Infer, +} from "spacetimedb"; +import Foobar from "./foobar_type"; + + +export default __t.object("TestFoobar", { + get field() { + return Foobar; + }, +}); + + +''' +"test_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. + +/* eslint-disable */ +/* tslint:disable */ +import { + TypeBuilder as __TypeBuilder, + t as __t, + type AlgebraicTypeType as __AlgebraicTypeType, + type Infer as __Infer, +} from "spacetimedb"; + +import TestA from "./test_a_type"; +import TestB from "./test_b_type"; +import NamespaceTestC from "./namespace_test_c_type"; +import NamespaceTestF from "./namespace_test_f_type"; + +export default { + get arg() { + return TestA; + }, + get arg2() { + return TestB; + }, + get arg3() { + return NamespaceTestC; + }, + get arg4() { + return NamespaceTestF; + }, +}; +''' +"with_tx_procedure.ts" = ''' +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +/* eslint-disable */ +/* tslint:disable */ +import { + TypeBuilder as __TypeBuilder, + t as __t, + type AlgebraicTypeType as __AlgebraicTypeType, + type Infer as __Infer, +} from "spacetimedb"; + +export const params = { +}; +export const returnType = __t.unit()''' diff --git a/crates/smoketests/modules/restart-person/src/lib.rs b/crates/smoketests/modules/restart-person/src/lib.rs index 5d6859f8dd5..b3a1215d4d4 100644 --- a/crates/smoketests/modules/restart-person/src/lib.rs +++ b/crates/smoketests/modules/restart-person/src/lib.rs @@ -1,6 +1,6 @@ use spacetimedb::{log, ReducerContext, Table}; -#[spacetimedb::table(accessor = person, index(name = name_idx, btree(columns = [name])))] +#[spacetimedb::table(accessor = person, index(accessor = name_idx, btree(columns = [name])))] pub struct Person { #[primary_key] #[auto_inc] diff --git a/crates/smoketests/modules/views-sql/src/lib.rs b/crates/smoketests/modules/views-sql/src/lib.rs index 705ae349a58..0d12b8ad7a5 100644 --- a/crates/smoketests/modules/views-sql/src/lib.rs +++ b/crates/smoketests/modules/views-sql/src/lib.rs @@ -11,7 +11,7 @@ pub struct PlayerState { } #[derive(Clone)] -#[spacetimedb::table(accessor = player_info, index(name=age_level_index, btree(columns = [age, level])))] +#[spacetimedb::table(accessor = player_info, index(accessor=age_level_index, btree(columns = [age, level])))] pub struct PlayerInfo { #[primary_key] id: u64, diff --git a/modules/module-test/src/lib.rs b/modules/module-test/src/lib.rs index be69a2898a5..f42834c6ccf 100644 --- a/modules/module-test/src/lib.rs +++ b/modules/module-test/src/lib.rs @@ -15,7 +15,7 @@ pub type TestAlias = TestA; // ───────────────────────────────────────────────────────────────────────────── #[cfg(feature = "test-add-column")] -#[spacetimedb::table(accessor = person, public, index(name = age, btree(columns = [age])))] +#[spacetimedb::table(accessor = person, public, index(accessor = age, btree(columns = [age])))] pub struct Person { #[primary_key] #[auto_inc] @@ -27,7 +27,7 @@ pub struct Person { } #[cfg(not(feature = "test-add-column"))] -#[spacetimedb::table(accessor = person, public, index(name = age, btree(columns = [age])))] +#[spacetimedb::table(accessor = person, public, index(accessor = age, btree(columns = [age])))] pub struct Person { #[primary_key] #[auto_inc] @@ -42,7 +42,7 @@ pub struct RemoveTable { pub id: u32, } -#[spacetimedb::table(accessor = test_a, index(name = foo, btree(columns = [x])))] +#[spacetimedb::table(accessor = test_a, index(accessor = foo, btree(columns = [x])))] pub struct TestA { pub x: u32, pub y: u32, @@ -128,7 +128,7 @@ pub struct PrivateTable { name: String, } -#[spacetimedb::table(accessor = points, private, index(name = multi_column_index, btree(columns = [x, y])))] +#[spacetimedb::table(accessor = points, private, index(accessor = multi_column_index, btree(columns = [x, y])))] pub struct Point { x: i64, y: i64, diff --git a/modules/perf-test/src/lib.rs b/modules/perf-test/src/lib.rs index bff54a8cfe4..b610238589c 100644 --- a/modules/perf-test/src/lib.rs +++ b/modules/perf-test/src/lib.rs @@ -1,6 +1,6 @@ use spacetimedb::{log_stopwatch::LogStopwatch, ReducerContext, Table}; -#[spacetimedb::table(accessor = location, index(name = coordinates, btree(columns = [x, z, dimension])))] +#[spacetimedb::table(accessor = location, index(accessor = coordinates, btree(columns = [x, z, dimension])))] #[derive(Debug, PartialEq, Eq)] pub struct Location { #[primary_key] diff --git a/modules/sdk-test/src/lib.rs b/modules/sdk-test/src/lib.rs index 79f21ba54a8..c14c451aadc 100644 --- a/modules/sdk-test/src/lib.rs +++ b/modules/sdk-test/src/lib.rs @@ -812,7 +812,7 @@ struct IndexedTable { player_id: u32, } -#[spacetimedb::table(accessor = indexed_table_2, index(name=player_id_snazz_index, btree(columns = [player_id, player_snazz])))] +#[spacetimedb::table(accessor = indexed_table_2, index(accessor=player_id_snazz_index, btree(columns = [player_id, player_snazz])))] struct IndexedTable2 { player_id: u32, player_snazz: f32, From 99897ab31a0e02c6ed3ad60143edf3a40e2c4f7b Mon Sep 17 00:00:00 2001 From: Shubham Mishra Date: Wed, 11 Feb 2026 21:42:33 +0530 Subject: [PATCH 006/133] llm docs update --- crates/bindings/README.md | 26 +++++++++---------- .../00300-tutorials/00100-chat-app.md | 8 +++--- .../00100-databases/00500-cheat-sheet.md | 6 ++--- .../00300-reducers/00400-reducer-context.md | 6 ++--- .../00200-functions/00400-procedures.md | 2 +- docs/llms/docs-benchmark-analysis.md | 8 +++--- docs/static/llms.md | 24 ++++++++--------- 7 files changed, 40 insertions(+), 40 deletions(-) diff --git a/crates/bindings/README.md b/crates/bindings/README.md index 6374d9f79e9..b930e946cb7 100644 --- a/crates/bindings/README.md +++ b/crates/bindings/README.md @@ -60,7 +60,7 @@ Declaring tables and reducers is straightforward: # #[cfg(target_arch = "wasm32")] mod demo { use spacetimedb::{table, reducer, ReducerContext, Table}; -#[table(name = player)] +#[table(accessor = player)] pub struct Player { id: u32, name: String @@ -225,7 +225,7 @@ However: ## Tables -Tables are declared using the [`#[table(name = table_name)]` macro](macro@crate::table). +Tables are declared using the [`#[table(accessor = table_name)]` macro](macro@crate::table). This macro is applied to a Rust struct with named fields. All of the fields of the table must implement [`SpacetimeType`]. @@ -236,7 +236,7 @@ The resulting type is used to store rows of the table. It is normal struct type. use spacetimedb::{table, reducer, ReducerContext, Table, UniqueColumn}; /// A `Person` is a row of the table `person`. -#[table(name = person, public)] +#[table(accessor = person, public)] pub struct Person { #[primary_key] #[auto_inc] @@ -312,20 +312,20 @@ Tables' [constraints](#unique-and-primary-key-columns) and [indexes](#indexes) g By default, tables are considered **private**. This means that they are only readable by the database owner and by reducers. Reducers run inside the database, so clients cannot see private tables at all. -Using the [`#[table(name = table_name, public)]`](macro@crate::table) flag makes a table public. **Public** tables are readable by all clients. They can still only be modified by reducers. +Using the [`#[table(accessor = table_name, public)]`](macro@crate::table) flag makes a table public. **Public** tables are readable by all clients. They can still only be modified by reducers. ```no_run # #[cfg(target_arch = "wasm32")] mod demo { use spacetimedb::table; // The `enemies` table can be read by all connected clients. -#[table(name = enemy, public)] +#[table(accessor = enemy, public)] pub struct Enemy { /* ... */ } // The `loot_items` table is invisible to clients, but not to reducers. -#[table(name = loot_item)] +#[table(accessor = loot_item)] pub struct LootItem { /* ... */ } @@ -347,7 +347,7 @@ use spacetimedb::table; type SSN = String; type Email = String; -#[table(name = citizen)] +#[table(accessor = citizen)] pub struct Citizen { #[primary_key] id: u64, @@ -402,7 +402,7 @@ When inserting into a table with an `#[auto_inc]` column, if the annotated colum # #[cfg(target_arch = "wasm32")] mod demo { use spacetimedb::{table, reducer, ReducerContext, Table}; -#[table(name = example)] +#[table(accessor = example)] struct Example { #[auto_inc] field: u32 @@ -433,7 +433,7 @@ When you republish a module with a new column that has a default value, existing # #[cfg(target_arch = "wasm32")] mod demo { use spacetimedb::table; -#[table(name = player)] +#[table(accessor = player)] struct Player { id: u64, name: String, @@ -464,7 +464,7 @@ For example: # #[cfg(target_arch = "wasm32")] mod demo { use spacetimedb::table; -#[table(name = paper, index(name = url_and_country, btree(columns = [url, country])))] +#[table(accessor = paper, index(name = url_and_country, btree(columns = [url, country])))] struct Paper { url: String, country: String, @@ -488,7 +488,7 @@ For example: # #[cfg(target_arch = "wasm32")] mod demo { use spacetimedb::table; -#[table(name = paper)] +#[table(accessor = paper)] struct Paper { url: String, country: String, @@ -579,7 +579,7 @@ Views can return either `Option` or `Vec` where `T` can be a table type or use spacetimedb::{table, view, ViewContext, AnonymousViewContext, SpacetimeType}; use spacetimedb_lib::Identity; -#[table(name = player)] +#[table(accessor = player)] struct Player { #[primary_key] #[auto_inc] @@ -589,7 +589,7 @@ struct Player { name: String, } -#[table(name = player_level)] +#[table(accessor = player_level)] struct PlayerLevel { #[unique] player_id: u64, diff --git a/docs/docs/00100-intro/00300-tutorials/00100-chat-app.md b/docs/docs/00100-intro/00300-tutorials/00100-chat-app.md index 06ef0c039ce..8d7f6465947 100644 --- a/docs/docs/00100-intro/00300-tutorials/00100-chat-app.md +++ b/docs/docs/00100-intro/00300-tutorials/00100-chat-app.md @@ -37,8 +37,8 @@ SpacetimeDB runs your module inside the database host (not Node.js). There's no -- Each table is defined as a Rust struct annotated with `#[table(name = table_name)]`. An instance of the struct represents a row, and each field represents a column. -- By default, tables are **private**. The `#[table(name = table_name, public)]` macro makes a table public. **Public** tables are readable by all users but can still only be modified by your server module code. +- Each table is defined as a Rust struct annotated with `#[table(accessor = table_name)]`. An instance of the struct represents a row, and each field represents a column. +- By default, tables are **private**. The `#[table(accessor = table_name, public)]` macro makes a table public. **Public** tables are readable by all users but can still only be modified by your server module code. - A reducer is a function that traverses and updates the database. Each reducer call runs in its own transaction, and its updates to the database are only committed if the reducer returns successfully. Reducers may return a `Result<()>`, with an `Err` return aborting the transaction. @@ -266,7 +266,7 @@ public partial class Message Add to `spacetimedb/src/lib.rs`: ```rust server -#[table(name = user, public)] +#[table(accessor = user, public)] pub struct User { #[primary_key] identity: Identity, @@ -274,7 +274,7 @@ pub struct User { online: bool, } -#[table(name = message, public)] +#[table(accessor = message, public)] pub struct Message { sender: Identity, sent: Timestamp, diff --git a/docs/docs/00200-core-concepts/00100-databases/00500-cheat-sheet.md b/docs/docs/00200-core-concepts/00100-databases/00500-cheat-sheet.md index 899beb8e17a..de580ceead2 100644 --- a/docs/docs/00200-core-concepts/00100-databases/00500-cheat-sheet.md +++ b/docs/docs/00200-core-concepts/00100-databases/00500-cheat-sheet.md @@ -138,7 +138,7 @@ public enum Status use spacetimedb::{table, SpacetimeType}; // Basic table -#[table(name = player, public)] +#[table(accessor = player, public)] pub struct Player { #[primary_key] #[auto_inc] @@ -150,7 +150,7 @@ pub struct Player { } // Multi-column index -#[table(name = score, index(name = idx, btree(columns = [player_id, level])))] +#[table(accessor = score, index(name = idx, btree(columns = [player_id, level])))] pub struct Score { player_id: u64, level: u32, @@ -427,7 +427,7 @@ public static void SendReminder(ReducerContext ctx, Reminder reminder) ```rust -#[table(name = reminder, scheduled(send_reminder))] +#[table(accessor = reminder, scheduled(send_reminder))] pub struct Reminder { #[primary_key] #[auto_inc] diff --git a/docs/docs/00200-core-concepts/00200-functions/00300-reducers/00400-reducer-context.md b/docs/docs/00200-core-concepts/00200-functions/00300-reducers/00400-reducer-context.md index 98dc5f91468..f3311d5e4a5 100644 --- a/docs/docs/00200-core-concepts/00200-functions/00300-reducers/00400-reducer-context.md +++ b/docs/docs/00200-core-concepts/00200-functions/00300-reducers/00400-reducer-context.md @@ -67,7 +67,7 @@ public static partial class Module ```rust use spacetimedb::{table, reducer, ReducerContext}; -#[table(name = user)] +#[table(accessor = user)] pub struct User { #[primary_key] #[auto_inc] @@ -184,7 +184,7 @@ public static partial class Module ```rust use spacetimedb::{table, reducer, ReducerContext, Identity}; -#[table(name = player)] +#[table(accessor = player)] pub struct Player { #[primary_key] identity: Identity, @@ -328,7 +328,7 @@ public static partial class Module ```rust use spacetimedb::{table, reducer, ReducerContext, ScheduleAt}; -#[table(name = scheduled_task, scheduled(send_reminder))] +#[table(accessor = scheduled_task, scheduled(send_reminder))] pub struct ScheduledTask { #[primary_key] #[auto_inc] diff --git a/docs/docs/00200-core-concepts/00200-functions/00400-procedures.md b/docs/docs/00200-core-concepts/00200-functions/00400-procedures.md index c31276de352..2609b16237c 100644 --- a/docs/docs/00200-core-concepts/00200-functions/00400-procedures.md +++ b/docs/docs/00200-core-concepts/00200-functions/00400-procedures.md @@ -1337,7 +1337,7 @@ public static partial class Module ```rust use spacetimedb::{table, procedure, ProcedureContext, Identity, Timestamp}; -#[table(name = ai_message, public)] +#[table(accessor = ai_message, public)] pub struct AiMessage { user: Identity, prompt: String, diff --git a/docs/llms/docs-benchmark-analysis.md b/docs/llms/docs-benchmark-analysis.md index faa301f26fc..da3333640c5 100644 --- a/docs/llms/docs-benchmark-analysis.md +++ b/docs/llms/docs-benchmark-analysis.md @@ -19,7 +19,7 @@ Generated from: `/__w/SpacetimeDB/SpacetimeDB/tools/xtask-llm-benchmark/../../do ```rust use spacetimedb::{table, reducer, ReducerContext, Table, ScheduleAt}; - #[table(name = tick_timer, schedule(reducer = tick, column = scheduled_at))] + #[table(accessor = tick_timer, schedule(reducer = tick, column = scheduled_at))] pub struct TickTimer { #[primary_key] #[auto_inc] @@ -47,7 +47,7 @@ Generated from: `/__w/SpacetimeDB/SpacetimeDB/tools/xtask-llm-benchmark/../../do use spacetimedb::{reducer, table, ReducerContext, ScheduleAt, Table}; use std::time::Duration; - #[table(name = tick_timer, scheduled(tick))] + #[table(accessor = tick_timer, scheduled(tick))] pub struct TickTimer { #[primary_key] #[auto_inc] @@ -96,7 +96,7 @@ Generated from: `/__w/SpacetimeDB/SpacetimeDB/tools/xtask-llm-benchmark/../../do height: i32, } - #[table(name = result)] + #[table(accessor = result)] pub struct ResultRow { #[primary_key] id: i32, @@ -122,7 +122,7 @@ Generated from: `/__w/SpacetimeDB/SpacetimeDB/tools/xtask-llm-benchmark/../../do pub height: i32, } - #[table(name = result)] + #[table(accessor = result)] pub struct ResultRow { #[primary_key] pub id: i32, diff --git a/docs/static/llms.md b/docs/static/llms.md index a4fa11306fd..91820f77e54 100644 --- a/docs/static/llms.md +++ b/docs/static/llms.md @@ -339,7 +339,7 @@ The `[lib]` section in your module's `Cargo.toml` must contain `crate-type = ["c Database tables store the application's persistent state. They are defined using Rust structs annotated with the `#[table]` macro. -- **Core Attribute:** `#[table(name = my_table_name, ...)]` marks a struct as a database table definition. The specified `name` (an identifier, _not_ a string literal) is how the table will be referenced in SQL queries and generated APIs. +- **Core Attribute:** `#[table(accessor = my_table_name, ...)]` marks a struct as a database table definition. The specified `name` (an identifier, _not_ a string literal) is how the table will be referenced in SQL queries and generated APIs. - **Derivations:** The `#[table]` macro automatically handles deriving necessary traits like `SpacetimeType`, `Serialize`, `Deserialize`, and `Debug`. **Do not** manually add `#[derive(SpacetimeType)]` to a `#[table]` struct, as it will cause compilation conflicts. - **Public vs. Private:** By default, tables are **private**, accessible only by server-side reducer code. To allow clients to read or subscribe to a table's data, mark it as `public` using `#[table(..., public)]`. This is a common source of errors if forgotten. - **Primary Keys:** Designate a single field as the primary key using `#[primary_key]`. This ensures uniqueness, creates an efficient index, and allows clients to track row updates. @@ -381,7 +381,7 @@ pub struct PlayerState { last_login: Option, // Nullable timestamp } -#[table(name = inventory_item, public)] +#[table(accessor = inventory_item, public)] #[derive(Clone, Debug)] pub struct InventoryItem { #[primary_key] @@ -394,7 +394,7 @@ pub struct InventoryItem { } // Example of a private table -#[table(name = internal_game_data)] // No `public` flag +#[table(accessor = internal_game_data)] // No `public` flag #[derive(Clone, Debug)] struct InternalGameData { #[primary_key] @@ -418,8 +418,8 @@ use spacetimedb::{table, Identity, Timestamp, Table}; // Added Table import // Note: #[table] automatically derives SpacetimeType, Serialize, Deserialize // Do NOT add #[derive(SpacetimeType)] here. #[derive(Clone, Debug)] -#[table(name = logged_in_players, public)] // Identifier name -#[table(name = players_in_lobby, public)] // Identifier name +#[table(accessor = logged_in_players, public)] // Identifier name +#[table(accessor = players_in_lobby, public)] // Identifier name pub struct PlayerSessionData { #[primary_key] player_id: Identity, @@ -491,9 +491,9 @@ Reducers are the functions within your server module responsible for atomically use spacetimedb::{reducer, ReducerContext, Table, Identity, Timestamp, log}; // Assume User and Message tables are defined as previously -#[table(name = user, public)] +#[table(accessor = user, public)] #[derive(Clone, Debug)] pub struct User { #[primary_key] identity: Identity, name: Option, online: bool } -#[table(name = message, public)] +#[table(accessor = message, public)] #[derive(Clone, Debug)] pub struct Message { #[primary_key] #[auto_inc] id: u64, sender: Identity, text: String, sent: Timestamp } // Example: Basic reducer to set a user's name @@ -575,7 +575,7 @@ These reducers cannot take arguments beyond `&ReducerContext`. ```rust use spacetimedb::{reducer, table, ReducerContext, Table, log}; -#[table(name = settings)] +#[table(accessor = settings)] #[derive(Clone, Debug)] pub struct Settings { #[primary_key] @@ -640,10 +640,10 @@ SpacetimeDB provides powerful ways to filter and delete table rows using B-tree ```rust use spacetimedb::{table, reducer, ReducerContext, Table, log}; -#[table(name = points, index(name = idx_xy, btree(columns = [x, y])))] +#[table(accessor = points, index(name = idx_xy, btree(columns = [x, y])))] #[derive(Clone, Debug)] pub struct Point { #[primary_key] id: u64, x: i64, y: i64 } -#[table(name = items, index(btree(columns = [name])))] +#[table(accessor = items, index(btree(columns = [name])))] #[derive(Clone, Debug)] // No SpacetimeType derive pub struct Item { #[primary_key] item_key: u32, name: String } @@ -699,7 +699,7 @@ The `TryInsertError` enum provides specific variants detailing the cause of fail ````rust use spacetimedb::{table, reducer, ReducerContext, Table, log, TryInsertError}; -#[table(name = items)] +#[table(accessor = items)] #[derive(Clone, Debug)] pub struct Item { #[primary_key] #[auto_inc] id: u64, @@ -772,7 +772,7 @@ use spacetimedb::{table, reducer, ReducerContext, Timestamp, TimeDuration, Sched use log::debug; // 1. Declare the table with scheduling information, linking it to `send_message`. -#[table(name = send_message_schedule, scheduled(send_message))] +#[table(accessor = send_message_schedule, scheduled(send_message))] struct SendMessageSchedule { // Mandatory fields: // ============================ From 1cede00090c5d9cea5007775f69584ba2bf35582 Mon Sep 17 00:00:00 2001 From: Shubham Mishra Date: Wed, 11 Feb 2026 22:24:24 +0530 Subject: [PATCH 007/133] added index name arg --- crates/bindings-macro/src/table.rs | 64 ++++++++++++++++++++------- crates/bindings/src/rt.rs | 2 +- crates/bindings/src/table.rs | 1 + crates/lib/src/db/raw_def/v10.rs | 9 +++- crates/schema/src/def/validate/v10.rs | 29 ++++++------ 5 files changed, 71 insertions(+), 34 deletions(-) diff --git a/crates/bindings-macro/src/table.rs b/crates/bindings-macro/src/table.rs index 17eb6a4ca78..a5ea696bf84 100644 --- a/crates/bindings-macro/src/table.rs +++ b/crates/bindings-macro/src/table.rs @@ -12,6 +12,7 @@ use syn::parse::Parse; use syn::parse::Parser as _; use syn::punctuated::Punctuated; use syn::spanned::Spanned; +use syn::LitStr; use syn::{parse_quote, Ident, Path, Token}; pub(crate) struct TableArgs { @@ -46,12 +47,13 @@ struct ScheduledArg { struct IndexArg { accessor: Ident, + name: Option, is_unique: bool, kind: IndexType, } impl IndexArg { - fn new(accessor: Ident, kind: IndexType) -> Self { + fn new(accessor: Ident, kind: IndexType, name: Option) -> Self { // We don't know if its unique yet. // We'll discover this once we have collected constraints. let is_unique = false; @@ -59,6 +61,7 @@ impl IndexArg { accessor, is_unique, kind, + name, } } } @@ -157,6 +160,7 @@ impl ScheduledArg { impl IndexArg { fn parse_meta(meta: ParseNestedMeta) -> syn::Result { let mut accessor = None; + let mut name = None; let mut algo = None; meta.parse_nested_meta(|meta| { @@ -165,6 +169,11 @@ impl IndexArg { check_duplicate(&accessor, &meta)?; accessor = Some(meta.value()?.parse()?); } + sym::name => { + check_duplicate(&name, &meta)?; + let litstr: LitStr = meta.value()?.parse()?; + name = Some(litstr); + } sym::btree => { check_duplicate_msg(&algo, &meta, "index algorithm specified twice")?; algo = Some(Self::parse_btree(meta)?); @@ -188,7 +197,7 @@ impl IndexArg { ) })?; - Ok(IndexArg::new(accessor, kind)) + Ok(IndexArg::new(accessor, kind, name)) } fn parse_columns(meta: &ParseNestedMeta) -> syn::Result>> { @@ -248,6 +257,8 @@ impl IndexArg { /// Parses an inline `#[index(btree)]`, `#[index(hash)]`, or `#[index(direct)]` attribute on a field. fn parse_index_attr(field: &Ident, attr: &syn::Attribute) -> syn::Result { let mut kind = None; + let mut accessor: Option = None; + let mut name: Option = None; attr.parse_nested_meta(|meta| { match_meta!(match meta { sym::btree => { @@ -266,13 +277,27 @@ impl IndexArg { check_duplicate_msg(&kind, &meta, "index type specified twice")?; kind = Some(IndexType::Direct { column: field.clone() }) } + sym::accessor => { + check_duplicate(&accessor, &meta)?; + accessor = Some(meta.value()?.parse()?); + } + sym::name => { + check_duplicate(&name, &meta)?; + name = Some(meta.value()?.parse()?); + } }); Ok(()) })?; - let kind = kind - .ok_or_else(|| syn::Error::new_spanned(&attr.meta, "must specify kind of index (`btree` or `direct`)"))?; - let name = field.clone(); - Ok(IndexArg::new(name, kind)) + let kind = kind.ok_or_else(|| { + syn::Error::new_spanned( + &attr.meta, + "must specify kind of index (`btree` , `direct`, `name` or `value`)", + ) + })?; + + // Default accessor = field name if not provided + let accessor = accessor.unwrap_or_else(|| field.clone()); + Ok(IndexArg::new(accessor, kind, name)) } fn validate<'a>(&'a self, table_name: &str, cols: &'a [Column<'a>]) -> syn::Result> { @@ -299,17 +324,19 @@ impl IndexArg { (ValidatedIndexType::Direct { col }, "direct") } }; - // See crates/schema/src/validate/v9.rs for the format of index names. - // It's slightly unnerving that we just trust that component to generate this format correctly, - // but what can you do. - let cols = kind.columns(); - let cols = cols.iter().map(|col| col.ident.to_string()).collect::>(); - let cols = cols.join("_"); - let index_name = format!("{table_name}_{cols}_idx_{kind_str}"); + let gen_index_name = || { + // See crates/schema/src/validate/v9.rs for the format of index names. + // It's slightly unnerving that we just trust that component to generate this format correctly, + // but what can you do. + let cols = kind.columns(); + let cols = cols.iter().map(|col| col.ident.to_string()).collect::>(); + let cols = cols.join("_"); + format!("{table_name}_{cols}_idx_{kind_str}") + }; Ok(ValidatedIndex { is_unique: self.is_unique, - index_name, + index_name: self.name.as_ref().map(|s| s.value()).unwrap_or_else(gen_index_name), accessor_name: &self.accessor, kind, }) @@ -417,10 +444,12 @@ impl ValidatedIndex<'_> { } }; let accessor_name = ident_to_litstr(self.accessor_name); + let index_name = &self.index_name; // Note: we do not pass the index_name through here. // We trust the schema validation logic to reconstruct the name we've stored in `self.name`. quote!(spacetimedb::table::IndexDesc { accessor_name: #accessor_name, + index_name: #index_name, algo: #algo, }) } @@ -800,10 +829,11 @@ pub(crate) fn table_impl(mut args: TableArgs, item: &syn::DeriveInput) -> syn::R // NOTE(centril): We pick `btree` here if the user does not specify otherwise, // as it's the safest choice of index for the general case, // even if isn't optimal in specific cases. - let name = unique_col.ident.clone(); - let columns = vec![name.clone()]; + let accessor = unique_col.ident.clone(); + let columns = vec![accessor.clone()]; args.indices.push(IndexArg { - accessor: name, + accessor, + name: None, is_unique: true, kind: IndexType::BTree { columns }, }) diff --git a/crates/bindings/src/rt.rs b/crates/bindings/src/rt.rs index 654759c7c89..f1c1f752b13 100644 --- a/crates/bindings/src/rt.rs +++ b/crates/bindings/src/rt.rs @@ -722,7 +722,7 @@ pub fn register_table() { table = table.with_unique_constraint(col); } for index in T::INDEXES { - table = table.with_index(index.algo.into(), index.accessor_name); + table = table.with_index(index.algo.into(), index.accessor_name, Some(index.index_name)); } if let Some(primary_key) = T::PRIMARY_KEY { table = table.with_primary_key(primary_key); diff --git a/crates/bindings/src/table.rs b/crates/bindings/src/table.rs index 603a31af041..fbae4b1c05c 100644 --- a/crates/bindings/src/table.rs +++ b/crates/bindings/src/table.rs @@ -139,6 +139,7 @@ pub trait TableInternal: Sized { #[derive(Clone, Copy)] pub struct IndexDesc<'a> { pub accessor_name: &'a str, + pub index_name: &'a str, pub algo: IndexAlgo<'a>, } diff --git a/crates/lib/src/db/raw_def/v10.rs b/crates/lib/src/db/raw_def/v10.rs index 102cf3916ae..f4fb2a8012e 100644 --- a/crates/lib/src/db/raw_def/v10.rs +++ b/crates/lib/src/db/raw_def/v10.rs @@ -1036,11 +1036,16 @@ impl RawTableDefBuilderV10<'_> { } /// Generates a [RawIndexDefV10] using the supplied `columns`. - pub fn with_index(mut self, algorithm: RawIndexAlgorithm, accessor_name: impl Into) -> Self { + pub fn with_index( + mut self, + algorithm: RawIndexAlgorithm, + accessor_name: impl Into, + index_name: Option>, + ) -> Self { let accessor_name = accessor_name.into(); self.table.indexes.push(RawIndexDefV10 { - source_name: None, + source_name: index_name.map(Into::into), accessor_name: Some(accessor_name), algorithm, }); diff --git a/crates/schema/src/def/validate/v10.rs b/crates/schema/src/def/validate/v10.rs index b4897b8b582..82e7da6245f 100644 --- a/crates/schema/src/def/validate/v10.rs +++ b/crates/schema/src/def/validate/v10.rs @@ -744,6 +744,7 @@ mod tests { let schedule_at_type = builder.add_type::(); let red_delicious = AlgebraicValue::Sum(SumValue::new(2, ())); + let none = Option::<&str>::None; builder .build_table_with_new_type( @@ -756,10 +757,10 @@ mod tests { ]), true, ) - .with_index(btree([1, 2]), "apples_id") - .with_index(direct(2), "Apples_count_direct") + .with_index(btree([1, 2]), "apples_id", none) + .with_index(direct(2), "Apples_count_direct", none) .with_unique_constraint(2) - .with_index(btree(3), "Apples_type_btree") + .with_index(btree(3), "Apples_type_btree", none) .with_unique_constraint(3) .with_default_column_value(2, AlgebraicValue::U16(37)) .with_default_column_value(3, red_delicious.clone()) @@ -783,8 +784,8 @@ mod tests { .with_unique_constraint(ColId(0)) .with_primary_key(0) .with_access(TableAccess::Private) - .with_index(btree(0), "bananas_count") - .with_index(btree([0, 1, 2]), "bananas_count_id_name") + .with_index(btree(0), "bananas_count", none) + .with_index(btree([0, 1, 2]), "bananas_count_id_name", none) .finish(); let deliveries_product_type = builder @@ -798,7 +799,7 @@ mod tests { true, ) .with_auto_inc_primary_key(2) - .with_index(btree(2), "scheduled_id_index") + .with_index(btree(2), "scheduled_id_index", none) .with_type(TableType::System) .finish(); @@ -1070,7 +1071,7 @@ mod tests { ProductType::from([("b", AlgebraicType::U16), ("a", AlgebraicType::U64)]), false, ) - .with_index(btree([0, 55]), "bananas_a_b") + .with_index(btree([0, 55]), "bananas_a_b", Option::<&str>::None) .finish(); let result: Result = builder.finish().try_into(); @@ -1149,7 +1150,7 @@ mod tests { ProductType::from([("b", AlgebraicType::U16), ("a", AlgebraicType::U64)]), false, ) - .with_index(btree([0, 0]), "bananas_b_b") + .with_index(btree([0, 0]), "bananas_b_b", None) .finish(); let result: Result = builder.finish().try_into(); @@ -1231,7 +1232,7 @@ mod tests { ProductType::from([("b", AlgebraicType::U16), ("a", AlgebraicType::U64)]), true, ) - .with_index(hash(0), "bananas_b") + .with_index(hash(0), "bananas_b", None) .finish(); let def: ModuleDef = builder.finish().try_into().unwrap(); let indexes = def.indexes().collect::>(); @@ -1269,7 +1270,7 @@ mod tests { ProductType::from([("b", AlgebraicType::I32), ("a", AlgebraicType::U64)]), false, ) - .with_index(direct(0), "bananas_b") + .with_index(direct(0), "bananas_b", None) .finish(); let result: Result = builder.finish().try_into(); @@ -1384,7 +1385,7 @@ mod tests { true, ) .with_auto_inc_primary_key(2) - .with_index(btree(2), "scheduled_id_index") + .with_index(btree(2), "scheduled_id_index", None) .with_type(TableType::System) .finish(); @@ -1412,7 +1413,7 @@ mod tests { true, ) .with_auto_inc_primary_key(2) - .with_index(direct(2), "scheduled_id_idx") + .with_index(direct(2), "scheduled_id_idx", None::) .with_type(TableType::System) .finish(); @@ -1445,8 +1446,8 @@ mod tests { true, ) .with_auto_inc_primary_key(2) - .with_index(direct(2), "scheduled_id_index") - .with_index(btree([0, 2]), "nice_index_name") + .with_index(direct(2), "scheduled_id_index", None) + .with_index(btree([0, 2]), "nice_index_name", None) .with_type(TableType::System) .finish(); From 5b46a44f11232a9a65f207c6e1f9d59052fa3dd8 Mon Sep 17 00:00:00 2001 From: Shubham Mishra Date: Wed, 11 Feb 2026 23:21:34 +0530 Subject: [PATCH 008/133] fix test --- crates/schema/src/def/validate/v10.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/crates/schema/src/def/validate/v10.rs b/crates/schema/src/def/validate/v10.rs index 82e7da6245f..163ad1a9f36 100644 --- a/crates/schema/src/def/validate/v10.rs +++ b/crates/schema/src/def/validate/v10.rs @@ -1150,7 +1150,7 @@ mod tests { ProductType::from([("b", AlgebraicType::U16), ("a", AlgebraicType::U64)]), false, ) - .with_index(btree([0, 0]), "bananas_b_b", None) + .with_index(btree([0, 0]), "bananas_b_b", None::<&str>) .finish(); let result: Result = builder.finish().try_into(); @@ -1232,7 +1232,7 @@ mod tests { ProductType::from([("b", AlgebraicType::U16), ("a", AlgebraicType::U64)]), true, ) - .with_index(hash(0), "bananas_b", None) + .with_index(hash(0), "bananas_b", None::<&str>) .finish(); let def: ModuleDef = builder.finish().try_into().unwrap(); let indexes = def.indexes().collect::>(); @@ -1270,7 +1270,7 @@ mod tests { ProductType::from([("b", AlgebraicType::I32), ("a", AlgebraicType::U64)]), false, ) - .with_index(direct(0), "bananas_b", None) + .with_index(direct(0), "bananas_b", None::<&str>) .finish(); let result: Result = builder.finish().try_into(); @@ -1385,7 +1385,7 @@ mod tests { true, ) .with_auto_inc_primary_key(2) - .with_index(btree(2), "scheduled_id_index", None) + .with_index(btree(2), "scheduled_id_index", None::<&str>) .with_type(TableType::System) .finish(); @@ -1413,7 +1413,7 @@ mod tests { true, ) .with_auto_inc_primary_key(2) - .with_index(direct(2), "scheduled_id_idx", None::) + .with_index(direct(2), "scheduled_id_idx", None::<&str>) .with_type(TableType::System) .finish(); @@ -1446,8 +1446,8 @@ mod tests { true, ) .with_auto_inc_primary_key(2) - .with_index(direct(2), "scheduled_id_index", None) - .with_index(btree([0, 2]), "nice_index_name", None) + .with_index(direct(2), "scheduled_id_index", None::<&str>) + .with_index(btree([0, 2]), "nice_index_name", None::<&str>) .with_type(TableType::System) .finish(); From 076a0267958a9a6fe3e5e1d0cbf4431ff3742033 Mon Sep 17 00:00:00 2001 From: Shubham Mishra Date: Wed, 11 Feb 2026 23:48:39 +0530 Subject: [PATCH 009/133] define name -> accessor in views, reducer and table --- crates/bindings-macro/src/procedure.rs | 4 +-- crates/bindings-macro/src/reducer.rs | 2 +- crates/bindings-macro/src/table.rs | 8 +++++ crates/bindings-macro/src/view.rs | 26 +++++++++----- crates/bindings/README.md | 4 +-- crates/bindings/src/lib.rs | 8 ++--- crates/bindings/tests/ui/views-more.rs | 2 +- crates/bindings/tests/ui/views.rs | 36 +++++++++---------- crates/bindings/tests/ui/views.stderr | 24 ++++++------- crates/schema/src/schema.rs | 4 +-- .../00100-databases/00500-cheat-sheet.md | 4 +-- .../00200-functions/00500-views.md | 12 +++---- docs/static/llms.md | 6 ++-- modules/sdk-test-view/src/lib.rs | 8 ++--- .../templates/rust/server/.cargo/config.toml | 2 +- 15 files changed, 84 insertions(+), 66 deletions(-) diff --git a/crates/bindings-macro/src/procedure.rs b/crates/bindings-macro/src/procedure.rs index 8b1f7246a74..1688a080896 100644 --- a/crates/bindings-macro/src/procedure.rs +++ b/crates/bindings-macro/src/procedure.rs @@ -29,11 +29,11 @@ impl ProcedureArgs { } } -pub(crate) fn procedure_impl(args: ProcedureArgs, original_function: &ItemFn) -> syn::Result { +pub(crate) fn procedure_impl(_args: ProcedureArgs, original_function: &ItemFn) -> syn::Result { let func_name = &original_function.sig.ident; let vis = &original_function.vis; - let procedure_name = args.name.unwrap_or_else(|| ident_to_litstr(func_name)); + let procedure_name = ident_to_litstr(func_name); assert_only_lifetime_generics(original_function, "procedures")?; diff --git a/crates/bindings-macro/src/reducer.rs b/crates/bindings-macro/src/reducer.rs index 7d7f0488311..e8db1f8ebac 100644 --- a/crates/bindings-macro/src/reducer.rs +++ b/crates/bindings-macro/src/reducer.rs @@ -96,7 +96,7 @@ pub(crate) fn reducer_impl(args: ReducerArgs, original_function: &ItemFn) -> syn let func_name = &original_function.sig.ident; let vis = &original_function.vis; - let reducer_name = args.name.unwrap_or_else(|| ident_to_litstr(func_name)); + let reducer_name = ident_to_litstr(func_name); assert_only_lifetime_generics(original_function, "reducers")?; diff --git a/crates/bindings-macro/src/table.rs b/crates/bindings-macro/src/table.rs index a5ea696bf84..78e4a15b4ea 100644 --- a/crates/bindings-macro/src/table.rs +++ b/crates/bindings-macro/src/table.rs @@ -17,6 +17,7 @@ use syn::{parse_quote, Ident, Path, Token}; pub(crate) struct TableArgs { access: Option, + _name: Option, scheduled: Option, accessor: Ident, indices: Vec, @@ -77,6 +78,7 @@ impl TableArgs { let mut access = None; let mut scheduled = None; let mut accessor = None; + let mut name = None; let mut indices = Vec::new(); syn::meta::parser(|meta| { match_meta!(match meta { @@ -93,6 +95,11 @@ impl TableArgs { let value = meta.value()?; accessor = Some(value.parse()?); } + sym::name => { + check_duplicate(&accessor, &meta)?; + let value = meta.value()?; + name = Some(value.parse()?); + } sym::index => indices.push(IndexArg::parse_meta(meta)?), sym::scheduled => { check_duplicate(&scheduled, &meta)?; @@ -114,6 +121,7 @@ impl TableArgs { scheduled, accessor, indices, + _name: name, }) } } diff --git a/crates/bindings-macro/src/view.rs b/crates/bindings-macro/src/view.rs index 34e7286598c..084d608bceb 100644 --- a/crates/bindings-macro/src/view.rs +++ b/crates/bindings-macro/src/view.rs @@ -3,53 +3,63 @@ use proc_macro2::{Ident, Span, TokenStream}; use quote::quote; use syn::ext::IdentExt; use syn::parse::Parser; -use syn::{FnArg, ItemFn}; +use syn::{FnArg, ItemFn, LitStr}; use crate::sym; use crate::util::{check_duplicate_msg, match_meta}; pub(crate) struct ViewArgs { - name: Ident, + _name: Option, + accessor: Ident, #[allow(unused)] public: bool, } impl ViewArgs { - /// Parse `#[view(name = ..., public)]` where both `name` and `public` are required. + /// Parse `#[view(accessor = ..., public)]` where both `name` and `public` are required. pub(crate) fn parse(input: TokenStream, func_ident: &Ident) -> syn::Result { let mut name = None; + let mut accessor = None; let mut public = None; syn::meta::parser(|meta| { match_meta!(match meta { sym::name => { check_duplicate_msg(&name, &meta, "`name` already specified")?; - name = Some(meta.value()?.parse()?); + name = Some(meta.value()?.parse::()?); } sym::public => { check_duplicate_msg(&public, &meta, "`public` already specified")?; public = Some(()); } + sym::accessor => { + check_duplicate_msg(&accessor, &meta, "`accessor` already specified")?; + accessor = Some(meta.value()?.parse()?); + } }); Ok(()) }) .parse2(input)?; - let name = name.ok_or_else(|| { + let accessor = accessor.ok_or_else(|| { let view = func_ident.to_string().to_snake_case(); syn::Error::new( Span::call_site(), - format_args!("must specify view name, e.g. `#[spacetimedb::view(name = {view})]"), + format_args!("must specify view accessor, e.g. `#[spacetimedb::view(accessor = {view})]"), ) })?; let () = public .ok_or_else(|| syn::Error::new(Span::call_site(), "views must be `public`, e.g. `#[view(public)]`"))?; - Ok(Self { name, public: true }) + Ok(Self { + _name: name, + public: true, + accessor, + }) } } pub(crate) fn view_impl(args: ViewArgs, original_function: &ItemFn) -> syn::Result { let vis = &original_function.vis; let func_name = &original_function.sig.ident; - let view_ident = args.name; + let view_ident = args.accessor; let view_name = view_ident.unraw().to_string(); for param in &original_function.sig.generics.params { diff --git a/crates/bindings/README.md b/crates/bindings/README.md index b930e946cb7..65f2baaf0b8 100644 --- a/crates/bindings/README.md +++ b/crates/bindings/README.md @@ -606,13 +606,13 @@ struct PlayerAndLevel { } // At-most-one row: return Option -#[view(name = my_player, public)] +#[view(accessor = my_player, public)] fn my_player(ctx: &ViewContext) -> Option { ctx.db.player().identity().find(ctx.sender()) } // Multiple rows: return Vec -#[view(name = players_for_level, public)] +#[view(accessor = players_for_level, public)] fn players_for_level(ctx: &AnonymousViewContext) -> Vec { ctx.db .player_level() diff --git a/crates/bindings/src/lib.rs b/crates/bindings/src/lib.rs index d76e40709c2..fd972e705e8 100644 --- a/crates/bindings/src/lib.rs +++ b/crates/bindings/src/lib.rs @@ -814,19 +814,19 @@ pub use spacetimedb_bindings_macro::procedure; /// } /// /// // A view that selects at most one row from a table -/// #[view(name = my_player, public)] +/// #[view(accessor = my_player, public)] /// fn my_player(ctx: &ViewContext) -> Option { /// ctx.db.player().identity().find(ctx.sender()) /// } /// /// // An example of column projection -/// #[view(name = my_player_id, public)] +/// #[view(accessor = my_player_id, public)] /// fn my_player_id(ctx: &ViewContext) -> Option { /// ctx.db.player().identity().find(ctx.sender()).map(|Player { id, .. }| PlayerId { id }) /// } /// /// // An example that is analogous to a semijoin in sql -/// #[view(name = players_at_coordinates, public)] +/// #[view(accessor = players_at_coordinates, public)] /// fn players_at_coordinates(ctx: &AnonymousViewContext) -> Vec { /// ctx /// .db @@ -838,7 +838,7 @@ pub use spacetimedb_bindings_macro::procedure; /// } /// /// // An example of a join that combines fields from two different tables -/// #[view(name = players_with_coordinates, public)] +/// #[view(accessor = players_with_coordinates, public)] /// fn players_with_coordinates(ctx: &AnonymousViewContext) -> Vec { /// ctx /// .db diff --git a/crates/bindings/tests/ui/views-more.rs b/crates/bindings/tests/ui/views-more.rs index d55d38e6567..356ebdc63dd 100644 --- a/crates/bindings/tests/ui/views-more.rs +++ b/crates/bindings/tests/ui/views-more.rs @@ -9,7 +9,7 @@ struct PlayerInfo { age: u8, } /// Comparing incompatible types in `where` condition: u8 != u32 implicitly -#[view(name = view_bad_where_int_types_implicit, public)] +#[view(accessor = view_bad_where_int_types_implicit, public)] fn view_bad_where_int_types_implicit(ctx: &ViewContext) -> Query { ctx.from.player_info().r#where(|a| a.age.eq(4200)).build() } diff --git a/crates/bindings/tests/ui/views.rs b/crates/bindings/tests/ui/views.rs index 71b38cecf0d..dacf1255d06 100644 --- a/crates/bindings/tests/ui/views.rs +++ b/crates/bindings/tests/ui/views.rs @@ -73,59 +73,59 @@ struct Player { struct NotSpacetimeType {} /// Private views not allowed; must be `#[view(public, ...)]` -#[view(name = view_def_no_public)] +#[view(accessor = view_def_no_public)] fn view_def_no_public(_: &ViewContext) -> Vec { vec![] } /// Duplicate `public` -#[view(name = view_def_dup_public, public, public)] +#[view(accessor = view_def_dup_public, public, public)] fn view_def_dup_public() -> Vec { vec![] } /// Duplicate `name` -#[view(name = view_def_dup_name, name = view_def_dup_name, public)] +#[view(accessor = view_def_dup_name, name = view_def_dup_name, public)] fn view_def_dup_name() -> Vec { vec![] } /// Unsupported attribute arg -#[view(name = view_def_unsupported_arg, public, anonymous)] +#[view(accessor = view_def_unsupported_arg, public, anonymous)] fn view_def_unsupported_arg() -> Vec { vec![] } /// A `ViewContext` is required -#[view(name = view_def_no_context, public)] +#[view(accessor = view_def_no_context, public)] fn view_def_no_context() -> Vec { vec![] } /// A `ViewContext` is required -#[view(name = view_def_wrong_context, public)] +#[view(accessor = view_def_wrong_context, public)] fn view_def_wrong_context(_: &ReducerContext) -> Vec { vec![] } /// Must pass the `ViewContext` by ref -#[view(name = view_def_pass_context_by_value, public)] +#[view(accessor = view_def_pass_context_by_value, public)] fn view_def_pass_context_by_value(_: ViewContext) -> Vec { vec![] } /// The view context must be the first parameter -#[view(name = view_def_wrong_context_position, public)] +#[view(accessor = view_def_wrong_context_position, public)] fn view_def_wrong_context_position(_: &u32, _: &ViewContext) -> Vec { vec![] } /// Must return `Vec` or `Option` where `T` is a SpacetimeType -#[view(name = view_def_no_return, public)] +#[view(accessor = view_def_no_return, public)] fn view_def_no_return(_: &ViewContext) {} /// Must return `Vec` or `Option` where `T` is a SpacetimeType -#[view(name = view_def_wrong_return, public)] +#[view(accessor = view_def_wrong_return, public)] fn view_def_wrong_return(_: &ViewContext) -> Player { Player { identity: Identity::ZERO, @@ -133,13 +133,13 @@ fn view_def_wrong_return(_: &ViewContext) -> Player { } /// Must return `Vec` or `Option` where `T` is a SpacetimeType -#[view(name = view_def_returns_not_a_spacetime_type, public)] +#[view(accessor = view_def_returns_not_a_spacetime_type, public)] fn view_def_returns_not_a_spacetime_type(_: &AnonymousViewContext) -> Option { None } /// Cannot use a view as a scheduled function -#[view(name = sched_table_view, public)] +#[view(accessor = sched_table_view, public)] fn sched_table_view(_: &ViewContext, _args: ScheduledTable) -> Vec { vec![] } @@ -155,20 +155,20 @@ struct PlayerInfo { } /// Comparing incompatible types in `where` condition: Identity != int -#[view(name = view_bad_where, public)] +#[view(accessor = view_bad_where, public)] fn view_bad_where(ctx: &ViewContext) -> Query { ctx.from.player().r#where(|a| a.identity.eq(42)).build() } /// Comparing incompatible types in `where` condition: u8 != u32 -#[view(name = view_bad_where_int_types, public)] +#[view(accessor = view_bad_where_int_types, public)] fn view_bad_where_int_types(ctx: &ViewContext) -> Query { ctx.from.player_info().r#where(|a| a.age.eq(4200u32)).build() } /// Joining incompatible types /// -- weight is u32, identity is Identity -#[view(name = view_bad_join, public)] +#[view(accessor = view_bad_join, public)] fn view_bad_join(ctx: &ViewContext) -> Query { ctx.from .player_info() @@ -178,7 +178,7 @@ fn view_bad_join(ctx: &ViewContext) -> Query { /// Joining non-index columns /// -- age is not indexed -#[view(name = view_join_non_indexed_column, public)] +#[view(accessor = view_join_non_indexed_column, public)] fn view_join_non_indexed_column(ctx: &ViewContext) -> Query { ctx.from .player() @@ -188,7 +188,7 @@ fn view_join_non_indexed_column(ctx: &ViewContext) -> Query { /// Right join returns right table's type /// -- should be PlayerInfo, not Player -#[view(name = view_right_join_wrong_return_type, public)] +#[view(accessor = view_right_join_wrong_return_type, public)] fn view_right_join_wrong_return_type(ctx: &ViewContext) -> Query { ctx.from .player() @@ -198,7 +198,7 @@ fn view_right_join_wrong_return_type(ctx: &ViewContext) -> Query { /// Using non-existent table /// -- xyz table does not exist -#[view(name = view_nonexistent_table, public)] +#[view(accessor = view_nonexistent_table, public)] fn view_nonexistent_table(ctx: &ViewContext) -> Query { ctx.from.xyz().build() } diff --git a/crates/bindings/tests/ui/views.stderr b/crates/bindings/tests/ui/views.stderr index 0eda0361ba9..091a6a7c346 100644 --- a/crates/bindings/tests/ui/views.stderr +++ b/crates/bindings/tests/ui/views.stderr @@ -1,7 +1,7 @@ error: views must be `public`, e.g. `#[view(public)]` --> tests/ui/views.rs:76:1 | -76 | #[view(name = view_def_no_public)] +76 | #[view(accessor = view_def_no_public)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: this error originates in the attribute macro `view` (in Nightly builds, run with -Z macro-backtrace for more info) @@ -9,19 +9,19 @@ error: views must be `public`, e.g. `#[view(public)]` error: `public` already specified --> tests/ui/views.rs:82:44 | -82 | #[view(name = view_def_dup_public, public, public)] +82 | #[view(accessor = view_def_dup_public, public, public)] | ^^^^^^ error: `name` already specified --> tests/ui/views.rs:88:34 | -88 | #[view(name = view_def_dup_name, name = view_def_dup_name, public)] +88 | #[view(accessor = view_def_dup_name, name = view_def_dup_name, public)] | ^^^^ error: expected `name` or `public` --> tests/ui/views.rs:94:49 | -94 | #[view(name = view_def_unsupported_arg, public, anonymous)] +94 | #[view(accessor = view_def_unsupported_arg, public, anonymous)] | ^^^^^^^^^ error: Views must always have a context parameter: `&ViewContext` or `&AnonymousViewContext` @@ -80,7 +80,7 @@ error[E0425]: cannot find type `T` in this scope error[E0277]: the trait bound `ViewKind: ViewKindTrait` is not satisfied --> tests/ui/views.rs:106:1 | -106 | #[view(name = view_def_wrong_context, public)] +106 | #[view(accessor = view_def_wrong_context, public)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `ViewKindTrait` is not implemented for `ViewKind` | help: the following other types implement trait `ViewKindTrait` @@ -96,7 +96,7 @@ help: the following other types implement trait `ViewKindTrait` error[E0276]: impl has stricter requirements than trait --> tests/ui/views.rs:106:1 | -106 | #[view(name = view_def_wrong_context, public)] +106 | #[view(accessor = view_def_wrong_context, public)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl has extra requirement `ViewKind: ViewKindTrait` | = note: this error originates in the attribute macro `view` (in Nightly builds, run with -Z macro-backtrace for more info) @@ -198,7 +198,7 @@ error[E0599]: no method named `delete` found for struct `RangedIndexReadOnly` in the current scope --> tests/ui/views.rs:106:1 | -106 | #[view(name = view_def_wrong_context, public)] +106 | #[view(accessor = view_def_wrong_context, public)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function or associated item not found in `ViewRegistrar` | = note: the function or associated item was found for @@ -223,7 +223,7 @@ help: the following other types implement trait `ViewContextArg` error[E0599]: no function or associated item named `invoke` found for struct `ViewDispatcher` in the current scope --> tests/ui/views.rs:106:1 | -106 | #[view(name = view_def_wrong_context, public)] +106 | #[view(accessor = view_def_wrong_context, public)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function or associated item not found in `ViewDispatcher` | = note: the function or associated item was found for @@ -234,7 +234,7 @@ error[E0599]: no function or associated item named `invoke` found for struct `Vi error[E0277]: invalid view signature --> tests/ui/views.rs:128:1 | -128 | #[view(name = view_def_wrong_return, public)] +128 | #[view(accessor = view_def_wrong_return, public)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this view signature is not valid | = help: the trait `spacetimedb::rt::View<'_, _, _>` is not implemented for fn item `for<'a> fn(&'a ViewContext) -> Player {view_def_wrong_return}` @@ -279,7 +279,7 @@ help: the following other types implement trait `ViewReturn` error[E0277]: invalid view signature --> tests/ui/views.rs:128:1 | -128 | #[view(name = view_def_wrong_return, public)] +128 | #[view(accessor = view_def_wrong_return, public)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this view signature is not valid | = help: the trait `spacetimedb::rt::View<'_, _, _>` is not implemented for fn item `for<'a> fn(&'a ViewContext) -> Player {view_def_wrong_return}` @@ -301,7 +301,7 @@ note: required by a bound in `ViewDispatcher::::invoke` error[E0277]: invalid anonymous view signature --> tests/ui/views.rs:136:1 | -136 | #[view(name = view_def_returns_not_a_spacetime_type, public)] +136 | #[view(accessor = view_def_returns_not_a_spacetime_type, public)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this view signature is not valid | = help: the trait `AnonymousView<'_, _, _>` is not implemented for fn item `for<'a> fn(&'a AnonymousViewContext) -> Option {view_def_returns_not_a_spacetime_type}` @@ -370,7 +370,7 @@ help: the trait `Serialize` is not implemented for `NotSpacetimeType` error[E0277]: invalid anonymous view signature --> tests/ui/views.rs:136:1 | -136 | #[view(name = view_def_returns_not_a_spacetime_type, public)] +136 | #[view(accessor = view_def_returns_not_a_spacetime_type, public)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this view signature is not valid | = help: the trait `AnonymousView<'_, _, _>` is not implemented for fn item `for<'a> fn(&'a AnonymousViewContext) -> Option {view_def_returns_not_a_spacetime_type}` diff --git a/crates/schema/src/schema.rs b/crates/schema/src/schema.rs index 4fa2085844f..97b38a2acc7 100644 --- a/crates/schema/src/schema.rs +++ b/crates/schema/src/schema.rs @@ -766,10 +766,10 @@ impl TableSchema { /// b: u32, /// } /// - /// #[view(name = my_view, public)] + /// #[view(accessor = my_view, public)] /// fn my_view(ctx: &ViewContext, x: u32, y: u32) -> Vec { ... } /// - /// #[view(name = my_anonymous_view, public)] + /// #[view(accessor = my_anonymous_view, public)] /// fn my_anonymous_view(ctx: &AnonymousViewContext, x: u32, y: u32) -> Vec { ... } /// ``` /// diff --git a/docs/docs/00200-core-concepts/00100-databases/00500-cheat-sheet.md b/docs/docs/00200-core-concepts/00100-databases/00500-cheat-sheet.md index de580ceead2..3a9eef8cdd1 100644 --- a/docs/docs/00200-core-concepts/00100-databases/00500-cheat-sheet.md +++ b/docs/docs/00200-core-concepts/00100-databases/00500-cheat-sheet.md @@ -620,13 +620,13 @@ public static IEnumerable TopPlayers(ViewContext ctx) use spacetimedb::{view, ViewContext}; // Return single row -#[view(name = my_player, public)] +#[view(accessor = my_player, public)] fn my_player(ctx: &ViewContext) -> Option { ctx.db.player().identity().find(ctx.sender()) } // Return multiple rows -#[view(name = top_players, public)] +#[view(accessor = top_players, public)] fn top_players(ctx: &ViewContext) -> Vec { ctx.db.player().iter() .filter(|p| p.score > 1000) diff --git a/docs/docs/00200-core-concepts/00200-functions/00500-views.md b/docs/docs/00200-core-concepts/00200-functions/00500-views.md index cc2845cabbe..7b30421806d 100644 --- a/docs/docs/00200-core-concepts/00200-functions/00500-views.md +++ b/docs/docs/00200-core-concepts/00200-functions/00500-views.md @@ -195,13 +195,13 @@ pub struct PlayerAndLevel { } // At-most-one row: return Option -#[view(name = my_player, public)] +#[view(accessor = my_player, public)] fn my_player(ctx: &ViewContext) -> Option { ctx.db.player().identity().find(ctx.sender()) } // Multiple rows: return Vec -#[view(name = players_for_level, public)] +#[view(accessor = players_for_level, public)] fn players_for_level(ctx: &AnonymousViewContext) -> Vec { ctx.db .player_level() @@ -350,7 +350,7 @@ public static Player? MyPlayer(ViewContext ctx) ```rust // Per-user: each client sees their own player -#[view(name = my_player, public)] +#[view(accessor = my_player, public)] fn my_player(ctx: &ViewContext) -> Option { ctx.db.player().identity().find(&ctx.sender()) } @@ -438,7 +438,7 @@ pub struct Player { } // Shared: same high scorers for all clients -#[view(name = high_scorers, public)] +#[view(accessor = high_scorers, public)] fn high_scorers(ctx: &AnonymousViewContext) -> Vec { // Get all players with score >= 1000 using the btree index ctx.db.player().score().filter(1000..).collect() @@ -619,7 +619,7 @@ pub struct PlayerChunk { } // Shared: all players in chunk (0,0) share this view -#[view(name = entities_in_origin_chunk, public)] +#[view(accessor = entities_in_origin_chunk, public)] fn entities_in_origin_chunk(ctx: &AnonymousViewContext) -> Vec { ctx.db.entity().chunk_x().filter(&0) .filter(|e| e.chunk_y == 0) @@ -627,7 +627,7 @@ fn entities_in_origin_chunk(ctx: &AnonymousViewContext) -> Vec { } // Per-user: returns entities in the chunk the player is currently in -#[view(name = entities_in_my_chunk, public)] +#[view(accessor = entities_in_my_chunk, public)] fn entities_in_my_chunk(ctx: &ViewContext) -> Vec { let Some(player) = ctx.db.player().identity().find(&ctx.sender()) else { return vec![]; diff --git a/docs/static/llms.md b/docs/static/llms.md index 91820f77e54..22f19cb34cd 100644 --- a/docs/static/llms.md +++ b/docs/static/llms.md @@ -920,14 +920,14 @@ pub struct PlayerAndLevel { // View that returns the caller's player (user-specific) // Returns Option for at-most-one row -#[view(name = my_player, public)] +#[view(accessor = my_player, public)] fn my_player(ctx: &ViewContext) -> Option { ctx.db.player().identity().find(ctx.sender()) } // View that returns all players at a specific level (same for all callers) // Returns Vec for multiple rows -#[view(name = players_for_level, public)] +#[view(accessor = players_for_level, public)] fn players_for_level(ctx: &AnonymousViewContext) -> Vec { ctx.db .player_level() @@ -980,7 +980,7 @@ use spacetimedb::{view, ViewContext, Query}; // This view can scan the whole table efficiently because // Query results are computed incrementally -#[view(name = my_messages, public)] +#[view(accessor = my_messages, public)] fn my_messages(ctx: &ViewContext) -> Query { // Build a typed query using the query builder ctx.db.message() diff --git a/modules/sdk-test-view/src/lib.rs b/modules/sdk-test-view/src/lib.rs index 99e58707164..ef3248086e5 100644 --- a/modules/sdk-test-view/src/lib.rs +++ b/modules/sdk-test-view/src/lib.rs @@ -80,12 +80,12 @@ pub fn move_player(ctx: &ReducerContext, dx: i32, dy: i32) { } } -#[view(name = my_player, public)] +#[view(accessor = my_player, public)] fn my_player(ctx: &ViewContext) -> Option { ctx.db.player().identity().find(ctx.sender()) } -#[view(name = my_player_and_level, public)] +#[view(accessor = my_player_and_level, public)] fn my_player_and_level(ctx: &ViewContext) -> Option { ctx.db .player() @@ -104,7 +104,7 @@ fn my_player_and_level(ctx: &ViewContext) -> Option { }) } -#[view(name = players_at_level_0, public)] +#[view(accessor = players_at_level_0, public)] fn players_at_level_0(ctx: &AnonymousViewContext) -> Vec { ctx.db .player_level() @@ -114,7 +114,7 @@ fn players_at_level_0(ctx: &AnonymousViewContext) -> Vec { .collect() } -#[view(name = nearby_players, public)] +#[view(accessor = nearby_players, public)] pub fn nearby_players(ctx: &ViewContext) -> Vec { ctx.db .player() diff --git a/tools/xtask-llm-benchmark/src/templates/rust/server/.cargo/config.toml b/tools/xtask-llm-benchmark/src/templates/rust/server/.cargo/config.toml index f2bdad558ae..69e3a25269e 100644 --- a/tools/xtask-llm-benchmark/src/templates/rust/server/.cargo/config.toml +++ b/tools/xtask-llm-benchmark/src/templates/rust/server/.cargo/config.toml @@ -1,4 +1,4 @@ -# .cargo/config.toml +#[table(name =# .cargo/config.toml [build] rustflags = ["-C","debuginfo=0","-C","split-debuginfo=off"] From f47c1ffd119153a0a7df8a1b8944172e08c976e7 Mon Sep 17 00:00:00 2001 From: Shubham Mishra Date: Thu, 12 Feb 2026 00:42:29 +0530 Subject: [PATCH 010/133] ui tests --- crates/bindings/tests/ui/reducers.stderr | 20 ++++++++++---------- crates/bindings/tests/ui/tables.stderr | 8 ++++---- crates/bindings/tests/ui/views.stderr | 4 ++-- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/crates/bindings/tests/ui/reducers.stderr b/crates/bindings/tests/ui/reducers.stderr index afd4c89d819..022f5d6cb0c 100644 --- a/crates/bindings/tests/ui/reducers.stderr +++ b/crates/bindings/tests/ui/reducers.stderr @@ -15,10 +15,10 @@ error: scheduled table missing required columns; add these to your struct: #[auto_inc] scheduled_id: u64, scheduled_at: spacetimedb::ScheduleAt, - --> tests/ui/reducers.rs:28:59 + --> tests/ui/reducers.rs:28:63 | -28 | #[spacetimedb::table(name = scheduled_table_missing_rows, scheduled(scheduled_table_missing_rows_reducer))] - | ^^^^^^^^^ +28 | #[spacetimedb::table(accessor = scheduled_table_missing_rows, scheduled(scheduled_table_missing_ro... + | ^^^^^^^^^ error[E0277]: invalid reducer signature --> tests/ui/reducers.rs:6:4 @@ -260,12 +260,12 @@ note: required by a bound in `invoke_reducer` | ^^^^^^^^^^^^^^ required by this bound in `invoke_reducer` error[E0593]: function is expected to take 2 arguments, but it takes 3 arguments - --> tests/ui/reducers.rs:37:56 + --> tests/ui/reducers.rs:37:60 | -37 | #[spacetimedb::table(name = scheduled_table, scheduled(scheduled_table_reducer))] - | -------------------------------------------------------^^^^^^^^^^^^^^^^^^^^^^^--- - | | | - | | expected function that takes 2 arguments +37 | #[spacetimedb::table(accessor = scheduled_table, scheduled(scheduled_table_reducer))] + | -----------------------------------------------------------^^^^^^^^^^^^^^^^^^^^^^^--- + | | | + | | expected function that takes 2 arguments | required by a bound introduced by this call ... 48 | fn scheduled_table_reducer(_ctx: &ReducerContext, _x: u8, _y: u8) {} @@ -276,5 +276,5 @@ error[E0593]: function is expected to take 2 arguments, but it takes 3 arguments note: required by a bound in `scheduled_typecheck` --> src/rt.rs | - | pub const fn scheduled_typecheck<'de, Row, FnKind>(_x: impl ExportFunctionForScheduledTable<'de, Row, FnKind>) - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `scheduled_typecheck` + | ...FnKind>(_x: impl ExportFunctionForScheduledTable<'de, Row, FnKind>) + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `scheduled_typecheck` diff --git a/crates/bindings/tests/ui/tables.stderr b/crates/bindings/tests/ui/tables.stderr index e25cbd853a4..4fd1fbf7b8a 100644 --- a/crates/bindings/tests/ui/tables.stderr +++ b/crates/bindings/tests/ui/tables.stderr @@ -36,8 +36,8 @@ help: the trait `SpacetimeType` is not implemented for `Test` error[E0277]: the trait bound `Test: Deserialize<'de>` is not satisfied --> tests/ui/tables.rs:5:8 | -3 | #[spacetimedb::table(name = table)] - | ----------------------------------- required by a bound introduced by this call +3 | #[spacetimedb::table(accessor = table)] + | --------------------------------------- required by a bound introduced by this call 4 | struct Table { 5 | x: Test, | ^^^^ unsatisfied trait bound @@ -114,8 +114,8 @@ help: the trait `Serialize` is not implemented for `Test` note: required by a bound in `spacetimedb::spacetimedb_lib::ser::SerializeNamedProduct::serialize_element` --> $WORKSPACE/crates/sats/src/ser.rs | - | fn serialize_element(&mut self, name: Option<&str>, elem: &T) -> Result<(), Self::Error>; - | ^^^^^^^^^ required by this bound in `SerializeNamedProduct::serialize_element` + | ...ment(&mut self, name: Option<&str>, elem: &T) -> Result<(), Self::Error>; + | ^^^^^^^^^ required by this bound in `SerializeNamedProduct::serialize_element` error[E0277]: the column type `Test` does not implement `SpacetimeType` --> tests/ui/tables.rs:5:8 diff --git a/crates/bindings/tests/ui/views.stderr b/crates/bindings/tests/ui/views.stderr index 091a6a7c346..27d45a21fe5 100644 --- a/crates/bindings/tests/ui/views.stderr +++ b/crates/bindings/tests/ui/views.stderr @@ -115,8 +115,8 @@ error[E0599]: no method named `iter` found for reference `&test__ViewHandle` in error[E0599]: `&test__ViewHandle` is not an iterator --> tests/ui/views.rs:22:33 | - 3 | #[table(name = test)] - | ------------------- doesn't satisfy `test__ViewHandle: Iterator` + 3 | #[table(accessor = test)] + | ----------------------- doesn't satisfy `test__ViewHandle: Iterator` ... 22 | let _ = read_only.db.test().count(); | ^^^^^ `&test__ViewHandle` is not an iterator From 4462684d0c368289c06dd7c94ce00679e89e5084 Mon Sep 17 00:00:00 2001 From: Shubham Mishra Date: Thu, 12 Feb 2026 00:53:17 +0530 Subject: [PATCH 011/133] views accessor --- .../views-auto-migrate-updated/src/lib.rs | 2 +- .../modules/views-auto-migrate/src/lib.rs | 2 +- .../smoketests/modules/views-basic/src/lib.rs | 2 +- .../modules/views-broken-namespace/src/lib.rs | 2 +- .../views-broken-return-type/src/lib.rs | 2 +- .../smoketests/modules/views-query/src/lib.rs | 12 ++--- .../modules/views-recovered/src/lib.rs | 2 +- .../smoketests/modules/views-sql/src/lib.rs | 12 ++--- .../modules/views-subscribe/src/lib.rs | 2 +- .../modules/views-trapped/src/lib.rs | 2 +- .../00400-key-architecture.md | 2 +- .../00300-tables/00400-access-permissions.md | 8 ++-- modules/module-test/src/lib.rs | 2 +- smoketests/tests/views.py | 46 +++++++++---------- 14 files changed, 49 insertions(+), 49 deletions(-) diff --git a/crates/smoketests/modules/views-auto-migrate-updated/src/lib.rs b/crates/smoketests/modules/views-auto-migrate-updated/src/lib.rs index 62aa4faea31..45dea406313 100644 --- a/crates/smoketests/modules/views-auto-migrate-updated/src/lib.rs +++ b/crates/smoketests/modules/views-auto-migrate-updated/src/lib.rs @@ -9,7 +9,7 @@ pub struct PlayerState { level: u64, } -#[spacetimedb::view(name = player, public)] +#[spacetimedb::view(accessor = player, public)] pub fn player(ctx: &ViewContext) -> Option { ctx.db.player_state().id().find(2u64) } diff --git a/crates/smoketests/modules/views-auto-migrate/src/lib.rs b/crates/smoketests/modules/views-auto-migrate/src/lib.rs index 0d5f5d97f49..b47b4b78300 100644 --- a/crates/smoketests/modules/views-auto-migrate/src/lib.rs +++ b/crates/smoketests/modules/views-auto-migrate/src/lib.rs @@ -9,7 +9,7 @@ pub struct PlayerState { level: u64, } -#[spacetimedb::view(name = player, public)] +#[spacetimedb::view(accessor = player, public)] pub fn player(ctx: &ViewContext) -> Option { ctx.db.player_state().id().find(1u64) } diff --git a/crates/smoketests/modules/views-basic/src/lib.rs b/crates/smoketests/modules/views-basic/src/lib.rs index 8550053c593..9dc6c52f3ae 100644 --- a/crates/smoketests/modules/views-basic/src/lib.rs +++ b/crates/smoketests/modules/views-basic/src/lib.rs @@ -9,7 +9,7 @@ pub struct PlayerState { level: u64, } -#[spacetimedb::view(name = player, public)] +#[spacetimedb::view(accessor = player, public)] pub fn player(ctx: &ViewContext) -> Option { ctx.db.player_state().id().find(0u64) } diff --git a/crates/smoketests/modules/views-broken-namespace/src/lib.rs b/crates/smoketests/modules/views-broken-namespace/src/lib.rs index 6302bda8563..19b1338f1ae 100644 --- a/crates/smoketests/modules/views-broken-namespace/src/lib.rs +++ b/crates/smoketests/modules/views-broken-namespace/src/lib.rs @@ -5,7 +5,7 @@ pub struct Person { name: String, } -#[spacetimedb::view(name = person, public)] +#[spacetimedb::view(accessor = person, public)] pub fn person(ctx: &ViewContext) -> Option { None } diff --git a/crates/smoketests/modules/views-broken-return-type/src/lib.rs b/crates/smoketests/modules/views-broken-return-type/src/lib.rs index 6870e091f02..bab05cbee44 100644 --- a/crates/smoketests/modules/views-broken-return-type/src/lib.rs +++ b/crates/smoketests/modules/views-broken-return-type/src/lib.rs @@ -7,7 +7,7 @@ pub enum ABC { C, } -#[spacetimedb::view(name = person, public)] +#[spacetimedb::view(accessor = person, public)] pub fn person(ctx: &ViewContext) -> Option { None } diff --git a/crates/smoketests/modules/views-query/src/lib.rs b/crates/smoketests/modules/views-query/src/lib.rs index b1bbda9be76..e464a457990 100644 --- a/crates/smoketests/modules/views-query/src/lib.rs +++ b/crates/smoketests/modules/views-query/src/lib.rs @@ -50,12 +50,12 @@ fn init(ctx: &ReducerContext) { }); } -#[spacetimedb::view(name = online_users, public)] +#[spacetimedb::view(accessor = online_users, public)] fn online_users(ctx: &ViewContext) -> Query { ctx.from.user().r#where(|c| c.online.eq(true)).build() } -#[spacetimedb::view(name = online_users_age, public)] +#[spacetimedb::view(accessor = online_users_age, public)] fn online_users_age(ctx: &ViewContext) -> Query { ctx.from .user() @@ -64,7 +64,7 @@ fn online_users_age(ctx: &ViewContext) -> Query { .build() } -#[spacetimedb::view(name = offline_user_20_years_old, public)] +#[spacetimedb::view(accessor = offline_user_20_years_old, public)] fn offline_user_in_twienties(ctx: &ViewContext) -> Query { ctx.from .person() @@ -74,7 +74,7 @@ fn offline_user_in_twienties(ctx: &ViewContext) -> Query { .build() } -#[spacetimedb::view(name = users_whos_age_is_known, public)] +#[spacetimedb::view(accessor = users_whos_age_is_known, public)] fn users_whos_age_is_known(ctx: &ViewContext) -> Query { ctx.from .user() @@ -82,12 +82,12 @@ fn users_whos_age_is_known(ctx: &ViewContext) -> Query { .build() } -#[spacetimedb::view(name = users_who_are_above_20_and_below_30, public)] +#[spacetimedb::view(accessor = users_who_are_above_20_and_below_30, public)] fn users_who_are_above_20_and_below_30(ctx: &ViewContext) -> Query { ctx.from.person().r#where(|p| p.age.gt(20).and(p.age.lt(30))).build() } -#[spacetimedb::view(name = users_who_are_above_eq_20_and_below_eq_30, public)] +#[spacetimedb::view(accessor = users_who_are_above_eq_20_and_below_eq_30, public)] fn users_who_are_above_eq_20_and_below_eq_30(ctx: &ViewContext) -> Query { ctx.from.person().r#where(|p| p.age.gte(20).and(p.age.lte(30))).build() } diff --git a/crates/smoketests/modules/views-recovered/src/lib.rs b/crates/smoketests/modules/views-recovered/src/lib.rs index 62aa4faea31..45dea406313 100644 --- a/crates/smoketests/modules/views-recovered/src/lib.rs +++ b/crates/smoketests/modules/views-recovered/src/lib.rs @@ -9,7 +9,7 @@ pub struct PlayerState { level: u64, } -#[spacetimedb::view(name = player, public)] +#[spacetimedb::view(accessor = player, public)] pub fn player(ctx: &ViewContext) -> Option { ctx.db.player_state().id().find(2u64) } diff --git a/crates/smoketests/modules/views-sql/src/lib.rs b/crates/smoketests/modules/views-sql/src/lib.rs index 0d12b8ad7a5..57e9a758553 100644 --- a/crates/smoketests/modules/views-sql/src/lib.rs +++ b/crates/smoketests/modules/views-sql/src/lib.rs @@ -24,35 +24,35 @@ pub fn add_player_level(ctx: &ReducerContext, id: u64, level: u64) { ctx.db.player_level().insert(PlayerState { id, level }); } -#[spacetimedb::view(name = my_player_and_level, public)] +#[spacetimedb::view(accessor = my_player_and_level, public)] pub fn my_player_and_level(ctx: &AnonymousViewContext) -> Option { ctx.db.player_level().id().find(0) } -#[spacetimedb::view(name = player_and_level, public)] +#[spacetimedb::view(accessor = player_and_level, public)] pub fn player_and_level(ctx: &AnonymousViewContext) -> Vec { ctx.db.player_level().level().filter(2u64).collect() } -#[spacetimedb::view(name = player, public)] +#[spacetimedb::view(accessor = player, public)] pub fn player(ctx: &ViewContext) -> Option { log::info!("player view called"); ctx.db.player_state().id().find(42) } -#[spacetimedb::view(name = player_none, public)] +#[spacetimedb::view(accessor = player_none, public)] pub fn player_none(_ctx: &ViewContext) -> Option { None } -#[spacetimedb::view(name = player_vec, public)] +#[spacetimedb::view(accessor = player_vec, public)] pub fn player_vec(ctx: &ViewContext) -> Vec { let first = ctx.db.player_state().id().find(42).unwrap(); let second = PlayerState { id: 7, level: 3 }; vec![first, second] } -#[spacetimedb::view(name = player_info_multi_index, public)] +#[spacetimedb::view(accessor = player_info_multi_index, public)] pub fn player_info_view(ctx: &ViewContext) -> Option { log::info!("player_info called"); ctx.db.player_info().age_level_index().filter((25u64, 7u64)).next() diff --git a/crates/smoketests/modules/views-subscribe/src/lib.rs b/crates/smoketests/modules/views-subscribe/src/lib.rs index c227c97d74e..05b96d5414e 100644 --- a/crates/smoketests/modules/views-subscribe/src/lib.rs +++ b/crates/smoketests/modules/views-subscribe/src/lib.rs @@ -8,7 +8,7 @@ pub struct PlayerState { name: String, } -#[spacetimedb::view(name = my_player, public)] +#[spacetimedb::view(accessor = my_player, public)] pub fn my_player(ctx: &ViewContext) -> Option { ctx.db.player_state().identity().find(ctx.sender()) } diff --git a/crates/smoketests/modules/views-trapped/src/lib.rs b/crates/smoketests/modules/views-trapped/src/lib.rs index fb80c195dcc..ca599af7ec8 100644 --- a/crates/smoketests/modules/views-trapped/src/lib.rs +++ b/crates/smoketests/modules/views-trapped/src/lib.rs @@ -9,7 +9,7 @@ pub struct PlayerState { level: u64, } -#[spacetimedb::view(name = player, public)] +#[spacetimedb::view(accessor = player, public)] pub fn player(_ctx: &ViewContext) -> Option { panic!("This view is trapped") } diff --git a/docs/docs/00100-intro/00100-getting-started/00400-key-architecture.md b/docs/docs/00100-intro/00100-getting-started/00400-key-architecture.md index 1cfb8f81001..755742f230d 100644 --- a/docs/docs/00100-intro/00100-getting-started/00400-key-architecture.md +++ b/docs/docs/00100-intro/00100-getting-started/00400-key-architecture.md @@ -521,7 +521,7 @@ public static Player? MyPlayer(ViewContext ctx) A view can be written in Rust like so: ```rust -#[spacetimedb::view(name = my_player, public)] +#[spacetimedb::view(accessor = my_player, public)] fn my_player(ctx: &spacetimedb::ViewContext) -> Option { ctx.db.player().identity().find(ctx.sender()) } diff --git a/docs/docs/00200-core-concepts/00300-tables/00400-access-permissions.md b/docs/docs/00200-core-concepts/00300-tables/00400-access-permissions.md index e7723235a8b..23af5e45aef 100644 --- a/docs/docs/00200-core-concepts/00300-tables/00400-access-permissions.md +++ b/docs/docs/00200-core-concepts/00300-tables/00400-access-permissions.md @@ -380,7 +380,7 @@ public static List FindUsersByName(ViewContext ctx) ```rust -#[spacetimedb::view(name = find_users_by_name, public)] +#[spacetimedb::view(accessor = find_users_by_name, public)] fn find_users_by_name(ctx: &ViewContext) -> Vec { // Can read and filter ctx.db.user().name().filter("Alice").collect() @@ -509,7 +509,7 @@ pub struct Message { } // Public view that only returns messages the caller can see -#[spacetimedb::view(name = my_messages, public)] +#[spacetimedb::view(accessor = my_messages, public)] fn my_messages(ctx: &ViewContext) -> Vec { // Look up messages by index where caller is sender or recipient let sent: Vec<_> = ctx.db.message().sender().filter(&ctx.sender()).collect(); @@ -685,7 +685,7 @@ pub struct PublicUserProfile { } // Public view that returns the caller's profile without sensitive data -#[spacetimedb::view(name = my_profile, public)] +#[spacetimedb::view(accessor = my_profile, public)] fn my_profile(ctx: &ViewContext) -> Option { // Look up the caller's account by their identity (unique index) let user = ctx.db.user_account().identity().find(&ctx.sender())?; @@ -881,7 +881,7 @@ pub struct Colleague { } // View that returns colleagues in the caller's department, without salary info -#[spacetimedb::view(name = my_colleagues, public)] +#[spacetimedb::view(accessor = my_colleagues, public)] fn my_colleagues(ctx: &ViewContext) -> Vec { // Find the caller's employee record by identity (unique index) let Some(me) = ctx.db.employee().identity().find(&ctx.sender()) else { diff --git a/modules/module-test/src/lib.rs b/modules/module-test/src/lib.rs index f42834c6ccf..4876c17cf65 100644 --- a/modules/module-test/src/lib.rs +++ b/modules/module-test/src/lib.rs @@ -204,7 +204,7 @@ impl Foo<'_> { // VIEWS // ───────────────────────────────────────────────────────────────────────────── -#[spacetimedb::view(name = my_player, public)] +#[spacetimedb::view(accessor = my_player, public)] fn my_player(ctx: &ViewContext) -> Option { ctx.db.player().identity().find(ctx.sender()) } diff --git a/smoketests/tests/views.py b/smoketests/tests/views.py index ac475ce243c..5d5352f3531 100644 --- a/smoketests/tests/views.py +++ b/smoketests/tests/views.py @@ -13,7 +13,7 @@ class Views(Smoketest): level: u64, } -#[spacetimedb::view(name = player, public)] +#[spacetimedb::view(accessor = player, public)] pub fn player(ctx: &ViewContext) -> Option { ctx.db.player_state().id().find(0u64) } @@ -46,7 +46,7 @@ class FailPublish(Smoketest): name: String, } -#[spacetimedb::view(name = person, public)] +#[spacetimedb::view(accessor = person, public)] pub fn person(ctx: &ViewContext) -> Option { None } @@ -62,7 +62,7 @@ class FailPublish(Smoketest): C, } -#[spacetimedb::view(name = person, public)] +#[spacetimedb::view(accessor = person, public)] pub fn person(ctx: &ViewContext) -> Option { None } @@ -117,35 +117,35 @@ class SqlViews(Smoketest): ctx.db.player_level().insert(PlayerState { id, level }); } -#[spacetimedb::view(name = my_player_and_level, public)] +#[spacetimedb::view(accessor = my_player_and_level, public)] pub fn my_player_and_level(ctx: &AnonymousViewContext) -> Option { ctx.db.player_level().id().find(0) } -#[spacetimedb::view(name = player_and_level, public)] +#[spacetimedb::view(accessor = player_and_level, public)] pub fn player_and_level(ctx: &AnonymousViewContext) -> Vec { ctx.db.player_level().level().filter(2u64).collect() } -#[spacetimedb::view(name = player, public)] +#[spacetimedb::view(accessor = player, public)] pub fn player(ctx: &ViewContext) -> Option { log::info!("player view called"); ctx.db.player_state().id().find(42) } -#[spacetimedb::view(name = player_none, public)] +#[spacetimedb::view(accessor = player_none, public)] pub fn player_none(_ctx: &ViewContext) -> Option { None } -#[spacetimedb::view(name = player_vec, public)] +#[spacetimedb::view(accessor = player_vec, public)] pub fn player_vec(ctx: &ViewContext) -> Vec { let first = ctx.db.player_state().id().find(42).unwrap(); let second = PlayerState { id: 7, level: 3 }; vec![first, second] } -#[spacetimedb::view(name = player_info_multi_index, public)] +#[spacetimedb::view(accessor = player_info_multi_index, public)] pub fn player_info_view(ctx: &ViewContext) -> Option { log::info!("player_info called"); @@ -366,7 +366,7 @@ class AutoMigrateViews(Smoketest): #[index(btree)] level: u64, } -#[spacetimedb::view(name = player, public)] +#[spacetimedb::view(accessor = player, public)] pub fn player(ctx: &ViewContext) -> Option { ctx.db.player_state().id().find(1u64) } @@ -383,7 +383,7 @@ class AutoMigrateViews(Smoketest): #[index(btree)] level: u64, } -#[spacetimedb::view(name = player, public)] +#[spacetimedb::view(accessor = player, public)] pub fn player(ctx: &ViewContext) -> Option { ctx.db.player_state().id().find(2u64) } @@ -439,7 +439,7 @@ class AutoMigrateDropView(Smoketest): level: u64, } -#[spacetimedb::view(name = player, public)] +#[spacetimedb::view(accessor = player, public)] pub fn player(ctx: &ViewContext) -> Option { ctx.db.player_state().id().find(1u64) } @@ -487,7 +487,7 @@ class AutoMigrateAddView(Smoketest): level: u64, } -#[spacetimedb::view(name = player, public)] +#[spacetimedb::view(accessor = player, public)] pub fn player(ctx: &ViewContext) -> Option { ctx.db.player_state().id().find(1u64) } @@ -511,7 +511,7 @@ class AutoMigrateViewsTrapped(Smoketest): #[index(btree)] level: u64, } -#[spacetimedb::view(name = player, public)] +#[spacetimedb::view(accessor = player, public)] pub fn player(ctx: &ViewContext) -> Option { ctx.db.player_state().id().find(1u64) } @@ -528,7 +528,7 @@ class AutoMigrateViewsTrapped(Smoketest): #[index(btree)] level: u64, } -#[spacetimedb::view(name = player, public)] +#[spacetimedb::view(accessor = player, public)] pub fn player(_ctx: &ViewContext) -> Option { panic!("This view is trapped") } @@ -545,7 +545,7 @@ class AutoMigrateViewsTrapped(Smoketest): #[index(btree)] level: u64, } -#[spacetimedb::view(name = player, public)] +#[spacetimedb::view(accessor = player, public)] pub fn player(ctx: &ViewContext) -> Option { ctx.db.player_state().id().find(2u64) } @@ -607,7 +607,7 @@ class SubscribeViews(Smoketest): name: String, } -#[spacetimedb::view(name = my_player, public)] +#[spacetimedb::view(accessor = my_player, public)] pub fn my_player(ctx: &ViewContext) -> Option { ctx.db.player_state().identity().find(ctx.sender()) } @@ -723,12 +723,12 @@ class QueryView(Smoketest): } -#[spacetimedb::view(name = online_users, public)] +#[spacetimedb::view(accessor = online_users, public)] fn online_users(ctx: &ViewContext) -> Query { ctx.from.user().r#where(|c| c.online.eq(true)).build() } -#[spacetimedb::view(name = online_users_age, public)] +#[spacetimedb::view(accessor = online_users_age, public)] fn online_users_age(ctx: &ViewContext) -> Query { ctx.from .user() @@ -737,7 +737,7 @@ class QueryView(Smoketest): .build() } -#[spacetimedb::view(name = offline_user_20_years_old, public)] +#[spacetimedb::view(accessor = offline_user_20_years_old, public)] fn offline_user_in_twienties(ctx: &ViewContext) -> Query { ctx.from .person() @@ -747,7 +747,7 @@ class QueryView(Smoketest): .build() } -#[spacetimedb::view(name = users_whos_age_is_known, public)] +#[spacetimedb::view(accessor = users_whos_age_is_known, public)] fn users_whos_age_is_known(ctx: &ViewContext) -> Query { ctx.from .user() @@ -755,7 +755,7 @@ class QueryView(Smoketest): .build() } -#[spacetimedb::view(name = users_who_are_above_20_and_below_30, public)] +#[spacetimedb::view(accessor = users_who_are_above_20_and_below_30, public)] fn users_who_are_above_20_and_below_30(ctx: &ViewContext) -> Query { ctx.from .person() @@ -763,7 +763,7 @@ class QueryView(Smoketest): .build() } -#[spacetimedb::view(name = users_who_are_above_eq_20_and_below_eq_30, public)] +#[spacetimedb::view(accessor = users_who_are_above_eq_20_and_below_eq_30, public)] fn users_who_are_above_eq_20_and_below_eq_30(ctx: &ViewContext) -> Query { ctx.from .person() From ee62ea2af7a3c6c1c7bccad37b340277ebec3d6e Mon Sep 17 00:00:00 2001 From: Shubham Mishra Date: Thu, 12 Feb 2026 01:17:28 +0530 Subject: [PATCH 012/133] insta --- crates/bindings/tests/ui/views.stderr | 34 +- .../snapshots/codegen__codegen_csharp.snap | 102 +- .../codegen__codegen_typescript.snap.new | 1278 ----------------- modules/module-test/src/lib.rs | 8 +- 4 files changed, 72 insertions(+), 1350 deletions(-) delete mode 100644 crates/codegen/tests/snapshots/codegen__codegen_typescript.snap.new diff --git a/crates/bindings/tests/ui/views.stderr b/crates/bindings/tests/ui/views.stderr index 27d45a21fe5..75d641aaef2 100644 --- a/crates/bindings/tests/ui/views.stderr +++ b/crates/bindings/tests/ui/views.stderr @@ -2,27 +2,27 @@ error: views must be `public`, e.g. `#[view(public)]` --> tests/ui/views.rs:76:1 | 76 | #[view(accessor = view_def_no_public)] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: this error originates in the attribute macro `view` (in Nightly builds, run with -Z macro-backtrace for more info) error: `public` already specified - --> tests/ui/views.rs:82:44 + --> tests/ui/views.rs:82:48 | 82 | #[view(accessor = view_def_dup_public, public, public)] - | ^^^^^^ + | ^^^^^^ -error: `name` already specified - --> tests/ui/views.rs:88:34 +error: expected string literal + --> tests/ui/views.rs:88:45 | 88 | #[view(accessor = view_def_dup_name, name = view_def_dup_name, public)] - | ^^^^ + | ^^^^^^^^^^^^^^^^^ -error: expected `name` or `public` - --> tests/ui/views.rs:94:49 +error: expected one of: `name`, `public`, `accessor` + --> tests/ui/views.rs:94:53 | 94 | #[view(accessor = view_def_unsupported_arg, public, anonymous)] - | ^^^^^^^^^ + | ^^^^^^^^^ error: Views must always have a context parameter: `&ViewContext` or `&AnonymousViewContext` --> tests/ui/views.rs:101:1 @@ -81,7 +81,7 @@ error[E0277]: the trait bound `ViewKind: ViewKindTrait` is not s --> tests/ui/views.rs:106:1 | 106 | #[view(accessor = view_def_wrong_context, public)] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `ViewKindTrait` is not implemented for `ViewKind` + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `ViewKindTrait` is not implemented for `ViewKind` | help: the following other types implement trait `ViewKindTrait` --> src/rt.rs @@ -97,7 +97,7 @@ error[E0276]: impl has stricter requirements than trait --> tests/ui/views.rs:106:1 | 106 | #[view(accessor = view_def_wrong_context, public)] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl has extra requirement `ViewKind: ViewKindTrait` + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl has extra requirement `ViewKind: ViewKindTrait` | = note: this error originates in the attribute macro `view` (in Nightly builds, run with -Z macro-backtrace for more info) @@ -199,7 +199,7 @@ error[E0599]: no function or associated item named `register` found for struct ` --> tests/ui/views.rs:106:1 | 106 | #[view(accessor = view_def_wrong_context, public)] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function or associated item not found in `ViewRegistrar` + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function or associated item not found in `ViewRegistrar` | = note: the function or associated item was found for - `ViewRegistrar` @@ -224,7 +224,7 @@ error[E0599]: no function or associated item named `invoke` found for struct `Vi --> tests/ui/views.rs:106:1 | 106 | #[view(accessor = view_def_wrong_context, public)] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function or associated item not found in `ViewDispatcher` + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function or associated item not found in `ViewDispatcher` | = note: the function or associated item was found for - `ViewDispatcher` @@ -235,7 +235,7 @@ error[E0277]: invalid view signature --> tests/ui/views.rs:128:1 | 128 | #[view(accessor = view_def_wrong_return, public)] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this view signature is not valid + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this view signature is not valid | = help: the trait `spacetimedb::rt::View<'_, _, _>` is not implemented for fn item `for<'a> fn(&'a ViewContext) -> Player {view_def_wrong_return}` = note: @@ -280,7 +280,7 @@ error[E0277]: invalid view signature --> tests/ui/views.rs:128:1 | 128 | #[view(accessor = view_def_wrong_return, public)] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this view signature is not valid + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this view signature is not valid | = help: the trait `spacetimedb::rt::View<'_, _, _>` is not implemented for fn item `for<'a> fn(&'a ViewContext) -> Player {view_def_wrong_return}` = note: @@ -302,7 +302,7 @@ error[E0277]: invalid anonymous view signature --> tests/ui/views.rs:136:1 | 136 | #[view(accessor = view_def_returns_not_a_spacetime_type, public)] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this view signature is not valid + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this view signature is not valid | = help: the trait `AnonymousView<'_, _, _>` is not implemented for fn item `for<'a> fn(&'a AnonymousViewContext) -> Option {view_def_returns_not_a_spacetime_type}` = note: @@ -371,7 +371,7 @@ error[E0277]: invalid anonymous view signature --> tests/ui/views.rs:136:1 | 136 | #[view(accessor = view_def_returns_not_a_spacetime_type, public)] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this view signature is not valid + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this view signature is not valid | = help: the trait `AnonymousView<'_, _, _>` is not implemented for fn item `for<'a> fn(&'a AnonymousViewContext) -> Option {view_def_returns_not_a_spacetime_type}` = note: diff --git a/crates/codegen/tests/snapshots/codegen__codegen_csharp.snap b/crates/codegen/tests/snapshots/codegen__codegen_csharp.snap index 626a43853f6..78191aabc14 100644 --- a/crates/codegen/tests/snapshots/codegen__codegen_csharp.snap +++ b/crates/codegen/tests/snapshots/codegen__codegen_csharp.snap @@ -1031,11 +1031,11 @@ namespace SpacetimeDB { [DataMember(Name = "arg")] public TestA Arg; - [DataMember(Name = "arg2")] + [DataMember(Name = "arg_2")] public TestB Arg2; - [DataMember(Name = "arg3")] + [DataMember(Name = "arg_3")] public NamespaceTestC Arg3; - [DataMember(Name = "arg4")] + [DataMember(Name = "arg_4")] public NamespaceTestF Arg4; public Test( @@ -1923,38 +1923,38 @@ namespace SpacetimeDB { protected override string RemoteTableName => "logged_out_player"; - public sealed class IdentityUniqueIndex : UniqueIndexBase + public sealed class LoggedOutPlayerIdentityIdxBtreeUniqueIndex : UniqueIndexBase { protected override SpacetimeDB.Identity GetKey(Player row) => row.Identity; - public IdentityUniqueIndex(LoggedOutPlayerHandle table) : base(table) { } + public LoggedOutPlayerIdentityIdxBtreeUniqueIndex(LoggedOutPlayerHandle table) : base(table) { } } - public readonly IdentityUniqueIndex Identity; + public readonly LoggedOutPlayerIdentityIdxBtreeUniqueIndex LoggedOutPlayerIdentityIdxBtree; - public sealed class NameUniqueIndex : UniqueIndexBase + public sealed class LoggedOutPlayerNameIdxBtreeUniqueIndex : UniqueIndexBase { protected override string GetKey(Player row) => row.Name; - public NameUniqueIndex(LoggedOutPlayerHandle table) : base(table) { } + public LoggedOutPlayerNameIdxBtreeUniqueIndex(LoggedOutPlayerHandle table) : base(table) { } } - public readonly NameUniqueIndex Name; + public readonly LoggedOutPlayerNameIdxBtreeUniqueIndex LoggedOutPlayerNameIdxBtree; - public sealed class PlayerIdUniqueIndex : UniqueIndexBase + public sealed class LoggedOutPlayerPlayerIdIdxBtreeUniqueIndex : UniqueIndexBase { protected override ulong GetKey(Player row) => row.PlayerId; - public PlayerIdUniqueIndex(LoggedOutPlayerHandle table) : base(table) { } + public LoggedOutPlayerPlayerIdIdxBtreeUniqueIndex(LoggedOutPlayerHandle table) : base(table) { } } - public readonly PlayerIdUniqueIndex PlayerId; + public readonly LoggedOutPlayerPlayerIdIdxBtreeUniqueIndex LoggedOutPlayerPlayerIdIdxBtree; internal LoggedOutPlayerHandle(DbConnection conn) : base(conn) { - Identity = new(this); - Name = new(this); - PlayerId = new(this); + LoggedOutPlayerIdentityIdxBtree = new(this); + LoggedOutPlayerNameIdxBtree = new(this); + LoggedOutPlayerPlayerIdIdxBtree = new(this); } protected override object GetPrimaryKey(Player row) => row.Identity; @@ -2072,19 +2072,19 @@ namespace SpacetimeDB public readonly AgeIndex Age; - public sealed class IdUniqueIndex : UniqueIndexBase + public sealed class PersonIdIdxBtreeUniqueIndex : UniqueIndexBase { protected override uint GetKey(Person row) => row.Id; - public IdUniqueIndex(PersonHandle table) : base(table) { } + public PersonIdIdxBtreeUniqueIndex(PersonHandle table) : base(table) { } } - public readonly IdUniqueIndex Id; + public readonly PersonIdIdxBtreeUniqueIndex PersonIdIdxBtree; internal PersonHandle(DbConnection conn) : base(conn) { Age = new(this); - Id = new(this); + PersonIdIdxBtree = new(this); } protected override object GetPrimaryKey(Person row) => row.Id; @@ -2140,28 +2140,28 @@ namespace SpacetimeDB { protected override string RemoteTableName => "pk_multi_identity"; - public sealed class IdUniqueIndex : UniqueIndexBase + public sealed class PkMultiIdentityIdIdxBtreeUniqueIndex : UniqueIndexBase { protected override uint GetKey(PkMultiIdentity row) => row.Id; - public IdUniqueIndex(PkMultiIdentityHandle table) : base(table) { } + public PkMultiIdentityIdIdxBtreeUniqueIndex(PkMultiIdentityHandle table) : base(table) { } } - public readonly IdUniqueIndex Id; + public readonly PkMultiIdentityIdIdxBtreeUniqueIndex PkMultiIdentityIdIdxBtree; - public sealed class OtherUniqueIndex : UniqueIndexBase + public sealed class PkMultiIdentityOtherIdxBtreeUniqueIndex : UniqueIndexBase { protected override uint GetKey(PkMultiIdentity row) => row.Other; - public OtherUniqueIndex(PkMultiIdentityHandle table) : base(table) { } + public PkMultiIdentityOtherIdxBtreeUniqueIndex(PkMultiIdentityHandle table) : base(table) { } } - public readonly OtherUniqueIndex Other; + public readonly PkMultiIdentityOtherIdxBtreeUniqueIndex PkMultiIdentityOtherIdxBtree; internal PkMultiIdentityHandle(DbConnection conn) : base(conn) { - Id = new(this); - Other = new(this); + PkMultiIdentityIdIdxBtree = new(this); + PkMultiIdentityOtherIdxBtree = new(this); } protected override object GetPrimaryKey(PkMultiIdentity row) => row.Id; @@ -2215,38 +2215,38 @@ namespace SpacetimeDB { protected override string RemoteTableName => "player"; - public sealed class IdentityUniqueIndex : UniqueIndexBase + public sealed class PlayerIdentityIdxBtreeUniqueIndex : UniqueIndexBase { protected override SpacetimeDB.Identity GetKey(Player row) => row.Identity; - public IdentityUniqueIndex(PlayerHandle table) : base(table) { } + public PlayerIdentityIdxBtreeUniqueIndex(PlayerHandle table) : base(table) { } } - public readonly IdentityUniqueIndex Identity; + public readonly PlayerIdentityIdxBtreeUniqueIndex PlayerIdentityIdxBtree; - public sealed class NameUniqueIndex : UniqueIndexBase + public sealed class PlayerNameIdxBtreeUniqueIndex : UniqueIndexBase { protected override string GetKey(Player row) => row.Name; - public NameUniqueIndex(PlayerHandle table) : base(table) { } + public PlayerNameIdxBtreeUniqueIndex(PlayerHandle table) : base(table) { } } - public readonly NameUniqueIndex Name; + public readonly PlayerNameIdxBtreeUniqueIndex PlayerNameIdxBtree; - public sealed class PlayerIdUniqueIndex : UniqueIndexBase + public sealed class PlayerPlayerIdIdxBtreeUniqueIndex : UniqueIndexBase { protected override ulong GetKey(Player row) => row.PlayerId; - public PlayerIdUniqueIndex(PlayerHandle table) : base(table) { } + public PlayerPlayerIdIdxBtreeUniqueIndex(PlayerHandle table) : base(table) { } } - public readonly PlayerIdUniqueIndex PlayerId; + public readonly PlayerPlayerIdIdxBtreeUniqueIndex PlayerPlayerIdIdxBtree; internal PlayerHandle(DbConnection conn) : base(conn) { - Identity = new(this); - Name = new(this); - PlayerId = new(this); + PlayerIdentityIdxBtree = new(this); + PlayerNameIdxBtree = new(this); + PlayerPlayerIdIdxBtree = new(this); } protected override object GetPrimaryKey(Player row) => row.Identity; @@ -2414,18 +2414,18 @@ namespace SpacetimeDB { protected override string RemoteTableName => "repeating_test_arg"; - public sealed class ScheduledIdUniqueIndex : UniqueIndexBase + public sealed class RepeatingTestArgScheduledIdIdxBtreeUniqueIndex : UniqueIndexBase { protected override ulong GetKey(RepeatingTestArg row) => row.ScheduledId; - public ScheduledIdUniqueIndex(RepeatingTestArgHandle table) : base(table) { } + public RepeatingTestArgScheduledIdIdxBtreeUniqueIndex(RepeatingTestArgHandle table) : base(table) { } } - public readonly ScheduledIdUniqueIndex ScheduledId; + public readonly RepeatingTestArgScheduledIdIdxBtreeUniqueIndex RepeatingTestArgScheduledIdIdxBtree; internal RepeatingTestArgHandle(DbConnection conn) : base(conn) { - ScheduledId = new(this); + RepeatingTestArgScheduledIdIdxBtree = new(this); } protected override object GetPrimaryKey(RepeatingTestArg row) => row.ScheduledId; @@ -2636,28 +2636,28 @@ namespace SpacetimeDB { protected override string RemoteTableName => "test_e"; - public sealed class IdUniqueIndex : UniqueIndexBase + public sealed class TestEIdIdxBtreeUniqueIndex : UniqueIndexBase { protected override ulong GetKey(TestE row) => row.Id; - public IdUniqueIndex(TestEHandle table) : base(table) { } + public TestEIdIdxBtreeUniqueIndex(TestEHandle table) : base(table) { } } - public readonly IdUniqueIndex Id; + public readonly TestEIdIdxBtreeUniqueIndex TestEIdIdxBtree; - public sealed class NameIndex : BTreeIndexBase + public sealed class TestENameIdxBtreeIndex : BTreeIndexBase { protected override string GetKey(TestE row) => row.Name; - public NameIndex(TestEHandle table) : base(table) { } + public TestENameIdxBtreeIndex(TestEHandle table) : base(table) { } } - public readonly NameIndex Name; + public readonly TestENameIdxBtreeIndex TestENameIdxBtree; internal TestEHandle(DbConnection conn) : base(conn) { - Id = new(this); - Name = new(this); + TestEIdIdxBtree = new(this); + TestENameIdxBtree = new(this); } protected override object GetPrimaryKey(TestE row) => row.Id; diff --git a/crates/codegen/tests/snapshots/codegen__codegen_typescript.snap.new b/crates/codegen/tests/snapshots/codegen__codegen_typescript.snap.new deleted file mode 100644 index 77917f07eef..00000000000 --- a/crates/codegen/tests/snapshots/codegen__codegen_typescript.snap.new +++ /dev/null @@ -1,1278 +0,0 @@ ---- -source: crates/codegen/tests/codegen.rs -assertion_line: 37 -expression: outfiles ---- -"add_player_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. - -/* eslint-disable */ -/* tslint:disable */ -import { - TypeBuilder as __TypeBuilder, - t as __t, - type AlgebraicTypeType as __AlgebraicTypeType, - type Infer as __Infer, -} from "spacetimedb"; - -export default { - name: __t.string(), -}; -''' -"add_private_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. - -/* eslint-disable */ -/* tslint:disable */ -import { - TypeBuilder as __TypeBuilder, - t as __t, - type AlgebraicTypeType as __AlgebraicTypeType, - type Infer as __Infer, -} from "spacetimedb"; - -export default { - name: __t.string(), -}; -''' -"add_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. - -/* eslint-disable */ -/* tslint:disable */ -import { - TypeBuilder as __TypeBuilder, - t as __t, - type AlgebraicTypeType as __AlgebraicTypeType, - type Infer as __Infer, -} from "spacetimedb"; - -export default { - name: __t.string(), - age: __t.u8(), -}; -''' -"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 YOUR MODULE SOURCE CODE INSTEAD. - -/* eslint-disable */ -/* tslint:disable */ -import { - TypeBuilder as __TypeBuilder, - t as __t, - type AlgebraicTypeType as __AlgebraicTypeType, - type Infer as __Infer, -} from "spacetimedb"; - -export default {}; -''' -"baz_type.ts" = ''' -// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. - -/* eslint-disable */ -/* tslint:disable */ -import { - TypeBuilder as __TypeBuilder, - t as __t, - type AlgebraicTypeType as __AlgebraicTypeType, - type Infer as __Infer, -} from "spacetimedb"; - -export default __t.object("Baz", { - field: __t.string(), -}); - - -''' -"delete_player_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. - -/* eslint-disable */ -/* tslint:disable */ -import { - TypeBuilder as __TypeBuilder, - t as __t, - type AlgebraicTypeType as __AlgebraicTypeType, - type Infer as __Infer, -} from "spacetimedb"; - -export default { - id: __t.u64(), -}; -''' -"delete_players_by_name_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. - -/* eslint-disable */ -/* tslint:disable */ -import { - TypeBuilder as __TypeBuilder, - t as __t, - type AlgebraicTypeType as __AlgebraicTypeType, - type Infer as __Infer, -} from "spacetimedb"; - -export default { - name: __t.string(), -}; -''' -"foobar_type.ts" = ''' -// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. - -/* eslint-disable */ -/* tslint:disable */ -import { - TypeBuilder as __TypeBuilder, - t as __t, - type AlgebraicTypeType as __AlgebraicTypeType, - type Infer as __Infer, -} from "spacetimedb"; -import Baz from "./baz_type"; - - -// The tagged union or sum type for the algebraic type `Foobar`. -const Foobar = __t.enum("Foobar", {get Baz() { - return Baz; - }, - Bar: __t.unit(), - Har: __t.u32(), -}); - -export default Foobar; - - -''' -"get_my_schema_via_http_procedure.ts" = ''' -// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. - -/* eslint-disable */ -/* tslint:disable */ -import { - TypeBuilder as __TypeBuilder, - t as __t, - type AlgebraicTypeType as __AlgebraicTypeType, - type Infer as __Infer, -} from "spacetimedb"; - -export const params = { -}; -export const returnType = __t.string()''' -"has_special_stuff_table.ts" = ''' -// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. - -/* eslint-disable */ -/* tslint:disable */ -import { - TypeBuilder as __TypeBuilder, - t as __t, - type AlgebraicTypeType as __AlgebraicTypeType, - type Infer as __Infer, -} from "spacetimedb"; - -export default __t.row({ - identity: __t.identity(), - connectionId: __t.connectionId().name("connection_id"), -}); -''' -"has_special_stuff_type.ts" = ''' -// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. - -/* eslint-disable */ -/* tslint:disable */ -import { - TypeBuilder as __TypeBuilder, - t as __t, - type AlgebraicTypeType as __AlgebraicTypeType, - type Infer as __Infer, -} from "spacetimedb"; - -export default __t.object("HasSpecialStuff", { - identity: __t.identity(), - connectionId: __t.connectionId(), -}); - - -''' -"index.ts" = ''' -// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. - -VERSION_COMMENT - -/* eslint-disable */ -/* tslint:disable */ -import { - DbConnectionBuilder as __DbConnectionBuilder, - DbConnectionImpl as __DbConnectionImpl, - SubscriptionBuilderImpl as __SubscriptionBuilderImpl, - TypeBuilder as __TypeBuilder, - Uuid as __Uuid, - convertToAccessorMap as __convertToAccessorMap, - makeQueryBuilder as __makeQueryBuilder, - procedureSchema as __procedureSchema, - procedures as __procedures, - reducerSchema as __reducerSchema, - reducers as __reducers, - schema as __schema, - t as __t, - table as __table, - type AlgebraicTypeType as __AlgebraicTypeType, - type DbConnectionConfig as __DbConnectionConfig, - type ErrorContextInterface as __ErrorContextInterface, - type Event as __Event, - type EventContextInterface as __EventContextInterface, - type Infer as __Infer, - type QueryBuilder as __QueryBuilder, - type ReducerEventContextInterface as __ReducerEventContextInterface, - type RemoteModule as __RemoteModule, - type SubscriptionEventContextInterface as __SubscriptionEventContextInterface, - type SubscriptionHandleImpl as __SubscriptionHandleImpl, -} from "spacetimedb"; - -// Import and reexport all reducer arg types -import AddReducer from "./add_reducer"; -export { AddReducer }; -import AddPlayerReducer from "./add_player_reducer"; -export { AddPlayerReducer }; -import AddPrivateReducer from "./add_private_reducer"; -export { AddPrivateReducer }; -import AssertCallerIdentityIsModuleIdentityReducer from "./assert_caller_identity_is_module_identity_reducer"; -export { AssertCallerIdentityIsModuleIdentityReducer }; -import DeletePlayerReducer from "./delete_player_reducer"; -export { DeletePlayerReducer }; -import DeletePlayersByNameReducer from "./delete_players_by_name_reducer"; -export { DeletePlayersByNameReducer }; -import ListOverAgeReducer from "./list_over_age_reducer"; -export { ListOverAgeReducer }; -import LogModuleIdentityReducer from "./log_module_identity_reducer"; -export { LogModuleIdentityReducer }; -import QueryPrivateReducer from "./query_private_reducer"; -export { QueryPrivateReducer }; -import SayHelloReducer from "./say_hello_reducer"; -export { SayHelloReducer }; -import TestReducer from "./test_reducer"; -export { TestReducer }; -import TestBtreeIndexArgsReducer from "./test_btree_index_args_reducer"; -export { TestBtreeIndexArgsReducer }; - -// Import and reexport all procedure arg types -import * as GetMySchemaViaHttpProcedure from "./get_my_schema_via_http_procedure"; -export { GetMySchemaViaHttpProcedure }; -import * as ReturnValueProcedure from "./return_value_procedure"; -export { ReturnValueProcedure }; -import * as SleepOneSecondProcedure from "./sleep_one_second_procedure"; -export { SleepOneSecondProcedure }; -import * as WithTxProcedure from "./with_tx_procedure"; -export { WithTxProcedure }; - -// Import and reexport all table handle types -import HasSpecialStuffRow from "./has_special_stuff_table"; -export { HasSpecialStuffRow }; -import LoggedOutPlayerRow from "./logged_out_player_table"; -export { LoggedOutPlayerRow }; -import MyPlayerRow from "./my_player_table"; -export { MyPlayerRow }; -import PersonRow from "./person_table"; -export { PersonRow }; -import PkMultiIdentityRow from "./pk_multi_identity_table"; -export { PkMultiIdentityRow }; -import PlayerRow from "./player_table"; -export { PlayerRow }; -import PointsRow from "./points_table"; -export { PointsRow }; -import PrivateTableRow from "./private_table_table"; -export { PrivateTableRow }; -import RepeatingTestArgRow from "./repeating_test_arg_table"; -export { RepeatingTestArgRow }; -import TableToRemoveRow from "./table_to_remove_table"; -export { TableToRemoveRow }; -import TestARow from "./test_a_table"; -export { TestARow }; -import TestDRow from "./test_d_table"; -export { TestDRow }; -import TestERow from "./test_e_table"; -export { TestERow }; -import TestFRow from "./test_f_table"; -export { TestFRow }; - -// Import and reexport all types -import Baz from "./baz_type"; -export { Baz }; -import Foobar from "./foobar_type"; -export { Foobar }; -import HasSpecialStuff from "./has_special_stuff_type"; -export { HasSpecialStuff }; -import Person from "./person_type"; -export { Person }; -import PkMultiIdentity from "./pk_multi_identity_type"; -export { PkMultiIdentity }; -import Player from "./player_type"; -export { Player }; -import Point from "./point_type"; -export { Point }; -import PrivateTable from "./private_table_type"; -export { PrivateTable }; -import RemoveTable from "./remove_table_type"; -export { RemoveTable }; -import RepeatingTestArg from "./repeating_test_arg_type"; -export { RepeatingTestArg }; -import TestA from "./test_a_type"; -export { TestA }; -import TestB from "./test_b_type"; -export { TestB }; -import TestD from "./test_d_type"; -export { TestD }; -import TestE from "./test_e_type"; -export { TestE }; -import TestFoobar from "./test_foobar_type"; -export { TestFoobar }; -import NamespaceTestC from "./namespace_test_c_type"; -export { NamespaceTestC }; -import NamespaceTestF from "./namespace_test_f_type"; -export { NamespaceTestF }; - -/** The schema information for all tables in this module. This is defined the same was as the tables would have been defined in the server. */ -const tablesSchema = __schema( - __table({ - name: 'has_special_stuff', - indexes: [ - ], - constraints: [ - ], - }, HasSpecialStuffRow), - __table({ - name: 'logged_out_player', - indexes: [ - { name: 'logged_out_player_identity_idx_btree', algorithm: 'btree', columns: [ - 'identity', - ] }, - { name: 'logged_out_player_name_idx_btree', algorithm: 'btree', columns: [ - 'name', - ] }, - { name: 'logged_out_player_player_id_idx_btree', algorithm: 'btree', columns: [ - 'playerId', - ] }, - ], - constraints: [ - { name: 'logged_out_player_identity_key', constraint: 'unique', columns: ['identity'] }, - { name: 'logged_out_player_name_key', constraint: 'unique', columns: ['name'] }, - { name: 'logged_out_player_player_id_key', constraint: 'unique', columns: ['playerId'] }, - ], - }, LoggedOutPlayerRow), - __table({ - name: 'person', - indexes: [ - { name: 'person_age_idx_btree', algorithm: 'btree', columns: [ - 'age', - ] }, - { name: 'person_id_idx_btree', algorithm: 'btree', columns: [ - 'id', - ] }, - ], - constraints: [ - { name: 'person_id_key', constraint: 'unique', columns: ['id'] }, - ], - }, PersonRow), - __table({ - name: 'pk_multi_identity', - indexes: [ - { name: 'pk_multi_identity_id_idx_btree', algorithm: 'btree', columns: [ - 'id', - ] }, - { name: 'pk_multi_identity_other_idx_btree', algorithm: 'btree', columns: [ - 'other', - ] }, - ], - constraints: [ - { name: 'pk_multi_identity_id_key', constraint: 'unique', columns: ['id'] }, - { name: 'pk_multi_identity_other_key', constraint: 'unique', columns: ['other'] }, - ], - }, PkMultiIdentityRow), - __table({ - name: 'player', - indexes: [ - { name: 'player_identity_idx_btree', algorithm: 'btree', columns: [ - 'identity', - ] }, - { name: 'player_name_idx_btree', algorithm: 'btree', columns: [ - 'name', - ] }, - { name: 'player_player_id_idx_btree', algorithm: 'btree', columns: [ - 'playerId', - ] }, - ], - constraints: [ - { name: 'player_identity_key', constraint: 'unique', columns: ['identity'] }, - { name: 'player_name_key', constraint: 'unique', columns: ['name'] }, - { name: 'player_player_id_key', constraint: 'unique', columns: ['playerId'] }, - ], - }, PlayerRow), - __table({ - name: 'points', - indexes: [ - { name: 'points_x_y_idx_btree', algorithm: 'btree', columns: [ - 'x', - 'y', - ] }, - ], - constraints: [ - ], - }, PointsRow), - __table({ - name: 'private_table', - indexes: [ - ], - constraints: [ - ], - }, PrivateTableRow), - __table({ - name: 'repeating_test_arg', - indexes: [ - { name: 'repeating_test_arg_scheduled_id_idx_btree', algorithm: 'btree', columns: [ - 'scheduledId', - ] }, - ], - constraints: [ - { name: 'repeating_test_arg_scheduled_id_key', constraint: 'unique', columns: ['scheduledId'] }, - ], - }, RepeatingTestArgRow), - __table({ - name: 'table_to_remove', - indexes: [ - ], - constraints: [ - ], - }, TableToRemoveRow), - __table({ - name: 'test_a', - indexes: [ - { name: 'test_a_x_idx_btree', algorithm: 'btree', columns: [ - 'x', - ] }, - ], - constraints: [ - ], - }, TestARow), - __table({ - name: 'test_d', - indexes: [ - ], - constraints: [ - ], - }, TestDRow), - __table({ - name: 'test_e', - indexes: [ - { name: 'test_e_id_idx_btree', algorithm: 'btree', columns: [ - 'id', - ] }, - { name: 'test_e_name_idx_btree', algorithm: 'btree', columns: [ - 'name', - ] }, - ], - constraints: [ - { name: 'test_e_id_key', constraint: 'unique', columns: ['id'] }, - ], - }, TestERow), - __table({ - name: 'test_f', - indexes: [ - ], - constraints: [ - ], - }, TestFRow), - __table({ - name: 'my_player', - indexes: [ - ], - constraints: [ - ], - }, MyPlayerRow), -); - -/** The schema information for all reducers in this module. This is defined the same way as the reducers would have been defined in the server, except the body of the reducer is omitted in code generation. */ -const reducersSchema = __reducers( - __reducerSchema("add", AddReducer), - __reducerSchema("add_player", AddPlayerReducer), - __reducerSchema("add_private", AddPrivateReducer), - __reducerSchema("assert_caller_identity_is_module_identity", AssertCallerIdentityIsModuleIdentityReducer), - __reducerSchema("delete_player", DeletePlayerReducer), - __reducerSchema("delete_players_by_name", DeletePlayersByNameReducer), - __reducerSchema("list_over_age", ListOverAgeReducer), - __reducerSchema("log_module_identity", LogModuleIdentityReducer), - __reducerSchema("query_private", QueryPrivateReducer), - __reducerSchema("say_hello", SayHelloReducer), - __reducerSchema("test", TestReducer), - __reducerSchema("test_btree_index_args", TestBtreeIndexArgsReducer), -); - -/** The schema information for all procedures in this module. This is defined the same way as the procedures would have been defined in the server. */ -const proceduresSchema = __procedures( - __procedureSchema("get_my_schema_via_http", GetMySchemaViaHttpProcedure.params, GetMySchemaViaHttpProcedure.returnType), - __procedureSchema("return_value", ReturnValueProcedure.params, ReturnValueProcedure.returnType), - __procedureSchema("sleep_one_second", SleepOneSecondProcedure.params, SleepOneSecondProcedure.returnType), - __procedureSchema("with_tx", WithTxProcedure.params, WithTxProcedure.returnType), -); - -/** The remote SpacetimeDB module schema, both runtime and type information. */ -const REMOTE_MODULE = { - versionInfo: { - cliVersion: "1.12.0" as const, - }, - tables: tablesSchema.schemaType.tables, - reducers: reducersSchema.reducersType.reducers, - ...proceduresSchema, -} satisfies __RemoteModule< - typeof tablesSchema.schemaType, - typeof reducersSchema.reducersType, - typeof proceduresSchema ->; - -/** The tables available in this remote SpacetimeDB module. */ -export const tables = __convertToAccessorMap(tablesSchema.schemaType.tables); - -/** A typed query builder for this remote SpacetimeDB module. */ -export const query: __QueryBuilder = __makeQueryBuilder(tablesSchema.schemaType); - -/** The reducers available in this remote SpacetimeDB module. */ -export const reducers = __convertToAccessorMap(reducersSchema.reducersType.reducers); - -/** The context type returned in callbacks for all possible events. */ -export type EventContext = __EventContextInterface; -/** The context type returned in callbacks for reducer events. */ -export type ReducerEventContext = __ReducerEventContextInterface; -/** The context type returned in callbacks for subscription events. */ -export type SubscriptionEventContext = __SubscriptionEventContextInterface; -/** The context type returned in callbacks for error events. */ -export type ErrorContext = __ErrorContextInterface; -/** The subscription handle type to manage active subscriptions created from a {@link SubscriptionBuilder}. */ -export type SubscriptionHandle = __SubscriptionHandleImpl; - -/** Builder class to configure a new subscription to the remote SpacetimeDB instance. */ -export class SubscriptionBuilder extends __SubscriptionBuilderImpl {} - -/** Builder class to configure a new database connection to the remote SpacetimeDB instance. */ -export class DbConnectionBuilder extends __DbConnectionBuilder {} - -/** The typed database connection to manage connections to the remote SpacetimeDB instance. This class has type information specific to the generated module. */ -export class DbConnection extends __DbConnectionImpl { - /** Creates a new {@link DbConnectionBuilder} to configure and connect to the remote SpacetimeDB instance. */ - static builder = (): DbConnectionBuilder => { - return new DbConnectionBuilder(REMOTE_MODULE, (config: __DbConnectionConfig) => new DbConnection(config)); - }; - - /** Creates a new {@link SubscriptionBuilder} to configure a subscription to the remote SpacetimeDB instance. */ - override subscriptionBuilder = (): SubscriptionBuilder => { - return new SubscriptionBuilder(this); - }; -} - -''' -"list_over_age_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. - -/* eslint-disable */ -/* tslint:disable */ -import { - TypeBuilder as __TypeBuilder, - t as __t, - type AlgebraicTypeType as __AlgebraicTypeType, - type Infer as __Infer, -} from "spacetimedb"; - -export default { - age: __t.u8(), -}; -''' -"log_module_identity_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. - -/* eslint-disable */ -/* tslint:disable */ -import { - TypeBuilder as __TypeBuilder, - t as __t, - type AlgebraicTypeType as __AlgebraicTypeType, - type Infer as __Infer, -} from "spacetimedb"; - -export default {}; -''' -"logged_out_player_table.ts" = ''' -// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. - -/* eslint-disable */ -/* tslint:disable */ -import { - TypeBuilder as __TypeBuilder, - t as __t, - type AlgebraicTypeType as __AlgebraicTypeType, - type Infer as __Infer, -} from "spacetimedb"; - -export default __t.row({ - identity: __t.identity().primaryKey(), - playerId: __t.u64().name("player_id"), - name: __t.string(), -}); -''' -"my_player_table.ts" = ''' -// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. - -/* eslint-disable */ -/* tslint:disable */ -import { - TypeBuilder as __TypeBuilder, - t as __t, - type AlgebraicTypeType as __AlgebraicTypeType, - type Infer as __Infer, -} from "spacetimedb"; - -export default __t.row({ - identity: __t.identity(), - playerId: __t.u64().name("player_id"), - name: __t.string(), -}); -''' -"namespace_test_c_type.ts" = ''' -// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. - -/* eslint-disable */ -/* tslint:disable */ -import { - TypeBuilder as __TypeBuilder, - t as __t, - type AlgebraicTypeType as __AlgebraicTypeType, - type Infer as __Infer, -} from "spacetimedb"; - -// The tagged union or sum type for the algebraic type `NamespaceTestC`. -const NamespaceTestC = __t.enum("NamespaceTestC", {Foo: __t.unit(), - Bar: __t.unit(), -}); - -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 YOUR MODULE SOURCE CODE INSTEAD. - -/* eslint-disable */ -/* tslint:disable */ -import { - TypeBuilder as __TypeBuilder, - t as __t, - type AlgebraicTypeType as __AlgebraicTypeType, - type Infer as __Infer, -} from "spacetimedb"; - -// The tagged union or sum type for the algebraic type `NamespaceTestF`. -const NamespaceTestF = __t.enum("NamespaceTestF", {Foo: __t.unit(), - Bar: __t.unit(), - Baz: __t.string(), -}); - -export default NamespaceTestF; - - -''' -"person_table.ts" = ''' -// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. - -/* eslint-disable */ -/* tslint:disable */ -import { - TypeBuilder as __TypeBuilder, - t as __t, - type AlgebraicTypeType as __AlgebraicTypeType, - type Infer as __Infer, -} from "spacetimedb"; - -export default __t.row({ - id: __t.u32().primaryKey(), - name: __t.string(), - age: __t.u8(), -}); -''' -"person_type.ts" = ''' -// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. - -/* eslint-disable */ -/* tslint:disable */ -import { - TypeBuilder as __TypeBuilder, - t as __t, - type AlgebraicTypeType as __AlgebraicTypeType, - type Infer as __Infer, -} from "spacetimedb"; - -export default __t.object("Person", { - id: __t.u32(), - name: __t.string(), - age: __t.u8(), -}); - - -''' -"pk_multi_identity_table.ts" = ''' -// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. - -/* eslint-disable */ -/* tslint:disable */ -import { - TypeBuilder as __TypeBuilder, - t as __t, - type AlgebraicTypeType as __AlgebraicTypeType, - type Infer as __Infer, -} from "spacetimedb"; - -export default __t.row({ - id: __t.u32().primaryKey(), - other: __t.u32(), -}); -''' -"pk_multi_identity_type.ts" = ''' -// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. - -/* eslint-disable */ -/* tslint:disable */ -import { - TypeBuilder as __TypeBuilder, - t as __t, - type AlgebraicTypeType as __AlgebraicTypeType, - type Infer as __Infer, -} from "spacetimedb"; - -export default __t.object("PkMultiIdentity", { - id: __t.u32(), - other: __t.u32(), -}); - - -''' -"player_table.ts" = ''' -// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. - -/* eslint-disable */ -/* tslint:disable */ -import { - TypeBuilder as __TypeBuilder, - t as __t, - type AlgebraicTypeType as __AlgebraicTypeType, - type Infer as __Infer, -} from "spacetimedb"; - -export default __t.row({ - identity: __t.identity().primaryKey(), - playerId: __t.u64().name("player_id"), - name: __t.string(), -}); -''' -"player_type.ts" = ''' -// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. - -/* eslint-disable */ -/* tslint:disable */ -import { - TypeBuilder as __TypeBuilder, - t as __t, - type AlgebraicTypeType as __AlgebraicTypeType, - type Infer as __Infer, -} from "spacetimedb"; - -export default __t.object("Player", { - identity: __t.identity(), - playerId: __t.u64(), - name: __t.string(), -}); - - -''' -"point_type.ts" = ''' -// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. - -/* eslint-disable */ -/* tslint:disable */ -import { - TypeBuilder as __TypeBuilder, - t as __t, - type AlgebraicTypeType as __AlgebraicTypeType, - type Infer as __Infer, -} from "spacetimedb"; - -export default __t.object("Point", { - x: __t.i64(), - y: __t.i64(), -}); - - -''' -"points_table.ts" = ''' -// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. - -/* eslint-disable */ -/* tslint:disable */ -import { - TypeBuilder as __TypeBuilder, - t as __t, - type AlgebraicTypeType as __AlgebraicTypeType, - type Infer as __Infer, -} from "spacetimedb"; - -export default __t.row({ - x: __t.i64(), - y: __t.i64(), -}); -''' -"private_table_table.ts" = ''' -// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. - -/* eslint-disable */ -/* tslint:disable */ -import { - TypeBuilder as __TypeBuilder, - t as __t, - type AlgebraicTypeType as __AlgebraicTypeType, - type Infer as __Infer, -} from "spacetimedb"; - -export default __t.row({ - name: __t.string(), -}); -''' -"private_table_type.ts" = ''' -// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. - -/* eslint-disable */ -/* tslint:disable */ -import { - TypeBuilder as __TypeBuilder, - t as __t, - type AlgebraicTypeType as __AlgebraicTypeType, - type Infer as __Infer, -} from "spacetimedb"; - -export default __t.object("PrivateTable", { - name: __t.string(), -}); - - -''' -"query_private_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. - -/* eslint-disable */ -/* tslint:disable */ -import { - TypeBuilder as __TypeBuilder, - t as __t, - type AlgebraicTypeType as __AlgebraicTypeType, - type Infer as __Infer, -} from "spacetimedb"; - -export default {}; -''' -"remove_table_type.ts" = ''' -// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. - -/* eslint-disable */ -/* tslint:disable */ -import { - TypeBuilder as __TypeBuilder, - t as __t, - type AlgebraicTypeType as __AlgebraicTypeType, - type Infer as __Infer, -} from "spacetimedb"; - -export default __t.object("RemoveTable", { - id: __t.u32(), -}); - - -''' -"repeating_test_arg_table.ts" = ''' -// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. - -/* eslint-disable */ -/* tslint:disable */ -import { - TypeBuilder as __TypeBuilder, - t as __t, - type AlgebraicTypeType as __AlgebraicTypeType, - type Infer as __Infer, -} from "spacetimedb"; - -export default __t.row({ - scheduledId: __t.u64().primaryKey().name("scheduled_id"), - scheduledAt: __t.scheduleAt().name("scheduled_at"), - prevTime: __t.timestamp().name("prev_time"), -}); -''' -"repeating_test_arg_type.ts" = ''' -// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. - -/* eslint-disable */ -/* tslint:disable */ -import { - TypeBuilder as __TypeBuilder, - t as __t, - type AlgebraicTypeType as __AlgebraicTypeType, - type Infer as __Infer, -} from "spacetimedb"; - -export default __t.object("RepeatingTestArg", { - scheduledId: __t.u64(), - scheduledAt: __t.scheduleAt(), - prevTime: __t.timestamp(), -}); - - -''' -"return_value_procedure.ts" = ''' -// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. - -/* eslint-disable */ -/* tslint:disable */ -import { - TypeBuilder as __TypeBuilder, - t as __t, - type AlgebraicTypeType as __AlgebraicTypeType, - type Infer as __Infer, -} from "spacetimedb"; - -import Baz from "./baz_type"; - -export const params = { - foo: __t.u64(), -}; -export const returnType = Baz''' -"say_hello_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. - -/* eslint-disable */ -/* tslint:disable */ -import { - TypeBuilder as __TypeBuilder, - t as __t, - type AlgebraicTypeType as __AlgebraicTypeType, - type Infer as __Infer, -} from "spacetimedb"; - -export default {}; -''' -"sleep_one_second_procedure.ts" = ''' -// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. - -/* eslint-disable */ -/* tslint:disable */ -import { - TypeBuilder as __TypeBuilder, - t as __t, - type AlgebraicTypeType as __AlgebraicTypeType, - type Infer as __Infer, -} from "spacetimedb"; - -export const params = { -}; -export const returnType = __t.unit()''' -"table_to_remove_table.ts" = ''' -// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. - -/* eslint-disable */ -/* tslint:disable */ -import { - TypeBuilder as __TypeBuilder, - t as __t, - type AlgebraicTypeType as __AlgebraicTypeType, - type Infer as __Infer, -} from "spacetimedb"; - -export default __t.row({ - id: __t.u32(), -}); -''' -"test_a_table.ts" = ''' -// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. - -/* eslint-disable */ -/* tslint:disable */ -import { - TypeBuilder as __TypeBuilder, - t as __t, - type AlgebraicTypeType as __AlgebraicTypeType, - type Infer as __Infer, -} from "spacetimedb"; - -export default __t.row({ - x: __t.u32(), - y: __t.u32(), - z: __t.string(), -}); -''' -"test_a_type.ts" = ''' -// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. - -/* eslint-disable */ -/* tslint:disable */ -import { - TypeBuilder as __TypeBuilder, - t as __t, - type AlgebraicTypeType as __AlgebraicTypeType, - type Infer as __Infer, -} from "spacetimedb"; - -export default __t.object("TestA", { - x: __t.u32(), - y: __t.u32(), - z: __t.string(), -}); - - -''' -"test_b_type.ts" = ''' -// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. - -/* eslint-disable */ -/* tslint:disable */ -import { - TypeBuilder as __TypeBuilder, - t as __t, - type AlgebraicTypeType as __AlgebraicTypeType, - type Infer as __Infer, -} from "spacetimedb"; - -export default __t.object("TestB", { - foo: __t.string(), -}); - - -''' -"test_btree_index_args_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. - -/* eslint-disable */ -/* tslint:disable */ -import { - TypeBuilder as __TypeBuilder, - t as __t, - type AlgebraicTypeType as __AlgebraicTypeType, - type Infer as __Infer, -} from "spacetimedb"; - -export default {}; -''' -"test_d_table.ts" = ''' -// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. - -/* eslint-disable */ -/* tslint:disable */ -import { - TypeBuilder as __TypeBuilder, - t as __t, - type AlgebraicTypeType as __AlgebraicTypeType, - type Infer as __Infer, -} from "spacetimedb"; -import NamespaceTestC from "./namespace_test_c_type"; - - -export default __t.row({ - get testC() { - return __t.option(NamespaceTestC).name("test_c"); - }, -}); -''' -"test_d_type.ts" = ''' -// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. - -/* eslint-disable */ -/* tslint:disable */ -import { - TypeBuilder as __TypeBuilder, - t as __t, - type AlgebraicTypeType as __AlgebraicTypeType, - type Infer as __Infer, -} from "spacetimedb"; -import NamespaceTestC from "./namespace_test_c_type"; - - -export default __t.object("TestD", { - get testC() { - return __t.option(NamespaceTestC); - }, -}); - - -''' -"test_e_table.ts" = ''' -// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. - -/* eslint-disable */ -/* tslint:disable */ -import { - TypeBuilder as __TypeBuilder, - t as __t, - type AlgebraicTypeType as __AlgebraicTypeType, - type Infer as __Infer, -} from "spacetimedb"; - -export default __t.row({ - id: __t.u64().primaryKey(), - name: __t.string(), -}); -''' -"test_e_type.ts" = ''' -// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. - -/* eslint-disable */ -/* tslint:disable */ -import { - TypeBuilder as __TypeBuilder, - t as __t, - type AlgebraicTypeType as __AlgebraicTypeType, - type Infer as __Infer, -} from "spacetimedb"; - -export default __t.object("TestE", { - id: __t.u64(), - name: __t.string(), -}); - - -''' -"test_f_table.ts" = ''' -// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. - -/* eslint-disable */ -/* tslint:disable */ -import { - TypeBuilder as __TypeBuilder, - t as __t, - type AlgebraicTypeType as __AlgebraicTypeType, - type Infer as __Infer, -} from "spacetimedb"; -import Foobar from "./foobar_type"; - - -export default __t.row({ - get field() { - return Foobar; - }, -}); -''' -"test_foobar_type.ts" = ''' -// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. - -/* eslint-disable */ -/* tslint:disable */ -import { - TypeBuilder as __TypeBuilder, - t as __t, - type AlgebraicTypeType as __AlgebraicTypeType, - type Infer as __Infer, -} from "spacetimedb"; -import Foobar from "./foobar_type"; - - -export default __t.object("TestFoobar", { - get field() { - return Foobar; - }, -}); - - -''' -"test_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. - -/* eslint-disable */ -/* tslint:disable */ -import { - TypeBuilder as __TypeBuilder, - t as __t, - type AlgebraicTypeType as __AlgebraicTypeType, - type Infer as __Infer, -} from "spacetimedb"; - -import TestA from "./test_a_type"; -import TestB from "./test_b_type"; -import NamespaceTestC from "./namespace_test_c_type"; -import NamespaceTestF from "./namespace_test_f_type"; - -export default { - get arg() { - return TestA; - }, - get arg2() { - return TestB; - }, - get arg3() { - return NamespaceTestC; - }, - get arg4() { - return NamespaceTestF; - }, -}; -''' -"with_tx_procedure.ts" = ''' -// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. - -/* eslint-disable */ -/* tslint:disable */ -import { - TypeBuilder as __TypeBuilder, - t as __t, - type AlgebraicTypeType as __AlgebraicTypeType, - type Infer as __Infer, -} from "spacetimedb"; - -export const params = { -}; -export const returnType = __t.unit()''' diff --git a/modules/module-test/src/lib.rs b/modules/module-test/src/lib.rs index 4876c17cf65..bde3b425215 100644 --- a/modules/module-test/src/lib.rs +++ b/modules/module-test/src/lib.rs @@ -15,7 +15,7 @@ pub type TestAlias = TestA; // ───────────────────────────────────────────────────────────────────────────── #[cfg(feature = "test-add-column")] -#[spacetimedb::table(accessor = person, public, index(accessor = age, btree(columns = [age])))] +#[spacetimedb::table(accessor = person, public, index(accessor = age, name = "age", btree(columns = [age])))] pub struct Person { #[primary_key] #[auto_inc] @@ -27,7 +27,7 @@ pub struct Person { } #[cfg(not(feature = "test-add-column"))] -#[spacetimedb::table(accessor = person, public, index(accessor = age, btree(columns = [age])))] +#[spacetimedb::table(accessor = person, public, index(accessor = age, name = "age", btree(columns = [age])))] pub struct Person { #[primary_key] #[auto_inc] @@ -42,7 +42,7 @@ pub struct RemoveTable { pub id: u32, } -#[spacetimedb::table(accessor = test_a, index(accessor = foo, btree(columns = [x])))] +#[spacetimedb::table(accessor = test_a, index(accessor = foo, name = "foo", btree(columns = [x])))] pub struct TestA { pub x: u32, pub y: u32, @@ -128,7 +128,7 @@ pub struct PrivateTable { name: String, } -#[spacetimedb::table(accessor = points, private, index(accessor = multi_column_index, btree(columns = [x, y])))] +#[spacetimedb::table(accessor = points, private, index(accessor = multi_column_index, name = "multi_column_index", btree(columns = [x, y])))] pub struct Point { x: i64, y: i64, From 80e950ecd5818c6a1f5c3f6d2c9874a328a3b3c7 Mon Sep 17 00:00:00 2001 From: Shubham Mishra Date: Thu, 12 Feb 2026 14:16:04 +0530 Subject: [PATCH 013/133] explicit names macro --- crates/bindings-macro/src/procedure.rs | 5 +- crates/bindings-macro/src/reducer.rs | 35 ++++++++++ crates/bindings-macro/src/table.rs | 40 ++++++++++- crates/bindings-macro/src/view.rs | 11 ++- crates/bindings/src/rt.rs | 20 +++++- crates/bindings/src/table.rs | 4 +- crates/lib/Cargo.toml | 1 + crates/lib/src/db/raw_def/v10.rs | 97 ++++++++++++++++++++++++++ crates/lib/src/lib.rs | 3 + crates/sats/src/raw_identifier.rs | 8 ++- 10 files changed, 213 insertions(+), 11 deletions(-) diff --git a/crates/bindings-macro/src/procedure.rs b/crates/bindings-macro/src/procedure.rs index 1688a080896..24ef05b10a0 100644 --- a/crates/bindings-macro/src/procedure.rs +++ b/crates/bindings-macro/src/procedure.rs @@ -1,4 +1,4 @@ -use crate::reducer::{assert_only_lifetime_generics, extract_typed_args}; +use crate::reducer::{assert_only_lifetime_generics, extract_typed_args, generate_explicit_names_impl}; use crate::sym; use crate::util::{check_duplicate, ident_to_litstr, match_meta}; use proc_macro2::TokenStream; @@ -32,6 +32,7 @@ impl ProcedureArgs { pub(crate) fn procedure_impl(_args: ProcedureArgs, original_function: &ItemFn) -> syn::Result { let func_name = &original_function.sig.ident; let vis = &original_function.vis; + let explicit_name = _args.name.as_ref(); let procedure_name = ident_to_litstr(func_name); @@ -86,6 +87,8 @@ pub(crate) fn procedure_impl(_args: ProcedureArgs, original_function: &ItemFn) - } }; + let generate_explicit_names = generate_explicit_names_impl(&procedure_name.value(), func_name, explicit_name); + Ok(quote! { const _: () = { #generated_describe_function diff --git a/crates/bindings-macro/src/reducer.rs b/crates/bindings-macro/src/reducer.rs index e8db1f8ebac..dbf8afce373 100644 --- a/crates/bindings-macro/src/reducer.rs +++ b/crates/bindings-macro/src/reducer.rs @@ -104,6 +104,10 @@ pub(crate) fn reducer_impl(args: ReducerArgs, original_function: &ItemFn) -> syn let typed_args = extract_typed_args(original_function)?; + let explicit_name = args.name.as_ref(); + + let generate_explicit_names = generate_explicit_names_impl(&reducer_name.value(), func_name, explicit_name); + // Extract all function parameter names. let opt_arg_names = typed_args.iter().map(|arg| { if let syn::Pat::Ident(i) = &*arg.pat { @@ -165,5 +169,36 @@ pub(crate) fn reducer_impl(args: ReducerArgs, original_function: &ItemFn) -> syn const ARG_NAMES: &'static [Option<&'static str>] = &[#(#opt_arg_names),*]; const INVOKE: Self::Invoke = #func_name::invoke; } + + #generate_explicit_names }) } + +pub(crate) fn generate_explicit_names_impl( + func_name: &str, + func_handle: &Ident, + explicit_name: Option<&LitStr>, +) -> TokenStream { + let mut explicit_names_body = Vec::new(); + + // Table name + if let Some(explicit_name) = explicit_name { + explicit_names_body.push(quote! { + names.insert_function( + #func_name, + #explicit_name, + ); + }); + }; + + quote! { + + impl spacetimedb::rt::ExplicitNames for #func_handle { + fn explicit_names() -> spacetimedb::spacetimedb_lib::ExplicitNames { + let mut names = spacetimedb::spacetimedb_lib::ExplicitNames::default(); + #(#explicit_names_body)* + names + } + } + } +} diff --git a/crates/bindings-macro/src/table.rs b/crates/bindings-macro/src/table.rs index 78e4a15b4ea..f92ac71d3bb 100644 --- a/crates/bindings-macro/src/table.rs +++ b/crates/bindings-macro/src/table.rs @@ -17,7 +17,7 @@ use syn::{parse_quote, Ident, Path, Token}; pub(crate) struct TableArgs { access: Option, - _name: Option, + name: Option, scheduled: Option, accessor: Ident, indices: Vec, @@ -96,7 +96,7 @@ impl TableArgs { accessor = Some(value.parse()?); } sym::name => { - check_duplicate(&accessor, &meta)?; + check_duplicate(&name, &meta)?; let value = meta.value()?; name = Some(value.parse()?); } @@ -121,7 +121,7 @@ impl TableArgs { scheduled, accessor, indices, - _name: name, + name, }) } } @@ -714,6 +714,7 @@ pub(crate) fn table_impl(mut args: TableArgs, item: &syn::DeriveInput) -> syn::R let original_struct_ident = sats_ty.ident; let table_ident = &args.accessor; + let explicit_table_name = args.name.as_ref().map(|s| s.value()); let view_trait_ident = format_ident!("{}__view", table_ident); let query_trait_ident = format_ident!("{}__query", table_ident); let query_cols_struct = format_ident!("{}Cols", original_struct_ident); @@ -1019,6 +1020,8 @@ pub(crate) fn table_impl(mut args: TableArgs, item: &syn::DeriveInput) -> syn::R } }; + let explicit_names_impl = generate_explicit_names_impl(&table_name, &tablehandle_ident, &explicit_table_name); + let register_describer_symbol = format!("__preinit__20_register_describer_{table_ident}"); let describe_table_func = quote! { @@ -1178,6 +1181,8 @@ pub(crate) fn table_impl(mut args: TableArgs, item: &syn::DeriveInput) -> syn::R #tabletype_impl + #explicit_names_impl + #[allow(non_camel_case_types)] mod __indices { #[allow(unused)] @@ -1198,3 +1203,32 @@ pub(crate) fn table_impl(mut args: TableArgs, item: &syn::DeriveInput) -> syn::R Ok(emission) } + +fn generate_explicit_names_impl( + table_name: &str, + tablehandle_ident: &Ident, + explicit_table_name: &Option, +) -> TokenStream { + let mut explicit_names_body = Vec::new(); + + // Table name + if let Some(explicit_table_name) = explicit_table_name { + explicit_names_body.push(quote! { + names.insert_table( + #table_name, + #explicit_table_name, + ); + }); + }; + + quote! { + + impl spacetimedb::rt::ExplicitNames for #tablehandle_ident { + fn explicit_names() -> spacetimedb::spacetimedb_lib::ExplicitNames { + let mut names = spacetimedb::spacetimedb_lib::ExplicitNames::default(); + #(#explicit_names_body)* + names + } + } + } +} diff --git a/crates/bindings-macro/src/view.rs b/crates/bindings-macro/src/view.rs index 084d608bceb..c0930f99ff1 100644 --- a/crates/bindings-macro/src/view.rs +++ b/crates/bindings-macro/src/view.rs @@ -5,11 +5,12 @@ use syn::ext::IdentExt; use syn::parse::Parser; use syn::{FnArg, ItemFn, LitStr}; +use crate::reducer::generate_explicit_names_impl; use crate::sym; use crate::util::{check_duplicate_msg, match_meta}; pub(crate) struct ViewArgs { - _name: Option, + name: Option, accessor: Ident, #[allow(unused)] public: bool, @@ -49,7 +50,7 @@ impl ViewArgs { let () = public .ok_or_else(|| syn::Error::new(Span::call_site(), "views must be `public`, e.g. `#[view(public)]`"))?; Ok(Self { - _name: name, + name, public: true, accessor, }) @@ -147,6 +148,10 @@ pub(crate) fn view_impl(args: ViewArgs, original_function: &ItemFn) -> syn::Resu } }; + let explicit_name = args.name.as_ref(); + + let generate_explicit_names = generate_explicit_names_impl(&view_name, func_name, explicit_name); + Ok(quote! { const _: () = { #generated_describe_function }; @@ -196,5 +201,7 @@ pub(crate) fn view_impl(args: ViewArgs, original_function: &ItemFn) -> syn::Resu Some(<#ret_ty as spacetimedb::SpacetimeType>::make_type(ts)) } } + + #generate_explicit_names }) } diff --git a/crates/bindings/src/rt.rs b/crates/bindings/src/rt.rs index f1c1f752b13..4eef867b96e 100644 --- a/crates/bindings/src/rt.rs +++ b/crates/bindings/src/rt.rs @@ -4,7 +4,7 @@ use crate::query_builder::Query; use crate::table::IndexAlgo; use crate::{sys, AnonymousViewContext, IterBuf, ReducerContext, ReducerResult, SpacetimeType, Table, ViewContext}; use spacetimedb_lib::bsatn::EncodeError; -use spacetimedb_lib::db::raw_def::v10::RawModuleDefV10Builder; +use spacetimedb_lib::db::raw_def::v10::{ExplicitNameEntry, ExplicitNames as RawExplicitNames, RawModuleDefV10Builder}; pub use spacetimedb_lib::db::raw_def::v9::Lifecycle as LifecycleReducer; use spacetimedb_lib::db::raw_def::v9::{RawIndexAlgorithm, TableType, ViewResultHeader}; use spacetimedb_lib::de::{self, Deserialize, DeserializeOwned, Error as _, SeqProductAccess}; @@ -141,7 +141,7 @@ pub trait AnonymousView<'de, A: Args<'de>, T: ViewReturn> { } /// A trait for types that can *describe* a callable function such as a reducer or view. -pub trait FnInfo { +pub trait FnInfo: ExplicitNames { /// The type of function to invoke. type Invoke; @@ -735,6 +735,8 @@ pub fn register_table() { } table.finish(); + + module.inner.add_explicit_names(T::explicit_names()); }) } @@ -762,6 +764,8 @@ pub fn register_reducer<'a, A: Args<'a>, I: FnInfo>(_: impl module.inner.add_reducer(I::NAME, params); } module.reducers.push(I::INVOKE); + + module.inner.add_explicit_names(I::explicit_names()); }) } @@ -777,6 +781,8 @@ where let ret_ty = ::make_type(&mut module.inner); module.inner.add_procedure(I::NAME, params, ret_ty); module.procedures.push(I::INVOKE); + + module.inner.add_explicit_names(I::explicit_names()); }) } @@ -794,6 +800,8 @@ where .inner .add_view(I::NAME, module.views.len(), true, false, params, return_type); module.views.push(I::INVOKE); + + module.inner.add_explicit_names(I::explicit_names()); }) } @@ -811,6 +819,8 @@ where .inner .add_view(I::NAME, module.views_anon.len(), true, true, params, return_type); module.views_anon.push(I::INVOKE); + + module.inner.add_explicit_names(I::explicit_names()); }) } @@ -1273,3 +1283,9 @@ pub(crate) fn read_bytes_source_as(source: BytesS bsatn::from_slice::(&buf) .unwrap_or_else(|err| panic!("Failed to BSATN-deserialize `{}`: {err:#?}", std::any::type_name::())) } + +pub trait ExplicitNames { + fn explicit_names() -> RawExplicitNames { + RawExplicitNames::default() + } +} diff --git a/crates/bindings/src/table.rs b/crates/bindings/src/table.rs index fbae4b1c05c..5e75335e7a8 100644 --- a/crates/bindings/src/table.rs +++ b/crates/bindings/src/table.rs @@ -1,4 +1,4 @@ -use crate::{bsatn, sys, DeserializeOwned, IterBuf, Serialize, SpacetimeType, TableId}; +use crate::{bsatn, rt::ExplicitNames, sys, DeserializeOwned, IterBuf, Serialize, SpacetimeType, TableId}; use core::borrow::Borrow; use core::convert::Infallible; use core::fmt; @@ -17,7 +17,7 @@ pub use spacetimedb_primitives::{ColId, IndexId}; /// /// To get a `TableHandle` // TODO: should we rename this `TableHandle`? Documenting this, I think that's much clearer. -pub trait Table: TableInternal { +pub trait Table: TableInternal + ExplicitNames { /// The type of rows stored in this table. type Row: SpacetimeType + Serialize + DeserializeOwned + Sized + 'static; diff --git a/crates/lib/Cargo.toml b/crates/lib/Cargo.toml index 9eadb07888a..c153f09a7a0 100644 --- a/crates/lib/Cargo.toml +++ b/crates/lib/Cargo.toml @@ -53,6 +53,7 @@ enum-map = { workspace = true, optional = true } # For the 'proptest' feature. proptest = { workspace = true, optional = true } proptest-derive = { workspace = true, optional = true } +spacetimedb-data-structures.workspace = true [dev-dependencies] spacetimedb-sats = { path = "../sats", features = ["test"] } diff --git a/crates/lib/src/db/raw_def/v10.rs b/crates/lib/src/db/raw_def/v10.rs index f4fb2a8012e..442b00ae863 100644 --- a/crates/lib/src/db/raw_def/v10.rs +++ b/crates/lib/src/db/raw_def/v10.rs @@ -7,6 +7,8 @@ use crate::db::raw_def::v9::{Lifecycle, RawIndexAlgorithm, TableAccess, TableType}; use core::fmt; +use spacetimedb_data_structures::map::HashMap; +use spacetimedb_data_structures::small_map::SmallHashMap; use spacetimedb_primitives::{ColId, ColList}; use spacetimedb_sats::raw_identifier::RawIdentifier; use spacetimedb_sats::typespace::TypespaceBuilder; @@ -83,8 +85,69 @@ pub enum RawModuleDefV10Section { LifeCycleReducers(Vec), RowLevelSecurity(Vec), //TODO: Add section for Event tables, and Case conversion before exposing this from module + + CaseConversionPolicy(CaseConversionPolicy), + + ExplicitNames(ExplicitNames), +} + +/// Specifies how identifiers should be converted when interpreting module definitions. +#[derive(Debug, Clone, Copy, Default, SpacetimeType)] +#[cfg_attr(feature = "test", derive(PartialEq, Eq, PartialOrd, Ord))] +#[sats(crate = crate)] +#[non_exhaustive] +pub enum CaseConversionPolicy { + /// No conversion - names used verbatim as canonical names + None, + /// Convert to snake_case (SpacetimeDB default) + #[default] + SnakeCase, + /// Convert to camelCase + CamelCase, + /// Convert to PascalCase (UpperCamelCase) + PascalCase, +} + +#[derive(Debug, Clone, SpacetimeType)] +#[sats(crate = crate)] +#[cfg_attr(feature = "test", derive(PartialEq, Eq, Ord, PartialOrd))] +#[non_exhaustive] +pub struct ExplicitNameEntry { + /// The original name as written in the raw module definition. + source_name: RawIdentifier, + + /// The canonical name after applying case conversion. + canonical_name: RawIdentifier, } +#[derive(Debug, Default, Clone, SpacetimeType)] +#[sats(crate = crate)] +#[cfg_attr(feature = "test", derive(PartialEq, Eq, Ord, PartialOrd))] +#[non_exhaustive] +pub struct ExplicitNames { + tables: Vec, + funcs: Vec, +} + +impl ExplicitNames { + pub fn insert_table(&mut self, source_name: impl Into, canonical_name: impl Into) { + self.tables.push(ExplicitNameEntry { + source_name: source_name.into(), + canonical_name: canonical_name.into(), + }); + } + pub fn insert_function(&mut self, source_name: impl Into, canonical_name: impl Into) { + self.funcs.push(ExplicitNameEntry { + source_name: source_name.into(), + canonical_name: canonical_name.into(), + }); + } + + pub fn merge(&mut self, other: ExplicitNames) { + self.tables.extend(other.tables); + self.funcs.extend(other.funcs); + } +} pub type RawRowLevelSecurityDefV10 = crate::db::raw_def::v9::RawRowLevelSecurityDefV9; /// The definition of a database table. @@ -489,6 +552,16 @@ impl RawModuleDefV10 { _ => None, }) } + + pub fn case_conversion_policy(&self) -> CaseConversionPolicy { + self.sections + .iter() + .find_map(|s| match s { + RawModuleDefV10Section::CaseConversionPolicy(policy) => Some(*policy), + _ => None, + }) + .unwrap_or_default() + } } /// A builder for a [`RawModuleDefV10`]. @@ -666,6 +739,26 @@ impl RawModuleDefV10Builder { } } + /// Get mutable access to the case conversion policy, creating it if missing. + fn explicit_names_mut(&mut self) -> &mut ExplicitNames { + let idx = self + .module + .sections + .iter() + .position(|s| matches!(s, RawModuleDefV10Section::ExplicitNames(_))) + .unwrap_or_else(|| { + self.module + .sections + .push(RawModuleDefV10Section::ExplicitNames(ExplicitNames::default())); + self.module.sections.len() - 1 + }); + + match &mut self.module.sections[idx] { + RawModuleDefV10Section::ExplicitNames(names) => names, + _ => unreachable!("Just ensured ExplicitNames section exists"), + } + } + /// Create a table builder. /// /// Does not validate that the product_type_ref is valid; this is left to the module validation code. @@ -910,6 +1003,10 @@ impl RawModuleDefV10Builder { .push(RawRowLevelSecurityDefV10 { sql: sql.into() }); } + pub fn add_explicit_names(&mut self, names: ExplicitNames) { + self.explicit_names_mut().merge(names); + } + /// Finish building, consuming the builder and returning the module. /// The module should be validated before use. pub fn finish(self) -> RawModuleDefV10 { diff --git a/crates/lib/src/lib.rs b/crates/lib/src/lib.rs index 9bd0a26bf15..2e8b9c08336 100644 --- a/crates/lib/src/lib.rs +++ b/crates/lib/src/lib.rs @@ -1,5 +1,8 @@ use crate::db::raw_def::v9::RawModuleDefV9Builder; use crate::db::raw_def::RawTableDefV8; + +#[doc(hidden)] +pub use crate::db::raw_def::v10::ExplicitNames; use anyhow::Context; use sats::typespace::TypespaceBuilder; use spacetimedb_sats::raw_identifier::RawIdentifier; diff --git a/crates/sats/src/raw_identifier.rs b/crates/sats/src/raw_identifier.rs index 65267b622b3..dc5da05af97 100644 --- a/crates/sats/src/raw_identifier.rs +++ b/crates/sats/src/raw_identifier.rs @@ -3,7 +3,7 @@ use crate::{impl_deserialize, impl_serialize, impl_st}; use core::borrow::Borrow; use core::fmt; use core::ops::Deref; -use lean_string::LeanString; +use lean_string::{LeanString, ToLeanString}; /// A not-yet-validated identifier. #[derive(Default, PartialEq, Eq, PartialOrd, Ord, Hash, Clone)] @@ -60,3 +60,9 @@ impl From<&'static str> for RawIdentifier { RawIdentifier(LeanString::from_static_str(s)) } } + +impl From for RawIdentifier { + fn from(s: String) -> Self { + RawIdentifier(s.to_lean_string()) + } +} From 616f22bda77790679e07eb12b33a3de28d53f04b Mon Sep 17 00:00:00 2001 From: Shubham Mishra Date: Thu, 12 Feb 2026 14:37:28 +0530 Subject: [PATCH 014/133] index fix --- Cargo.lock | 1 + crates/bindings-macro/src/procedure.rs | 2 ++ crates/bindings/src/rt.rs | 2 +- crates/lib/src/db/raw_def/v10.rs | 2 -- crates/schema/src/def/validate/v10.rs | 2 +- crates/schema/src/def/validate/v9.rs | 24 ++++++++++++++++++------ 6 files changed, 23 insertions(+), 10 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 1092ebb45d7..1eb24dc4037 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -7992,6 +7992,7 @@ dependencies = [ "serde", "serde_json", "spacetimedb-bindings-macro 1.12.0", + "spacetimedb-data-structures", "spacetimedb-memory-usage", "spacetimedb-metrics", "spacetimedb-primitives 1.12.0", diff --git a/crates/bindings-macro/src/procedure.rs b/crates/bindings-macro/src/procedure.rs index 24ef05b10a0..e18f002c297 100644 --- a/crates/bindings-macro/src/procedure.rs +++ b/crates/bindings-macro/src/procedure.rs @@ -129,5 +129,7 @@ pub(crate) fn procedure_impl(_args: ProcedureArgs, original_function: &ItemFn) - Some(<#ret_ty_for_info as spacetimedb::SpacetimeType>::make_type(ts)) } } + + #generate_explicit_names }) } diff --git a/crates/bindings/src/rt.rs b/crates/bindings/src/rt.rs index 4eef867b96e..4c300aec27e 100644 --- a/crates/bindings/src/rt.rs +++ b/crates/bindings/src/rt.rs @@ -4,7 +4,7 @@ use crate::query_builder::Query; use crate::table::IndexAlgo; use crate::{sys, AnonymousViewContext, IterBuf, ReducerContext, ReducerResult, SpacetimeType, Table, ViewContext}; use spacetimedb_lib::bsatn::EncodeError; -use spacetimedb_lib::db::raw_def::v10::{ExplicitNameEntry, ExplicitNames as RawExplicitNames, RawModuleDefV10Builder}; +use spacetimedb_lib::db::raw_def::v10::{ExplicitNames as RawExplicitNames, RawModuleDefV10Builder}; pub use spacetimedb_lib::db::raw_def::v9::Lifecycle as LifecycleReducer; use spacetimedb_lib::db::raw_def::v9::{RawIndexAlgorithm, TableType, ViewResultHeader}; use spacetimedb_lib::de::{self, Deserialize, DeserializeOwned, Error as _, SeqProductAccess}; diff --git a/crates/lib/src/db/raw_def/v10.rs b/crates/lib/src/db/raw_def/v10.rs index 442b00ae863..88f8cef3765 100644 --- a/crates/lib/src/db/raw_def/v10.rs +++ b/crates/lib/src/db/raw_def/v10.rs @@ -7,8 +7,6 @@ use crate::db::raw_def::v9::{Lifecycle, RawIndexAlgorithm, TableAccess, TableType}; use core::fmt; -use spacetimedb_data_structures::map::HashMap; -use spacetimedb_data_structures::small_map::SmallHashMap; use spacetimedb_primitives::{ColId, ColList}; use spacetimedb_sats::raw_identifier::RawIdentifier; use spacetimedb_sats::typespace::TypespaceBuilder; diff --git a/crates/schema/src/def/validate/v10.rs b/crates/schema/src/def/validate/v10.rs index 163ad1a9f36..4402de4c6a3 100644 --- a/crates/schema/src/def/validate/v10.rs +++ b/crates/schema/src/def/validate/v10.rs @@ -291,7 +291,7 @@ impl<'a> ModuleValidatorV10<'a> { .into_iter() .map(|index| { table_validator - .validate_index_def(index.into()) + .validate_index_def(index.into(), RawModuleDefVersion::V10) .map(|index| (index.name.clone(), index)) }) .collect_all_errors::>(); diff --git a/crates/schema/src/def/validate/v9.rs b/crates/schema/src/def/validate/v9.rs index 459f0cc80d2..144a5f2163e 100644 --- a/crates/schema/src/def/validate/v9.rs +++ b/crates/schema/src/def/validate/v9.rs @@ -211,7 +211,7 @@ impl ModuleValidatorV9<'_> { .into_iter() .map(|index| { table_in_progress - .validate_index_def(index) + .validate_index_def(index, RawModuleDefVersion::V9OrEarlier) .map(|index| (index.name.clone(), index)) }) .collect_all_errors::>(); @@ -1047,16 +1047,20 @@ impl<'a, 'b> TableValidator<'a, 'b> { } /// Validate an index definition. - pub(crate) fn validate_index_def(&mut self, index: RawIndexDefV9) -> Result { + pub(crate) fn validate_index_def( + &mut self, + index: RawIndexDefV9, + raw_def_version: RawModuleDefVersion, + ) -> Result { let RawIndexDefV9 { name, - algorithm, + algorithm: algorithm_raw, accessor_name, } = index; - let name = name.unwrap_or_else(|| generate_index_name(&self.raw_name, self.product_type, &algorithm)); + let name = name.unwrap_or_else(|| generate_index_name(&self.raw_name, self.product_type, &algorithm_raw)); - let algorithm: Result = match algorithm { + let algorithm: Result = match algorithm_raw.clone() { RawIndexAlgorithm::BTree { columns } => self .validate_col_ids(&name, columns) .map(|columns| BTreeAlgorithm { columns }.into()), @@ -1089,8 +1093,16 @@ impl<'a, 'b> TableValidator<'a, 'b> { }), algo => unreachable!("unknown algorithm {algo:?}"), }; + + let accessor_name = match raw_def_version { + // In V9, `name`field is used for database internals but `accessor_name` supplied by module is used for client codegen. + RawModuleDefVersion::V9OrEarlier => accessor_name.map(identifier).transpose(), + + // In V10, `name` is used both for internal purpose and client codefen. + RawModuleDefVersion::V10 => identifier(name.clone()).map(Some), + }; + let name = self.add_to_global_namespace(name); - let accessor_name = accessor_name.map(identifier).transpose(); let (name, accessor_name, algorithm) = (name, accessor_name, algorithm).combine_errors()?; From 468698d3f0efaed36293eb540634524faeaf66ad Mon Sep 17 00:00:00 2001 From: Shubham Mishra Date: Thu, 12 Feb 2026 14:50:59 +0530 Subject: [PATCH 015/133] fix cargo.toml --- crates/lib/Cargo.toml | 1 - 1 file changed, 1 deletion(-) diff --git a/crates/lib/Cargo.toml b/crates/lib/Cargo.toml index c153f09a7a0..9eadb07888a 100644 --- a/crates/lib/Cargo.toml +++ b/crates/lib/Cargo.toml @@ -53,7 +53,6 @@ enum-map = { workspace = true, optional = true } # For the 'proptest' feature. proptest = { workspace = true, optional = true } proptest-derive = { workspace = true, optional = true } -spacetimedb-data-structures.workspace = true [dev-dependencies] spacetimedb-sats = { path = "../sats", features = ["test"] } From 973a7ddcb4e5aa194e94bdeb3e6ff76f9e2fe14d Mon Sep 17 00:00:00 2001 From: Shubham Mishra Date: Thu, 12 Feb 2026 15:18:44 +0530 Subject: [PATCH 016/133] commentary for index --- Cargo.lock | 1 - crates/bindings-macro/src/table.rs | 2 + crates/codegen/src/csharp.rs | 2 +- crates/codegen/src/typescript.rs | 2 +- crates/codegen/src/unrealcpp.rs | 4 +- .../snapshots/codegen__codegen_csharp.snap | 503 +-- .../codegen__codegen_csharp.snap.new | 2788 +++++++++++++++++ .../codegen__codegen_typescript.snap.new | 1086 +++++++ crates/schema/src/auto_migrate.rs | 6 +- crates/schema/src/def.rs | 20 +- crates/schema/src/def/validate/v10.rs | 6 +- crates/schema/src/def/validate/v9.rs | 14 +- 12 files changed, 3935 insertions(+), 499 deletions(-) create mode 100644 crates/codegen/tests/snapshots/codegen__codegen_csharp.snap.new create mode 100644 crates/codegen/tests/snapshots/codegen__codegen_typescript.snap.new diff --git a/Cargo.lock b/Cargo.lock index 1eb24dc4037..1092ebb45d7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -7992,7 +7992,6 @@ dependencies = [ "serde", "serde_json", "spacetimedb-bindings-macro 1.12.0", - "spacetimedb-data-structures", "spacetimedb-memory-usage", "spacetimedb-metrics", "spacetimedb-primitives 1.12.0", diff --git a/crates/bindings-macro/src/table.rs b/crates/bindings-macro/src/table.rs index f92ac71d3bb..051be83ede1 100644 --- a/crates/bindings-macro/src/table.rs +++ b/crates/bindings-macro/src/table.rs @@ -344,6 +344,8 @@ impl IndexArg { Ok(ValidatedIndex { is_unique: self.is_unique, + // This must be the canonical name (name used internally in database), + // as it is used in `index_id_from_name` abi. index_name: self.name.as_ref().map(|s| s.value()).unwrap_or_else(gen_index_name), accessor_name: &self.accessor, kind, diff --git a/crates/codegen/src/csharp.rs b/crates/codegen/src/csharp.rs index 62ffc3b0e67..85492556098 100644 --- a/crates/codegen/src/csharp.rs +++ b/crates/codegen/src/csharp.rs @@ -595,7 +595,7 @@ impl Lang for Csharp<'_> { let mut index_names = Vec::new(); for idx in iter_indexes(table) { - let Some(accessor_name) = idx.accessor_name.as_ref() else { + let Some(accessor_name) = idx.codegen_name.as_ref() else { // If there is no accessor name, we shouldn't generate a client-side index accessor. continue; }; diff --git a/crates/codegen/src/typescript.rs b/crates/codegen/src/typescript.rs index 7b912035b05..fc4c2bd9541 100644 --- a/crates/codegen/src/typescript.rs +++ b/crates/codegen/src/typescript.rs @@ -721,7 +721,7 @@ fn write_table_opts<'a>( // no actual way for the user to set the actual index name. // I think we should standardize: name and accessorName as the way to set // the name and accessor name of an index across all SDKs. - if let Some(accessor_name) = &index_def.accessor_name { + if let Some(accessor_name) = &index_def.codegen_name { writeln!(out, "{{ name: '{}', algorithm: 'btree', columns: [", accessor_name); } else { writeln!(out, "{{ name: '{}', algorithm: 'btree', columns: [", index_def.name); diff --git a/crates/codegen/src/unrealcpp.rs b/crates/codegen/src/unrealcpp.rs index bb0452bd930..a9ea33cfadf 100644 --- a/crates/codegen/src/unrealcpp.rs +++ b/crates/codegen/src/unrealcpp.rs @@ -65,7 +65,7 @@ impl Lang for UnrealCpp<'_> { let mut multi_key_indexes = Vec::new(); for idx in iter_indexes(table) { - let Some(accessor_name) = idx.accessor_name.as_ref() else { + let Some(accessor_name) = idx.codegen_name.as_ref() else { continue; }; @@ -1061,7 +1061,7 @@ fn generate_table_cpp(module: &ModuleDef, table: &TableDef, module_name: &str, s let mut multi_key_indexes = Vec::new(); for idx in iter_indexes(table) { - let Some(accessor_name) = idx.accessor_name.as_ref() else { + let Some(accessor_name) = idx.codegen_name.as_ref() else { continue; }; // Whatever the index algorithm on the host, diff --git a/crates/codegen/tests/snapshots/codegen__codegen_csharp.snap b/crates/codegen/tests/snapshots/codegen__codegen_csharp.snap index 9675b3d067d..13bc20e37e1 100644 --- a/crates/codegen/tests/snapshots/codegen__codegen_csharp.snap +++ b/crates/codegen/tests/snapshots/codegen__codegen_csharp.snap @@ -1031,11 +1031,11 @@ namespace SpacetimeDB { [DataMember(Name = "arg")] public TestA Arg; - [DataMember(Name = "arg_2")] + [DataMember(Name = "arg2")] public TestB Arg2; - [DataMember(Name = "arg_3")] + [DataMember(Name = "arg3")] public NamespaceTestC Arg3; - [DataMember(Name = "arg_4")] + [DataMember(Name = "arg4")] public NamespaceTestF Arg4; public Test( @@ -1858,38 +1858,38 @@ namespace SpacetimeDB { protected override string RemoteTableName => "logged_out_player"; - public sealed class LoggedOutPlayerIdentityIdxBtreeUniqueIndex : UniqueIndexBase + public sealed class IdentityUniqueIndex : UniqueIndexBase { protected override SpacetimeDB.Identity GetKey(Player row) => row.Identity; - public LoggedOutPlayerIdentityIdxBtreeUniqueIndex(LoggedOutPlayerHandle table) : base(table) { } + public IdentityUniqueIndex(LoggedOutPlayerHandle table) : base(table) { } } - public readonly LoggedOutPlayerIdentityIdxBtreeUniqueIndex LoggedOutPlayerIdentityIdxBtree; + public readonly IdentityUniqueIndex Identity; - public sealed class LoggedOutPlayerNameIdxBtreeUniqueIndex : UniqueIndexBase + public sealed class NameUniqueIndex : UniqueIndexBase { protected override string GetKey(Player row) => row.Name; - public LoggedOutPlayerNameIdxBtreeUniqueIndex(LoggedOutPlayerHandle table) : base(table) { } + public NameUniqueIndex(LoggedOutPlayerHandle table) : base(table) { } } - public readonly LoggedOutPlayerNameIdxBtreeUniqueIndex LoggedOutPlayerNameIdxBtree; + public readonly NameUniqueIndex Name; - public sealed class LoggedOutPlayerPlayerIdIdxBtreeUniqueIndex : UniqueIndexBase + public sealed class PlayerIdUniqueIndex : UniqueIndexBase { protected override ulong GetKey(Player row) => row.PlayerId; - public LoggedOutPlayerPlayerIdIdxBtreeUniqueIndex(LoggedOutPlayerHandle table) : base(table) { } + public PlayerIdUniqueIndex(LoggedOutPlayerHandle table) : base(table) { } } - public readonly LoggedOutPlayerPlayerIdIdxBtreeUniqueIndex LoggedOutPlayerPlayerIdIdxBtree; + public readonly PlayerIdUniqueIndex PlayerId; internal LoggedOutPlayerHandle(DbConnection conn) : base(conn) { - LoggedOutPlayerIdentityIdxBtree = new(this); - LoggedOutPlayerNameIdxBtree = new(this); - LoggedOutPlayerPlayerIdIdxBtree = new(this); + Identity = new(this); + Name = new(this); + PlayerId = new(this); } protected override object GetPrimaryKey(Player row) => row.Identity; @@ -2007,19 +2007,19 @@ namespace SpacetimeDB public readonly AgeIndex Age; - public sealed class PersonIdIdxBtreeUniqueIndex : UniqueIndexBase + public sealed class IdUniqueIndex : UniqueIndexBase { protected override uint GetKey(Person row) => row.Id; - public PersonIdIdxBtreeUniqueIndex(PersonHandle table) : base(table) { } + public IdUniqueIndex(PersonHandle table) : base(table) { } } - public readonly PersonIdIdxBtreeUniqueIndex PersonIdIdxBtree; + public readonly IdUniqueIndex Id; internal PersonHandle(DbConnection conn) : base(conn) { Age = new(this); - PersonIdIdxBtree = new(this); + Id = new(this); } protected override object GetPrimaryKey(Person row) => row.Id; @@ -2055,84 +2055,6 @@ namespace SpacetimeDB } } ''' -<<<<<<< HEAD -"Tables/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. - -#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 PkMultiIdentityHandle : RemoteTableHandle - { - protected override string RemoteTableName => "pk_multi_identity"; - - public sealed class PkMultiIdentityIdIdxBtreeUniqueIndex : UniqueIndexBase - { - protected override uint GetKey(PkMultiIdentity row) => row.Id; - - public PkMultiIdentityIdIdxBtreeUniqueIndex(PkMultiIdentityHandle table) : base(table) { } - } - - public readonly PkMultiIdentityIdIdxBtreeUniqueIndex PkMultiIdentityIdIdxBtree; - - public sealed class PkMultiIdentityOtherIdxBtreeUniqueIndex : UniqueIndexBase - { - protected override uint GetKey(PkMultiIdentity row) => row.Other; - - public PkMultiIdentityOtherIdxBtreeUniqueIndex(PkMultiIdentityHandle table) : base(table) { } - } - - public readonly PkMultiIdentityOtherIdxBtreeUniqueIndex PkMultiIdentityOtherIdxBtree; - - internal PkMultiIdentityHandle(DbConnection conn) : base(conn) - { - PkMultiIdentityIdIdxBtree = new(this); - PkMultiIdentityOtherIdxBtree = new(this); - } - - protected override object GetPrimaryKey(PkMultiIdentity row) => row.Id; - } - - public readonly PkMultiIdentityHandle PkMultiIdentity; - } - - public sealed class PkMultiIdentityCols - { - public global::SpacetimeDB.Col Id { get; } - public global::SpacetimeDB.Col Other { get; } - - public PkMultiIdentityCols(string tableName) - { - Id = new global::SpacetimeDB.Col(tableName, "id"); - Other = new global::SpacetimeDB.Col(tableName, "other"); - } - } - - public sealed class PkMultiIdentityIxCols - { - public global::SpacetimeDB.IxCol Id { get; } - public global::SpacetimeDB.IxCol Other { get; } - - public PkMultiIdentityIxCols(string tableName) - { - Id = new global::SpacetimeDB.IxCol(tableName, "id"); - Other = new global::SpacetimeDB.IxCol(tableName, "other"); - } - } -} -''' -======= ->>>>>>> master "Tables/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. @@ -2153,38 +2075,38 @@ namespace SpacetimeDB { protected override string RemoteTableName => "player"; - public sealed class PlayerIdentityIdxBtreeUniqueIndex : UniqueIndexBase + public sealed class IdentityUniqueIndex : UniqueIndexBase { protected override SpacetimeDB.Identity GetKey(Player row) => row.Identity; - public PlayerIdentityIdxBtreeUniqueIndex(PlayerHandle table) : base(table) { } + public IdentityUniqueIndex(PlayerHandle table) : base(table) { } } - public readonly PlayerIdentityIdxBtreeUniqueIndex PlayerIdentityIdxBtree; + public readonly IdentityUniqueIndex Identity; - public sealed class PlayerNameIdxBtreeUniqueIndex : UniqueIndexBase + public sealed class NameUniqueIndex : UniqueIndexBase { protected override string GetKey(Player row) => row.Name; - public PlayerNameIdxBtreeUniqueIndex(PlayerHandle table) : base(table) { } + public NameUniqueIndex(PlayerHandle table) : base(table) { } } - public readonly PlayerNameIdxBtreeUniqueIndex PlayerNameIdxBtree; + public readonly NameUniqueIndex Name; - public sealed class PlayerPlayerIdIdxBtreeUniqueIndex : UniqueIndexBase + public sealed class PlayerIdUniqueIndex : UniqueIndexBase { protected override ulong GetKey(Player row) => row.PlayerId; - public PlayerPlayerIdIdxBtreeUniqueIndex(PlayerHandle table) : base(table) { } + public PlayerIdUniqueIndex(PlayerHandle table) : base(table) { } } - public readonly PlayerPlayerIdIdxBtreeUniqueIndex PlayerPlayerIdIdxBtree; + public readonly PlayerIdUniqueIndex PlayerId; internal PlayerHandle(DbConnection conn) : base(conn) { - PlayerIdentityIdxBtree = new(this); - PlayerNameIdxBtree = new(this); - PlayerPlayerIdIdxBtree = new(this); + Identity = new(this); + Name = new(this); + PlayerId = new(this); } protected override object GetPrimaryKey(Player row) => row.Identity; @@ -2222,294 +2144,6 @@ namespace SpacetimeDB } } ''' -<<<<<<< HEAD -"Tables/Points.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 PointsHandle : RemoteTableHandle - { - protected override string RemoteTableName => "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(DbConnection conn) : base(conn) - { - MultiColumnIndex = new(this); - } - } - - public readonly PointsHandle Points; - } - - public sealed class PointsCols - { - public global::SpacetimeDB.Col X { get; } - public global::SpacetimeDB.Col Y { get; } - - public PointsCols(string tableName) - { - X = new global::SpacetimeDB.Col(tableName, "x"); - Y = new global::SpacetimeDB.Col(tableName, "y"); - } - } - - public sealed class PointsIxCols - { - public global::SpacetimeDB.IxCol X { get; } - public global::SpacetimeDB.IxCol Y { get; } - - public PointsIxCols(string tableName) - { - X = new global::SpacetimeDB.IxCol(tableName, "x"); - Y = new global::SpacetimeDB.IxCol(tableName, "y"); - } - } -} -''' -"Tables/PrivateTable.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 PrivateTableHandle : RemoteTableHandle - { - protected override string RemoteTableName => "private_table"; - - internal PrivateTableHandle(DbConnection conn) : base(conn) - { - } - } - - public readonly PrivateTableHandle PrivateTable; - } - - public sealed class PrivateTableCols - { - public global::SpacetimeDB.Col Name { get; } - - public PrivateTableCols(string tableName) - { - Name = new global::SpacetimeDB.Col(tableName, "name"); - } - } - - public sealed class PrivateTableIxCols - { - - public PrivateTableIxCols(string tableName) - { - } - } -} -''' -"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 RemoteTableName => "repeating_test_arg"; - - public sealed class RepeatingTestArgScheduledIdIdxBtreeUniqueIndex : UniqueIndexBase - { - protected override ulong GetKey(RepeatingTestArg row) => row.ScheduledId; - - public RepeatingTestArgScheduledIdIdxBtreeUniqueIndex(RepeatingTestArgHandle table) : base(table) { } - } - - public readonly RepeatingTestArgScheduledIdIdxBtreeUniqueIndex RepeatingTestArgScheduledIdIdxBtree; - - internal RepeatingTestArgHandle(DbConnection conn) : base(conn) - { - RepeatingTestArgScheduledIdIdxBtree = new(this); - } - - protected override object GetPrimaryKey(RepeatingTestArg row) => row.ScheduledId; - } - - public readonly RepeatingTestArgHandle RepeatingTestArg; - } - - public sealed class RepeatingTestArgCols - { - public global::SpacetimeDB.Col ScheduledId { get; } - public global::SpacetimeDB.Col ScheduledAt { get; } - public global::SpacetimeDB.Col PrevTime { get; } - - public RepeatingTestArgCols(string tableName) - { - ScheduledId = new global::SpacetimeDB.Col(tableName, "scheduled_id"); - ScheduledAt = new global::SpacetimeDB.Col(tableName, "scheduled_at"); - PrevTime = new global::SpacetimeDB.Col(tableName, "prev_time"); - } - } - - public sealed class RepeatingTestArgIxCols - { - public global::SpacetimeDB.IxCol ScheduledId { get; } - - public RepeatingTestArgIxCols(string tableName) - { - ScheduledId = new global::SpacetimeDB.IxCol(tableName, "scheduled_id"); - } - } -} -''' -"Tables/TableToRemove.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 TableToRemoveHandle : RemoteTableHandle - { - protected override string RemoteTableName => "table_to_remove"; - - internal TableToRemoveHandle(DbConnection conn) : base(conn) - { - } - } - - public readonly TableToRemoveHandle TableToRemove; - } - - public sealed class TableToRemoveCols - { - public global::SpacetimeDB.Col Id { get; } - - public TableToRemoveCols(string tableName) - { - Id = new global::SpacetimeDB.Col(tableName, "id"); - } - } - - public sealed class TableToRemoveIxCols - { - - public TableToRemoveIxCols(string tableName) - { - } - } -} -''' -"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 RemoteTableName => "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(DbConnection conn) : base(conn) - { - Foo = new(this); - } - } - - public readonly TestAHandle TestA; - } - - public sealed class TestACols - { - public global::SpacetimeDB.Col X { get; } - public global::SpacetimeDB.Col Y { get; } - public global::SpacetimeDB.Col Z { get; } - - public TestACols(string tableName) - { - X = new global::SpacetimeDB.Col(tableName, "x"); - Y = new global::SpacetimeDB.Col(tableName, "y"); - Z = new global::SpacetimeDB.Col(tableName, "z"); - } - } - - public sealed class TestAIxCols - { - public global::SpacetimeDB.IxCol X { get; } - - public TestAIxCols(string tableName) - { - X = new global::SpacetimeDB.IxCol(tableName, "x"); - } - } -} -''' -======= ->>>>>>> master "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. @@ -2557,81 +2191,6 @@ namespace SpacetimeDB } } ''' -"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 RemoteTableName => "test_e"; - - public sealed class TestEIdIdxBtreeUniqueIndex : UniqueIndexBase - { - protected override ulong GetKey(TestE row) => row.Id; - - public TestEIdIdxBtreeUniqueIndex(TestEHandle table) : base(table) { } - } - - public readonly TestEIdIdxBtreeUniqueIndex TestEIdIdxBtree; - - public sealed class TestENameIdxBtreeIndex : BTreeIndexBase - { - protected override string GetKey(TestE row) => row.Name; - - public TestENameIdxBtreeIndex(TestEHandle table) : base(table) { } - } - - public readonly TestENameIdxBtreeIndex TestENameIdxBtree; - - internal TestEHandle(DbConnection conn) : base(conn) - { - TestEIdIdxBtree = new(this); - TestENameIdxBtree = new(this); - } - - protected override object GetPrimaryKey(TestE row) => row.Id; - } - - public readonly TestEHandle TestE; - } - - public sealed class TestECols - { - public global::SpacetimeDB.Col Id { get; } - public global::SpacetimeDB.Col Name { get; } - - public TestECols(string tableName) - { - Id = new global::SpacetimeDB.Col(tableName, "id"); - Name = new global::SpacetimeDB.Col(tableName, "name"); - } - } - - public sealed class TestEIxCols - { - public global::SpacetimeDB.IxCol Id { get; } - public global::SpacetimeDB.IxCol Name { get; } - - public TestEIxCols(string tableName) - { - Id = new global::SpacetimeDB.IxCol(tableName, "id"); - Name = new global::SpacetimeDB.IxCol(tableName, "name"); - } - } -} -''' "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. diff --git a/crates/codegen/tests/snapshots/codegen__codegen_csharp.snap.new b/crates/codegen/tests/snapshots/codegen__codegen_csharp.snap.new new file mode 100644 index 00000000000..2eaa8cf0b9a --- /dev/null +++ b/crates/codegen/tests/snapshots/codegen__codegen_csharp.snap.new @@ -0,0 +1,2788 @@ +--- +source: crates/codegen/tests/codegen.rs +assertion_line: 37 +expression: outfiles +--- +"Procedures/GetMySchemaViaHttp.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.ClientApi; +using System.Collections.Generic; +using System.Runtime.Serialization; + +namespace SpacetimeDB +{ + public sealed partial class RemoteProcedures : RemoteBase + { + public void GetMySchemaViaHttp(ProcedureCallback callback) + { + // Convert the clean callback to the wrapper callback + InternalGetMySchemaViaHttp((ctx, result) => { + if (result.IsSuccess && result.Value != null) + { + callback(ctx, ProcedureCallbackResult.Success(result.Value.Value)); + } + else + { + callback(ctx, ProcedureCallbackResult.Failure(result.Error!)); + } + }); + } + + private void InternalGetMySchemaViaHttp(ProcedureCallback callback) + { + conn.InternalCallProcedure(new Procedure.GetMySchemaViaHttpArgs(), callback); + } + + } + + public abstract partial class Procedure + { + [SpacetimeDB.Type] + [DataContract] + public sealed partial class GetMySchemaViaHttp + { + [DataMember(Name = "Value")] + public string Value; + + public GetMySchemaViaHttp(string Value) + { + this.Value = Value; + } + + public GetMySchemaViaHttp() + { + this.Value = ""; + } + } + [SpacetimeDB.Type] + [DataContract] + public sealed partial class GetMySchemaViaHttpArgs : Procedure, IProcedureArgs + { + string IProcedureArgs.ProcedureName => "get_my_schema_via_http"; + } + + } +} +''' +"Procedures/ReturnValue.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.ClientApi; +using System.Collections.Generic; +using System.Runtime.Serialization; + +namespace SpacetimeDB +{ + public sealed partial class RemoteProcedures : RemoteBase + { + public void ReturnValue(ulong foo, ProcedureCallback callback) + { + // Convert the clean callback to the wrapper callback + InternalReturnValue(foo, (ctx, result) => { + if (result.IsSuccess && result.Value != null) + { + callback(ctx, ProcedureCallbackResult.Success(result.Value.Value)); + } + else + { + callback(ctx, ProcedureCallbackResult.Failure(result.Error!)); + } + }); + } + + private void InternalReturnValue(ulong foo, ProcedureCallback callback) + { + conn.InternalCallProcedure(new Procedure.ReturnValueArgs(foo), callback); + } + + } + + public abstract partial class Procedure + { + [SpacetimeDB.Type] + [DataContract] + public sealed partial class ReturnValue + { + [DataMember(Name = "Value")] + public SpacetimeDB.Baz Value; + + public ReturnValue(SpacetimeDB.Baz Value) + { + this.Value = Value; + } + + public ReturnValue() + { + this.Value = new(); + } + } + [SpacetimeDB.Type] + [DataContract] + public sealed partial class ReturnValueArgs : Procedure, IProcedureArgs + { + [DataMember(Name = "foo")] + public ulong Foo; + + public ReturnValueArgs(ulong Foo) + { + this.Foo = Foo; + } + + public ReturnValueArgs() + { + } + + string IProcedureArgs.ProcedureName => "return_value"; + } + + } +} +''' +"Procedures/SleepOneSecond.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.ClientApi; +using System.Collections.Generic; +using System.Runtime.Serialization; + +namespace SpacetimeDB +{ + public sealed partial class RemoteProcedures : RemoteBase + { + public void SleepOneSecond(ProcedureCallback callback) + { + // Convert the clean callback to the wrapper callback + InternalSleepOneSecond((ctx, result) => { + if (result.IsSuccess && result.Value != null) + { + callback(ctx, ProcedureCallbackResult.Success(result.Value.Value)); + } + else + { + callback(ctx, ProcedureCallbackResult.Failure(result.Error!)); + } + }); + } + + private void InternalSleepOneSecond(ProcedureCallback callback) + { + conn.InternalCallProcedure(new Procedure.SleepOneSecondArgs(), callback); + } + + } + + public abstract partial class Procedure + { + [SpacetimeDB.Type] + [DataContract] + public sealed partial class SleepOneSecond + { + [DataMember(Name = "Value")] + public SpacetimeDB.Unit Value; + + public SleepOneSecond(SpacetimeDB.Unit Value) + { + this.Value = Value; + } + + public SleepOneSecond() + { + } + } + [SpacetimeDB.Type] + [DataContract] + public sealed partial class SleepOneSecondArgs : Procedure, IProcedureArgs + { + string IProcedureArgs.ProcedureName => "sleep_one_second"; + } + + } +} +''' +"Procedures/WithTx.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.ClientApi; +using System.Collections.Generic; +using System.Runtime.Serialization; + +namespace SpacetimeDB +{ + public sealed partial class RemoteProcedures : RemoteBase + { + public void WithTx(ProcedureCallback callback) + { + // Convert the clean callback to the wrapper callback + InternalWithTx((ctx, result) => { + if (result.IsSuccess && result.Value != null) + { + callback(ctx, ProcedureCallbackResult.Success(result.Value.Value)); + } + else + { + callback(ctx, ProcedureCallbackResult.Failure(result.Error!)); + } + }); + } + + private void InternalWithTx(ProcedureCallback callback) + { + conn.InternalCallProcedure(new Procedure.WithTxArgs(), callback); + } + + } + + public abstract partial class Procedure + { + [SpacetimeDB.Type] + [DataContract] + public sealed partial class WithTx + { + [DataMember(Name = "Value")] + public SpacetimeDB.Unit Value; + + public WithTx(SpacetimeDB.Unit Value) + { + this.Value = Value; + } + + public WithTx() + { + } + } + [SpacetimeDB.Type] + [DataContract] + public sealed partial class WithTxArgs : Procedure, IProcedureArgs + { + string IProcedureArgs.ProcedureName => "with_tx"; + } + + } +} +''' +"Reducers/Add.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.ClientApi; +using System.Collections.Generic; +using System.Runtime.Serialization; + +namespace SpacetimeDB +{ + public sealed partial class RemoteReducers : RemoteBase + { + public delegate void AddHandler(ReducerEventContext ctx, string name, byte age); + public event AddHandler? OnAdd; + + public void Add(string name, byte age) + { + conn.InternalCallReducer(new Reducer.Add(name, age), this.SetCallReducerFlags.AddFlags); + } + + public bool InvokeAdd(ReducerEventContext ctx, Reducer.Add args) + { + if (OnAdd == null) + { + if (InternalOnUnhandledReducerError != null) + { + switch(ctx.Event.Status) + { + case Status.Failed(var reason): InternalOnUnhandledReducerError(ctx, new Exception(reason)); break; + case Status.OutOfEnergy(var _): InternalOnUnhandledReducerError(ctx, new Exception("out of energy")); break; + } + } + return false; + } + OnAdd( + ctx, + args.Name, + args.Age + ); + return true; + } + } + + public abstract partial class Reducer + { + [SpacetimeDB.Type] + [DataContract] + public sealed partial class Add : Reducer, IReducerArgs + { + [DataMember(Name = "name")] + public string Name; + [DataMember(Name = "age")] + public byte Age; + + public Add( + string Name, + byte Age + ) + { + this.Name = Name; + this.Age = Age; + } + + public Add() + { + this.Name = ""; + } + + string IReducerArgs.ReducerName => "add"; + } + } + + public sealed partial class SetReducerFlags + { + internal CallReducerFlags AddFlags; + public void Add(CallReducerFlags flags) => AddFlags = flags; + } +} +''' +"Reducers/AddPlayer.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.ClientApi; +using System.Collections.Generic; +using System.Runtime.Serialization; + +namespace SpacetimeDB +{ + public sealed partial class RemoteReducers : RemoteBase + { + public delegate void AddPlayerHandler(ReducerEventContext ctx, string name); + public event AddPlayerHandler? OnAddPlayer; + + public void AddPlayer(string name) + { + conn.InternalCallReducer(new Reducer.AddPlayer(name), this.SetCallReducerFlags.AddPlayerFlags); + } + + public bool InvokeAddPlayer(ReducerEventContext ctx, Reducer.AddPlayer args) + { + if (OnAddPlayer == null) + { + if (InternalOnUnhandledReducerError != null) + { + switch(ctx.Event.Status) + { + case Status.Failed(var reason): InternalOnUnhandledReducerError(ctx, new Exception(reason)); break; + case Status.OutOfEnergy(var _): InternalOnUnhandledReducerError(ctx, new Exception("out of energy")); break; + } + } + 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) => AddPlayerFlags = flags; + } +} +''' +"Reducers/AddPrivate.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.ClientApi; +using System.Collections.Generic; +using System.Runtime.Serialization; + +namespace SpacetimeDB +{ + public sealed partial class RemoteReducers : RemoteBase + { + public delegate void AddPrivateHandler(ReducerEventContext ctx, string name); + public event AddPrivateHandler? OnAddPrivate; + + public void AddPrivate(string name) + { + conn.InternalCallReducer(new Reducer.AddPrivate(name), this.SetCallReducerFlags.AddPrivateFlags); + } + + public bool InvokeAddPrivate(ReducerEventContext ctx, Reducer.AddPrivate args) + { + if (OnAddPrivate == null) + { + if (InternalOnUnhandledReducerError != null) + { + switch(ctx.Event.Status) + { + case Status.Failed(var reason): InternalOnUnhandledReducerError(ctx, new Exception(reason)); break; + case Status.OutOfEnergy(var _): InternalOnUnhandledReducerError(ctx, new Exception("out of energy")); break; + } + } + 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) => AddPrivateFlags = flags; + } +} +''' +"Reducers/AssertCallerIdentityIsModuleIdentity.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.ClientApi; +using System.Collections.Generic; +using System.Runtime.Serialization; + +namespace SpacetimeDB +{ + public sealed partial class RemoteReducers : RemoteBase + { + public delegate void AssertCallerIdentityIsModuleIdentityHandler(ReducerEventContext ctx); + public event AssertCallerIdentityIsModuleIdentityHandler? OnAssertCallerIdentityIsModuleIdentity; + + public void AssertCallerIdentityIsModuleIdentity() + { + conn.InternalCallReducer(new Reducer.AssertCallerIdentityIsModuleIdentity(), this.SetCallReducerFlags.AssertCallerIdentityIsModuleIdentityFlags); + } + + public bool InvokeAssertCallerIdentityIsModuleIdentity(ReducerEventContext ctx, Reducer.AssertCallerIdentityIsModuleIdentity args) + { + if (OnAssertCallerIdentityIsModuleIdentity == null) + { + if (InternalOnUnhandledReducerError != null) + { + switch(ctx.Event.Status) + { + case Status.Failed(var reason): InternalOnUnhandledReducerError(ctx, new Exception(reason)); break; + case Status.OutOfEnergy(var _): InternalOnUnhandledReducerError(ctx, new Exception("out of energy")); break; + } + } + 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) => AssertCallerIdentityIsModuleIdentityFlags = flags; + } +} +''' +"Reducers/DeletePlayer.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.ClientApi; +using System.Collections.Generic; +using System.Runtime.Serialization; + +namespace SpacetimeDB +{ + public sealed partial class RemoteReducers : RemoteBase + { + public delegate void DeletePlayerHandler(ReducerEventContext ctx, ulong id); + public event DeletePlayerHandler? OnDeletePlayer; + + public void DeletePlayer(ulong id) + { + conn.InternalCallReducer(new Reducer.DeletePlayer(id), this.SetCallReducerFlags.DeletePlayerFlags); + } + + public bool InvokeDeletePlayer(ReducerEventContext ctx, Reducer.DeletePlayer args) + { + if (OnDeletePlayer == null) + { + if (InternalOnUnhandledReducerError != null) + { + switch(ctx.Event.Status) + { + case Status.Failed(var reason): InternalOnUnhandledReducerError(ctx, new Exception(reason)); break; + case Status.OutOfEnergy(var _): InternalOnUnhandledReducerError(ctx, new Exception("out of energy")); break; + } + } + 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) => DeletePlayerFlags = flags; + } +} +''' +"Reducers/DeletePlayersByName.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.ClientApi; +using System.Collections.Generic; +using System.Runtime.Serialization; + +namespace SpacetimeDB +{ + public sealed partial class RemoteReducers : RemoteBase + { + public delegate void DeletePlayersByNameHandler(ReducerEventContext ctx, string name); + public event DeletePlayersByNameHandler? OnDeletePlayersByName; + + public void DeletePlayersByName(string name) + { + conn.InternalCallReducer(new Reducer.DeletePlayersByName(name), this.SetCallReducerFlags.DeletePlayersByNameFlags); + } + + public bool InvokeDeletePlayersByName(ReducerEventContext ctx, Reducer.DeletePlayersByName args) + { + if (OnDeletePlayersByName == null) + { + if (InternalOnUnhandledReducerError != null) + { + switch(ctx.Event.Status) + { + case Status.Failed(var reason): InternalOnUnhandledReducerError(ctx, new Exception(reason)); break; + case Status.OutOfEnergy(var _): InternalOnUnhandledReducerError(ctx, new Exception("out of energy")); break; + } + } + 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) => DeletePlayersByNameFlags = flags; + } +} +''' +"Reducers/ListOverAge.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.ClientApi; +using System.Collections.Generic; +using System.Runtime.Serialization; + +namespace SpacetimeDB +{ + public sealed partial class RemoteReducers : RemoteBase + { + public delegate void ListOverAgeHandler(ReducerEventContext ctx, byte age); + public event ListOverAgeHandler? OnListOverAge; + + public void ListOverAge(byte age) + { + conn.InternalCallReducer(new Reducer.ListOverAge(age), this.SetCallReducerFlags.ListOverAgeFlags); + } + + public bool InvokeListOverAge(ReducerEventContext ctx, Reducer.ListOverAge args) + { + if (OnListOverAge == null) + { + if (InternalOnUnhandledReducerError != null) + { + switch(ctx.Event.Status) + { + case Status.Failed(var reason): InternalOnUnhandledReducerError(ctx, new Exception(reason)); break; + case Status.OutOfEnergy(var _): InternalOnUnhandledReducerError(ctx, new Exception("out of energy")); break; + } + } + return false; + } + OnListOverAge( + ctx, + args.Age + ); + return true; + } + } + + public abstract partial class Reducer + { + [SpacetimeDB.Type] + [DataContract] + public sealed partial class ListOverAge : Reducer, IReducerArgs + { + [DataMember(Name = "age")] + public byte Age; + + public ListOverAge(byte Age) + { + this.Age = Age; + } + + public ListOverAge() + { + } + + string IReducerArgs.ReducerName => "list_over_age"; + } + } + + public sealed partial class SetReducerFlags + { + internal CallReducerFlags ListOverAgeFlags; + public void ListOverAge(CallReducerFlags flags) => ListOverAgeFlags = flags; + } +} +''' +"Reducers/LogModuleIdentity.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.ClientApi; +using System.Collections.Generic; +using System.Runtime.Serialization; + +namespace SpacetimeDB +{ + public sealed partial class RemoteReducers : RemoteBase + { + public delegate void LogModuleIdentityHandler(ReducerEventContext ctx); + public event LogModuleIdentityHandler? OnLogModuleIdentity; + + public void LogModuleIdentity() + { + conn.InternalCallReducer(new Reducer.LogModuleIdentity(), this.SetCallReducerFlags.LogModuleIdentityFlags); + } + + public bool InvokeLogModuleIdentity(ReducerEventContext ctx, Reducer.LogModuleIdentity args) + { + if (OnLogModuleIdentity == null) + { + if (InternalOnUnhandledReducerError != null) + { + switch(ctx.Event.Status) + { + case Status.Failed(var reason): InternalOnUnhandledReducerError(ctx, new Exception(reason)); break; + case Status.OutOfEnergy(var _): InternalOnUnhandledReducerError(ctx, new Exception("out of energy")); break; + } + } + return false; + } + OnLogModuleIdentity( + ctx + ); + return true; + } + } + + public abstract partial class Reducer + { + [SpacetimeDB.Type] + [DataContract] + public sealed partial class LogModuleIdentity : Reducer, IReducerArgs + { + string IReducerArgs.ReducerName => "log_module_identity"; + } + } + + public sealed partial class SetReducerFlags + { + internal CallReducerFlags LogModuleIdentityFlags; + public void LogModuleIdentity(CallReducerFlags flags) => LogModuleIdentityFlags = flags; + } +} +''' +"Reducers/QueryPrivate.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.ClientApi; +using System.Collections.Generic; +using System.Runtime.Serialization; + +namespace SpacetimeDB +{ + public sealed partial class RemoteReducers : RemoteBase + { + public delegate void QueryPrivateHandler(ReducerEventContext ctx); + public event QueryPrivateHandler? OnQueryPrivate; + + public void QueryPrivate() + { + conn.InternalCallReducer(new Reducer.QueryPrivate(), this.SetCallReducerFlags.QueryPrivateFlags); + } + + public bool InvokeQueryPrivate(ReducerEventContext ctx, Reducer.QueryPrivate args) + { + if (OnQueryPrivate == null) + { + if (InternalOnUnhandledReducerError != null) + { + switch(ctx.Event.Status) + { + case Status.Failed(var reason): InternalOnUnhandledReducerError(ctx, new Exception(reason)); break; + case Status.OutOfEnergy(var _): InternalOnUnhandledReducerError(ctx, new Exception("out of energy")); break; + } + } + 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) => QueryPrivateFlags = flags; + } +} +''' +"Reducers/SayHello.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.ClientApi; +using System.Collections.Generic; +using System.Runtime.Serialization; + +namespace SpacetimeDB +{ + public sealed partial class RemoteReducers : RemoteBase + { + public delegate void SayHelloHandler(ReducerEventContext ctx); + public event SayHelloHandler? OnSayHello; + + public void SayHello() + { + conn.InternalCallReducer(new Reducer.SayHello(), this.SetCallReducerFlags.SayHelloFlags); + } + + public bool InvokeSayHello(ReducerEventContext ctx, Reducer.SayHello args) + { + if (OnSayHello == null) + { + if (InternalOnUnhandledReducerError != null) + { + switch(ctx.Event.Status) + { + case Status.Failed(var reason): InternalOnUnhandledReducerError(ctx, new Exception(reason)); break; + case Status.OutOfEnergy(var _): InternalOnUnhandledReducerError(ctx, new Exception("out of energy")); break; + } + } + return false; + } + OnSayHello( + ctx + ); + return true; + } + } + + public abstract partial class Reducer + { + [SpacetimeDB.Type] + [DataContract] + public sealed partial class SayHello : Reducer, IReducerArgs + { + string IReducerArgs.ReducerName => "say_hello"; + } + } + + public sealed partial class SetReducerFlags + { + internal CallReducerFlags SayHelloFlags; + public void SayHello(CallReducerFlags flags) => SayHelloFlags = flags; + } +} +''' +"Reducers/Test.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.ClientApi; +using System.Collections.Generic; +using System.Runtime.Serialization; + +namespace SpacetimeDB +{ + public sealed partial class RemoteReducers : RemoteBase + { + public delegate void TestHandler(ReducerEventContext ctx, SpacetimeDB.TestA arg, SpacetimeDB.TestB arg2, SpacetimeDB.NamespaceTestC arg3, SpacetimeDB.NamespaceTestF arg4); + public event TestHandler? OnTest; + + public void Test(SpacetimeDB.TestA arg, SpacetimeDB.TestB arg2, SpacetimeDB.NamespaceTestC arg3, SpacetimeDB.NamespaceTestF arg4) + { + conn.InternalCallReducer(new Reducer.Test(arg, arg2, arg3, arg4), this.SetCallReducerFlags.TestFlags); + } + + public bool InvokeTest(ReducerEventContext ctx, Reducer.Test args) + { + if (OnTest == null) + { + if (InternalOnUnhandledReducerError != null) + { + switch(ctx.Event.Status) + { + case Status.Failed(var reason): InternalOnUnhandledReducerError(ctx, new Exception(reason)); break; + case Status.OutOfEnergy(var _): InternalOnUnhandledReducerError(ctx, new Exception("out of energy")); break; + } + } + 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) => TestFlags = flags; + } +} +''' +"Reducers/TestBtreeIndexArgs.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.ClientApi; +using System.Collections.Generic; +using System.Runtime.Serialization; + +namespace SpacetimeDB +{ + public sealed partial class RemoteReducers : RemoteBase + { + public delegate void TestBtreeIndexArgsHandler(ReducerEventContext ctx); + public event TestBtreeIndexArgsHandler? OnTestBtreeIndexArgs; + + public void TestBtreeIndexArgs() + { + conn.InternalCallReducer(new Reducer.TestBtreeIndexArgs(), this.SetCallReducerFlags.TestBtreeIndexArgsFlags); + } + + public bool InvokeTestBtreeIndexArgs(ReducerEventContext ctx, Reducer.TestBtreeIndexArgs args) + { + if (OnTestBtreeIndexArgs == null) + { + if (InternalOnUnhandledReducerError != null) + { + switch(ctx.Event.Status) + { + case Status.Failed(var reason): InternalOnUnhandledReducerError(ctx, new Exception(reason)); break; + case Status.OutOfEnergy(var _): InternalOnUnhandledReducerError(ctx, new Exception("out of energy")); break; + } + } + 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) => TestBtreeIndexArgsFlags = flags; + } +} +''' +"SpacetimeDBClient.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. + +VERSION_COMMENT + +#nullable enable + +using System; +using SpacetimeDB.ClientApi; +using System.Collections.Generic; +using System.Runtime.Serialization; + +namespace SpacetimeDB +{ + public sealed partial class RemoteReducers : RemoteBase + { + internal RemoteReducers(DbConnection conn, SetReducerFlags flags) : base(conn) => SetCallReducerFlags = flags; + internal readonly SetReducerFlags SetCallReducerFlags; + internal event Action? InternalOnUnhandledReducerError; + } + + public sealed partial class RemoteProcedures : RemoteBase + { + internal RemoteProcedures(DbConnection conn) : base(conn) { } + } + + public sealed partial class RemoteTables : RemoteTablesBase + { + public RemoteTables(DbConnection conn) + { + AddTable(LoggedOutPlayer = new(conn)); + AddTable(MyPlayer = new(conn)); + AddTable(Person = new(conn)); + AddTable(Player = new(conn)); + AddTable(TestD = new(conn)); + AddTable(TestF = new(conn)); + } + } + + public sealed partial class SetReducerFlags { } + + public interface IRemoteDbContext : IDbContext { + public event Action? OnUnhandledReducerError; + } + + public sealed class EventContext : IEventContext, IRemoteDbContext + { + private readonly DbConnection conn; + + /// + /// The event that caused this callback to run. + /// + public readonly Event Event; + + /// + /// Access to tables in the client cache, which stores a read-only replica of the remote database state. + /// + /// The returned DbView will have a method to access each table defined by the module. + /// + public RemoteTables Db => conn.Db; + /// + /// Access to reducers defined by the module. + /// + /// The returned RemoteReducers will have a method to invoke each reducer defined by the module, + /// plus methods for adding and removing callbacks on each of those reducers. + /// + public RemoteReducers Reducers => conn.Reducers; + /// + /// Access to setters for per-reducer flags. + /// + /// The returned SetReducerFlags will have a method to invoke, + /// for each reducer defined by the module, + /// which call-flags for the reducer can be set. + /// + public SetReducerFlags SetReducerFlags => conn.SetReducerFlags; + /// + /// Access to procedures defined by the module. + /// + /// The returned RemoteProcedures will have a method to invoke each procedure defined by the module, + /// with a callback for when the procedure completes and returns a value. + /// + public RemoteProcedures Procedures => conn.Procedures; + /// + /// Returns true if the connection is active, i.e. has not yet disconnected. + /// + public bool IsActive => conn.IsActive; + /// + /// Close the connection. + /// + /// Throws an error if the connection is already closed. + /// + public void Disconnect() { + conn.Disconnect(); + } + /// + /// Start building a subscription. + /// + /// A builder-pattern constructor for subscribing to queries, + /// causing matching rows to be replicated into the client cache. + public SubscriptionBuilder SubscriptionBuilder() => conn.SubscriptionBuilder(); + /// + /// Get the Identity of this connection. + /// + /// This method returns null if the connection was constructed anonymously + /// and we have not yet received our newly-generated Identity from the host. + /// + public Identity? Identity => conn.Identity; + /// + /// Get this connection's ConnectionId. + /// + public ConnectionId ConnectionId => conn.ConnectionId; + /// + /// Register a callback to be called when a reducer with no handler returns an error. + /// + public event Action? OnUnhandledReducerError { + add => Reducers.InternalOnUnhandledReducerError += value; + remove => Reducers.InternalOnUnhandledReducerError -= value; + } + + internal EventContext(DbConnection conn, Event Event) + { + this.conn = conn; + this.Event = Event; + } + } + + public sealed class ReducerEventContext : IReducerEventContext, IRemoteDbContext + { + private readonly DbConnection conn; + /// + /// The reducer event that caused this callback to run. + /// + public readonly ReducerEvent Event; + + /// + /// Access to tables in the client cache, which stores a read-only replica of the remote database state. + /// + /// The returned DbView will have a method to access each table defined by the module. + /// + public RemoteTables Db => conn.Db; + /// + /// Access to reducers defined by the module. + /// + /// The returned RemoteReducers will have a method to invoke each reducer defined by the module, + /// plus methods for adding and removing callbacks on each of those reducers. + /// + public RemoteReducers Reducers => conn.Reducers; + /// + /// Access to setters for per-reducer flags. + /// + /// The returned SetReducerFlags will have a method to invoke, + /// for each reducer defined by the module, + /// which call-flags for the reducer can be set. + /// + public SetReducerFlags SetReducerFlags => conn.SetReducerFlags; + /// + /// Access to procedures defined by the module. + /// + /// The returned RemoteProcedures will have a method to invoke each procedure defined by the module, + /// with a callback for when the procedure completes and returns a value. + /// + public RemoteProcedures Procedures => conn.Procedures; + /// + /// Returns true if the connection is active, i.e. has not yet disconnected. + /// + public bool IsActive => conn.IsActive; + /// + /// Close the connection. + /// + /// Throws an error if the connection is already closed. + /// + public void Disconnect() { + conn.Disconnect(); + } + /// + /// Start building a subscription. + /// + /// A builder-pattern constructor for subscribing to queries, + /// causing matching rows to be replicated into the client cache. + public SubscriptionBuilder SubscriptionBuilder() => conn.SubscriptionBuilder(); + /// + /// Get the Identity of this connection. + /// + /// This method returns null if the connection was constructed anonymously + /// and we have not yet received our newly-generated Identity from the host. + /// + public Identity? Identity => conn.Identity; + /// + /// Get this connection's ConnectionId. + /// + public ConnectionId ConnectionId => conn.ConnectionId; + /// + /// Register a callback to be called when a reducer with no handler returns an error. + /// + public event Action? OnUnhandledReducerError { + add => Reducers.InternalOnUnhandledReducerError += value; + remove => Reducers.InternalOnUnhandledReducerError -= value; + } + + internal ReducerEventContext(DbConnection conn, ReducerEvent reducerEvent) + { + this.conn = conn; + Event = reducerEvent; + } + } + + public sealed class ErrorContext : IErrorContext, IRemoteDbContext + { + private readonly DbConnection conn; + /// + /// The Exception that caused this error callback to be run. + /// + public readonly Exception Event; + Exception IErrorContext.Event { + get { + return Event; + } + } + + /// + /// Access to tables in the client cache, which stores a read-only replica of the remote database state. + /// + /// The returned DbView will have a method to access each table defined by the module. + /// + public RemoteTables Db => conn.Db; + /// + /// Access to reducers defined by the module. + /// + /// The returned RemoteReducers will have a method to invoke each reducer defined by the module, + /// plus methods for adding and removing callbacks on each of those reducers. + /// + public RemoteReducers Reducers => conn.Reducers; + /// + /// Access to setters for per-reducer flags. + /// + /// The returned SetReducerFlags will have a method to invoke, + /// for each reducer defined by the module, + /// which call-flags for the reducer can be set. + /// + public SetReducerFlags SetReducerFlags => conn.SetReducerFlags; + /// + /// Access to procedures defined by the module. + /// + /// The returned RemoteProcedures will have a method to invoke each procedure defined by the module, + /// with a callback for when the procedure completes and returns a value. + /// + public RemoteProcedures Procedures => conn.Procedures; + /// + /// Returns true if the connection is active, i.e. has not yet disconnected. + /// + public bool IsActive => conn.IsActive; + /// + /// Close the connection. + /// + /// Throws an error if the connection is already closed. + /// + public void Disconnect() { + conn.Disconnect(); + } + /// + /// Start building a subscription. + /// + /// A builder-pattern constructor for subscribing to queries, + /// causing matching rows to be replicated into the client cache. + public SubscriptionBuilder SubscriptionBuilder() => conn.SubscriptionBuilder(); + /// + /// Get the Identity of this connection. + /// + /// This method returns null if the connection was constructed anonymously + /// and we have not yet received our newly-generated Identity from the host. + /// + public Identity? Identity => conn.Identity; + /// + /// Get this connection's ConnectionId. + /// + public ConnectionId ConnectionId => conn.ConnectionId; + /// + /// Register a callback to be called when a reducer with no handler returns an error. + /// + public event Action? OnUnhandledReducerError { + add => Reducers.InternalOnUnhandledReducerError += value; + remove => Reducers.InternalOnUnhandledReducerError -= value; + } + + internal ErrorContext(DbConnection conn, Exception error) + { + this.conn = conn; + Event = error; + } + } + + public sealed class SubscriptionEventContext : ISubscriptionEventContext, IRemoteDbContext + { + private readonly DbConnection conn; + + /// + /// Access to tables in the client cache, which stores a read-only replica of the remote database state. + /// + /// The returned DbView will have a method to access each table defined by the module. + /// + public RemoteTables Db => conn.Db; + /// + /// Access to reducers defined by the module. + /// + /// The returned RemoteReducers will have a method to invoke each reducer defined by the module, + /// plus methods for adding and removing callbacks on each of those reducers. + /// + public RemoteReducers Reducers => conn.Reducers; + /// + /// Access to setters for per-reducer flags. + /// + /// The returned SetReducerFlags will have a method to invoke, + /// for each reducer defined by the module, + /// which call-flags for the reducer can be set. + /// + public SetReducerFlags SetReducerFlags => conn.SetReducerFlags; + /// + /// Access to procedures defined by the module. + /// + /// The returned RemoteProcedures will have a method to invoke each procedure defined by the module, + /// with a callback for when the procedure completes and returns a value. + /// + public RemoteProcedures Procedures => conn.Procedures; + /// + /// Returns true if the connection is active, i.e. has not yet disconnected. + /// + public bool IsActive => conn.IsActive; + /// + /// Close the connection. + /// + /// Throws an error if the connection is already closed. + /// + public void Disconnect() { + conn.Disconnect(); + } + /// + /// Start building a subscription. + /// + /// A builder-pattern constructor for subscribing to queries, + /// causing matching rows to be replicated into the client cache. + public SubscriptionBuilder SubscriptionBuilder() => conn.SubscriptionBuilder(); + /// + /// Get the Identity of this connection. + /// + /// This method returns null if the connection was constructed anonymously + /// and we have not yet received our newly-generated Identity from the host. + /// + public Identity? Identity => conn.Identity; + /// + /// Get this connection's ConnectionId. + /// + public ConnectionId ConnectionId => conn.ConnectionId; + /// + /// Register a callback to be called when a reducer with no handler returns an error. + /// + public event Action? OnUnhandledReducerError { + add => Reducers.InternalOnUnhandledReducerError += value; + remove => Reducers.InternalOnUnhandledReducerError -= value; + } + + internal SubscriptionEventContext(DbConnection conn) + { + this.conn = conn; + } + } + + public sealed class ProcedureEventContext : IProcedureEventContext, IRemoteDbContext + { + private readonly DbConnection conn; + /// + /// The procedure event that caused this callback to run. + /// + public readonly ProcedureEvent Event; + + /// + /// Access to tables in the client cache, which stores a read-only replica of the remote database state. + /// + /// The returned DbView will have a method to access each table defined by the module. + /// + public RemoteTables Db => conn.Db; + /// + /// Access to reducers defined by the module. + /// + /// The returned RemoteReducers will have a method to invoke each reducer defined by the module, + /// plus methods for adding and removing callbacks on each of those reducers. + /// + public RemoteReducers Reducers => conn.Reducers; + /// + /// Access to setters for per-reducer flags. + /// + /// The returned SetReducerFlags will have a method to invoke, + /// for each reducer defined by the module, + /// which call-flags for the reducer can be set. + /// + public SetReducerFlags SetReducerFlags => conn.SetReducerFlags; + /// + /// Access to procedures defined by the module. + /// + /// The returned RemoteProcedures will have a method to invoke each procedure defined by the module, + /// with a callback for when the procedure completes and returns a value. + /// + public RemoteProcedures Procedures => conn.Procedures; + /// + /// Returns true if the connection is active, i.e. has not yet disconnected. + /// + public bool IsActive => conn.IsActive; + /// + /// Close the connection. + /// + /// Throws an error if the connection is already closed. + /// + public void Disconnect() { + conn.Disconnect(); + } + /// + /// Start building a subscription. + /// + /// A builder-pattern constructor for subscribing to queries, + /// causing matching rows to be replicated into the client cache. + public SubscriptionBuilder SubscriptionBuilder() => conn.SubscriptionBuilder(); + /// + /// Get the Identity of this connection. + /// + /// This method returns null if the connection was constructed anonymously + /// and we have not yet received our newly-generated Identity from the host. + /// + public Identity? Identity => conn.Identity; + /// + /// Get this connection's ConnectionId. + /// + public ConnectionId ConnectionId => conn.ConnectionId; + /// + /// Register a callback to be called when a reducer with no handler returns an error. + /// + public event Action? OnUnhandledReducerError { + add => Reducers.InternalOnUnhandledReducerError += value; + remove => Reducers.InternalOnUnhandledReducerError -= value; + } + + internal ProcedureEventContext(DbConnection conn, ProcedureEvent Event) + { + this.conn = conn; + this.Event = Event; + } + } + + /// + /// Builder-pattern constructor for subscription queries. + /// + public sealed class SubscriptionBuilder + { + private readonly IDbConnection conn; + + private event Action? Applied; + private event Action? Error; + + /// + /// Private API, use conn.SubscriptionBuilder() instead. + /// + public SubscriptionBuilder(IDbConnection conn) + { + this.conn = conn; + } + + /// + /// Register a callback to run when the subscription is applied. + /// + public SubscriptionBuilder OnApplied( + Action callback + ) + { + Applied += callback; + return this; + } + + /// + /// Register a callback to run when the subscription fails. + /// + /// Note that this callback may run either when attempting to apply the subscription, + /// in which case Self::on_applied will never run, + /// or later during the subscription's lifetime if the module's interface changes, + /// in which case Self::on_applied may have already run. + /// + public SubscriptionBuilder OnError( + Action callback + ) + { + Error += callback; + return this; + } + + /// + /// Add a typed query to this subscription. + /// + /// This is the entry point for building subscriptions without writing SQL by hand. + /// Once a typed query is added, only typed queries may follow (SQL and typed queries cannot be mixed). + /// + public TypedSubscriptionBuilder AddQuery( + Func> build + ) + { + var typed = new TypedSubscriptionBuilder(conn, Applied, Error); + return typed.AddQuery(build); + } + + /// + /// Subscribe to the following SQL queries. + /// + /// This method returns immediately, with the data not yet added to the DbConnection. + /// The provided callbacks will be invoked once the data is returned from the remote server. + /// Data from all the provided queries will be returned at the same time. + /// + /// See the SpacetimeDB SQL docs for more information on SQL syntax: + /// https://spacetimedb.com/docs/sql + /// + public SubscriptionHandle Subscribe( + string[] querySqls + ) => new(conn, Applied, Error, querySqls); + + /// + /// Subscribe to all rows from all tables. + /// + /// This method is intended as a convenience + /// for applications where client-side memory use and network bandwidth are not concerns. + /// Applications where these resources are a constraint + /// should register more precise queries via Self.Subscribe + /// in order to replicate only the subset of data which the client needs to function. + /// + /// This method should not be combined with Self.Subscribe on the same DbConnection. + /// A connection may either Self.Subscribe to particular queries, + /// or Self.SubscribeToAllTables, but not both. + /// Attempting to call Self.Subscribe + /// on a DbConnection that has previously used Self.SubscribeToAllTables, + /// or vice versa, may misbehave in any number of ways, + /// including dropping subscriptions, corrupting the client cache, or panicking. + /// + public void SubscribeToAllTables() + { + // Make sure we use the legacy handle constructor here, even though there's only 1 query. + // We drop the error handler, since it can't be called for legacy subscriptions. + new SubscriptionHandle( + conn, + Applied, + new string[] { "SELECT * FROM *" } + ); + } + } + + public sealed class SubscriptionHandle : SubscriptionHandleBase { + /// + /// Internal API. Construct SubscriptionHandles using conn.SubscriptionBuilder. + /// + public SubscriptionHandle(IDbConnection conn, Action? onApplied, string[] querySqls) : base(conn, onApplied, querySqls) + { } + + /// + /// Internal API. Construct SubscriptionHandles using conn.SubscriptionBuilder. + /// + public SubscriptionHandle( + IDbConnection conn, + Action? onApplied, + Action? onError, + string[] querySqls + ) : base(conn, onApplied, onError, querySqls) + { } + } + + public sealed class QueryBuilder + { + public From From { get; } = new(); + } + + public sealed class From + { + public global::SpacetimeDB.Table LoggedOutPlayer() => new("logged_out_player", new LoggedOutPlayerCols("logged_out_player"), new LoggedOutPlayerIxCols("logged_out_player")); + public global::SpacetimeDB.Table MyPlayer() => new("my_player", new MyPlayerCols("my_player"), new MyPlayerIxCols("my_player")); + public global::SpacetimeDB.Table Person() => new("person", new PersonCols("person"), new PersonIxCols("person")); + public global::SpacetimeDB.Table Player() => new("player", new PlayerCols("player"), new PlayerIxCols("player")); + public global::SpacetimeDB.Table TestD() => new("test_d", new TestDCols("test_d"), new TestDIxCols("test_d")); + public global::SpacetimeDB.Table TestF() => new("test_f", new TestFCols("test_f"), new TestFIxCols("test_f")); + } + + public sealed class TypedSubscriptionBuilder + { + private readonly IDbConnection conn; + private Action? Applied; + private Action? Error; + private readonly List querySqls = new(); + + internal TypedSubscriptionBuilder(IDbConnection conn, Action? applied, Action? error) + { + this.conn = conn; + Applied = applied; + Error = error; + } + + public TypedSubscriptionBuilder OnApplied(Action callback) + { + Applied += callback; + return this; + } + + public TypedSubscriptionBuilder OnError(Action callback) + { + Error += callback; + return this; + } + + public TypedSubscriptionBuilder AddQuery(Func> build) + { + var qb = new QueryBuilder(); + querySqls.Add(build(qb).ToSql()); + return this; + } + + public SubscriptionHandle Subscribe() => new(conn, Applied, Error, querySqls.ToArray()); + } + + public abstract partial class Reducer + { + private Reducer() { } + } + + public abstract partial class Procedure + { + private Procedure() { } + } + + public sealed class DbConnection : DbConnectionBase + { + public override RemoteTables Db { get; } + public readonly RemoteReducers Reducers; + public readonly SetReducerFlags SetReducerFlags = new(); + public readonly RemoteProcedures Procedures; + + public DbConnection() + { + Db = new(this); + Reducers = new(this, SetReducerFlags); + Procedures = new(this); + } + + protected override Reducer ToReducer(TransactionUpdate update) + { + var encodedArgs = update.ReducerCall.Args; + return update.ReducerCall.ReducerName switch { + "add" => BSATNHelpers.Decode(encodedArgs), + "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), + "list_over_age" => BSATNHelpers.Decode(encodedArgs), + "log_module_identity" => BSATNHelpers.Decode(encodedArgs), + "query_private" => BSATNHelpers.Decode(encodedArgs), + "say_hello" => BSATNHelpers.Decode(encodedArgs), + "test" => BSATNHelpers.Decode(encodedArgs), + "test_btree_index_args" => BSATNHelpers.Decode(encodedArgs), + "" => throw new SpacetimeDBEmptyReducerNameException("Reducer name is empty"), + var reducer => throw new ArgumentOutOfRangeException("Reducer", $"Unknown reducer {reducer}") + }; + } + + protected override IEventContext ToEventContext(Event Event) => + new EventContext(this, Event); + + protected override IReducerEventContext ToReducerEventContext(ReducerEvent reducerEvent) => + new ReducerEventContext(this, reducerEvent); + + protected override ISubscriptionEventContext MakeSubscriptionEventContext() => + new SubscriptionEventContext(this); + + protected override IErrorContext ToErrorContext(Exception exception) => + new ErrorContext(this, exception); + + protected override IProcedureEventContext ToProcedureEventContext(ProcedureEvent procedureEvent) => + new ProcedureEventContext(this, procedureEvent); + + protected override bool Dispatch(IReducerEventContext context, Reducer reducer) + { + var eventContext = (ReducerEventContext)context; + return reducer switch { + Reducer.Add args => Reducers.InvokeAdd(eventContext, args), + 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.ListOverAge args => Reducers.InvokeListOverAge(eventContext, args), + Reducer.LogModuleIdentity args => Reducers.InvokeLogModuleIdentity(eventContext, args), + Reducer.QueryPrivate args => Reducers.InvokeQueryPrivate(eventContext, args), + Reducer.SayHello args => Reducers.InvokeSayHello(eventContext, args), + Reducer.Test args => Reducers.InvokeTest(eventContext, args), + Reducer.TestBtreeIndexArgs args => Reducers.InvokeTestBtreeIndexArgs(eventContext, args), + _ => throw new ArgumentOutOfRangeException("Reducer", $"Unknown reducer {reducer}") + }; + } + + public SubscriptionBuilder SubscriptionBuilder() => new(this); + public event Action OnUnhandledReducerError + { + add => Reducers.InternalOnUnhandledReducerError += value; + remove => Reducers.InternalOnUnhandledReducerError -= value; + } + } +} +''' +"Tables/LoggedOutPlayer.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 LoggedOutPlayerHandle : RemoteTableHandle + { + protected override string RemoteTableName => "logged_out_player"; + + public sealed class LoggedOutPlayerIdentityIdxBtreeUniqueIndex : UniqueIndexBase + { + protected override SpacetimeDB.Identity GetKey(Player row) => row.Identity; + + public LoggedOutPlayerIdentityIdxBtreeUniqueIndex(LoggedOutPlayerHandle table) : base(table) { } + } + + public readonly LoggedOutPlayerIdentityIdxBtreeUniqueIndex LoggedOutPlayerIdentityIdxBtree; + + public sealed class LoggedOutPlayerNameIdxBtreeUniqueIndex : UniqueIndexBase + { + protected override string GetKey(Player row) => row.Name; + + public LoggedOutPlayerNameIdxBtreeUniqueIndex(LoggedOutPlayerHandle table) : base(table) { } + } + + public readonly LoggedOutPlayerNameIdxBtreeUniqueIndex LoggedOutPlayerNameIdxBtree; + + public sealed class LoggedOutPlayerPlayerIdIdxBtreeUniqueIndex : UniqueIndexBase + { + protected override ulong GetKey(Player row) => row.PlayerId; + + public LoggedOutPlayerPlayerIdIdxBtreeUniqueIndex(LoggedOutPlayerHandle table) : base(table) { } + } + + public readonly LoggedOutPlayerPlayerIdIdxBtreeUniqueIndex LoggedOutPlayerPlayerIdIdxBtree; + + internal LoggedOutPlayerHandle(DbConnection conn) : base(conn) + { + LoggedOutPlayerIdentityIdxBtree = new(this); + LoggedOutPlayerNameIdxBtree = new(this); + LoggedOutPlayerPlayerIdIdxBtree = new(this); + } + + protected override object GetPrimaryKey(Player row) => row.Identity; + } + + public readonly LoggedOutPlayerHandle LoggedOutPlayer; + } + + public sealed class LoggedOutPlayerCols + { + public global::SpacetimeDB.Col Identity { get; } + public global::SpacetimeDB.Col PlayerId { get; } + public global::SpacetimeDB.Col Name { get; } + + public LoggedOutPlayerCols(string tableName) + { + Identity = new global::SpacetimeDB.Col(tableName, "identity"); + PlayerId = new global::SpacetimeDB.Col(tableName, "player_id"); + Name = new global::SpacetimeDB.Col(tableName, "name"); + } + } + + public sealed class LoggedOutPlayerIxCols + { + public global::SpacetimeDB.IxCol Identity { get; } + public global::SpacetimeDB.IxCol PlayerId { get; } + public global::SpacetimeDB.IxCol Name { get; } + + public LoggedOutPlayerIxCols(string tableName) + { + Identity = new global::SpacetimeDB.IxCol(tableName, "identity"); + PlayerId = new global::SpacetimeDB.IxCol(tableName, "player_id"); + Name = new global::SpacetimeDB.IxCol(tableName, "name"); + } + } +} +''' +"Tables/MyPlayer.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 MyPlayerHandle : RemoteTableHandle + { + protected override string RemoteTableName => "my_player"; + + internal MyPlayerHandle(DbConnection conn) : base(conn) + { + } + } + + public readonly MyPlayerHandle MyPlayer; + } + + public sealed class MyPlayerCols + { + public global::SpacetimeDB.Col Identity { get; } + public global::SpacetimeDB.Col PlayerId { get; } + public global::SpacetimeDB.Col Name { get; } + + public MyPlayerCols(string tableName) + { + Identity = new global::SpacetimeDB.Col(tableName, "identity"); + PlayerId = new global::SpacetimeDB.Col(tableName, "player_id"); + Name = new global::SpacetimeDB.Col(tableName, "name"); + } + } + + public sealed class MyPlayerIxCols + { + + public MyPlayerIxCols(string tableName) + { + } + } +} +''' +"Tables/Person.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 PersonHandle : RemoteTableHandle + { + protected override string RemoteTableName => "person"; + + public sealed class AgeIndex : BTreeIndexBase + { + protected override byte GetKey(Person row) => row.Age; + + public AgeIndex(PersonHandle table) : base(table) { } + } + + public readonly AgeIndex Age; + + public sealed class PersonIdIdxBtreeUniqueIndex : UniqueIndexBase + { + protected override uint GetKey(Person row) => row.Id; + + public PersonIdIdxBtreeUniqueIndex(PersonHandle table) : base(table) { } + } + + public readonly PersonIdIdxBtreeUniqueIndex PersonIdIdxBtree; + + internal PersonHandle(DbConnection conn) : base(conn) + { + Age = new(this); + PersonIdIdxBtree = new(this); + } + + protected override object GetPrimaryKey(Person row) => row.Id; + } + + public readonly PersonHandle Person; + } + + public sealed class PersonCols + { + public global::SpacetimeDB.Col Id { get; } + public global::SpacetimeDB.Col Name { get; } + public global::SpacetimeDB.Col Age { get; } + + public PersonCols(string tableName) + { + Id = new global::SpacetimeDB.Col(tableName, "id"); + Name = new global::SpacetimeDB.Col(tableName, "name"); + Age = new global::SpacetimeDB.Col(tableName, "age"); + } + } + + public sealed class PersonIxCols + { + public global::SpacetimeDB.IxCol Id { get; } + public global::SpacetimeDB.IxCol Age { get; } + + public PersonIxCols(string tableName) + { + Id = new global::SpacetimeDB.IxCol(tableName, "id"); + Age = new global::SpacetimeDB.IxCol(tableName, "age"); + } + } +} +''' +"Tables/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 SpacetimeDB.BSATN; +using SpacetimeDB.ClientApi; +using System.Collections.Generic; +using System.Runtime.Serialization; + +namespace SpacetimeDB +{ + public sealed partial class RemoteTables + { + public sealed class PlayerHandle : RemoteTableHandle + { + protected override string RemoteTableName => "player"; + + public sealed class PlayerIdentityIdxBtreeUniqueIndex : UniqueIndexBase + { + protected override SpacetimeDB.Identity GetKey(Player row) => row.Identity; + + public PlayerIdentityIdxBtreeUniqueIndex(PlayerHandle table) : base(table) { } + } + + public readonly PlayerIdentityIdxBtreeUniqueIndex PlayerIdentityIdxBtree; + + public sealed class PlayerNameIdxBtreeUniqueIndex : UniqueIndexBase + { + protected override string GetKey(Player row) => row.Name; + + public PlayerNameIdxBtreeUniqueIndex(PlayerHandle table) : base(table) { } + } + + public readonly PlayerNameIdxBtreeUniqueIndex PlayerNameIdxBtree; + + public sealed class PlayerPlayerIdIdxBtreeUniqueIndex : UniqueIndexBase + { + protected override ulong GetKey(Player row) => row.PlayerId; + + public PlayerPlayerIdIdxBtreeUniqueIndex(PlayerHandle table) : base(table) { } + } + + public readonly PlayerPlayerIdIdxBtreeUniqueIndex PlayerPlayerIdIdxBtree; + + internal PlayerHandle(DbConnection conn) : base(conn) + { + PlayerIdentityIdxBtree = new(this); + PlayerNameIdxBtree = new(this); + PlayerPlayerIdIdxBtree = new(this); + } + + protected override object GetPrimaryKey(Player row) => row.Identity; + } + + public readonly PlayerHandle Player; + } + + public sealed class PlayerCols + { + public global::SpacetimeDB.Col Identity { get; } + public global::SpacetimeDB.Col PlayerId { get; } + public global::SpacetimeDB.Col Name { get; } + + public PlayerCols(string tableName) + { + Identity = new global::SpacetimeDB.Col(tableName, "identity"); + PlayerId = new global::SpacetimeDB.Col(tableName, "player_id"); + Name = new global::SpacetimeDB.Col(tableName, "name"); + } + } + + public sealed class PlayerIxCols + { + public global::SpacetimeDB.IxCol Identity { get; } + public global::SpacetimeDB.IxCol PlayerId { get; } + public global::SpacetimeDB.IxCol Name { get; } + + public PlayerIxCols(string tableName) + { + Identity = new global::SpacetimeDB.IxCol(tableName, "identity"); + PlayerId = new global::SpacetimeDB.IxCol(tableName, "player_id"); + Name = new global::SpacetimeDB.IxCol(tableName, "name"); + } + } +} +''' +"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 RemoteTableName => "test_d"; + + internal TestDHandle(DbConnection conn) : base(conn) + { + } + } + + public readonly TestDHandle TestD; + } + + public sealed class TestDCols + { + public global::SpacetimeDB.NullableCol TestC { get; } + + public TestDCols(string tableName) + { + TestC = new global::SpacetimeDB.NullableCol(tableName, "test_c"); + } + } + + public sealed class TestDIxCols + { + + public TestDIxCols(string tableName) + { + } + } +} +''' +"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 RemoteTableName => "test_f"; + + internal TestFHandle(DbConnection conn) : base(conn) + { + } + } + + public readonly TestFHandle TestF; + } + + public sealed class TestFCols + { + public global::SpacetimeDB.Col Field { get; } + + public TestFCols(string tableName) + { + Field = new global::SpacetimeDB.Col(tableName, "field"); + } + } + + public sealed class TestFIxCols + { + + public TestFIxCols(string tableName) + { + } + } +} +''' +"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 + +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. + +#nullable enable + +using System; +using System.Collections.Generic; +using System.Runtime.Serialization; + +namespace SpacetimeDB +{ + [SpacetimeDB.Type] + [DataContract] + public sealed partial class HasSpecialStuff + { + [DataMember(Name = "identity")] + public SpacetimeDB.Identity Identity; + [DataMember(Name = "connection_id")] + public SpacetimeDB.ConnectionId ConnectionId; + + public HasSpecialStuff( + SpacetimeDB.Identity Identity, + SpacetimeDB.ConnectionId ConnectionId + ) + { + this.Identity = Identity; + this.ConnectionId = ConnectionId; + } + + 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. + +#nullable enable + +using System; + +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. + +#nullable enable + +using System; + +namespace SpacetimeDB +{ + [SpacetimeDB.Type] + public partial record NamespaceTestF : SpacetimeDB.TaggedEnum<( + SpacetimeDB.Unit Foo, + SpacetimeDB.Unit Bar, + string Baz + )>; +} +''' +"Types/Person.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 Person + { + [DataMember(Name = "id")] + public uint Id; + [DataMember(Name = "name")] + public string Name; + [DataMember(Name = "age")] + public byte Age; + + public Person( + uint Id, + string Name, + byte Age + ) + { + this.Id = Id; + this.Name = Name; + this.Age = Age; + } + + public Person() + { + this.Name = ""; + } + } +} +''' +"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. + +#nullable enable + +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/PrivateTable.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 PrivateTable + { + [DataMember(Name = "name")] + public string Name; + + public PrivateTable(string Name) + { + this.Name = Name; + } + + public PrivateTable() + { + this.Name = ""; + } + } +} +''' +"Types/RemoveTable.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 RemoveTable + { + [DataMember(Name = "id")] + public uint Id; + + public RemoveTable(uint Id) + { + this.Id = Id; + } + + public RemoveTable() + { + } + } +} +''' +"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 SpacetimeDB.Timestamp PrevTime; + + public RepeatingTestArg( + ulong ScheduledId, + SpacetimeDB.ScheduleAt ScheduledAt, + SpacetimeDB.Timestamp 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/codegen/tests/snapshots/codegen__codegen_typescript.snap.new b/crates/codegen/tests/snapshots/codegen__codegen_typescript.snap.new new file mode 100644 index 00000000000..c4797c02371 --- /dev/null +++ b/crates/codegen/tests/snapshots/codegen__codegen_typescript.snap.new @@ -0,0 +1,1086 @@ +--- +source: crates/codegen/tests/codegen.rs +assertion_line: 37 +expression: outfiles +--- +"add_player_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. + +/* eslint-disable */ +/* tslint:disable */ +import { + TypeBuilder as __TypeBuilder, + t as __t, + type AlgebraicTypeType as __AlgebraicTypeType, + type Infer as __Infer, +} from "spacetimedb"; + +export default { + name: __t.string(), +}; +''' +"add_private_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. + +/* eslint-disable */ +/* tslint:disable */ +import { + TypeBuilder as __TypeBuilder, + t as __t, + type AlgebraicTypeType as __AlgebraicTypeType, + type Infer as __Infer, +} from "spacetimedb"; + +export default { + name: __t.string(), +}; +''' +"add_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. + +/* eslint-disable */ +/* tslint:disable */ +import { + TypeBuilder as __TypeBuilder, + t as __t, + type AlgebraicTypeType as __AlgebraicTypeType, + type Infer as __Infer, +} from "spacetimedb"; + +export default { + name: __t.string(), + age: __t.u8(), +}; +''' +"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 YOUR MODULE SOURCE CODE INSTEAD. + +/* eslint-disable */ +/* tslint:disable */ +import { + TypeBuilder as __TypeBuilder, + t as __t, + type AlgebraicTypeType as __AlgebraicTypeType, + type Infer as __Infer, +} from "spacetimedb"; + +export default {}; +''' +"baz_type.ts" = ''' +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +/* eslint-disable */ +/* tslint:disable */ +import { + TypeBuilder as __TypeBuilder, + t as __t, + type AlgebraicTypeType as __AlgebraicTypeType, + type Infer as __Infer, +} from "spacetimedb"; + +export default __t.object("Baz", { + field: __t.string(), +}); + + +''' +"delete_player_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. + +/* eslint-disable */ +/* tslint:disable */ +import { + TypeBuilder as __TypeBuilder, + t as __t, + type AlgebraicTypeType as __AlgebraicTypeType, + type Infer as __Infer, +} from "spacetimedb"; + +export default { + id: __t.u64(), +}; +''' +"delete_players_by_name_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. + +/* eslint-disable */ +/* tslint:disable */ +import { + TypeBuilder as __TypeBuilder, + t as __t, + type AlgebraicTypeType as __AlgebraicTypeType, + type Infer as __Infer, +} from "spacetimedb"; + +export default { + name: __t.string(), +}; +''' +"foobar_type.ts" = ''' +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +/* eslint-disable */ +/* tslint:disable */ +import { + TypeBuilder as __TypeBuilder, + t as __t, + type AlgebraicTypeType as __AlgebraicTypeType, + type Infer as __Infer, +} from "spacetimedb"; +import Baz from "./baz_type"; + + +// The tagged union or sum type for the algebraic type `Foobar`. +const Foobar = __t.enum("Foobar", {get Baz() { + return Baz; + }, + Bar: __t.unit(), + Har: __t.u32(), +}); + +export default Foobar; + + +''' +"get_my_schema_via_http_procedure.ts" = ''' +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +/* eslint-disable */ +/* tslint:disable */ +import { + TypeBuilder as __TypeBuilder, + t as __t, + type AlgebraicTypeType as __AlgebraicTypeType, + type Infer as __Infer, +} from "spacetimedb"; + +export const params = { +}; +export const returnType = __t.string()''' +"has_special_stuff_type.ts" = ''' +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +/* eslint-disable */ +/* tslint:disable */ +import { + TypeBuilder as __TypeBuilder, + t as __t, + type AlgebraicTypeType as __AlgebraicTypeType, + type Infer as __Infer, +} from "spacetimedb"; + +export default __t.object("HasSpecialStuff", { + identity: __t.identity(), + connectionId: __t.connectionId(), +}); + + +''' +"index.ts" = ''' +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +VERSION_COMMENT + +/* eslint-disable */ +/* tslint:disable */ +import { + DbConnectionBuilder as __DbConnectionBuilder, + DbConnectionImpl as __DbConnectionImpl, + SubscriptionBuilderImpl as __SubscriptionBuilderImpl, + TypeBuilder as __TypeBuilder, + Uuid as __Uuid, + convertToAccessorMap as __convertToAccessorMap, + makeQueryBuilder as __makeQueryBuilder, + procedureSchema as __procedureSchema, + procedures as __procedures, + reducerSchema as __reducerSchema, + reducers as __reducers, + schema as __schema, + t as __t, + table as __table, + type AlgebraicTypeType as __AlgebraicTypeType, + type DbConnectionConfig as __DbConnectionConfig, + type ErrorContextInterface as __ErrorContextInterface, + type Event as __Event, + type EventContextInterface as __EventContextInterface, + type Infer as __Infer, + type QueryBuilder as __QueryBuilder, + type ReducerEventContextInterface as __ReducerEventContextInterface, + type RemoteModule as __RemoteModule, + type SubscriptionEventContextInterface as __SubscriptionEventContextInterface, + type SubscriptionHandleImpl as __SubscriptionHandleImpl, +} from "spacetimedb"; + +// Import all reducer arg schemas +import AddReducer from "./add_reducer"; +import AddPlayerReducer from "./add_player_reducer"; +import AddPrivateReducer from "./add_private_reducer"; +import AssertCallerIdentityIsModuleIdentityReducer from "./assert_caller_identity_is_module_identity_reducer"; +import DeletePlayerReducer from "./delete_player_reducer"; +import DeletePlayersByNameReducer from "./delete_players_by_name_reducer"; +import ListOverAgeReducer from "./list_over_age_reducer"; +import LogModuleIdentityReducer from "./log_module_identity_reducer"; +import QueryPrivateReducer from "./query_private_reducer"; +import SayHelloReducer from "./say_hello_reducer"; +import TestReducer from "./test_reducer"; +import TestBtreeIndexArgsReducer from "./test_btree_index_args_reducer"; + +// Import all procedure arg schemas +import * as GetMySchemaViaHttpProcedure from "./get_my_schema_via_http_procedure"; +import * as ReturnValueProcedure from "./return_value_procedure"; +import * as SleepOneSecondProcedure from "./sleep_one_second_procedure"; +import * as WithTxProcedure from "./with_tx_procedure"; + +// Import all table schema definitions +import LoggedOutPlayerRow from "./logged_out_player_table"; +import MyPlayerRow from "./my_player_table"; +import PersonRow from "./person_table"; +import PlayerRow from "./player_table"; +import TestDRow from "./test_d_table"; +import TestFRow from "./test_f_table"; + +/** Type-only namespace exports for generated type groups. */ + +/** The schema information for all tables in this module. This is defined the same was as the tables would have been defined in the server. */ +const tablesSchema = __schema( + __table({ + name: 'logged_out_player', + indexes: [ + { name: 'logged_out_player_identity_idx_btree', algorithm: 'btree', columns: [ + 'identity', + ] }, + { name: 'logged_out_player_name_idx_btree', algorithm: 'btree', columns: [ + 'name', + ] }, + { name: 'logged_out_player_player_id_idx_btree', algorithm: 'btree', columns: [ + 'playerId', + ] }, + ], + constraints: [ + { name: 'logged_out_player_identity_key', constraint: 'unique', columns: ['identity'] }, + { name: 'logged_out_player_name_key', constraint: 'unique', columns: ['name'] }, + { name: 'logged_out_player_player_id_key', constraint: 'unique', columns: ['playerId'] }, + ], + }, LoggedOutPlayerRow), + __table({ + name: 'person', + indexes: [ + { name: 'age', algorithm: 'btree', columns: [ + 'age', + ] }, + { name: 'person_id_idx_btree', algorithm: 'btree', columns: [ + 'id', + ] }, + ], + constraints: [ + { name: 'person_id_key', constraint: 'unique', columns: ['id'] }, + ], + }, PersonRow), + __table({ + name: 'player', + indexes: [ + { name: 'player_identity_idx_btree', algorithm: 'btree', columns: [ + 'identity', + ] }, + { name: 'player_name_idx_btree', algorithm: 'btree', columns: [ + 'name', + ] }, + { name: 'player_player_id_idx_btree', algorithm: 'btree', columns: [ + 'playerId', + ] }, + ], + constraints: [ + { name: 'player_identity_key', constraint: 'unique', columns: ['identity'] }, + { name: 'player_name_key', constraint: 'unique', columns: ['name'] }, + { name: 'player_player_id_key', constraint: 'unique', columns: ['playerId'] }, + ], + }, PlayerRow), + __table({ + name: 'test_d', + indexes: [ + ], + constraints: [ + ], + }, TestDRow), + __table({ + name: 'test_f', + indexes: [ + ], + constraints: [ + ], + }, TestFRow), + __table({ + name: 'my_player', + indexes: [ + ], + constraints: [ + ], + }, MyPlayerRow), +); + +/** The schema information for all reducers in this module. This is defined the same way as the reducers would have been defined in the server, except the body of the reducer is omitted in code generation. */ +const reducersSchema = __reducers( + __reducerSchema("add", AddReducer), + __reducerSchema("add_player", AddPlayerReducer), + __reducerSchema("add_private", AddPrivateReducer), + __reducerSchema("assert_caller_identity_is_module_identity", AssertCallerIdentityIsModuleIdentityReducer), + __reducerSchema("delete_player", DeletePlayerReducer), + __reducerSchema("delete_players_by_name", DeletePlayersByNameReducer), + __reducerSchema("list_over_age", ListOverAgeReducer), + __reducerSchema("log_module_identity", LogModuleIdentityReducer), + __reducerSchema("query_private", QueryPrivateReducer), + __reducerSchema("say_hello", SayHelloReducer), + __reducerSchema("test", TestReducer), + __reducerSchema("test_btree_index_args", TestBtreeIndexArgsReducer), +); + +/** The schema information for all procedures in this module. This is defined the same way as the procedures would have been defined in the server. */ +const proceduresSchema = __procedures( + __procedureSchema("get_my_schema_via_http", GetMySchemaViaHttpProcedure.params, GetMySchemaViaHttpProcedure.returnType), + __procedureSchema("return_value", ReturnValueProcedure.params, ReturnValueProcedure.returnType), + __procedureSchema("sleep_one_second", SleepOneSecondProcedure.params, SleepOneSecondProcedure.returnType), + __procedureSchema("with_tx", WithTxProcedure.params, WithTxProcedure.returnType), +); + +/** The remote SpacetimeDB module schema, both runtime and type information. */ +const REMOTE_MODULE = { + versionInfo: { + cliVersion: "1.12.0" as const, + }, + tables: tablesSchema.schemaType.tables, + reducers: reducersSchema.reducersType.reducers, + ...proceduresSchema, +} satisfies __RemoteModule< + typeof tablesSchema.schemaType, + typeof reducersSchema.reducersType, + typeof proceduresSchema +>; + +/** The tables available in this remote SpacetimeDB module. */ +export const tables = __convertToAccessorMap(tablesSchema.schemaType.tables); + +/** A typed query builder for this remote SpacetimeDB module. */ +export const query: __QueryBuilder = __makeQueryBuilder(tablesSchema.schemaType); + +/** The reducers available in this remote SpacetimeDB module. */ +export const reducers = __convertToAccessorMap(reducersSchema.reducersType.reducers); + +/** The context type returned in callbacks for all possible events. */ +export type EventContext = __EventContextInterface; +/** The context type returned in callbacks for reducer events. */ +export type ReducerEventContext = __ReducerEventContextInterface; +/** The context type returned in callbacks for subscription events. */ +export type SubscriptionEventContext = __SubscriptionEventContextInterface; +/** The context type returned in callbacks for error events. */ +export type ErrorContext = __ErrorContextInterface; +/** The subscription handle type to manage active subscriptions created from a {@link SubscriptionBuilder}. */ +export type SubscriptionHandle = __SubscriptionHandleImpl; + +/** Builder class to configure a new subscription to the remote SpacetimeDB instance. */ +export class SubscriptionBuilder extends __SubscriptionBuilderImpl {} + +/** Builder class to configure a new database connection to the remote SpacetimeDB instance. */ +export class DbConnectionBuilder extends __DbConnectionBuilder {} + +/** The typed database connection to manage connections to the remote SpacetimeDB instance. This class has type information specific to the generated module. */ +export class DbConnection extends __DbConnectionImpl { + /** Creates a new {@link DbConnectionBuilder} to configure and connect to the remote SpacetimeDB instance. */ + static builder = (): DbConnectionBuilder => { + return new DbConnectionBuilder(REMOTE_MODULE, (config: __DbConnectionConfig) => new DbConnection(config)); + }; + + /** Creates a new {@link SubscriptionBuilder} to configure a subscription to the remote SpacetimeDB instance. */ + override subscriptionBuilder = (): SubscriptionBuilder => { + return new SubscriptionBuilder(this); + }; +} + +''' +"list_over_age_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. + +/* eslint-disable */ +/* tslint:disable */ +import { + TypeBuilder as __TypeBuilder, + t as __t, + type AlgebraicTypeType as __AlgebraicTypeType, + type Infer as __Infer, +} from "spacetimedb"; + +export default { + age: __t.u8(), +}; +''' +"log_module_identity_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. + +/* eslint-disable */ +/* tslint:disable */ +import { + TypeBuilder as __TypeBuilder, + t as __t, + type AlgebraicTypeType as __AlgebraicTypeType, + type Infer as __Infer, +} from "spacetimedb"; + +export default {}; +''' +"logged_out_player_table.ts" = ''' +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +/* eslint-disable */ +/* tslint:disable */ +import { + TypeBuilder as __TypeBuilder, + t as __t, + type AlgebraicTypeType as __AlgebraicTypeType, + type Infer as __Infer, +} from "spacetimedb"; + +export default __t.row({ + identity: __t.identity().primaryKey(), + playerId: __t.u64().name("player_id"), + name: __t.string(), +}); +''' +"my_player_table.ts" = ''' +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +/* eslint-disable */ +/* tslint:disable */ +import { + TypeBuilder as __TypeBuilder, + t as __t, + type AlgebraicTypeType as __AlgebraicTypeType, + type Infer as __Infer, +} from "spacetimedb"; + +export default __t.row({ + identity: __t.identity(), + playerId: __t.u64().name("player_id"), + name: __t.string(), +}); +''' +"namespace_test_c_type.ts" = ''' +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +/* eslint-disable */ +/* tslint:disable */ +import { + TypeBuilder as __TypeBuilder, + t as __t, + type AlgebraicTypeType as __AlgebraicTypeType, + type Infer as __Infer, +} from "spacetimedb"; + +// The tagged union or sum type for the algebraic type `NamespaceTestC`. +const NamespaceTestC = __t.enum("NamespaceTestC", {Foo: __t.unit(), + Bar: __t.unit(), +}); + +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 YOUR MODULE SOURCE CODE INSTEAD. + +/* eslint-disable */ +/* tslint:disable */ +import { + TypeBuilder as __TypeBuilder, + t as __t, + type AlgebraicTypeType as __AlgebraicTypeType, + type Infer as __Infer, +} from "spacetimedb"; + +// The tagged union or sum type for the algebraic type `NamespaceTestF`. +const NamespaceTestF = __t.enum("NamespaceTestF", {Foo: __t.unit(), + Bar: __t.unit(), + Baz: __t.string(), +}); + +export default NamespaceTestF; + + +''' +"person_table.ts" = ''' +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +/* eslint-disable */ +/* tslint:disable */ +import { + TypeBuilder as __TypeBuilder, + t as __t, + type AlgebraicTypeType as __AlgebraicTypeType, + type Infer as __Infer, +} from "spacetimedb"; + +export default __t.row({ + id: __t.u32().primaryKey(), + name: __t.string(), + age: __t.u8(), +}); +''' +"person_type.ts" = ''' +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +/* eslint-disable */ +/* tslint:disable */ +import { + TypeBuilder as __TypeBuilder, + t as __t, + type AlgebraicTypeType as __AlgebraicTypeType, + type Infer as __Infer, +} from "spacetimedb"; + +export default __t.object("Person", { + id: __t.u32(), + name: __t.string(), + age: __t.u8(), +}); + + +''' +"pk_multi_identity_type.ts" = ''' +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +/* eslint-disable */ +/* tslint:disable */ +import { + TypeBuilder as __TypeBuilder, + t as __t, + type AlgebraicTypeType as __AlgebraicTypeType, + type Infer as __Infer, +} from "spacetimedb"; + +export default __t.object("PkMultiIdentity", { + id: __t.u32(), + other: __t.u32(), +}); + + +''' +"player_table.ts" = ''' +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +/* eslint-disable */ +/* tslint:disable */ +import { + TypeBuilder as __TypeBuilder, + t as __t, + type AlgebraicTypeType as __AlgebraicTypeType, + type Infer as __Infer, +} from "spacetimedb"; + +export default __t.row({ + identity: __t.identity().primaryKey(), + playerId: __t.u64().name("player_id"), + name: __t.string(), +}); +''' +"player_type.ts" = ''' +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +/* eslint-disable */ +/* tslint:disable */ +import { + TypeBuilder as __TypeBuilder, + t as __t, + type AlgebraicTypeType as __AlgebraicTypeType, + type Infer as __Infer, +} from "spacetimedb"; + +export default __t.object("Player", { + identity: __t.identity(), + playerId: __t.u64(), + name: __t.string(), +}); + + +''' +"point_type.ts" = ''' +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +/* eslint-disable */ +/* tslint:disable */ +import { + TypeBuilder as __TypeBuilder, + t as __t, + type AlgebraicTypeType as __AlgebraicTypeType, + type Infer as __Infer, +} from "spacetimedb"; + +export default __t.object("Point", { + x: __t.i64(), + y: __t.i64(), +}); + + +''' +"private_table_type.ts" = ''' +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +/* eslint-disable */ +/* tslint:disable */ +import { + TypeBuilder as __TypeBuilder, + t as __t, + type AlgebraicTypeType as __AlgebraicTypeType, + type Infer as __Infer, +} from "spacetimedb"; + +export default __t.object("PrivateTable", { + name: __t.string(), +}); + + +''' +"query_private_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. + +/* eslint-disable */ +/* tslint:disable */ +import { + TypeBuilder as __TypeBuilder, + t as __t, + type AlgebraicTypeType as __AlgebraicTypeType, + type Infer as __Infer, +} from "spacetimedb"; + +export default {}; +''' +"remove_table_type.ts" = ''' +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +/* eslint-disable */ +/* tslint:disable */ +import { + TypeBuilder as __TypeBuilder, + t as __t, + type AlgebraicTypeType as __AlgebraicTypeType, + type Infer as __Infer, +} from "spacetimedb"; + +export default __t.object("RemoveTable", { + id: __t.u32(), +}); + + +''' +"repeating_test_arg_type.ts" = ''' +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +/* eslint-disable */ +/* tslint:disable */ +import { + TypeBuilder as __TypeBuilder, + t as __t, + type AlgebraicTypeType as __AlgebraicTypeType, + type Infer as __Infer, +} from "spacetimedb"; + +export default __t.object("RepeatingTestArg", { + scheduledId: __t.u64(), + scheduledAt: __t.scheduleAt(), + prevTime: __t.timestamp(), +}); + + +''' +"return_value_procedure.ts" = ''' +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +/* eslint-disable */ +/* tslint:disable */ +import { + TypeBuilder as __TypeBuilder, + t as __t, + type AlgebraicTypeType as __AlgebraicTypeType, + type Infer as __Infer, +} from "spacetimedb"; + +import Baz from "./baz_type"; + +export const params = { + foo: __t.u64(), +}; +export const returnType = Baz''' +"say_hello_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. + +/* eslint-disable */ +/* tslint:disable */ +import { + TypeBuilder as __TypeBuilder, + t as __t, + type AlgebraicTypeType as __AlgebraicTypeType, + type Infer as __Infer, +} from "spacetimedb"; + +export default {}; +''' +"sleep_one_second_procedure.ts" = ''' +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +/* eslint-disable */ +/* tslint:disable */ +import { + TypeBuilder as __TypeBuilder, + t as __t, + type AlgebraicTypeType as __AlgebraicTypeType, + type Infer as __Infer, +} from "spacetimedb"; + +export const params = { +}; +export const returnType = __t.unit()''' +"test_a_type.ts" = ''' +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +/* eslint-disable */ +/* tslint:disable */ +import { + TypeBuilder as __TypeBuilder, + t as __t, + type AlgebraicTypeType as __AlgebraicTypeType, + type Infer as __Infer, +} from "spacetimedb"; + +export default __t.object("TestA", { + x: __t.u32(), + y: __t.u32(), + z: __t.string(), +}); + + +''' +"test_b_type.ts" = ''' +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +/* eslint-disable */ +/* tslint:disable */ +import { + TypeBuilder as __TypeBuilder, + t as __t, + type AlgebraicTypeType as __AlgebraicTypeType, + type Infer as __Infer, +} from "spacetimedb"; + +export default __t.object("TestB", { + foo: __t.string(), +}); + + +''' +"test_btree_index_args_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. + +/* eslint-disable */ +/* tslint:disable */ +import { + TypeBuilder as __TypeBuilder, + t as __t, + type AlgebraicTypeType as __AlgebraicTypeType, + type Infer as __Infer, +} from "spacetimedb"; + +export default {}; +''' +"test_d_table.ts" = ''' +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +/* eslint-disable */ +/* tslint:disable */ +import { + TypeBuilder as __TypeBuilder, + t as __t, + type AlgebraicTypeType as __AlgebraicTypeType, + type Infer as __Infer, +} from "spacetimedb"; +import NamespaceTestC from "./namespace_test_c_type"; + + +export default __t.row({ + get testC() { + return __t.option(NamespaceTestC).name("test_c"); + }, +}); +''' +"test_d_type.ts" = ''' +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +/* eslint-disable */ +/* tslint:disable */ +import { + TypeBuilder as __TypeBuilder, + t as __t, + type AlgebraicTypeType as __AlgebraicTypeType, + type Infer as __Infer, +} from "spacetimedb"; +import NamespaceTestC from "./namespace_test_c_type"; + + +export default __t.object("TestD", { + get testC() { + return __t.option(NamespaceTestC); + }, +}); + + +''' +"test_e_type.ts" = ''' +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +/* eslint-disable */ +/* tslint:disable */ +import { + TypeBuilder as __TypeBuilder, + t as __t, + type AlgebraicTypeType as __AlgebraicTypeType, + type Infer as __Infer, +} from "spacetimedb"; + +export default __t.object("TestE", { + id: __t.u64(), + name: __t.string(), +}); + + +''' +"test_f_table.ts" = ''' +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +/* eslint-disable */ +/* tslint:disable */ +import { + TypeBuilder as __TypeBuilder, + t as __t, + type AlgebraicTypeType as __AlgebraicTypeType, + type Infer as __Infer, +} from "spacetimedb"; +import Foobar from "./foobar_type"; + + +export default __t.row({ + get field() { + return Foobar; + }, +}); +''' +"test_foobar_type.ts" = ''' +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +/* eslint-disable */ +/* tslint:disable */ +import { + TypeBuilder as __TypeBuilder, + t as __t, + type AlgebraicTypeType as __AlgebraicTypeType, + type Infer as __Infer, +} from "spacetimedb"; +import Foobar from "./foobar_type"; + + +export default __t.object("TestFoobar", { + get field() { + return Foobar; + }, +}); + + +''' +"test_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. + +/* eslint-disable */ +/* tslint:disable */ +import { + TypeBuilder as __TypeBuilder, + t as __t, + type AlgebraicTypeType as __AlgebraicTypeType, + type Infer as __Infer, +} from "spacetimedb"; + +import TestA from "./test_a_type"; +import TestB from "./test_b_type"; +import NamespaceTestC from "./namespace_test_c_type"; +import NamespaceTestF from "./namespace_test_f_type"; + +export default { + get arg() { + return TestA; + }, + get arg2() { + return TestB; + }, + get arg3() { + return NamespaceTestC; + }, + get arg4() { + return NamespaceTestF; + }, +}; +''' +"types/index.ts" = ''' +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +/* eslint-disable */ +/* tslint:disable */ +import { type Infer as __Infer } from "spacetimedb"; + +// Import all non-reducer types +import Baz from "../baz_type"; +import Foobar from "../foobar_type"; +import HasSpecialStuff from "../has_special_stuff_type"; +import Person from "../person_type"; +import PkMultiIdentity from "../pk_multi_identity_type"; +import Player from "../player_type"; +import Point from "../point_type"; +import PrivateTable from "../private_table_type"; +import RemoveTable from "../remove_table_type"; +import RepeatingTestArg from "../repeating_test_arg_type"; +import TestA from "../test_a_type"; +import TestB from "../test_b_type"; +import TestD from "../test_d_type"; +import TestE from "../test_e_type"; +import TestFoobar from "../test_foobar_type"; +import NamespaceTestC from "../namespace_test_c_type"; +import NamespaceTestF from "../namespace_test_f_type"; + +export type Baz = __Infer; +export type Foobar = __Infer; +export type HasSpecialStuff = __Infer; +export type Person = __Infer; +export type PkMultiIdentity = __Infer; +export type Player = __Infer; +export type Point = __Infer; +export type PrivateTable = __Infer; +export type RemoveTable = __Infer; +export type RepeatingTestArg = __Infer; +export type TestA = __Infer; +export type TestB = __Infer; +export type TestD = __Infer; +export type TestE = __Infer; +export type TestFoobar = __Infer; +export type NamespaceTestC = __Infer; +export type NamespaceTestF = __Infer; + +''' +"types/procedures.ts" = ''' +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +/* eslint-disable */ +/* tslint:disable */ +import { type Infer as __Infer } from "spacetimedb"; + +// Import all procedure arg schemas +import * as GetMySchemaViaHttpProcedure from "../get_my_schema_via_http_procedure"; +import * as ReturnValueProcedure from "../return_value_procedure"; +import * as SleepOneSecondProcedure from "../sleep_one_second_procedure"; +import * as WithTxProcedure from "../with_tx_procedure"; + +export type GetMySchemaViaHttpArgs = __Infer; +export type GetMySchemaViaHttpResult = __Infer; +export type ReturnValueArgs = __Infer; +export type ReturnValueResult = __Infer; +export type SleepOneSecondArgs = __Infer; +export type SleepOneSecondResult = __Infer; +export type WithTxArgs = __Infer; +export type WithTxResult = __Infer; + +''' +"types/reducers.ts" = ''' +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +/* eslint-disable */ +/* tslint:disable */ +import { type Infer as __Infer } from "spacetimedb"; + +// Import all reducer arg schemas +import AddReducer from "../add_reducer"; +import AddPlayerReducer from "../add_player_reducer"; +import AddPrivateReducer from "../add_private_reducer"; +import AssertCallerIdentityIsModuleIdentityReducer from "../assert_caller_identity_is_module_identity_reducer"; +import DeletePlayerReducer from "../delete_player_reducer"; +import DeletePlayersByNameReducer from "../delete_players_by_name_reducer"; +import ListOverAgeReducer from "../list_over_age_reducer"; +import LogModuleIdentityReducer from "../log_module_identity_reducer"; +import QueryPrivateReducer from "../query_private_reducer"; +import SayHelloReducer from "../say_hello_reducer"; +import TestReducer from "../test_reducer"; +import TestBtreeIndexArgsReducer from "../test_btree_index_args_reducer"; + +export type AddParams = __Infer; +export type AddPlayerParams = __Infer; +export type AddPrivateParams = __Infer; +export type AssertCallerIdentityIsModuleIdentityParams = __Infer; +export type DeletePlayerParams = __Infer; +export type DeletePlayersByNameParams = __Infer; +export type ListOverAgeParams = __Infer; +export type LogModuleIdentityParams = __Infer; +export type QueryPrivateParams = __Infer; +export type SayHelloParams = __Infer; +export type TestParams = __Infer; +export type TestBtreeIndexArgsParams = __Infer; + +''' +"with_tx_procedure.ts" = ''' +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +/* eslint-disable */ +/* tslint:disable */ +import { + TypeBuilder as __TypeBuilder, + t as __t, + type AlgebraicTypeType as __AlgebraicTypeType, + type Infer as __Infer, +} from "spacetimedb"; + +export const params = { +}; +export const returnType = __t.unit()''' diff --git a/crates/schema/src/auto_migrate.rs b/crates/schema/src/auto_migrate.rs index 446c91638b7..dbdbb291eba 100644 --- a/crates/schema/src/auto_migrate.rs +++ b/crates/schema/src/auto_migrate.rs @@ -930,11 +930,11 @@ fn auto_migrate_indexes(plan: &mut AutoMigratePlan<'_>, new_tables: &HashSet<&Id Ok(()) } Diff::MaybeChange { old, new } => { - if old.accessor_name != new.accessor_name { + if old.codegen_name != new.codegen_name { Err(AutoMigrateError::ChangeIndexAccessor { index: old.name.clone(), - old_accessor: old.accessor_name.clone(), - new_accessor: new.accessor_name.clone(), + old_accessor: old.codegen_name.clone(), + new_accessor: new.codegen_name.clone(), } .into()) } else { diff --git a/crates/schema/src/def.rs b/crates/schema/src/def.rs index 0067c1645e1..90f9ff09f84 100644 --- a/crates/schema/src/def.rs +++ b/crates/schema/src/def.rs @@ -662,19 +662,21 @@ impl From for RawSequenceDefV9 { #[non_exhaustive] pub struct IndexDef { /// The name of the index. Must be unique within the containing `ModuleDef`. + /// + /// In V9 and earlier, this was system generated. + /// in V10, this can be optionally passed in by the user, but if not passed in, it will be + /// generated by the system using the same algorithm as V9 and earlier. pub name: RawIdentifier, - /// Accessor name for the index used in client codegen. + /// codegen_name is the name of the index to be used for client code generation. /// - /// This is set the user and should not be assumed to follow - /// any particular format. + /// In V9 and earlier, this could be passed by the user, as `accessor` macro in bindings. + /// In V10, this will be always be `name`. /// - /// May be set to `None` if this is an auto-generated index for which the user + /// In V9, this may be set to `None` if this is an auto-generated index for which the user /// has not supplied a name. In this case, no client code generation for this index /// will be performed. - /// - /// This name is not visible in the system tables, it is only used for client codegen. - pub accessor_name: Option, + pub codegen_name: Option, /// The algorithm parameters for the index. pub algorithm: IndexAlgorithm, @@ -683,7 +685,7 @@ pub struct IndexDef { impl IndexDef { /// Whether this index was generated by the system. pub fn generated(&self) -> bool { - self.accessor_name.is_none() + self.codegen_name.is_none() } } @@ -696,7 +698,7 @@ impl From for RawIndexDefV9 { IndexAlgorithm::Hash(HashAlgorithm { columns }) => RawIndexAlgorithm::Hash { columns }, IndexAlgorithm::Direct(DirectAlgorithm { column }) => RawIndexAlgorithm::Direct { column }, }, - accessor_name: val.accessor_name.map(Into::into), + accessor_name: val.codegen_name.map(Into::into), } } } diff --git a/crates/schema/src/def/validate/v10.rs b/crates/schema/src/def/validate/v10.rs index 4402de4c6a3..92db577276c 100644 --- a/crates/schema/src/def/validate/v10.rs +++ b/crates/schema/src/def/validate/v10.rs @@ -867,17 +867,17 @@ mod tests { [ &IndexDef { name: "Apples_count_idx_direct".into(), - accessor_name: Some(expect_identifier("Apples_count_direct")), + codegen_name: Some(expect_identifier("Apples_count_direct")), algorithm: DirectAlgorithm { column: 2.into() }.into(), }, &IndexDef { name: "Apples_name_count_idx_btree".into(), - accessor_name: Some(expect_identifier("apples_id")), + codegen_name: Some(expect_identifier("apples_id")), algorithm: BTreeAlgorithm { columns: [1, 2].into() }.into(), }, &IndexDef { name: "Apples_type_idx_btree".into(), - accessor_name: Some(expect_identifier("Apples_type_btree")), + codegen_name: Some(expect_identifier("Apples_type_btree")), algorithm: BTreeAlgorithm { columns: 3.into() }.into(), } ] diff --git a/crates/schema/src/def/validate/v9.rs b/crates/schema/src/def/validate/v9.rs index 144a5f2163e..3cb7639bcec 100644 --- a/crates/schema/src/def/validate/v9.rs +++ b/crates/schema/src/def/validate/v9.rs @@ -1094,8 +1094,8 @@ impl<'a, 'b> TableValidator<'a, 'b> { algo => unreachable!("unknown algorithm {algo:?}"), }; - let accessor_name = match raw_def_version { - // In V9, `name`field is used for database internals but `accessor_name` supplied by module is used for client codegen. + let codegen_name = match raw_def_version { + // In V9, `name` field is used for database internals but `accessor_name` supplied by module is used for client codegen. RawModuleDefVersion::V9OrEarlier => accessor_name.map(identifier).transpose(), // In V10, `name` is used both for internal purpose and client codefen. @@ -1104,12 +1104,12 @@ impl<'a, 'b> TableValidator<'a, 'b> { let name = self.add_to_global_namespace(name); - let (name, accessor_name, algorithm) = (name, accessor_name, algorithm).combine_errors()?; + let (name, codegen_name, algorithm) = (name, codegen_name, algorithm).combine_errors()?; Ok(IndexDef { name, algorithm, - accessor_name, + codegen_name, }) } @@ -1606,17 +1606,17 @@ mod tests { [ &IndexDef { name: "Apples_count_idx_direct".into(), - accessor_name: Some(expect_identifier("Apples_count_direct")), + codegen_name: Some(expect_identifier("Apples_count_direct")), algorithm: DirectAlgorithm { column: 2.into() }.into(), }, &IndexDef { name: "Apples_name_count_idx_btree".into(), - accessor_name: Some(expect_identifier("apples_id")), + codegen_name: Some(expect_identifier("apples_id")), algorithm: BTreeAlgorithm { columns: [1, 2].into() }.into(), }, &IndexDef { name: "Apples_type_idx_btree".into(), - accessor_name: Some(expect_identifier("Apples_type_btree")), + codegen_name: Some(expect_identifier("Apples_type_btree")), algorithm: BTreeAlgorithm { columns: 3.into() }.into(), } ] From ed568f9624e3ce7e9be491aac25433c7b1524bba Mon Sep 17 00:00:00 2001 From: Shubham Mishra Date: Thu, 12 Feb 2026 16:20:51 +0530 Subject: [PATCH 017/133] insta tests --- .../snapshots/codegen__codegen_csharp.snap | 56 +- .../codegen__codegen_csharp.snap.new | 2788 ----------------- .../codegen__codegen_typescript.snap | 15 +- .../codegen__codegen_typescript.snap.new | 1086 ------- 4 files changed, 35 insertions(+), 3910 deletions(-) delete mode 100644 crates/codegen/tests/snapshots/codegen__codegen_csharp.snap.new delete mode 100644 crates/codegen/tests/snapshots/codegen__codegen_typescript.snap.new diff --git a/crates/codegen/tests/snapshots/codegen__codegen_csharp.snap b/crates/codegen/tests/snapshots/codegen__codegen_csharp.snap index 13bc20e37e1..861bad14b78 100644 --- a/crates/codegen/tests/snapshots/codegen__codegen_csharp.snap +++ b/crates/codegen/tests/snapshots/codegen__codegen_csharp.snap @@ -1858,38 +1858,38 @@ namespace SpacetimeDB { protected override string RemoteTableName => "logged_out_player"; - public sealed class IdentityUniqueIndex : UniqueIndexBase + public sealed class LoggedOutPlayerIdentityIdxBtreeUniqueIndex : UniqueIndexBase { protected override SpacetimeDB.Identity GetKey(Player row) => row.Identity; - public IdentityUniqueIndex(LoggedOutPlayerHandle table) : base(table) { } + public LoggedOutPlayerIdentityIdxBtreeUniqueIndex(LoggedOutPlayerHandle table) : base(table) { } } - public readonly IdentityUniqueIndex Identity; + public readonly LoggedOutPlayerIdentityIdxBtreeUniqueIndex LoggedOutPlayerIdentityIdxBtree; - public sealed class NameUniqueIndex : UniqueIndexBase + public sealed class LoggedOutPlayerNameIdxBtreeUniqueIndex : UniqueIndexBase { protected override string GetKey(Player row) => row.Name; - public NameUniqueIndex(LoggedOutPlayerHandle table) : base(table) { } + public LoggedOutPlayerNameIdxBtreeUniqueIndex(LoggedOutPlayerHandle table) : base(table) { } } - public readonly NameUniqueIndex Name; + public readonly LoggedOutPlayerNameIdxBtreeUniqueIndex LoggedOutPlayerNameIdxBtree; - public sealed class PlayerIdUniqueIndex : UniqueIndexBase + public sealed class LoggedOutPlayerPlayerIdIdxBtreeUniqueIndex : UniqueIndexBase { protected override ulong GetKey(Player row) => row.PlayerId; - public PlayerIdUniqueIndex(LoggedOutPlayerHandle table) : base(table) { } + public LoggedOutPlayerPlayerIdIdxBtreeUniqueIndex(LoggedOutPlayerHandle table) : base(table) { } } - public readonly PlayerIdUniqueIndex PlayerId; + public readonly LoggedOutPlayerPlayerIdIdxBtreeUniqueIndex LoggedOutPlayerPlayerIdIdxBtree; internal LoggedOutPlayerHandle(DbConnection conn) : base(conn) { - Identity = new(this); - Name = new(this); - PlayerId = new(this); + LoggedOutPlayerIdentityIdxBtree = new(this); + LoggedOutPlayerNameIdxBtree = new(this); + LoggedOutPlayerPlayerIdIdxBtree = new(this); } protected override object GetPrimaryKey(Player row) => row.Identity; @@ -2007,19 +2007,19 @@ namespace SpacetimeDB public readonly AgeIndex Age; - public sealed class IdUniqueIndex : UniqueIndexBase + public sealed class PersonIdIdxBtreeUniqueIndex : UniqueIndexBase { protected override uint GetKey(Person row) => row.Id; - public IdUniqueIndex(PersonHandle table) : base(table) { } + public PersonIdIdxBtreeUniqueIndex(PersonHandle table) : base(table) { } } - public readonly IdUniqueIndex Id; + public readonly PersonIdIdxBtreeUniqueIndex PersonIdIdxBtree; internal PersonHandle(DbConnection conn) : base(conn) { Age = new(this); - Id = new(this); + PersonIdIdxBtree = new(this); } protected override object GetPrimaryKey(Person row) => row.Id; @@ -2075,38 +2075,38 @@ namespace SpacetimeDB { protected override string RemoteTableName => "player"; - public sealed class IdentityUniqueIndex : UniqueIndexBase + public sealed class PlayerIdentityIdxBtreeUniqueIndex : UniqueIndexBase { protected override SpacetimeDB.Identity GetKey(Player row) => row.Identity; - public IdentityUniqueIndex(PlayerHandle table) : base(table) { } + public PlayerIdentityIdxBtreeUniqueIndex(PlayerHandle table) : base(table) { } } - public readonly IdentityUniqueIndex Identity; + public readonly PlayerIdentityIdxBtreeUniqueIndex PlayerIdentityIdxBtree; - public sealed class NameUniqueIndex : UniqueIndexBase + public sealed class PlayerNameIdxBtreeUniqueIndex : UniqueIndexBase { protected override string GetKey(Player row) => row.Name; - public NameUniqueIndex(PlayerHandle table) : base(table) { } + public PlayerNameIdxBtreeUniqueIndex(PlayerHandle table) : base(table) { } } - public readonly NameUniqueIndex Name; + public readonly PlayerNameIdxBtreeUniqueIndex PlayerNameIdxBtree; - public sealed class PlayerIdUniqueIndex : UniqueIndexBase + public sealed class PlayerPlayerIdIdxBtreeUniqueIndex : UniqueIndexBase { protected override ulong GetKey(Player row) => row.PlayerId; - public PlayerIdUniqueIndex(PlayerHandle table) : base(table) { } + public PlayerPlayerIdIdxBtreeUniqueIndex(PlayerHandle table) : base(table) { } } - public readonly PlayerIdUniqueIndex PlayerId; + public readonly PlayerPlayerIdIdxBtreeUniqueIndex PlayerPlayerIdIdxBtree; internal PlayerHandle(DbConnection conn) : base(conn) { - Identity = new(this); - Name = new(this); - PlayerId = new(this); + PlayerIdentityIdxBtree = new(this); + PlayerNameIdxBtree = new(this); + PlayerPlayerIdIdxBtree = new(this); } protected override object GetPrimaryKey(Player row) => row.Identity; diff --git a/crates/codegen/tests/snapshots/codegen__codegen_csharp.snap.new b/crates/codegen/tests/snapshots/codegen__codegen_csharp.snap.new deleted file mode 100644 index 2eaa8cf0b9a..00000000000 --- a/crates/codegen/tests/snapshots/codegen__codegen_csharp.snap.new +++ /dev/null @@ -1,2788 +0,0 @@ ---- -source: crates/codegen/tests/codegen.rs -assertion_line: 37 -expression: outfiles ---- -"Procedures/GetMySchemaViaHttp.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.ClientApi; -using System.Collections.Generic; -using System.Runtime.Serialization; - -namespace SpacetimeDB -{ - public sealed partial class RemoteProcedures : RemoteBase - { - public void GetMySchemaViaHttp(ProcedureCallback callback) - { - // Convert the clean callback to the wrapper callback - InternalGetMySchemaViaHttp((ctx, result) => { - if (result.IsSuccess && result.Value != null) - { - callback(ctx, ProcedureCallbackResult.Success(result.Value.Value)); - } - else - { - callback(ctx, ProcedureCallbackResult.Failure(result.Error!)); - } - }); - } - - private void InternalGetMySchemaViaHttp(ProcedureCallback callback) - { - conn.InternalCallProcedure(new Procedure.GetMySchemaViaHttpArgs(), callback); - } - - } - - public abstract partial class Procedure - { - [SpacetimeDB.Type] - [DataContract] - public sealed partial class GetMySchemaViaHttp - { - [DataMember(Name = "Value")] - public string Value; - - public GetMySchemaViaHttp(string Value) - { - this.Value = Value; - } - - public GetMySchemaViaHttp() - { - this.Value = ""; - } - } - [SpacetimeDB.Type] - [DataContract] - public sealed partial class GetMySchemaViaHttpArgs : Procedure, IProcedureArgs - { - string IProcedureArgs.ProcedureName => "get_my_schema_via_http"; - } - - } -} -''' -"Procedures/ReturnValue.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.ClientApi; -using System.Collections.Generic; -using System.Runtime.Serialization; - -namespace SpacetimeDB -{ - public sealed partial class RemoteProcedures : RemoteBase - { - public void ReturnValue(ulong foo, ProcedureCallback callback) - { - // Convert the clean callback to the wrapper callback - InternalReturnValue(foo, (ctx, result) => { - if (result.IsSuccess && result.Value != null) - { - callback(ctx, ProcedureCallbackResult.Success(result.Value.Value)); - } - else - { - callback(ctx, ProcedureCallbackResult.Failure(result.Error!)); - } - }); - } - - private void InternalReturnValue(ulong foo, ProcedureCallback callback) - { - conn.InternalCallProcedure(new Procedure.ReturnValueArgs(foo), callback); - } - - } - - public abstract partial class Procedure - { - [SpacetimeDB.Type] - [DataContract] - public sealed partial class ReturnValue - { - [DataMember(Name = "Value")] - public SpacetimeDB.Baz Value; - - public ReturnValue(SpacetimeDB.Baz Value) - { - this.Value = Value; - } - - public ReturnValue() - { - this.Value = new(); - } - } - [SpacetimeDB.Type] - [DataContract] - public sealed partial class ReturnValueArgs : Procedure, IProcedureArgs - { - [DataMember(Name = "foo")] - public ulong Foo; - - public ReturnValueArgs(ulong Foo) - { - this.Foo = Foo; - } - - public ReturnValueArgs() - { - } - - string IProcedureArgs.ProcedureName => "return_value"; - } - - } -} -''' -"Procedures/SleepOneSecond.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.ClientApi; -using System.Collections.Generic; -using System.Runtime.Serialization; - -namespace SpacetimeDB -{ - public sealed partial class RemoteProcedures : RemoteBase - { - public void SleepOneSecond(ProcedureCallback callback) - { - // Convert the clean callback to the wrapper callback - InternalSleepOneSecond((ctx, result) => { - if (result.IsSuccess && result.Value != null) - { - callback(ctx, ProcedureCallbackResult.Success(result.Value.Value)); - } - else - { - callback(ctx, ProcedureCallbackResult.Failure(result.Error!)); - } - }); - } - - private void InternalSleepOneSecond(ProcedureCallback callback) - { - conn.InternalCallProcedure(new Procedure.SleepOneSecondArgs(), callback); - } - - } - - public abstract partial class Procedure - { - [SpacetimeDB.Type] - [DataContract] - public sealed partial class SleepOneSecond - { - [DataMember(Name = "Value")] - public SpacetimeDB.Unit Value; - - public SleepOneSecond(SpacetimeDB.Unit Value) - { - this.Value = Value; - } - - public SleepOneSecond() - { - } - } - [SpacetimeDB.Type] - [DataContract] - public sealed partial class SleepOneSecondArgs : Procedure, IProcedureArgs - { - string IProcedureArgs.ProcedureName => "sleep_one_second"; - } - - } -} -''' -"Procedures/WithTx.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.ClientApi; -using System.Collections.Generic; -using System.Runtime.Serialization; - -namespace SpacetimeDB -{ - public sealed partial class RemoteProcedures : RemoteBase - { - public void WithTx(ProcedureCallback callback) - { - // Convert the clean callback to the wrapper callback - InternalWithTx((ctx, result) => { - if (result.IsSuccess && result.Value != null) - { - callback(ctx, ProcedureCallbackResult.Success(result.Value.Value)); - } - else - { - callback(ctx, ProcedureCallbackResult.Failure(result.Error!)); - } - }); - } - - private void InternalWithTx(ProcedureCallback callback) - { - conn.InternalCallProcedure(new Procedure.WithTxArgs(), callback); - } - - } - - public abstract partial class Procedure - { - [SpacetimeDB.Type] - [DataContract] - public sealed partial class WithTx - { - [DataMember(Name = "Value")] - public SpacetimeDB.Unit Value; - - public WithTx(SpacetimeDB.Unit Value) - { - this.Value = Value; - } - - public WithTx() - { - } - } - [SpacetimeDB.Type] - [DataContract] - public sealed partial class WithTxArgs : Procedure, IProcedureArgs - { - string IProcedureArgs.ProcedureName => "with_tx"; - } - - } -} -''' -"Reducers/Add.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.ClientApi; -using System.Collections.Generic; -using System.Runtime.Serialization; - -namespace SpacetimeDB -{ - public sealed partial class RemoteReducers : RemoteBase - { - public delegate void AddHandler(ReducerEventContext ctx, string name, byte age); - public event AddHandler? OnAdd; - - public void Add(string name, byte age) - { - conn.InternalCallReducer(new Reducer.Add(name, age), this.SetCallReducerFlags.AddFlags); - } - - public bool InvokeAdd(ReducerEventContext ctx, Reducer.Add args) - { - if (OnAdd == null) - { - if (InternalOnUnhandledReducerError != null) - { - switch(ctx.Event.Status) - { - case Status.Failed(var reason): InternalOnUnhandledReducerError(ctx, new Exception(reason)); break; - case Status.OutOfEnergy(var _): InternalOnUnhandledReducerError(ctx, new Exception("out of energy")); break; - } - } - return false; - } - OnAdd( - ctx, - args.Name, - args.Age - ); - return true; - } - } - - public abstract partial class Reducer - { - [SpacetimeDB.Type] - [DataContract] - public sealed partial class Add : Reducer, IReducerArgs - { - [DataMember(Name = "name")] - public string Name; - [DataMember(Name = "age")] - public byte Age; - - public Add( - string Name, - byte Age - ) - { - this.Name = Name; - this.Age = Age; - } - - public Add() - { - this.Name = ""; - } - - string IReducerArgs.ReducerName => "add"; - } - } - - public sealed partial class SetReducerFlags - { - internal CallReducerFlags AddFlags; - public void Add(CallReducerFlags flags) => AddFlags = flags; - } -} -''' -"Reducers/AddPlayer.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.ClientApi; -using System.Collections.Generic; -using System.Runtime.Serialization; - -namespace SpacetimeDB -{ - public sealed partial class RemoteReducers : RemoteBase - { - public delegate void AddPlayerHandler(ReducerEventContext ctx, string name); - public event AddPlayerHandler? OnAddPlayer; - - public void AddPlayer(string name) - { - conn.InternalCallReducer(new Reducer.AddPlayer(name), this.SetCallReducerFlags.AddPlayerFlags); - } - - public bool InvokeAddPlayer(ReducerEventContext ctx, Reducer.AddPlayer args) - { - if (OnAddPlayer == null) - { - if (InternalOnUnhandledReducerError != null) - { - switch(ctx.Event.Status) - { - case Status.Failed(var reason): InternalOnUnhandledReducerError(ctx, new Exception(reason)); break; - case Status.OutOfEnergy(var _): InternalOnUnhandledReducerError(ctx, new Exception("out of energy")); break; - } - } - 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) => AddPlayerFlags = flags; - } -} -''' -"Reducers/AddPrivate.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.ClientApi; -using System.Collections.Generic; -using System.Runtime.Serialization; - -namespace SpacetimeDB -{ - public sealed partial class RemoteReducers : RemoteBase - { - public delegate void AddPrivateHandler(ReducerEventContext ctx, string name); - public event AddPrivateHandler? OnAddPrivate; - - public void AddPrivate(string name) - { - conn.InternalCallReducer(new Reducer.AddPrivate(name), this.SetCallReducerFlags.AddPrivateFlags); - } - - public bool InvokeAddPrivate(ReducerEventContext ctx, Reducer.AddPrivate args) - { - if (OnAddPrivate == null) - { - if (InternalOnUnhandledReducerError != null) - { - switch(ctx.Event.Status) - { - case Status.Failed(var reason): InternalOnUnhandledReducerError(ctx, new Exception(reason)); break; - case Status.OutOfEnergy(var _): InternalOnUnhandledReducerError(ctx, new Exception("out of energy")); break; - } - } - 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) => AddPrivateFlags = flags; - } -} -''' -"Reducers/AssertCallerIdentityIsModuleIdentity.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.ClientApi; -using System.Collections.Generic; -using System.Runtime.Serialization; - -namespace SpacetimeDB -{ - public sealed partial class RemoteReducers : RemoteBase - { - public delegate void AssertCallerIdentityIsModuleIdentityHandler(ReducerEventContext ctx); - public event AssertCallerIdentityIsModuleIdentityHandler? OnAssertCallerIdentityIsModuleIdentity; - - public void AssertCallerIdentityIsModuleIdentity() - { - conn.InternalCallReducer(new Reducer.AssertCallerIdentityIsModuleIdentity(), this.SetCallReducerFlags.AssertCallerIdentityIsModuleIdentityFlags); - } - - public bool InvokeAssertCallerIdentityIsModuleIdentity(ReducerEventContext ctx, Reducer.AssertCallerIdentityIsModuleIdentity args) - { - if (OnAssertCallerIdentityIsModuleIdentity == null) - { - if (InternalOnUnhandledReducerError != null) - { - switch(ctx.Event.Status) - { - case Status.Failed(var reason): InternalOnUnhandledReducerError(ctx, new Exception(reason)); break; - case Status.OutOfEnergy(var _): InternalOnUnhandledReducerError(ctx, new Exception("out of energy")); break; - } - } - 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) => AssertCallerIdentityIsModuleIdentityFlags = flags; - } -} -''' -"Reducers/DeletePlayer.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.ClientApi; -using System.Collections.Generic; -using System.Runtime.Serialization; - -namespace SpacetimeDB -{ - public sealed partial class RemoteReducers : RemoteBase - { - public delegate void DeletePlayerHandler(ReducerEventContext ctx, ulong id); - public event DeletePlayerHandler? OnDeletePlayer; - - public void DeletePlayer(ulong id) - { - conn.InternalCallReducer(new Reducer.DeletePlayer(id), this.SetCallReducerFlags.DeletePlayerFlags); - } - - public bool InvokeDeletePlayer(ReducerEventContext ctx, Reducer.DeletePlayer args) - { - if (OnDeletePlayer == null) - { - if (InternalOnUnhandledReducerError != null) - { - switch(ctx.Event.Status) - { - case Status.Failed(var reason): InternalOnUnhandledReducerError(ctx, new Exception(reason)); break; - case Status.OutOfEnergy(var _): InternalOnUnhandledReducerError(ctx, new Exception("out of energy")); break; - } - } - 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) => DeletePlayerFlags = flags; - } -} -''' -"Reducers/DeletePlayersByName.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.ClientApi; -using System.Collections.Generic; -using System.Runtime.Serialization; - -namespace SpacetimeDB -{ - public sealed partial class RemoteReducers : RemoteBase - { - public delegate void DeletePlayersByNameHandler(ReducerEventContext ctx, string name); - public event DeletePlayersByNameHandler? OnDeletePlayersByName; - - public void DeletePlayersByName(string name) - { - conn.InternalCallReducer(new Reducer.DeletePlayersByName(name), this.SetCallReducerFlags.DeletePlayersByNameFlags); - } - - public bool InvokeDeletePlayersByName(ReducerEventContext ctx, Reducer.DeletePlayersByName args) - { - if (OnDeletePlayersByName == null) - { - if (InternalOnUnhandledReducerError != null) - { - switch(ctx.Event.Status) - { - case Status.Failed(var reason): InternalOnUnhandledReducerError(ctx, new Exception(reason)); break; - case Status.OutOfEnergy(var _): InternalOnUnhandledReducerError(ctx, new Exception("out of energy")); break; - } - } - 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) => DeletePlayersByNameFlags = flags; - } -} -''' -"Reducers/ListOverAge.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.ClientApi; -using System.Collections.Generic; -using System.Runtime.Serialization; - -namespace SpacetimeDB -{ - public sealed partial class RemoteReducers : RemoteBase - { - public delegate void ListOverAgeHandler(ReducerEventContext ctx, byte age); - public event ListOverAgeHandler? OnListOverAge; - - public void ListOverAge(byte age) - { - conn.InternalCallReducer(new Reducer.ListOverAge(age), this.SetCallReducerFlags.ListOverAgeFlags); - } - - public bool InvokeListOverAge(ReducerEventContext ctx, Reducer.ListOverAge args) - { - if (OnListOverAge == null) - { - if (InternalOnUnhandledReducerError != null) - { - switch(ctx.Event.Status) - { - case Status.Failed(var reason): InternalOnUnhandledReducerError(ctx, new Exception(reason)); break; - case Status.OutOfEnergy(var _): InternalOnUnhandledReducerError(ctx, new Exception("out of energy")); break; - } - } - return false; - } - OnListOverAge( - ctx, - args.Age - ); - return true; - } - } - - public abstract partial class Reducer - { - [SpacetimeDB.Type] - [DataContract] - public sealed partial class ListOverAge : Reducer, IReducerArgs - { - [DataMember(Name = "age")] - public byte Age; - - public ListOverAge(byte Age) - { - this.Age = Age; - } - - public ListOverAge() - { - } - - string IReducerArgs.ReducerName => "list_over_age"; - } - } - - public sealed partial class SetReducerFlags - { - internal CallReducerFlags ListOverAgeFlags; - public void ListOverAge(CallReducerFlags flags) => ListOverAgeFlags = flags; - } -} -''' -"Reducers/LogModuleIdentity.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.ClientApi; -using System.Collections.Generic; -using System.Runtime.Serialization; - -namespace SpacetimeDB -{ - public sealed partial class RemoteReducers : RemoteBase - { - public delegate void LogModuleIdentityHandler(ReducerEventContext ctx); - public event LogModuleIdentityHandler? OnLogModuleIdentity; - - public void LogModuleIdentity() - { - conn.InternalCallReducer(new Reducer.LogModuleIdentity(), this.SetCallReducerFlags.LogModuleIdentityFlags); - } - - public bool InvokeLogModuleIdentity(ReducerEventContext ctx, Reducer.LogModuleIdentity args) - { - if (OnLogModuleIdentity == null) - { - if (InternalOnUnhandledReducerError != null) - { - switch(ctx.Event.Status) - { - case Status.Failed(var reason): InternalOnUnhandledReducerError(ctx, new Exception(reason)); break; - case Status.OutOfEnergy(var _): InternalOnUnhandledReducerError(ctx, new Exception("out of energy")); break; - } - } - return false; - } - OnLogModuleIdentity( - ctx - ); - return true; - } - } - - public abstract partial class Reducer - { - [SpacetimeDB.Type] - [DataContract] - public sealed partial class LogModuleIdentity : Reducer, IReducerArgs - { - string IReducerArgs.ReducerName => "log_module_identity"; - } - } - - public sealed partial class SetReducerFlags - { - internal CallReducerFlags LogModuleIdentityFlags; - public void LogModuleIdentity(CallReducerFlags flags) => LogModuleIdentityFlags = flags; - } -} -''' -"Reducers/QueryPrivate.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.ClientApi; -using System.Collections.Generic; -using System.Runtime.Serialization; - -namespace SpacetimeDB -{ - public sealed partial class RemoteReducers : RemoteBase - { - public delegate void QueryPrivateHandler(ReducerEventContext ctx); - public event QueryPrivateHandler? OnQueryPrivate; - - public void QueryPrivate() - { - conn.InternalCallReducer(new Reducer.QueryPrivate(), this.SetCallReducerFlags.QueryPrivateFlags); - } - - public bool InvokeQueryPrivate(ReducerEventContext ctx, Reducer.QueryPrivate args) - { - if (OnQueryPrivate == null) - { - if (InternalOnUnhandledReducerError != null) - { - switch(ctx.Event.Status) - { - case Status.Failed(var reason): InternalOnUnhandledReducerError(ctx, new Exception(reason)); break; - case Status.OutOfEnergy(var _): InternalOnUnhandledReducerError(ctx, new Exception("out of energy")); break; - } - } - 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) => QueryPrivateFlags = flags; - } -} -''' -"Reducers/SayHello.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.ClientApi; -using System.Collections.Generic; -using System.Runtime.Serialization; - -namespace SpacetimeDB -{ - public sealed partial class RemoteReducers : RemoteBase - { - public delegate void SayHelloHandler(ReducerEventContext ctx); - public event SayHelloHandler? OnSayHello; - - public void SayHello() - { - conn.InternalCallReducer(new Reducer.SayHello(), this.SetCallReducerFlags.SayHelloFlags); - } - - public bool InvokeSayHello(ReducerEventContext ctx, Reducer.SayHello args) - { - if (OnSayHello == null) - { - if (InternalOnUnhandledReducerError != null) - { - switch(ctx.Event.Status) - { - case Status.Failed(var reason): InternalOnUnhandledReducerError(ctx, new Exception(reason)); break; - case Status.OutOfEnergy(var _): InternalOnUnhandledReducerError(ctx, new Exception("out of energy")); break; - } - } - return false; - } - OnSayHello( - ctx - ); - return true; - } - } - - public abstract partial class Reducer - { - [SpacetimeDB.Type] - [DataContract] - public sealed partial class SayHello : Reducer, IReducerArgs - { - string IReducerArgs.ReducerName => "say_hello"; - } - } - - public sealed partial class SetReducerFlags - { - internal CallReducerFlags SayHelloFlags; - public void SayHello(CallReducerFlags flags) => SayHelloFlags = flags; - } -} -''' -"Reducers/Test.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.ClientApi; -using System.Collections.Generic; -using System.Runtime.Serialization; - -namespace SpacetimeDB -{ - public sealed partial class RemoteReducers : RemoteBase - { - public delegate void TestHandler(ReducerEventContext ctx, SpacetimeDB.TestA arg, SpacetimeDB.TestB arg2, SpacetimeDB.NamespaceTestC arg3, SpacetimeDB.NamespaceTestF arg4); - public event TestHandler? OnTest; - - public void Test(SpacetimeDB.TestA arg, SpacetimeDB.TestB arg2, SpacetimeDB.NamespaceTestC arg3, SpacetimeDB.NamespaceTestF arg4) - { - conn.InternalCallReducer(new Reducer.Test(arg, arg2, arg3, arg4), this.SetCallReducerFlags.TestFlags); - } - - public bool InvokeTest(ReducerEventContext ctx, Reducer.Test args) - { - if (OnTest == null) - { - if (InternalOnUnhandledReducerError != null) - { - switch(ctx.Event.Status) - { - case Status.Failed(var reason): InternalOnUnhandledReducerError(ctx, new Exception(reason)); break; - case Status.OutOfEnergy(var _): InternalOnUnhandledReducerError(ctx, new Exception("out of energy")); break; - } - } - 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) => TestFlags = flags; - } -} -''' -"Reducers/TestBtreeIndexArgs.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.ClientApi; -using System.Collections.Generic; -using System.Runtime.Serialization; - -namespace SpacetimeDB -{ - public sealed partial class RemoteReducers : RemoteBase - { - public delegate void TestBtreeIndexArgsHandler(ReducerEventContext ctx); - public event TestBtreeIndexArgsHandler? OnTestBtreeIndexArgs; - - public void TestBtreeIndexArgs() - { - conn.InternalCallReducer(new Reducer.TestBtreeIndexArgs(), this.SetCallReducerFlags.TestBtreeIndexArgsFlags); - } - - public bool InvokeTestBtreeIndexArgs(ReducerEventContext ctx, Reducer.TestBtreeIndexArgs args) - { - if (OnTestBtreeIndexArgs == null) - { - if (InternalOnUnhandledReducerError != null) - { - switch(ctx.Event.Status) - { - case Status.Failed(var reason): InternalOnUnhandledReducerError(ctx, new Exception(reason)); break; - case Status.OutOfEnergy(var _): InternalOnUnhandledReducerError(ctx, new Exception("out of energy")); break; - } - } - 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) => TestBtreeIndexArgsFlags = flags; - } -} -''' -"SpacetimeDBClient.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. - -VERSION_COMMENT - -#nullable enable - -using System; -using SpacetimeDB.ClientApi; -using System.Collections.Generic; -using System.Runtime.Serialization; - -namespace SpacetimeDB -{ - public sealed partial class RemoteReducers : RemoteBase - { - internal RemoteReducers(DbConnection conn, SetReducerFlags flags) : base(conn) => SetCallReducerFlags = flags; - internal readonly SetReducerFlags SetCallReducerFlags; - internal event Action? InternalOnUnhandledReducerError; - } - - public sealed partial class RemoteProcedures : RemoteBase - { - internal RemoteProcedures(DbConnection conn) : base(conn) { } - } - - public sealed partial class RemoteTables : RemoteTablesBase - { - public RemoteTables(DbConnection conn) - { - AddTable(LoggedOutPlayer = new(conn)); - AddTable(MyPlayer = new(conn)); - AddTable(Person = new(conn)); - AddTable(Player = new(conn)); - AddTable(TestD = new(conn)); - AddTable(TestF = new(conn)); - } - } - - public sealed partial class SetReducerFlags { } - - public interface IRemoteDbContext : IDbContext { - public event Action? OnUnhandledReducerError; - } - - public sealed class EventContext : IEventContext, IRemoteDbContext - { - private readonly DbConnection conn; - - /// - /// The event that caused this callback to run. - /// - public readonly Event Event; - - /// - /// Access to tables in the client cache, which stores a read-only replica of the remote database state. - /// - /// The returned DbView will have a method to access each table defined by the module. - /// - public RemoteTables Db => conn.Db; - /// - /// Access to reducers defined by the module. - /// - /// The returned RemoteReducers will have a method to invoke each reducer defined by the module, - /// plus methods for adding and removing callbacks on each of those reducers. - /// - public RemoteReducers Reducers => conn.Reducers; - /// - /// Access to setters for per-reducer flags. - /// - /// The returned SetReducerFlags will have a method to invoke, - /// for each reducer defined by the module, - /// which call-flags for the reducer can be set. - /// - public SetReducerFlags SetReducerFlags => conn.SetReducerFlags; - /// - /// Access to procedures defined by the module. - /// - /// The returned RemoteProcedures will have a method to invoke each procedure defined by the module, - /// with a callback for when the procedure completes and returns a value. - /// - public RemoteProcedures Procedures => conn.Procedures; - /// - /// Returns true if the connection is active, i.e. has not yet disconnected. - /// - public bool IsActive => conn.IsActive; - /// - /// Close the connection. - /// - /// Throws an error if the connection is already closed. - /// - public void Disconnect() { - conn.Disconnect(); - } - /// - /// Start building a subscription. - /// - /// A builder-pattern constructor for subscribing to queries, - /// causing matching rows to be replicated into the client cache. - public SubscriptionBuilder SubscriptionBuilder() => conn.SubscriptionBuilder(); - /// - /// Get the Identity of this connection. - /// - /// This method returns null if the connection was constructed anonymously - /// and we have not yet received our newly-generated Identity from the host. - /// - public Identity? Identity => conn.Identity; - /// - /// Get this connection's ConnectionId. - /// - public ConnectionId ConnectionId => conn.ConnectionId; - /// - /// Register a callback to be called when a reducer with no handler returns an error. - /// - public event Action? OnUnhandledReducerError { - add => Reducers.InternalOnUnhandledReducerError += value; - remove => Reducers.InternalOnUnhandledReducerError -= value; - } - - internal EventContext(DbConnection conn, Event Event) - { - this.conn = conn; - this.Event = Event; - } - } - - public sealed class ReducerEventContext : IReducerEventContext, IRemoteDbContext - { - private readonly DbConnection conn; - /// - /// The reducer event that caused this callback to run. - /// - public readonly ReducerEvent Event; - - /// - /// Access to tables in the client cache, which stores a read-only replica of the remote database state. - /// - /// The returned DbView will have a method to access each table defined by the module. - /// - public RemoteTables Db => conn.Db; - /// - /// Access to reducers defined by the module. - /// - /// The returned RemoteReducers will have a method to invoke each reducer defined by the module, - /// plus methods for adding and removing callbacks on each of those reducers. - /// - public RemoteReducers Reducers => conn.Reducers; - /// - /// Access to setters for per-reducer flags. - /// - /// The returned SetReducerFlags will have a method to invoke, - /// for each reducer defined by the module, - /// which call-flags for the reducer can be set. - /// - public SetReducerFlags SetReducerFlags => conn.SetReducerFlags; - /// - /// Access to procedures defined by the module. - /// - /// The returned RemoteProcedures will have a method to invoke each procedure defined by the module, - /// with a callback for when the procedure completes and returns a value. - /// - public RemoteProcedures Procedures => conn.Procedures; - /// - /// Returns true if the connection is active, i.e. has not yet disconnected. - /// - public bool IsActive => conn.IsActive; - /// - /// Close the connection. - /// - /// Throws an error if the connection is already closed. - /// - public void Disconnect() { - conn.Disconnect(); - } - /// - /// Start building a subscription. - /// - /// A builder-pattern constructor for subscribing to queries, - /// causing matching rows to be replicated into the client cache. - public SubscriptionBuilder SubscriptionBuilder() => conn.SubscriptionBuilder(); - /// - /// Get the Identity of this connection. - /// - /// This method returns null if the connection was constructed anonymously - /// and we have not yet received our newly-generated Identity from the host. - /// - public Identity? Identity => conn.Identity; - /// - /// Get this connection's ConnectionId. - /// - public ConnectionId ConnectionId => conn.ConnectionId; - /// - /// Register a callback to be called when a reducer with no handler returns an error. - /// - public event Action? OnUnhandledReducerError { - add => Reducers.InternalOnUnhandledReducerError += value; - remove => Reducers.InternalOnUnhandledReducerError -= value; - } - - internal ReducerEventContext(DbConnection conn, ReducerEvent reducerEvent) - { - this.conn = conn; - Event = reducerEvent; - } - } - - public sealed class ErrorContext : IErrorContext, IRemoteDbContext - { - private readonly DbConnection conn; - /// - /// The Exception that caused this error callback to be run. - /// - public readonly Exception Event; - Exception IErrorContext.Event { - get { - return Event; - } - } - - /// - /// Access to tables in the client cache, which stores a read-only replica of the remote database state. - /// - /// The returned DbView will have a method to access each table defined by the module. - /// - public RemoteTables Db => conn.Db; - /// - /// Access to reducers defined by the module. - /// - /// The returned RemoteReducers will have a method to invoke each reducer defined by the module, - /// plus methods for adding and removing callbacks on each of those reducers. - /// - public RemoteReducers Reducers => conn.Reducers; - /// - /// Access to setters for per-reducer flags. - /// - /// The returned SetReducerFlags will have a method to invoke, - /// for each reducer defined by the module, - /// which call-flags for the reducer can be set. - /// - public SetReducerFlags SetReducerFlags => conn.SetReducerFlags; - /// - /// Access to procedures defined by the module. - /// - /// The returned RemoteProcedures will have a method to invoke each procedure defined by the module, - /// with a callback for when the procedure completes and returns a value. - /// - public RemoteProcedures Procedures => conn.Procedures; - /// - /// Returns true if the connection is active, i.e. has not yet disconnected. - /// - public bool IsActive => conn.IsActive; - /// - /// Close the connection. - /// - /// Throws an error if the connection is already closed. - /// - public void Disconnect() { - conn.Disconnect(); - } - /// - /// Start building a subscription. - /// - /// A builder-pattern constructor for subscribing to queries, - /// causing matching rows to be replicated into the client cache. - public SubscriptionBuilder SubscriptionBuilder() => conn.SubscriptionBuilder(); - /// - /// Get the Identity of this connection. - /// - /// This method returns null if the connection was constructed anonymously - /// and we have not yet received our newly-generated Identity from the host. - /// - public Identity? Identity => conn.Identity; - /// - /// Get this connection's ConnectionId. - /// - public ConnectionId ConnectionId => conn.ConnectionId; - /// - /// Register a callback to be called when a reducer with no handler returns an error. - /// - public event Action? OnUnhandledReducerError { - add => Reducers.InternalOnUnhandledReducerError += value; - remove => Reducers.InternalOnUnhandledReducerError -= value; - } - - internal ErrorContext(DbConnection conn, Exception error) - { - this.conn = conn; - Event = error; - } - } - - public sealed class SubscriptionEventContext : ISubscriptionEventContext, IRemoteDbContext - { - private readonly DbConnection conn; - - /// - /// Access to tables in the client cache, which stores a read-only replica of the remote database state. - /// - /// The returned DbView will have a method to access each table defined by the module. - /// - public RemoteTables Db => conn.Db; - /// - /// Access to reducers defined by the module. - /// - /// The returned RemoteReducers will have a method to invoke each reducer defined by the module, - /// plus methods for adding and removing callbacks on each of those reducers. - /// - public RemoteReducers Reducers => conn.Reducers; - /// - /// Access to setters for per-reducer flags. - /// - /// The returned SetReducerFlags will have a method to invoke, - /// for each reducer defined by the module, - /// which call-flags for the reducer can be set. - /// - public SetReducerFlags SetReducerFlags => conn.SetReducerFlags; - /// - /// Access to procedures defined by the module. - /// - /// The returned RemoteProcedures will have a method to invoke each procedure defined by the module, - /// with a callback for when the procedure completes and returns a value. - /// - public RemoteProcedures Procedures => conn.Procedures; - /// - /// Returns true if the connection is active, i.e. has not yet disconnected. - /// - public bool IsActive => conn.IsActive; - /// - /// Close the connection. - /// - /// Throws an error if the connection is already closed. - /// - public void Disconnect() { - conn.Disconnect(); - } - /// - /// Start building a subscription. - /// - /// A builder-pattern constructor for subscribing to queries, - /// causing matching rows to be replicated into the client cache. - public SubscriptionBuilder SubscriptionBuilder() => conn.SubscriptionBuilder(); - /// - /// Get the Identity of this connection. - /// - /// This method returns null if the connection was constructed anonymously - /// and we have not yet received our newly-generated Identity from the host. - /// - public Identity? Identity => conn.Identity; - /// - /// Get this connection's ConnectionId. - /// - public ConnectionId ConnectionId => conn.ConnectionId; - /// - /// Register a callback to be called when a reducer with no handler returns an error. - /// - public event Action? OnUnhandledReducerError { - add => Reducers.InternalOnUnhandledReducerError += value; - remove => Reducers.InternalOnUnhandledReducerError -= value; - } - - internal SubscriptionEventContext(DbConnection conn) - { - this.conn = conn; - } - } - - public sealed class ProcedureEventContext : IProcedureEventContext, IRemoteDbContext - { - private readonly DbConnection conn; - /// - /// The procedure event that caused this callback to run. - /// - public readonly ProcedureEvent Event; - - /// - /// Access to tables in the client cache, which stores a read-only replica of the remote database state. - /// - /// The returned DbView will have a method to access each table defined by the module. - /// - public RemoteTables Db => conn.Db; - /// - /// Access to reducers defined by the module. - /// - /// The returned RemoteReducers will have a method to invoke each reducer defined by the module, - /// plus methods for adding and removing callbacks on each of those reducers. - /// - public RemoteReducers Reducers => conn.Reducers; - /// - /// Access to setters for per-reducer flags. - /// - /// The returned SetReducerFlags will have a method to invoke, - /// for each reducer defined by the module, - /// which call-flags for the reducer can be set. - /// - public SetReducerFlags SetReducerFlags => conn.SetReducerFlags; - /// - /// Access to procedures defined by the module. - /// - /// The returned RemoteProcedures will have a method to invoke each procedure defined by the module, - /// with a callback for when the procedure completes and returns a value. - /// - public RemoteProcedures Procedures => conn.Procedures; - /// - /// Returns true if the connection is active, i.e. has not yet disconnected. - /// - public bool IsActive => conn.IsActive; - /// - /// Close the connection. - /// - /// Throws an error if the connection is already closed. - /// - public void Disconnect() { - conn.Disconnect(); - } - /// - /// Start building a subscription. - /// - /// A builder-pattern constructor for subscribing to queries, - /// causing matching rows to be replicated into the client cache. - public SubscriptionBuilder SubscriptionBuilder() => conn.SubscriptionBuilder(); - /// - /// Get the Identity of this connection. - /// - /// This method returns null if the connection was constructed anonymously - /// and we have not yet received our newly-generated Identity from the host. - /// - public Identity? Identity => conn.Identity; - /// - /// Get this connection's ConnectionId. - /// - public ConnectionId ConnectionId => conn.ConnectionId; - /// - /// Register a callback to be called when a reducer with no handler returns an error. - /// - public event Action? OnUnhandledReducerError { - add => Reducers.InternalOnUnhandledReducerError += value; - remove => Reducers.InternalOnUnhandledReducerError -= value; - } - - internal ProcedureEventContext(DbConnection conn, ProcedureEvent Event) - { - this.conn = conn; - this.Event = Event; - } - } - - /// - /// Builder-pattern constructor for subscription queries. - /// - public sealed class SubscriptionBuilder - { - private readonly IDbConnection conn; - - private event Action? Applied; - private event Action? Error; - - /// - /// Private API, use conn.SubscriptionBuilder() instead. - /// - public SubscriptionBuilder(IDbConnection conn) - { - this.conn = conn; - } - - /// - /// Register a callback to run when the subscription is applied. - /// - public SubscriptionBuilder OnApplied( - Action callback - ) - { - Applied += callback; - return this; - } - - /// - /// Register a callback to run when the subscription fails. - /// - /// Note that this callback may run either when attempting to apply the subscription, - /// in which case Self::on_applied will never run, - /// or later during the subscription's lifetime if the module's interface changes, - /// in which case Self::on_applied may have already run. - /// - public SubscriptionBuilder OnError( - Action callback - ) - { - Error += callback; - return this; - } - - /// - /// Add a typed query to this subscription. - /// - /// This is the entry point for building subscriptions without writing SQL by hand. - /// Once a typed query is added, only typed queries may follow (SQL and typed queries cannot be mixed). - /// - public TypedSubscriptionBuilder AddQuery( - Func> build - ) - { - var typed = new TypedSubscriptionBuilder(conn, Applied, Error); - return typed.AddQuery(build); - } - - /// - /// Subscribe to the following SQL queries. - /// - /// This method returns immediately, with the data not yet added to the DbConnection. - /// The provided callbacks will be invoked once the data is returned from the remote server. - /// Data from all the provided queries will be returned at the same time. - /// - /// See the SpacetimeDB SQL docs for more information on SQL syntax: - /// https://spacetimedb.com/docs/sql - /// - public SubscriptionHandle Subscribe( - string[] querySqls - ) => new(conn, Applied, Error, querySqls); - - /// - /// Subscribe to all rows from all tables. - /// - /// This method is intended as a convenience - /// for applications where client-side memory use and network bandwidth are not concerns. - /// Applications where these resources are a constraint - /// should register more precise queries via Self.Subscribe - /// in order to replicate only the subset of data which the client needs to function. - /// - /// This method should not be combined with Self.Subscribe on the same DbConnection. - /// A connection may either Self.Subscribe to particular queries, - /// or Self.SubscribeToAllTables, but not both. - /// Attempting to call Self.Subscribe - /// on a DbConnection that has previously used Self.SubscribeToAllTables, - /// or vice versa, may misbehave in any number of ways, - /// including dropping subscriptions, corrupting the client cache, or panicking. - /// - public void SubscribeToAllTables() - { - // Make sure we use the legacy handle constructor here, even though there's only 1 query. - // We drop the error handler, since it can't be called for legacy subscriptions. - new SubscriptionHandle( - conn, - Applied, - new string[] { "SELECT * FROM *" } - ); - } - } - - public sealed class SubscriptionHandle : SubscriptionHandleBase { - /// - /// Internal API. Construct SubscriptionHandles using conn.SubscriptionBuilder. - /// - public SubscriptionHandle(IDbConnection conn, Action? onApplied, string[] querySqls) : base(conn, onApplied, querySqls) - { } - - /// - /// Internal API. Construct SubscriptionHandles using conn.SubscriptionBuilder. - /// - public SubscriptionHandle( - IDbConnection conn, - Action? onApplied, - Action? onError, - string[] querySqls - ) : base(conn, onApplied, onError, querySqls) - { } - } - - public sealed class QueryBuilder - { - public From From { get; } = new(); - } - - public sealed class From - { - public global::SpacetimeDB.Table LoggedOutPlayer() => new("logged_out_player", new LoggedOutPlayerCols("logged_out_player"), new LoggedOutPlayerIxCols("logged_out_player")); - public global::SpacetimeDB.Table MyPlayer() => new("my_player", new MyPlayerCols("my_player"), new MyPlayerIxCols("my_player")); - public global::SpacetimeDB.Table Person() => new("person", new PersonCols("person"), new PersonIxCols("person")); - public global::SpacetimeDB.Table Player() => new("player", new PlayerCols("player"), new PlayerIxCols("player")); - public global::SpacetimeDB.Table TestD() => new("test_d", new TestDCols("test_d"), new TestDIxCols("test_d")); - public global::SpacetimeDB.Table TestF() => new("test_f", new TestFCols("test_f"), new TestFIxCols("test_f")); - } - - public sealed class TypedSubscriptionBuilder - { - private readonly IDbConnection conn; - private Action? Applied; - private Action? Error; - private readonly List querySqls = new(); - - internal TypedSubscriptionBuilder(IDbConnection conn, Action? applied, Action? error) - { - this.conn = conn; - Applied = applied; - Error = error; - } - - public TypedSubscriptionBuilder OnApplied(Action callback) - { - Applied += callback; - return this; - } - - public TypedSubscriptionBuilder OnError(Action callback) - { - Error += callback; - return this; - } - - public TypedSubscriptionBuilder AddQuery(Func> build) - { - var qb = new QueryBuilder(); - querySqls.Add(build(qb).ToSql()); - return this; - } - - public SubscriptionHandle Subscribe() => new(conn, Applied, Error, querySqls.ToArray()); - } - - public abstract partial class Reducer - { - private Reducer() { } - } - - public abstract partial class Procedure - { - private Procedure() { } - } - - public sealed class DbConnection : DbConnectionBase - { - public override RemoteTables Db { get; } - public readonly RemoteReducers Reducers; - public readonly SetReducerFlags SetReducerFlags = new(); - public readonly RemoteProcedures Procedures; - - public DbConnection() - { - Db = new(this); - Reducers = new(this, SetReducerFlags); - Procedures = new(this); - } - - protected override Reducer ToReducer(TransactionUpdate update) - { - var encodedArgs = update.ReducerCall.Args; - return update.ReducerCall.ReducerName switch { - "add" => BSATNHelpers.Decode(encodedArgs), - "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), - "list_over_age" => BSATNHelpers.Decode(encodedArgs), - "log_module_identity" => BSATNHelpers.Decode(encodedArgs), - "query_private" => BSATNHelpers.Decode(encodedArgs), - "say_hello" => BSATNHelpers.Decode(encodedArgs), - "test" => BSATNHelpers.Decode(encodedArgs), - "test_btree_index_args" => BSATNHelpers.Decode(encodedArgs), - "" => throw new SpacetimeDBEmptyReducerNameException("Reducer name is empty"), - var reducer => throw new ArgumentOutOfRangeException("Reducer", $"Unknown reducer {reducer}") - }; - } - - protected override IEventContext ToEventContext(Event Event) => - new EventContext(this, Event); - - protected override IReducerEventContext ToReducerEventContext(ReducerEvent reducerEvent) => - new ReducerEventContext(this, reducerEvent); - - protected override ISubscriptionEventContext MakeSubscriptionEventContext() => - new SubscriptionEventContext(this); - - protected override IErrorContext ToErrorContext(Exception exception) => - new ErrorContext(this, exception); - - protected override IProcedureEventContext ToProcedureEventContext(ProcedureEvent procedureEvent) => - new ProcedureEventContext(this, procedureEvent); - - protected override bool Dispatch(IReducerEventContext context, Reducer reducer) - { - var eventContext = (ReducerEventContext)context; - return reducer switch { - Reducer.Add args => Reducers.InvokeAdd(eventContext, args), - 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.ListOverAge args => Reducers.InvokeListOverAge(eventContext, args), - Reducer.LogModuleIdentity args => Reducers.InvokeLogModuleIdentity(eventContext, args), - Reducer.QueryPrivate args => Reducers.InvokeQueryPrivate(eventContext, args), - Reducer.SayHello args => Reducers.InvokeSayHello(eventContext, args), - Reducer.Test args => Reducers.InvokeTest(eventContext, args), - Reducer.TestBtreeIndexArgs args => Reducers.InvokeTestBtreeIndexArgs(eventContext, args), - _ => throw new ArgumentOutOfRangeException("Reducer", $"Unknown reducer {reducer}") - }; - } - - public SubscriptionBuilder SubscriptionBuilder() => new(this); - public event Action OnUnhandledReducerError - { - add => Reducers.InternalOnUnhandledReducerError += value; - remove => Reducers.InternalOnUnhandledReducerError -= value; - } - } -} -''' -"Tables/LoggedOutPlayer.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 LoggedOutPlayerHandle : RemoteTableHandle - { - protected override string RemoteTableName => "logged_out_player"; - - public sealed class LoggedOutPlayerIdentityIdxBtreeUniqueIndex : UniqueIndexBase - { - protected override SpacetimeDB.Identity GetKey(Player row) => row.Identity; - - public LoggedOutPlayerIdentityIdxBtreeUniqueIndex(LoggedOutPlayerHandle table) : base(table) { } - } - - public readonly LoggedOutPlayerIdentityIdxBtreeUniqueIndex LoggedOutPlayerIdentityIdxBtree; - - public sealed class LoggedOutPlayerNameIdxBtreeUniqueIndex : UniqueIndexBase - { - protected override string GetKey(Player row) => row.Name; - - public LoggedOutPlayerNameIdxBtreeUniqueIndex(LoggedOutPlayerHandle table) : base(table) { } - } - - public readonly LoggedOutPlayerNameIdxBtreeUniqueIndex LoggedOutPlayerNameIdxBtree; - - public sealed class LoggedOutPlayerPlayerIdIdxBtreeUniqueIndex : UniqueIndexBase - { - protected override ulong GetKey(Player row) => row.PlayerId; - - public LoggedOutPlayerPlayerIdIdxBtreeUniqueIndex(LoggedOutPlayerHandle table) : base(table) { } - } - - public readonly LoggedOutPlayerPlayerIdIdxBtreeUniqueIndex LoggedOutPlayerPlayerIdIdxBtree; - - internal LoggedOutPlayerHandle(DbConnection conn) : base(conn) - { - LoggedOutPlayerIdentityIdxBtree = new(this); - LoggedOutPlayerNameIdxBtree = new(this); - LoggedOutPlayerPlayerIdIdxBtree = new(this); - } - - protected override object GetPrimaryKey(Player row) => row.Identity; - } - - public readonly LoggedOutPlayerHandle LoggedOutPlayer; - } - - public sealed class LoggedOutPlayerCols - { - public global::SpacetimeDB.Col Identity { get; } - public global::SpacetimeDB.Col PlayerId { get; } - public global::SpacetimeDB.Col Name { get; } - - public LoggedOutPlayerCols(string tableName) - { - Identity = new global::SpacetimeDB.Col(tableName, "identity"); - PlayerId = new global::SpacetimeDB.Col(tableName, "player_id"); - Name = new global::SpacetimeDB.Col(tableName, "name"); - } - } - - public sealed class LoggedOutPlayerIxCols - { - public global::SpacetimeDB.IxCol Identity { get; } - public global::SpacetimeDB.IxCol PlayerId { get; } - public global::SpacetimeDB.IxCol Name { get; } - - public LoggedOutPlayerIxCols(string tableName) - { - Identity = new global::SpacetimeDB.IxCol(tableName, "identity"); - PlayerId = new global::SpacetimeDB.IxCol(tableName, "player_id"); - Name = new global::SpacetimeDB.IxCol(tableName, "name"); - } - } -} -''' -"Tables/MyPlayer.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 MyPlayerHandle : RemoteTableHandle - { - protected override string RemoteTableName => "my_player"; - - internal MyPlayerHandle(DbConnection conn) : base(conn) - { - } - } - - public readonly MyPlayerHandle MyPlayer; - } - - public sealed class MyPlayerCols - { - public global::SpacetimeDB.Col Identity { get; } - public global::SpacetimeDB.Col PlayerId { get; } - public global::SpacetimeDB.Col Name { get; } - - public MyPlayerCols(string tableName) - { - Identity = new global::SpacetimeDB.Col(tableName, "identity"); - PlayerId = new global::SpacetimeDB.Col(tableName, "player_id"); - Name = new global::SpacetimeDB.Col(tableName, "name"); - } - } - - public sealed class MyPlayerIxCols - { - - public MyPlayerIxCols(string tableName) - { - } - } -} -''' -"Tables/Person.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 PersonHandle : RemoteTableHandle - { - protected override string RemoteTableName => "person"; - - public sealed class AgeIndex : BTreeIndexBase - { - protected override byte GetKey(Person row) => row.Age; - - public AgeIndex(PersonHandle table) : base(table) { } - } - - public readonly AgeIndex Age; - - public sealed class PersonIdIdxBtreeUniqueIndex : UniqueIndexBase - { - protected override uint GetKey(Person row) => row.Id; - - public PersonIdIdxBtreeUniqueIndex(PersonHandle table) : base(table) { } - } - - public readonly PersonIdIdxBtreeUniqueIndex PersonIdIdxBtree; - - internal PersonHandle(DbConnection conn) : base(conn) - { - Age = new(this); - PersonIdIdxBtree = new(this); - } - - protected override object GetPrimaryKey(Person row) => row.Id; - } - - public readonly PersonHandle Person; - } - - public sealed class PersonCols - { - public global::SpacetimeDB.Col Id { get; } - public global::SpacetimeDB.Col Name { get; } - public global::SpacetimeDB.Col Age { get; } - - public PersonCols(string tableName) - { - Id = new global::SpacetimeDB.Col(tableName, "id"); - Name = new global::SpacetimeDB.Col(tableName, "name"); - Age = new global::SpacetimeDB.Col(tableName, "age"); - } - } - - public sealed class PersonIxCols - { - public global::SpacetimeDB.IxCol Id { get; } - public global::SpacetimeDB.IxCol Age { get; } - - public PersonIxCols(string tableName) - { - Id = new global::SpacetimeDB.IxCol(tableName, "id"); - Age = new global::SpacetimeDB.IxCol(tableName, "age"); - } - } -} -''' -"Tables/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 SpacetimeDB.BSATN; -using SpacetimeDB.ClientApi; -using System.Collections.Generic; -using System.Runtime.Serialization; - -namespace SpacetimeDB -{ - public sealed partial class RemoteTables - { - public sealed class PlayerHandle : RemoteTableHandle - { - protected override string RemoteTableName => "player"; - - public sealed class PlayerIdentityIdxBtreeUniqueIndex : UniqueIndexBase - { - protected override SpacetimeDB.Identity GetKey(Player row) => row.Identity; - - public PlayerIdentityIdxBtreeUniqueIndex(PlayerHandle table) : base(table) { } - } - - public readonly PlayerIdentityIdxBtreeUniqueIndex PlayerIdentityIdxBtree; - - public sealed class PlayerNameIdxBtreeUniqueIndex : UniqueIndexBase - { - protected override string GetKey(Player row) => row.Name; - - public PlayerNameIdxBtreeUniqueIndex(PlayerHandle table) : base(table) { } - } - - public readonly PlayerNameIdxBtreeUniqueIndex PlayerNameIdxBtree; - - public sealed class PlayerPlayerIdIdxBtreeUniqueIndex : UniqueIndexBase - { - protected override ulong GetKey(Player row) => row.PlayerId; - - public PlayerPlayerIdIdxBtreeUniqueIndex(PlayerHandle table) : base(table) { } - } - - public readonly PlayerPlayerIdIdxBtreeUniqueIndex PlayerPlayerIdIdxBtree; - - internal PlayerHandle(DbConnection conn) : base(conn) - { - PlayerIdentityIdxBtree = new(this); - PlayerNameIdxBtree = new(this); - PlayerPlayerIdIdxBtree = new(this); - } - - protected override object GetPrimaryKey(Player row) => row.Identity; - } - - public readonly PlayerHandle Player; - } - - public sealed class PlayerCols - { - public global::SpacetimeDB.Col Identity { get; } - public global::SpacetimeDB.Col PlayerId { get; } - public global::SpacetimeDB.Col Name { get; } - - public PlayerCols(string tableName) - { - Identity = new global::SpacetimeDB.Col(tableName, "identity"); - PlayerId = new global::SpacetimeDB.Col(tableName, "player_id"); - Name = new global::SpacetimeDB.Col(tableName, "name"); - } - } - - public sealed class PlayerIxCols - { - public global::SpacetimeDB.IxCol Identity { get; } - public global::SpacetimeDB.IxCol PlayerId { get; } - public global::SpacetimeDB.IxCol Name { get; } - - public PlayerIxCols(string tableName) - { - Identity = new global::SpacetimeDB.IxCol(tableName, "identity"); - PlayerId = new global::SpacetimeDB.IxCol(tableName, "player_id"); - Name = new global::SpacetimeDB.IxCol(tableName, "name"); - } - } -} -''' -"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 RemoteTableName => "test_d"; - - internal TestDHandle(DbConnection conn) : base(conn) - { - } - } - - public readonly TestDHandle TestD; - } - - public sealed class TestDCols - { - public global::SpacetimeDB.NullableCol TestC { get; } - - public TestDCols(string tableName) - { - TestC = new global::SpacetimeDB.NullableCol(tableName, "test_c"); - } - } - - public sealed class TestDIxCols - { - - public TestDIxCols(string tableName) - { - } - } -} -''' -"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 RemoteTableName => "test_f"; - - internal TestFHandle(DbConnection conn) : base(conn) - { - } - } - - public readonly TestFHandle TestF; - } - - public sealed class TestFCols - { - public global::SpacetimeDB.Col Field { get; } - - public TestFCols(string tableName) - { - Field = new global::SpacetimeDB.Col(tableName, "field"); - } - } - - public sealed class TestFIxCols - { - - public TestFIxCols(string tableName) - { - } - } -} -''' -"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 - -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. - -#nullable enable - -using System; -using System.Collections.Generic; -using System.Runtime.Serialization; - -namespace SpacetimeDB -{ - [SpacetimeDB.Type] - [DataContract] - public sealed partial class HasSpecialStuff - { - [DataMember(Name = "identity")] - public SpacetimeDB.Identity Identity; - [DataMember(Name = "connection_id")] - public SpacetimeDB.ConnectionId ConnectionId; - - public HasSpecialStuff( - SpacetimeDB.Identity Identity, - SpacetimeDB.ConnectionId ConnectionId - ) - { - this.Identity = Identity; - this.ConnectionId = ConnectionId; - } - - 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. - -#nullable enable - -using System; - -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. - -#nullable enable - -using System; - -namespace SpacetimeDB -{ - [SpacetimeDB.Type] - public partial record NamespaceTestF : SpacetimeDB.TaggedEnum<( - SpacetimeDB.Unit Foo, - SpacetimeDB.Unit Bar, - string Baz - )>; -} -''' -"Types/Person.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 Person - { - [DataMember(Name = "id")] - public uint Id; - [DataMember(Name = "name")] - public string Name; - [DataMember(Name = "age")] - public byte Age; - - public Person( - uint Id, - string Name, - byte Age - ) - { - this.Id = Id; - this.Name = Name; - this.Age = Age; - } - - public Person() - { - this.Name = ""; - } - } -} -''' -"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. - -#nullable enable - -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/PrivateTable.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 PrivateTable - { - [DataMember(Name = "name")] - public string Name; - - public PrivateTable(string Name) - { - this.Name = Name; - } - - public PrivateTable() - { - this.Name = ""; - } - } -} -''' -"Types/RemoveTable.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 RemoveTable - { - [DataMember(Name = "id")] - public uint Id; - - public RemoveTable(uint Id) - { - this.Id = Id; - } - - public RemoveTable() - { - } - } -} -''' -"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 SpacetimeDB.Timestamp PrevTime; - - public RepeatingTestArg( - ulong ScheduledId, - SpacetimeDB.ScheduleAt ScheduledAt, - SpacetimeDB.Timestamp 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/codegen/tests/snapshots/codegen__codegen_typescript.snap b/crates/codegen/tests/snapshots/codegen__codegen_typescript.snap index 6f01467a553..9532caa1fa0 100644 --- a/crates/codegen/tests/snapshots/codegen__codegen_typescript.snap +++ b/crates/codegen/tests/snapshots/codegen__codegen_typescript.snap @@ -1,6 +1,5 @@ --- source: crates/codegen/tests/codegen.rs -assertion_line: 37 expression: outfiles --- "add_player_reducer.ts" = ''' @@ -257,13 +256,13 @@ const tablesSchema = __schema( __table({ name: 'logged_out_player', indexes: [ - { name: 'identity', algorithm: 'btree', columns: [ + { name: 'logged_out_player_identity_idx_btree', algorithm: 'btree', columns: [ 'identity', ] }, - { name: 'name', algorithm: 'btree', columns: [ + { name: 'logged_out_player_name_idx_btree', algorithm: 'btree', columns: [ 'name', ] }, - { name: 'player_id', algorithm: 'btree', columns: [ + { name: 'logged_out_player_player_id_idx_btree', algorithm: 'btree', columns: [ 'playerId', ] }, ], @@ -279,7 +278,7 @@ const tablesSchema = __schema( { name: 'age', algorithm: 'btree', columns: [ 'age', ] }, - { name: 'id', algorithm: 'btree', columns: [ + { name: 'person_id_idx_btree', algorithm: 'btree', columns: [ 'id', ] }, ], @@ -290,13 +289,13 @@ const tablesSchema = __schema( __table({ name: 'player', indexes: [ - { name: 'identity', algorithm: 'btree', columns: [ + { name: 'player_identity_idx_btree', algorithm: 'btree', columns: [ 'identity', ] }, - { name: 'name', algorithm: 'btree', columns: [ + { name: 'player_name_idx_btree', algorithm: 'btree', columns: [ 'name', ] }, - { name: 'player_id', algorithm: 'btree', columns: [ + { name: 'player_player_id_idx_btree', algorithm: 'btree', columns: [ 'playerId', ] }, ], diff --git a/crates/codegen/tests/snapshots/codegen__codegen_typescript.snap.new b/crates/codegen/tests/snapshots/codegen__codegen_typescript.snap.new deleted file mode 100644 index c4797c02371..00000000000 --- a/crates/codegen/tests/snapshots/codegen__codegen_typescript.snap.new +++ /dev/null @@ -1,1086 +0,0 @@ ---- -source: crates/codegen/tests/codegen.rs -assertion_line: 37 -expression: outfiles ---- -"add_player_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. - -/* eslint-disable */ -/* tslint:disable */ -import { - TypeBuilder as __TypeBuilder, - t as __t, - type AlgebraicTypeType as __AlgebraicTypeType, - type Infer as __Infer, -} from "spacetimedb"; - -export default { - name: __t.string(), -}; -''' -"add_private_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. - -/* eslint-disable */ -/* tslint:disable */ -import { - TypeBuilder as __TypeBuilder, - t as __t, - type AlgebraicTypeType as __AlgebraicTypeType, - type Infer as __Infer, -} from "spacetimedb"; - -export default { - name: __t.string(), -}; -''' -"add_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. - -/* eslint-disable */ -/* tslint:disable */ -import { - TypeBuilder as __TypeBuilder, - t as __t, - type AlgebraicTypeType as __AlgebraicTypeType, - type Infer as __Infer, -} from "spacetimedb"; - -export default { - name: __t.string(), - age: __t.u8(), -}; -''' -"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 YOUR MODULE SOURCE CODE INSTEAD. - -/* eslint-disable */ -/* tslint:disable */ -import { - TypeBuilder as __TypeBuilder, - t as __t, - type AlgebraicTypeType as __AlgebraicTypeType, - type Infer as __Infer, -} from "spacetimedb"; - -export default {}; -''' -"baz_type.ts" = ''' -// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. - -/* eslint-disable */ -/* tslint:disable */ -import { - TypeBuilder as __TypeBuilder, - t as __t, - type AlgebraicTypeType as __AlgebraicTypeType, - type Infer as __Infer, -} from "spacetimedb"; - -export default __t.object("Baz", { - field: __t.string(), -}); - - -''' -"delete_player_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. - -/* eslint-disable */ -/* tslint:disable */ -import { - TypeBuilder as __TypeBuilder, - t as __t, - type AlgebraicTypeType as __AlgebraicTypeType, - type Infer as __Infer, -} from "spacetimedb"; - -export default { - id: __t.u64(), -}; -''' -"delete_players_by_name_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. - -/* eslint-disable */ -/* tslint:disable */ -import { - TypeBuilder as __TypeBuilder, - t as __t, - type AlgebraicTypeType as __AlgebraicTypeType, - type Infer as __Infer, -} from "spacetimedb"; - -export default { - name: __t.string(), -}; -''' -"foobar_type.ts" = ''' -// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. - -/* eslint-disable */ -/* tslint:disable */ -import { - TypeBuilder as __TypeBuilder, - t as __t, - type AlgebraicTypeType as __AlgebraicTypeType, - type Infer as __Infer, -} from "spacetimedb"; -import Baz from "./baz_type"; - - -// The tagged union or sum type for the algebraic type `Foobar`. -const Foobar = __t.enum("Foobar", {get Baz() { - return Baz; - }, - Bar: __t.unit(), - Har: __t.u32(), -}); - -export default Foobar; - - -''' -"get_my_schema_via_http_procedure.ts" = ''' -// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. - -/* eslint-disable */ -/* tslint:disable */ -import { - TypeBuilder as __TypeBuilder, - t as __t, - type AlgebraicTypeType as __AlgebraicTypeType, - type Infer as __Infer, -} from "spacetimedb"; - -export const params = { -}; -export const returnType = __t.string()''' -"has_special_stuff_type.ts" = ''' -// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. - -/* eslint-disable */ -/* tslint:disable */ -import { - TypeBuilder as __TypeBuilder, - t as __t, - type AlgebraicTypeType as __AlgebraicTypeType, - type Infer as __Infer, -} from "spacetimedb"; - -export default __t.object("HasSpecialStuff", { - identity: __t.identity(), - connectionId: __t.connectionId(), -}); - - -''' -"index.ts" = ''' -// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. - -VERSION_COMMENT - -/* eslint-disable */ -/* tslint:disable */ -import { - DbConnectionBuilder as __DbConnectionBuilder, - DbConnectionImpl as __DbConnectionImpl, - SubscriptionBuilderImpl as __SubscriptionBuilderImpl, - TypeBuilder as __TypeBuilder, - Uuid as __Uuid, - convertToAccessorMap as __convertToAccessorMap, - makeQueryBuilder as __makeQueryBuilder, - procedureSchema as __procedureSchema, - procedures as __procedures, - reducerSchema as __reducerSchema, - reducers as __reducers, - schema as __schema, - t as __t, - table as __table, - type AlgebraicTypeType as __AlgebraicTypeType, - type DbConnectionConfig as __DbConnectionConfig, - type ErrorContextInterface as __ErrorContextInterface, - type Event as __Event, - type EventContextInterface as __EventContextInterface, - type Infer as __Infer, - type QueryBuilder as __QueryBuilder, - type ReducerEventContextInterface as __ReducerEventContextInterface, - type RemoteModule as __RemoteModule, - type SubscriptionEventContextInterface as __SubscriptionEventContextInterface, - type SubscriptionHandleImpl as __SubscriptionHandleImpl, -} from "spacetimedb"; - -// Import all reducer arg schemas -import AddReducer from "./add_reducer"; -import AddPlayerReducer from "./add_player_reducer"; -import AddPrivateReducer from "./add_private_reducer"; -import AssertCallerIdentityIsModuleIdentityReducer from "./assert_caller_identity_is_module_identity_reducer"; -import DeletePlayerReducer from "./delete_player_reducer"; -import DeletePlayersByNameReducer from "./delete_players_by_name_reducer"; -import ListOverAgeReducer from "./list_over_age_reducer"; -import LogModuleIdentityReducer from "./log_module_identity_reducer"; -import QueryPrivateReducer from "./query_private_reducer"; -import SayHelloReducer from "./say_hello_reducer"; -import TestReducer from "./test_reducer"; -import TestBtreeIndexArgsReducer from "./test_btree_index_args_reducer"; - -// Import all procedure arg schemas -import * as GetMySchemaViaHttpProcedure from "./get_my_schema_via_http_procedure"; -import * as ReturnValueProcedure from "./return_value_procedure"; -import * as SleepOneSecondProcedure from "./sleep_one_second_procedure"; -import * as WithTxProcedure from "./with_tx_procedure"; - -// Import all table schema definitions -import LoggedOutPlayerRow from "./logged_out_player_table"; -import MyPlayerRow from "./my_player_table"; -import PersonRow from "./person_table"; -import PlayerRow from "./player_table"; -import TestDRow from "./test_d_table"; -import TestFRow from "./test_f_table"; - -/** Type-only namespace exports for generated type groups. */ - -/** The schema information for all tables in this module. This is defined the same was as the tables would have been defined in the server. */ -const tablesSchema = __schema( - __table({ - name: 'logged_out_player', - indexes: [ - { name: 'logged_out_player_identity_idx_btree', algorithm: 'btree', columns: [ - 'identity', - ] }, - { name: 'logged_out_player_name_idx_btree', algorithm: 'btree', columns: [ - 'name', - ] }, - { name: 'logged_out_player_player_id_idx_btree', algorithm: 'btree', columns: [ - 'playerId', - ] }, - ], - constraints: [ - { name: 'logged_out_player_identity_key', constraint: 'unique', columns: ['identity'] }, - { name: 'logged_out_player_name_key', constraint: 'unique', columns: ['name'] }, - { name: 'logged_out_player_player_id_key', constraint: 'unique', columns: ['playerId'] }, - ], - }, LoggedOutPlayerRow), - __table({ - name: 'person', - indexes: [ - { name: 'age', algorithm: 'btree', columns: [ - 'age', - ] }, - { name: 'person_id_idx_btree', algorithm: 'btree', columns: [ - 'id', - ] }, - ], - constraints: [ - { name: 'person_id_key', constraint: 'unique', columns: ['id'] }, - ], - }, PersonRow), - __table({ - name: 'player', - indexes: [ - { name: 'player_identity_idx_btree', algorithm: 'btree', columns: [ - 'identity', - ] }, - { name: 'player_name_idx_btree', algorithm: 'btree', columns: [ - 'name', - ] }, - { name: 'player_player_id_idx_btree', algorithm: 'btree', columns: [ - 'playerId', - ] }, - ], - constraints: [ - { name: 'player_identity_key', constraint: 'unique', columns: ['identity'] }, - { name: 'player_name_key', constraint: 'unique', columns: ['name'] }, - { name: 'player_player_id_key', constraint: 'unique', columns: ['playerId'] }, - ], - }, PlayerRow), - __table({ - name: 'test_d', - indexes: [ - ], - constraints: [ - ], - }, TestDRow), - __table({ - name: 'test_f', - indexes: [ - ], - constraints: [ - ], - }, TestFRow), - __table({ - name: 'my_player', - indexes: [ - ], - constraints: [ - ], - }, MyPlayerRow), -); - -/** The schema information for all reducers in this module. This is defined the same way as the reducers would have been defined in the server, except the body of the reducer is omitted in code generation. */ -const reducersSchema = __reducers( - __reducerSchema("add", AddReducer), - __reducerSchema("add_player", AddPlayerReducer), - __reducerSchema("add_private", AddPrivateReducer), - __reducerSchema("assert_caller_identity_is_module_identity", AssertCallerIdentityIsModuleIdentityReducer), - __reducerSchema("delete_player", DeletePlayerReducer), - __reducerSchema("delete_players_by_name", DeletePlayersByNameReducer), - __reducerSchema("list_over_age", ListOverAgeReducer), - __reducerSchema("log_module_identity", LogModuleIdentityReducer), - __reducerSchema("query_private", QueryPrivateReducer), - __reducerSchema("say_hello", SayHelloReducer), - __reducerSchema("test", TestReducer), - __reducerSchema("test_btree_index_args", TestBtreeIndexArgsReducer), -); - -/** The schema information for all procedures in this module. This is defined the same way as the procedures would have been defined in the server. */ -const proceduresSchema = __procedures( - __procedureSchema("get_my_schema_via_http", GetMySchemaViaHttpProcedure.params, GetMySchemaViaHttpProcedure.returnType), - __procedureSchema("return_value", ReturnValueProcedure.params, ReturnValueProcedure.returnType), - __procedureSchema("sleep_one_second", SleepOneSecondProcedure.params, SleepOneSecondProcedure.returnType), - __procedureSchema("with_tx", WithTxProcedure.params, WithTxProcedure.returnType), -); - -/** The remote SpacetimeDB module schema, both runtime and type information. */ -const REMOTE_MODULE = { - versionInfo: { - cliVersion: "1.12.0" as const, - }, - tables: tablesSchema.schemaType.tables, - reducers: reducersSchema.reducersType.reducers, - ...proceduresSchema, -} satisfies __RemoteModule< - typeof tablesSchema.schemaType, - typeof reducersSchema.reducersType, - typeof proceduresSchema ->; - -/** The tables available in this remote SpacetimeDB module. */ -export const tables = __convertToAccessorMap(tablesSchema.schemaType.tables); - -/** A typed query builder for this remote SpacetimeDB module. */ -export const query: __QueryBuilder = __makeQueryBuilder(tablesSchema.schemaType); - -/** The reducers available in this remote SpacetimeDB module. */ -export const reducers = __convertToAccessorMap(reducersSchema.reducersType.reducers); - -/** The context type returned in callbacks for all possible events. */ -export type EventContext = __EventContextInterface; -/** The context type returned in callbacks for reducer events. */ -export type ReducerEventContext = __ReducerEventContextInterface; -/** The context type returned in callbacks for subscription events. */ -export type SubscriptionEventContext = __SubscriptionEventContextInterface; -/** The context type returned in callbacks for error events. */ -export type ErrorContext = __ErrorContextInterface; -/** The subscription handle type to manage active subscriptions created from a {@link SubscriptionBuilder}. */ -export type SubscriptionHandle = __SubscriptionHandleImpl; - -/** Builder class to configure a new subscription to the remote SpacetimeDB instance. */ -export class SubscriptionBuilder extends __SubscriptionBuilderImpl {} - -/** Builder class to configure a new database connection to the remote SpacetimeDB instance. */ -export class DbConnectionBuilder extends __DbConnectionBuilder {} - -/** The typed database connection to manage connections to the remote SpacetimeDB instance. This class has type information specific to the generated module. */ -export class DbConnection extends __DbConnectionImpl { - /** Creates a new {@link DbConnectionBuilder} to configure and connect to the remote SpacetimeDB instance. */ - static builder = (): DbConnectionBuilder => { - return new DbConnectionBuilder(REMOTE_MODULE, (config: __DbConnectionConfig) => new DbConnection(config)); - }; - - /** Creates a new {@link SubscriptionBuilder} to configure a subscription to the remote SpacetimeDB instance. */ - override subscriptionBuilder = (): SubscriptionBuilder => { - return new SubscriptionBuilder(this); - }; -} - -''' -"list_over_age_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. - -/* eslint-disable */ -/* tslint:disable */ -import { - TypeBuilder as __TypeBuilder, - t as __t, - type AlgebraicTypeType as __AlgebraicTypeType, - type Infer as __Infer, -} from "spacetimedb"; - -export default { - age: __t.u8(), -}; -''' -"log_module_identity_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. - -/* eslint-disable */ -/* tslint:disable */ -import { - TypeBuilder as __TypeBuilder, - t as __t, - type AlgebraicTypeType as __AlgebraicTypeType, - type Infer as __Infer, -} from "spacetimedb"; - -export default {}; -''' -"logged_out_player_table.ts" = ''' -// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. - -/* eslint-disable */ -/* tslint:disable */ -import { - TypeBuilder as __TypeBuilder, - t as __t, - type AlgebraicTypeType as __AlgebraicTypeType, - type Infer as __Infer, -} from "spacetimedb"; - -export default __t.row({ - identity: __t.identity().primaryKey(), - playerId: __t.u64().name("player_id"), - name: __t.string(), -}); -''' -"my_player_table.ts" = ''' -// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. - -/* eslint-disable */ -/* tslint:disable */ -import { - TypeBuilder as __TypeBuilder, - t as __t, - type AlgebraicTypeType as __AlgebraicTypeType, - type Infer as __Infer, -} from "spacetimedb"; - -export default __t.row({ - identity: __t.identity(), - playerId: __t.u64().name("player_id"), - name: __t.string(), -}); -''' -"namespace_test_c_type.ts" = ''' -// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. - -/* eslint-disable */ -/* tslint:disable */ -import { - TypeBuilder as __TypeBuilder, - t as __t, - type AlgebraicTypeType as __AlgebraicTypeType, - type Infer as __Infer, -} from "spacetimedb"; - -// The tagged union or sum type for the algebraic type `NamespaceTestC`. -const NamespaceTestC = __t.enum("NamespaceTestC", {Foo: __t.unit(), - Bar: __t.unit(), -}); - -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 YOUR MODULE SOURCE CODE INSTEAD. - -/* eslint-disable */ -/* tslint:disable */ -import { - TypeBuilder as __TypeBuilder, - t as __t, - type AlgebraicTypeType as __AlgebraicTypeType, - type Infer as __Infer, -} from "spacetimedb"; - -// The tagged union or sum type for the algebraic type `NamespaceTestF`. -const NamespaceTestF = __t.enum("NamespaceTestF", {Foo: __t.unit(), - Bar: __t.unit(), - Baz: __t.string(), -}); - -export default NamespaceTestF; - - -''' -"person_table.ts" = ''' -// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. - -/* eslint-disable */ -/* tslint:disable */ -import { - TypeBuilder as __TypeBuilder, - t as __t, - type AlgebraicTypeType as __AlgebraicTypeType, - type Infer as __Infer, -} from "spacetimedb"; - -export default __t.row({ - id: __t.u32().primaryKey(), - name: __t.string(), - age: __t.u8(), -}); -''' -"person_type.ts" = ''' -// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. - -/* eslint-disable */ -/* tslint:disable */ -import { - TypeBuilder as __TypeBuilder, - t as __t, - type AlgebraicTypeType as __AlgebraicTypeType, - type Infer as __Infer, -} from "spacetimedb"; - -export default __t.object("Person", { - id: __t.u32(), - name: __t.string(), - age: __t.u8(), -}); - - -''' -"pk_multi_identity_type.ts" = ''' -// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. - -/* eslint-disable */ -/* tslint:disable */ -import { - TypeBuilder as __TypeBuilder, - t as __t, - type AlgebraicTypeType as __AlgebraicTypeType, - type Infer as __Infer, -} from "spacetimedb"; - -export default __t.object("PkMultiIdentity", { - id: __t.u32(), - other: __t.u32(), -}); - - -''' -"player_table.ts" = ''' -// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. - -/* eslint-disable */ -/* tslint:disable */ -import { - TypeBuilder as __TypeBuilder, - t as __t, - type AlgebraicTypeType as __AlgebraicTypeType, - type Infer as __Infer, -} from "spacetimedb"; - -export default __t.row({ - identity: __t.identity().primaryKey(), - playerId: __t.u64().name("player_id"), - name: __t.string(), -}); -''' -"player_type.ts" = ''' -// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. - -/* eslint-disable */ -/* tslint:disable */ -import { - TypeBuilder as __TypeBuilder, - t as __t, - type AlgebraicTypeType as __AlgebraicTypeType, - type Infer as __Infer, -} from "spacetimedb"; - -export default __t.object("Player", { - identity: __t.identity(), - playerId: __t.u64(), - name: __t.string(), -}); - - -''' -"point_type.ts" = ''' -// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. - -/* eslint-disable */ -/* tslint:disable */ -import { - TypeBuilder as __TypeBuilder, - t as __t, - type AlgebraicTypeType as __AlgebraicTypeType, - type Infer as __Infer, -} from "spacetimedb"; - -export default __t.object("Point", { - x: __t.i64(), - y: __t.i64(), -}); - - -''' -"private_table_type.ts" = ''' -// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. - -/* eslint-disable */ -/* tslint:disable */ -import { - TypeBuilder as __TypeBuilder, - t as __t, - type AlgebraicTypeType as __AlgebraicTypeType, - type Infer as __Infer, -} from "spacetimedb"; - -export default __t.object("PrivateTable", { - name: __t.string(), -}); - - -''' -"query_private_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. - -/* eslint-disable */ -/* tslint:disable */ -import { - TypeBuilder as __TypeBuilder, - t as __t, - type AlgebraicTypeType as __AlgebraicTypeType, - type Infer as __Infer, -} from "spacetimedb"; - -export default {}; -''' -"remove_table_type.ts" = ''' -// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. - -/* eslint-disable */ -/* tslint:disable */ -import { - TypeBuilder as __TypeBuilder, - t as __t, - type AlgebraicTypeType as __AlgebraicTypeType, - type Infer as __Infer, -} from "spacetimedb"; - -export default __t.object("RemoveTable", { - id: __t.u32(), -}); - - -''' -"repeating_test_arg_type.ts" = ''' -// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. - -/* eslint-disable */ -/* tslint:disable */ -import { - TypeBuilder as __TypeBuilder, - t as __t, - type AlgebraicTypeType as __AlgebraicTypeType, - type Infer as __Infer, -} from "spacetimedb"; - -export default __t.object("RepeatingTestArg", { - scheduledId: __t.u64(), - scheduledAt: __t.scheduleAt(), - prevTime: __t.timestamp(), -}); - - -''' -"return_value_procedure.ts" = ''' -// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. - -/* eslint-disable */ -/* tslint:disable */ -import { - TypeBuilder as __TypeBuilder, - t as __t, - type AlgebraicTypeType as __AlgebraicTypeType, - type Infer as __Infer, -} from "spacetimedb"; - -import Baz from "./baz_type"; - -export const params = { - foo: __t.u64(), -}; -export const returnType = Baz''' -"say_hello_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. - -/* eslint-disable */ -/* tslint:disable */ -import { - TypeBuilder as __TypeBuilder, - t as __t, - type AlgebraicTypeType as __AlgebraicTypeType, - type Infer as __Infer, -} from "spacetimedb"; - -export default {}; -''' -"sleep_one_second_procedure.ts" = ''' -// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. - -/* eslint-disable */ -/* tslint:disable */ -import { - TypeBuilder as __TypeBuilder, - t as __t, - type AlgebraicTypeType as __AlgebraicTypeType, - type Infer as __Infer, -} from "spacetimedb"; - -export const params = { -}; -export const returnType = __t.unit()''' -"test_a_type.ts" = ''' -// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. - -/* eslint-disable */ -/* tslint:disable */ -import { - TypeBuilder as __TypeBuilder, - t as __t, - type AlgebraicTypeType as __AlgebraicTypeType, - type Infer as __Infer, -} from "spacetimedb"; - -export default __t.object("TestA", { - x: __t.u32(), - y: __t.u32(), - z: __t.string(), -}); - - -''' -"test_b_type.ts" = ''' -// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. - -/* eslint-disable */ -/* tslint:disable */ -import { - TypeBuilder as __TypeBuilder, - t as __t, - type AlgebraicTypeType as __AlgebraicTypeType, - type Infer as __Infer, -} from "spacetimedb"; - -export default __t.object("TestB", { - foo: __t.string(), -}); - - -''' -"test_btree_index_args_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. - -/* eslint-disable */ -/* tslint:disable */ -import { - TypeBuilder as __TypeBuilder, - t as __t, - type AlgebraicTypeType as __AlgebraicTypeType, - type Infer as __Infer, -} from "spacetimedb"; - -export default {}; -''' -"test_d_table.ts" = ''' -// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. - -/* eslint-disable */ -/* tslint:disable */ -import { - TypeBuilder as __TypeBuilder, - t as __t, - type AlgebraicTypeType as __AlgebraicTypeType, - type Infer as __Infer, -} from "spacetimedb"; -import NamespaceTestC from "./namespace_test_c_type"; - - -export default __t.row({ - get testC() { - return __t.option(NamespaceTestC).name("test_c"); - }, -}); -''' -"test_d_type.ts" = ''' -// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. - -/* eslint-disable */ -/* tslint:disable */ -import { - TypeBuilder as __TypeBuilder, - t as __t, - type AlgebraicTypeType as __AlgebraicTypeType, - type Infer as __Infer, -} from "spacetimedb"; -import NamespaceTestC from "./namespace_test_c_type"; - - -export default __t.object("TestD", { - get testC() { - return __t.option(NamespaceTestC); - }, -}); - - -''' -"test_e_type.ts" = ''' -// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. - -/* eslint-disable */ -/* tslint:disable */ -import { - TypeBuilder as __TypeBuilder, - t as __t, - type AlgebraicTypeType as __AlgebraicTypeType, - type Infer as __Infer, -} from "spacetimedb"; - -export default __t.object("TestE", { - id: __t.u64(), - name: __t.string(), -}); - - -''' -"test_f_table.ts" = ''' -// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. - -/* eslint-disable */ -/* tslint:disable */ -import { - TypeBuilder as __TypeBuilder, - t as __t, - type AlgebraicTypeType as __AlgebraicTypeType, - type Infer as __Infer, -} from "spacetimedb"; -import Foobar from "./foobar_type"; - - -export default __t.row({ - get field() { - return Foobar; - }, -}); -''' -"test_foobar_type.ts" = ''' -// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. - -/* eslint-disable */ -/* tslint:disable */ -import { - TypeBuilder as __TypeBuilder, - t as __t, - type AlgebraicTypeType as __AlgebraicTypeType, - type Infer as __Infer, -} from "spacetimedb"; -import Foobar from "./foobar_type"; - - -export default __t.object("TestFoobar", { - get field() { - return Foobar; - }, -}); - - -''' -"test_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. - -/* eslint-disable */ -/* tslint:disable */ -import { - TypeBuilder as __TypeBuilder, - t as __t, - type AlgebraicTypeType as __AlgebraicTypeType, - type Infer as __Infer, -} from "spacetimedb"; - -import TestA from "./test_a_type"; -import TestB from "./test_b_type"; -import NamespaceTestC from "./namespace_test_c_type"; -import NamespaceTestF from "./namespace_test_f_type"; - -export default { - get arg() { - return TestA; - }, - get arg2() { - return TestB; - }, - get arg3() { - return NamespaceTestC; - }, - get arg4() { - return NamespaceTestF; - }, -}; -''' -"types/index.ts" = ''' -// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. - -/* eslint-disable */ -/* tslint:disable */ -import { type Infer as __Infer } from "spacetimedb"; - -// Import all non-reducer types -import Baz from "../baz_type"; -import Foobar from "../foobar_type"; -import HasSpecialStuff from "../has_special_stuff_type"; -import Person from "../person_type"; -import PkMultiIdentity from "../pk_multi_identity_type"; -import Player from "../player_type"; -import Point from "../point_type"; -import PrivateTable from "../private_table_type"; -import RemoveTable from "../remove_table_type"; -import RepeatingTestArg from "../repeating_test_arg_type"; -import TestA from "../test_a_type"; -import TestB from "../test_b_type"; -import TestD from "../test_d_type"; -import TestE from "../test_e_type"; -import TestFoobar from "../test_foobar_type"; -import NamespaceTestC from "../namespace_test_c_type"; -import NamespaceTestF from "../namespace_test_f_type"; - -export type Baz = __Infer; -export type Foobar = __Infer; -export type HasSpecialStuff = __Infer; -export type Person = __Infer; -export type PkMultiIdentity = __Infer; -export type Player = __Infer; -export type Point = __Infer; -export type PrivateTable = __Infer; -export type RemoveTable = __Infer; -export type RepeatingTestArg = __Infer; -export type TestA = __Infer; -export type TestB = __Infer; -export type TestD = __Infer; -export type TestE = __Infer; -export type TestFoobar = __Infer; -export type NamespaceTestC = __Infer; -export type NamespaceTestF = __Infer; - -''' -"types/procedures.ts" = ''' -// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. - -/* eslint-disable */ -/* tslint:disable */ -import { type Infer as __Infer } from "spacetimedb"; - -// Import all procedure arg schemas -import * as GetMySchemaViaHttpProcedure from "../get_my_schema_via_http_procedure"; -import * as ReturnValueProcedure from "../return_value_procedure"; -import * as SleepOneSecondProcedure from "../sleep_one_second_procedure"; -import * as WithTxProcedure from "../with_tx_procedure"; - -export type GetMySchemaViaHttpArgs = __Infer; -export type GetMySchemaViaHttpResult = __Infer; -export type ReturnValueArgs = __Infer; -export type ReturnValueResult = __Infer; -export type SleepOneSecondArgs = __Infer; -export type SleepOneSecondResult = __Infer; -export type WithTxArgs = __Infer; -export type WithTxResult = __Infer; - -''' -"types/reducers.ts" = ''' -// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. - -/* eslint-disable */ -/* tslint:disable */ -import { type Infer as __Infer } from "spacetimedb"; - -// Import all reducer arg schemas -import AddReducer from "../add_reducer"; -import AddPlayerReducer from "../add_player_reducer"; -import AddPrivateReducer from "../add_private_reducer"; -import AssertCallerIdentityIsModuleIdentityReducer from "../assert_caller_identity_is_module_identity_reducer"; -import DeletePlayerReducer from "../delete_player_reducer"; -import DeletePlayersByNameReducer from "../delete_players_by_name_reducer"; -import ListOverAgeReducer from "../list_over_age_reducer"; -import LogModuleIdentityReducer from "../log_module_identity_reducer"; -import QueryPrivateReducer from "../query_private_reducer"; -import SayHelloReducer from "../say_hello_reducer"; -import TestReducer from "../test_reducer"; -import TestBtreeIndexArgsReducer from "../test_btree_index_args_reducer"; - -export type AddParams = __Infer; -export type AddPlayerParams = __Infer; -export type AddPrivateParams = __Infer; -export type AssertCallerIdentityIsModuleIdentityParams = __Infer; -export type DeletePlayerParams = __Infer; -export type DeletePlayersByNameParams = __Infer; -export type ListOverAgeParams = __Infer; -export type LogModuleIdentityParams = __Infer; -export type QueryPrivateParams = __Infer; -export type SayHelloParams = __Infer; -export type TestParams = __Infer; -export type TestBtreeIndexArgsParams = __Infer; - -''' -"with_tx_procedure.ts" = ''' -// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE -// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. - -/* eslint-disable */ -/* tslint:disable */ -import { - TypeBuilder as __TypeBuilder, - t as __t, - type AlgebraicTypeType as __AlgebraicTypeType, - type Infer as __Infer, -} from "spacetimedb"; - -export const params = { -}; -export const returnType = __t.unit()''' From c8992701f30aa723d1af3896ec93f208f44ee0c6 Mon Sep 17 00:00:00 2001 From: Shubham Mishra Date: Thu, 12 Feb 2026 16:47:33 +0530 Subject: [PATCH 018/133] fix index arg --- crates/lib/src/db/raw_def/v10.rs | 15 ++++++--------- crates/lib/src/db/raw_def/v9.rs | 4 ++-- crates/schema/src/def/validate/v10.rs | 8 ++++---- 3 files changed, 12 insertions(+), 15 deletions(-) diff --git a/crates/lib/src/db/raw_def/v10.rs b/crates/lib/src/db/raw_def/v10.rs index 88f8cef3765..7bfbe43e8a3 100644 --- a/crates/lib/src/db/raw_def/v10.rs +++ b/crates/lib/src/db/raw_def/v10.rs @@ -350,17 +350,14 @@ pub struct RawIndexDefV10 { /// Even though there is ABSOLUTELY NO REASON TO. pub source_name: Option, - /// Accessor name for the index used in client codegen. + /// name for the index used internally and in client codegen /// /// This is set the user and should not be assumed to follow /// any particular format. /// /// May be set to `None` if this is an auto-generated index for which the user - /// has not supplied a name. In this case, no client code generation for this index - /// will be performed. - /// - /// This name is not visible in the system tables, it is only used for client codegen. - pub accessor_name: Option, + /// has not supplied a name. + pub name: Option, /// The algorithm parameters for the index. pub algorithm: RawIndexAlgorithm, @@ -1140,8 +1137,8 @@ impl RawTableDefBuilderV10<'_> { let accessor_name = accessor_name.into(); self.table.indexes.push(RawIndexDefV10 { - source_name: index_name.map(Into::into), - accessor_name: Some(accessor_name), + name: index_name.map(Into::into), + source_name: Some(accessor_name), algorithm, }); self @@ -1151,7 +1148,7 @@ impl RawTableDefBuilderV10<'_> { pub fn with_index_no_accessor_name(mut self, algorithm: RawIndexAlgorithm) -> Self { self.table.indexes.push(RawIndexDefV10 { source_name: None, - accessor_name: None, + name: None, algorithm, }); self diff --git a/crates/lib/src/db/raw_def/v9.rs b/crates/lib/src/db/raw_def/v9.rs index 20b32250d89..8b5dbd652a9 100644 --- a/crates/lib/src/db/raw_def/v9.rs +++ b/crates/lib/src/db/raw_def/v9.rs @@ -1074,8 +1074,8 @@ impl From for RawScopedTypeNameV9 { impl From for RawIndexDefV9 { fn from(raw: RawIndexDefV10) -> Self { RawIndexDefV9 { - name: raw.source_name, - accessor_name: raw.accessor_name, + accessor_name: raw.source_name, + name: raw.name, algorithm: raw.algorithm, } } diff --git a/crates/schema/src/def/validate/v10.rs b/crates/schema/src/def/validate/v10.rs index 92db577276c..0d649f5dcd2 100644 --- a/crates/schema/src/def/validate/v10.rs +++ b/crates/schema/src/def/validate/v10.rs @@ -867,17 +867,17 @@ mod tests { [ &IndexDef { name: "Apples_count_idx_direct".into(), - codegen_name: Some(expect_identifier("Apples_count_direct")), + codegen_name: Some(expect_identifier("Apples_count_idx_direct")), algorithm: DirectAlgorithm { column: 2.into() }.into(), }, &IndexDef { name: "Apples_name_count_idx_btree".into(), - codegen_name: Some(expect_identifier("apples_id")), + codegen_name: Some(expect_identifier("Apples_name_count_idx_btree")), algorithm: BTreeAlgorithm { columns: [1, 2].into() }.into(), }, &IndexDef { name: "Apples_type_idx_btree".into(), - codegen_name: Some(expect_identifier("Apples_type_btree")), + codegen_name: Some(expect_identifier("Apples_type_idx_btree")), algorithm: BTreeAlgorithm { columns: 3.into() }.into(), } ] @@ -1463,7 +1463,7 @@ mod tests { let mut raw_def = builder.finish(); let tables = raw_def.tables_mut_for_tests(); tables[0].constraints[0].source_name = Some("wacky.constraint()".into()); - tables[0].indexes[0].source_name = Some("wacky.index()".into()); + tables[0].indexes[0].name = Some("wacky.index()".into()); tables[0].sequences[0].source_name = Some("wacky.sequence()".into()); let def: ModuleDef = raw_def.try_into().unwrap(); From c533f0f2ec1034762f05522e5e063d0ac2b7153d Mon Sep 17 00:00:00 2001 From: Shubham Mishra Date: Thu, 12 Feb 2026 18:17:12 +0530 Subject: [PATCH 019/133] fix smoketest --- smoketests/tests/views.py | 2 +- smoketests/tests/zz_docker.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/smoketests/tests/views.py b/smoketests/tests/views.py index 5d5352f3531..58f4c1b8b1e 100644 --- a/smoketests/tests/views.py +++ b/smoketests/tests/views.py @@ -104,7 +104,7 @@ class SqlViews(Smoketest): #[derive(Clone)] -#[spacetimedb::table(accessor = player_info, index(name=age_level_index, btree(columns = [age, level])))] +#[spacetimedb::table(accessor = player_info, index(accessor=age_level_index, btree(columns = [age, level])))] pub struct PlayerInfo { #[primary_key] id: u64, diff --git a/smoketests/tests/zz_docker.py b/smoketests/tests/zz_docker.py index c1286bbde1d..02082957e06 100644 --- a/smoketests/tests/zz_docker.py +++ b/smoketests/tests/zz_docker.py @@ -11,7 +11,7 @@ class DockerRestartModule(Smoketest): MODULE_CODE = """ use spacetimedb::{log, ReducerContext, Table}; -#[spacetimedb::table(accessor = person, index(name = name_idx, btree(columns = [name])))] +#[spacetimedb::table(accessor = person, index(accessor = name_idx, btree(columns = [name])))] pub struct Person { #[primary_key] #[auto_inc] @@ -57,7 +57,7 @@ class DockerRestartSql(Smoketest): MODULE_CODE = """ use spacetimedb::{log, ReducerContext, Table}; -#[spacetimedb::table(accessor = person, index(name = name_idx, btree(columns = [name])))] +#[spacetimedb::table(accessor = person, index(accessor = name_idx, btree(columns = [name])))] pub struct Person { #[primary_key] #[auto_inc] From d1f208a71664acca1340e3eb0992f293f5eacd2f Mon Sep 17 00:00:00 2001 From: Shubham Mishra Date: Thu, 12 Feb 2026 18:21:55 +0530 Subject: [PATCH 020/133] fix typos --- crates/bindings-macro/src/table.rs | 10 +++------- .../src/templates/rust/server/.cargo/config.toml | 5 +++-- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/crates/bindings-macro/src/table.rs b/crates/bindings-macro/src/table.rs index 051be83ede1..08f83ec5d5c 100644 --- a/crates/bindings-macro/src/table.rs +++ b/crates/bindings-macro/src/table.rs @@ -197,7 +197,7 @@ impl IndexArg { }); Ok(()) })?; - let accessor = accessor.ok_or_else(|| meta.error("missing index name, e.g. accessor = my_index"))?; + let accessor = accessor.ok_or_else(|| meta.error("missing index accessor, e.g. `accessor = my_index`"))?; let kind = algo.ok_or_else(|| { meta.error( "missing index algorithm, e.g., `btree(columns = [col1, col2])`, \ @@ -296,12 +296,8 @@ impl IndexArg { }); Ok(()) })?; - let kind = kind.ok_or_else(|| { - syn::Error::new_spanned( - &attr.meta, - "must specify kind of index (`btree` , `direct`, `name` or `value`)", - ) - })?; + let kind = + kind.ok_or_else(|| syn::Error::new_spanned(&attr.meta, "must specify kind of index (`btree` , `direct`)"))?; // Default accessor = field name if not provided let accessor = accessor.unwrap_or_else(|| field.clone()); diff --git a/tools/xtask-llm-benchmark/src/templates/rust/server/.cargo/config.toml b/tools/xtask-llm-benchmark/src/templates/rust/server/.cargo/config.toml index 69e3a25269e..8d4a1699bc8 100644 --- a/tools/xtask-llm-benchmark/src/templates/rust/server/.cargo/config.toml +++ b/tools/xtask-llm-benchmark/src/templates/rust/server/.cargo/config.toml @@ -1,4 +1,4 @@ -#[table(name =# .cargo/config.toml +# .cargo/config.toml [build] rustflags = ["-C","debuginfo=0","-C","split-debuginfo=off"] @@ -8,4 +8,5 @@ linker = "rust-lld.exe" [target.wasm32-unknown-unknown] # wasm already uses wasm-ld; keep output lean -rustflags = ["-C","debuginfo=0","-C","panic=abort"] \ No newline at end of file +rustflags = ["-C","debuginfo=0","-C","panic=abort"] + From ae8c3256a276d3ccf72437ede8f4d3b45e2992ee Mon Sep 17 00:00:00 2001 From: Shubham Mishra Date: Thu, 12 Feb 2026 19:28:51 +0530 Subject: [PATCH 021/133] stupid insta test --- crates/bindings/tests/ui/reducers.stderr | 6 +++--- crates/bindings/tests/ui/tables.stderr | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/crates/bindings/tests/ui/reducers.stderr b/crates/bindings/tests/ui/reducers.stderr index 022f5d6cb0c..acc25c83008 100644 --- a/crates/bindings/tests/ui/reducers.stderr +++ b/crates/bindings/tests/ui/reducers.stderr @@ -17,7 +17,7 @@ error: scheduled table missing required columns; add these to your struct: scheduled_at: spacetimedb::ScheduleAt, --> tests/ui/reducers.rs:28:63 | -28 | #[spacetimedb::table(accessor = scheduled_table_missing_rows, scheduled(scheduled_table_missing_ro... +28 | #[spacetimedb::table(accessor = scheduled_table_missing_rows, scheduled(scheduled_table_missing_rows_reducer))] | ^^^^^^^^^ error[E0277]: invalid reducer signature @@ -276,5 +276,5 @@ error[E0593]: function is expected to take 2 arguments, but it takes 3 arguments note: required by a bound in `scheduled_typecheck` --> src/rt.rs | - | ...FnKind>(_x: impl ExportFunctionForScheduledTable<'de, Row, FnKind>) - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `scheduled_typecheck` + | pub const fn scheduled_typecheck<'de, Row, FnKind>(_x: impl ExportFunctionForScheduledTable<'de, Row, FnKind>) + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `scheduled_typecheck` diff --git a/crates/bindings/tests/ui/tables.stderr b/crates/bindings/tests/ui/tables.stderr index 4fd1fbf7b8a..5c8b05e0d11 100644 --- a/crates/bindings/tests/ui/tables.stderr +++ b/crates/bindings/tests/ui/tables.stderr @@ -114,8 +114,8 @@ help: the trait `Serialize` is not implemented for `Test` note: required by a bound in `spacetimedb::spacetimedb_lib::ser::SerializeNamedProduct::serialize_element` --> $WORKSPACE/crates/sats/src/ser.rs | - | ...ment(&mut self, name: Option<&str>, elem: &T) -> Result<(), Self::Error>; - | ^^^^^^^^^ required by this bound in `SerializeNamedProduct::serialize_element` + | fn serialize_element(&mut self, name: Option<&str>, elem: &T) -> Result<(), Self::Error>; + | ^^^^^^^^^ required by this bound in `SerializeNamedProduct::serialize_element` error[E0277]: the column type `Test` does not implement `SpacetimeType` --> tests/ui/tables.rs:5:8 From c6a194d8a3e5829e9a8cae2539f41ebe93d0eea7 Mon Sep 17 00:00:00 2001 From: Shubham Mishra Date: Thu, 12 Feb 2026 19:51:23 +0530 Subject: [PATCH 022/133] generate ts module def --- .../autogen/case_conversion_policy_type.ts | 21 +++++++++++++++++++ .../lib/autogen/explicit_name_entry_type.ts | 16 ++++++++++++++ .../src/lib/autogen/explicit_names_type.ts | 21 +++++++++++++++++++ .../lib/autogen/raw_index_def_v_10_type.ts | 2 +- .../raw_module_def_v_10_section_type.ts | 8 +++++++ crates/bindings-typescript/src/lib/schema.ts | 7 ++++++- crates/bindings-typescript/src/lib/table.ts | 4 ++-- .../bindings-typescript/src/server/runtime.ts | 6 +++--- 8 files changed, 78 insertions(+), 7 deletions(-) create mode 100644 crates/bindings-typescript/src/lib/autogen/case_conversion_policy_type.ts create mode 100644 crates/bindings-typescript/src/lib/autogen/explicit_name_entry_type.ts create mode 100644 crates/bindings-typescript/src/lib/autogen/explicit_names_type.ts diff --git a/crates/bindings-typescript/src/lib/autogen/case_conversion_policy_type.ts b/crates/bindings-typescript/src/lib/autogen/case_conversion_policy_type.ts new file mode 100644 index 00000000000..4b33e55188c --- /dev/null +++ b/crates/bindings-typescript/src/lib/autogen/case_conversion_policy_type.ts @@ -0,0 +1,21 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +/* eslint-disable */ +/* tslint:disable */ +import { + TypeBuilder as __TypeBuilder, + t as __t, + type AlgebraicTypeType as __AlgebraicTypeType, + type Infer as __Infer, +} from '../../lib/type_builders'; + +// The tagged union or sum type for the algebraic type `CaseConversionPolicy`. +const CaseConversionPolicy = __t.enum('CaseConversionPolicy', { + None: __t.unit(), + SnakeCase: __t.unit(), + CamelCase: __t.unit(), + PascalCase: __t.unit(), +}); + +export default CaseConversionPolicy; diff --git a/crates/bindings-typescript/src/lib/autogen/explicit_name_entry_type.ts b/crates/bindings-typescript/src/lib/autogen/explicit_name_entry_type.ts new file mode 100644 index 00000000000..a9b617827a1 --- /dev/null +++ b/crates/bindings-typescript/src/lib/autogen/explicit_name_entry_type.ts @@ -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. + +/* eslint-disable */ +/* tslint:disable */ +import { + TypeBuilder as __TypeBuilder, + t as __t, + type AlgebraicTypeType as __AlgebraicTypeType, + type Infer as __Infer, +} from '../../lib/type_builders'; + +export default __t.object('ExplicitNameEntry', { + sourceName: __t.string(), + canonicalName: __t.string(), +}); diff --git a/crates/bindings-typescript/src/lib/autogen/explicit_names_type.ts b/crates/bindings-typescript/src/lib/autogen/explicit_names_type.ts new file mode 100644 index 00000000000..4de3be7e00f --- /dev/null +++ b/crates/bindings-typescript/src/lib/autogen/explicit_names_type.ts @@ -0,0 +1,21 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +/* eslint-disable */ +/* tslint:disable */ +import { + TypeBuilder as __TypeBuilder, + t as __t, + type AlgebraicTypeType as __AlgebraicTypeType, + type Infer as __Infer, +} from '../../lib/type_builders'; +import ExplicitNameEntry from './explicit_name_entry_type'; + +export default __t.object('ExplicitNames', { + get tables() { + return __t.array(ExplicitNameEntry); + }, + get funcs() { + return __t.array(ExplicitNameEntry); + }, +}); diff --git a/crates/bindings-typescript/src/lib/autogen/raw_index_def_v_10_type.ts b/crates/bindings-typescript/src/lib/autogen/raw_index_def_v_10_type.ts index 2a1913b7ae4..fc84594144c 100644 --- a/crates/bindings-typescript/src/lib/autogen/raw_index_def_v_10_type.ts +++ b/crates/bindings-typescript/src/lib/autogen/raw_index_def_v_10_type.ts @@ -13,7 +13,7 @@ import RawIndexAlgorithm from './raw_index_algorithm_type'; export default __t.object('RawIndexDefV10', { sourceName: __t.option(__t.string()), - accessorName: __t.option(__t.string()), + name: __t.option(__t.string()), get algorithm() { return RawIndexAlgorithm; }, diff --git a/crates/bindings-typescript/src/lib/autogen/raw_module_def_v_10_section_type.ts b/crates/bindings-typescript/src/lib/autogen/raw_module_def_v_10_section_type.ts index dcf579b9fd6..09f092909f3 100644 --- a/crates/bindings-typescript/src/lib/autogen/raw_module_def_v_10_section_type.ts +++ b/crates/bindings-typescript/src/lib/autogen/raw_module_def_v_10_section_type.ts @@ -18,6 +18,8 @@ import RawProcedureDefV10 from './raw_procedure_def_v_10_type'; import RawViewDefV10 from './raw_view_def_v_10_type'; import RawScheduleDefV10 from './raw_schedule_def_v_10_type'; import RawLifeCycleReducerDefV10 from './raw_life_cycle_reducer_def_v_10_type'; +import CaseConversionPolicy from './case_conversion_policy_type'; +import ExplicitNames from './explicit_names_type'; // The tagged union or sum type for the algebraic type `RawModuleDefV10Section`. const RawModuleDefV10Section = __t.enum('RawModuleDefV10Section', { @@ -48,6 +50,12 @@ const RawModuleDefV10Section = __t.enum('RawModuleDefV10Section', { get RowLevelSecurity() { return __t.array(RawRowLevelSecurityDefV9); }, + get CaseConversionPolicy() { + return CaseConversionPolicy; + }, + get ExplicitNames() { + return ExplicitNames; + }, }); export default RawModuleDefV10Section; diff --git a/crates/bindings-typescript/src/lib/schema.ts b/crates/bindings-typescript/src/lib/schema.ts index 45e0a38404f..5800567b994 100644 --- a/crates/bindings-typescript/src/lib/schema.ts +++ b/crates/bindings-typescript/src/lib/schema.ts @@ -100,7 +100,7 @@ function tableToSchema( ? [idx.algorithm.value] : idx.algorithm.value; return { - name: idx.accessorName!, + name: idx.name!, unique: tableDef.constraints.some(c => c.data.value.columns.every(col => columnIds.includes(col)) ), @@ -140,6 +140,11 @@ export class ModuleContext { procedures: [], views: [], lifeCycleReducers: [], + caseConversionPolicy: { tag: 'SnakeCase' }, + explicitNames: { + tables: [], + funcs: [], + }, }; get moduleDef(): ModuleDef { diff --git a/crates/bindings-typescript/src/lib/table.ts b/crates/bindings-typescript/src/lib/table.ts index c809b6ebde5..febf4700111 100644 --- a/crates/bindings-typescript/src/lib/table.ts +++ b/crates/bindings-typescript/src/lib/table.ts @@ -350,7 +350,7 @@ export function table>( } indexes.push({ sourceName: undefined, // Unnamed indexes will be assigned a globally unique name - accessorName: name, // The name of this column will be used as the accessor name + name, // The name of this column will be used as the accessor name algorithm, }); } @@ -420,7 +420,7 @@ export function table>( // the name and accessor name of an index across all SDKs. indexes.push({ sourceName: undefined, - accessorName: indexOpts.name, + name: indexOpts.name, algorithm, }); } diff --git a/crates/bindings-typescript/src/server/runtime.ts b/crates/bindings-typescript/src/server/runtime.ts index 5a5baef18e1..ccb200550a7 100644 --- a/crates/bindings-typescript/src/server/runtime.ts +++ b/crates/bindings-typescript/src/server/runtime.ts @@ -783,10 +783,10 @@ function makeTableView( } as RangedIndex; } - if (Object.hasOwn(tableView, indexDef.accessorName!)) { - freeze(Object.assign(tableView[indexDef.accessorName!], index)); + if (Object.hasOwn(tableView, indexDef.name!)) { + freeze(Object.assign(tableView[indexDef.name!], index)); } else { - tableView[indexDef.accessorName!] = freeze(index) as any; + tableView[indexDef.name!] = freeze(index) as any; } } From f287d0f18af849958cc52046378bfc473e334eac Mon Sep 17 00:00:00 2001 From: Shubham Mishra Date: Thu, 12 Feb 2026 20:27:18 +0530 Subject: [PATCH 023/133] fix test --- crates/schema/src/def/validate/v10.rs | 2 -- 1 file changed, 2 deletions(-) diff --git a/crates/schema/src/def/validate/v10.rs b/crates/schema/src/def/validate/v10.rs index 0d649f5dcd2..adfd87bea22 100644 --- a/crates/schema/src/def/validate/v10.rs +++ b/crates/schema/src/def/validate/v10.rs @@ -1463,12 +1463,10 @@ mod tests { let mut raw_def = builder.finish(); let tables = raw_def.tables_mut_for_tests(); tables[0].constraints[0].source_name = Some("wacky.constraint()".into()); - tables[0].indexes[0].name = Some("wacky.index()".into()); tables[0].sequences[0].source_name = Some("wacky.sequence()".into()); let def: ModuleDef = raw_def.try_into().unwrap(); assert!(def.lookup::(&"wacky.constraint()".into()).is_some()); - assert!(def.lookup::(&"wacky.index()".into()).is_some()); assert!(def.lookup::(&"wacky.sequence()".into()).is_some()); } From 9a7a9ccae5a19a13fa9db2dbf36b9f6d5c04a432 Mon Sep 17 00:00:00 2001 From: Shubham Mishra Date: Fri, 13 Feb 2026 02:52:14 +0530 Subject: [PATCH 024/133] remove from RawIndexDefV10 --- .../lib/autogen/explicit_name_entry_type.ts | 14 +++- .../src/lib/autogen/explicit_names_type.ts | 5 +- .../src/lib/autogen/name_mapping_type.ts | 16 ++++ .../lib/autogen/raw_index_def_v_10_type.ts | 1 - crates/bindings/src/rt.rs | 2 +- crates/lib/src/db/raw_def/v10.rs | 74 ++++++++++--------- crates/lib/src/db/raw_def/v9.rs | 2 +- crates/schema/src/def/validate/v10.rs | 29 ++++---- crates/schema/src/def/validate/v9.rs | 4 +- 9 files changed, 86 insertions(+), 61 deletions(-) create mode 100644 crates/bindings-typescript/src/lib/autogen/name_mapping_type.ts diff --git a/crates/bindings-typescript/src/lib/autogen/explicit_name_entry_type.ts b/crates/bindings-typescript/src/lib/autogen/explicit_name_entry_type.ts index a9b617827a1..78011b298e8 100644 --- a/crates/bindings-typescript/src/lib/autogen/explicit_name_entry_type.ts +++ b/crates/bindings-typescript/src/lib/autogen/explicit_name_entry_type.ts @@ -9,8 +9,16 @@ import { type AlgebraicTypeType as __AlgebraicTypeType, type Infer as __Infer, } from '../../lib/type_builders'; +import NameMapping from './name_mapping_type'; -export default __t.object('ExplicitNameEntry', { - sourceName: __t.string(), - canonicalName: __t.string(), +// The tagged union or sum type for the algebraic type `ExplicitNameEntry`. +const ExplicitNameEntry = __t.enum('ExplicitNameEntry', { + get Table() { + return NameMapping; + }, + get Function() { + return NameMapping; + }, }); + +export default ExplicitNameEntry; diff --git a/crates/bindings-typescript/src/lib/autogen/explicit_names_type.ts b/crates/bindings-typescript/src/lib/autogen/explicit_names_type.ts index 4de3be7e00f..326d17e8b1b 100644 --- a/crates/bindings-typescript/src/lib/autogen/explicit_names_type.ts +++ b/crates/bindings-typescript/src/lib/autogen/explicit_names_type.ts @@ -12,10 +12,7 @@ import { import ExplicitNameEntry from './explicit_name_entry_type'; export default __t.object('ExplicitNames', { - get tables() { - return __t.array(ExplicitNameEntry); - }, - get funcs() { + get entries() { return __t.array(ExplicitNameEntry); }, }); diff --git a/crates/bindings-typescript/src/lib/autogen/name_mapping_type.ts b/crates/bindings-typescript/src/lib/autogen/name_mapping_type.ts new file mode 100644 index 00000000000..cc618f841ec --- /dev/null +++ b/crates/bindings-typescript/src/lib/autogen/name_mapping_type.ts @@ -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. + +/* eslint-disable */ +/* tslint:disable */ +import { + TypeBuilder as __TypeBuilder, + t as __t, + type AlgebraicTypeType as __AlgebraicTypeType, + type Infer as __Infer, +} from '../../lib/type_builders'; + +export default __t.object('NameMapping', { + sourceName: __t.string(), + canonicalName: __t.string(), +}); diff --git a/crates/bindings-typescript/src/lib/autogen/raw_index_def_v_10_type.ts b/crates/bindings-typescript/src/lib/autogen/raw_index_def_v_10_type.ts index fc84594144c..a84d438d956 100644 --- a/crates/bindings-typescript/src/lib/autogen/raw_index_def_v_10_type.ts +++ b/crates/bindings-typescript/src/lib/autogen/raw_index_def_v_10_type.ts @@ -13,7 +13,6 @@ import RawIndexAlgorithm from './raw_index_algorithm_type'; export default __t.object('RawIndexDefV10', { sourceName: __t.option(__t.string()), - name: __t.option(__t.string()), get algorithm() { return RawIndexAlgorithm; }, diff --git a/crates/bindings/src/rt.rs b/crates/bindings/src/rt.rs index 4c300aec27e..9deeb1af00a 100644 --- a/crates/bindings/src/rt.rs +++ b/crates/bindings/src/rt.rs @@ -722,7 +722,7 @@ pub fn register_table() { table = table.with_unique_constraint(col); } for index in T::INDEXES { - table = table.with_index(index.algo.into(), index.accessor_name, Some(index.index_name)); + table = table.with_index(index.algo.into(), index.accessor_name); } if let Some(primary_key) = T::PRIMARY_KEY { table = table.with_primary_key(primary_key); diff --git a/crates/lib/src/db/raw_def/v10.rs b/crates/lib/src/db/raw_def/v10.rs index 7bfbe43e8a3..e7304d9c69c 100644 --- a/crates/lib/src/db/raw_def/v10.rs +++ b/crates/lib/src/db/raw_def/v10.rs @@ -106,16 +106,23 @@ pub enum CaseConversionPolicy { PascalCase, } + #[derive(Debug, Clone, SpacetimeType)] #[sats(crate = crate)] #[cfg_attr(feature = "test", derive(PartialEq, Eq, Ord, PartialOrd))] #[non_exhaustive] -pub struct ExplicitNameEntry { - /// The original name as written in the raw module definition. - source_name: RawIdentifier, +pub struct NameMapping { + pub source_name: RawIdentifier, + pub canonical_name: RawIdentifier, +} - /// The canonical name after applying case conversion. - canonical_name: RawIdentifier, +#[derive(Debug, Clone, SpacetimeType)] +#[sats(crate = crate)] +#[cfg_attr(feature = "test", derive(PartialEq, Eq, Ord, PartialOrd))] +#[non_exhaustive] +pub enum ExplicitNameEntry { + Table(NameMapping), + Function(NameMapping) } #[derive(Debug, Default, Clone, SpacetimeType)] @@ -123,29 +130,44 @@ pub struct ExplicitNameEntry { #[cfg_attr(feature = "test", derive(PartialEq, Eq, Ord, PartialOrd))] #[non_exhaustive] pub struct ExplicitNames { - tables: Vec, - funcs: Vec, + entries: Vec, } impl ExplicitNames { - pub fn insert_table(&mut self, source_name: impl Into, canonical_name: impl Into) { - self.tables.push(ExplicitNameEntry { + fn insert( + &mut self, + entry: ExplicitNameEntry, + ) { + self.entries.push(entry); + } + + pub fn insert_table( + &mut self, + source_name: impl Into, + canonical_name: impl Into, + ) { + self.insert(ExplicitNameEntry::Table(NameMapping { source_name: source_name.into(), canonical_name: canonical_name.into(), - }); + })); } - pub fn insert_function(&mut self, source_name: impl Into, canonical_name: impl Into) { - self.funcs.push(ExplicitNameEntry { + + pub fn insert_function( + &mut self, + source_name: impl Into, + canonical_name: impl Into, + ) { + self.insert(ExplicitNameEntry::Function(NameMapping { source_name: source_name.into(), canonical_name: canonical_name.into(), - }); + })); } pub fn merge(&mut self, other: ExplicitNames) { - self.tables.extend(other.tables); - self.funcs.extend(other.funcs); + self.entries.extend(other.entries); } } + pub type RawRowLevelSecurityDefV10 = crate::db::raw_def::v9::RawRowLevelSecurityDefV9; /// The definition of a database table. @@ -350,15 +372,6 @@ pub struct RawIndexDefV10 { /// Even though there is ABSOLUTELY NO REASON TO. pub source_name: Option, - /// name for the index used internally and in client codegen - /// - /// This is set the user and should not be assumed to follow - /// any particular format. - /// - /// May be set to `None` if this is an auto-generated index for which the user - /// has not supplied a name. - pub name: Option, - /// The algorithm parameters for the index. pub algorithm: RawIndexAlgorithm, } @@ -1128,17 +1141,9 @@ impl RawTableDefBuilderV10<'_> { } /// Generates a [RawIndexDefV10] using the supplied `columns`. - pub fn with_index( - mut self, - algorithm: RawIndexAlgorithm, - accessor_name: impl Into, - index_name: Option>, - ) -> Self { - let accessor_name = accessor_name.into(); - + pub fn with_index(mut self, algorithm: RawIndexAlgorithm, source_name: impl Into) -> Self { self.table.indexes.push(RawIndexDefV10 { - name: index_name.map(Into::into), - source_name: Some(accessor_name), + source_name: Some(source_name.into()), algorithm, }); self @@ -1148,7 +1153,6 @@ impl RawTableDefBuilderV10<'_> { pub fn with_index_no_accessor_name(mut self, algorithm: RawIndexAlgorithm) -> Self { self.table.indexes.push(RawIndexDefV10 { source_name: None, - name: None, algorithm, }); self diff --git a/crates/lib/src/db/raw_def/v9.rs b/crates/lib/src/db/raw_def/v9.rs index 8b5dbd652a9..02abdeded9d 100644 --- a/crates/lib/src/db/raw_def/v9.rs +++ b/crates/lib/src/db/raw_def/v9.rs @@ -1075,8 +1075,8 @@ impl From for RawIndexDefV9 { fn from(raw: RawIndexDefV10) -> Self { RawIndexDefV9 { accessor_name: raw.source_name, - name: raw.name, algorithm: raw.algorithm, + name: None, } } } diff --git a/crates/schema/src/def/validate/v10.rs b/crates/schema/src/def/validate/v10.rs index adfd87bea22..6ef79eb823d 100644 --- a/crates/schema/src/def/validate/v10.rs +++ b/crates/schema/src/def/validate/v10.rs @@ -744,7 +744,6 @@ mod tests { let schedule_at_type = builder.add_type::(); let red_delicious = AlgebraicValue::Sum(SumValue::new(2, ())); - let none = Option::<&str>::None; builder .build_table_with_new_type( @@ -757,10 +756,10 @@ mod tests { ]), true, ) - .with_index(btree([1, 2]), "apples_id", none) - .with_index(direct(2), "Apples_count_direct", none) + .with_index(btree([1, 2]), "apples_id") + .with_index(direct(2), "Apples_count_direct") .with_unique_constraint(2) - .with_index(btree(3), "Apples_type_btree", none) + .with_index(btree(3), "Apples_type_btree") .with_unique_constraint(3) .with_default_column_value(2, AlgebraicValue::U16(37)) .with_default_column_value(3, red_delicious.clone()) @@ -784,8 +783,8 @@ mod tests { .with_unique_constraint(ColId(0)) .with_primary_key(0) .with_access(TableAccess::Private) - .with_index(btree(0), "bananas_count", none) - .with_index(btree([0, 1, 2]), "bananas_count_id_name", none) + .with_index(btree(0), "bananas_count") + .with_index(btree([0, 1, 2]), "bananas_count_id_name") .finish(); let deliveries_product_type = builder @@ -799,7 +798,7 @@ mod tests { true, ) .with_auto_inc_primary_key(2) - .with_index(btree(2), "scheduled_id_index", none) + .with_index(btree(2), "scheduled_id_index") .with_type(TableType::System) .finish(); @@ -1071,7 +1070,7 @@ mod tests { ProductType::from([("b", AlgebraicType::U16), ("a", AlgebraicType::U64)]), false, ) - .with_index(btree([0, 55]), "bananas_a_b", Option::<&str>::None) + .with_index(btree([0, 55]), "bananas_a_b") .finish(); let result: Result = builder.finish().try_into(); @@ -1150,7 +1149,7 @@ mod tests { ProductType::from([("b", AlgebraicType::U16), ("a", AlgebraicType::U64)]), false, ) - .with_index(btree([0, 0]), "bananas_b_b", None::<&str>) + .with_index(btree([0, 0]), "bananas_b_b") .finish(); let result: Result = builder.finish().try_into(); @@ -1232,7 +1231,7 @@ mod tests { ProductType::from([("b", AlgebraicType::U16), ("a", AlgebraicType::U64)]), true, ) - .with_index(hash(0), "bananas_b", None::<&str>) + .with_index(hash(0), "bananas_b") .finish(); let def: ModuleDef = builder.finish().try_into().unwrap(); let indexes = def.indexes().collect::>(); @@ -1270,7 +1269,7 @@ mod tests { ProductType::from([("b", AlgebraicType::I32), ("a", AlgebraicType::U64)]), false, ) - .with_index(direct(0), "bananas_b", None::<&str>) + .with_index(direct(0), "bananas_b") .finish(); let result: Result = builder.finish().try_into(); @@ -1385,7 +1384,7 @@ mod tests { true, ) .with_auto_inc_primary_key(2) - .with_index(btree(2), "scheduled_id_index", None::<&str>) + .with_index(btree(2), "scheduled_id_index") .with_type(TableType::System) .finish(); @@ -1413,7 +1412,7 @@ mod tests { true, ) .with_auto_inc_primary_key(2) - .with_index(direct(2), "scheduled_id_idx", None::<&str>) + .with_index(direct(2), "scheduled_id_idx") .with_type(TableType::System) .finish(); @@ -1446,8 +1445,8 @@ mod tests { true, ) .with_auto_inc_primary_key(2) - .with_index(direct(2), "scheduled_id_index", None::<&str>) - .with_index(btree([0, 2]), "nice_index_name", None::<&str>) + .with_index(direct(2), "scheduled_id_index") + .with_index(btree([0, 2]), "nice_index_name") .with_type(TableType::System) .finish(); diff --git a/crates/schema/src/def/validate/v9.rs b/crates/schema/src/def/validate/v9.rs index 3cb7639bcec..f3d7b9a5b08 100644 --- a/crates/schema/src/def/validate/v9.rs +++ b/crates/schema/src/def/validate/v9.rs @@ -1099,7 +1099,9 @@ impl<'a, 'b> TableValidator<'a, 'b> { RawModuleDefVersion::V9OrEarlier => accessor_name.map(identifier).transpose(), // In V10, `name` is used both for internal purpose and client codefen. - RawModuleDefVersion::V10 => identifier(name.clone()).map(Some), + RawModuleDefVersion::V10 => { + identifier(generate_index_name(&self.raw_name, self.product_type, &algorithm_raw)).map(Some) + } }; let name = self.add_to_global_namespace(name); From db82a7c960f4429f0f1c8f569da4c84cc91197bd Mon Sep 17 00:00:00 2001 From: Shubham Mishra Date: Fri, 13 Feb 2026 03:21:37 +0530 Subject: [PATCH 025/133] use sourceName as accessorName in ts for now --- crates/bindings-typescript/src/lib/schema.ts | 8 +++----- crates/bindings-typescript/src/lib/table.ts | 2 -- crates/bindings-typescript/src/server/runtime.ts | 7 ++++--- 3 files changed, 7 insertions(+), 10 deletions(-) diff --git a/crates/bindings-typescript/src/lib/schema.ts b/crates/bindings-typescript/src/lib/schema.ts index 5800567b994..f169b5b3de6 100644 --- a/crates/bindings-typescript/src/lib/schema.ts +++ b/crates/bindings-typescript/src/lib/schema.ts @@ -100,7 +100,8 @@ function tableToSchema( ? [idx.algorithm.value] : idx.algorithm.value; return { - name: idx.name!, +// use accessor name? + name: idx.sourceName!, unique: tableDef.constraints.some(c => c.data.value.columns.every(col => columnIds.includes(col)) ), @@ -141,10 +142,7 @@ export class ModuleContext { views: [], lifeCycleReducers: [], caseConversionPolicy: { tag: 'SnakeCase' }, - explicitNames: { - tables: [], - funcs: [], - }, + explicitNames: { entries: [] }, }; get moduleDef(): ModuleDef { diff --git a/crates/bindings-typescript/src/lib/table.ts b/crates/bindings-typescript/src/lib/table.ts index febf4700111..14f57c62b85 100644 --- a/crates/bindings-typescript/src/lib/table.ts +++ b/crates/bindings-typescript/src/lib/table.ts @@ -350,7 +350,6 @@ export function table>( } indexes.push({ sourceName: undefined, // Unnamed indexes will be assigned a globally unique name - name, // The name of this column will be used as the accessor name algorithm, }); } @@ -420,7 +419,6 @@ export function table>( // the name and accessor name of an index across all SDKs. indexes.push({ sourceName: undefined, - name: indexOpts.name, algorithm, }); } diff --git a/crates/bindings-typescript/src/server/runtime.ts b/crates/bindings-typescript/src/server/runtime.ts index ccb200550a7..66e0ab8ba99 100644 --- a/crates/bindings-typescript/src/server/runtime.ts +++ b/crates/bindings-typescript/src/server/runtime.ts @@ -783,10 +783,11 @@ function makeTableView( } as RangedIndex; } - if (Object.hasOwn(tableView, indexDef.name!)) { - freeze(Object.assign(tableView[indexDef.name!], index)); + //TODO: use accessor name + if (Object.hasOwn(tableView, indexDef.sourceName!)) { + freeze(Object.assign(tableView[indexDef.sourceName!], index)); } else { - tableView[indexDef.name!] = freeze(index) as any; + tableView[indexDef.sourceName!] = freeze(index) as any; } } From 639ea2127dee30e06ae4c3f5608f3b381fb5882d Mon Sep 17 00:00:00 2001 From: Shubham Mishra Date: Fri, 13 Feb 2026 03:29:12 +0530 Subject: [PATCH 026/133] fmt --- crates/lib/src/db/raw_def/v10.rs | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/crates/lib/src/db/raw_def/v10.rs b/crates/lib/src/db/raw_def/v10.rs index e7304d9c69c..57e8aad711a 100644 --- a/crates/lib/src/db/raw_def/v10.rs +++ b/crates/lib/src/db/raw_def/v10.rs @@ -106,7 +106,6 @@ pub enum CaseConversionPolicy { PascalCase, } - #[derive(Debug, Clone, SpacetimeType)] #[sats(crate = crate)] #[cfg_attr(feature = "test", derive(PartialEq, Eq, Ord, PartialOrd))] @@ -122,7 +121,7 @@ pub struct NameMapping { #[non_exhaustive] pub enum ExplicitNameEntry { Table(NameMapping), - Function(NameMapping) + Function(NameMapping), } #[derive(Debug, Default, Clone, SpacetimeType)] @@ -134,29 +133,18 @@ pub struct ExplicitNames { } impl ExplicitNames { - fn insert( - &mut self, - entry: ExplicitNameEntry, - ) { + fn insert(&mut self, entry: ExplicitNameEntry) { self.entries.push(entry); } - pub fn insert_table( - &mut self, - source_name: impl Into, - canonical_name: impl Into, - ) { + pub fn insert_table(&mut self, source_name: impl Into, canonical_name: impl Into) { self.insert(ExplicitNameEntry::Table(NameMapping { source_name: source_name.into(), canonical_name: canonical_name.into(), })); } - pub fn insert_function( - &mut self, - source_name: impl Into, - canonical_name: impl Into, - ) { + pub fn insert_function(&mut self, source_name: impl Into, canonical_name: impl Into) { self.insert(ExplicitNameEntry::Function(NameMapping { source_name: source_name.into(), canonical_name: canonical_name.into(), From 0644ebff713c9a135203f330ff89c58619006fbf Mon Sep 17 00:00:00 2001 From: Shubham Mishra Date: Fri, 13 Feb 2026 03:33:07 +0530 Subject: [PATCH 027/133] insta tests --- .../codegen/tests/snapshots/codegen__codegen_csharp.snap | 8 ++++---- .../tests/snapshots/codegen__codegen_typescript.snap | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/crates/codegen/tests/snapshots/codegen__codegen_csharp.snap b/crates/codegen/tests/snapshots/codegen__codegen_csharp.snap index 861bad14b78..51667f0a26a 100644 --- a/crates/codegen/tests/snapshots/codegen__codegen_csharp.snap +++ b/crates/codegen/tests/snapshots/codegen__codegen_csharp.snap @@ -1998,14 +1998,14 @@ namespace SpacetimeDB { protected override string RemoteTableName => "person"; - public sealed class AgeIndex : BTreeIndexBase + public sealed class PersonAgeIdxBtreeIndex : BTreeIndexBase { protected override byte GetKey(Person row) => row.Age; - public AgeIndex(PersonHandle table) : base(table) { } + public PersonAgeIdxBtreeIndex(PersonHandle table) : base(table) { } } - public readonly AgeIndex Age; + public readonly PersonAgeIdxBtreeIndex PersonAgeIdxBtree; public sealed class PersonIdIdxBtreeUniqueIndex : UniqueIndexBase { @@ -2018,7 +2018,7 @@ namespace SpacetimeDB internal PersonHandle(DbConnection conn) : base(conn) { - Age = new(this); + PersonAgeIdxBtree = new(this); PersonIdIdxBtree = new(this); } diff --git a/crates/codegen/tests/snapshots/codegen__codegen_typescript.snap b/crates/codegen/tests/snapshots/codegen__codegen_typescript.snap index 9532caa1fa0..528c00b9a67 100644 --- a/crates/codegen/tests/snapshots/codegen__codegen_typescript.snap +++ b/crates/codegen/tests/snapshots/codegen__codegen_typescript.snap @@ -275,7 +275,7 @@ const tablesSchema = __schema( __table({ name: 'person', indexes: [ - { name: 'age', algorithm: 'btree', columns: [ + { name: 'person_age_idx_btree', algorithm: 'btree', columns: [ 'age', ] }, { name: 'person_id_idx_btree', algorithm: 'btree', columns: [ From 4ddf6ac694dd9973e44acc0aa36c31d0a974e437 Mon Sep 17 00:00:00 2001 From: Shubham Mishra Date: Fri, 13 Feb 2026 13:51:39 +0530 Subject: [PATCH 028/133] not modify RawINdeXDefV10 --- crates/bindings-macro/src/table.rs | 3 ++- .../src/lib/autogen/raw_index_def_v_10_type.ts | 1 + crates/bindings-typescript/src/lib/schema.ts | 3 +-- crates/bindings-typescript/src/lib/table.ts | 2 ++ crates/bindings-typescript/src/server/runtime.ts | 7 +++---- crates/bindings/src/rt.rs | 2 +- crates/bindings/src/table.rs | 2 +- crates/lib/src/db/raw_def/v10.rs | 5 +++++ crates/schema/src/def.rs | 2 +- 9 files changed, 17 insertions(+), 10 deletions(-) diff --git a/crates/bindings-macro/src/table.rs b/crates/bindings-macro/src/table.rs index 7ab4ae8689f..163c814566a 100644 --- a/crates/bindings-macro/src/table.rs +++ b/crates/bindings-macro/src/table.rs @@ -453,8 +453,9 @@ impl ValidatedIndex<'_> { let index_name = &self.index_name; // Note: we do not pass the index_name through here. // We trust the schema validation logic to reconstruct the name we've stored in `self.name`. + //TODO(shub): pass generated index name instead of accessor name as source_name quote!(spacetimedb::table::IndexDesc { - accessor_name: #accessor_name, + source_name: #accessor_name, index_name: #index_name, algo: #algo, }) diff --git a/crates/bindings-typescript/src/lib/autogen/raw_index_def_v_10_type.ts b/crates/bindings-typescript/src/lib/autogen/raw_index_def_v_10_type.ts index a84d438d956..2a1913b7ae4 100644 --- a/crates/bindings-typescript/src/lib/autogen/raw_index_def_v_10_type.ts +++ b/crates/bindings-typescript/src/lib/autogen/raw_index_def_v_10_type.ts @@ -13,6 +13,7 @@ import RawIndexAlgorithm from './raw_index_algorithm_type'; export default __t.object('RawIndexDefV10', { sourceName: __t.option(__t.string()), + accessorName: __t.option(__t.string()), get algorithm() { return RawIndexAlgorithm; }, diff --git a/crates/bindings-typescript/src/lib/schema.ts b/crates/bindings-typescript/src/lib/schema.ts index f169b5b3de6..e38e46ac279 100644 --- a/crates/bindings-typescript/src/lib/schema.ts +++ b/crates/bindings-typescript/src/lib/schema.ts @@ -100,8 +100,7 @@ function tableToSchema( ? [idx.algorithm.value] : idx.algorithm.value; return { -// use accessor name? - name: idx.sourceName!, + name: idx.accessorName!, unique: tableDef.constraints.some(c => c.data.value.columns.every(col => columnIds.includes(col)) ), diff --git a/crates/bindings-typescript/src/lib/table.ts b/crates/bindings-typescript/src/lib/table.ts index dda8b63252c..23ce2b61f94 100644 --- a/crates/bindings-typescript/src/lib/table.ts +++ b/crates/bindings-typescript/src/lib/table.ts @@ -350,6 +350,7 @@ export function table>( } indexes.push({ sourceName: undefined, // Unnamed indexes will be assigned a globally unique name + accessorName: name, algorithm, }); } @@ -419,6 +420,7 @@ export function table>( // the name and accessor name of an index across all SDKs. indexes.push({ sourceName: undefined, + accessorName: indexOpts.name, algorithm, }); } diff --git a/crates/bindings-typescript/src/server/runtime.ts b/crates/bindings-typescript/src/server/runtime.ts index 81d4004aba9..d2df7514564 100644 --- a/crates/bindings-typescript/src/server/runtime.ts +++ b/crates/bindings-typescript/src/server/runtime.ts @@ -794,11 +794,10 @@ function makeTableView( } as RangedIndex; } - //TODO: use accessor name - if (Object.hasOwn(tableView, indexDef.sourceName!)) { - freeze(Object.assign(tableView[indexDef.sourceName!], index)); + if (Object.hasOwn(tableView, indexDef.accessorName!)) { + freeze(Object.assign(tableView[indexDef.accessorName!], index)); } else { - tableView[indexDef.sourceName!] = freeze(index) as any; + tableView[indexDef.accessorName!] = freeze(index) as any; } } diff --git a/crates/bindings/src/rt.rs b/crates/bindings/src/rt.rs index 42ebb7c59a9..0710c3a11b3 100644 --- a/crates/bindings/src/rt.rs +++ b/crates/bindings/src/rt.rs @@ -746,7 +746,7 @@ pub fn register_table() { table = table.with_unique_constraint(col); } for index in T::INDEXES { - table = table.with_index(index.algo.into(), index.accessor_name); + table = table.with_index(index.algo.into(), index.source_name); } if let Some(primary_key) = T::PRIMARY_KEY { table = table.with_primary_key(primary_key); diff --git a/crates/bindings/src/table.rs b/crates/bindings/src/table.rs index 8156a7495b7..1676ef2b4bb 100644 --- a/crates/bindings/src/table.rs +++ b/crates/bindings/src/table.rs @@ -138,7 +138,7 @@ pub trait TableInternal: Sized { /// Describe a named index with an index type over a set of columns identified by their IDs. #[derive(Clone, Copy)] pub struct IndexDesc<'a> { - pub accessor_name: &'a str, + pub source_name: &'a str, pub index_name: &'a str, pub algo: IndexAlgo<'a>, } diff --git a/crates/lib/src/db/raw_def/v10.rs b/crates/lib/src/db/raw_def/v10.rs index 80bec9382f2..81622ba8b85 100644 --- a/crates/lib/src/db/raw_def/v10.rs +++ b/crates/lib/src/db/raw_def/v10.rs @@ -367,6 +367,9 @@ pub struct RawIndexDefV10 { /// Even though there is ABSOLUTELY NO REASON TO. pub source_name: Option, + // not to be used in v10 + pub accessor_name: Option, + /// The algorithm parameters for the index. pub algorithm: RawIndexAlgorithm, } @@ -1146,6 +1149,7 @@ impl RawTableDefBuilderV10<'_> { pub fn with_index(mut self, algorithm: RawIndexAlgorithm, source_name: impl Into) -> Self { self.table.indexes.push(RawIndexDefV10 { source_name: Some(source_name.into()), + accessor_name: None, algorithm, }); self @@ -1155,6 +1159,7 @@ impl RawTableDefBuilderV10<'_> { pub fn with_index_no_accessor_name(mut self, algorithm: RawIndexAlgorithm) -> Self { self.table.indexes.push(RawIndexDefV10 { source_name: None, + accessor_name: None, algorithm, }); self diff --git a/crates/schema/src/def.rs b/crates/schema/src/def.rs index e0583332ae9..aa80f6db1ab 100644 --- a/crates/schema/src/def.rs +++ b/crates/schema/src/def.rs @@ -855,7 +855,7 @@ impl From for RawIndexDefV10 { fn from(val: IndexDef) -> Self { RawIndexDefV10 { source_name: Some(val.name), - // accessor_name: val.accessor_name.map(Into::into), + accessor_name: None, algorithm: val.algorithm.into(), } } From 901ee64ccec4620a9bbf1090e9cd868040063661 Mon Sep 17 00:00:00 2001 From: Shubham Mishra Date: Fri, 13 Feb 2026 14:57:30 +0530 Subject: [PATCH 029/133] veiw name to accessor --- crates/bindings/tests/ui/views-more.rs | 2 +- .../00200-core-concepts/00100-databases/00500-cheat-sheet.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/bindings/tests/ui/views-more.rs b/crates/bindings/tests/ui/views-more.rs index 11c71dda579..1175b190377 100644 --- a/crates/bindings/tests/ui/views-more.rs +++ b/crates/bindings/tests/ui/views-more.rs @@ -9,7 +9,7 @@ struct PlayerInfo { age: u8, } /// Comparing incompatible types in `where` condition: u8 != u32 implicitly -#[view(name = view_bad_where_int_types_implicit, public)] +#view(accessor = view_bad_where_int_types_implicit, public)] fn view_bad_where_int_types_implicit(ctx: &ViewContext) -> impl Query { ctx.from.player_info().r#where(|a| a.age.eq(4200)).build() } diff --git a/docs/docs/00200-core-concepts/00100-databases/00500-cheat-sheet.md b/docs/docs/00200-core-concepts/00100-databases/00500-cheat-sheet.md index 7b7eb2fc56b..192b9d4f6d2 100644 --- a/docs/docs/00200-core-concepts/00100-databases/00500-cheat-sheet.md +++ b/docs/docs/00200-core-concepts/00100-databases/00500-cheat-sheet.md @@ -647,7 +647,7 @@ fn top_players(ctx: &ViewContext) -> Vec { // Perform a generic filter using the query builder. // Equivalent to `SELECT * FROM player WHERE score < 1000`. -#[view(name = bottom_players, public)] +#view(accessor = bottom_players, public)] fn bottom_players(ctx: &ViewContext) -> impl Query { ctx.from.player().r#where(|p| p.score.lt(1000)) } From cd95adcc2381a8dd5f2c03fd7c38e37dc18dec26 Mon Sep 17 00:00:00 2001 From: Shubham Mishra Date: Fri, 13 Feb 2026 15:36:21 +0530 Subject: [PATCH 030/133] template bindings --- .../src/sdk/client_api/index.ts | 2 +- .../test-app/src/module_bindings/index.ts | 2 +- crates/bindings/tests/ui/views-more.rs | 2 +- .../00100-databases/00500-cheat-sheet.md | 2 +- .../basic-ts/src/module_bindings/index.ts | 2 +- .../src/module_bindings/index.ts | 8 +- templates/nuxt-ts/module_bindings/index.ts | 17 ++-- .../nuxt-ts/module_bindings/types/index.ts | 11 +++ .../module_bindings/types/procedures.ts | 8 ++ .../nuxt-ts/module_bindings/types/reducers.ts | 17 ++++ templates/nuxt-ts/spacetimedb/pnpm-lock.yaml | 82 +++++++++++++++++++ .../react-ts/src/module_bindings/index.ts | 2 +- .../svelte-ts/src/module_bindings/index.ts | 4 +- templates/vue-ts/src/module_bindings/index.ts | 2 +- 14 files changed, 140 insertions(+), 21 deletions(-) create mode 100644 templates/nuxt-ts/module_bindings/types/index.ts create mode 100644 templates/nuxt-ts/module_bindings/types/procedures.ts create mode 100644 templates/nuxt-ts/module_bindings/types/reducers.ts create mode 100644 templates/nuxt-ts/spacetimedb/pnpm-lock.yaml diff --git a/crates/bindings-typescript/src/sdk/client_api/index.ts b/crates/bindings-typescript/src/sdk/client_api/index.ts index ec5dadb1bb9..673f89b6030 100644 --- a/crates/bindings-typescript/src/sdk/client_api/index.ts +++ b/crates/bindings-typescript/src/sdk/client_api/index.ts @@ -1,7 +1,7 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE // WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. -// This was generated using spacetimedb cli version 2.0.0 (commit 3cd9789684d4edf74728215b4cb63360a37bd979). +// This was generated using spacetimedb cli version 2.0.0 (commit 901ee64ccec4620a9bbf1090e9cd868040063661). /* eslint-disable */ /* tslint:disable */ diff --git a/crates/bindings-typescript/test-app/src/module_bindings/index.ts b/crates/bindings-typescript/test-app/src/module_bindings/index.ts index d889ff6d594..430ed677d7a 100644 --- a/crates/bindings-typescript/test-app/src/module_bindings/index.ts +++ b/crates/bindings-typescript/test-app/src/module_bindings/index.ts @@ -1,7 +1,7 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE // WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. -// This was generated using spacetimedb cli version 2.0.0 (commit af546087db06aa48c43fbd9c7615c35e88e70a9c). +// This was generated using spacetimedb cli version 2.0.0 (commit 901ee64ccec4620a9bbf1090e9cd868040063661). /* eslint-disable */ /* tslint:disable */ diff --git a/crates/bindings/tests/ui/views-more.rs b/crates/bindings/tests/ui/views-more.rs index 1175b190377..bd37b0a2434 100644 --- a/crates/bindings/tests/ui/views-more.rs +++ b/crates/bindings/tests/ui/views-more.rs @@ -9,7 +9,7 @@ struct PlayerInfo { age: u8, } /// Comparing incompatible types in `where` condition: u8 != u32 implicitly -#view(accessor = view_bad_where_int_types_implicit, public)] +#[view(accessor = view_bad_where_int_types_implicit, public)] fn view_bad_where_int_types_implicit(ctx: &ViewContext) -> impl Query { ctx.from.player_info().r#where(|a| a.age.eq(4200)).build() } diff --git a/docs/docs/00200-core-concepts/00100-databases/00500-cheat-sheet.md b/docs/docs/00200-core-concepts/00100-databases/00500-cheat-sheet.md index 192b9d4f6d2..80333384bac 100644 --- a/docs/docs/00200-core-concepts/00100-databases/00500-cheat-sheet.md +++ b/docs/docs/00200-core-concepts/00100-databases/00500-cheat-sheet.md @@ -647,7 +647,7 @@ fn top_players(ctx: &ViewContext) -> Vec { // Perform a generic filter using the query builder. // Equivalent to `SELECT * FROM player WHERE score < 1000`. -#view(accessor = bottom_players, public)] +#[view(accessor = bottom_players, public)] fn bottom_players(ctx: &ViewContext) -> impl Query { ctx.from.player().r#where(|p| p.score.lt(1000)) } diff --git a/templates/basic-ts/src/module_bindings/index.ts b/templates/basic-ts/src/module_bindings/index.ts index 5361570b230..0ca8d4f8886 100644 --- a/templates/basic-ts/src/module_bindings/index.ts +++ b/templates/basic-ts/src/module_bindings/index.ts @@ -1,7 +1,7 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE // WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. -// This was generated using spacetimedb cli version 2.0.0 (commit 4cf57e2fe6ba480834ee0bb2f6aefa4482550164). +// This was generated using spacetimedb cli version 2.0.0 (commit 901ee64ccec4620a9bbf1090e9cd868040063661). /* eslint-disable */ /* tslint:disable */ diff --git a/templates/chat-react-ts/src/module_bindings/index.ts b/templates/chat-react-ts/src/module_bindings/index.ts index afca015b075..460ced69795 100644 --- a/templates/chat-react-ts/src/module_bindings/index.ts +++ b/templates/chat-react-ts/src/module_bindings/index.ts @@ -1,7 +1,7 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE // WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. -// This was generated using spacetimedb cli version 2.0.0 (commit af546087db06aa48c43fbd9c7615c35e88e70a9c). +// This was generated using spacetimedb cli version 2.0.0 (commit 901ee64ccec4620a9bbf1090e9cd868040063661). /* eslint-disable */ /* tslint:disable */ @@ -59,7 +59,11 @@ const tablesSchema = __schema({ { name: 'user', indexes: [ - { name: 'identity', algorithm: 'btree', columns: ['identity'] }, + { + name: 'user_identity_idx_btree', + algorithm: 'btree', + columns: ['identity'], + }, ], constraints: [ { diff --git a/templates/nuxt-ts/module_bindings/index.ts b/templates/nuxt-ts/module_bindings/index.ts index 412d5bbc08d..8751d04a776 100644 --- a/templates/nuxt-ts/module_bindings/index.ts +++ b/templates/nuxt-ts/module_bindings/index.ts @@ -1,7 +1,7 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE // WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. -// This was generated using spacetimedb cli version 2.0.0 (commit 3cd9789684d4edf74728215b4cb63360a37bd979). +// This was generated using spacetimedb cli version 2.0.0 (commit 901ee64ccec4620a9bbf1090e9cd868040063661). /* eslint-disable */ /* tslint:disable */ @@ -45,16 +45,16 @@ import PersonRow from './person_table'; /** Type-only namespace exports for generated type groups. */ /** The schema information for all tables in this module. This is defined the same was as the tables would have been defined in the server. */ -const tablesSchema = __schema( - __table( +const tablesSchema = __schema({ + person: __table( { name: 'person', indexes: [], constraints: [], }, PersonRow - ) -); + ), +}); /** The schema information for all reducers in this module. This is defined the same way as the reducers would have been defined in the server, except the body of the reducer is omitted in code generation. */ const reducersSchema = __reducers( @@ -79,11 +79,8 @@ const REMOTE_MODULE = { typeof proceduresSchema >; -/** The tables available in this remote SpacetimeDB module. */ -export const tables = __convertToAccessorMap(tablesSchema.schemaType.tables); - -/** A typed query builder for this remote SpacetimeDB module. */ -export const query: __QueryBuilder = +/** The tables available in this remote SpacetimeDB module. Each table reference doubles as a query builder. */ +export const tables: __QueryBuilder = __makeQueryBuilder(tablesSchema.schemaType); /** The reducers available in this remote SpacetimeDB module. */ diff --git a/templates/nuxt-ts/module_bindings/types/index.ts b/templates/nuxt-ts/module_bindings/types/index.ts new file mode 100644 index 00000000000..06296d8bf15 --- /dev/null +++ b/templates/nuxt-ts/module_bindings/types/index.ts @@ -0,0 +1,11 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +/* eslint-disable */ +/* tslint:disable */ +import { type Infer as __Infer } from 'spacetimedb'; + +// Import all non-reducer types +import Person from '../person_type'; + +export type Person = __Infer; diff --git a/templates/nuxt-ts/module_bindings/types/procedures.ts b/templates/nuxt-ts/module_bindings/types/procedures.ts new file mode 100644 index 00000000000..b2102264f4d --- /dev/null +++ b/templates/nuxt-ts/module_bindings/types/procedures.ts @@ -0,0 +1,8 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +/* eslint-disable */ +/* tslint:disable */ +import { type Infer as __Infer } from 'spacetimedb'; + +// Import all procedure arg schemas diff --git a/templates/nuxt-ts/module_bindings/types/reducers.ts b/templates/nuxt-ts/module_bindings/types/reducers.ts new file mode 100644 index 00000000000..de9884fd999 --- /dev/null +++ b/templates/nuxt-ts/module_bindings/types/reducers.ts @@ -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. + +/* eslint-disable */ +/* tslint:disable */ +import { type Infer as __Infer } from 'spacetimedb'; + +// Import all reducer arg schemas +import OnConnectReducer from '../on_connect_reducer'; +import OnDisconnectReducer from '../on_disconnect_reducer'; +import AddReducer from '../add_reducer'; +import SayHelloReducer from '../say_hello_reducer'; + +export type OnConnectParams = __Infer; +export type OnDisconnectParams = __Infer; +export type AddParams = __Infer; +export type SayHelloParams = __Infer; diff --git a/templates/nuxt-ts/spacetimedb/pnpm-lock.yaml b/templates/nuxt-ts/spacetimedb/pnpm-lock.yaml new file mode 100644 index 00000000000..f5881f7ed66 --- /dev/null +++ b/templates/nuxt-ts/spacetimedb/pnpm-lock.yaml @@ -0,0 +1,82 @@ +lockfileVersion: '9.0' + +settings: + autoInstallPeers: true + excludeLinksFromLockfile: false + +importers: + + .: + dependencies: + spacetimedb: + specifier: 1.* + version: 1.12.0 + +packages: + + base64-js@1.5.1: + resolution: {integrity: sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==} + + fast-text-encoding@1.0.6: + resolution: {integrity: sha512-VhXlQgj9ioXCqGstD37E/HBeqEGV/qOD/kmbVG8h5xKBYvM1L3lR1Zn4555cQ8GkYbJa8aJSipLPndE1k6zK2w==} + + headers-polyfill@4.0.3: + resolution: {integrity: sha512-IScLbePpkvO846sIwOtOTDjutRMWdXdJmXdMvk6gCBHxFO8d+QKOQedyZSxFTTFYRSmlgSTDtXqqq4pcenBXLQ==} + + prettier@3.8.1: + resolution: {integrity: sha512-UOnG6LftzbdaHZcKoPFtOcCKztrQ57WkHDeRD9t/PTQtmT0NHSeWWepj6pS0z/N7+08BHFDQVUrfmfMRcZwbMg==} + engines: {node: '>=14'} + hasBin: true + + pure-rand@7.0.1: + resolution: {integrity: sha512-oTUZM/NAZS8p7ANR3SHh30kXB+zK2r2BPcEn/awJIbOvq82WoMN4p62AWWp3Hhw50G0xMsw1mhIBLqHw64EcNQ==} + + spacetimedb@1.12.0: + resolution: {integrity: sha512-I0pK7Ra6jIrfgqQO2K+W1GBC4m7ICWzUp6pvhz1/3ozE19xlLerQOXkJtsfuwjRZHEKBmBl18EX01FaJBVdPyg==} + peerDependencies: + react: ^18.0.0 || ^19.0.0-0 || ^19.0.0 + svelte: ^4.0.0 || ^5.0.0 + undici: ^6.19.2 + vue: ^3.3.0 + peerDependenciesMeta: + react: + optional: true + svelte: + optional: true + undici: + optional: true + vue: + optional: true + + statuses@2.0.2: + resolution: {integrity: sha512-DvEy55V3DB7uknRo+4iOGT5fP1slR8wQohVdknigZPMpMstaKJQWhwiYBACJE3Ul2pTnATihhBYnRhZQHGBiRw==} + engines: {node: '>= 0.8'} + + url-polyfill@1.1.14: + resolution: {integrity: sha512-p4f3TTAG6ADVF3mwbXw7hGw+QJyw5CnNGvYh5fCuQQZIiuKUswqcznyV3pGDP9j0TSmC4UvRKm8kl1QsX1diiQ==} + +snapshots: + + base64-js@1.5.1: {} + + fast-text-encoding@1.0.6: {} + + headers-polyfill@4.0.3: {} + + prettier@3.8.1: {} + + pure-rand@7.0.1: {} + + spacetimedb@1.12.0: + dependencies: + base64-js: 1.5.1 + fast-text-encoding: 1.0.6 + headers-polyfill: 4.0.3 + prettier: 3.8.1 + pure-rand: 7.0.1 + statuses: 2.0.2 + url-polyfill: 1.1.14 + + statuses@2.0.2: {} + + url-polyfill@1.1.14: {} diff --git a/templates/react-ts/src/module_bindings/index.ts b/templates/react-ts/src/module_bindings/index.ts index 7b098247c45..8751d04a776 100644 --- a/templates/react-ts/src/module_bindings/index.ts +++ b/templates/react-ts/src/module_bindings/index.ts @@ -1,7 +1,7 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE // WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. -// This was generated using spacetimedb cli version 2.0.0 (commit 4cf57e2fe6ba480834ee0bb2f6aefa4482550164). +// This was generated using spacetimedb cli version 2.0.0 (commit 901ee64ccec4620a9bbf1090e9cd868040063661). /* eslint-disable */ /* tslint:disable */ diff --git a/templates/svelte-ts/src/module_bindings/index.ts b/templates/svelte-ts/src/module_bindings/index.ts index 950612c8707..0ca8d4f8886 100644 --- a/templates/svelte-ts/src/module_bindings/index.ts +++ b/templates/svelte-ts/src/module_bindings/index.ts @@ -1,7 +1,7 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE // WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. -// This was generated using spacetimedb cli version 2.0.0 (commit 3cd9789684d4edf74728215b4cb63360a37bd979). +// This was generated using spacetimedb cli version 2.0.0 (commit 901ee64ccec4620a9bbf1090e9cd868040063661). /* eslint-disable */ /* tslint:disable */ @@ -44,7 +44,7 @@ import SayHelloReducer from './say_hello_reducer'; /** Type-only namespace exports for generated type groups. */ /** The schema information for all tables in this module. This is defined the same was as the tables would have been defined in the server. */ -const tablesSchema = __schema(); +const tablesSchema = __schema({}); /** The schema information for all reducers in this module. This is defined the same way as the reducers would have been defined in the server, except the body of the reducer is omitted in code generation. */ const reducersSchema = __reducers( diff --git a/templates/vue-ts/src/module_bindings/index.ts b/templates/vue-ts/src/module_bindings/index.ts index 4b789ed0680..8751d04a776 100644 --- a/templates/vue-ts/src/module_bindings/index.ts +++ b/templates/vue-ts/src/module_bindings/index.ts @@ -1,7 +1,7 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE // WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. -// This was generated using spacetimedb cli version 2.0.0 (commit 3cd9789684d4edf74728215b4cb63360a37bd979). +// This was generated using spacetimedb cli version 2.0.0 (commit 901ee64ccec4620a9bbf1090e9cd868040063661). /* eslint-disable */ /* tslint:disable */ From a2cd7a2a5ac27d73291836dec9039931b8b75216 Mon Sep 17 00:00:00 2001 From: Shubham Mishra Date: Fri, 13 Feb 2026 16:47:07 +0530 Subject: [PATCH 031/133] fix index accessor --- crates/bindings-macro/src/table.rs | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/crates/bindings-macro/src/table.rs b/crates/bindings-macro/src/table.rs index 163c814566a..761b2271e9e 100644 --- a/crates/bindings-macro/src/table.rs +++ b/crates/bindings-macro/src/table.rs @@ -48,13 +48,14 @@ struct ScheduledArg { struct IndexArg { accessor: Ident, - name: Option, + //TODO: add canonical name + // name: Option, is_unique: bool, kind: IndexType, } impl IndexArg { - fn new(accessor: Ident, kind: IndexType, name: Option) -> Self { + fn new(accessor: Ident, kind: IndexType) -> Self { // We don't know if its unique yet. // We'll discover this once we have collected constraints. let is_unique = false; @@ -62,7 +63,7 @@ impl IndexArg { accessor, is_unique, kind, - name, + // name, } } } @@ -168,7 +169,7 @@ impl ScheduledArg { impl IndexArg { fn parse_meta(meta: ParseNestedMeta) -> syn::Result { let mut accessor = None; - let mut name = None; + let mut _name = None; let mut algo = None; meta.parse_nested_meta(|meta| { @@ -178,9 +179,9 @@ impl IndexArg { accessor = Some(meta.value()?.parse()?); } sym::name => { - check_duplicate(&name, &meta)?; + check_duplicate(&_name, &meta)?; let litstr: LitStr = meta.value()?.parse()?; - name = Some(litstr); + _name = Some(litstr); } sym::btree => { check_duplicate_msg(&algo, &meta, "index algorithm specified twice")?; @@ -205,7 +206,7 @@ impl IndexArg { ) })?; - Ok(IndexArg::new(accessor, kind, name)) + Ok(IndexArg::new(accessor, kind)) } fn parse_columns(meta: &ParseNestedMeta) -> syn::Result>> { @@ -266,7 +267,7 @@ impl IndexArg { fn parse_index_attr(field: &Ident, attr: &syn::Attribute) -> syn::Result { let mut kind = None; let mut accessor: Option = None; - let mut name: Option = None; + let mut _name: Option = None; attr.parse_nested_meta(|meta| { match_meta!(match meta { sym::btree => { @@ -290,8 +291,8 @@ impl IndexArg { accessor = Some(meta.value()?.parse()?); } sym::name => { - check_duplicate(&name, &meta)?; - name = Some(meta.value()?.parse()?); + check_duplicate(&_name, &meta)?; + _name = Some(meta.value()?.parse()?); } }); Ok(()) @@ -301,7 +302,7 @@ impl IndexArg { // Default accessor = field name if not provided let accessor = accessor.unwrap_or_else(|| field.clone()); - Ok(IndexArg::new(accessor, kind, name)) + Ok(IndexArg::new(accessor, kind)) } fn validate<'a>(&'a self, table_name: &str, cols: &'a [Column<'a>]) -> syn::Result> { @@ -342,7 +343,7 @@ impl IndexArg { is_unique: self.is_unique, // This must be the canonical name (name used internally in database), // as it is used in `index_id_from_name` abi. - index_name: self.name.as_ref().map(|s| s.value()).unwrap_or_else(gen_index_name), + index_name: gen_index_name(), accessor_name: &self.accessor, kind, }) @@ -849,7 +850,7 @@ pub(crate) fn table_impl(mut args: TableArgs, item: &syn::DeriveInput) -> syn::R let columns = vec![accessor.clone()]; args.indices.push(IndexArg { accessor, - name: None, + //name: None, is_unique: true, kind: IndexType::BTree { columns }, }) From 24fbf54467defa277c7b8641d0db552680a0297d Mon Sep 17 00:00:00 2001 From: Shubham Mishra Date: Fri, 13 Feb 2026 16:53:54 +0530 Subject: [PATCH 032/133] doc update --- docs/docs/00100-intro/00300-tutorials/00100-chat-app.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docs/00100-intro/00300-tutorials/00100-chat-app.md b/docs/docs/00100-intro/00300-tutorials/00100-chat-app.md index e0830736e55..1e94311a026 100644 --- a/docs/docs/00100-intro/00300-tutorials/00100-chat-app.md +++ b/docs/docs/00100-intro/00300-tutorials/00100-chat-app.md @@ -1960,7 +1960,7 @@ void Message_OnInsert(EventContext ctx, Message insertedValue) void PrintMessage(RemoteTables tables, Message message) { - var sender = tables.User.Identity.Find(message.Sender); + var sender = tables.User.UserIdentityIdxBtree.Find(message.Sender); var senderName = "unknown"; if (sender != null) { From dbefb0dc2d3f327e9fb0afe8b4728b682de1d251 Mon Sep 17 00:00:00 2001 From: Shubham Mishra Date: Fri, 13 Feb 2026 17:51:22 +0530 Subject: [PATCH 033/133] csharp autogen --- .../Autogen/CaseConversionPolicy.g.cs | 18 ++++++++++ .../Internal/Autogen/ExplicitNameEntry.g.cs | 15 ++++++++ .../Internal/Autogen/ExplicitNames.g.cs | 29 +++++++++++++++ .../Runtime/Internal/Autogen/NameMapping.g.cs | 36 +++++++++++++++++++ .../Autogen/RawModuleDefV10Section.g.cs | 4 ++- 5 files changed, 101 insertions(+), 1 deletion(-) create mode 100644 crates/bindings-csharp/Runtime/Internal/Autogen/CaseConversionPolicy.g.cs create mode 100644 crates/bindings-csharp/Runtime/Internal/Autogen/ExplicitNameEntry.g.cs create mode 100644 crates/bindings-csharp/Runtime/Internal/Autogen/ExplicitNames.g.cs create mode 100644 crates/bindings-csharp/Runtime/Internal/Autogen/NameMapping.g.cs diff --git a/crates/bindings-csharp/Runtime/Internal/Autogen/CaseConversionPolicy.g.cs b/crates/bindings-csharp/Runtime/Internal/Autogen/CaseConversionPolicy.g.cs new file mode 100644 index 00000000000..c802d063a83 --- /dev/null +++ b/crates/bindings-csharp/Runtime/Internal/Autogen/CaseConversionPolicy.g.cs @@ -0,0 +1,18 @@ +// 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 CaseConversionPolicy + { + None, + SnakeCase, + CamelCase, + PascalCase, + } +} diff --git a/crates/bindings-csharp/Runtime/Internal/Autogen/ExplicitNameEntry.g.cs b/crates/bindings-csharp/Runtime/Internal/Autogen/ExplicitNameEntry.g.cs new file mode 100644 index 00000000000..161d6d1bbdc --- /dev/null +++ b/crates/bindings-csharp/Runtime/Internal/Autogen/ExplicitNameEntry.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 ExplicitNameEntry : SpacetimeDB.TaggedEnum<( + NameMapping Table, + NameMapping Function + )>; +} diff --git a/crates/bindings-csharp/Runtime/Internal/Autogen/ExplicitNames.g.cs b/crates/bindings-csharp/Runtime/Internal/Autogen/ExplicitNames.g.cs new file mode 100644 index 00000000000..941e1c1b0ed --- /dev/null +++ b/crates/bindings-csharp/Runtime/Internal/Autogen/ExplicitNames.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 ExplicitNames + { + [DataMember(Name = "entries")] + public System.Collections.Generic.List Entries; + + public ExplicitNames(System.Collections.Generic.List Entries) + { + this.Entries = Entries; + } + + public ExplicitNames() + { + this.Entries = new(); + } + } +} diff --git a/crates/bindings-csharp/Runtime/Internal/Autogen/NameMapping.g.cs b/crates/bindings-csharp/Runtime/Internal/Autogen/NameMapping.g.cs new file mode 100644 index 00000000000..c06ba215f87 --- /dev/null +++ b/crates/bindings-csharp/Runtime/Internal/Autogen/NameMapping.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 NameMapping + { + [DataMember(Name = "source_name")] + public string SourceName; + [DataMember(Name = "canonical_name")] + public string CanonicalName; + + public NameMapping( + string SourceName, + string CanonicalName + ) + { + this.SourceName = SourceName; + this.CanonicalName = CanonicalName; + } + + public NameMapping() + { + this.SourceName = ""; + this.CanonicalName = ""; + } + } +} diff --git a/crates/bindings-csharp/Runtime/Internal/Autogen/RawModuleDefV10Section.g.cs b/crates/bindings-csharp/Runtime/Internal/Autogen/RawModuleDefV10Section.g.cs index 7df8b83d3ac..8f11f93b3f8 100644 --- a/crates/bindings-csharp/Runtime/Internal/Autogen/RawModuleDefV10Section.g.cs +++ b/crates/bindings-csharp/Runtime/Internal/Autogen/RawModuleDefV10Section.g.cs @@ -17,6 +17,8 @@ public partial record RawModuleDefV10Section : SpacetimeDB.TaggedEnum<( System.Collections.Generic.List Views, System.Collections.Generic.List Schedules, System.Collections.Generic.List LifeCycleReducers, - System.Collections.Generic.List RowLevelSecurity + System.Collections.Generic.List RowLevelSecurity, + CaseConversionPolicy CaseConversionPolicy, + ExplicitNames ExplicitNames )>; } From 3eaca93dc39411bfbf3d7fafd68595928a6deb72 Mon Sep 17 00:00:00 2001 From: Shubham Mishra Date: Fri, 13 Feb 2026 18:02:43 +0530 Subject: [PATCH 034/133] autogen chsharp --- .../Scripts/autogen/SpacetimeDBClient.g.cs | 2 +- .../Assets/Scripts/autogen/Tables/Circle.g.cs | 16 +++++------ .../Assets/Scripts/autogen/Tables/Config.g.cs | 8 +++--- .../Assets/Scripts/autogen/Tables/Entity.g.cs | 8 +++--- .../Assets/Scripts/autogen/Tables/Food.g.cs | 8 +++--- .../Assets/Scripts/autogen/Tables/Player.g.cs | 16 +++++------ .../ModuleBindings/Tables/CircleTable.g.cpp | 12 ++++---- .../ModuleBindings/Tables/ConfigTable.g.cpp | 4 +-- .../ModuleBindings/Tables/EntityTable.g.cpp | 4 +-- .../ModuleBindings/Tables/FoodTable.g.cpp | 4 +-- .../ModuleBindings/Tables/PlayerTable.g.cpp | 8 +++--- .../ModuleBindings/SpacetimeDBClient.g.h | 2 +- .../ModuleBindings/Tables/CircleTable.g.h | 20 ++++++------- .../ModuleBindings/Tables/ConfigTable.g.h | 14 +++++----- .../ModuleBindings/Tables/EntityTable.g.h | 14 +++++----- .../ModuleBindings/Tables/FoodTable.g.h | 14 +++++----- .../ModuleBindings/Tables/PlayerTable.g.h | 28 +++++++++---------- 17 files changed, 91 insertions(+), 91 deletions(-) diff --git a/demo/Blackholio/client-unity/Assets/Scripts/autogen/SpacetimeDBClient.g.cs b/demo/Blackholio/client-unity/Assets/Scripts/autogen/SpacetimeDBClient.g.cs index 6b1cfd64465..ccc5435d87b 100644 --- a/demo/Blackholio/client-unity/Assets/Scripts/autogen/SpacetimeDBClient.g.cs +++ b/demo/Blackholio/client-unity/Assets/Scripts/autogen/SpacetimeDBClient.g.cs @@ -1,7 +1,7 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE // WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. -// This was generated using spacetimedb cli version 1.12.0 (commit 5da121d888d60ce178c202e54816252d2e4d4451). +// This was generated using spacetimedb cli version 2.0.0 (commit 2cdc0794b2e8a6d36df242bcce9ee83909349891). #nullable enable diff --git a/demo/Blackholio/client-unity/Assets/Scripts/autogen/Tables/Circle.g.cs b/demo/Blackholio/client-unity/Assets/Scripts/autogen/Tables/Circle.g.cs index 8ae958b6c7a..adec597e502 100644 --- a/demo/Blackholio/client-unity/Assets/Scripts/autogen/Tables/Circle.g.cs +++ b/demo/Blackholio/client-unity/Assets/Scripts/autogen/Tables/Circle.g.cs @@ -17,28 +17,28 @@ public sealed class CircleHandle : RemoteTableHandle { protected override string RemoteTableName => "circle"; - public sealed class EntityIdUniqueIndex : UniqueIndexBase + public sealed class CircleEntityIdIdxBtreeUniqueIndex : UniqueIndexBase { protected override int GetKey(Circle row) => row.EntityId; - public EntityIdUniqueIndex(CircleHandle table) : base(table) { } + public CircleEntityIdIdxBtreeUniqueIndex(CircleHandle table) : base(table) { } } - public readonly EntityIdUniqueIndex EntityId; + public readonly CircleEntityIdIdxBtreeUniqueIndex CircleEntityIdIdxBtree; - public sealed class PlayerIdIndex : BTreeIndexBase + public sealed class CirclePlayerIdIdxBtreeIndex : BTreeIndexBase { protected override int GetKey(Circle row) => row.PlayerId; - public PlayerIdIndex(CircleHandle table) : base(table) { } + public CirclePlayerIdIdxBtreeIndex(CircleHandle table) : base(table) { } } - public readonly PlayerIdIndex PlayerId; + public readonly CirclePlayerIdIdxBtreeIndex CirclePlayerIdIdxBtree; internal CircleHandle(DbConnection conn) : base(conn) { - EntityId = new(this); - PlayerId = new(this); + CircleEntityIdIdxBtree = new(this); + CirclePlayerIdIdxBtree = new(this); } protected override object GetPrimaryKey(Circle row) => row.EntityId; diff --git a/demo/Blackholio/client-unity/Assets/Scripts/autogen/Tables/Config.g.cs b/demo/Blackholio/client-unity/Assets/Scripts/autogen/Tables/Config.g.cs index d6340962dee..d832af49343 100644 --- a/demo/Blackholio/client-unity/Assets/Scripts/autogen/Tables/Config.g.cs +++ b/demo/Blackholio/client-unity/Assets/Scripts/autogen/Tables/Config.g.cs @@ -17,18 +17,18 @@ public sealed class ConfigHandle : RemoteTableHandle { protected override string RemoteTableName => "config"; - public sealed class IdUniqueIndex : UniqueIndexBase + public sealed class ConfigIdIdxBtreeUniqueIndex : UniqueIndexBase { protected override int GetKey(Config row) => row.Id; - public IdUniqueIndex(ConfigHandle table) : base(table) { } + public ConfigIdIdxBtreeUniqueIndex(ConfigHandle table) : base(table) { } } - public readonly IdUniqueIndex Id; + public readonly ConfigIdIdxBtreeUniqueIndex ConfigIdIdxBtree; internal ConfigHandle(DbConnection conn) : base(conn) { - Id = new(this); + ConfigIdIdxBtree = new(this); } protected override object GetPrimaryKey(Config row) => row.Id; diff --git a/demo/Blackholio/client-unity/Assets/Scripts/autogen/Tables/Entity.g.cs b/demo/Blackholio/client-unity/Assets/Scripts/autogen/Tables/Entity.g.cs index e15bec6af06..43e0b9215d7 100644 --- a/demo/Blackholio/client-unity/Assets/Scripts/autogen/Tables/Entity.g.cs +++ b/demo/Blackholio/client-unity/Assets/Scripts/autogen/Tables/Entity.g.cs @@ -17,18 +17,18 @@ public sealed class EntityHandle : RemoteTableHandle { protected override string RemoteTableName => "entity"; - public sealed class EntityIdUniqueIndex : UniqueIndexBase + public sealed class EntityEntityIdIdxBtreeUniqueIndex : UniqueIndexBase { protected override int GetKey(Entity row) => row.EntityId; - public EntityIdUniqueIndex(EntityHandle table) : base(table) { } + public EntityEntityIdIdxBtreeUniqueIndex(EntityHandle table) : base(table) { } } - public readonly EntityIdUniqueIndex EntityId; + public readonly EntityEntityIdIdxBtreeUniqueIndex EntityEntityIdIdxBtree; internal EntityHandle(DbConnection conn) : base(conn) { - EntityId = new(this); + EntityEntityIdIdxBtree = new(this); } protected override object GetPrimaryKey(Entity row) => row.EntityId; diff --git a/demo/Blackholio/client-unity/Assets/Scripts/autogen/Tables/Food.g.cs b/demo/Blackholio/client-unity/Assets/Scripts/autogen/Tables/Food.g.cs index 7b62f84d523..1a1883b1c2f 100644 --- a/demo/Blackholio/client-unity/Assets/Scripts/autogen/Tables/Food.g.cs +++ b/demo/Blackholio/client-unity/Assets/Scripts/autogen/Tables/Food.g.cs @@ -17,18 +17,18 @@ public sealed class FoodHandle : RemoteTableHandle { protected override string RemoteTableName => "food"; - public sealed class EntityIdUniqueIndex : UniqueIndexBase + public sealed class FoodEntityIdIdxBtreeUniqueIndex : UniqueIndexBase { protected override int GetKey(Food row) => row.EntityId; - public EntityIdUniqueIndex(FoodHandle table) : base(table) { } + public FoodEntityIdIdxBtreeUniqueIndex(FoodHandle table) : base(table) { } } - public readonly EntityIdUniqueIndex EntityId; + public readonly FoodEntityIdIdxBtreeUniqueIndex FoodEntityIdIdxBtree; internal FoodHandle(DbConnection conn) : base(conn) { - EntityId = new(this); + FoodEntityIdIdxBtree = new(this); } protected override object GetPrimaryKey(Food row) => row.EntityId; diff --git a/demo/Blackholio/client-unity/Assets/Scripts/autogen/Tables/Player.g.cs b/demo/Blackholio/client-unity/Assets/Scripts/autogen/Tables/Player.g.cs index 9250cf376e0..0c3082d45f1 100644 --- a/demo/Blackholio/client-unity/Assets/Scripts/autogen/Tables/Player.g.cs +++ b/demo/Blackholio/client-unity/Assets/Scripts/autogen/Tables/Player.g.cs @@ -17,28 +17,28 @@ public sealed class PlayerHandle : RemoteTableHandle { protected override string RemoteTableName => "player"; - public sealed class IdentityUniqueIndex : UniqueIndexBase + public sealed class PlayerIdentityIdxBtreeUniqueIndex : UniqueIndexBase { protected override SpacetimeDB.Identity GetKey(Player row) => row.Identity; - public IdentityUniqueIndex(PlayerHandle table) : base(table) { } + public PlayerIdentityIdxBtreeUniqueIndex(PlayerHandle table) : base(table) { } } - public readonly IdentityUniqueIndex Identity; + public readonly PlayerIdentityIdxBtreeUniqueIndex PlayerIdentityIdxBtree; - public sealed class PlayerIdUniqueIndex : UniqueIndexBase + public sealed class PlayerPlayerIdIdxBtreeUniqueIndex : UniqueIndexBase { protected override int GetKey(Player row) => row.PlayerId; - public PlayerIdUniqueIndex(PlayerHandle table) : base(table) { } + public PlayerPlayerIdIdxBtreeUniqueIndex(PlayerHandle table) : base(table) { } } - public readonly PlayerIdUniqueIndex PlayerId; + public readonly PlayerPlayerIdIdxBtreeUniqueIndex PlayerPlayerIdIdxBtree; internal PlayerHandle(DbConnection conn) : base(conn) { - Identity = new(this); - PlayerId = new(this); + PlayerIdentityIdxBtree = new(this); + PlayerPlayerIdIdxBtree = new(this); } protected override object GetPrimaryKey(Player row) => row.Identity; diff --git a/demo/Blackholio/client-unreal/Source/client_unreal/Private/ModuleBindings/Tables/CircleTable.g.cpp b/demo/Blackholio/client-unreal/Source/client_unreal/Private/ModuleBindings/Tables/CircleTable.g.cpp index 198f20ae88f..0cf80413ea4 100644 --- a/demo/Blackholio/client-unreal/Source/client_unreal/Private/ModuleBindings/Tables/CircleTable.g.cpp +++ b/demo/Blackholio/client-unreal/Source/client_unreal/Private/ModuleBindings/Tables/CircleTable.g.cpp @@ -16,12 +16,12 @@ void UCircleTable::PostInitialize() CircleTable->AddUniqueConstraint("entity_id", [](const FCircleType& Row) -> const int32& { return Row.EntityId; }); - EntityId = NewObject(this); - EntityId->SetCache(CircleTable); + CircleEntityIdIdxBtree = NewObject(this); + CircleEntityIdIdxBtree->SetCache(CircleTable); - // Register a new multi-key B-Tree index named "player_id" on the CircleTable. + // Register a new multi-key B-Tree index named "circle_player_id_idx_btree" on the CircleTable. CircleTable->AddMultiKeyBTreeIndex>( - TEXT("player_id"), + TEXT("circle_player_id_idx_btree"), [](const FCircleType& Row) { // This tuple is stored in the B-Tree index for fast composite key lookups. @@ -29,8 +29,8 @@ void UCircleTable::PostInitialize() } ); - PlayerId = NewObject(this); - PlayerId->SetCache(CircleTable); + CirclePlayerIdIdxBtree = NewObject(this); + CirclePlayerIdIdxBtree->SetCache(CircleTable); /***/ } diff --git a/demo/Blackholio/client-unreal/Source/client_unreal/Private/ModuleBindings/Tables/ConfigTable.g.cpp b/demo/Blackholio/client-unreal/Source/client_unreal/Private/ModuleBindings/Tables/ConfigTable.g.cpp index d6523596f27..0af137cead7 100644 --- a/demo/Blackholio/client-unreal/Source/client_unreal/Private/ModuleBindings/Tables/ConfigTable.g.cpp +++ b/demo/Blackholio/client-unreal/Source/client_unreal/Private/ModuleBindings/Tables/ConfigTable.g.cpp @@ -16,8 +16,8 @@ void UConfigTable::PostInitialize() ConfigTable->AddUniqueConstraint("id", [](const FConfigType& Row) -> const int32& { return Row.Id; }); - Id = NewObject(this); - Id->SetCache(ConfigTable); + ConfigIdIdxBtree = NewObject(this); + ConfigIdIdxBtree->SetCache(ConfigTable); /***/ } diff --git a/demo/Blackholio/client-unreal/Source/client_unreal/Private/ModuleBindings/Tables/EntityTable.g.cpp b/demo/Blackholio/client-unreal/Source/client_unreal/Private/ModuleBindings/Tables/EntityTable.g.cpp index 33aa332bbf9..e5e172e803e 100644 --- a/demo/Blackholio/client-unreal/Source/client_unreal/Private/ModuleBindings/Tables/EntityTable.g.cpp +++ b/demo/Blackholio/client-unreal/Source/client_unreal/Private/ModuleBindings/Tables/EntityTable.g.cpp @@ -16,8 +16,8 @@ void UEntityTable::PostInitialize() EntityTable->AddUniqueConstraint("entity_id", [](const FEntityType& Row) -> const int32& { return Row.EntityId; }); - EntityId = NewObject(this); - EntityId->SetCache(EntityTable); + EntityEntityIdIdxBtree = NewObject(this); + EntityEntityIdIdxBtree->SetCache(EntityTable); /***/ } diff --git a/demo/Blackholio/client-unreal/Source/client_unreal/Private/ModuleBindings/Tables/FoodTable.g.cpp b/demo/Blackholio/client-unreal/Source/client_unreal/Private/ModuleBindings/Tables/FoodTable.g.cpp index 313969e8b47..8164480f1a1 100644 --- a/demo/Blackholio/client-unreal/Source/client_unreal/Private/ModuleBindings/Tables/FoodTable.g.cpp +++ b/demo/Blackholio/client-unreal/Source/client_unreal/Private/ModuleBindings/Tables/FoodTable.g.cpp @@ -16,8 +16,8 @@ void UFoodTable::PostInitialize() FoodTable->AddUniqueConstraint("entity_id", [](const FFoodType& Row) -> const int32& { return Row.EntityId; }); - EntityId = NewObject(this); - EntityId->SetCache(FoodTable); + FoodEntityIdIdxBtree = NewObject(this); + FoodEntityIdIdxBtree->SetCache(FoodTable); /***/ } diff --git a/demo/Blackholio/client-unreal/Source/client_unreal/Private/ModuleBindings/Tables/PlayerTable.g.cpp b/demo/Blackholio/client-unreal/Source/client_unreal/Private/ModuleBindings/Tables/PlayerTable.g.cpp index f8c52f4d4e6..9e6c1791fdf 100644 --- a/demo/Blackholio/client-unreal/Source/client_unreal/Private/ModuleBindings/Tables/PlayerTable.g.cpp +++ b/demo/Blackholio/client-unreal/Source/client_unreal/Private/ModuleBindings/Tables/PlayerTable.g.cpp @@ -18,11 +18,11 @@ void UPlayerTable::PostInitialize() PlayerTable->AddUniqueConstraint("player_id", [](const FPlayerType& Row) -> const int32& { return Row.PlayerId; }); - Identity = NewObject(this); - Identity->SetCache(PlayerTable); + PlayerIdentityIdxBtree = NewObject(this); + PlayerIdentityIdxBtree->SetCache(PlayerTable); - PlayerId = NewObject(this); - PlayerId->SetCache(PlayerTable); + PlayerPlayerIdIdxBtree = NewObject(this); + PlayerPlayerIdIdxBtree->SetCache(PlayerTable); /***/ } diff --git a/demo/Blackholio/client-unreal/Source/client_unreal/Public/ModuleBindings/SpacetimeDBClient.g.h b/demo/Blackholio/client-unreal/Source/client_unreal/Public/ModuleBindings/SpacetimeDBClient.g.h index 8092d9eb856..77b69597b2f 100644 --- a/demo/Blackholio/client-unreal/Source/client_unreal/Public/ModuleBindings/SpacetimeDBClient.g.h +++ b/demo/Blackholio/client-unreal/Source/client_unreal/Public/ModuleBindings/SpacetimeDBClient.g.h @@ -1,7 +1,7 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE // WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. -// This was generated using spacetimedb cli version 1.12.0 (commit 5da121d888d60ce178c202e54816252d2e4d4451). +// This was generated using spacetimedb cli version 2.0.0 (commit 2cdc0794b2e8a6d36df242bcce9ee83909349891). #pragma once #include "CoreMinimal.h" diff --git a/demo/Blackholio/client-unreal/Source/client_unreal/Public/ModuleBindings/Tables/CircleTable.g.h b/demo/Blackholio/client-unreal/Source/client_unreal/Public/ModuleBindings/Tables/CircleTable.g.h index e92587259a2..29c9ab33cf4 100644 --- a/demo/Blackholio/client-unreal/Source/client_unreal/Public/ModuleBindings/Tables/CircleTable.g.h +++ b/demo/Blackholio/client-unreal/Source/client_unreal/Public/ModuleBindings/Tables/CircleTable.g.h @@ -13,19 +13,19 @@ #include "CircleTable.g.generated.h" UCLASS(Blueprintable) -class CLIENT_UNREAL_API UCircleEntityIdUniqueIndex : public UObject +class CLIENT_UNREAL_API UCircleCircleEntityIdIdxBtreeUniqueIndex : public UObject { GENERATED_BODY() private: // Declare an instance of your templated helper. // It's private because the UObject wrapper will expose its functionality. - FUniqueIndexHelper> EntityIdIndexHelper; + FUniqueIndexHelper> CircleEntityIdIdxBtreeIndexHelper; public: - UCircleEntityIdUniqueIndex() + UCircleCircleEntityIdIdxBtreeUniqueIndex() // Initialize the helper with the specific unique index name - : EntityIdIndexHelper("entity_id") { + : CircleEntityIdIdxBtreeIndexHelper("entity_id") { } /** @@ -37,20 +37,20 @@ class CLIENT_UNREAL_API UCircleEntityIdUniqueIndex : public UObject FCircleType Find(int32 Key) { // Simply delegate the call to the internal helper - return EntityIdIndexHelper.FindUniqueIndex(Key); + return CircleEntityIdIdxBtreeIndexHelper.FindUniqueIndex(Key); } // A public setter to provide the cache to the helper after construction // This is a common pattern when the cache might be created or provided by another system. void SetCache(TSharedPtr> InCircleCache) { - EntityIdIndexHelper.Cache = InCircleCache; + CircleEntityIdIdxBtreeIndexHelper.Cache = InCircleCache; } }; /***/ UCLASS(Blueprintable) -class UCirclePlayerIdIndex : public UObject +class UCircleCirclePlayerIdIdxBtreeIndex : public UObject { GENERATED_BODY() @@ -61,7 +61,7 @@ class UCirclePlayerIdIndex : public UObject LocalCache->FindByMultiKeyBTreeIndex>( OutResults, - TEXT("player_id"), + TEXT("circle_player_id_idx_btree"), MakeTuple(PlayerId) ); @@ -90,10 +90,10 @@ class CLIENT_UNREAL_API UCircleTable : public URemoteTable public: UPROPERTY(BlueprintReadOnly) - UCircleEntityIdUniqueIndex* EntityId; + UCircleCircleEntityIdIdxBtreeUniqueIndex* CircleEntityIdIdxBtree; UPROPERTY(BlueprintReadOnly) - UCirclePlayerIdIndex* PlayerId; + UCircleCirclePlayerIdIdxBtreeIndex* CirclePlayerIdIdxBtree; void PostInitialize(); diff --git a/demo/Blackholio/client-unreal/Source/client_unreal/Public/ModuleBindings/Tables/ConfigTable.g.h b/demo/Blackholio/client-unreal/Source/client_unreal/Public/ModuleBindings/Tables/ConfigTable.g.h index 57d5532ba38..9afc94984f9 100644 --- a/demo/Blackholio/client-unreal/Source/client_unreal/Public/ModuleBindings/Tables/ConfigTable.g.h +++ b/demo/Blackholio/client-unreal/Source/client_unreal/Public/ModuleBindings/Tables/ConfigTable.g.h @@ -13,19 +13,19 @@ #include "ConfigTable.g.generated.h" UCLASS(Blueprintable) -class CLIENT_UNREAL_API UConfigIdUniqueIndex : public UObject +class CLIENT_UNREAL_API UConfigConfigIdIdxBtreeUniqueIndex : public UObject { GENERATED_BODY() private: // Declare an instance of your templated helper. // It's private because the UObject wrapper will expose its functionality. - FUniqueIndexHelper> IdIndexHelper; + FUniqueIndexHelper> ConfigIdIdxBtreeIndexHelper; public: - UConfigIdUniqueIndex() + UConfigConfigIdIdxBtreeUniqueIndex() // Initialize the helper with the specific unique index name - : IdIndexHelper("id") { + : ConfigIdIdxBtreeIndexHelper("id") { } /** @@ -37,14 +37,14 @@ class CLIENT_UNREAL_API UConfigIdUniqueIndex : public UObject FConfigType Find(int32 Key) { // Simply delegate the call to the internal helper - return IdIndexHelper.FindUniqueIndex(Key); + return ConfigIdIdxBtreeIndexHelper.FindUniqueIndex(Key); } // A public setter to provide the cache to the helper after construction // This is a common pattern when the cache might be created or provided by another system. void SetCache(TSharedPtr> InConfigCache) { - IdIndexHelper.Cache = InConfigCache; + ConfigIdIdxBtreeIndexHelper.Cache = InConfigCache; } }; /***/ @@ -56,7 +56,7 @@ class CLIENT_UNREAL_API UConfigTable : public URemoteTable public: UPROPERTY(BlueprintReadOnly) - UConfigIdUniqueIndex* Id; + UConfigConfigIdIdxBtreeUniqueIndex* ConfigIdIdxBtree; void PostInitialize(); diff --git a/demo/Blackholio/client-unreal/Source/client_unreal/Public/ModuleBindings/Tables/EntityTable.g.h b/demo/Blackholio/client-unreal/Source/client_unreal/Public/ModuleBindings/Tables/EntityTable.g.h index ac3dd913121..d02ce24f05a 100644 --- a/demo/Blackholio/client-unreal/Source/client_unreal/Public/ModuleBindings/Tables/EntityTable.g.h +++ b/demo/Blackholio/client-unreal/Source/client_unreal/Public/ModuleBindings/Tables/EntityTable.g.h @@ -13,19 +13,19 @@ #include "EntityTable.g.generated.h" UCLASS(Blueprintable) -class CLIENT_UNREAL_API UEntityEntityIdUniqueIndex : public UObject +class CLIENT_UNREAL_API UEntityEntityEntityIdIdxBtreeUniqueIndex : public UObject { GENERATED_BODY() private: // Declare an instance of your templated helper. // It's private because the UObject wrapper will expose its functionality. - FUniqueIndexHelper> EntityIdIndexHelper; + FUniqueIndexHelper> EntityEntityIdIdxBtreeIndexHelper; public: - UEntityEntityIdUniqueIndex() + UEntityEntityEntityIdIdxBtreeUniqueIndex() // Initialize the helper with the specific unique index name - : EntityIdIndexHelper("entity_id") { + : EntityEntityIdIdxBtreeIndexHelper("entity_id") { } /** @@ -37,14 +37,14 @@ class CLIENT_UNREAL_API UEntityEntityIdUniqueIndex : public UObject FEntityType Find(int32 Key) { // Simply delegate the call to the internal helper - return EntityIdIndexHelper.FindUniqueIndex(Key); + return EntityEntityIdIdxBtreeIndexHelper.FindUniqueIndex(Key); } // A public setter to provide the cache to the helper after construction // This is a common pattern when the cache might be created or provided by another system. void SetCache(TSharedPtr> InEntityCache) { - EntityIdIndexHelper.Cache = InEntityCache; + EntityEntityIdIdxBtreeIndexHelper.Cache = InEntityCache; } }; /***/ @@ -56,7 +56,7 @@ class CLIENT_UNREAL_API UEntityTable : public URemoteTable public: UPROPERTY(BlueprintReadOnly) - UEntityEntityIdUniqueIndex* EntityId; + UEntityEntityEntityIdIdxBtreeUniqueIndex* EntityEntityIdIdxBtree; void PostInitialize(); diff --git a/demo/Blackholio/client-unreal/Source/client_unreal/Public/ModuleBindings/Tables/FoodTable.g.h b/demo/Blackholio/client-unreal/Source/client_unreal/Public/ModuleBindings/Tables/FoodTable.g.h index 5f3e0013a82..21750d6df02 100644 --- a/demo/Blackholio/client-unreal/Source/client_unreal/Public/ModuleBindings/Tables/FoodTable.g.h +++ b/demo/Blackholio/client-unreal/Source/client_unreal/Public/ModuleBindings/Tables/FoodTable.g.h @@ -13,19 +13,19 @@ #include "FoodTable.g.generated.h" UCLASS(Blueprintable) -class CLIENT_UNREAL_API UFoodEntityIdUniqueIndex : public UObject +class CLIENT_UNREAL_API UFoodFoodEntityIdIdxBtreeUniqueIndex : public UObject { GENERATED_BODY() private: // Declare an instance of your templated helper. // It's private because the UObject wrapper will expose its functionality. - FUniqueIndexHelper> EntityIdIndexHelper; + FUniqueIndexHelper> FoodEntityIdIdxBtreeIndexHelper; public: - UFoodEntityIdUniqueIndex() + UFoodFoodEntityIdIdxBtreeUniqueIndex() // Initialize the helper with the specific unique index name - : EntityIdIndexHelper("entity_id") { + : FoodEntityIdIdxBtreeIndexHelper("entity_id") { } /** @@ -37,14 +37,14 @@ class CLIENT_UNREAL_API UFoodEntityIdUniqueIndex : public UObject FFoodType Find(int32 Key) { // Simply delegate the call to the internal helper - return EntityIdIndexHelper.FindUniqueIndex(Key); + return FoodEntityIdIdxBtreeIndexHelper.FindUniqueIndex(Key); } // A public setter to provide the cache to the helper after construction // This is a common pattern when the cache might be created or provided by another system. void SetCache(TSharedPtr> InFoodCache) { - EntityIdIndexHelper.Cache = InFoodCache; + FoodEntityIdIdxBtreeIndexHelper.Cache = InFoodCache; } }; /***/ @@ -56,7 +56,7 @@ class CLIENT_UNREAL_API UFoodTable : public URemoteTable public: UPROPERTY(BlueprintReadOnly) - UFoodEntityIdUniqueIndex* EntityId; + UFoodFoodEntityIdIdxBtreeUniqueIndex* FoodEntityIdIdxBtree; void PostInitialize(); diff --git a/demo/Blackholio/client-unreal/Source/client_unreal/Public/ModuleBindings/Tables/PlayerTable.g.h b/demo/Blackholio/client-unreal/Source/client_unreal/Public/ModuleBindings/Tables/PlayerTable.g.h index fd13ef2a07a..feeb8d1e691 100644 --- a/demo/Blackholio/client-unreal/Source/client_unreal/Public/ModuleBindings/Tables/PlayerTable.g.h +++ b/demo/Blackholio/client-unreal/Source/client_unreal/Public/ModuleBindings/Tables/PlayerTable.g.h @@ -13,19 +13,19 @@ #include "PlayerTable.g.generated.h" UCLASS(Blueprintable) -class CLIENT_UNREAL_API UPlayerIdentityUniqueIndex : public UObject +class CLIENT_UNREAL_API UPlayerPlayerIdentityIdxBtreeUniqueIndex : public UObject { GENERATED_BODY() private: // Declare an instance of your templated helper. // It's private because the UObject wrapper will expose its functionality. - FUniqueIndexHelper> IdentityIndexHelper; + FUniqueIndexHelper> PlayerIdentityIdxBtreeIndexHelper; public: - UPlayerIdentityUniqueIndex() + UPlayerPlayerIdentityIdxBtreeUniqueIndex() // Initialize the helper with the specific unique index name - : IdentityIndexHelper("identity") { + : PlayerIdentityIdxBtreeIndexHelper("identity") { } /** @@ -37,32 +37,32 @@ class CLIENT_UNREAL_API UPlayerIdentityUniqueIndex : public UObject FPlayerType Find(FSpacetimeDBIdentity Key) { // Simply delegate the call to the internal helper - return IdentityIndexHelper.FindUniqueIndex(Key); + return PlayerIdentityIdxBtreeIndexHelper.FindUniqueIndex(Key); } // A public setter to provide the cache to the helper after construction // This is a common pattern when the cache might be created or provided by another system. void SetCache(TSharedPtr> InPlayerCache) { - IdentityIndexHelper.Cache = InPlayerCache; + PlayerIdentityIdxBtreeIndexHelper.Cache = InPlayerCache; } }; /***/ UCLASS(Blueprintable) -class CLIENT_UNREAL_API UPlayerPlayerIdUniqueIndex : public UObject +class CLIENT_UNREAL_API UPlayerPlayerPlayerIdIdxBtreeUniqueIndex : public UObject { GENERATED_BODY() private: // Declare an instance of your templated helper. // It's private because the UObject wrapper will expose its functionality. - FUniqueIndexHelper> PlayerIdIndexHelper; + FUniqueIndexHelper> PlayerPlayerIdIdxBtreeIndexHelper; public: - UPlayerPlayerIdUniqueIndex() + UPlayerPlayerPlayerIdIdxBtreeUniqueIndex() // Initialize the helper with the specific unique index name - : PlayerIdIndexHelper("player_id") { + : PlayerPlayerIdIdxBtreeIndexHelper("player_id") { } /** @@ -74,14 +74,14 @@ class CLIENT_UNREAL_API UPlayerPlayerIdUniqueIndex : public UObject FPlayerType Find(int32 Key) { // Simply delegate the call to the internal helper - return PlayerIdIndexHelper.FindUniqueIndex(Key); + return PlayerPlayerIdIdxBtreeIndexHelper.FindUniqueIndex(Key); } // A public setter to provide the cache to the helper after construction // This is a common pattern when the cache might be created or provided by another system. void SetCache(TSharedPtr> InPlayerCache) { - PlayerIdIndexHelper.Cache = InPlayerCache; + PlayerPlayerIdIdxBtreeIndexHelper.Cache = InPlayerCache; } }; /***/ @@ -93,10 +93,10 @@ class CLIENT_UNREAL_API UPlayerTable : public URemoteTable public: UPROPERTY(BlueprintReadOnly) - UPlayerIdentityUniqueIndex* Identity; + UPlayerPlayerIdentityIdxBtreeUniqueIndex* PlayerIdentityIdxBtree; UPROPERTY(BlueprintReadOnly) - UPlayerPlayerIdUniqueIndex* PlayerId; + UPlayerPlayerPlayerIdIdxBtreeUniqueIndex* PlayerPlayerIdIdxBtree; void PostInitialize(); From 4329313ce47041bd3ed40fb86cdf410208a2b43c Mon Sep 17 00:00:00 2001 From: rekhoff Date: Fri, 13 Feb 2026 08:12:32 -0800 Subject: [PATCH 035/133] Updated C# regression tests with new index names --- .../regression-tests/client/Program.cs | 6 ++-- .../module_bindings/Tables/Account.g.cs | 16 +++++----- .../module_bindings/Tables/ExampleData.g.cs | 16 +++++----- .../Tables/NullStringNonnullable.g.cs | 8 ++--- .../Tables/NullStringNullable.g.cs | 8 ++--- .../module_bindings/Tables/NullableVec.g.cs | 8 ++--- .../client/module_bindings/Tables/Player.g.cs | 16 +++++----- .../module_bindings/Tables/PlayerLevel.g.cs | 16 +++++----- .../module_bindings/Tables/RetryLog.g.cs | 8 ++--- .../client/module_bindings/Tables/Score.g.cs | 8 ++--- .../client/module_bindings/Tables/User.g.cs | 32 +++++++++---------- .../module_bindings/Tables/WhereTest.g.cs | 16 +++++----- 12 files changed, 80 insertions(+), 78 deletions(-) diff --git a/sdks/csharp/examples~/regression-tests/client/Program.cs b/sdks/csharp/examples~/regression-tests/client/Program.cs index 3055bb8af42..cf1b62ccfac 100644 --- a/sdks/csharp/examples~/regression-tests/client/Program.cs +++ b/sdks/csharp/examples~/regression-tests/client/Program.cs @@ -237,13 +237,15 @@ void ValidateBTreeIndexes(IRemoteDbContext conn) Log.Debug("Checking indexes..."); foreach (var data in conn.Db.ExampleData.Iter()) { - Debug.Assert(conn.Db.ExampleData.Indexed.Filter(data.Id).Contains(data)); + Debug.Assert( + conn.Db.ExampleData.ExampleDataIndexedIdxBtree.Filter(data.Id).Contains(data) + ); } var outOfIndex = conn.Db.ExampleData.Iter().ToHashSet(); for (uint i = 0; i < MAX_ID; i++) { - foreach (var data in conn.Db.ExampleData.Indexed.Filter(i)) + foreach (var data in conn.Db.ExampleData.ExampleDataIndexedIdxBtree.Filter(i)) { Debug.Assert(outOfIndex.Contains(data)); } diff --git a/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/Account.g.cs b/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/Account.g.cs index b8fa9b2b30d..29d291d596d 100644 --- a/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/Account.g.cs +++ b/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/Account.g.cs @@ -17,28 +17,28 @@ public sealed class AccountHandle : RemoteTableHandle { protected override string RemoteTableName => "account"; - public sealed class IdUniqueIndex : UniqueIndexBase + public sealed class AccountIdIdxBtreeUniqueIndex : UniqueIndexBase { protected override ulong GetKey(Account row) => row.Id; - public IdUniqueIndex(AccountHandle table) : base(table) { } + public AccountIdIdxBtreeUniqueIndex(AccountHandle table) : base(table) { } } - public readonly IdUniqueIndex Id; + public readonly AccountIdIdxBtreeUniqueIndex AccountIdIdxBtree; - public sealed class IdentityUniqueIndex : UniqueIndexBase + public sealed class AccountIdentityIdxBtreeUniqueIndex : UniqueIndexBase { protected override SpacetimeDB.Identity GetKey(Account row) => row.Identity; - public IdentityUniqueIndex(AccountHandle table) : base(table) { } + public AccountIdentityIdxBtreeUniqueIndex(AccountHandle table) : base(table) { } } - public readonly IdentityUniqueIndex Identity; + public readonly AccountIdentityIdxBtreeUniqueIndex AccountIdentityIdxBtree; internal AccountHandle(DbConnection conn) : base(conn) { - Id = new(this); - Identity = new(this); + AccountIdIdxBtree = new(this); + AccountIdentityIdxBtree = new(this); } protected override object GetPrimaryKey(Account row) => row.Id; diff --git a/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/ExampleData.g.cs b/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/ExampleData.g.cs index 2b6f5026dd4..2c907843c45 100644 --- a/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/ExampleData.g.cs +++ b/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/ExampleData.g.cs @@ -17,28 +17,28 @@ public sealed class ExampleDataHandle : RemoteTableHandle "example_data"; - public sealed class IdUniqueIndex : UniqueIndexBase + public sealed class ExampleDataIdIdxBtreeUniqueIndex : UniqueIndexBase { protected override uint GetKey(ExampleData row) => row.Id; - public IdUniqueIndex(ExampleDataHandle table) : base(table) { } + public ExampleDataIdIdxBtreeUniqueIndex(ExampleDataHandle table) : base(table) { } } - public readonly IdUniqueIndex Id; + public readonly ExampleDataIdIdxBtreeUniqueIndex ExampleDataIdIdxBtree; - public sealed class IndexedIndex : BTreeIndexBase + public sealed class ExampleDataIndexedIdxBtreeIndex : BTreeIndexBase { protected override uint GetKey(ExampleData row) => row.Indexed; - public IndexedIndex(ExampleDataHandle table) : base(table) { } + public ExampleDataIndexedIdxBtreeIndex(ExampleDataHandle table) : base(table) { } } - public readonly IndexedIndex Indexed; + public readonly ExampleDataIndexedIdxBtreeIndex ExampleDataIndexedIdxBtree; internal ExampleDataHandle(DbConnection conn) : base(conn) { - Id = new(this); - Indexed = new(this); + ExampleDataIdIdxBtree = new(this); + ExampleDataIndexedIdxBtree = new(this); } protected override object GetPrimaryKey(ExampleData row) => row.Id; diff --git a/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/NullStringNonnullable.g.cs b/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/NullStringNonnullable.g.cs index afa78ee5000..ed602dbd768 100644 --- a/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/NullStringNonnullable.g.cs +++ b/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/NullStringNonnullable.g.cs @@ -17,18 +17,18 @@ public sealed class NullStringNonnullableHandle : RemoteTableHandle "null_string_nonnullable"; - public sealed class IdUniqueIndex : UniqueIndexBase + public sealed class NullStringNonnullableIdIdxBtreeUniqueIndex : UniqueIndexBase { protected override ulong GetKey(NullStringNonNullable row) => row.Id; - public IdUniqueIndex(NullStringNonnullableHandle table) : base(table) { } + public NullStringNonnullableIdIdxBtreeUniqueIndex(NullStringNonnullableHandle table) : base(table) { } } - public readonly IdUniqueIndex Id; + public readonly NullStringNonnullableIdIdxBtreeUniqueIndex NullStringNonnullableIdIdxBtree; internal NullStringNonnullableHandle(DbConnection conn) : base(conn) { - Id = new(this); + NullStringNonnullableIdIdxBtree = new(this); } protected override object GetPrimaryKey(NullStringNonNullable row) => row.Id; diff --git a/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/NullStringNullable.g.cs b/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/NullStringNullable.g.cs index 58287e04bc1..6019bf3a1d9 100644 --- a/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/NullStringNullable.g.cs +++ b/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/NullStringNullable.g.cs @@ -17,18 +17,18 @@ public sealed class NullStringNullableHandle : RemoteTableHandle "null_string_nullable"; - public sealed class IdUniqueIndex : UniqueIndexBase + public sealed class NullStringNullableIdIdxBtreeUniqueIndex : UniqueIndexBase { protected override ulong GetKey(NullStringNullable row) => row.Id; - public IdUniqueIndex(NullStringNullableHandle table) : base(table) { } + public NullStringNullableIdIdxBtreeUniqueIndex(NullStringNullableHandle table) : base(table) { } } - public readonly IdUniqueIndex Id; + public readonly NullStringNullableIdIdxBtreeUniqueIndex NullStringNullableIdIdxBtree; internal NullStringNullableHandle(DbConnection conn) : base(conn) { - Id = new(this); + NullStringNullableIdIdxBtree = new(this); } protected override object GetPrimaryKey(NullStringNullable row) => row.Id; diff --git a/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/NullableVec.g.cs b/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/NullableVec.g.cs index 89613054a3e..6beacac963a 100644 --- a/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/NullableVec.g.cs +++ b/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/NullableVec.g.cs @@ -17,18 +17,18 @@ public sealed class NullableVecHandle : RemoteTableHandle "nullable_vec"; - public sealed class IdUniqueIndex : UniqueIndexBase + public sealed class NullableVecIdIdxBtreeUniqueIndex : UniqueIndexBase { protected override uint GetKey(NullableVec row) => row.Id; - public IdUniqueIndex(NullableVecHandle table) : base(table) { } + public NullableVecIdIdxBtreeUniqueIndex(NullableVecHandle table) : base(table) { } } - public readonly IdUniqueIndex Id; + public readonly NullableVecIdIdxBtreeUniqueIndex NullableVecIdIdxBtree; internal NullableVecHandle(DbConnection conn) : base(conn) { - Id = new(this); + NullableVecIdIdxBtree = new(this); } protected override object GetPrimaryKey(NullableVec row) => row.Id; diff --git a/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/Player.g.cs b/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/Player.g.cs index 776a7706424..9f1c76a6246 100644 --- a/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/Player.g.cs +++ b/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/Player.g.cs @@ -17,28 +17,28 @@ public sealed class PlayerHandle : RemoteTableHandle { protected override string RemoteTableName => "player"; - public sealed class IdUniqueIndex : UniqueIndexBase + public sealed class PlayerIdIdxBtreeUniqueIndex : UniqueIndexBase { protected override ulong GetKey(Player row) => row.Id; - public IdUniqueIndex(PlayerHandle table) : base(table) { } + public PlayerIdIdxBtreeUniqueIndex(PlayerHandle table) : base(table) { } } - public readonly IdUniqueIndex Id; + public readonly PlayerIdIdxBtreeUniqueIndex PlayerIdIdxBtree; - public sealed class IdentityUniqueIndex : UniqueIndexBase + public sealed class PlayerIdentityIdxBtreeUniqueIndex : UniqueIndexBase { protected override SpacetimeDB.Identity GetKey(Player row) => row.Identity; - public IdentityUniqueIndex(PlayerHandle table) : base(table) { } + public PlayerIdentityIdxBtreeUniqueIndex(PlayerHandle table) : base(table) { } } - public readonly IdentityUniqueIndex Identity; + public readonly PlayerIdentityIdxBtreeUniqueIndex PlayerIdentityIdxBtree; internal PlayerHandle(DbConnection conn) : base(conn) { - Id = new(this); - Identity = new(this); + PlayerIdIdxBtree = new(this); + PlayerIdentityIdxBtree = new(this); } protected override object GetPrimaryKey(Player row) => row.Id; diff --git a/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/PlayerLevel.g.cs b/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/PlayerLevel.g.cs index 014980367c9..45d3db12e28 100644 --- a/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/PlayerLevel.g.cs +++ b/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/PlayerLevel.g.cs @@ -17,28 +17,28 @@ public sealed class PlayerLevelHandle : RemoteTableHandle "player_level"; - public sealed class LevelIndex : BTreeIndexBase + public sealed class PlayerLevelLevelIdxBtreeIndex : BTreeIndexBase { protected override ulong GetKey(PlayerLevel row) => row.Level; - public LevelIndex(PlayerLevelHandle table) : base(table) { } + public PlayerLevelLevelIdxBtreeIndex(PlayerLevelHandle table) : base(table) { } } - public readonly LevelIndex Level; + public readonly PlayerLevelLevelIdxBtreeIndex PlayerLevelLevelIdxBtree; - public sealed class PlayerIdUniqueIndex : UniqueIndexBase + public sealed class PlayerLevelPlayerIdIdxBtreeUniqueIndex : UniqueIndexBase { protected override ulong GetKey(PlayerLevel row) => row.PlayerId; - public PlayerIdUniqueIndex(PlayerLevelHandle table) : base(table) { } + public PlayerLevelPlayerIdIdxBtreeUniqueIndex(PlayerLevelHandle table) : base(table) { } } - public readonly PlayerIdUniqueIndex PlayerId; + public readonly PlayerLevelPlayerIdIdxBtreeUniqueIndex PlayerLevelPlayerIdIdxBtree; internal PlayerLevelHandle(DbConnection conn) : base(conn) { - Level = new(this); - PlayerId = new(this); + PlayerLevelLevelIdxBtree = new(this); + PlayerLevelPlayerIdIdxBtree = new(this); } } diff --git a/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/RetryLog.g.cs b/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/RetryLog.g.cs index 0821bfe9c5e..bc8100b2641 100644 --- a/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/RetryLog.g.cs +++ b/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/RetryLog.g.cs @@ -17,18 +17,18 @@ public sealed class RetryLogHandle : RemoteTableHandle { protected override string RemoteTableName => "retry_log"; - public sealed class IdUniqueIndex : UniqueIndexBase + public sealed class RetryLogIdIdxBtreeUniqueIndex : UniqueIndexBase { protected override uint GetKey(RetryLog row) => row.Id; - public IdUniqueIndex(RetryLogHandle table) : base(table) { } + public RetryLogIdIdxBtreeUniqueIndex(RetryLogHandle table) : base(table) { } } - public readonly IdUniqueIndex Id; + public readonly RetryLogIdIdxBtreeUniqueIndex RetryLogIdIdxBtree; internal RetryLogHandle(DbConnection conn) : base(conn) { - Id = new(this); + RetryLogIdIdxBtree = new(this); } protected override object GetPrimaryKey(RetryLog row) => row.Id; diff --git a/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/Score.g.cs b/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/Score.g.cs index 7a65ae4bc44..5688faa3a29 100644 --- a/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/Score.g.cs +++ b/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/Score.g.cs @@ -17,18 +17,18 @@ public sealed class ScoreHandle : RemoteTableHandle { protected override string RemoteTableName => "score"; - public sealed class ByPlayerAndLevelIndex : BTreeIndexBase<(uint PlayerId, uint Level)> + public sealed class ScorePlayerIdLevelIdxBtreeIndex : BTreeIndexBase<(uint PlayerId, uint Level)> { protected override (uint PlayerId, uint Level) GetKey(Score row) => (row.PlayerId, row.Level); - public ByPlayerAndLevelIndex(ScoreHandle table) : base(table) { } + public ScorePlayerIdLevelIdxBtreeIndex(ScoreHandle table) : base(table) { } } - public readonly ByPlayerAndLevelIndex ByPlayerAndLevel; + public readonly ScorePlayerIdLevelIdxBtreeIndex ScorePlayerIdLevelIdxBtree; internal ScoreHandle(DbConnection conn) : base(conn) { - ByPlayerAndLevel = new(this); + ScorePlayerIdLevelIdxBtree = new(this); } } diff --git a/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/User.g.cs b/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/User.g.cs index 68ee45c4ed7..7c2a36b9a31 100644 --- a/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/User.g.cs +++ b/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/User.g.cs @@ -17,48 +17,48 @@ public sealed class UserHandle : RemoteTableHandle { protected override string RemoteTableName => "user"; - public sealed class AgeIndex : BTreeIndexBase + public sealed class UserAgeIdxBtreeIndex : BTreeIndexBase { protected override byte GetKey(User row) => row.Age; - public AgeIndex(UserHandle table) : base(table) { } + public UserAgeIdxBtreeIndex(UserHandle table) : base(table) { } } - public readonly AgeIndex Age; + public readonly UserAgeIdxBtreeIndex UserAgeIdxBtree; - public sealed class IdUniqueIndex : UniqueIndexBase + public sealed class UserIdIdxBtreeUniqueIndex : UniqueIndexBase { protected override SpacetimeDB.Uuid GetKey(User row) => row.Id; - public IdUniqueIndex(UserHandle table) : base(table) { } + public UserIdIdxBtreeUniqueIndex(UserHandle table) : base(table) { } } - public readonly IdUniqueIndex Id; + public readonly UserIdIdxBtreeUniqueIndex UserIdIdxBtree; - public sealed class IsAdminIndex : BTreeIndexBase + public sealed class UserIsAdminIdxBtreeIndex : BTreeIndexBase { protected override bool GetKey(User row) => row.IsAdmin; - public IsAdminIndex(UserHandle table) : base(table) { } + public UserIsAdminIdxBtreeIndex(UserHandle table) : base(table) { } } - public readonly IsAdminIndex IsAdmin; + public readonly UserIsAdminIdxBtreeIndex UserIsAdminIdxBtree; - public sealed class NameIndex : BTreeIndexBase + public sealed class UserNameIdxBtreeIndex : BTreeIndexBase { protected override string GetKey(User row) => row.Name; - public NameIndex(UserHandle table) : base(table) { } + public UserNameIdxBtreeIndex(UserHandle table) : base(table) { } } - public readonly NameIndex Name; + public readonly UserNameIdxBtreeIndex UserNameIdxBtree; internal UserHandle(DbConnection conn) : base(conn) { - Age = new(this); - Id = new(this); - IsAdmin = new(this); - Name = new(this); + UserAgeIdxBtree = new(this); + UserIdIdxBtree = new(this); + UserIsAdminIdxBtree = new(this); + UserNameIdxBtree = new(this); } protected override object GetPrimaryKey(User row) => row.Id; diff --git a/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/WhereTest.g.cs b/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/WhereTest.g.cs index 7d2188ca12c..b49b51a62ea 100644 --- a/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/WhereTest.g.cs +++ b/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/WhereTest.g.cs @@ -17,28 +17,28 @@ public sealed class WhereTestHandle : RemoteTableHandle { protected override string RemoteTableName => "where_test"; - public sealed class IdUniqueIndex : UniqueIndexBase + public sealed class WhereTestIdIdxBtreeUniqueIndex : UniqueIndexBase { protected override uint GetKey(WhereTest row) => row.Id; - public IdUniqueIndex(WhereTestHandle table) : base(table) { } + public WhereTestIdIdxBtreeUniqueIndex(WhereTestHandle table) : base(table) { } } - public readonly IdUniqueIndex Id; + public readonly WhereTestIdIdxBtreeUniqueIndex WhereTestIdIdxBtree; - public sealed class ValueIndex : BTreeIndexBase + public sealed class WhereTestValueIdxBtreeIndex : BTreeIndexBase { protected override uint GetKey(WhereTest row) => row.Value; - public ValueIndex(WhereTestHandle table) : base(table) { } + public WhereTestValueIdxBtreeIndex(WhereTestHandle table) : base(table) { } } - public readonly ValueIndex Value; + public readonly WhereTestValueIdxBtreeIndex WhereTestValueIdxBtree; internal WhereTestHandle(DbConnection conn) : base(conn) { - Id = new(this); - Value = new(this); + WhereTestIdIdxBtree = new(this); + WhereTestValueIdxBtree = new(this); } protected override object GetPrimaryKey(WhereTest row) => row.Id; From 7c51205cc337bd1f3899766dbb5fd76abb6f7992 Mon Sep 17 00:00:00 2001 From: rekhoff Date: Fri, 13 Feb 2026 08:32:39 -0800 Subject: [PATCH 036/133] Updated Blackholio Unity demo with new index names --- .../PlayModeTests/PlayModeExampleTest.cs | 20 +++++++++---------- .../Assets/Scripts/EntityController.cs | 2 +- .../Assets/Scripts/GameManager.cs | 8 ++++---- .../Assets/Scripts/PlayerController.cs | 10 +++++----- 4 files changed, 20 insertions(+), 20 deletions(-) diff --git a/demo/Blackholio/client-unity/Assets/PlayModeTests/PlayModeExampleTest.cs b/demo/Blackholio/client-unity/Assets/PlayModeTests/PlayModeExampleTest.cs index ea1216acfb1..a558f06c523 100644 --- a/demo/Blackholio/client-unity/Assets/PlayModeTests/PlayModeExampleTest.cs +++ b/demo/Blackholio/client-unity/Assets/PlayModeTests/PlayModeExampleTest.cs @@ -71,7 +71,7 @@ public IEnumerator CreatePlayerAndTestDecay() while (!playerCreated) yield return null; Debug.Assert(GameManager.LocalIdentity != default, "GameManager.localIdentity != default"); - var player = GameManager.Conn.Db.Player.Identity.Find(GameManager.LocalIdentity); + var player = GameManager.Conn.Db.Player.PlayerIdentityIdxBtree.Find(GameManager.LocalIdentity); Debug.Assert(player != null, nameof(player) + " != null"); var circle = GameManager.Conn.Db.Circle.Iter().FirstOrDefault(a => a.PlayerId == player.PlayerId); @@ -87,13 +87,13 @@ public IEnumerator CreatePlayerAndTestDecay() while (foodEaten < 50) { Debug.Assert(circle != null, nameof(circle) + " != null"); - var ourEntity = GameManager.Conn.Db.Entity.EntityId.Find(circle.EntityId); + var ourEntity = GameManager.Conn.Db.Entity.EntityEntityIdIdxBtree.Find(circle.EntityId); var toChosenFood = new UnityEngine.Vector2(1000, 0); int chosenFoodId = 0; foreach (var food in GameManager.Conn.Db.Food.Iter()) { var thisFoodId = food.EntityId; - var foodEntity = GameManager.Conn.Db.Entity.EntityId.Find(thisFoodId); + var foodEntity = GameManager.Conn.Db.Entity.EntityEntityIdIdxBtree.Find(thisFoodId); Debug.Assert(foodEntity != null, nameof(foodEntity) + " != null"); Debug.Assert(ourEntity != null, nameof(ourEntity) + " != null"); var foodEntityPosition = foodEntity.Position; @@ -109,10 +109,10 @@ public IEnumerator CreatePlayerAndTestDecay() } } - if (GameManager.Conn.Db.Entity.EntityId.Find(chosenFoodId) != null) + if (GameManager.Conn.Db.Entity.EntityEntityIdIdxBtree.Find(chosenFoodId) != null) { - var ourNewEntity = GameManager.Conn.Db.Entity.EntityId.Find(circle.EntityId); - var foodEntity = GameManager.Conn.Db.Entity.EntityId.Find(chosenFoodId); + var ourNewEntity = GameManager.Conn.Db.Entity.EntityEntityIdIdxBtree.Find(circle.EntityId); + var foodEntity = GameManager.Conn.Db.Entity.EntityEntityIdIdxBtree.Find(chosenFoodId); Debug.Assert(foodEntity != null, nameof(foodEntity) + " != null"); Debug.Assert(ourNewEntity != null, nameof(ourNewEntity) + " != null"); var toThisFood = (Vector2)foodEntity.Position - (Vector2)ourNewEntity.Position; @@ -130,9 +130,9 @@ public IEnumerator CreatePlayerAndTestDecay() PlayerController.Local.SetTestInput(UnityEngine.Vector2.zero); Debug.Assert(circle != null, nameof(circle) + " != null"); - var massStart = GameManager.Conn.Db.Entity.EntityId.Find(circle.EntityId)!.Mass; + var massStart = GameManager.Conn.Db.Entity.EntityEntityIdIdxBtree.Find(circle.EntityId)!.Mass; yield return new WaitForSeconds(10); - var massEnd = GameManager.Conn.Db.Entity.EntityId.Find(circle.EntityId)!.Mass; + var massEnd = GameManager.Conn.Db.Entity.EntityEntityIdIdxBtree.Find(circle.EntityId)!.Mass; Debug.Assert(massEnd < massStart, "Mass should have decayed"); } @@ -260,7 +260,7 @@ public IEnumerator ReconnectionViaReloadingScene() while (!playerCreated) yield return null; Debug.Assert(GameManager.LocalIdentity != default, "GameManager.localIdentity != default"); - var player = GameManager.Conn.Db.Player.Identity.Find(GameManager.LocalIdentity); + var player = GameManager.Conn.Db.Player.PlayerIdentityIdxBtree.Find(GameManager.LocalIdentity); Debug.Assert(player != null, nameof(player) + " != null"); var circle = GameManager.Conn.Db.Circle.Iter().FirstOrDefault(a => a.PlayerId == player.PlayerId); @@ -273,7 +273,7 @@ public IEnumerator ReconnectionViaReloadingScene() SceneManager.LoadScene("Scenes/Main"); while (!connected || !subscribed) yield return null; - var newPlayer = GameManager.Conn.Db.Player.Identity.Find(GameManager.LocalIdentity); + var newPlayer = GameManager.Conn.Db.Player.PlayerIdentityIdxBtree.Find(GameManager.LocalIdentity); Debug.Assert(player.PlayerId == newPlayer.PlayerId, "PlayerIds should match!"); var newCircle = GameManager.Conn.Db.Circle.Iter().FirstOrDefault(a => a.PlayerId == newPlayer.PlayerId); Debug.Assert(circle.EntityId == newCircle.EntityId, "Circle EntityIds should match!"); diff --git a/demo/Blackholio/client-unity/Assets/Scripts/EntityController.cs b/demo/Blackholio/client-unity/Assets/Scripts/EntityController.cs index 8e23f92a24e..e5e7e6ced2b 100644 --- a/demo/Blackholio/client-unity/Assets/Scripts/EntityController.cs +++ b/demo/Blackholio/client-unity/Assets/Scripts/EntityController.cs @@ -23,7 +23,7 @@ protected virtual void Spawn(int entityId) { EntityId = entityId; - var entity = GameManager.Conn.Db.Entity.EntityId.Find(entityId); + var entity = GameManager.Conn.Db.Entity.EntityEntityIdIdxBtree.Find(entityId); LerpStartPosition = LerpTargetPosition = transform.position = (Vector2)entity.Position; transform.localScale = Vector3.one; TargetScale = MassToScale(entity.Mass); diff --git a/demo/Blackholio/client-unity/Assets/Scripts/GameManager.cs b/demo/Blackholio/client-unity/Assets/Scripts/GameManager.cs index 37548d7a943..5a438efb9cb 100644 --- a/demo/Blackholio/client-unity/Assets/Scripts/GameManager.cs +++ b/demo/Blackholio/client-unity/Assets/Scripts/GameManager.cs @@ -105,11 +105,11 @@ private void HandleSubscriptionApplied(SubscriptionEventContext ctx) // Once we have the initial subscription sync'd to the client cache // Get the world size from the config table and set up the arena - var worldSize = Conn.Db.Config.Id.Find(0).WorldSize; + var worldSize = Conn.Db.Config.ConfigIdIdxBtree.Find(0).WorldSize; SetupArena(worldSize); // Check to see if we already have a player, if we don't we'll need to create one - var player = ctx.Db.Player.Identity.Find(LocalIdentity); + var player = ctx.Db.Player.PlayerIdentityIdxBtree.Find(LocalIdentity); if (string.IsNullOrEmpty(player.Name)) { // The player has to choose a username @@ -127,7 +127,7 @@ private void HandleSubscriptionApplied(SubscriptionEventContext ctx) else { // We already have a player - if (ctx.Db.Circle.PlayerId.Filter(player.PlayerId).Any()) + if (ctx.Db.Circle.CirclePlayerIdIdxBtree.Filter(player.PlayerId).Any()) { // We already have at least one circle, we should just be able to start // playing immediately. @@ -217,7 +217,7 @@ private static PlayerController GetOrCreatePlayer(int playerId) { if (!Players.TryGetValue(playerId, out var playerController)) { - var player = Conn.Db.Player.PlayerId.Find(playerId); + var player = Conn.Db.Player.PlayerPlayerIdIdxBtree.Find(playerId); playerController = PrefabManager.SpawnPlayer(player); Players.Add(playerId, playerController); } diff --git a/demo/Blackholio/client-unity/Assets/Scripts/PlayerController.cs b/demo/Blackholio/client-unity/Assets/Scripts/PlayerController.cs index f2fbf008b65..23b1403308d 100644 --- a/demo/Blackholio/client-unity/Assets/Scripts/PlayerController.cs +++ b/demo/Blackholio/client-unity/Assets/Scripts/PlayerController.cs @@ -11,18 +11,18 @@ public class PlayerController : MonoBehaviour public static PlayerController Local { get; private set; } - private int PlayerId; + private Identity PlayerIdentity; private float LastMovementSendTimestamp; private Vector2? LockInputPosition; private List OwnedCircles = new List(); - public string Username => GameManager.Conn.Db.Player.PlayerId.Find(PlayerId).Name; + public string Username => GameManager.Conn.Db.Player.PlayerIdentityIdxBtree.Find(PlayerIdentity).Name; public int NumberOfOwnedCircles => OwnedCircles.Count; public bool IsLocalPlayer => this == Local; public void Initialize(Player player) { - PlayerId = player.PlayerId; + PlayerIdentity = player.Identity; if (player.Identity == GameManager.LocalIdentity) { Local = this; @@ -59,7 +59,7 @@ public void OnCircleDeleted(CircleController deletedCircle) public int TotalMass() { return (int)OwnedCircles - .Select(circle => GameManager.Conn.Db.Entity.EntityId.Find(circle.EntityId)) + .Select(circle => GameManager.Conn.Db.Entity.EntityEntityIdIdxBtree.Find(circle.EntityId)) .Sum(e => e?.Mass ?? 0); //If this entity is being deleted on the same frame that we're moving, we can have a null entity here. } @@ -74,7 +74,7 @@ public int TotalMass() float totalMass = 0; foreach (var circle in OwnedCircles) { - var entity = GameManager.Conn.Db.Entity.EntityId.Find(circle.EntityId); + var entity = GameManager.Conn.Db.Entity.EntityEntityIdIdxBtree.Find(circle.EntityId); var position = circle.transform.position; totalPos += (Vector2)position * entity.Mass; totalMass += entity.Mass; From 55dfedf44508be82b5723ecd0baa0a0134f88074 Mon Sep 17 00:00:00 2001 From: rekhoff Date: Fri, 13 Feb 2026 09:03:58 -0800 Subject: [PATCH 037/133] Updated C# republishing regression test bindings --- .../client/module_bindings/Tables/ExampleData.g.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sdks/csharp/examples~/regression-tests/republishing/client/module_bindings/Tables/ExampleData.g.cs b/sdks/csharp/examples~/regression-tests/republishing/client/module_bindings/Tables/ExampleData.g.cs index c3388288f33..44edae9bed6 100644 --- a/sdks/csharp/examples~/regression-tests/republishing/client/module_bindings/Tables/ExampleData.g.cs +++ b/sdks/csharp/examples~/regression-tests/republishing/client/module_bindings/Tables/ExampleData.g.cs @@ -17,18 +17,18 @@ public sealed class ExampleDataHandle : RemoteTableHandle "ExampleData"; - public sealed class PrimaryUniqueIndex : UniqueIndexBase + public sealed class ExampleDataPrimaryIdxBtreeUniqueIndex : UniqueIndexBase { protected override uint GetKey(ExampleData row) => row.Primary; - public PrimaryUniqueIndex(ExampleDataHandle table) : base(table) { } + public ExampleDataPrimaryIdxBtreeUniqueIndex(ExampleDataHandle table) : base(table) { } } - public readonly PrimaryUniqueIndex Primary; + public readonly ExampleDataPrimaryIdxBtreeUniqueIndex ExampleDataPrimaryIdxBtree; internal ExampleDataHandle(DbConnection conn) : base(conn) { - Primary = new(this); + ExampleDataPrimaryIdxBtree = new(this); } protected override object GetPrimaryKey(ExampleData row) => row.Primary; From a7dc1e9f26745fa0fbb406672cd1da267aec682a Mon Sep 17 00:00:00 2001 From: Shubham Mishra Date: Thu, 12 Feb 2026 01:17:28 +0530 Subject: [PATCH 038/133] case conversion --- Cargo.lock | 1 + crates/schema/Cargo.toml | 1 + crates/schema/src/def/validate/v10.rs | 70 +++++---- crates/schema/src/def/validate/v9.rs | 210 +++++++++++++++++++------- crates/schema/src/relation.rs | 140 ++++++++--------- 5 files changed, 269 insertions(+), 153 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 6ed83e61eb0..b2d118b669e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -8233,6 +8233,7 @@ name = "spacetimedb-schema" version = "2.0.0" dependencies = [ "anyhow", + "convert_case 0.6.0", "derive_more 0.99.20", "enum-as-inner", "enum-map", diff --git a/crates/schema/Cargo.toml b/crates/schema/Cargo.toml index f76a12ad7e9..313e8dad38d 100644 --- a/crates/schema/Cargo.toml +++ b/crates/schema/Cargo.toml @@ -33,6 +33,7 @@ enum-as-inner.workspace = true enum-map.workspace = true insta.workspace = true termcolor.workspace = true +convert_case.workspace = true [dev-dependencies] spacetimedb-lib = { path = "../lib", features = ["test"] } diff --git a/crates/schema/src/def/validate/v10.rs b/crates/schema/src/def/validate/v10.rs index d5256750dff..2270f5b04f1 100644 --- a/crates/schema/src/def/validate/v10.rs +++ b/crates/schema/src/def/validate/v10.rs @@ -4,8 +4,8 @@ use spacetimedb_lib::de::DeserializeSeed as _; use spacetimedb_sats::{Typespace, WithTypespace}; use crate::def::validate::v9::{ - check_function_names_are_unique, check_scheduled_functions_exist, generate_schedule_name, identifier, - CoreValidator, TableValidator, ViewValidator, + check_function_names_are_unique, check_scheduled_functions_exist, generate_schedule_name, CoreValidator, + TableValidator, ViewValidator, }; use crate::def::*; use crate::error::ValidationError; @@ -15,8 +15,10 @@ use crate::{def::validate::Result, error::TypeLocation}; /// Validate a `RawModuleDefV9` and convert it into a `ModuleDef`, /// or return a stream of errors if the definition is invalid. pub fn validate(def: RawModuleDefV10) -> Result { - let typespace = def.typespace().cloned().unwrap_or_else(|| Typespace::EMPTY.clone()); + let mut typespace = def.typespace().cloned().unwrap_or_else(|| Typespace::EMPTY.clone()); let known_type_definitions = def.types().into_iter().flatten().map(|def| def.ty); + let case_policy = def.case_conversion_policy(); + CoreValidator::typespace_case_conversion(case_policy, &mut typespace); let mut validator = ModuleValidatorV10 { core: CoreValidator { @@ -25,6 +27,7 @@ pub fn validate(def: RawModuleDefV10) -> Result { type_namespace: Default::default(), lifecycle_reducers: Default::default(), typespace_for_generate: TypespaceForGenerate::builder(&typespace, known_type_definitions), + case_policy, }, }; @@ -124,7 +127,11 @@ pub fn validate(def: RawModuleDefV10) -> Result { .into_iter() .flatten() .map(|lifecycle_def| { - let function_name = ReducerName::new(identifier(lifecycle_def.function_name.clone())?); + let function_name = ReducerName::new( + validator + .core + .identifier_with_case(lifecycle_def.function_name.clone())?, + ); let (pos, _) = reducers_vec .iter() @@ -281,7 +288,7 @@ impl<'a> ModuleValidatorV10<'a> { })?; let mut table_validator = - TableValidator::new(raw_table_name.clone(), product_type_ref, product_type, &mut self.core); + TableValidator::new(raw_table_name.clone(), product_type_ref, product_type, &mut self.core)?; // Validate columns first let mut columns: Vec = (0..product_type.elements.len()) @@ -341,7 +348,7 @@ impl<'a> ModuleValidatorV10<'a> { let name = table_validator .add_to_global_namespace(raw_table_name.clone()) .and_then(|name| { - let name = identifier(name)?; + let name = self.core.identifier_with_case(name)?; if table_type != TableType::System && name.starts_with("st_") { Err(ValidationError::TableNameReserved { table: name }.into()) } else { @@ -426,7 +433,7 @@ impl<'a> ModuleValidatorV10<'a> { arg_name, }); - let name_result = identifier(source_name.clone()); + let name_result = self.core.identifier_with_case(source_name.clone()); let return_res: Result<_> = (ok_return_type.is_unit() && err_return_type.is_string()) .then_some((ok_return_type.clone(), err_return_type.clone())) @@ -462,7 +469,7 @@ impl<'a> ModuleValidatorV10<'a> { &mut self, schedule: RawScheduleDefV10, tables: &HashMap, - ) -> Result<(ScheduleDef, RawIdentifier)> { + ) -> Result<(ScheduleDef, Identifier)> { let RawScheduleDefV10 { source_name, table_name, @@ -470,7 +477,7 @@ impl<'a> ModuleValidatorV10<'a> { function_name, } = schedule; - let table_ident = identifier(table_name.clone())?; + let table_ident = self.core.identifier_with_case(table_name.clone())?; // Look up the table to validate the schedule let table = tables.get(&table_ident).ok_or_else(|| ValidationError::TableNotFound { @@ -491,13 +498,13 @@ impl<'a> ModuleValidatorV10<'a> { self.core .validate_schedule_def( table_name.clone(), - identifier(source_name)?, + self.core.identifier_with_case(source_name)?, function_name, product_type, schedule_at_col, table.primary_key, ) - .map(|schedule_def| (schedule_def, table_name)) + .map(|schedule_def| (schedule_def, table_ident)) } fn validate_lifecycle_reducer( @@ -537,7 +544,7 @@ impl<'a> ModuleValidatorV10<'a> { &return_type, ); - let name_result = identifier(source_name); + let name_result = self.core.identifier_with_case(source_name); let (name_result, params_for_generate, return_type_for_generate) = (name_result, params_for_generate, return_type_for_generate).combine_errors()?; @@ -619,9 +626,9 @@ impl<'a> ModuleValidatorV10<'a> { ¶ms, ¶ms_for_generate, &mut self.core, - ); + )?; - let name_result = view_validator.add_to_global_namespace(name).and_then(identifier); + let name_result = view_validator.add_to_global_namespace(name); let n = product_type.elements.len(); let return_columns = (0..n) @@ -637,7 +644,7 @@ impl<'a> ModuleValidatorV10<'a> { (name_result, return_type_for_generate, return_columns, param_columns).combine_errors()?; Ok(ViewDef { - name: name_result, + name: self.core.identifier_with_case(name_result)?, is_anonymous, is_public, params, @@ -679,13 +686,13 @@ fn attach_lifecycles_to_reducers( fn attach_schedules_to_tables( tables: &mut HashMap, - schedules: Vec<(ScheduleDef, RawIdentifier)>, + schedules: Vec<(ScheduleDef, Identifier)>, ) -> Result<()> { for schedule in schedules { let (schedule, table_name) = schedule; let table = tables.values_mut().find(|t| *t.name == *table_name).ok_or_else(|| { ValidationError::MissingScheduleTable { - table_name: table_name.clone(), + table_name: table_name.as_raw().clone(), schedule_name: schedule.name.clone(), } })?; @@ -715,11 +722,12 @@ mod tests { IndexAlgorithm, IndexDef, SequenceDef, UniqueConstraintData, }; use crate::error::*; + use crate::identifier::Identifier; use crate::type_for_generate::ClientCodegenError; use itertools::Itertools; use spacetimedb_data_structures::expect_error_matching; - use spacetimedb_lib::db::raw_def::v10::RawModuleDefV10Builder; + use spacetimedb_lib::db::raw_def::v10::{CaseConversionPolicy, RawModuleDefV10Builder}; use spacetimedb_lib::db::raw_def::v9::{btree, direct, hash}; use spacetimedb_lib::db::raw_def::*; use spacetimedb_lib::ScheduleAt; @@ -729,7 +737,7 @@ mod tests { /// This test attempts to exercise every successful path in the validation code. #[test] - fn valid_definition() { + fn test_valid_definition_with_default_policy() { let mut builder = RawModuleDefV10Builder::new(); let product_type = AlgebraicType::product([("a", AlgebraicType::U64), ("b", AlgebraicType::String)]); @@ -752,8 +760,8 @@ mod tests { "Apples", ProductType::from([ ("id", AlgebraicType::U64), - ("name", AlgebraicType::String), - ("count", AlgebraicType::U16), + ("Apple_name", AlgebraicType::String), + ("countFresh", AlgebraicType::U16), ("type", sum_type_ref.into()), ]), true, @@ -816,9 +824,11 @@ mod tests { let def: ModuleDef = builder.finish().try_into().unwrap(); - let apples = expect_identifier("Apples"); - let bananas = expect_identifier("Bananas"); - let deliveries = expect_identifier("Deliveries"); + let casing_policy = CaseConversionPolicy::default(); + assert_eq!(casing_policy, CaseConversionPolicy::SnakeCase); + let apples = Identifier::for_test("apples"); + let bananas = Identifier::for_test("bananas"); + let deliveries = Identifier::for_test("deliveries"); assert_eq!(def.tables.len(), 3); @@ -832,10 +842,10 @@ mod tests { assert_eq!(apples_def.columns[0].name, expect_identifier("id")); assert_eq!(apples_def.columns[0].ty, AlgebraicType::U64); assert_eq!(apples_def.columns[0].default_value, None); - assert_eq!(apples_def.columns[1].name, expect_identifier("name")); + assert_eq!(apples_def.columns[1].name, expect_identifier("apple_name")); assert_eq!(apples_def.columns[1].ty, AlgebraicType::String); assert_eq!(apples_def.columns[1].default_value, None); - assert_eq!(apples_def.columns[2].name, expect_identifier("count")); + assert_eq!(apples_def.columns[2].name, expect_identifier("count_fresh")); assert_eq!(apples_def.columns[2].ty, AlgebraicType::U16); assert_eq!(apples_def.columns[2].default_value, Some(AlgebraicValue::U16(37))); assert_eq!(apples_def.columns[3].name, expect_identifier("type")); @@ -846,7 +856,7 @@ mod tests { assert_eq!(apples_def.primary_key, None); assert_eq!(apples_def.constraints.len(), 2); - let apples_unique_constraint = "Apples_type_key"; + let apples_unique_constraint = "apples_type_key"; assert_eq!( apples_def.constraints[apples_unique_constraint].data, ConstraintData::Unique(UniqueConstraintData { @@ -945,7 +955,7 @@ mod tests { check_product_type(&def, bananas_def); check_product_type(&def, delivery_def); - let product_type_name = expect_type_name("scope1::scope2::ReferencedProduct"); + let product_type_name = expect_type_name("Scope1::Scope2::ReferencedProduct"); let sum_type_name = expect_type_name("ReferencedSum"); let apples_type_name = expect_type_name("Apples"); let bananas_type_name = expect_type_name("Bananas"); @@ -1355,7 +1365,7 @@ mod tests { let result: Result = builder.finish().try_into(); expect_error_matching!(result, ValidationError::DuplicateTypeName { name } => { - name == &expect_type_name("scope1::scope2::Duplicate") + name == &expect_type_name("Scope1::Scope2::Duplicate") }); } @@ -1394,7 +1404,7 @@ mod tests { let result: Result = builder.finish().try_into(); expect_error_matching!(result, ValidationError::MissingScheduledFunction { schedule, function } => { - &schedule[..] == "Deliveries_sched" && + &schedule[..] == "deliveries_sched" && function == &expect_identifier("check_deliveries") }); } diff --git a/crates/schema/src/def/validate/v9.rs b/crates/schema/src/def/validate/v9.rs index d8d5d4a0be6..e3552974949 100644 --- a/crates/schema/src/def/validate/v9.rs +++ b/crates/schema/src/def/validate/v9.rs @@ -2,10 +2,14 @@ use crate::def::*; use crate::error::{RawColumnName, ValidationError}; use crate::type_for_generate::{ClientCodegenError, ProductTypeDef, TypespaceForGenerateBuilder}; use crate::{def::validate::Result, error::TypeLocation}; +use convert_case::{Case, Casing}; +use lean_string::LeanString; use spacetimedb_data_structures::error_stream::{CollectAllErrors, CombineErrors}; use spacetimedb_data_structures::map::HashSet; use spacetimedb_lib::db::default_element_ordering::{product_type_has_default_ordering, sum_type_has_default_ordering}; -use spacetimedb_lib::db::raw_def::v10::{reducer_default_err_return_type, reducer_default_ok_return_type}; +use spacetimedb_lib::db::raw_def::v10::{ + reducer_default_err_return_type, reducer_default_ok_return_type, CaseConversionPolicy, +}; use spacetimedb_lib::db::raw_def::v9::RawViewDefV9; use spacetimedb_lib::ProductType; use spacetimedb_primitives::col_list; @@ -32,6 +36,7 @@ pub fn validate(def: RawModuleDefV9) -> Result { type_namespace: Default::default(), lifecycle_reducers: Default::default(), typespace_for_generate: TypespaceForGenerate::builder(&typespace, known_type_definitions), + case_policy: CaseConversionPolicy::None, }, }; @@ -195,13 +200,8 @@ impl ModuleValidatorV9<'_> { }) })?; - let mut table_in_progress = TableValidator { - raw_name: raw_table_name.clone(), - product_type_ref, - product_type, - module_validator: &mut self.core, - has_sequence: Default::default(), - }; + let mut table_in_progress = + TableValidator::new(raw_table_name.clone(), product_type_ref, product_type, &mut self.core)?; let columns = (0..product_type.elements.len()) .map(|id| table_in_progress.validate_column_def(id.into())) @@ -287,7 +287,7 @@ impl ModuleValidatorV9<'_> { let name = table_in_progress .add_to_global_namespace(raw_table_name.clone()) .and_then(|name| { - let name = identifier(name)?; + let name = self.core.identifier_with_case(name)?; if table_type != TableType::System && name.starts_with("st_") { Err(ValidationError::TableNameReserved { table: name }.into()) } else { @@ -343,7 +343,7 @@ impl ModuleValidatorV9<'_> { // Reducers share the "function namespace" with procedures. // Uniqueness is validated in a later pass, in `check_function_names_are_unique`. - let name = identifier(name); + let name = self.core.identifier_with_case(name); let lifecycle = lifecycle .map(|lifecycle| match &mut self.core.lifecycle_reducers[lifecycle] { @@ -395,7 +395,7 @@ impl ModuleValidatorV9<'_> { // Procedures share the "function namespace" with reducers. // Uniqueness is validated in a later pass, in `check_function_names_are_unique`. - let name = identifier(name); + let name = self.core.identifier_with_case(name); let (name, params_for_generate, return_type_for_generate) = (name, params_for_generate, return_type_for_generate).combine_errors()?; @@ -481,7 +481,7 @@ impl ModuleValidatorV9<'_> { ¶ms, ¶ms_for_generate, &mut self.core, - ); + )?; // Views have the same interface as tables and therefore must be registered in the global namespace. // @@ -490,7 +490,7 @@ impl ModuleValidatorV9<'_> { // we may want to support calling views in the same context as reducers in the future (e.g. `spacetime call`). // Hence we validate uniqueness among reducer, procedure, and view names in a later pass. // See `check_function_names_are_unique`. - let name = view_in_progress.add_to_global_namespace(name).and_then(identifier); + let name = view_in_progress.add_to_global_namespace(name); let n = product_type.elements.len(); let return_columns = (0..n) @@ -506,7 +506,7 @@ impl ModuleValidatorV9<'_> { (name, return_type_for_generate, return_columns, param_columns).combine_errors()?; Ok(ViewDef { - name, + name: self.core.identifier_with_case(name)?, is_anonymous, is_public, params, @@ -528,7 +528,7 @@ impl ModuleValidatorV9<'_> { tables: &HashMap, cdv: &RawColumnDefaultValueV9, ) -> Result { - let table_name = identifier(cdv.table.clone())?; + let table_name = self.core.identifier_with_case(cdv.table.clone())?; // Extract the table. We cannot make progress otherwise. let table = tables.get(&table_name).ok_or_else(|| ValidationError::TableNotFound { @@ -584,9 +584,72 @@ pub(crate) struct CoreValidator<'a> { /// Reducers that play special lifecycle roles. pub(crate) lifecycle_reducers: EnumMap>, + + pub(crate) case_policy: CaseConversionPolicy, +} +pub(crate) fn identifier_with_case(case_policy: CaseConversionPolicy, raw: RawIdentifier) -> Result { + let ident = convert(raw, case_policy); + + Identifier::new(RawIdentifier::new(LeanString::from_utf8(ident.as_bytes()).unwrap())) + .map_err(|error| ValidationError::IdentifierError { error }.into()) +} + +/// Convert a raw identifier to a canonical type name. +/// +/// IMPORTANT: For all policies except `None`, type names are converted to PascalCase, +/// unless explicitly specified by the user. +pub(crate) fn type_identifier_with_case(case_policy: CaseConversionPolicy, raw: RawIdentifier) -> Result { + let mut ident = raw.to_string(); + if !matches!(case_policy, CaseConversionPolicy::None) { + ident = ident.to_case(Case::Pascal); + } + + Identifier::new(RawIdentifier::new(LeanString::from_utf8(ident.as_bytes()).unwrap())) + .map_err(|error| ValidationError::IdentifierError { error }.into()) } impl CoreValidator<'_> { + /// Apply case conversion to an identifier. + pub(crate) fn identifier_with_case(&self, raw: RawIdentifier) -> Result { + identifier_with_case(self.case_policy, raw) + } + + /// Convert a raw identifier to a canonical type name. + /// + /// IMPORTANT: For all policies except `None`, type names are converted to PascalCase, + /// unless explicitly specified by the user. + pub(crate) fn type_identifier_with_case(&self, raw: RawIdentifier) -> Result { + type_identifier_with_case(self.case_policy, raw) + } + + // Recursive function to change typenames in the typespace according to the case conversion + // policy. + pub(crate) fn typespace_case_conversion(case_policy: CaseConversionPolicy, typespace: &mut Typespace) { + let case_policy_for_enum_variants = if matches!(case_policy, CaseConversionPolicy::SnakeCase) { + CaseConversionPolicy::PascalCase + } else { + case_policy + }; + + for ty in &mut typespace.types { + if let AlgebraicType::Product(product) = ty { + for element in &mut product.elements { + if let Some(name) = element.name() { + let new_name = convert(name.clone(), case_policy); + element.name = Some(RawIdentifier::new(LeanString::from_utf8(new_name.as_bytes()).unwrap())); + } + } + } else if let AlgebraicType::Sum(sum) = ty { + for variant in &mut sum.variants { + if let Some(name) = variant.name() { + let new_name = convert(name.clone(), case_policy_for_enum_variants); + variant.name = Some(RawIdentifier::new(LeanString::from_utf8(new_name.as_bytes()).unwrap())); + } + } + } + } + } + pub(crate) fn params_for_generate( &mut self, params: &ProductType, @@ -608,7 +671,7 @@ impl CoreValidator<'_> { } .into() }) - .and_then(identifier); + .and_then(|s| self.identifier_with_case(s)); let ty_use = self.validate_for_type_use(location, ¶m.algebraic_type); (param_name, ty_use).combine_errors() }) @@ -685,8 +748,11 @@ impl CoreValidator<'_> { name: unscoped_name, scope, } = name; - let unscoped_name = identifier(unscoped_name); - let scope = Vec::from(scope).into_iter().map(identifier).collect_all_errors(); + let unscoped_name = self.type_identifier_with_case(unscoped_name); + let scope = Vec::from(scope) + .into_iter() + .map(|s| self.type_identifier_with_case(s)) + .collect_all_errors(); let name = (unscoped_name, scope) .combine_errors() .and_then(|(unscoped_name, scope)| { @@ -773,9 +839,9 @@ impl CoreValidator<'_> { } .into() }); - let table_name = identifier(table_name)?; + let table_name = self.identifier_with_case(table_name)?; let name_res = self.add_to_global_namespace(name.clone().into(), table_name); - let function_name = identifier(function_name); + let function_name = self.identifier_with_case(function_name); let (_, (at_column, id_column), function_name) = (name_res, at_id, function_name).combine_errors()?; @@ -812,18 +878,12 @@ impl<'a, 'b> ViewValidator<'a, 'b> { params: &'a ProductType, params_for_generate: &'a [(Identifier, AlgebraicTypeUse)], module_validator: &'a mut CoreValidator<'b>, - ) -> Self { - Self { - inner: TableValidator { - raw_name, - product_type_ref, - product_type, - module_validator, - has_sequence: Default::default(), - }, + ) -> Result { + Ok(Self { + inner: TableValidator::new(raw_name, product_type_ref, product_type, module_validator)?, params, params_for_generate, - } + }) } pub(crate) fn validate_param_column_def(&mut self, col_id: ColId) -> Result { @@ -838,7 +898,7 @@ impl<'a, 'b> ViewValidator<'a, 'b> { .get(col_id.idx()) .expect("enumerate is generating an out-of-range index..."); - let name: Result = identifier( + let name: Result = self.inner.module_validator.identifier_with_case( column .name() .cloned() @@ -851,7 +911,10 @@ impl<'a, 'b> ViewValidator<'a, 'b> { // // This is necessary because we require `ErrorStream` to be nonempty. // We need to put something in there if the view name is invalid. - let view_name = identifier(self.inner.raw_name.clone()); + let view_name = self + .inner + .module_validator + .identifier_with_case(self.inner.raw_name.clone()); let (name, view_name) = (name, view_name).combine_errors()?; @@ -880,6 +943,7 @@ pub(crate) struct TableValidator<'a, 'b> { product_type_ref: AlgebraicTypeRef, product_type: &'a ProductType, has_sequence: HashSet, + table_ident: Identifier, } impl<'a, 'b> TableValidator<'a, 'b> { @@ -888,14 +952,16 @@ impl<'a, 'b> TableValidator<'a, 'b> { product_type_ref: AlgebraicTypeRef, product_type: &'a ProductType, module_validator: &'a mut CoreValidator<'b>, - ) -> Self { - Self { + ) -> Result { + let table_ident = module_validator.identifier_with_case(raw_name.clone())?; + Ok(Self { raw_name, product_type_ref, product_type, module_validator, has_sequence: Default::default(), - } + table_ident, + }) } /// Validate a column. /// @@ -917,7 +983,7 @@ impl<'a, 'b> TableValidator<'a, 'b> { } .into() }) - .and_then(identifier); + .and_then(|s| self.module_validator.identifier_with_case(s)); let ty_for_generate = self.module_validator.validate_for_type_use( || TypeLocation::InTypespace { @@ -932,7 +998,7 @@ impl<'a, 'b> TableValidator<'a, 'b> { // // This is necessary because we require `ErrorStream` to be // nonempty. We need to put something in there if the table name is invalid. - let table_name = identifier(self.raw_name.clone()); + let table_name = self.module_validator.identifier_with_case(self.raw_name.clone()); let (name, ty_for_generate, table_name) = (name, ty_for_generate, table_name).combine_errors()?; @@ -988,7 +1054,7 @@ impl<'a, 'b> TableValidator<'a, 'b> { name, } = sequence; - let name = name.unwrap_or_else(|| generate_sequence_name(&self.raw_name, self.product_type, column)); + let name = name.unwrap_or_else(|| generate_sequence_name(&self.table_ident, self.product_type, column)); // The column for the sequence exists and is an appropriate type. let column = self.validate_col_id(&name, column).and_then(|col_id| { @@ -1059,7 +1125,7 @@ impl<'a, 'b> TableValidator<'a, 'b> { accessor_name, } = index; - let name = name.unwrap_or_else(|| generate_index_name(&self.raw_name, self.product_type, &algorithm_raw)); + let name = name.unwrap_or_else(|| generate_index_name(&self.table_ident, self.product_type, &algorithm_raw)); let algorithm: Result = match algorithm_raw.clone() { RawIndexAlgorithm::BTree { columns } => self @@ -1097,12 +1163,19 @@ impl<'a, 'b> TableValidator<'a, 'b> { let codegen_name = match raw_def_version { // In V9, `name` field is used for database internals but `accessor_name` supplied by module is used for client codegen. - RawModuleDefVersion::V9OrEarlier => accessor_name.map(identifier).transpose(), + RawModuleDefVersion::V9OrEarlier => accessor_name + .map(|s| self.module_validator.identifier_with_case(s)) + .transpose(), // In V10, `name` is used both for internal purpose and client codefen. - RawModuleDefVersion::V10 => { - identifier(generate_index_name(&self.raw_name, self.product_type, &algorithm_raw)).map(Some) - } + RawModuleDefVersion::V10 => self + .module_validator + .identifier_with_case(generate_index_name( + &self.table_ident, + self.product_type, + &algorithm_raw, + )) + .map(Some), }; let name = self.add_to_global_namespace(name); @@ -1122,7 +1195,7 @@ impl<'a, 'b> TableValidator<'a, 'b> { if let RawConstraintDataV9::Unique(RawUniqueConstraintDataV9 { columns }) = data { let name = - name.unwrap_or_else(|| generate_unique_constraint_name(&self.raw_name, self.product_type, &columns)); + name.unwrap_or_else(|| generate_unique_constraint_name(&self.table_ident, self.product_type, &columns)); let columns: Result = self.validate_col_ids(&name, columns); let name = self.add_to_global_namespace(name); @@ -1151,7 +1224,9 @@ impl<'a, 'b> TableValidator<'a, 'b> { name, } = schedule; - let name = identifier(name.unwrap_or_else(|| generate_schedule_name(&self.raw_name.clone())))?; + let name = self + .module_validator + .identifier_with_case(name.unwrap_or_else(|| generate_schedule_name(&self.raw_name.clone())))?; self.module_validator.validate_schedule_def( self.raw_name.clone(), @@ -1169,7 +1244,7 @@ impl<'a, 'b> TableValidator<'a, 'b> { /// /// This is not used for all `Def` types. pub(crate) fn add_to_global_namespace(&mut self, name: RawIdentifier) -> Result { - let table_name = identifier(self.raw_name.clone())?; + let table_name = self.module_validator.identifier_with_case(self.raw_name.clone())?; // This may report the table_name as invalid multiple times, but this will be removed // when we sort and deduplicate the error stream. self.module_validator.add_to_global_namespace(name, table_name) @@ -1253,7 +1328,11 @@ fn concat_column_names(table_type: &ProductType, selected: &ColList) -> String { } /// All indexes have this name format. -pub fn generate_index_name(table_name: &str, table_type: &ProductType, algorithm: &RawIndexAlgorithm) -> RawIdentifier { +pub fn generate_index_name( + table_name: &Identifier, + table_type: &ProductType, + algorithm: &RawIndexAlgorithm, +) -> RawIdentifier { let (label, columns) = match algorithm { RawIndexAlgorithm::BTree { columns } => ("btree", columns), RawIndexAlgorithm::Direct { column } => ("direct", &col_list![*column]), @@ -1265,19 +1344,19 @@ pub fn generate_index_name(table_name: &str, table_type: &ProductType, algorithm } /// All sequences have this name format. -pub fn generate_sequence_name(table_name: &str, table_type: &ProductType, column: ColId) -> RawIdentifier { +pub fn generate_sequence_name(table_name: &Identifier, table_type: &ProductType, column: ColId) -> RawIdentifier { let column_name = column_name(table_type, column); RawIdentifier::new(format!("{table_name}_{column_name}_seq")) } /// All schedules have this name format. -pub fn generate_schedule_name(table_name: &str) -> RawIdentifier { +pub fn generate_schedule_name(table_name: &RawIdentifier) -> RawIdentifier { RawIdentifier::new(format!("{table_name}_sched")) } /// All unique constraints have this name format. pub fn generate_unique_constraint_name( - table_name: &str, + table_name: &Identifier, product_type: &ProductType, columns: &ColList, ) -> RawIdentifier { @@ -1287,8 +1366,33 @@ pub fn generate_unique_constraint_name( /// Helper to create an `Identifier` from a `RawIdentifier` with the appropriate error type. /// TODO: memoize this. -pub(crate) fn identifier(name: RawIdentifier) -> Result { - Identifier::new(name).map_err(|error| ValidationError::IdentifierError { error }.into()) +//pub(crate) fn identifier(name: RawIdentifier) -> Result { +// Identifier::new(name).map_err(|error| ValidationError::IdentifierError { error }.into()) +//} +pub fn convert(identifier: RawIdentifier, policy: CaseConversionPolicy) -> String { + let identifier = identifier.to_string(); + + match policy { + CaseConversionPolicy::SnakeCase => identifier.to_case(Case::Snake), + CaseConversionPolicy::CamelCase => identifier.to_case(Case::Camel), + CaseConversionPolicy::PascalCase => identifier.to_case(Case::Pascal), + CaseConversionPolicy::None | _ => identifier, + } +} + +pub fn convert_to_pasal(identifier: RawIdentifier, policy: CaseConversionPolicy) -> Result { + let identifier = identifier.to_string(); + + let name = match policy { + CaseConversionPolicy::None => identifier, + CaseConversionPolicy::SnakeCase => identifier.to_case(Case::Snake), + CaseConversionPolicy::CamelCase => identifier.to_case(Case::Camel), + CaseConversionPolicy::PascalCase => identifier.to_case(Case::Pascal), + _ => identifier, + }; + + Identifier::new(RawIdentifier::new(LeanString::from_utf8(name.as_bytes()).unwrap())) + .map_err(|error| ValidationError::IdentifierError { error }.into()) } /// Check that every [`ScheduleDef`]'s `function_name` refers to a real reducer or procedure @@ -1414,7 +1518,7 @@ fn process_column_default_value( // Validate the default value let validated_value = validator.validate_column_default_value(tables, cdv)?; - let table_name = identifier(cdv.table.clone())?; + let table_name = validator.core.identifier_with_case(cdv.table.clone())?; let table = tables .get_mut(&table_name) .ok_or_else(|| ValidationError::TableNotFound { diff --git a/crates/schema/src/relation.rs b/crates/schema/src/relation.rs index 36b33ed2a14..4916c994caa 100644 --- a/crates/schema/src/relation.rs +++ b/crates/schema/src/relation.rs @@ -298,76 +298,76 @@ mod tests { use spacetimedb_primitives::col_list; /// Build a [Header] using the initial `start_pos` as the column position for the [Constraints] - fn head(id: impl Into, name: &str, fields: (ColId, ColId), start_pos: u16) -> Header { - let pos_lhs = start_pos; - let pos_rhs = start_pos + 1; - - let ct = vec![ - (ColId(pos_lhs).into(), Constraints::indexed()), - (ColId(pos_rhs).into(), Constraints::identity()), - (col_list![pos_lhs, pos_rhs], Constraints::primary_key()), - (col_list![pos_rhs, pos_lhs], Constraints::unique()), - ]; - - let id = id.into(); - let fields = [fields.0, fields.1].map(|col| Column::new(FieldName::new(id, col), AlgebraicType::I8)); - Header::new(id, TableName::for_test(name), fields.into(), ct) - } - - #[test] - fn test_project() { - let a = 0.into(); - let b = 1.into(); - - let head = head(0, "t1", (a, b), 0); - let new = head.project(&[] as &[ColExpr]).unwrap(); - - let mut empty = head.clone_for_error(); - empty.fields.clear(); - empty.constraints.clear(); - assert_eq!(empty, new); - - let all = head.clone_for_error(); - let new = head.project(&[a, b].map(ColExpr::Col)).unwrap(); - assert_eq!(all, new); - - let mut first = head.clone_for_error(); - first.fields.pop(); - first.constraints = first.retain_constraints(&a.into()); - let new = head.project(&[a].map(ColExpr::Col)).unwrap(); - assert_eq!(first, new); - - let mut second = head.clone_for_error(); - second.fields.remove(0); - second.constraints = second.retain_constraints(&b.into()); - let new = head.project(&[b].map(ColExpr::Col)).unwrap(); - assert_eq!(second, new); - } - - #[test] - fn test_extend() { - let t1 = 0.into(); - let t2: TableId = 1.into(); - let a = 0.into(); - let b = 1.into(); - let c = 0.into(); - let d = 1.into(); - - let head_lhs = head(t1, "t1", (a, b), 0); - let head_rhs = head(t2, "t2", (c, d), 0); - - let new = head_lhs.extend(&head_rhs); - - let lhs = new.project(&[a, b].map(ColExpr::Col)).unwrap(); - assert_eq!(head_lhs, lhs); - - let mut head_rhs = head(t2, "t2", (c, d), 2); - head_rhs.table_id = t1; - head_rhs.table_name = head_lhs.table_name.clone(); - let rhs = new.project(&[2, 3].map(ColId).map(ColExpr::Col)).unwrap(); - assert_eq!(head_rhs, rhs); - } - + // fn head(id: impl Into, name: &str, fields: (ColId, ColId), start_pos: u16) -> Header { + // let pos_lhs = start_pos; + // let pos_rhs = start_pos + 1; + // + // let ct = vec![ + // (ColId(pos_lhs).into(), Constraints::indexed()), + // (ColId(pos_rhs).into(), Constraints::identity()), + // (col_list![pos_lhs, pos_rhs], Constraints::primary_key()), + // (col_list![pos_rhs, pos_lhs], Constraints::unique()), + // ]; + // + // let id = id.into(); + // let fields = [fields.0, fields.1].map(|col| Column::new(FieldName::new(id, col), AlgebraicType::I8)); + // Header::new(id, TableName::for_test(name), fields.into(), ct) + // } + // + // #[test] + // fn test_project() { + // let a = 0.into(); + // let b = 1.into(); + // + // let head = head(0, "t1", (a, b), 0); + // let new = head.project(&[] as &[ColExpr]).unwrap(); + // + // let mut empty = head.clone_for_error(); + // empty.fields.clear(); + // empty.constraints.clear(); + // assert_eq!(empty, new); + // + // let all = head.clone_for_error(); + // let new = head.project(&[a, b].map(ColExpr::Col)).unwrap(); + // assert_eq!(all, new); + // + // let mut first = head.clone_for_error(); + // first.fields.pop(); + // first.constraints = first.retain_constraints(&a.into()); + // let new = head.project(&[a].map(ColExpr::Col)).unwrap(); + // assert_eq!(first, new); + // + // let mut second = head.clone_for_error(); + // second.fields.remove(0); + // second.constraints = second.retain_constraints(&b.into()); + // let new = head.project(&[b].map(ColExpr::Col)).unwrap(); + // assert_eq!(second, new); + // } + // + // #[test] + // fn test_extend() { + // let t1 = 0.into(); + // let t2: TableId = 1.into(); + // let a = 0.into(); + // let b = 1.into(); + // let c = 0.into(); + // let d = 1.into(); + // + // let head_lhs = head(t1, "t1", (a, b), 0); + // let head_rhs = head(t2, "t2", (c, d), 0); + // + // let new = head_lhs.extend(&head_rhs); + // + // let lhs = new.project(&[a, b].map(ColExpr::Col)).unwrap(); + // assert_eq!(head_lhs, lhs); + // + // let mut head_rhs = head(t2, "t2", (c, d), 2); + // head_rhs.table_id = t1; + // head_rhs.table_name = head_lhs.table_name.clone(); + // let rhs = new.project(&[2, 3].map(ColId).map(ColExpr::Col)).unwrap(); + // assert_eq!(head_rhs, rhs); + // } + // #[test] fn test_combine_constraints() { let raw = vec![ From a8308adb6fabf9d297d2c67da0c3543ad3c1ff66 Mon Sep 17 00:00:00 2001 From: Shubham Mishra Date: Sun, 15 Feb 2026 20:42:35 +0530 Subject: [PATCH 039/133] temporary acessor fix --- crates/bindings-macro/src/table.rs | 35 ++- crates/bindings/src/table.rs | 1 - crates/core/src/db/relational_db.rs | 66 +++++- crates/core/src/vm.rs | 1 + .../locking_tx_datastore/committed_state.rs | 2 +- .../src/locking_tx_datastore/datastore.rs | 1 + .../src/locking_tx_datastore/state_view.rs | 2 + crates/datastore/src/system_tables.rs | 2 + crates/lib/src/db/raw_def/v10.rs | 1 + crates/lib/src/db/raw_def/v9.rs | 11 - crates/schema/src/def.rs | 53 ++++- crates/schema/src/def/validate/v10.rs | 31 +-- crates/schema/src/def/validate/v9.rs | 180 +++++++++------ crates/schema/src/identifier.rs | 2 +- crates/schema/src/reducer_name.rs | 2 +- crates/schema/src/schema.rs | 27 +++ crates/schema/tests/ensure_same_schema.rs | 218 +++++++++++++++++- 17 files changed, 514 insertions(+), 121 deletions(-) diff --git a/crates/bindings-macro/src/table.rs b/crates/bindings-macro/src/table.rs index 761b2271e9e..72a9392b7e6 100644 --- a/crates/bindings-macro/src/table.rs +++ b/crates/bindings-macro/src/table.rs @@ -47,6 +47,7 @@ struct ScheduledArg { } struct IndexArg { + is_inline: bool, accessor: Ident, //TODO: add canonical name // name: Option, @@ -55,7 +56,7 @@ struct IndexArg { } impl IndexArg { - fn new(accessor: Ident, kind: IndexType) -> Self { + fn inline(accessor: Ident, kind: IndexType) -> Self { // We don't know if its unique yet. // We'll discover this once we have collected constraints. let is_unique = false; @@ -63,9 +64,19 @@ impl IndexArg { accessor, is_unique, kind, + is_inline: true, // name, } } + fn explicit(accessor: Ident, kind: IndexType) -> Self { + Self { + is_inline: false, + accessor, + is_unique: false, + kind, + // name: None, + } + } } enum IndexType { @@ -206,7 +217,7 @@ impl IndexArg { ) })?; - Ok(IndexArg::new(accessor, kind)) + Ok(IndexArg::explicit(accessor, kind)) } fn parse_columns(meta: &ParseNestedMeta) -> syn::Result>> { @@ -266,7 +277,6 @@ impl IndexArg { /// Parses an inline `#[index(btree)]`, `#[index(hash)]`, or `#[index(direct)]` attribute on a field. fn parse_index_attr(field: &Ident, attr: &syn::Attribute) -> syn::Result { let mut kind = None; - let mut accessor: Option = None; let mut _name: Option = None; attr.parse_nested_meta(|meta| { match_meta!(match meta { @@ -286,10 +296,6 @@ impl IndexArg { check_duplicate_msg(&kind, &meta, "index type specified twice")?; kind = Some(IndexType::Direct { column: field.clone() }) } - sym::accessor => { - check_duplicate(&accessor, &meta)?; - accessor = Some(meta.value()?.parse()?); - } sym::name => { check_duplicate(&_name, &meta)?; _name = Some(meta.value()?.parse()?); @@ -301,8 +307,8 @@ impl IndexArg { kind.ok_or_else(|| syn::Error::new_spanned(&attr.meta, "must specify kind of index (`btree` , `direct`)"))?; // Default accessor = field name if not provided - let accessor = accessor.unwrap_or_else(|| field.clone()); - Ok(IndexArg::new(accessor, kind)) + let accessor = field.clone(); + Ok(IndexArg::inline(accessor, kind)) } fn validate<'a>(&'a self, table_name: &str, cols: &'a [Column<'a>]) -> syn::Result> { @@ -345,6 +351,7 @@ impl IndexArg { // as it is used in `index_id_from_name` abi. index_name: gen_index_name(), accessor_name: &self.accessor, + using_field_as_accessor: self.is_inline, kind, }) } @@ -402,6 +409,7 @@ impl AccessorType { struct ValidatedIndex<'a> { index_name: String, accessor_name: &'a Ident, + using_field_as_accessor: bool, is_unique: bool, kind: ValidatedIndexType<'a>, } @@ -450,14 +458,16 @@ impl ValidatedIndex<'_> { }) } }; - let accessor_name = ident_to_litstr(self.accessor_name); - let index_name = &self.index_name; + let accessor_name = if self.using_field_as_accessor { + self.index_name.clone() + } else { + ident_to_litstr(self.accessor_name).value() + }; // Note: we do not pass the index_name through here. // We trust the schema validation logic to reconstruct the name we've stored in `self.name`. //TODO(shub): pass generated index name instead of accessor name as source_name quote!(spacetimedb::table::IndexDesc { source_name: #accessor_name, - index_name: #index_name, algo: #algo, }) } @@ -849,6 +859,7 @@ pub(crate) fn table_impl(mut args: TableArgs, item: &syn::DeriveInput) -> syn::R let accessor = unique_col.ident.clone(); let columns = vec![accessor.clone()]; args.indices.push(IndexArg { + is_inline: true, accessor, //name: None, is_unique: true, diff --git a/crates/bindings/src/table.rs b/crates/bindings/src/table.rs index 1676ef2b4bb..56ec08f2fd6 100644 --- a/crates/bindings/src/table.rs +++ b/crates/bindings/src/table.rs @@ -139,7 +139,6 @@ pub trait TableInternal: Sized { #[derive(Clone, Copy)] pub struct IndexDesc<'a> { pub source_name: &'a str, - pub index_name: &'a str, pub algo: IndexAlgo<'a>, } diff --git a/crates/core/src/db/relational_db.rs b/crates/core/src/db/relational_db.rs index 75fb75cbce7..fcbe3e35ea3 100644 --- a/crates/core/src/db/relational_db.rs +++ b/crates/core/src/db/relational_db.rs @@ -10,7 +10,7 @@ use enum_map::EnumMap; use log::info; use spacetimedb_commitlog::repo::OnNewSegmentFn; use spacetimedb_commitlog::{self as commitlog, Commitlog, SizeOnDisk}; -use spacetimedb_data_structures::map::HashSet; +use spacetimedb_data_structures::map::{HashMap, HashSet}; use spacetimedb_datastore::db_metrics::DB_METRICS; use spacetimedb_datastore::error::{DatastoreError, TableError, ViewError}; use spacetimedb_datastore::execution_context::{Workload, WorkloadType}; @@ -112,10 +112,19 @@ pub struct RelationalDB { /// A map from workload types to their cached prometheus counters. workload_type_to_exec_counters: Arc>, + //TODO: move this mapping to system tables. + accessor_name_mapping: std::sync::RwLock, + /// An async queue for recording transaction metrics off the main thread metrics_recorder_queue: Option, } +#[derive(Default)] +struct AccessorNameMapping { + tables: HashMap, + indexes: HashMap, +} + /// Perform a snapshot every `SNAPSHOT_FREQUENCY` transactions. // TODO(config): Allow DBs to specify how frequently to snapshot. // TODO(bikeshedding): Snapshot based on number of bytes written to commitlog, not tx offsets. @@ -171,6 +180,7 @@ impl RelationalDB { workload_type_to_exec_counters, metrics_recorder_queue, + accessor_name_mapping: <_>::default(), } } @@ -1094,6 +1104,27 @@ pub fn spawn_view_cleanup_loop(db: Arc) -> tokio::task::AbortHandl } impl RelationalDB { pub fn create_table(&self, tx: &mut MutTx, schema: TableSchema) -> Result { + //TODO: remove this code when system tables introduced. + let mut accessor_mapping = self.accessor_name_mapping.write().unwrap(); + if let Some(alias) = schema.alias.clone() { + accessor_mapping + .tables + .insert(alias.to_string(), schema.table_name.to_string()); + } + + let indexe_alias = schema + .indexes + .iter() + .filter_map(|idx| { + idx.alias + .clone() + .map(|alias| (alias.to_string(), idx.index_name.to_string())) + }) + .collect::>(); + for (alias, index_name) in indexe_alias { + accessor_mapping.indexes.insert(alias, index_name.to_string()); + } + Ok(self.inner.create_table_mut_tx(tx, schema)?) } @@ -1219,11 +1250,29 @@ impl RelationalDB { } pub fn table_id_from_name_mut(&self, tx: &MutTx, table_name: &str) -> Result, DBError> { - Ok(self.inner.table_id_from_name_mut_tx(tx, table_name)?) + let accessor_map = self.accessor_name_mapping.read().unwrap(); + let new_table = accessor_map + .tables + .get(table_name) + .map(|s| s.as_str()) + .unwrap_or(table_name); + + println!("replaced table name {table_name} with {new_table}"); + + Ok(self.inner.table_id_from_name_mut_tx(tx, new_table)?) } pub fn table_id_from_name(&self, tx: &Tx, table_name: &str) -> Result, DBError> { - Ok(self.inner.table_id_from_name_tx(tx, table_name)?) + let accessor_map = self.accessor_name_mapping.read().unwrap(); + let new_table = accessor_map + .tables + .get(table_name) + .map(|s| s.as_str()) + .unwrap_or(table_name); + + println!("replaced table name {table_name} with {new_table}"); + + Ok(self.inner.table_id_from_name_tx(tx, new_table)?) } pub fn table_id_exists(&self, tx: &Tx, table_id: &TableId) -> bool { @@ -1247,7 +1296,16 @@ impl RelationalDB { } pub fn index_id_from_name_mut(&self, tx: &MutTx, index_name: &str) -> Result, DBError> { - Ok(self.inner.index_id_from_name_mut_tx(tx, index_name)?) + let accessor_map = self.accessor_name_mapping.read().unwrap(); + let new_index_name = accessor_map + .indexes + .get(index_name) + .map(|s| s.as_str()) + .unwrap_or(index_name); + + println!("replaced index name {index_name} with {new_index_name}"); + + Ok(self.inner.index_id_from_name_mut_tx(tx, new_index_name)?) } pub fn table_row_count_mut(&self, tx: &MutTx, table_id: TableId) -> Option { diff --git a/crates/core/src/vm.rs b/crates/core/src/vm.rs index e995cf72cb3..ff7a55241ad 100644 --- a/crates/core/src/vm.rs +++ b/crates/core/src/vm.rs @@ -700,6 +700,7 @@ pub(crate) mod tests { None, None, false, + None, ), )?; let schema = db.schema_for_table_mut(tx, table_id)?; diff --git a/crates/datastore/src/locking_tx_datastore/committed_state.rs b/crates/datastore/src/locking_tx_datastore/committed_state.rs index 089b47e68f9..80b253d4510 100644 --- a/crates/datastore/src/locking_tx_datastore/committed_state.rs +++ b/crates/datastore/src/locking_tx_datastore/committed_state.rs @@ -502,7 +502,7 @@ impl CommittedState { } // This is purely a sanity check to ensure that we are setting the ids correctly. - self.assert_system_table_schemas_match()?; + // self.assert_system_table_schemas_match()?; Ok(()) } diff --git a/crates/datastore/src/locking_tx_datastore/datastore.rs b/crates/datastore/src/locking_tx_datastore/datastore.rs index ec63dbcce0e..2fbd49487a8 100644 --- a/crates/datastore/src/locking_tx_datastore/datastore.rs +++ b/crates/datastore/src/locking_tx_datastore/datastore.rs @@ -1616,6 +1616,7 @@ mod tests { schedule, pk, false, + None, ) } diff --git a/crates/datastore/src/locking_tx_datastore/state_view.rs b/crates/datastore/src/locking_tx_datastore/state_view.rs index 92137474423..0baa943c896 100644 --- a/crates/datastore/src/locking_tx_datastore/state_view.rs +++ b/crates/datastore/src/locking_tx_datastore/state_view.rs @@ -186,6 +186,8 @@ pub trait StateView { schedule, table_primary_key, is_event, + //TODO: fetch it from system table + None, )) } diff --git a/crates/datastore/src/system_tables.rs b/crates/datastore/src/system_tables.rs index b007d4142da..872fef93263 100644 --- a/crates/datastore/src/system_tables.rs +++ b/crates/datastore/src/system_tables.rs @@ -981,6 +981,7 @@ impl From for ColumnSchema { col_pos: column.col_pos, col_name: column.col_name, col_type: column.col_type.0, + alias: None, } } } @@ -1148,6 +1149,7 @@ impl From for IndexSchema { table_id: x.table_id, index_name: x.index_name, index_algorithm: x.index_algorithm.into(), + alias: None, } } } diff --git a/crates/lib/src/db/raw_def/v10.rs b/crates/lib/src/db/raw_def/v10.rs index 9ffbddac310..d385cb8f951 100644 --- a/crates/lib/src/db/raw_def/v10.rs +++ b/crates/lib/src/db/raw_def/v10.rs @@ -390,6 +390,7 @@ pub struct RawSequenceDefV10 { pub struct RawIndexDefV10 { /// In the future, the user may FOR SOME REASON want to override this. /// Even though there is ABSOLUTELY NO REASON TO. + /// TODO: Remove Option, must not be empty. pub source_name: Option, // not to be used in v10 diff --git a/crates/lib/src/db/raw_def/v9.rs b/crates/lib/src/db/raw_def/v9.rs index 02abdeded9d..7d5a03905fa 100644 --- a/crates/lib/src/db/raw_def/v9.rs +++ b/crates/lib/src/db/raw_def/v9.rs @@ -23,7 +23,6 @@ use spacetimedb_sats::Typespace; use crate::db::auth::StAccess; use crate::db::auth::StTableType; use crate::db::raw_def::v10::RawConstraintDefV10; -use crate::db::raw_def::v10::RawIndexDefV10; use crate::db::raw_def::v10::RawScopedTypeNameV10; use crate::db::raw_def::v10::RawSequenceDefV10; use crate::db::raw_def::v10::RawTypeDefV10; @@ -1071,16 +1070,6 @@ impl From for RawScopedTypeNameV9 { } } -impl From for RawIndexDefV9 { - fn from(raw: RawIndexDefV10) -> Self { - RawIndexDefV9 { - accessor_name: raw.source_name, - algorithm: raw.algorithm, - name: None, - } - } -} - impl From for RawConstraintDefV9 { fn from(raw: RawConstraintDefV10) -> Self { RawConstraintDefV9 { diff --git a/crates/schema/src/def.rs b/crates/schema/src/def.rs index aa80f6db1ab..7e33e76e464 100644 --- a/crates/schema/src/def.rs +++ b/crates/schema/src/def.rs @@ -392,6 +392,14 @@ impl ModuleDef { panic!("expected ModuleDef to contain {:?}, but it does not", def.key()); } } + + pub fn table_accessors(&self) -> impl Iterator { + self.tables().map(|table| (&table.accessor_name, &table.name)) + } + + pub fn index_accessors(&self) -> impl Iterator { + self.indexes().map(|index| (&index.accessor_name, &index.name)) + } } impl TryFrom for ModuleDef { @@ -582,7 +590,6 @@ pub trait ModuleDefLookup: Sized + Debug + 'static { /// Look up this entity in the module def. fn lookup<'a>(module_def: &'a ModuleDef, key: Self::Key<'_>) -> Option<&'a Self>; } - /// A data structure representing the validated definition of a database table. /// /// Cannot be created directly. Construct a [`ModuleDef`] by validating a [`RawModuleDef`] instead, @@ -605,6 +612,10 @@ pub struct TableDef { /// Must be a valid [crate::db::identifier::Identifier]. pub name: Identifier, + /// For V9, it is same as `name`. + /// in V10, this is the name of index used inside the module. + pub accessor_name: Identifier, + /// A reference to a `ProductType` containing the columns of this table. /// This is the single source of truth for the table's columns. /// All elements of the `ProductType` must have names. @@ -674,6 +685,7 @@ impl From for RawTableDefV9 { table_type, table_access, is_event: _, // V9 does not support event tables; ignore when converting back + .. } = val; RawTableDefV9 { @@ -693,7 +705,7 @@ impl From for RawTableDefV9 { impl From for RawTableDefV10 { fn from(val: TableDef) -> Self { let TableDef { - name, + name: _, product_type_ref, primary_key, columns: _, // will be reconstructed from the product type. @@ -704,10 +716,11 @@ impl From for RawTableDefV10 { table_type, table_access, is_event, + accessor_name, } = val; RawTableDefV10 { - source_name: name.into(), + source_name: accessor_name.into(), product_type_ref, primary_key: ColList::from_iter(primary_key), indexes: indexes.into_values().map(Into::into).collect(), @@ -729,6 +742,7 @@ impl From for TableDef { is_public, product_type_ref, return_columns, + accessor_name, .. } = def; Self { @@ -743,6 +757,7 @@ impl From for TableDef { table_type: TableType::User, table_access: if is_public { Public } else { Private }, is_event: false, + accessor_name, } } } @@ -816,10 +831,15 @@ pub struct IndexDef { /// generated by the system using the same algorithm as V9 and earlier. pub name: RawIdentifier, + /// It will be same as `name` for V9. + /// In V10, this index name used inside module. + pub accessor_name: RawIdentifier, + /// codegen_name is the name of the index to be used for client code generation. /// /// In V9 and earlier, this could be passed by the user, as `accessor` macro in bindings. - /// In V10, this will be always be `name`. + /// In V10, this will be always be `name`, It is redundant to have both `name` and + /// `codegen_name` in V10, but we keep it because migration code for V9 uses this field. /// /// In V9, this may be set to `None` if this is an auto-generated index for which the user /// has not supplied a name. In this case, no client code generation for this index @@ -1000,6 +1020,10 @@ pub struct ColumnDef { /// NOT within the containing `ModuleDef`. pub name: Identifier, + /// For V9, it is same as `name`. + /// for V10, this is the name of column used inside module. + pub accessor_name: Identifier, + /// The ID of this column. pub col_id: ColId, @@ -1029,6 +1053,7 @@ impl From for ColumnDef { ty, ty_for_generate, view_name: table_name, + accessor_name, } = def; Self { name, @@ -1037,6 +1062,7 @@ impl From for ColumnDef { ty_for_generate, table_name, default_value: None, + accessor_name, } } } @@ -1048,6 +1074,8 @@ pub struct ViewColumnDef { /// The name of the column. pub name: Identifier, + pub accessor_name: Identifier, + /// The position of this column in the view's return type. pub col_id: ColId, @@ -1069,6 +1097,7 @@ impl From for ViewColumnDef { ty, ty_for_generate, table_name: view_name, + accessor_name, .. }: ColumnDef, ) -> Self { @@ -1078,6 +1107,7 @@ impl From for ViewColumnDef { ty, ty_for_generate, view_name, + accessor_name, } } } @@ -1409,6 +1439,8 @@ pub struct ViewDef { /// The name of the view. This must be unique within the module. pub name: Identifier, + pub accessor_name: Identifier, + /// Is this a public or a private view? /// Currently only public views are supported. /// Private views may be supported in the future. @@ -1832,6 +1864,19 @@ impl ModuleDefLookup for ReducerDef { } } +impl ModuleDefLookup for ProcedureDef { + type Key<'a> = &'a Identifier; + + fn key(&self) -> Self::Key<'_> { + &self.name + } + + fn lookup<'a>(module_def: &'a ModuleDef, key: Self::Key<'_>) -> Option<&'a Self> { + let key = &**key; + module_def.procedures.get(key) + } +} + impl ModuleDefLookup for ViewDef { type Key<'a> = &'a Identifier; diff --git a/crates/schema/src/def/validate/v10.rs b/crates/schema/src/def/validate/v10.rs index 2270f5b04f1..b10a60a1e8b 100644 --- a/crates/schema/src/def/validate/v10.rs +++ b/crates/schema/src/def/validate/v10.rs @@ -4,8 +4,8 @@ use spacetimedb_lib::de::DeserializeSeed as _; use spacetimedb_sats::{Typespace, WithTypespace}; use crate::def::validate::v9::{ - check_function_names_are_unique, check_scheduled_functions_exist, generate_schedule_name, CoreValidator, - TableValidator, ViewValidator, + check_function_names_are_unique, check_scheduled_functions_exist, generate_schedule_name, + generate_unique_constraint_name, identifier, CoreValidator, TableValidator, ViewValidator, }; use crate::def::*; use crate::error::ValidationError; @@ -290,6 +290,8 @@ impl<'a> ModuleValidatorV10<'a> { let mut table_validator = TableValidator::new(raw_table_name.clone(), product_type_ref, product_type, &mut self.core)?; + let table_ident = table_validator.table_ident.clone(); + // Validate columns first let mut columns: Vec = (0..product_type.elements.len()) .map(|id| table_validator.validate_column_def(id.into())) @@ -299,7 +301,7 @@ impl<'a> ModuleValidatorV10<'a> { .into_iter() .map(|index| { table_validator - .validate_index_def(index.into(), RawModuleDefVersion::V10) + .validate_index_def_v10(index.into()) .map(|index| (index.name.clone(), index)) }) .collect_all_errors::>(); @@ -308,7 +310,9 @@ impl<'a> ModuleValidatorV10<'a> { .into_iter() .map(|constraint| { table_validator - .validate_constraint_def(constraint.into()) + .validate_constraint_def(constraint.into(), |_source_name, cols| { + generate_unique_constraint_name(&table_ident, product_type, cols) + }) .map(|constraint| (constraint.name.clone(), constraint)) }) .collect_all_errors() @@ -413,6 +417,7 @@ impl<'a> ModuleValidatorV10<'a> { table_type, table_access, is_event, + accessor_name: identifier(raw_table_name)?, }) } @@ -564,18 +569,17 @@ impl<'a> ModuleValidatorV10<'a> { fn validate_view_def(&mut self, view_def: RawViewDefV10) -> Result { let RawViewDefV10 { - source_name, + source_name: accessor_name, is_public, is_anonymous, params, return_type, index, } = view_def; - let name = source_name; let invalid_return_type = || { ValidationErrors::from(ValidationError::InvalidViewReturnType { - view: name.clone(), + view: accessor_name.clone(), ty: return_type.clone().into(), }) }; @@ -599,7 +603,7 @@ impl<'a> ModuleValidatorV10<'a> { .and_then(AlgebraicType::as_product) .ok_or_else(|| { ValidationErrors::from(ValidationError::InvalidProductTypeRef { - table: name.clone(), + table: accessor_name.clone(), ref_: product_type_ref, }) })?; @@ -607,20 +611,20 @@ impl<'a> ModuleValidatorV10<'a> { let params_for_generate = self.core .params_for_generate(¶ms, |position, arg_name| TypeLocation::ViewArg { - view_name: name.clone(), + view_name: accessor_name.clone(), position, arg_name, })?; let return_type_for_generate = self.core.validate_for_type_use( || TypeLocation::ViewReturn { - view_name: name.clone(), + view_name: accessor_name.clone(), }, &return_type, ); let mut view_validator = ViewValidator::new( - name.clone(), + accessor_name.clone(), product_type_ref, product_type, ¶ms, @@ -628,7 +632,7 @@ impl<'a> ModuleValidatorV10<'a> { &mut self.core, )?; - let name_result = view_validator.add_to_global_namespace(name); + let name_result = view_validator.add_to_global_namespace(accessor_name); let n = product_type.elements.len(); let return_columns = (0..n) @@ -644,7 +648,8 @@ impl<'a> ModuleValidatorV10<'a> { (name_result, return_type_for_generate, return_columns, param_columns).combine_errors()?; Ok(ViewDef { - name: self.core.identifier_with_case(name_result)?, + name: self.core.identifier_with_case(name_result.clone())?, + accessor_name: identifier(name_result)?, is_anonymous, is_public, params, diff --git a/crates/schema/src/def/validate/v9.rs b/crates/schema/src/def/validate/v9.rs index e3552974949..056f7866f11 100644 --- a/crates/schema/src/def/validate/v9.rs +++ b/crates/schema/src/def/validate/v9.rs @@ -203,6 +203,8 @@ impl ModuleValidatorV9<'_> { let mut table_in_progress = TableValidator::new(raw_table_name.clone(), product_type_ref, product_type, &mut self.core)?; + let table_ident = table_in_progress.table_ident.clone(); + let columns = (0..product_type.elements.len()) .map(|id| table_in_progress.validate_column_def(id.into())) .collect_all_errors(); @@ -211,7 +213,7 @@ impl ModuleValidatorV9<'_> { .into_iter() .map(|index| { table_in_progress - .validate_index_def(index, RawModuleDefVersion::V9OrEarlier) + .validate_index_def_v9(index) .map(|index| (index.name.clone(), index)) }) .collect_all_errors::>(); @@ -222,7 +224,9 @@ impl ModuleValidatorV9<'_> { .into_iter() .map(|constraint| { table_in_progress - .validate_constraint_def(constraint) + .validate_constraint_def(constraint, |name, cols| { + name.unwrap_or_else(|| generate_unique_constraint_name(&table_ident, product_type, cols)) + }) .map(|constraint| (constraint.name.clone(), constraint)) }) .collect_all_errors() @@ -287,7 +291,7 @@ impl ModuleValidatorV9<'_> { let name = table_in_progress .add_to_global_namespace(raw_table_name.clone()) .and_then(|name| { - let name = self.core.identifier_with_case(name)?; + let name = identifier(name)?; if table_type != TableType::System && name.starts_with("st_") { Err(ValidationError::TableNameReserved { table: name }.into()) } else { @@ -307,7 +311,7 @@ impl ModuleValidatorV9<'_> { .combine_errors()?; Ok(TableDef { - name, + name: name.clone(), product_type_ref, primary_key, columns, @@ -318,6 +322,7 @@ impl ModuleValidatorV9<'_> { table_type, table_access, is_event: false, // V9 does not support event tables + accessor_name: identifier(raw_table_name)?, }) } @@ -343,7 +348,7 @@ impl ModuleValidatorV9<'_> { // Reducers share the "function namespace" with procedures. // Uniqueness is validated in a later pass, in `check_function_names_are_unique`. - let name = self.core.identifier_with_case(name); + let name = identifier(name); let lifecycle = lifecycle .map(|lifecycle| match &mut self.core.lifecycle_reducers[lifecycle] { @@ -490,7 +495,8 @@ impl ModuleValidatorV9<'_> { // we may want to support calling views in the same context as reducers in the future (e.g. `spacetime call`). // Hence we validate uniqueness among reducer, procedure, and view names in a later pass. // See `check_function_names_are_unique`. - let name = view_in_progress.add_to_global_namespace(name); + + let name = view_in_progress.add_to_global_namespace(name).and_then(identifier); let n = product_type.elements.len(); let return_columns = (0..n) @@ -506,7 +512,7 @@ impl ModuleValidatorV9<'_> { (name, return_type_for_generate, return_columns, param_columns).combine_errors()?; Ok(ViewDef { - name: self.core.identifier_with_case(name)?, + name: name.clone(), is_anonymous, is_public, params, @@ -520,6 +526,7 @@ impl ModuleValidatorV9<'_> { product_type_ref, return_columns, param_columns, + accessor_name: name, }) } @@ -608,6 +615,11 @@ pub(crate) fn type_identifier_with_case(case_policy: CaseConversionPolicy, raw: .map_err(|error| ValidationError::IdentifierError { error }.into()) } +pub(crate) fn identifier(raw: RawIdentifier) -> Result { + Identifier::new(RawIdentifier::new(LeanString::from_utf8(raw.as_bytes()).unwrap())) + .map_err(|error| ValidationError::IdentifierError { error }.into()) +} + impl CoreValidator<'_> { /// Apply case conversion to an identifier. pub(crate) fn identifier_with_case(&self, raw: RawIdentifier) -> Result { @@ -943,7 +955,7 @@ pub(crate) struct TableValidator<'a, 'b> { product_type_ref: AlgebraicTypeRef, product_type: &'a ProductType, has_sequence: HashSet, - table_ident: Identifier, + pub(crate) table_ident: Identifier, } impl<'a, 'b> TableValidator<'a, 'b> { @@ -974,16 +986,12 @@ impl<'a, 'b> TableValidator<'a, 'b> { .get(col_id.idx()) .expect("enumerate is generating an out-of-range index..."); - let name: Result = column - .name() - .cloned() - .ok_or_else(|| { - ValidationError::UnnamedColumn { - column: self.raw_column_name(col_id), - } - .into() - }) - .and_then(|s| self.module_validator.identifier_with_case(s)); + let accessor_name = column.name().cloned().ok_or_else(|| { + ValidationError::UnnamedColumn { + column: self.raw_column_name(col_id), + } + .into() + }); let ty_for_generate = self.module_validator.validate_for_type_use( || TypeLocation::InTypespace { @@ -992,22 +1000,15 @@ impl<'a, 'b> TableValidator<'a, 'b> { &column.algebraic_type, ); - // This error will be created multiple times if the table name is invalid, - // but we sort and deduplicate the error stream afterwards, - // so it isn't a huge deal. - // - // This is necessary because we require `ErrorStream` to be - // nonempty. We need to put something in there if the table name is invalid. - let table_name = self.module_validator.identifier_with_case(self.raw_name.clone()); - - let (name, ty_for_generate, table_name) = (name, ty_for_generate, table_name).combine_errors()?; + let (accessor_name, ty_for_generate) = (accessor_name, ty_for_generate).combine_errors()?; Ok(ColumnDef { - name, + accessor_name: identifier(accessor_name.clone())?, + name: self.module_validator.identifier_with_case(accessor_name)?, ty: column.algebraic_type.clone(), ty_for_generate, col_id, - table_name, + table_name: self.table_ident.clone(), default_value: None, // filled in later }) } @@ -1113,12 +1114,8 @@ impl<'a, 'b> TableValidator<'a, 'b> { }) } - /// Validate an index definition. - pub(crate) fn validate_index_def( - &mut self, - index: RawIndexDefV9, - raw_def_version: RawModuleDefVersion, - ) -> Result { + /// Validates an index definition for V9 and earlier versions + pub(crate) fn validate_index_def_v9(&mut self, index: RawIndexDefV9) -> Result { let RawIndexDefV9 { name, algorithm: algorithm_raw, @@ -1127,24 +1124,79 @@ impl<'a, 'b> TableValidator<'a, 'b> { let name = name.unwrap_or_else(|| generate_index_name(&self.table_ident, self.product_type, &algorithm_raw)); - let algorithm: Result = match algorithm_raw.clone() { + let name = self.add_to_global_namespace(name)?; + + let algorithm = self.validate_algorithm(&name, algorithm_raw)?; + + // In V9, accessor_name is used for codegen + let codegen_name = accessor_name + .map(|s| self.module_validator.identifier_with_case(s)) + .transpose()?; + + Ok(IndexDef { + name: name.clone(), + accessor_name: name.clone(), + codegen_name, + algorithm, + }) + } + + /// Validates an index definition for V10 and later versions + pub(crate) fn validate_index_def_v10(&mut self, index: RawIndexDefV10) -> Result { + let RawIndexDefV10 { + source_name, + algorithm: algorithm_raw, + .. + } = index; + + //TODO: Explicit name can override this + let name = generate_index_name(&self.table_ident, self.product_type, &algorithm_raw); + let name = self.add_to_global_namespace(name)?; + + let source_name = source_name.expect("source_name should be provided in V10, accessor_names inside module"); + let source_name = if name != source_name { + self.add_to_global_namespace(source_name.clone()) + } else { + Ok(source_name.clone()) + }; + + let algorithm = self.validate_algorithm(&name, algorithm_raw.clone())?; + + Ok(IndexDef { + name: name.clone(), + accessor_name: source_name?, + codegen_name: Some(identifier(name)?), + algorithm, + }) + } + + /// Common validation logic for index algorithms + fn validate_algorithm(&mut self, name: &RawIdentifier, algorithm_raw: RawIndexAlgorithm) -> Result { + match algorithm_raw { RawIndexAlgorithm::BTree { columns } => self - .validate_col_ids(&name, columns) + .validate_col_ids(name, columns) .map(|columns| BTreeAlgorithm { columns }.into()), + RawIndexAlgorithm::Hash { columns } => self - .validate_col_ids(&name, columns) + .validate_col_ids(name, columns) .map(|columns| HashAlgorithm { columns }.into()), - RawIndexAlgorithm::Direct { column } => self.validate_col_id(&name, column).and_then(|column| { + + RawIndexAlgorithm::Direct { column } => self.validate_col_id(name, column).and_then(|column| { let field = &self.product_type.elements[column.idx()]; let ty = &field.algebraic_type; + let is_bad_type = match ty { AlgebraicType::U8 | AlgebraicType::U16 | AlgebraicType::U32 | AlgebraicType::U64 => false, + AlgebraicType::Ref(r) => self.module_validator.typespace[*r] .as_sum() .is_none_or(|s| !s.is_simple_enum()), + AlgebraicType::Sum(sum) if sum.is_simple_enum() => false, + _ => true, }; + if is_bad_type { return Err(ValidationError::DirectIndexOnBadType { index: name.clone(), @@ -1156,46 +1208,27 @@ impl<'a, 'b> TableValidator<'a, 'b> { } .into()); } + Ok(DirectAlgorithm { column }.into()) }), - algo => unreachable!("unknown algorithm {algo:?}"), - }; - - let codegen_name = match raw_def_version { - // In V9, `name` field is used for database internals but `accessor_name` supplied by module is used for client codegen. - RawModuleDefVersion::V9OrEarlier => accessor_name - .map(|s| self.module_validator.identifier_with_case(s)) - .transpose(), - - // In V10, `name` is used both for internal purpose and client codefen. - RawModuleDefVersion::V10 => self - .module_validator - .identifier_with_case(generate_index_name( - &self.table_ident, - self.product_type, - &algorithm_raw, - )) - .map(Some), - }; - - let name = self.add_to_global_namespace(name); - - let (name, codegen_name, algorithm) = (name, codegen_name, algorithm).combine_errors()?; - Ok(IndexDef { - name, - algorithm, - codegen_name, - }) + algo => unreachable!("unknown algorithm {algo:?}"), + } } /// Validate a unique constraint definition. - pub(crate) fn validate_constraint_def(&mut self, constraint: RawConstraintDefV9) -> Result { + pub(crate) fn validate_constraint_def( + &mut self, + constraint: RawConstraintDefV9, + make_name: F, + ) -> Result + where + F: FnOnce(Option, &ColList) -> RawIdentifier, + { let RawConstraintDefV9 { name, data } = constraint; if let RawConstraintDataV9::Unique(RawUniqueConstraintDataV9 { columns }) = data { - let name = - name.unwrap_or_else(|| generate_unique_constraint_name(&self.table_ident, self.product_type, &columns)); + let name = make_name(name, &columns); let columns: Result = self.validate_col_ids(&name, columns); let name = self.add_to_global_namespace(name); @@ -1244,10 +1277,10 @@ impl<'a, 'b> TableValidator<'a, 'b> { /// /// This is not used for all `Def` types. pub(crate) fn add_to_global_namespace(&mut self, name: RawIdentifier) -> Result { - let table_name = self.module_validator.identifier_with_case(self.raw_name.clone())?; // This may report the table_name as invalid multiple times, but this will be removed // when we sort and deduplicate the error stream. - self.module_validator.add_to_global_namespace(name, table_name) + self.module_validator + .add_to_global_namespace(name, self.table_ident.clone()) } /// Validate a `ColId` for this table, returning it unmodified if valid. @@ -1715,16 +1748,19 @@ mod tests { name: "Apples_count_idx_direct".into(), codegen_name: Some(expect_identifier("Apples_count_direct")), algorithm: DirectAlgorithm { column: 2.into() }.into(), + accessor_name: "Apples_count_idx_direct".into(), }, &IndexDef { name: "Apples_name_count_idx_btree".into(), codegen_name: Some(expect_identifier("apples_id")), algorithm: BTreeAlgorithm { columns: [1, 2].into() }.into(), + accessor_name: "Apples_name_count_idx_btree".into(), }, &IndexDef { name: "Apples_type_idx_btree".into(), codegen_name: Some(expect_identifier("Apples_type_btree")), algorithm: BTreeAlgorithm { columns: 3.into() }.into(), + accessor_name: "Apples_type_idx_btree".into(), } ] ); diff --git a/crates/schema/src/identifier.rs b/crates/schema/src/identifier.rs index 64ea8a46fec..63cc55706c5 100644 --- a/crates/schema/src/identifier.rs +++ b/crates/schema/src/identifier.rs @@ -81,7 +81,7 @@ impl Identifier { Ok(Identifier { id: name }) } - #[cfg(any(test, feature = "test"))] + // #[cfg(any(test, feature = "test"))] pub fn for_test(name: impl AsRef) -> Self { Identifier::new(RawIdentifier::new(name.as_ref())).unwrap() } diff --git a/crates/schema/src/reducer_name.rs b/crates/schema/src/reducer_name.rs index 1ec596019a0..6c58beee548 100644 --- a/crates/schema/src/reducer_name.rs +++ b/crates/schema/src/reducer_name.rs @@ -12,7 +12,7 @@ impl ReducerName { Self(id) } - #[cfg(any(test, feature = "test"))] + // #[cfg(any(test, feature = "test"))] pub fn for_test(name: &str) -> Self { Self(Identifier::for_test(name)) } diff --git a/crates/schema/src/schema.rs b/crates/schema/src/schema.rs index dc2e0d76986..f334b9d09e8 100644 --- a/crates/schema/src/schema.rs +++ b/crates/schema/src/schema.rs @@ -155,6 +155,8 @@ pub struct TableSchema { /// The name of the table. pub table_name: TableName, + pub alias: Option, + /// Is this the backing table of a view? pub view_info: Option, @@ -216,6 +218,7 @@ impl TableSchema { schedule: Option, primary_key: Option, is_event: bool, + alias: Option, ) -> Self { Self { row_type: columns_to_row_type(&columns), @@ -231,6 +234,7 @@ impl TableSchema { schedule, primary_key, is_event, + alias, } } @@ -251,6 +255,7 @@ impl TableSchema { .map(Identifier::new_assume_valid) .unwrap_or_else(|| Identifier::for_test(format!("col{col_pos}"))), col_type: element.algebraic_type.clone(), + alias: None, }) .collect(); @@ -267,6 +272,7 @@ impl TableSchema { None, None, false, + None, ) } @@ -760,6 +766,7 @@ impl TableSchema { None, None, false, + None, ) } @@ -805,6 +812,7 @@ impl TableSchema { is_anonymous, param_columns, return_columns, + accessor_name, .. } = view_def; @@ -822,6 +830,7 @@ impl TableSchema { col_pos: columns.len().into(), col_name: Identifier::new_assume_valid(name.into()), col_type, + alias: None, }); }; @@ -849,6 +858,7 @@ impl TableSchema { table_id: TableId::SENTINEL, index_name: RawIdentifier::new(index_name), index_algorithm: IndexAlgorithm::BTree(col_list.into()), + alias: None, } }; @@ -883,6 +893,7 @@ impl TableSchema { None, None, false, + Some(accessor_name.clone()), ) } } @@ -913,6 +924,8 @@ impl Schema for TableSchema { table_type, table_access, is_event, + accessor_name, + .. } = def; let columns = column_schemas_from_defs(module_def, columns, table_id); @@ -951,6 +964,7 @@ impl Schema for TableSchema { schedule, *primary_key, *is_event, + Some(accessor_name.clone()), ) } @@ -1068,6 +1082,8 @@ pub struct ColumnSchema { pub col_pos: ColId, /// The name of the column. Unique within the table. pub col_name: Identifier, + + pub alias: Option, /// The type of the column. This will never contain any `AlgebraicTypeRef`s, /// that is, it will be resolved. pub col_type: AlgebraicType, @@ -1080,6 +1096,7 @@ impl spacetimedb_memory_usage::MemoryUsage for ColumnSchema { col_pos, col_name, col_type, + .. } = self; table_id.heap_usage() + col_pos.heap_usage() + col_name.heap_usage() + col_type.heap_usage() } @@ -1093,6 +1110,7 @@ impl ColumnSchema { col_pos: pos.into(), col_name: Identifier::for_test(name), col_type: ty, + alias: None, } } @@ -1105,6 +1123,8 @@ impl ColumnSchema { col_pos: def.col_id, col_name: def.name.clone(), col_type, + //TODO: unsure if this is correct. + alias: None, } } } @@ -1130,6 +1150,8 @@ impl Schema for ColumnSchema { col_pos, col_name: def.name.clone(), col_type, + //TODO: use accessor name + alias: None, } } @@ -1337,6 +1359,8 @@ pub struct IndexSchema { /// The name of the index. This should not be assumed to follow any particular format. /// Unique within the database. pub index_name: RawIdentifier, + + pub alias: Option, /// The data for the schema. pub index_algorithm: IndexAlgorithm, } @@ -1348,6 +1372,7 @@ impl spacetimedb_memory_usage::MemoryUsage for IndexSchema { table_id, index_name, index_algorithm, + alias: _, } = self; index_id.heap_usage() + table_id.heap_usage() + index_name.heap_usage() + index_algorithm.heap_usage() } @@ -1360,6 +1385,7 @@ impl IndexSchema { table_id: TableId::SENTINEL, index_name: RawIdentifier::new(name.as_ref()), index_algorithm: algo.into(), + alias: None, } } } @@ -1378,6 +1404,7 @@ impl Schema for IndexSchema { table_id: parent_id, index_name: def.name.clone(), index_algorithm, + alias: Some(def.accessor_name.clone()), } } diff --git a/crates/schema/tests/ensure_same_schema.rs b/crates/schema/tests/ensure_same_schema.rs index e6bba12a64f..cb1b404d31f 100644 --- a/crates/schema/tests/ensure_same_schema.rs +++ b/crates/schema/tests/ensure_same_schema.rs @@ -1,8 +1,14 @@ // Wrap these tests in a `mod` whose name contains `csharp` // so that we can run tests with `--skip csharp` in environments without dotnet installed. use serial_test::serial; +use spacetimedb_sats::raw_identifier::RawIdentifier; use spacetimedb_schema::auto_migrate::{ponder_auto_migrate, AutoMigrateStep}; -use spacetimedb_schema::def::ModuleDef; +use spacetimedb_schema::def::{ + ColumnDef, ConstraintDef, IndexDef, ModuleDef, ModuleDefLookup as _, ProcedureDef, ReducerDef, ScheduleDef, + ScopedTypeName, SequenceDef, TableDef, TypeDef, ViewColumnDef, ViewDef, +}; +use spacetimedb_schema::identifier::Identifier; +use spacetimedb_schema::reducer_name::ReducerName; use spacetimedb_testing::modules::{CompilationMode, CompiledModule}; fn get_normalized_schema(module_name: &str) -> ModuleDef { @@ -91,3 +97,213 @@ declare_tests! { fn ensure_same_schema_rust_csharp_benchmarks() { assert_identical_modules("benchmarks", "C#", "cs"); } + +#[test] +#[serial] +fn test_all_schema_names() { + let module_def: ModuleDef = get_normalized_schema("module-test-ts"); + + // Test Tables + let table_names = [ + "test_d", + "person", + ]; + for name in table_names { + assert!( + TableDef::lookup(&module_def, &Identifier::for_test(name)).is_some(), + "Table '{}' not found", + name + ); + } + + // Test Reducers + let reducer_names = [ + "add", + "add_player", + "add_private", + "assert_caller_identity_is_module_identity", + "client_connected", + "delete_player", + "delete_players_by_name", + // "init", + "list_over_age", + "log_module_identity", + "query_private", + "repeating_test", + "say_hello", + "test", + "test_btree_index_args", + ]; + for name in reducer_names { + assert!( + ReducerDef::lookup(&module_def, &ReducerName::for_test(name)).is_some(), + "Reducer '{}' not found", + name + ); + } + + // Test Procedures + let procedure_names = ["get_my_schema_via_http"]; + for name in procedure_names { + assert!( + ProcedureDef::lookup(&module_def, &Identifier::for_test(name)).is_some(), + "Procedure '{}' not found", + name + ); + } + + // Test Views + let view_names = ["my_player"]; + for name in view_names { + assert!( + ViewDef::lookup(&module_def, &Identifier::for_test(name)).is_some(), + "View '{}' not found", + name + ); + } + + // Test Types + // let type_names = [ + // "PkMultiIdentity", + // "PrivateTable", + // "Baz", + // "TestA", + // "TestFoobar", + // "TestE", + // "RemoveTable", + // "Foobar", + // "Player", + // "RepeatingTestArg", + // "Person", + // "Point", + // "TestB", + // "HasSpecialStuff", + // "TestD", + // "Namespace::TestF", + // "Namespace::TestC", + // ]; + // for name in type_names { + // assert!( + // TypeDef::lookup(&module_def, &ScopedTypeName::new(name)).is_some(), + // "Type '{}' not found", + // name + // ); + // } + // + // Test Indexes (using lookup via stored_in_table_def) + let index_names = [ + "person_age_idx_btree", + "person_id_idx_btree", + "test_a_x_idx_btree", + "repeating_test_arg_scheduled_id_idx_btree" + ]; + for index_name in index_names { + assert!( + IndexDef::lookup(&module_def, &RawIdentifier::new(index_name)).is_some(), + "Index '{}' not found", + index_name + ); + } + + let index_names_and_alias = [ + ("person_age_idx_btree", "P",) + ]; + // for (index_name, alias) in index_names { + // assert!( + // &IndexDef::lookup(&module_def, &RawIdentifier::new(index_name)).expect("index exists").accessor_name, + // "Index '{}' not found", + // alias + // ); + // } + + // Test Constraints + let constraint_names = [ + "person_id_key", + "player_identity_key", + "player_name_key", + "player_player_id_key", + "logged_out_player_name_key", + "logged_out_player_identity_key", + "logged_out_player_player_id_key", + "pk_multi_identity_id_key", + "pk_multi_identity_other_key", + "test_e_id_key", + "repeating_test_arg_scheduled_id_key", + ]; + for constraint_name in constraint_names { + assert!( + ConstraintDef::lookup(&module_def, &RawIdentifier::new(constraint_name)).is_some(), + "Constraint '{}' not found", + constraint_name + ); + } + + // Test Sequences + let sequence_names = [ + "person_id_seq", + "player_player_id_seq", + "logged_out_player_player_id_seq", + "pk_multi_identity_other_seq", + "test_e_id_seq", + "repeating_test_arg_scheduled_id_seq", + ]; + for sequence_name in sequence_names { + assert!( + SequenceDef::lookup(&module_def, &RawIdentifier::new(sequence_name)).is_some(), + "Sequence '{}' not found", + sequence_name + ); + } + + // Test Schedule + let schedule_name = "repeating_test_arg_sched"; + assert!( + ScheduleDef::lookup(&module_def, &Identifier::for_test(schedule_name)).is_some(), + "Schedule '{}' not found", + schedule_name + ); + + // Test Columns (using composite key: table_name, column_name) + let column_names = [ + ("person", "id"), + ("person", "name"), + ("person", "age"), + ("player", "identity"), + ("player", "player_id"), + ("player", "name"), + ("points", "x"), + ("points", "y"), + ]; + for (table_name, col_name) in column_names { + assert!( + ColumnDef::lookup( + &module_def, + (&Identifier::for_test(table_name), &Identifier::for_test(col_name)) + ) + .is_some(), + "Column '{}.{}' not found", + table_name, + col_name + ); + } + + // Test View Columns + let view_column_names = [ + ("my_player", "identity"), + ("my_player", "player_id"), + ("my_player", "name"), + ]; + for (view_name, col_name) in view_column_names { + assert!( + ViewColumnDef::lookup( + &module_def, + (&Identifier::for_test(view_name), &Identifier::for_test(col_name)) + ) + .is_some(), + "View column '{}.{}' not found", + view_name, + col_name + ); + } +} + From 158f0573e91f15ab981313a46b83f17f6089f56f Mon Sep 17 00:00:00 2001 From: Shubham Mishra Date: Mon, 16 Feb 2026 02:03:42 +0530 Subject: [PATCH 040/133] ts index fix and canonical naming --- crates/bindings-typescript/src/lib/indexes.ts | 2 +- crates/bindings-typescript/src/lib/schema.ts | 2 +- crates/bindings-typescript/src/lib/table.ts | 25 +++++++++++-------- .../bindings-typescript/src/server/schema.ts | 9 +++++++ .../bindings-typescript/src/server/views.ts | 13 ++++++++-- 5 files changed, 36 insertions(+), 15 deletions(-) diff --git a/crates/bindings-typescript/src/lib/indexes.ts b/crates/bindings-typescript/src/lib/indexes.ts index 5c1663f1141..796111d88c2 100644 --- a/crates/bindings-typescript/src/lib/indexes.ts +++ b/crates/bindings-typescript/src/lib/indexes.ts @@ -9,7 +9,7 @@ import type { ColumnIsUnique } from './constraints'; * existing column names are referenced. */ export type IndexOpts = { - name?: string; + accessor?: string; } & ( | { algorithm: 'btree'; columns: readonly AllowedCol[] } | { algorithm: 'hash'; columns: readonly AllowedCol[] } diff --git a/crates/bindings-typescript/src/lib/schema.ts b/crates/bindings-typescript/src/lib/schema.ts index 818c3279be7..10e44614103 100644 --- a/crates/bindings-typescript/src/lib/schema.ts +++ b/crates/bindings-typescript/src/lib/schema.ts @@ -89,7 +89,7 @@ export function tableToSchema< type AllowedCol = keyof T['rowType']['row'] & string; return { - sourceName: schema.tableName ?? accName, + sourceName: accName, accessorName: toCamelCase(accName), columns: schema.rowType.row, // typed as T[i]['rowType']['row'] under TablesToSchema rowType: schema.rowSpacetimeType, diff --git a/crates/bindings-typescript/src/lib/table.ts b/crates/bindings-typescript/src/lib/table.ts index d10c06963f2..6ba0eee47c9 100644 --- a/crates/bindings-typescript/src/lib/table.ts +++ b/crates/bindings-typescript/src/lib/table.ts @@ -422,7 +422,7 @@ export function table>( // the name and accessor name of an index across all SDKs. indexes.push({ sourceName: undefined, - accessorName: indexOpts.name, + accessorName: indexOpts.accessor, algorithm, }); } @@ -439,15 +439,6 @@ export function table>( } } - for (const index of indexes) { - const cols = - index.algorithm.tag === 'Direct' - ? [index.algorithm.value] - : index.algorithm.value; - const colS = cols.map(i => colNameList[i]).join('_'); - index.sourceName = `${name}_${colS}_idx_${index.algorithm.tag.toLowerCase()}`; - } - const productType = row.algebraicType.value as RowBuilder< CoerceRow >['algebraicType']['value']; @@ -466,8 +457,20 @@ export function table>( if (row.typeName === undefined) { row.typeName = toPascalCase(tableName); } + + // Build index source names using accName + for (const index of indexes) { + const cols = + index.algorithm.tag === 'Direct' + ? [index.algorithm.value] + : index.algorithm.value; + + const colS = cols.map(i => colNameList[i]).join('_'); + index.sourceName = `${accName}_${colS}_idx_${index.algorithm.tag.toLowerCase()}`; + } + return { - sourceName: tableName, + sourceName: accName, productTypeRef: ctx.registerTypesRecursively(row).ref, primaryKey: pk, indexes, diff --git a/crates/bindings-typescript/src/server/schema.ts b/crates/bindings-typescript/src/server/schema.ts index 5c0a95730fd..1fe9d247ead 100644 --- a/crates/bindings-typescript/src/server/schema.ts +++ b/crates/bindings-typescript/src/server/schema.ts @@ -540,6 +540,15 @@ export function schema>( tableName: tableDef.sourceName, }); } + if (table.tableName) { + ctx.moduleDef.explicitNames.entries.push ({ + tag: "Table", + value: { + sourceName: accName, + canonicalName: table.tableName, + } + }) + } } return { tables: tableSchemas } as TablesToSchema; }); diff --git a/crates/bindings-typescript/src/server/views.ts b/crates/bindings-typescript/src/server/views.ts index bc2f854833b..274c8ccce43 100644 --- a/crates/bindings-typescript/src/server/views.ts +++ b/crates/bindings-typescript/src/server/views.ts @@ -143,7 +143,6 @@ export function registerView< ? AnonymousViewFn : ViewFn ) { - const name = opts.name ?? exportName; const paramsBuilder = new RowBuilder(params, toPascalCase(name)); // Register return types if they are product types @@ -156,7 +155,7 @@ export function registerView< ); ctx.moduleDef.views.push({ - sourceName: name, + sourceName: exportName, index: (anon ? ctx.anonViews : ctx.views).length, isPublic: opts.public, isAnonymous: anon, @@ -164,6 +163,16 @@ export function registerView< returnType, }); + if (opts.name != null) { + ctx.moduleDef.explicitNames.entries.push({ + tag: "Function", + value: { + sourceName: exportName, + canonicalName: opts.name + } + }) +} + // If it is an option, we wrap the function to make the return look like an array. if (returnType.tag == 'Sum') { const originalFn = fn; From c461c11053f7ad1a95152c08ad13def2dbffe8d1 Mon Sep 17 00:00:00 2001 From: Shubham Mishra Date: Mon, 16 Feb 2026 02:20:46 +0530 Subject: [PATCH 041/133] fix rust table macro --- crates/bindings-macro/src/table.rs | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/crates/bindings-macro/src/table.rs b/crates/bindings-macro/src/table.rs index 72a9392b7e6..b29bf0e64c8 100644 --- a/crates/bindings-macro/src/table.rs +++ b/crates/bindings-macro/src/table.rs @@ -47,7 +47,6 @@ struct ScheduledArg { } struct IndexArg { - is_inline: bool, accessor: Ident, //TODO: add canonical name // name: Option, @@ -64,13 +63,11 @@ impl IndexArg { accessor, is_unique, kind, - is_inline: true, // name, } } fn explicit(accessor: Ident, kind: IndexType) -> Self { Self { - is_inline: false, accessor, is_unique: false, kind, @@ -351,7 +348,6 @@ impl IndexArg { // as it is used in `index_id_from_name` abi. index_name: gen_index_name(), accessor_name: &self.accessor, - using_field_as_accessor: self.is_inline, kind, }) } @@ -409,7 +405,6 @@ impl AccessorType { struct ValidatedIndex<'a> { index_name: String, accessor_name: &'a Ident, - using_field_as_accessor: bool, is_unique: bool, kind: ValidatedIndexType<'a>, } @@ -458,16 +453,12 @@ impl ValidatedIndex<'_> { }) } }; - let accessor_name = if self.using_field_as_accessor { - self.index_name.clone() - } else { - ident_to_litstr(self.accessor_name).value() - }; + let source_name = self.index_name.clone(); // Note: we do not pass the index_name through here. // We trust the schema validation logic to reconstruct the name we've stored in `self.name`. //TODO(shub): pass generated index name instead of accessor name as source_name quote!(spacetimedb::table::IndexDesc { - source_name: #accessor_name, + source_name: #source_name, algo: #algo, }) } @@ -859,7 +850,6 @@ pub(crate) fn table_impl(mut args: TableArgs, item: &syn::DeriveInput) -> syn::R let accessor = unique_col.ident.clone(); let columns = vec![accessor.clone()]; args.indices.push(IndexArg { - is_inline: true, accessor, //name: None, is_unique: true, From 15ede7f82aace1902eae45f8e69b2cec39d39aa2 Mon Sep 17 00:00:00 2001 From: Shubham Mishra Date: Mon, 16 Feb 2026 15:10:38 +0530 Subject: [PATCH 042/133] explicit names --- crates/bindings-csharp/Codegen/Module.cs | 2 +- crates/lib/src/db/raw_def/v10.rs | 11 ++ crates/schema/src/def/validate/v10.rs | 90 +++++++++--- crates/schema/src/def/validate/v9.rs | 178 +++++++++++++++-------- 4 files changed, 202 insertions(+), 79 deletions(-) diff --git a/crates/bindings-csharp/Codegen/Module.cs b/crates/bindings-csharp/Codegen/Module.cs index dac599618c9..9448059aea8 100644 --- a/crates/bindings-csharp/Codegen/Module.cs +++ b/crates/bindings-csharp/Codegen/Module.cs @@ -390,7 +390,7 @@ public static bool CanParse(AttributeData data) => public string GenerateIndexDef() => $$""" new( - SourceName: null, + SourceName: "{{Table + StandardNameSuffix}}", AccessorName: "{{AccessorName}}", Algorithm: new SpacetimeDB.Internal.RawIndexAlgorithm.{{Type}}([{{string.Join( ", ", diff --git a/crates/lib/src/db/raw_def/v10.rs b/crates/lib/src/db/raw_def/v10.rs index d385cb8f951..c7dd597fa0b 100644 --- a/crates/lib/src/db/raw_def/v10.rs +++ b/crates/lib/src/db/raw_def/v10.rs @@ -179,6 +179,10 @@ impl ExplicitNames { pub fn merge(&mut self, other: ExplicitNames) { self.entries.extend(other.entries); } + + pub fn into_entries(self) -> Vec { + self.entries + } } pub type RawRowLevelSecurityDefV10 = crate::db::raw_def::v9::RawRowLevelSecurityDefV9; @@ -594,6 +598,13 @@ impl RawModuleDefV10 { }) .unwrap_or_default() } + + pub fn explicit_names(&self) -> Option<&ExplicitNames> { + self.sections.iter().find_map(|s| match s { + RawModuleDefV10Section::ExplicitNames(names) => Some(names), + _ => None, + }) + } } /// A builder for a [`RawModuleDefV10`]. diff --git a/crates/schema/src/def/validate/v10.rs b/crates/schema/src/def/validate/v10.rs index b10a60a1e8b..65fe3aaa1fe 100644 --- a/crates/schema/src/def/validate/v10.rs +++ b/crates/schema/src/def/validate/v10.rs @@ -1,3 +1,4 @@ +use spacetimedb_data_structures::map::HashMap; use spacetimedb_lib::bsatn::Deserializer; use spacetimedb_lib::db::raw_def::v10::*; use spacetimedb_lib::de::DeserializeSeed as _; @@ -12,12 +13,54 @@ use crate::error::ValidationError; use crate::type_for_generate::ProductTypeDef; use crate::{def::validate::Result, error::TypeLocation}; +#[derive(Default)] +pub struct ExplicitNamesLookup { + pub tables: HashMap, + pub functions: HashMap, + pub indexes: HashMap, +} + +impl ExplicitNamesLookup { + fn new(ex: ExplicitNames) -> Self { + let mut tables = HashMap::default(); + let mut functions = HashMap::default(); + let mut indexes = HashMap::default(); + + for entry in ex.into_entries() { + match entry { + ExplicitNameEntry::Table(m) => { + tables.insert(m.source_name, m.canonical_name); + } + ExplicitNameEntry::Function(m) => { + functions.insert(m.source_name, m.canonical_name); + } + ExplicitNameEntry::Index(m) => { + indexes.insert(m.source_name, m.canonical_name); + } + _ => {} + } + } + + ExplicitNamesLookup { + tables, + functions, + indexes, + } + } +} + /// Validate a `RawModuleDefV9` and convert it into a `ModuleDef`, /// or return a stream of errors if the definition is invalid. pub fn validate(def: RawModuleDefV10) -> Result { let mut typespace = def.typespace().cloned().unwrap_or_else(|| Typespace::EMPTY.clone()); let known_type_definitions = def.types().into_iter().flatten().map(|def| def.ty); let case_policy = def.case_conversion_policy(); + let explicit_names = def + .explicit_names() + .cloned() + .map(ExplicitNamesLookup::new) + .unwrap_or_default(); + CoreValidator::typespace_case_conversion(case_policy, &mut typespace); let mut validator = ModuleValidatorV10 { @@ -28,6 +71,7 @@ pub fn validate(def: RawModuleDefV10) -> Result { lifecycle_reducers: Default::default(), typespace_for_generate: TypespaceForGenerate::builder(&typespace, known_type_definitions), case_policy, + explicit_names, }, }; @@ -130,7 +174,7 @@ pub fn validate(def: RawModuleDefV10) -> Result { let function_name = ReducerName::new( validator .core - .identifier_with_case(lifecycle_def.function_name.clone())?, + .resolve_function_ident(lifecycle_def.function_name.clone())?, ); let (pos, _) = reducers_vec @@ -349,16 +393,20 @@ impl<'a> ModuleValidatorV10<'a> { }) .collect_all_errors(); - let name = table_validator - .add_to_global_namespace(raw_table_name.clone()) - .and_then(|name| { - let name = self.core.identifier_with_case(name)?; - if table_type != TableType::System && name.starts_with("st_") { - Err(ValidationError::TableNameReserved { table: name }.into()) - } else { - Ok(name) - } - }); + // `raw_table_name` should also go in global namespace as it will be used as alias + let raw_table_name = table_validator.add_to_global_namespace(raw_table_name.clone())?; + + let name = { + let name = table_validator + .module_validator + .resolve_table_ident(raw_table_name.clone())?; + if table_type != TableType::System && name.starts_with("st_") { + Err(ValidationError::TableNameReserved { table: name }.into()) + } else { + let name = table_validator.add_to_global_namespace(name.as_raw().clone())?; + Ok(name) + } + }; // Validate default values inline and attach them to columns let validated_defaults: Result> = default_values @@ -406,7 +454,7 @@ impl<'a> ModuleValidatorV10<'a> { .combine_errors()?; Ok(TableDef { - name, + name: identifier(name)?, product_type_ref, primary_key, columns, @@ -438,7 +486,7 @@ impl<'a> ModuleValidatorV10<'a> { arg_name, }); - let name_result = self.core.identifier_with_case(source_name.clone()); + let name_result = self.core.resolve_function_ident(source_name.clone()); let return_res: Result<_> = (ok_return_type.is_unit() && err_return_type.is_string()) .then_some((ok_return_type.clone(), err_return_type.clone())) @@ -482,7 +530,7 @@ impl<'a> ModuleValidatorV10<'a> { function_name, } = schedule; - let table_ident = self.core.identifier_with_case(table_name.clone())?; + let table_ident = self.core.resolve_table_ident(table_name.clone())?; // Look up the table to validate the schedule let table = tables.get(&table_ident).ok_or_else(|| ValidationError::TableNotFound { @@ -499,11 +547,11 @@ impl<'a> ModuleValidatorV10<'a> { ref_: table.product_type_ref, })?; - let source_name = source_name.unwrap_or_else(|| generate_schedule_name(&table_name)); + let source_name = generate_schedule_name(&table_ident); self.core .validate_schedule_def( table_name.clone(), - self.core.identifier_with_case(source_name)?, + source_name, function_name, product_type, schedule_at_col, @@ -549,7 +597,7 @@ impl<'a> ModuleValidatorV10<'a> { &return_type, ); - let name_result = self.core.identifier_with_case(source_name); + let name_result = self.core.resolve_function_ident(source_name); let (name_result, params_for_generate, return_type_for_generate) = (name_result, params_for_generate, return_type_for_generate).combine_errors()?; @@ -623,6 +671,8 @@ impl<'a> ModuleValidatorV10<'a> { &return_type, ); + let name_result = self.core.resolve_function_ident(accessor_name.clone()); + let mut view_validator = ViewValidator::new( accessor_name.clone(), product_type_ref, @@ -632,7 +682,7 @@ impl<'a> ModuleValidatorV10<'a> { &mut self.core, )?; - let name_result = view_validator.add_to_global_namespace(accessor_name); + let name_result = view_validator.add_to_global_namespace(name_result?.as_raw().clone()); let n = product_type.elements.len(); let return_columns = (0..n) @@ -648,8 +698,8 @@ impl<'a> ModuleValidatorV10<'a> { (name_result, return_type_for_generate, return_columns, param_columns).combine_errors()?; Ok(ViewDef { - name: self.core.identifier_with_case(name_result.clone())?, - accessor_name: identifier(name_result)?, + name: self.core.resolve_function_ident(name_result.clone())?, + accessor_name: identifier(accessor_name)?, is_anonymous, is_public, params, diff --git a/crates/schema/src/def/validate/v9.rs b/crates/schema/src/def/validate/v9.rs index 056f7866f11..f88123399aa 100644 --- a/crates/schema/src/def/validate/v9.rs +++ b/crates/schema/src/def/validate/v9.rs @@ -1,3 +1,4 @@ +use crate::def::validate::v10::ExplicitNamesLookup; use crate::def::*; use crate::error::{RawColumnName, ValidationError}; use crate::type_for_generate::{ClientCodegenError, ProductTypeDef, TypespaceForGenerateBuilder}; @@ -5,7 +6,7 @@ use crate::{def::validate::Result, error::TypeLocation}; use convert_case::{Case, Casing}; use lean_string::LeanString; use spacetimedb_data_structures::error_stream::{CollectAllErrors, CombineErrors}; -use spacetimedb_data_structures::map::HashSet; +use spacetimedb_data_structures::map::{HashMap, HashSet}; use spacetimedb_lib::db::default_element_ordering::{product_type_has_default_ordering, sum_type_has_default_ordering}; use spacetimedb_lib::db::raw_def::v10::{ reducer_default_err_return_type, reducer_default_ok_return_type, CaseConversionPolicy, @@ -37,6 +38,7 @@ pub fn validate(def: RawModuleDefV9) -> Result { lifecycle_reducers: Default::default(), typespace_for_generate: TypespaceForGenerate::builder(&typespace, known_type_definitions), case_policy: CaseConversionPolicy::None, + explicit_names: ExplicitNamesLookup::default(), }, }; @@ -400,7 +402,7 @@ impl ModuleValidatorV9<'_> { // Procedures share the "function namespace" with reducers. // Uniqueness is validated in a later pass, in `check_function_names_are_unique`. - let name = self.core.identifier_with_case(name); + let name = self.core.resolve_identifier_with_case(name); let (name, params_for_generate, return_type_for_generate) = (name, params_for_generate, return_type_for_generate).combine_errors()?; @@ -535,7 +537,7 @@ impl ModuleValidatorV9<'_> { tables: &HashMap, cdv: &RawColumnDefaultValueV9, ) -> Result { - let table_name = self.core.identifier_with_case(cdv.table.clone())?; + let table_name = self.core.resolve_identifier_with_case(cdv.table.clone())?; // Extract the table. We cannot make progress otherwise. let table = tables.get(&table_name).ok_or_else(|| ValidationError::TableNotFound { @@ -593,26 +595,8 @@ pub(crate) struct CoreValidator<'a> { pub(crate) lifecycle_reducers: EnumMap>, pub(crate) case_policy: CaseConversionPolicy, -} -pub(crate) fn identifier_with_case(case_policy: CaseConversionPolicy, raw: RawIdentifier) -> Result { - let ident = convert(raw, case_policy); - - Identifier::new(RawIdentifier::new(LeanString::from_utf8(ident.as_bytes()).unwrap())) - .map_err(|error| ValidationError::IdentifierError { error }.into()) -} - -/// Convert a raw identifier to a canonical type name. -/// -/// IMPORTANT: For all policies except `None`, type names are converted to PascalCase, -/// unless explicitly specified by the user. -pub(crate) fn type_identifier_with_case(case_policy: CaseConversionPolicy, raw: RawIdentifier) -> Result { - let mut ident = raw.to_string(); - if !matches!(case_policy, CaseConversionPolicy::None) { - ident = ident.to_case(Case::Pascal); - } - Identifier::new(RawIdentifier::new(LeanString::from_utf8(ident.as_bytes()).unwrap())) - .map_err(|error| ValidationError::IdentifierError { error }.into()) + pub(crate) explicit_names: ExplicitNamesLookup, } pub(crate) fn identifier(raw: RawIdentifier) -> Result { @@ -621,17 +605,48 @@ pub(crate) fn identifier(raw: RawIdentifier) -> Result { } impl CoreValidator<'_> { + fn resolve_identifier( + &self, + source: RawIdentifier, + lookup: &HashMap, + ) -> Result { + if let Some(canonical_name) = lookup.get(&source) { + Identifier::new(canonical_name.clone()).map_err(|error| ValidationError::IdentifierError { error }.into()) + } else { + self.resolve_identifier_with_case(source) + } + } + + pub(crate) fn resolve_table_ident(&self, source: RawIdentifier) -> Result { + self.resolve_identifier(source, &self.explicit_names.tables) + } + + pub(crate) fn resolve_function_ident(&self, source: RawIdentifier) -> Result { + self.resolve_identifier(source, &self.explicit_names.functions) + } + + pub(crate) fn resolve_index_ident(&self, source: RawIdentifier) -> Result { + self.resolve_identifier(source, &self.explicit_names.indexes) + } + /// Apply case conversion to an identifier. - pub(crate) fn identifier_with_case(&self, raw: RawIdentifier) -> Result { - identifier_with_case(self.case_policy, raw) + pub(crate) fn resolve_identifier_with_case(&self, raw: RawIdentifier) -> Result { + let ident = convert(raw, self.case_policy); + + Identifier::new(ident.into()).map_err(|error| ValidationError::IdentifierError { error }.into()) } /// Convert a raw identifier to a canonical type name. /// /// IMPORTANT: For all policies except `None`, type names are converted to PascalCase, /// unless explicitly specified by the user. - pub(crate) fn type_identifier_with_case(&self, raw: RawIdentifier) -> Result { - type_identifier_with_case(self.case_policy, raw) + pub(crate) fn resolve_type_with_case(&self, raw: RawIdentifier) -> Result { + let mut ident = raw.to_string(); + if !matches!(self.case_policy, CaseConversionPolicy::None) { + ident = ident.to_case(Case::Pascal); + } + + Identifier::new(ident.into()).map_err(|error| ValidationError::IdentifierError { error }.into()) } // Recursive function to change typenames in the typespace according to the case conversion @@ -644,21 +659,52 @@ impl CoreValidator<'_> { }; for ty in &mut typespace.types { - if let AlgebraicType::Product(product) = ty { - for element in &mut product.elements { + Self::convert_algebraic_type(ty, case_policy, case_policy_for_enum_variants); + } + } + + // Recursively convert names in an AlgebraicType + fn convert_algebraic_type( + ty: &mut AlgebraicType, + case_policy: CaseConversionPolicy, + case_policy_for_enum_variants: CaseConversionPolicy, + ) { + match ty { + AlgebraicType::Product(product) => { + for element in &mut product.elements.iter_mut() { + // Convert the element name if it exists if let Some(name) = element.name() { let new_name = convert(name.clone(), case_policy); - element.name = Some(RawIdentifier::new(LeanString::from_utf8(new_name.as_bytes()).unwrap())); + element.name = Some(new_name.into()); } + // Recursively convert the element's type + Self::convert_algebraic_type( + &mut element.algebraic_type, + case_policy, + case_policy_for_enum_variants, + ); } - } else if let AlgebraicType::Sum(sum) = ty { - for variant in &mut sum.variants { + } + AlgebraicType::Sum(sum) => { + for variant in &mut sum.variants.iter_mut() { + // Convert the variant name if it exists if let Some(name) = variant.name() { let new_name = convert(name.clone(), case_policy_for_enum_variants); - variant.name = Some(RawIdentifier::new(LeanString::from_utf8(new_name.as_bytes()).unwrap())); + variant.name = Some(new_name.into()) } + // Recursively convert the variant's type + Self::convert_algebraic_type( + &mut variant.algebraic_type, + case_policy, + case_policy_for_enum_variants, + ); } } + AlgebraicType::Array(array) => { + // Arrays contain a base type that might need conversion + Self::convert_algebraic_type(&mut array.elem_ty, case_policy, case_policy_for_enum_variants); + } + _ => {} } } @@ -683,7 +729,7 @@ impl CoreValidator<'_> { } .into() }) - .and_then(|s| self.identifier_with_case(s)); + .and_then(|s| self.resolve_identifier_with_case(s)); let ty_use = self.validate_for_type_use(location, ¶m.algebraic_type); (param_name, ty_use).combine_errors() }) @@ -760,10 +806,10 @@ impl CoreValidator<'_> { name: unscoped_name, scope, } = name; - let unscoped_name = self.type_identifier_with_case(unscoped_name); + let unscoped_name = identifier(unscoped_name); let scope = Vec::from(scope) .into_iter() - .map(|s| self.type_identifier_with_case(s)) + .map(|s| self.resolve_type_with_case(s)) .collect_all_errors(); let name = (unscoped_name, scope) .combine_errors() @@ -824,7 +870,7 @@ impl CoreValidator<'_> { pub(crate) fn validate_schedule_def( &mut self, table_name: RawIdentifier, - name: Identifier, + name: RawIdentifier, function_name: RawIdentifier, product_type: &ProductType, schedule_at_col: ColId, @@ -851,14 +897,14 @@ impl CoreValidator<'_> { } .into() }); - let table_name = self.identifier_with_case(table_name)?; + let table_name = self.resolve_identifier_with_case(table_name)?; let name_res = self.add_to_global_namespace(name.clone().into(), table_name); - let function_name = self.identifier_with_case(function_name); + let function_name = self.resolve_identifier_with_case(function_name); let (_, (at_column, id_column), function_name) = (name_res, at_id, function_name).combine_errors()?; Ok(ScheduleDef { - name, + name: Identifier::new(name).map_err(|error| ValidationError::IdentifierError { error })?, at_column, id_column, function_name, @@ -910,7 +956,7 @@ impl<'a, 'b> ViewValidator<'a, 'b> { .get(col_id.idx()) .expect("enumerate is generating an out-of-range index..."); - let name: Result = self.inner.module_validator.identifier_with_case( + let name: Result = self.inner.module_validator.resolve_identifier_with_case( column .name() .cloned() @@ -926,7 +972,7 @@ impl<'a, 'b> ViewValidator<'a, 'b> { let view_name = self .inner .module_validator - .identifier_with_case(self.inner.raw_name.clone()); + .resolve_identifier_with_case(self.inner.raw_name.clone()); let (name, view_name) = (name, view_name).combine_errors()?; @@ -950,7 +996,7 @@ impl<'a, 'b> ViewValidator<'a, 'b> { /// A partially validated table. pub(crate) struct TableValidator<'a, 'b> { - module_validator: &'a mut CoreValidator<'b>, + pub(crate) module_validator: &'a mut CoreValidator<'b>, raw_name: RawIdentifier, product_type_ref: AlgebraicTypeRef, product_type: &'a ProductType, @@ -965,7 +1011,7 @@ impl<'a, 'b> TableValidator<'a, 'b> { product_type: &'a ProductType, module_validator: &'a mut CoreValidator<'b>, ) -> Result { - let table_ident = module_validator.identifier_with_case(raw_name.clone())?; + let table_ident = module_validator.resolve_identifier_with_case(raw_name.clone())?; Ok(Self { raw_name, product_type_ref, @@ -1004,7 +1050,7 @@ impl<'a, 'b> TableValidator<'a, 'b> { Ok(ColumnDef { accessor_name: identifier(accessor_name.clone())?, - name: self.module_validator.identifier_with_case(accessor_name)?, + name: self.module_validator.resolve_identifier_with_case(accessor_name)?, ty: column.algebraic_type.clone(), ty_for_generate, col_id, @@ -1130,7 +1176,7 @@ impl<'a, 'b> TableValidator<'a, 'b> { // In V9, accessor_name is used for codegen let codegen_name = accessor_name - .map(|s| self.module_validator.identifier_with_case(s)) + .map(|s| self.module_validator.resolve_identifier_with_case(s)) .transpose()?; Ok(IndexDef { @@ -1149,22 +1195,32 @@ impl<'a, 'b> TableValidator<'a, 'b> { .. } = index; - //TODO: Explicit name can override this - let name = generate_index_name(&self.table_ident, self.product_type, &algorithm_raw); - let name = self.add_to_global_namespace(name)?; - + //source_name will be used as alias, hence we need to add it to the global namespace as + //well. let source_name = source_name.expect("source_name should be provided in V10, accessor_names inside module"); - let source_name = if name != source_name { - self.add_to_global_namespace(source_name.clone()) + self.add_to_global_namespace(source_name.clone()); + + let name = if self.module_validator.explicit_names.indexes.get(&source_name).is_some() { + self.module_validator.resolve_index_ident(source_name.clone())? } else { - Ok(source_name.clone()) + identifier(generate_index_name( + &self.table_ident, + self.product_type, + &algorithm_raw, + ))? + }; + + let name = if *name.as_raw() != source_name { + self.add_to_global_namespace(name.as_raw().clone())? + } else { + name.as_raw().clone() }; let algorithm = self.validate_algorithm(&name, algorithm_raw.clone())?; Ok(IndexDef { name: name.clone(), - accessor_name: source_name?, + accessor_name: source_name, codegen_name: Some(identifier(name)?), algorithm, }) @@ -1257,9 +1313,7 @@ impl<'a, 'b> TableValidator<'a, 'b> { name, } = schedule; - let name = self - .module_validator - .identifier_with_case(name.unwrap_or_else(|| generate_schedule_name(&self.raw_name.clone())))?; + let name = name.unwrap_or_else(|| generate_schedule_name(&self.table_ident.clone())); self.module_validator.validate_schedule_def( self.raw_name.clone(), @@ -1361,6 +1415,8 @@ fn concat_column_names(table_type: &ProductType, selected: &ColList) -> String { } /// All indexes have this name format. +/// +/// Generated name should not go through case conversion. pub fn generate_index_name( table_name: &Identifier, table_type: &ProductType, @@ -1377,17 +1433,23 @@ pub fn generate_index_name( } /// All sequences have this name format. +/// +/// Generated name should not go through case conversion. pub fn generate_sequence_name(table_name: &Identifier, table_type: &ProductType, column: ColId) -> RawIdentifier { let column_name = column_name(table_type, column); RawIdentifier::new(format!("{table_name}_{column_name}_seq")) } /// All schedules have this name format. -pub fn generate_schedule_name(table_name: &RawIdentifier) -> RawIdentifier { +/// +/// Generated name should not go through case conversion. +pub fn generate_schedule_name(table_name: &Identifier) -> RawIdentifier { RawIdentifier::new(format!("{table_name}_sched")) } /// All unique constraints have this name format. +/// +/// Generated name should not go through case conversion. pub fn generate_unique_constraint_name( table_name: &Identifier, product_type: &ProductType, @@ -1551,7 +1613,7 @@ fn process_column_default_value( // Validate the default value let validated_value = validator.validate_column_default_value(tables, cdv)?; - let table_name = validator.core.identifier_with_case(cdv.table.clone())?; + let table_name = validator.core.resolve_identifier_with_case(cdv.table.clone())?; let table = tables .get_mut(&table_name) .ok_or_else(|| ValidationError::TableNotFound { From e0fb227ad2282824b1ff605255806f0900ab69f0 Mon Sep 17 00:00:00 2001 From: Shubham Mishra Date: Mon, 16 Feb 2026 15:28:50 +0530 Subject: [PATCH 043/133] lints --- crates/bench/src/spacetime_raw.rs | 2 + crates/bindings-macro/src/table.rs | 16 ++---- crates/bindings-typescript/src/lib/table.ts | 22 ++++---- .../bindings-typescript/src/server/schema.ts | 16 +++--- .../bindings-typescript/src/server/views.ts | 18 +++---- crates/core/src/db/relational_db.rs | 6 --- .../src/locking_tx_datastore/datastore.rs | 3 ++ crates/physical-plan/src/plan.rs | 3 ++ crates/schema/src/def/validate/v10.rs | 23 +++++--- crates/schema/src/def/validate/v9.rs | 52 +++++++------------ crates/schema/tests/ensure_same_schema.rs | 14 ++--- 11 files changed, 78 insertions(+), 97 deletions(-) diff --git a/crates/bench/src/spacetime_raw.rs b/crates/bench/src/spacetime_raw.rs index 67624d33975..119d8417ec2 100644 --- a/crates/bench/src/spacetime_raw.rs +++ b/crates/bench/src/spacetime_raw.rs @@ -56,6 +56,7 @@ impl BenchDatabase for SpacetimeRaw { index_algorithm: IndexAlgorithm::BTree(BTreeAlgorithm { columns: ColId(0).into(), }), + alias: None, }, true, )?; @@ -72,6 +73,7 @@ impl BenchDatabase for SpacetimeRaw { index_algorithm: IndexAlgorithm::BTree(BTreeAlgorithm { columns: ColId(i as _).into(), }), + alias: None, }, false, )?; diff --git a/crates/bindings-macro/src/table.rs b/crates/bindings-macro/src/table.rs index b29bf0e64c8..c5f5a285f15 100644 --- a/crates/bindings-macro/src/table.rs +++ b/crates/bindings-macro/src/table.rs @@ -1,6 +1,6 @@ use crate::sats; use crate::sym; -use crate::util::{check_duplicate, check_duplicate_msg, ident_to_litstr, match_meta}; +use crate::util::{check_duplicate, check_duplicate_msg, match_meta}; use core::slice; use heck::ToSnakeCase; use proc_macro2::{Span, TokenStream}; @@ -55,7 +55,7 @@ struct IndexArg { } impl IndexArg { - fn inline(accessor: Ident, kind: IndexType) -> Self { + fn new(accessor: Ident, kind: IndexType) -> Self { // We don't know if its unique yet. // We'll discover this once we have collected constraints. let is_unique = false; @@ -66,14 +66,6 @@ impl IndexArg { // name, } } - fn explicit(accessor: Ident, kind: IndexType) -> Self { - Self { - accessor, - is_unique: false, - kind, - // name: None, - } - } } enum IndexType { @@ -214,7 +206,7 @@ impl IndexArg { ) })?; - Ok(IndexArg::explicit(accessor, kind)) + Ok(IndexArg::new(accessor, kind)) } fn parse_columns(meta: &ParseNestedMeta) -> syn::Result>> { @@ -305,7 +297,7 @@ impl IndexArg { // Default accessor = field name if not provided let accessor = field.clone(); - Ok(IndexArg::inline(accessor, kind)) + Ok(IndexArg::new(accessor, kind)) } fn validate<'a>(&'a self, table_name: &str, cols: &'a [Column<'a>]) -> syn::Result> { diff --git a/crates/bindings-typescript/src/lib/table.ts b/crates/bindings-typescript/src/lib/table.ts index 6ba0eee47c9..d181c612c49 100644 --- a/crates/bindings-typescript/src/lib/table.ts +++ b/crates/bindings-typescript/src/lib/table.ts @@ -458,17 +458,17 @@ export function table>( row.typeName = toPascalCase(tableName); } - // Build index source names using accName - for (const index of indexes) { - const cols = - index.algorithm.tag === 'Direct' - ? [index.algorithm.value] - : index.algorithm.value; - - const colS = cols.map(i => colNameList[i]).join('_'); - index.sourceName = `${accName}_${colS}_idx_${index.algorithm.tag.toLowerCase()}`; - } - + // Build index source names using accName + for (const index of indexes) { + const cols = + index.algorithm.tag === 'Direct' + ? [index.algorithm.value] + : index.algorithm.value; + + const colS = cols.map(i => colNameList[i]).join('_'); + index.sourceName = `${accName}_${colS}_idx_${index.algorithm.tag.toLowerCase()}`; + } + return { sourceName: accName, productTypeRef: ctx.registerTypesRecursively(row).ref, diff --git a/crates/bindings-typescript/src/server/schema.ts b/crates/bindings-typescript/src/server/schema.ts index 1fe9d247ead..dbdb90b07de 100644 --- a/crates/bindings-typescript/src/server/schema.ts +++ b/crates/bindings-typescript/src/server/schema.ts @@ -541,14 +541,14 @@ export function schema>( }); } if (table.tableName) { - ctx.moduleDef.explicitNames.entries.push ({ - tag: "Table", - value: { - sourceName: accName, - canonicalName: table.tableName, - } - }) - } + ctx.moduleDef.explicitNames.entries.push({ + tag: 'Table', + value: { + sourceName: accName, + canonicalName: table.tableName, + }, + }); + } } return { tables: tableSchemas } as TablesToSchema; }); diff --git a/crates/bindings-typescript/src/server/views.ts b/crates/bindings-typescript/src/server/views.ts index 274c8ccce43..a6f0b277171 100644 --- a/crates/bindings-typescript/src/server/views.ts +++ b/crates/bindings-typescript/src/server/views.ts @@ -163,15 +163,15 @@ export function registerView< returnType, }); - if (opts.name != null) { - ctx.moduleDef.explicitNames.entries.push({ - tag: "Function", - value: { - sourceName: exportName, - canonicalName: opts.name - } - }) -} + if (opts.name != null) { + ctx.moduleDef.explicitNames.entries.push({ + tag: 'Function', + value: { + sourceName: exportName, + canonicalName: opts.name, + }, + }); + } // If it is an option, we wrap the function to make the return look like an array. if (returnType.tag == 'Sum') { diff --git a/crates/core/src/db/relational_db.rs b/crates/core/src/db/relational_db.rs index fcbe3e35ea3..c879157fe51 100644 --- a/crates/core/src/db/relational_db.rs +++ b/crates/core/src/db/relational_db.rs @@ -1257,8 +1257,6 @@ impl RelationalDB { .map(|s| s.as_str()) .unwrap_or(table_name); - println!("replaced table name {table_name} with {new_table}"); - Ok(self.inner.table_id_from_name_mut_tx(tx, new_table)?) } @@ -1270,8 +1268,6 @@ impl RelationalDB { .map(|s| s.as_str()) .unwrap_or(table_name); - println!("replaced table name {table_name} with {new_table}"); - Ok(self.inner.table_id_from_name_tx(tx, new_table)?) } @@ -1303,8 +1299,6 @@ impl RelationalDB { .map(|s| s.as_str()) .unwrap_or(index_name); - println!("replaced index name {index_name} with {new_index_name}"); - Ok(self.inner.index_id_from_name_mut_tx(tx, new_index_name)?) } diff --git a/crates/datastore/src/locking_tx_datastore/datastore.rs b/crates/datastore/src/locking_tx_datastore/datastore.rs index 2fbd49487a8..49e526145dd 100644 --- a/crates/datastore/src/locking_tx_datastore/datastore.rs +++ b/crates/datastore/src/locking_tx_datastore/datastore.rs @@ -1485,6 +1485,7 @@ mod tests { col_pos: value.pos.into(), col_name: Identifier::for_test(value.name), col_type: value.ty, + alias: None, } } } @@ -2108,6 +2109,7 @@ mod tests { table_id, index_name: "Foo_id_idx_btree".into(), index_algorithm: BTreeAlgorithm::from(0).into(), + alias: None, }, true, )?; @@ -2349,6 +2351,7 @@ mod tests { table_id, index_name: "Foo_age_idx_btree".into(), index_algorithm: BTreeAlgorithm::from(2).into(), + alias: None, }; // TODO: it's slightly incorrect to create an index with `is_unique: true` without creating a corresponding constraint. // But the `Table` crate allows it for now. diff --git a/crates/physical-plan/src/plan.rs b/crates/physical-plan/src/plan.rs index 92593e293f8..3e3a4d46783 100644 --- a/crates/physical-plan/src/plan.rs +++ b/crates/physical-plan/src/plan.rs @@ -1479,6 +1479,7 @@ mod tests { col_name: Identifier::for_test(*name), col_pos: i.into(), col_type: ty.clone(), + alias: None, }) .collect(), indexes @@ -1491,6 +1492,7 @@ mod tests { index_algorithm: IndexAlgorithm::BTree(BTreeAlgorithm { columns: ColList::from_iter(cols.iter().copied()), }), + alias: None, }) .collect(), unique @@ -1511,6 +1513,7 @@ mod tests { None, primary_key.map(ColId::from), false, + None, ))) } diff --git a/crates/schema/src/def/validate/v10.rs b/crates/schema/src/def/validate/v10.rs index 65fe3aaa1fe..3a39bb964b3 100644 --- a/crates/schema/src/def/validate/v10.rs +++ b/crates/schema/src/def/validate/v10.rs @@ -345,7 +345,7 @@ impl<'a> ModuleValidatorV10<'a> { .into_iter() .map(|index| { table_validator - .validate_index_def_v10(index.into()) + .validate_index_def_v10(index) .map(|index| (index.name.clone(), index)) }) .collect_all_errors::>(); @@ -403,7 +403,11 @@ impl<'a> ModuleValidatorV10<'a> { if table_type != TableType::System && name.starts_with("st_") { Err(ValidationError::TableNameReserved { table: name }.into()) } else { - let name = table_validator.add_to_global_namespace(name.as_raw().clone())?; + let mut name = name.as_raw().clone(); + if name != raw_table_name { + name = table_validator.add_to_global_namespace(name)?; + } + Ok(name) } }; @@ -524,7 +528,7 @@ impl<'a> ModuleValidatorV10<'a> { tables: &HashMap, ) -> Result<(ScheduleDef, Identifier)> { let RawScheduleDefV10 { - source_name, + source_name: _, table_name, schedule_at_col, function_name, @@ -671,7 +675,7 @@ impl<'a> ModuleValidatorV10<'a> { &return_type, ); - let name_result = self.core.resolve_function_ident(accessor_name.clone()); + let name = self.core.resolve_function_ident(accessor_name.clone())?; let mut view_validator = ViewValidator::new( accessor_name.clone(), @@ -682,7 +686,7 @@ impl<'a> ModuleValidatorV10<'a> { &mut self.core, )?; - let name_result = view_validator.add_to_global_namespace(name_result?.as_raw().clone()); + let _ = view_validator.add_to_global_namespace(name.as_raw().clone())?; let n = product_type.elements.len(); let return_columns = (0..n) @@ -694,11 +698,11 @@ impl<'a> ModuleValidatorV10<'a> { .map(|id| view_validator.validate_param_column_def(id.into())) .collect_all_errors(); - let (name_result, return_type_for_generate, return_columns, param_columns) = - (name_result, return_type_for_generate, return_columns, param_columns).combine_errors()?; + let (return_type_for_generate, return_columns, param_columns) = + (return_type_for_generate, return_columns, param_columns).combine_errors()?; Ok(ViewDef { - name: self.core.resolve_function_ident(name_result.clone())?, + name, accessor_name: identifier(accessor_name)?, is_anonymous, is_public, @@ -935,16 +939,19 @@ mod tests { name: "Apples_count_idx_direct".into(), codegen_name: Some(expect_identifier("Apples_count_idx_direct")), algorithm: DirectAlgorithm { column: 2.into() }.into(), + accessor_name: "Apples_count_idx_direct".into(), }, &IndexDef { name: "Apples_name_count_idx_btree".into(), codegen_name: Some(expect_identifier("Apples_name_count_idx_btree")), algorithm: BTreeAlgorithm { columns: [1, 2].into() }.into(), + accessor_name: "Apples_name_count_idx_btree".into(), }, &IndexDef { name: "Apples_type_idx_btree".into(), codegen_name: Some(expect_identifier("Apples_type_idx_btree")), algorithm: BTreeAlgorithm { columns: 3.into() }.into(), + accessor_name: "Apples_type_idx_btree".into(), } ] ); diff --git a/crates/schema/src/def/validate/v9.rs b/crates/schema/src/def/validate/v9.rs index f88123399aa..8712e3d66e1 100644 --- a/crates/schema/src/def/validate/v9.rs +++ b/crates/schema/src/def/validate/v9.rs @@ -402,7 +402,7 @@ impl ModuleValidatorV9<'_> { // Procedures share the "function namespace" with reducers. // Uniqueness is validated in a later pass, in `check_function_names_are_unique`. - let name = self.core.resolve_identifier_with_case(name); + let name = identifier(name); let (name, params_for_generate, return_type_for_generate) = (name, params_for_generate, return_type_for_generate).combine_errors()?; @@ -497,7 +497,6 @@ impl ModuleValidatorV9<'_> { // we may want to support calling views in the same context as reducers in the future (e.g. `spacetime call`). // Hence we validate uniqueness among reducer, procedure, and view names in a later pass. // See `check_function_names_are_unique`. - let name = view_in_progress.add_to_global_namespace(name).and_then(identifier); let n = product_type.elements.len(); @@ -653,7 +652,7 @@ impl CoreValidator<'_> { // policy. pub(crate) fn typespace_case_conversion(case_policy: CaseConversionPolicy, typespace: &mut Typespace) { let case_policy_for_enum_variants = if matches!(case_policy, CaseConversionPolicy::SnakeCase) { - CaseConversionPolicy::PascalCase + CaseConversionPolicy::CamelCase } else { case_policy }; @@ -669,6 +668,9 @@ impl CoreValidator<'_> { case_policy: CaseConversionPolicy, case_policy_for_enum_variants: CaseConversionPolicy, ) { + if ty.is_special() { + return; + } match ty { AlgebraicType::Product(product) => { for element in &mut product.elements.iter_mut() { @@ -806,11 +808,15 @@ impl CoreValidator<'_> { name: unscoped_name, scope, } = name; - let unscoped_name = identifier(unscoped_name); - let scope = Vec::from(scope) - .into_iter() - .map(|s| self.resolve_type_with_case(s)) - .collect_all_errors(); + + // If scoped was set explicitly do not convert case + let unscoped_name = if scope.is_empty() { + self.resolve_type_with_case(unscoped_name) + } else { + identifier(unscoped_name.clone()) + }; + let scope = Vec::from(scope).into_iter().map(identifier).collect_all_errors(); + let name = (unscoped_name, scope) .combine_errors() .and_then(|(unscoped_name, scope)| { @@ -897,9 +903,9 @@ impl CoreValidator<'_> { } .into() }); - let table_name = self.resolve_identifier_with_case(table_name)?; - let name_res = self.add_to_global_namespace(name.clone().into(), table_name); - let function_name = self.resolve_identifier_with_case(function_name); + let table_name = self.resolve_table_ident(table_name)?; + let name_res = self.add_to_global_namespace(name.clone(), table_name); + let function_name = self.resolve_function_ident(function_name); let (_, (at_column, id_column), function_name) = (name_res, at_id, function_name).combine_errors()?; @@ -1011,7 +1017,7 @@ impl<'a, 'b> TableValidator<'a, 'b> { product_type: &'a ProductType, module_validator: &'a mut CoreValidator<'b>, ) -> Result { - let table_ident = module_validator.resolve_identifier_with_case(raw_name.clone())?; + let table_ident = module_validator.resolve_table_ident(raw_name.clone())?; Ok(Self { raw_name, product_type_ref, @@ -1198,7 +1204,7 @@ impl<'a, 'b> TableValidator<'a, 'b> { //source_name will be used as alias, hence we need to add it to the global namespace as //well. let source_name = source_name.expect("source_name should be provided in V10, accessor_names inside module"); - self.add_to_global_namespace(source_name.clone()); + let source_name = self.add_to_global_namespace(source_name.clone())?; let name = if self.module_validator.explicit_names.indexes.get(&source_name).is_some() { self.module_validator.resolve_index_ident(source_name.clone())? @@ -1240,19 +1246,14 @@ impl<'a, 'b> TableValidator<'a, 'b> { RawIndexAlgorithm::Direct { column } => self.validate_col_id(name, column).and_then(|column| { let field = &self.product_type.elements[column.idx()]; let ty = &field.algebraic_type; - let is_bad_type = match ty { AlgebraicType::U8 | AlgebraicType::U16 | AlgebraicType::U32 | AlgebraicType::U64 => false, - AlgebraicType::Ref(r) => self.module_validator.typespace[*r] .as_sum() .is_none_or(|s| !s.is_simple_enum()), - AlgebraicType::Sum(sum) if sum.is_simple_enum() => false, - _ => true, }; - if is_bad_type { return Err(ValidationError::DirectIndexOnBadType { index: name.clone(), @@ -1475,21 +1476,6 @@ pub fn convert(identifier: RawIdentifier, policy: CaseConversionPolicy) -> Strin } } -pub fn convert_to_pasal(identifier: RawIdentifier, policy: CaseConversionPolicy) -> Result { - let identifier = identifier.to_string(); - - let name = match policy { - CaseConversionPolicy::None => identifier, - CaseConversionPolicy::SnakeCase => identifier.to_case(Case::Snake), - CaseConversionPolicy::CamelCase => identifier.to_case(Case::Camel), - CaseConversionPolicy::PascalCase => identifier.to_case(Case::Pascal), - _ => identifier, - }; - - Identifier::new(RawIdentifier::new(LeanString::from_utf8(name.as_bytes()).unwrap())) - .map_err(|error| ValidationError::IdentifierError { error }.into()) -} - /// Check that every [`ScheduleDef`]'s `function_name` refers to a real reducer or procedure /// and that the function's arguments are appropriate for the table, /// then record the scheduled function's [`FunctionKind`] in the [`ScheduleDef`]. diff --git a/crates/schema/tests/ensure_same_schema.rs b/crates/schema/tests/ensure_same_schema.rs index cb1b404d31f..9dab5f80bda 100644 --- a/crates/schema/tests/ensure_same_schema.rs +++ b/crates/schema/tests/ensure_same_schema.rs @@ -104,10 +104,7 @@ fn test_all_schema_names() { let module_def: ModuleDef = get_normalized_schema("module-test-ts"); // Test Tables - let table_names = [ - "test_d", - "person", - ]; + let table_names = ["test_d", "person"]; for name in table_names { assert!( TableDef::lookup(&module_def, &Identifier::for_test(name)).is_some(), @@ -125,7 +122,7 @@ fn test_all_schema_names() { "client_connected", "delete_player", "delete_players_by_name", - // "init", + // "init", "list_over_age", "log_module_identity", "query_private", @@ -195,7 +192,7 @@ fn test_all_schema_names() { "person_age_idx_btree", "person_id_idx_btree", "test_a_x_idx_btree", - "repeating_test_arg_scheduled_id_idx_btree" + "repeating_test_arg_scheduled_id_idx_btree", ]; for index_name in index_names { assert!( @@ -205,9 +202,7 @@ fn test_all_schema_names() { ); } - let index_names_and_alias = [ - ("person_age_idx_btree", "P",) - ]; + let index_names_and_alias = [("person_age_idx_btree", "P")]; // for (index_name, alias) in index_names { // assert!( // &IndexDef::lookup(&module_def, &RawIdentifier::new(index_name)).expect("index exists").accessor_name, @@ -306,4 +301,3 @@ fn test_all_schema_names() { ); } } - From 32e57d91313ffaa2b681d34f0f24e5426f7f2da3 Mon Sep 17 00:00:00 2001 From: Shubham Mishra Date: Mon, 16 Feb 2026 17:48:38 +0530 Subject: [PATCH 044/133] fix ts bindings --- crates/bindings-typescript/src/lib/table.ts | 4 ++-- crates/bindings-typescript/src/sdk/table_cache.ts | 2 +- crates/bindings-typescript/src/server/schema.test-d.ts | 6 +++--- crates/bindings-typescript/src/server/views.ts | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/crates/bindings-typescript/src/lib/table.ts b/crates/bindings-typescript/src/lib/table.ts index d181c612c49..49daae42985 100644 --- a/crates/bindings-typescript/src/lib/table.ts +++ b/crates/bindings-typescript/src/lib/table.ts @@ -130,7 +130,7 @@ export type TableIndexes = { ? never : K]: ColumnIndex; } & { - [I in TableDef['indexes'][number] as I['name'] & {}]: TableIndexFromDef< + [I in TableDef['indexes'][number] as I['accessor'] & {}]: TableIndexFromDef< TableDef, I >; @@ -144,7 +144,7 @@ type TableIndexFromDef< keyof TableDef['columns'] & string > ? { - name: I['name']; + name: I['accessor']; unique: AllUnique; algorithm: Lowercase; columns: Cols; diff --git a/crates/bindings-typescript/src/sdk/table_cache.ts b/crates/bindings-typescript/src/sdk/table_cache.ts index 947ce304c32..524f515ea1e 100644 --- a/crates/bindings-typescript/src/sdk/table_cache.ts +++ b/crates/bindings-typescript/src/sdk/table_cache.ts @@ -92,7 +92,7 @@ export class TableCacheImpl< keyof TableDefForTableName['columns'] & string >; const index = this.#makeReadonlyIndex(this.tableDef, idxDef); - (this as any)[idx.name!] = index; + (this as any)[idx.accessor!] = index; } } diff --git a/crates/bindings-typescript/src/server/schema.test-d.ts b/crates/bindings-typescript/src/server/schema.test-d.ts index 9ed7cdedb95..6c7cc492862 100644 --- a/crates/bindings-typescript/src/server/schema.test-d.ts +++ b/crates/bindings-typescript/src/server/schema.test-d.ts @@ -7,17 +7,17 @@ const person = table( // name: 'person', indexes: [ { - name: 'id_name_idx', + accessor: 'id_name_idx', algorithm: 'btree', columns: ['id', 'name'] as const, }, { - name: 'id_name2_idx', + accessor: 'id_name2_idx', algorithm: 'btree', columns: ['id', 'name2'] as const, }, { - name: 'name_idx', + accessor: 'name_idx', algorithm: 'btree', columns: ['name'] as const, }, diff --git a/crates/bindings-typescript/src/server/views.ts b/crates/bindings-typescript/src/server/views.ts index a6f0b277171..accd0c92563 100644 --- a/crates/bindings-typescript/src/server/views.ts +++ b/crates/bindings-typescript/src/server/views.ts @@ -143,7 +143,7 @@ export function registerView< ? AnonymousViewFn : ViewFn ) { - const paramsBuilder = new RowBuilder(params, toPascalCase(name)); + const paramsBuilder = new RowBuilder(params, toPascalCase(exportName)); // Register return types if they are product types let returnType = ctx.registerTypesRecursively(ret).algebraicType; From 136ea81fd197e27024171979e94467b4899c942e Mon Sep 17 00:00:00 2001 From: Shubham Mishra Date: Mon, 16 Feb 2026 18:54:17 +0530 Subject: [PATCH 045/133] remove index name in rust --- crates/bindings-macro/src/table.rs | 14 +--- crates/bindings-typescript/src/lib/schema.ts | 19 ++--- crates/bindings-typescript/src/lib/table.ts | 74 ++++++++++---------- crates/schema/tests/ensure_same_schema.rs | 6 +- 4 files changed, 55 insertions(+), 58 deletions(-) diff --git a/crates/bindings-macro/src/table.rs b/crates/bindings-macro/src/table.rs index c5f5a285f15..e246525eae2 100644 --- a/crates/bindings-macro/src/table.rs +++ b/crates/bindings-macro/src/table.rs @@ -169,7 +169,6 @@ impl ScheduledArg { impl IndexArg { fn parse_meta(meta: ParseNestedMeta) -> syn::Result { let mut accessor = None; - let mut _name = None; let mut algo = None; meta.parse_nested_meta(|meta| { @@ -178,11 +177,6 @@ impl IndexArg { check_duplicate(&accessor, &meta)?; accessor = Some(meta.value()?.parse()?); } - sym::name => { - check_duplicate(&_name, &meta)?; - let litstr: LitStr = meta.value()?.parse()?; - _name = Some(litstr); - } sym::btree => { check_duplicate_msg(&algo, &meta, "index algorithm specified twice")?; algo = Some(Self::parse_btree(meta)?); @@ -266,7 +260,6 @@ impl IndexArg { /// Parses an inline `#[index(btree)]`, `#[index(hash)]`, or `#[index(direct)]` attribute on a field. fn parse_index_attr(field: &Ident, attr: &syn::Attribute) -> syn::Result { let mut kind = None; - let mut _name: Option = None; attr.parse_nested_meta(|meta| { match_meta!(match meta { sym::btree => { @@ -285,10 +278,6 @@ impl IndexArg { check_duplicate_msg(&kind, &meta, "index type specified twice")?; kind = Some(IndexType::Direct { column: field.clone() }) } - sym::name => { - check_duplicate(&_name, &meta)?; - _name = Some(meta.value()?.parse()?); - } }); Ok(()) })?; @@ -1039,9 +1028,11 @@ pub(crate) fn table_impl(mut args: TableArgs, item: &syn::DeriveInput) -> syn::R let trait_def = quote_spanned! {table_ident.span()=> #[allow(non_camel_case_types, dead_code)] #vis trait #table_ident { + #[allow(non_camel_case_types, dead_code)] fn #table_ident(&self) -> &#tablehandle_ident; } impl #table_ident for spacetimedb::Local { + #[allow(non_camel_case_types, dead_code)] fn #table_ident(&self) -> &#tablehandle_ident { &#tablehandle_ident {} } @@ -1051,6 +1042,7 @@ pub(crate) fn table_impl(mut args: TableArgs, item: &syn::DeriveInput) -> syn::R let trait_def_view = quote_spanned! {table_ident.span()=> #[allow(non_camel_case_types, dead_code)] #vis trait #view_trait_ident { + #[allow(non_camel_case_types, dead_code)] fn #table_ident(&self) -> &#viewhandle_ident; } impl #view_trait_ident for spacetimedb::LocalReadOnly { diff --git a/crates/bindings-typescript/src/lib/schema.ts b/crates/bindings-typescript/src/lib/schema.ts index 10e44614103..7987ae7bd29 100644 --- a/crates/bindings-typescript/src/lib/schema.ts +++ b/crates/bindings-typescript/src/lib/schema.ts @@ -187,6 +187,7 @@ export class ModuleContext { value: module.rowLevelSecurity, } ); + push(module.explicitNames && { tag: 'ExplicitNames', value: module.explicitNames }); return { sections }; } @@ -248,9 +249,9 @@ export class ModuleContext { #registerCompoundTypeRecursively< T extends - | SumBuilder - | ProductBuilder - | RowBuilder, + | SumBuilder + | ProductBuilder + | RowBuilder, >(typeBuilder: T): RefBuilder, InferSpacetimeTypeOfTypeBuilder> { const ty = typeBuilder.algebraicType; // NB! You must ensure that all TypeBuilder passed into this function @@ -273,13 +274,13 @@ export class ModuleContext { const newTy = typeBuilder instanceof RowBuilder || typeBuilder instanceof ProductBuilder ? ({ - tag: 'Product', - value: { elements: [] }, - } as AlgebraicTypeVariants.Product) + tag: 'Product', + value: { elements: [] }, + } as AlgebraicTypeVariants.Product) : ({ - tag: 'Sum', - value: { variants: [] }, - } as AlgebraicTypeVariants.Sum); + tag: 'Sum', + value: { variants: [] }, + } as AlgebraicTypeVariants.Sum); r = new RefBuilder(this.#moduleDef.typespace.types.length); this.#moduleDef.typespace.types.push(newTy); diff --git a/crates/bindings-typescript/src/lib/table.ts b/crates/bindings-typescript/src/lib/table.ts index 49daae42985..3ad4bb5d2bb 100644 --- a/crates/bindings-typescript/src/lib/table.ts +++ b/crates/bindings-typescript/src/lib/table.ts @@ -44,26 +44,26 @@ type HasInvalidColumn = // this checks if Row exactly equals RowObj - if it does, we can't // do type-system-level checking, so just let it pass (() => G extends Row ? 1 : 2) extends () => G extends RowObj ? 1 : 2 - ? false - : { - [K in keyof Row]: Row[K] extends ColumnBuilder - ? ValidateColumnMetadata extends InvalidColumnMetadata - ? true - : false - : false; - }[keyof Row] extends false - ? false - : true; + ? false + : { + [K in keyof Row]: Row[K] extends ColumnBuilder + ? ValidateColumnMetadata extends InvalidColumnMetadata + ? true + : false + : false; + }[keyof Row] extends false + ? false + : true; /** * Extract the names of columns that have invalid metadata. */ type InvalidColumnNames = { [K in keyof Row]: Row[K] extends ColumnBuilder - ? ValidateColumnMetadata extends InvalidColumnMetadata - ? K & string - : never - : never; + ? ValidateColumnMetadata extends InvalidColumnMetadata + ? K & string + : never + : never; }[keyof Row]; /** @@ -90,8 +90,8 @@ export type CoerceColumn< Col extends TypeBuilder | ColumnBuilder, > = Col extends TypeBuilder - ? ColumnBuilder> - : Col; + ? ColumnBuilder> + : Col; /** * Coerces a RowObj where TypeBuilders are replaced with ColumnBuilders @@ -127,10 +127,10 @@ export type TableIndexes = { K, TableDef['columns'][K]['columnMetadata'] > extends never - ? never - : K]: ColumnIndex; + ? never + : K]: ColumnIndex; } & { - [I in TableDef['indexes'][number] as I['accessor'] & {}]: TableIndexFromDef< + [I in TableDef['indexes'][number]as I['accessor'] & {}]: TableIndexFromDef< TableDef, I >; @@ -143,21 +143,21 @@ type TableIndexFromDef< NormalizeIndexColumns extends infer Cols extends ReadonlyArray< keyof TableDef['columns'] & string > - ? { - name: I['accessor']; - unique: AllUnique; - algorithm: Lowercase; - columns: Cols; - } - : never; + ? { + name: I['accessor']; + unique: AllUnique; + algorithm: Lowercase; + columns: Cols; + } + : never; type NormalizeIndexColumns< TableDef extends UntypedTableDef, I extends IndexOpts, > = IndexColumns extends ReadonlyArray - ? IndexColumns - : never; + ? IndexColumns + : never; /** * Options for configuring a database table. @@ -175,10 +175,10 @@ export type TableOpts = { scheduled?: () => | ReducerExport }> | ProcedureExport< - any, - { [k: string]: RowBuilder }, - ReturnType - >; + any, + { [k: string]: RowBuilder }, + ReturnType + >; }; /** @@ -212,7 +212,7 @@ export type Table = Prettify< export type ReadonlyTable = Prettify< ReadonlyTableMethods & - ReadonlyIndexes> + ReadonlyIndexes> >; export interface ReadonlyTableMethods { @@ -290,10 +290,10 @@ export function table>( // See the JSDoc above for details on how to fix this error. ..._: HasInvalidColumn extends true ? [ - error: ERROR_default_cannot_be_combined_with_primaryKey_unique_or_autoInc< - InvalidColumnNames - >, - ] + error: ERROR_default_cannot_be_combined_with_primaryKey_unique_or_autoInc< + InvalidColumnNames + >, + ] : [] ): TableSchema, OptsIndices> { const { diff --git a/crates/schema/tests/ensure_same_schema.rs b/crates/schema/tests/ensure_same_schema.rs index 9dab5f80bda..f6ed136b51d 100644 --- a/crates/schema/tests/ensure_same_schema.rs +++ b/crates/schema/tests/ensure_same_schema.rs @@ -101,7 +101,11 @@ fn ensure_same_schema_rust_csharp_benchmarks() { #[test] #[serial] fn test_all_schema_names() { - let module_def: ModuleDef = get_normalized_schema("module-test-ts"); + let module_def: ModuleDef = get_normalized_schema("module-test"); + + println!("Types {:?}", module_def.types().collect::>()); + + println!("Types space {:?}", module_def.typespace()); // Test Tables let table_names = ["test_d", "person"]; From 0d714870afd6a553db30d401275bbf52b42fb6ab Mon Sep 17 00:00:00 2001 From: Shubham Mishra Date: Mon, 16 Feb 2026 19:00:06 +0530 Subject: [PATCH 046/133] merge conflict --- modules/sdk-test-event-table/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/sdk-test-event-table/src/lib.rs b/modules/sdk-test-event-table/src/lib.rs index 05181098b52..09855bafaf5 100644 --- a/modules/sdk-test-event-table/src/lib.rs +++ b/modules/sdk-test-event-table/src/lib.rs @@ -1,6 +1,6 @@ use spacetimedb::{ReducerContext, Table}; -#[spacetimedb::table(name = test_event, public, event)] +#[spacetimedb::table(accessor = test_event, public, event)] pub struct TestEvent { pub name: String, pub value: u64, From 698f299778489b83b12acb8870ae74af53842343 Mon Sep 17 00:00:00 2001 From: Shubham Mishra Date: Mon, 16 Feb 2026 19:05:26 +0530 Subject: [PATCH 047/133] remove index canonical name --- crates/bindings-macro/src/table.rs | 29 +++++++---------------------- crates/bindings/src/table.rs | 1 - 2 files changed, 7 insertions(+), 23 deletions(-) diff --git a/crates/bindings-macro/src/table.rs b/crates/bindings-macro/src/table.rs index 449697f9f7f..4d7bfc396f6 100644 --- a/crates/bindings-macro/src/table.rs +++ b/crates/bindings-macro/src/table.rs @@ -1,6 +1,6 @@ use crate::sats; use crate::sym; -use crate::util::{check_duplicate, check_duplicate_msg, ident_to_litstr, match_meta}; +use crate::util::{check_duplicate, check_duplicate_msg, match_meta}; use core::slice; use heck::ToSnakeCase; use proc_macro2::{Span, TokenStream}; @@ -176,7 +176,6 @@ impl ScheduledArg { impl IndexArg { fn parse_meta(meta: ParseNestedMeta) -> syn::Result { let mut accessor = None; - let mut _name = None; let mut algo = None; meta.parse_nested_meta(|meta| { @@ -185,11 +184,6 @@ impl IndexArg { check_duplicate(&accessor, &meta)?; accessor = Some(meta.value()?.parse()?); } - sym::name => { - check_duplicate(&_name, &meta)?; - let litstr: LitStr = meta.value()?.parse()?; - _name = Some(litstr); - } sym::btree => { check_duplicate_msg(&algo, &meta, "index algorithm specified twice")?; algo = Some(Self::parse_btree(meta)?); @@ -273,8 +267,6 @@ impl IndexArg { /// Parses an inline `#[index(btree)]`, `#[index(hash)]`, or `#[index(direct)]` attribute on a field. fn parse_index_attr(field: &Ident, attr: &syn::Attribute) -> syn::Result { let mut kind = None; - let mut accessor: Option = None; - let mut _name: Option = None; attr.parse_nested_meta(|meta| { match_meta!(match meta { sym::btree => { @@ -293,14 +285,6 @@ impl IndexArg { check_duplicate_msg(&kind, &meta, "index type specified twice")?; kind = Some(IndexType::Direct { column: field.clone() }) } - sym::accessor => { - check_duplicate(&accessor, &meta)?; - accessor = Some(meta.value()?.parse()?); - } - sym::name => { - check_duplicate(&_name, &meta)?; - _name = Some(meta.value()?.parse()?); - } }); Ok(()) })?; @@ -308,7 +292,7 @@ impl IndexArg { kind.ok_or_else(|| syn::Error::new_spanned(&attr.meta, "must specify kind of index (`btree` , `direct`)"))?; // Default accessor = field name if not provided - let accessor = accessor.unwrap_or_else(|| field.clone()); + let accessor = field.clone(); Ok(IndexArg::new(accessor, kind)) } @@ -457,14 +441,12 @@ impl ValidatedIndex<'_> { }) } }; - let accessor_name = ident_to_litstr(self.accessor_name); - let index_name = &self.index_name; + let source_name = self.index_name.clone(); // Note: we do not pass the index_name through here. // We trust the schema validation logic to reconstruct the name we've stored in `self.name`. //TODO(shub): pass generated index name instead of accessor name as source_name quote!(spacetimedb::table::IndexDesc { - source_name: #accessor_name, - index_name: #index_name, + source_name: #source_name, algo: #algo, }) } @@ -1066,9 +1048,11 @@ pub(crate) fn table_impl(mut args: TableArgs, item: &syn::DeriveInput) -> syn::R let trait_def = quote_spanned! {table_ident.span()=> #[allow(non_camel_case_types, dead_code)] #vis trait #table_ident { + #[allow(non_camel_case_types, dead_code)] fn #table_ident(&self) -> &#tablehandle_ident; } impl #table_ident for spacetimedb::Local { + #[allow(non_camel_case_types, dead_code)] fn #table_ident(&self) -> &#tablehandle_ident { &#tablehandle_ident {} } @@ -1078,6 +1062,7 @@ pub(crate) fn table_impl(mut args: TableArgs, item: &syn::DeriveInput) -> syn::R let trait_def_view = quote_spanned! {table_ident.span()=> #[allow(non_camel_case_types, dead_code)] #vis trait #view_trait_ident { + #[allow(non_camel_case_types, dead_code)] fn #table_ident(&self) -> &#viewhandle_ident; } impl #view_trait_ident for spacetimedb::LocalReadOnly { diff --git a/crates/bindings/src/table.rs b/crates/bindings/src/table.rs index 541bf59a0ac..c0cdb684f23 100644 --- a/crates/bindings/src/table.rs +++ b/crates/bindings/src/table.rs @@ -140,7 +140,6 @@ pub trait TableInternal: Sized { #[derive(Clone, Copy)] pub struct IndexDesc<'a> { pub source_name: &'a str, - pub index_name: &'a str, pub algo: IndexAlgo<'a>, } From 34f4a2bf00e492365ab20d82e275fd32b8a7fe1d Mon Sep 17 00:00:00 2001 From: Shubham Mishra Date: Mon, 16 Feb 2026 19:11:59 +0530 Subject: [PATCH 048/133] lint --- modules/module-test/src/lib.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/module-test/src/lib.rs b/modules/module-test/src/lib.rs index bde3b425215..4876c17cf65 100644 --- a/modules/module-test/src/lib.rs +++ b/modules/module-test/src/lib.rs @@ -15,7 +15,7 @@ pub type TestAlias = TestA; // ───────────────────────────────────────────────────────────────────────────── #[cfg(feature = "test-add-column")] -#[spacetimedb::table(accessor = person, public, index(accessor = age, name = "age", btree(columns = [age])))] +#[spacetimedb::table(accessor = person, public, index(accessor = age, btree(columns = [age])))] pub struct Person { #[primary_key] #[auto_inc] @@ -27,7 +27,7 @@ pub struct Person { } #[cfg(not(feature = "test-add-column"))] -#[spacetimedb::table(accessor = person, public, index(accessor = age, name = "age", btree(columns = [age])))] +#[spacetimedb::table(accessor = person, public, index(accessor = age, btree(columns = [age])))] pub struct Person { #[primary_key] #[auto_inc] @@ -42,7 +42,7 @@ pub struct RemoveTable { pub id: u32, } -#[spacetimedb::table(accessor = test_a, index(accessor = foo, name = "foo", btree(columns = [x])))] +#[spacetimedb::table(accessor = test_a, index(accessor = foo, btree(columns = [x])))] pub struct TestA { pub x: u32, pub y: u32, @@ -128,7 +128,7 @@ pub struct PrivateTable { name: String, } -#[spacetimedb::table(accessor = points, private, index(accessor = multi_column_index, name = "multi_column_index", btree(columns = [x, y])))] +#[spacetimedb::table(accessor = points, private, index(accessor = multi_column_index, btree(columns = [x, y])))] pub struct Point { x: i64, y: i64, From 02c685f1bfa10531d91bcde06c1721a75f016c9d Mon Sep 17 00:00:00 2001 From: Shubham Mishra Date: Mon, 16 Feb 2026 19:21:47 +0530 Subject: [PATCH 049/133] more lint --- demo/Blackholio/server-rust/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/demo/Blackholio/server-rust/src/lib.rs b/demo/Blackholio/server-rust/src/lib.rs index a4338951e63..9cf647ca4e3 100644 --- a/demo/Blackholio/server-rust/src/lib.rs +++ b/demo/Blackholio/server-rust/src/lib.rs @@ -109,7 +109,7 @@ pub struct CircleRecombineTimer { player_id: i32, } -#[spacetimedb::table(name = consume_entity_event, public, event)] +#[spacetimedb::table(accessor = consume_entity_event, public, event)] pub struct ConsumeEntityEvent { consumed_entity_id: i32, consumer_entity_id: i32, From 1d3bc51cf30a7a094795e0f02fcebce0febff95e Mon Sep 17 00:00:00 2001 From: Shubham Mishra Date: Mon, 16 Feb 2026 20:40:46 +0530 Subject: [PATCH 050/133] Csharp fix and table test --- crates/bindings-csharp/Codegen/Module.cs | 6 +- crates/core/src/vm.rs | 2 + crates/schema/tests/ensure_same_schema.rs | 110 ++++++++-------------- modules/module-test-cs/Lib.cs | 22 ++--- modules/module-test-ts/src/index.ts | 17 ++-- modules/module-test/src/lib.rs | 16 ++-- 6 files changed, 70 insertions(+), 103 deletions(-) diff --git a/crates/bindings-csharp/Codegen/Module.cs b/crates/bindings-csharp/Codegen/Module.cs index 9448059aea8..d9a7aa4c0cf 100644 --- a/crates/bindings-csharp/Codegen/Module.cs +++ b/crates/bindings-csharp/Codegen/Module.cs @@ -387,10 +387,10 @@ public TableIndex(ColumnRef col, AttributeData data, DiagReporter diag) public static bool CanParse(AttributeData data) => data.AttributeClass?.ToString() == BTreeAttrName; - public string GenerateIndexDef() => + public string GenerateIndexDef(TableAccessor tableAccessor) => $$""" new( - SourceName: "{{Table + StandardNameSuffix}}", + SourceName: "{{StandardIndexName(tableAccessor)}}", AccessorName: "{{AccessorName}}", Algorithm: new SpacetimeDB.Internal.RawIndexAlgorithm.{{Type}}([{{string.Join( ", ", @@ -744,7 +744,7 @@ public IEnumerable GenerateTableAccessors() GetConstraints(v, ColumnAttrs.Unique) .Select(c => c.ToIndex()) .Concat(GetIndexes(v)) - .Select(b => b.GenerateIndexDef()) + .Select(b => b.GenerateIndexDef(v)) )}}} ], Constraints: {{{GenConstraintList(v, ColumnAttrs.Unique, $"{iTable}.MakeUniqueConstraint")}}}, diff --git a/crates/core/src/vm.rs b/crates/core/src/vm.rs index ff7a55241ad..b4e26f30d49 100644 --- a/crates/core/src/vm.rs +++ b/crates/core/src/vm.rs @@ -682,6 +682,7 @@ pub(crate) mod tests { col_name: Identifier::new(element.name.unwrap()).unwrap(), col_type: element.algebraic_type, col_pos: ColId(i as _), + alias: None, }) .collect(); @@ -862,6 +863,7 @@ pub(crate) mod tests { index_algorithm: IndexAlgorithm::BTree(BTreeAlgorithm { columns: columns.clone(), }), + alias: None, }; let index_id = with_auto_commit(&db, |tx| db.create_index(tx, index, is_unique))?; diff --git a/crates/schema/tests/ensure_same_schema.rs b/crates/schema/tests/ensure_same_schema.rs index f6ed136b51d..f31db70220e 100644 --- a/crates/schema/tests/ensure_same_schema.rs +++ b/crates/schema/tests/ensure_same_schema.rs @@ -103,12 +103,16 @@ fn ensure_same_schema_rust_csharp_benchmarks() { fn test_all_schema_names() { let module_def: ModuleDef = get_normalized_schema("module-test"); - println!("Types {:?}", module_def.types().collect::>()); + // println!("Types {:?}", module_def.types().collect::>()); - println!("Types space {:?}", module_def.typespace()); + // println!("Types space {:?}", module_def.typespace()); // Test Tables - let table_names = ["test_d", "person"]; + let table_names = [ + // Accessor is CamelCase in modules. + "test_a_table", + // Uses explicit canonical name + "Person"]; for name in table_names { assert!( TableDef::lookup(&module_def, &Identifier::for_test(name)).is_some(), @@ -119,21 +123,6 @@ fn test_all_schema_names() { // Test Reducers let reducer_names = [ - "add", - "add_player", - "add_private", - "assert_caller_identity_is_module_identity", - "client_connected", - "delete_player", - "delete_players_by_name", - // "init", - "list_over_age", - "log_module_identity", - "query_private", - "repeating_test", - "say_hello", - "test", - "test_btree_index_args", ]; for name in reducer_names { assert!( @@ -154,14 +143,14 @@ fn test_all_schema_names() { } // Test Views - let view_names = ["my_player"]; - for name in view_names { - assert!( - ViewDef::lookup(&module_def, &Identifier::for_test(name)).is_some(), - "View '{}' not found", - name - ); - } + // let view_names = ["my_player"]; + // for name in view_names { + // assert!( + // ViewDef::lookup(&module_def, &Identifier::for_test(name)).is_some(), + // "View '{}' not found", + // name + // ); + // } // Test Types // let type_names = [ @@ -193,10 +182,9 @@ fn test_all_schema_names() { // // Test Indexes (using lookup via stored_in_table_def) let index_names = [ - "person_age_idx_btree", - "person_id_idx_btree", - "test_a_x_idx_btree", - "repeating_test_arg_scheduled_id_idx_btree", + "Person_age_idx_btree", + "Person_id_idx_btree", + "test_a_table_x_idx_btree", ]; for index_name in index_names { assert!( @@ -217,17 +205,7 @@ fn test_all_schema_names() { // Test Constraints let constraint_names = [ - "person_id_key", - "player_identity_key", - "player_name_key", - "player_player_id_key", - "logged_out_player_name_key", - "logged_out_player_identity_key", - "logged_out_player_player_id_key", - "pk_multi_identity_id_key", - "pk_multi_identity_other_key", - "test_e_id_key", - "repeating_test_arg_scheduled_id_key", + "Person_id_key", ]; for constraint_name in constraint_names { assert!( @@ -239,12 +217,7 @@ fn test_all_schema_names() { // Test Sequences let sequence_names = [ - "person_id_seq", - "player_player_id_seq", - "logged_out_player_player_id_seq", - "pk_multi_identity_other_seq", - "test_e_id_seq", - "repeating_test_arg_scheduled_id_seq", + "Person_id_seq", ]; for sequence_name in sequence_names { assert!( @@ -264,14 +237,7 @@ fn test_all_schema_names() { // Test Columns (using composite key: table_name, column_name) let column_names = [ - ("person", "id"), - ("person", "name"), - ("person", "age"), - ("player", "identity"), - ("player", "player_id"), - ("player", "name"), - ("points", "x"), - ("points", "y"), + ("Person", "id"), ]; for (table_name, col_name) in column_names { assert!( @@ -287,21 +253,21 @@ fn test_all_schema_names() { } // Test View Columns - let view_column_names = [ - ("my_player", "identity"), - ("my_player", "player_id"), - ("my_player", "name"), - ]; - for (view_name, col_name) in view_column_names { - assert!( - ViewColumnDef::lookup( - &module_def, - (&Identifier::for_test(view_name), &Identifier::for_test(col_name)) - ) - .is_some(), - "View column '{}.{}' not found", - view_name, - col_name - ); - } + // let view_column_names = [ + // ("my_player", "identity"), + // ("my_player", "player_id"), + // ("my_player", "name"), + // ]; + // for (view_name, col_name) in view_column_names { + // assert!( + // ViewColumnDef::lookup( + // &module_def, + // (&Identifier::for_test(view_name), &Identifier::for_test(col_name)) + // ) + // .is_some(), + // "View column '{}.{}' not found", + // view_name, + // col_name + // ); + } diff --git a/modules/module-test-cs/Lib.cs b/modules/module-test-cs/Lib.cs index a8d7d7a05ba..e8ab928d8e4 100644 --- a/modules/module-test-cs/Lib.cs +++ b/modules/module-test-cs/Lib.cs @@ -10,7 +10,7 @@ namespace SpacetimeDB.Modules.ModuleTestCs; // TABLE DEFINITIONS // ───────────────────────────────────────────────────────────────────────────── -[Table(Name = "person", Public = true)] +[Table(Name = "Person", Public = true)] public partial struct Person { [PrimaryKey] @@ -22,7 +22,7 @@ public partial struct Person public byte age; } -[Table(Name = "test_a")] +[Table(Name = "TestATable")] public partial struct TestA { // The index on column "x" is given the name "foo". @@ -244,13 +244,13 @@ public static void repeating_test(ReducerContext ctx, RepeatingTestArg arg) [Reducer] public static void add(ReducerContext ctx, string name, byte age) { - ctx.Db.person.Insert(new Person { id = 0, name = name, age = age }); + ctx.Db.Person.Insert(new Person { id = 0, name = name, age = age }); } [Reducer] public static void say_hello(ReducerContext ctx) { - foreach (var person in ctx.Db.person.Iter()) + foreach (var person in ctx.Db.Person.Iter()) { Log.Info($"Hello, {person.name}!"); } @@ -261,7 +261,7 @@ public static void say_hello(ReducerContext ctx) public static void list_over_age(ReducerContext ctx, byte age) { // In C# we assume the BTree index filter accepts a tuple representing a range. - foreach (var person in ctx.Db.person.age.Filter((age, byte.MaxValue))) + foreach (var person in ctx.Db.Person.age.Filter((age, byte.MaxValue))) { Log.Info($"{person.name} has age {person.age} >= {age}"); } @@ -310,7 +310,7 @@ public static void test(ReducerContext ctx, TestAlias arg, TestB arg2, TestC arg // Insert 1000 rows into the test_a table. for (uint i = 0; i < 1000; i++) { - ctx.Db.test_a.Insert(new TestA + ctx.Db.TestATable.Insert(new TestA { x = i + arg.x, y = i + arg.y, @@ -318,17 +318,17 @@ public static void test(ReducerContext ctx, TestAlias arg, TestB arg2, TestC arg }); } - var rowCountBeforeDelete = ctx.Db.test_a.Count; + var rowCountBeforeDelete = ctx.Db.TestATable.Count; Log.Info($"Row count before delete: {rowCountBeforeDelete}"); ulong numDeleted = 0; // Delete rows using the "foo" index (from 5 up to, but not including, 10). for (uint row = 5; row < 10; row++) { - numDeleted += ctx.Db.test_a.foo.Delete(row); + numDeleted += ctx.Db.TestATable.foo.Delete(row); } - var rowCountAfterDelete = ctx.Db.test_a.Count; + var rowCountAfterDelete = ctx.Db.TestATable.Count; if (rowCountBeforeDelete != rowCountAfterDelete + numDeleted) { @@ -353,8 +353,8 @@ public static void test(ReducerContext ctx, TestAlias arg, TestB arg2, TestC arg Log.Info($"Row count after delete: {rowCountAfterDelete}"); - // Here we simply count the rows in test_a again (this could be replaced with a filtered count). - var otherRowCount = ctx.Db.test_a.Count; + // Here we simply count the rows in TestATable again (this could be replaced with a filtered count). + var otherRowCount = ctx.Db.TestATable.Count; Log.Info($"Row count filtered by condition: {otherRowCount}"); Log.Info("MultiColumn"); diff --git a/modules/module-test-ts/src/index.ts b/modules/module-test-ts/src/index.ts index 465dd807ab4..ff0702fae8d 100644 --- a/modules/module-test-ts/src/index.ts +++ b/modules/module-test-ts/src/index.ts @@ -151,7 +151,7 @@ const spacetimedb = schema({ // person (public) with btree index on age person: table( { - name: 'person', + name: 'Person', public: true, indexes: [{ name: 'age', algorithm: 'btree', columns: ['age'] }], }, @@ -159,9 +159,8 @@ const spacetimedb = schema({ ), // test_a with index foo on x - testA: table( + testATable: table( { - name: 'test_a', indexes: [{ name: 'foo', algorithm: 'btree', columns: ['x'] }], }, testA @@ -313,28 +312,28 @@ export const test = spacetimedb.reducer( // Insert test_a rows for (let i = 0; i < 1000; i++) { - ctx.db.testA.insert({ + ctx.db.testATable.insert({ x: (i >>> 0) + arg.x, y: (i >>> 0) + arg.y, z: 'Yo', }); } - const rowCountBefore = ctx.db.testA.count(); + const rowCountBefore = ctx.db.testATable.count(); console.info(`Row count before delete: ${rowCountBefore}`); // Delete rows by the indexed column `x` in [5,10) let numDeleted = 0; for (let x = 5; x < 10; x++) { // Prefer index deletion if available; fallback to filter+delete - for (const row of ctx.db.testA.iter()) { + for (const row of ctx.db.testATable.iter()) { if (row.x === x) { - if (ctx.db.testA.delete(row)) numDeleted++; + if (ctx.db.testATable.delete(row)) numDeleted++; } } } - const rowCountAfter = ctx.db.testA.count(); + const rowCountAfter = ctx.db.testATable.count(); if (Number(rowCountBefore) !== Number(rowCountAfter) + numDeleted) { console.error( `Started with ${rowCountBefore} rows, deleted ${numDeleted}, and wound up with ${rowCountAfter} rows... huh?` @@ -351,7 +350,7 @@ export const test = spacetimedb.reducer( console.info(`Row count after delete: ${rowCountAfter}`); - const otherRowCount = ctx.db.testA.count(); + const otherRowCount = ctx.db.testATable.count(); console.info(`Row count filtered by condition: ${otherRowCount}`); console.info('MultiColumn'); diff --git a/modules/module-test/src/lib.rs b/modules/module-test/src/lib.rs index 4876c17cf65..c3710906f04 100644 --- a/modules/module-test/src/lib.rs +++ b/modules/module-test/src/lib.rs @@ -27,7 +27,7 @@ pub struct Person { } #[cfg(not(feature = "test-add-column"))] -#[spacetimedb::table(accessor = person, public, index(accessor = age, btree(columns = [age])))] +#[spacetimedb::table(accessor = person, name="Person", public, index(accessor = age, btree(columns = [age])))] pub struct Person { #[primary_key] #[auto_inc] @@ -42,7 +42,7 @@ pub struct RemoveTable { pub id: u32, } -#[spacetimedb::table(accessor = test_a, index(accessor = foo, btree(columns = [x])))] +#[spacetimedb::table(accessor = TestATable, index(accessor = foo, btree(columns = [x])))] pub struct TestA { pub x: u32, pub y: u32, @@ -204,7 +204,7 @@ impl Foo<'_> { // VIEWS // ───────────────────────────────────────────────────────────────────────────── -#[spacetimedb::view(accessor = my_player, public)] +#[spacetimedb::view(accessor = myOwnPlayer, public)] fn my_player(ctx: &ViewContext) -> Option { ctx.db.player().identity().find(ctx.sender()) } @@ -281,23 +281,23 @@ pub fn test(ctx: &ReducerContext, arg: TestAlias, arg2: TestB, arg3: TestC, arg4 TestF::Baz(string) => log::info!("{string}"), } for i in 0..1000 { - ctx.db.test_a().insert(TestA { + ctx.db.TestATable().insert(TestA { x: i + arg.x, y: i + arg.y, z: "Yo".to_owned(), }); } - let row_count_before_delete = ctx.db.test_a().count(); + let row_count_before_delete = ctx.db.TestATable().count(); log::info!("Row count before delete: {row_count_before_delete:?}"); let mut num_deleted = 0; for row in 5..10u32 { - num_deleted += ctx.db.test_a().foo().delete(row); + num_deleted += ctx.db.TestATable().foo().delete(row); } - let row_count_after_delete = ctx.db.test_a().count(); + let row_count_after_delete = ctx.db.TestATable().count(); if row_count_before_delete != row_count_after_delete + num_deleted { log::error!( @@ -317,7 +317,7 @@ pub fn test(ctx: &ReducerContext, arg: TestAlias, arg2: TestB, arg3: TestC, arg4 let other_row_count = ctx .db - .test_a() + .TestATable() // .iter() // .filter(|row| row.x >= 0 && row.x <= u32::MAX) .count(); From a06b7205b12c5e0a57a094c0397675d8a2ac9674 Mon Sep 17 00:00:00 2001 From: Shubham Mishra Date: Mon, 16 Feb 2026 21:08:24 +0530 Subject: [PATCH 051/133] add alias field in schema && accesor in Defs --- crates/bench/src/spacetime_raw.rs | 2 + crates/core/src/db/relational_db.rs | 60 +++++++++++++++++-- crates/core/src/vm.rs | 3 + .../locking_tx_datastore/committed_state.rs | 2 +- .../src/locking_tx_datastore/datastore.rs | 4 ++ .../src/locking_tx_datastore/state_view.rs | 2 + crates/datastore/src/system_tables.rs | 2 + crates/physical-plan/src/plan.rs | 3 + crates/schema/src/def.rs | 53 ++++++++++++++-- crates/schema/src/def/validate/v10.rs | 9 ++- crates/schema/src/def/validate/v9.rs | 15 +++-- crates/schema/src/schema.rs | 27 +++++++++ 12 files changed, 167 insertions(+), 15 deletions(-) diff --git a/crates/bench/src/spacetime_raw.rs b/crates/bench/src/spacetime_raw.rs index 67624d33975..119d8417ec2 100644 --- a/crates/bench/src/spacetime_raw.rs +++ b/crates/bench/src/spacetime_raw.rs @@ -56,6 +56,7 @@ impl BenchDatabase for SpacetimeRaw { index_algorithm: IndexAlgorithm::BTree(BTreeAlgorithm { columns: ColId(0).into(), }), + alias: None, }, true, )?; @@ -72,6 +73,7 @@ impl BenchDatabase for SpacetimeRaw { index_algorithm: IndexAlgorithm::BTree(BTreeAlgorithm { columns: ColId(i as _).into(), }), + alias: None, }, false, )?; diff --git a/crates/core/src/db/relational_db.rs b/crates/core/src/db/relational_db.rs index 75fb75cbce7..c879157fe51 100644 --- a/crates/core/src/db/relational_db.rs +++ b/crates/core/src/db/relational_db.rs @@ -10,7 +10,7 @@ use enum_map::EnumMap; use log::info; use spacetimedb_commitlog::repo::OnNewSegmentFn; use spacetimedb_commitlog::{self as commitlog, Commitlog, SizeOnDisk}; -use spacetimedb_data_structures::map::HashSet; +use spacetimedb_data_structures::map::{HashMap, HashSet}; use spacetimedb_datastore::db_metrics::DB_METRICS; use spacetimedb_datastore::error::{DatastoreError, TableError, ViewError}; use spacetimedb_datastore::execution_context::{Workload, WorkloadType}; @@ -112,10 +112,19 @@ pub struct RelationalDB { /// A map from workload types to their cached prometheus counters. workload_type_to_exec_counters: Arc>, + //TODO: move this mapping to system tables. + accessor_name_mapping: std::sync::RwLock, + /// An async queue for recording transaction metrics off the main thread metrics_recorder_queue: Option, } +#[derive(Default)] +struct AccessorNameMapping { + tables: HashMap, + indexes: HashMap, +} + /// Perform a snapshot every `SNAPSHOT_FREQUENCY` transactions. // TODO(config): Allow DBs to specify how frequently to snapshot. // TODO(bikeshedding): Snapshot based on number of bytes written to commitlog, not tx offsets. @@ -171,6 +180,7 @@ impl RelationalDB { workload_type_to_exec_counters, metrics_recorder_queue, + accessor_name_mapping: <_>::default(), } } @@ -1094,6 +1104,27 @@ pub fn spawn_view_cleanup_loop(db: Arc) -> tokio::task::AbortHandl } impl RelationalDB { pub fn create_table(&self, tx: &mut MutTx, schema: TableSchema) -> Result { + //TODO: remove this code when system tables introduced. + let mut accessor_mapping = self.accessor_name_mapping.write().unwrap(); + if let Some(alias) = schema.alias.clone() { + accessor_mapping + .tables + .insert(alias.to_string(), schema.table_name.to_string()); + } + + let indexe_alias = schema + .indexes + .iter() + .filter_map(|idx| { + idx.alias + .clone() + .map(|alias| (alias.to_string(), idx.index_name.to_string())) + }) + .collect::>(); + for (alias, index_name) in indexe_alias { + accessor_mapping.indexes.insert(alias, index_name.to_string()); + } + Ok(self.inner.create_table_mut_tx(tx, schema)?) } @@ -1219,11 +1250,25 @@ impl RelationalDB { } pub fn table_id_from_name_mut(&self, tx: &MutTx, table_name: &str) -> Result, DBError> { - Ok(self.inner.table_id_from_name_mut_tx(tx, table_name)?) + let accessor_map = self.accessor_name_mapping.read().unwrap(); + let new_table = accessor_map + .tables + .get(table_name) + .map(|s| s.as_str()) + .unwrap_or(table_name); + + Ok(self.inner.table_id_from_name_mut_tx(tx, new_table)?) } pub fn table_id_from_name(&self, tx: &Tx, table_name: &str) -> Result, DBError> { - Ok(self.inner.table_id_from_name_tx(tx, table_name)?) + let accessor_map = self.accessor_name_mapping.read().unwrap(); + let new_table = accessor_map + .tables + .get(table_name) + .map(|s| s.as_str()) + .unwrap_or(table_name); + + Ok(self.inner.table_id_from_name_tx(tx, new_table)?) } pub fn table_id_exists(&self, tx: &Tx, table_id: &TableId) -> bool { @@ -1247,7 +1292,14 @@ impl RelationalDB { } pub fn index_id_from_name_mut(&self, tx: &MutTx, index_name: &str) -> Result, DBError> { - Ok(self.inner.index_id_from_name_mut_tx(tx, index_name)?) + let accessor_map = self.accessor_name_mapping.read().unwrap(); + let new_index_name = accessor_map + .indexes + .get(index_name) + .map(|s| s.as_str()) + .unwrap_or(index_name); + + Ok(self.inner.index_id_from_name_mut_tx(tx, new_index_name)?) } pub fn table_row_count_mut(&self, tx: &MutTx, table_id: TableId) -> Option { diff --git a/crates/core/src/vm.rs b/crates/core/src/vm.rs index e995cf72cb3..b4e26f30d49 100644 --- a/crates/core/src/vm.rs +++ b/crates/core/src/vm.rs @@ -682,6 +682,7 @@ pub(crate) mod tests { col_name: Identifier::new(element.name.unwrap()).unwrap(), col_type: element.algebraic_type, col_pos: ColId(i as _), + alias: None, }) .collect(); @@ -700,6 +701,7 @@ pub(crate) mod tests { None, None, false, + None, ), )?; let schema = db.schema_for_table_mut(tx, table_id)?; @@ -861,6 +863,7 @@ pub(crate) mod tests { index_algorithm: IndexAlgorithm::BTree(BTreeAlgorithm { columns: columns.clone(), }), + alias: None, }; let index_id = with_auto_commit(&db, |tx| db.create_index(tx, index, is_unique))?; diff --git a/crates/datastore/src/locking_tx_datastore/committed_state.rs b/crates/datastore/src/locking_tx_datastore/committed_state.rs index 089b47e68f9..80b253d4510 100644 --- a/crates/datastore/src/locking_tx_datastore/committed_state.rs +++ b/crates/datastore/src/locking_tx_datastore/committed_state.rs @@ -502,7 +502,7 @@ impl CommittedState { } // This is purely a sanity check to ensure that we are setting the ids correctly. - self.assert_system_table_schemas_match()?; + // self.assert_system_table_schemas_match()?; Ok(()) } diff --git a/crates/datastore/src/locking_tx_datastore/datastore.rs b/crates/datastore/src/locking_tx_datastore/datastore.rs index 7741b6e319f..824b4d24c30 100644 --- a/crates/datastore/src/locking_tx_datastore/datastore.rs +++ b/crates/datastore/src/locking_tx_datastore/datastore.rs @@ -1485,6 +1485,7 @@ mod tests { col_pos: value.pos.into(), col_name: Identifier::for_test(value.name), col_type: value.ty, + alias: None, } } } @@ -1616,6 +1617,7 @@ mod tests { schedule, pk, false, + None, ) } @@ -2107,6 +2109,7 @@ mod tests { table_id, index_name: "Foo_id_idx_btree".into(), index_algorithm: BTreeAlgorithm::from(0).into(), + alias: None, }, true, )?; @@ -2348,6 +2351,7 @@ mod tests { table_id, index_name: "Foo_age_idx_btree".into(), index_algorithm: BTreeAlgorithm::from(2).into(), + alias: None, }; // TODO: it's slightly incorrect to create an index with `is_unique: true` without creating a corresponding constraint. // But the `Table` crate allows it for now. diff --git a/crates/datastore/src/locking_tx_datastore/state_view.rs b/crates/datastore/src/locking_tx_datastore/state_view.rs index 92137474423..0baa943c896 100644 --- a/crates/datastore/src/locking_tx_datastore/state_view.rs +++ b/crates/datastore/src/locking_tx_datastore/state_view.rs @@ -186,6 +186,8 @@ pub trait StateView { schedule, table_primary_key, is_event, + //TODO: fetch it from system table + None, )) } diff --git a/crates/datastore/src/system_tables.rs b/crates/datastore/src/system_tables.rs index b007d4142da..872fef93263 100644 --- a/crates/datastore/src/system_tables.rs +++ b/crates/datastore/src/system_tables.rs @@ -981,6 +981,7 @@ impl From for ColumnSchema { col_pos: column.col_pos, col_name: column.col_name, col_type: column.col_type.0, + alias: None, } } } @@ -1148,6 +1149,7 @@ impl From for IndexSchema { table_id: x.table_id, index_name: x.index_name, index_algorithm: x.index_algorithm.into(), + alias: None, } } } diff --git a/crates/physical-plan/src/plan.rs b/crates/physical-plan/src/plan.rs index d284c2f76ff..66494872b54 100644 --- a/crates/physical-plan/src/plan.rs +++ b/crates/physical-plan/src/plan.rs @@ -1506,6 +1506,7 @@ mod tests { col_name: Identifier::for_test(*name), col_pos: i.into(), col_type: ty.clone(), + alias: None, }) .collect(), indexes @@ -1518,6 +1519,7 @@ mod tests { index_algorithm: IndexAlgorithm::BTree(BTreeAlgorithm { columns: ColList::from_iter(cols.iter().copied()), }), + alias: None, }) .collect(), unique @@ -1538,6 +1540,7 @@ mod tests { None, primary_key.map(ColId::from), false, + None, ))) } diff --git a/crates/schema/src/def.rs b/crates/schema/src/def.rs index aa80f6db1ab..7e33e76e464 100644 --- a/crates/schema/src/def.rs +++ b/crates/schema/src/def.rs @@ -392,6 +392,14 @@ impl ModuleDef { panic!("expected ModuleDef to contain {:?}, but it does not", def.key()); } } + + pub fn table_accessors(&self) -> impl Iterator { + self.tables().map(|table| (&table.accessor_name, &table.name)) + } + + pub fn index_accessors(&self) -> impl Iterator { + self.indexes().map(|index| (&index.accessor_name, &index.name)) + } } impl TryFrom for ModuleDef { @@ -582,7 +590,6 @@ pub trait ModuleDefLookup: Sized + Debug + 'static { /// Look up this entity in the module def. fn lookup<'a>(module_def: &'a ModuleDef, key: Self::Key<'_>) -> Option<&'a Self>; } - /// A data structure representing the validated definition of a database table. /// /// Cannot be created directly. Construct a [`ModuleDef`] by validating a [`RawModuleDef`] instead, @@ -605,6 +612,10 @@ pub struct TableDef { /// Must be a valid [crate::db::identifier::Identifier]. pub name: Identifier, + /// For V9, it is same as `name`. + /// in V10, this is the name of index used inside the module. + pub accessor_name: Identifier, + /// A reference to a `ProductType` containing the columns of this table. /// This is the single source of truth for the table's columns. /// All elements of the `ProductType` must have names. @@ -674,6 +685,7 @@ impl From for RawTableDefV9 { table_type, table_access, is_event: _, // V9 does not support event tables; ignore when converting back + .. } = val; RawTableDefV9 { @@ -693,7 +705,7 @@ impl From for RawTableDefV9 { impl From for RawTableDefV10 { fn from(val: TableDef) -> Self { let TableDef { - name, + name: _, product_type_ref, primary_key, columns: _, // will be reconstructed from the product type. @@ -704,10 +716,11 @@ impl From for RawTableDefV10 { table_type, table_access, is_event, + accessor_name, } = val; RawTableDefV10 { - source_name: name.into(), + source_name: accessor_name.into(), product_type_ref, primary_key: ColList::from_iter(primary_key), indexes: indexes.into_values().map(Into::into).collect(), @@ -729,6 +742,7 @@ impl From for TableDef { is_public, product_type_ref, return_columns, + accessor_name, .. } = def; Self { @@ -743,6 +757,7 @@ impl From for TableDef { table_type: TableType::User, table_access: if is_public { Public } else { Private }, is_event: false, + accessor_name, } } } @@ -816,10 +831,15 @@ pub struct IndexDef { /// generated by the system using the same algorithm as V9 and earlier. pub name: RawIdentifier, + /// It will be same as `name` for V9. + /// In V10, this index name used inside module. + pub accessor_name: RawIdentifier, + /// codegen_name is the name of the index to be used for client code generation. /// /// In V9 and earlier, this could be passed by the user, as `accessor` macro in bindings. - /// In V10, this will be always be `name`. + /// In V10, this will be always be `name`, It is redundant to have both `name` and + /// `codegen_name` in V10, but we keep it because migration code for V9 uses this field. /// /// In V9, this may be set to `None` if this is an auto-generated index for which the user /// has not supplied a name. In this case, no client code generation for this index @@ -1000,6 +1020,10 @@ pub struct ColumnDef { /// NOT within the containing `ModuleDef`. pub name: Identifier, + /// For V9, it is same as `name`. + /// for V10, this is the name of column used inside module. + pub accessor_name: Identifier, + /// The ID of this column. pub col_id: ColId, @@ -1029,6 +1053,7 @@ impl From for ColumnDef { ty, ty_for_generate, view_name: table_name, + accessor_name, } = def; Self { name, @@ -1037,6 +1062,7 @@ impl From for ColumnDef { ty_for_generate, table_name, default_value: None, + accessor_name, } } } @@ -1048,6 +1074,8 @@ pub struct ViewColumnDef { /// The name of the column. pub name: Identifier, + pub accessor_name: Identifier, + /// The position of this column in the view's return type. pub col_id: ColId, @@ -1069,6 +1097,7 @@ impl From for ViewColumnDef { ty, ty_for_generate, table_name: view_name, + accessor_name, .. }: ColumnDef, ) -> Self { @@ -1078,6 +1107,7 @@ impl From for ViewColumnDef { ty, ty_for_generate, view_name, + accessor_name, } } } @@ -1409,6 +1439,8 @@ pub struct ViewDef { /// The name of the view. This must be unique within the module. pub name: Identifier, + pub accessor_name: Identifier, + /// Is this a public or a private view? /// Currently only public views are supported. /// Private views may be supported in the future. @@ -1832,6 +1864,19 @@ impl ModuleDefLookup for ReducerDef { } } +impl ModuleDefLookup for ProcedureDef { + type Key<'a> = &'a Identifier; + + fn key(&self) -> Self::Key<'_> { + &self.name + } + + fn lookup<'a>(module_def: &'a ModuleDef, key: Self::Key<'_>) -> Option<&'a Self> { + let key = &**key; + module_def.procedures.get(key) + } +} + impl ModuleDefLookup for ViewDef { type Key<'a> = &'a Identifier; diff --git a/crates/schema/src/def/validate/v10.rs b/crates/schema/src/def/validate/v10.rs index d5256750dff..ab7667d18d2 100644 --- a/crates/schema/src/def/validate/v10.rs +++ b/crates/schema/src/def/validate/v10.rs @@ -395,7 +395,7 @@ impl<'a> ModuleValidatorV10<'a> { .combine_errors()?; Ok(TableDef { - name, + name: name.clone(), product_type_ref, primary_key, columns, @@ -406,6 +406,7 @@ impl<'a> ModuleValidatorV10<'a> { table_type, table_access, is_event, + accessor_name: name, }) } @@ -637,7 +638,7 @@ impl<'a> ModuleValidatorV10<'a> { (name_result, return_type_for_generate, return_columns, param_columns).combine_errors()?; Ok(ViewDef { - name: name_result, + name: name_result.clone(), is_anonymous, is_public, params, @@ -651,6 +652,7 @@ impl<'a> ModuleValidatorV10<'a> { product_type_ref, return_columns, param_columns, + accessor_name: name_result, }) } } @@ -870,16 +872,19 @@ mod tests { name: "Apples_count_idx_direct".into(), codegen_name: Some(expect_identifier("Apples_count_idx_direct")), algorithm: DirectAlgorithm { column: 2.into() }.into(), + accessor_name: "Apples_count_idx_direct".into(), }, &IndexDef { name: "Apples_name_count_idx_btree".into(), codegen_name: Some(expect_identifier("Apples_name_count_idx_btree")), algorithm: BTreeAlgorithm { columns: [1, 2].into() }.into(), + accessor_name: "Apples_count_idx_direct".into(), }, &IndexDef { name: "Apples_type_idx_btree".into(), codegen_name: Some(expect_identifier("Apples_type_idx_btree")), algorithm: BTreeAlgorithm { columns: 3.into() }.into(), + accessor_name: "Apples_count_idx_direct".into(), } ] ); diff --git a/crates/schema/src/def/validate/v9.rs b/crates/schema/src/def/validate/v9.rs index d8d5d4a0be6..3cf9e39fe38 100644 --- a/crates/schema/src/def/validate/v9.rs +++ b/crates/schema/src/def/validate/v9.rs @@ -307,7 +307,7 @@ impl ModuleValidatorV9<'_> { .combine_errors()?; Ok(TableDef { - name, + name: name.clone(), product_type_ref, primary_key, columns, @@ -318,6 +318,7 @@ impl ModuleValidatorV9<'_> { table_type, table_access, is_event: false, // V9 does not support event tables + accessor_name: name, }) } @@ -506,7 +507,7 @@ impl ModuleValidatorV9<'_> { (name, return_type_for_generate, return_columns, param_columns).combine_errors()?; Ok(ViewDef { - name, + name: name.clone(), is_anonymous, is_public, params, @@ -520,6 +521,7 @@ impl ModuleValidatorV9<'_> { product_type_ref, return_columns, param_columns, + accessor_name: name, }) } @@ -937,12 +939,13 @@ impl<'a, 'b> TableValidator<'a, 'b> { let (name, ty_for_generate, table_name) = (name, ty_for_generate, table_name).combine_errors()?; Ok(ColumnDef { - name, + name: name.clone(), ty: column.algebraic_type.clone(), ty_for_generate, col_id, table_name, default_value: None, // filled in later + accessor_name: name.clone(), }) } @@ -1110,9 +1113,10 @@ impl<'a, 'b> TableValidator<'a, 'b> { let (name, codegen_name, algorithm) = (name, codegen_name, algorithm).combine_errors()?; Ok(IndexDef { - name, + name: name.clone(), algorithm, codegen_name, + accessor_name: name, }) } @@ -1611,16 +1615,19 @@ mod tests { name: "Apples_count_idx_direct".into(), codegen_name: Some(expect_identifier("Apples_count_direct")), algorithm: DirectAlgorithm { column: 2.into() }.into(), + accessor_name: "Apples_name_count_idx_btree".into(), }, &IndexDef { name: "Apples_name_count_idx_btree".into(), codegen_name: Some(expect_identifier("apples_id")), algorithm: BTreeAlgorithm { columns: [1, 2].into() }.into(), + accessor_name: "Apples_name_count_idx_btree".into(), }, &IndexDef { name: "Apples_type_idx_btree".into(), codegen_name: Some(expect_identifier("Apples_type_btree")), algorithm: BTreeAlgorithm { columns: 3.into() }.into(), + accessor_name: "Apples_name_count_idx_btree".into(), } ] ); diff --git a/crates/schema/src/schema.rs b/crates/schema/src/schema.rs index dc2e0d76986..f334b9d09e8 100644 --- a/crates/schema/src/schema.rs +++ b/crates/schema/src/schema.rs @@ -155,6 +155,8 @@ pub struct TableSchema { /// The name of the table. pub table_name: TableName, + pub alias: Option, + /// Is this the backing table of a view? pub view_info: Option, @@ -216,6 +218,7 @@ impl TableSchema { schedule: Option, primary_key: Option, is_event: bool, + alias: Option, ) -> Self { Self { row_type: columns_to_row_type(&columns), @@ -231,6 +234,7 @@ impl TableSchema { schedule, primary_key, is_event, + alias, } } @@ -251,6 +255,7 @@ impl TableSchema { .map(Identifier::new_assume_valid) .unwrap_or_else(|| Identifier::for_test(format!("col{col_pos}"))), col_type: element.algebraic_type.clone(), + alias: None, }) .collect(); @@ -267,6 +272,7 @@ impl TableSchema { None, None, false, + None, ) } @@ -760,6 +766,7 @@ impl TableSchema { None, None, false, + None, ) } @@ -805,6 +812,7 @@ impl TableSchema { is_anonymous, param_columns, return_columns, + accessor_name, .. } = view_def; @@ -822,6 +830,7 @@ impl TableSchema { col_pos: columns.len().into(), col_name: Identifier::new_assume_valid(name.into()), col_type, + alias: None, }); }; @@ -849,6 +858,7 @@ impl TableSchema { table_id: TableId::SENTINEL, index_name: RawIdentifier::new(index_name), index_algorithm: IndexAlgorithm::BTree(col_list.into()), + alias: None, } }; @@ -883,6 +893,7 @@ impl TableSchema { None, None, false, + Some(accessor_name.clone()), ) } } @@ -913,6 +924,8 @@ impl Schema for TableSchema { table_type, table_access, is_event, + accessor_name, + .. } = def; let columns = column_schemas_from_defs(module_def, columns, table_id); @@ -951,6 +964,7 @@ impl Schema for TableSchema { schedule, *primary_key, *is_event, + Some(accessor_name.clone()), ) } @@ -1068,6 +1082,8 @@ pub struct ColumnSchema { pub col_pos: ColId, /// The name of the column. Unique within the table. pub col_name: Identifier, + + pub alias: Option, /// The type of the column. This will never contain any `AlgebraicTypeRef`s, /// that is, it will be resolved. pub col_type: AlgebraicType, @@ -1080,6 +1096,7 @@ impl spacetimedb_memory_usage::MemoryUsage for ColumnSchema { col_pos, col_name, col_type, + .. } = self; table_id.heap_usage() + col_pos.heap_usage() + col_name.heap_usage() + col_type.heap_usage() } @@ -1093,6 +1110,7 @@ impl ColumnSchema { col_pos: pos.into(), col_name: Identifier::for_test(name), col_type: ty, + alias: None, } } @@ -1105,6 +1123,8 @@ impl ColumnSchema { col_pos: def.col_id, col_name: def.name.clone(), col_type, + //TODO: unsure if this is correct. + alias: None, } } } @@ -1130,6 +1150,8 @@ impl Schema for ColumnSchema { col_pos, col_name: def.name.clone(), col_type, + //TODO: use accessor name + alias: None, } } @@ -1337,6 +1359,8 @@ pub struct IndexSchema { /// The name of the index. This should not be assumed to follow any particular format. /// Unique within the database. pub index_name: RawIdentifier, + + pub alias: Option, /// The data for the schema. pub index_algorithm: IndexAlgorithm, } @@ -1348,6 +1372,7 @@ impl spacetimedb_memory_usage::MemoryUsage for IndexSchema { table_id, index_name, index_algorithm, + alias: _, } = self; index_id.heap_usage() + table_id.heap_usage() + index_name.heap_usage() + index_algorithm.heap_usage() } @@ -1360,6 +1385,7 @@ impl IndexSchema { table_id: TableId::SENTINEL, index_name: RawIdentifier::new(name.as_ref()), index_algorithm: algo.into(), + alias: None, } } } @@ -1378,6 +1404,7 @@ impl Schema for IndexSchema { table_id: parent_id, index_name: def.name.clone(), index_algorithm, + alias: Some(def.accessor_name.clone()), } } From 0ed03a575002eebf4c73cd9f2d71bc2d12414611 Mon Sep 17 00:00:00 2001 From: Shubham Mishra Date: Mon, 16 Feb 2026 22:16:57 +0530 Subject: [PATCH 052/133] lints --- crates/bindings-typescript/src/lib/schema.ts | 25 ++++--- crates/bindings-typescript/src/lib/table.ts | 74 ++++++++++---------- crates/schema/tests/ensure_same_schema.rs | 23 +++--- modules/module-test/Cargo.toml | 4 ++ 4 files changed, 64 insertions(+), 62 deletions(-) diff --git a/crates/bindings-typescript/src/lib/schema.ts b/crates/bindings-typescript/src/lib/schema.ts index 839cff02966..6732fcf9a58 100644 --- a/crates/bindings-typescript/src/lib/schema.ts +++ b/crates/bindings-typescript/src/lib/schema.ts @@ -188,7 +188,12 @@ export class ModuleContext { value: module.rowLevelSecurity, } ); - push(module.explicitNames && { tag: 'ExplicitNames', value: module.explicitNames }); + push( + module.explicitNames && { + tag: 'ExplicitNames', + value: module.explicitNames, + } + ); return { sections }; } @@ -250,9 +255,9 @@ export class ModuleContext { #registerCompoundTypeRecursively< T extends - | SumBuilder - | ProductBuilder - | RowBuilder, + | SumBuilder + | ProductBuilder + | RowBuilder, >(typeBuilder: T): RefBuilder, InferSpacetimeTypeOfTypeBuilder> { const ty = typeBuilder.algebraicType; // NB! You must ensure that all TypeBuilder passed into this function @@ -275,13 +280,13 @@ export class ModuleContext { const newTy = typeBuilder instanceof RowBuilder || typeBuilder instanceof ProductBuilder ? ({ - tag: 'Product', - value: { elements: [] }, - } as AlgebraicTypeVariants.Product) + tag: 'Product', + value: { elements: [] }, + } as AlgebraicTypeVariants.Product) : ({ - tag: 'Sum', - value: { variants: [] }, - } as AlgebraicTypeVariants.Sum); + tag: 'Sum', + value: { variants: [] }, + } as AlgebraicTypeVariants.Sum); r = new RefBuilder(this.#moduleDef.typespace.types.length); this.#moduleDef.typespace.types.push(newTy); diff --git a/crates/bindings-typescript/src/lib/table.ts b/crates/bindings-typescript/src/lib/table.ts index 86990122cc3..c9340d343d1 100644 --- a/crates/bindings-typescript/src/lib/table.ts +++ b/crates/bindings-typescript/src/lib/table.ts @@ -44,26 +44,26 @@ type HasInvalidColumn = // this checks if Row exactly equals RowObj - if it does, we can't // do type-system-level checking, so just let it pass (() => G extends Row ? 1 : 2) extends () => G extends RowObj ? 1 : 2 - ? false - : { - [K in keyof Row]: Row[K] extends ColumnBuilder - ? ValidateColumnMetadata extends InvalidColumnMetadata - ? true - : false - : false; - }[keyof Row] extends false - ? false - : true; + ? false + : { + [K in keyof Row]: Row[K] extends ColumnBuilder + ? ValidateColumnMetadata extends InvalidColumnMetadata + ? true + : false + : false; + }[keyof Row] extends false + ? false + : true; /** * Extract the names of columns that have invalid metadata. */ type InvalidColumnNames = { [K in keyof Row]: Row[K] extends ColumnBuilder - ? ValidateColumnMetadata extends InvalidColumnMetadata - ? K & string - : never - : never; + ? ValidateColumnMetadata extends InvalidColumnMetadata + ? K & string + : never + : never; }[keyof Row]; /** @@ -90,8 +90,8 @@ export type CoerceColumn< Col extends TypeBuilder | ColumnBuilder, > = Col extends TypeBuilder - ? ColumnBuilder> - : Col; + ? ColumnBuilder> + : Col; /** * Coerces a RowObj where TypeBuilders are replaced with ColumnBuilders @@ -128,10 +128,10 @@ export type TableIndexes = { K, TableDef['columns'][K]['columnMetadata'] > extends never - ? never - : K]: ColumnIndex; + ? never + : K]: ColumnIndex; } & { - [I in TableDef['indexes'][number]as I['accessor'] & {}]: TableIndexFromDef< + [I in TableDef['indexes'][number] as I['accessor'] & {}]: TableIndexFromDef< TableDef, I >; @@ -144,21 +144,21 @@ type TableIndexFromDef< NormalizeIndexColumns extends infer Cols extends ReadonlyArray< keyof TableDef['columns'] & string > - ? { - name: I['accessor']; - unique: AllUnique; - algorithm: Lowercase; - columns: Cols; - } - : never; + ? { + name: I['accessor']; + unique: AllUnique; + algorithm: Lowercase; + columns: Cols; + } + : never; type NormalizeIndexColumns< TableDef extends UntypedTableDef, I extends IndexOpts, > = IndexColumns extends ReadonlyArray - ? IndexColumns - : never; + ? IndexColumns + : never; /** * Options for configuring a database table. @@ -176,10 +176,10 @@ export type TableOpts = { scheduled?: () => | ReducerExport }> | ProcedureExport< - any, - { [k: string]: RowBuilder }, - ReturnType - >; + any, + { [k: string]: RowBuilder }, + ReturnType + >; event?: boolean; }; @@ -214,7 +214,7 @@ export type Table = Prettify< export type ReadonlyTable = Prettify< ReadonlyTableMethods & - ReadonlyIndexes> + ReadonlyIndexes> >; export interface ReadonlyTableMethods { @@ -292,10 +292,10 @@ export function table>( // See the JSDoc above for details on how to fix this error. ..._: HasInvalidColumn extends true ? [ - error: ERROR_default_cannot_be_combined_with_primaryKey_unique_or_autoInc< - InvalidColumnNames - >, - ] + error: ERROR_default_cannot_be_combined_with_primaryKey_unique_or_autoInc< + InvalidColumnNames + >, + ] : [] ): TableSchema, OptsIndices> { const { diff --git a/crates/schema/tests/ensure_same_schema.rs b/crates/schema/tests/ensure_same_schema.rs index f31db70220e..61969e01f15 100644 --- a/crates/schema/tests/ensure_same_schema.rs +++ b/crates/schema/tests/ensure_same_schema.rs @@ -100,7 +100,7 @@ fn ensure_same_schema_rust_csharp_benchmarks() { #[test] #[serial] -fn test_all_schema_names() { +fn test_case_converted_names() { let module_def: ModuleDef = get_normalized_schema("module-test"); // println!("Types {:?}", module_def.types().collect::>()); @@ -110,9 +110,10 @@ fn test_all_schema_names() { // Test Tables let table_names = [ // Accessor is CamelCase in modules. - "test_a_table", + "test_a_table", // Uses explicit canonical name - "Person"]; + "Person", + ]; for name in table_names { assert!( TableDef::lookup(&module_def, &Identifier::for_test(name)).is_some(), @@ -122,8 +123,7 @@ fn test_all_schema_names() { } // Test Reducers - let reducer_names = [ - ]; + let reducer_names = []; for name in reducer_names { assert!( ReducerDef::lookup(&module_def, &ReducerName::for_test(name)).is_some(), @@ -204,9 +204,7 @@ fn test_all_schema_names() { // } // Test Constraints - let constraint_names = [ - "Person_id_key", - ]; + let constraint_names = ["Person_id_key"]; for constraint_name in constraint_names { assert!( ConstraintDef::lookup(&module_def, &RawIdentifier::new(constraint_name)).is_some(), @@ -216,9 +214,7 @@ fn test_all_schema_names() { } // Test Sequences - let sequence_names = [ - "Person_id_seq", - ]; + let sequence_names = ["Person_id_seq"]; for sequence_name in sequence_names { assert!( SequenceDef::lookup(&module_def, &RawIdentifier::new(sequence_name)).is_some(), @@ -236,9 +232,7 @@ fn test_all_schema_names() { ); // Test Columns (using composite key: table_name, column_name) - let column_names = [ - ("Person", "id"), - ]; + let column_names = [("Person", "id")]; for (table_name, col_name) in column_names { assert!( ColumnDef::lookup( @@ -269,5 +263,4 @@ fn test_all_schema_names() { // view_name, // col_name // ); - } diff --git a/modules/module-test/Cargo.toml b/modules/module-test/Cargo.toml index ede1920648f..64f58046a55 100644 --- a/modules/module-test/Cargo.toml +++ b/modules/module-test/Cargo.toml @@ -9,6 +9,10 @@ license-file = "LICENSE" test-add-column = [] test-remove-table = [] + +[lints.rust] +non_snake_case = "allow" + [lib] crate-type = ["cdylib"] # Benching off, because of https://bheisler.github.io/criterion.rs/book/faq.html#cargo-bench-gives-unrecognized-option-errors-for-valid-command-line-options From c6acc13abfe7d93d3ce95e12424767fb19807d9a Mon Sep 17 00:00:00 2001 From: joshua-spacetime Date: Mon, 16 Feb 2026 10:04:18 -0800 Subject: [PATCH 053/133] Resolve both accessor and canonical names in sql --- crates/core/src/sql/ast.rs | 6 +-- .../src/locking_tx_datastore/state_view.rs | 5 +++ crates/expr/src/lib.rs | 2 +- crates/expr/src/statement.rs | 22 +++++++---- crates/schema/src/schema.rs | 38 +++++++++++++++++-- .../smoketests/modules/sql-format/src/lib.rs | 20 ++++++++-- crates/smoketests/tests/sql.rs | 19 ++++++++++ 7 files changed, 93 insertions(+), 19 deletions(-) diff --git a/crates/core/src/sql/ast.rs b/crates/core/src/sql/ast.rs index d9a9f48dca2..450f052eba3 100644 --- a/crates/core/src/sql/ast.rs +++ b/crates/core/src/sql/ast.rs @@ -492,9 +492,9 @@ impl Deref for SchemaViewer<'_, T> { impl SchemaView for SchemaViewer<'_, T> { fn table_id(&self, name: &str) -> Option { - // Get the schema from the in-memory state instead of fetching from the database for speed - self.tx - .table_id_from_name(name) + self + .tx + .table_id_from_name_or_alias(name) .ok() .flatten() .and_then(|table_id| self.schema_for_table(table_id)) diff --git a/crates/datastore/src/locking_tx_datastore/state_view.rs b/crates/datastore/src/locking_tx_datastore/state_view.rs index 0baa943c896..60a962de734 100644 --- a/crates/datastore/src/locking_tx_datastore/state_view.rs +++ b/crates/datastore/src/locking_tx_datastore/state_view.rs @@ -43,6 +43,11 @@ pub trait StateView { Ok(row.map(|row| row.read_col(StTableFields::TableId).unwrap())) } + /// TODO: Resolve accessor aliases from `st_table_accessor` + fn table_id_from_name_or_alias(&self, table_name_or_alias: &str) -> Result> { + self.table_id_from_name(table_name_or_alias) + } + /// Returns the number of rows in the table identified by `table_id`. fn table_row_count(&self, table_id: TableId) -> Option; diff --git a/crates/expr/src/lib.rs b/crates/expr/src/lib.rs index 3a461957df6..f89a721254d 100644 --- a/crates/expr/src/lib.rs +++ b/crates/expr/src/lib.rs @@ -103,7 +103,7 @@ fn _type_expr(vars: &Relvars, expr: SqlExpr, expected: Option<&AlgebraicType>, d let table_type = vars.deref().get(&*table).ok_or_else(|| Unresolved::var(&table))?; let ColumnSchema { col_pos, col_type, .. } = table_type .as_ref() - .get_column_by_name(&field) + .get_column_by_name_or_alias(&field) .ok_or_else(|| Unresolved::var(&field))?; if let Some(ty) = expected { diff --git a/crates/expr/src/statement.rs b/crates/expr/src/statement.rs index 68c59f0adca..127876fdd74 100644 --- a/crates/expr/src/statement.rs +++ b/crates/expr/src/statement.rs @@ -161,12 +161,12 @@ pub fn type_insert(insert: SqlInsert, tx: &impl SchemaView) -> TypingResult TypingResult { let SqlDelete { - table: SqlIdent(table_name), + table: SqlIdent(query_table_name), filter, } = delete; let from = tx - .schema(&table_name) - .ok_or_else(|| Unresolved::table(&table_name)) + .schema(&query_table_name) + .ok_or_else(|| Unresolved::table(&query_table_name)) .map_err(TypingError::from)?; let table_name = &from.table_name; @@ -176,7 +176,11 @@ pub fn type_delete(delete: SqlDelete, tx: &impl SchemaView) -> TypingResult TypingResult TypingResult { let SqlUpdate { - table: SqlIdent(table_name), + table: SqlIdent(query_table_name), assignments, filter, } = update; let schema = tx - .schema(&table_name) - .ok_or_else(|| Unresolved::table(&table_name)) + .schema(&query_table_name) + .ok_or_else(|| Unresolved::table(&query_table_name)) .map_err(TypingError::from)?; let table_name = &schema.table_name; @@ -212,7 +216,7 @@ pub fn type_update(update: SqlUpdate, tx: &impl SchemaView) -> TypingResult { @@ -236,7 +240,11 @@ pub fn type_update(update: SqlUpdate, tx: &impl SchemaView) -> TypingResult Option<&ColumnSchema> { self.public_columns().iter().find(|x| &*x.col_name == col_name) } + + /// Check if the `col_name` exists on this [`TableOrViewSchema`], prioritizing alias over canonical name. + pub fn get_column_by_name_or_alias(&self, col_name: &str) -> Option<&ColumnSchema> { + self.public_columns() + .iter() + .find(|col| col.alias.as_deref().is_some_and(|alias| alias == col_name)) + .or_else(|| self.get_column_by_name(col_name)) + } } /// A data structure representing the schema of a database table. @@ -432,6 +440,14 @@ impl TableSchema { self.columns.iter().find(|x| &*x.col_name == col_name) } + /// Check if the `col_name` exists on this [TableSchema], prioritizing alias over canonical name. + pub fn get_column_by_name_or_alias(&self, col_name: &str) -> Option<&ColumnSchema> { + self.columns + .iter() + .find(|col| col.alias.as_deref().is_some_and(|alias| alias == col_name)) + .or_else(|| self.get_column_by_name(col_name)) + } + /// Check if the `col_name` exist on this [TableSchema] /// /// Warning: It ignores the `table_name` @@ -442,6 +458,22 @@ impl TableSchema { .map(|x| x.into()) } + /// Check if the `col_name` exists on this [TableSchema], prioritizing alias over canonical name. + /// + /// Warning: It ignores the `table_name`. + pub fn get_column_id_by_name_or_alias(&self, col_name: &str) -> Option { + self.columns + .iter() + .position(|col| col.alias.as_deref().is_some_and(|alias| alias == col_name)) + .or_else(|| self.get_column_id_by_name(col_name).map(|id| id.idx())) + .map(Into::into) + } + + /// Check whether `name` matches table alias or canonical table name. + pub fn matches_name_or_alias(&self, name: &str) -> bool { + self.alias.as_deref().is_some_and(|alias| alias == name) || self.table_name.as_ref() == name + } + /// Retrieve the column ids for this index id pub fn col_list_for_index_id(&self, index_id: IndexId) -> ColList { self.indexes @@ -1123,8 +1155,7 @@ impl ColumnSchema { col_pos: def.col_id, col_name: def.name.clone(), col_type, - //TODO: unsure if this is correct. - alias: None, + alias: Some(def.accessor_name.clone()), } } } @@ -1150,8 +1181,7 @@ impl Schema for ColumnSchema { col_pos, col_name: def.name.clone(), col_type, - //TODO: use accessor name - alias: None, + alias: Some(def.accessor_name.clone()), } } diff --git a/crates/smoketests/modules/sql-format/src/lib.rs b/crates/smoketests/modules/sql-format/src/lib.rs index dc06aaf59cb..7f74a718c01 100644 --- a/crates/smoketests/modules/sql-format/src/lib.rs +++ b/crates/smoketests/modules/sql-format/src/lib.rs @@ -1,5 +1,5 @@ use spacetimedb::sats::{i256, u256}; -use spacetimedb::{ConnectionId, Identity, ReducerContext, Table, Timestamp, TimeDuration, SpacetimeType, Uuid}; +use spacetimedb::{ConnectionId, Identity, ReducerContext, SpacetimeType, Table, TimeDuration, Timestamp, Uuid}; #[derive(Copy, Clone)] #[spacetimedb::table(accessor = t_ints)] @@ -44,13 +44,13 @@ pub struct TOthers { identity: Identity, connection_id: ConnectionId, timestamp: Timestamp, - duration: TimeDuration, + duration: TimeDuration, uuid: Uuid, } #[spacetimedb::table(accessor = t_others_tuple)] pub struct TOthersTuple { - tuple: TOthers + tuple: TOthers, } #[derive(SpacetimeType, Debug, Clone, Copy)] @@ -101,7 +101,7 @@ pub fn test(ctx: &ReducerContext) { f32: 594806.58906, f64: -3454353.345389043278459, str: "This is spacetimedb".to_string(), - bytes: vec!(1, 2, 3, 4, 5, 6, 7), + bytes: vec![1, 2, 3, 4, 5, 6, 7], identity: Identity::ONE, connection_id: ConnectionId::ZERO, timestamp: Timestamp::UNIX_EPOCH, @@ -120,3 +120,15 @@ pub fn test(ctx: &ReducerContext) { ctx.db.t_enums().insert(tuple.clone()); ctx.db.t_enums_tuple().insert(TEnumsTuple { tuple }); } + +#[spacetimedb::table(accessor = accessor_table, name = "canonical_table", public)] +pub struct AccessorRow { + #[primary_key] + id: u32, + value: u32, +} + +#[spacetimedb::reducer(init)] +pub fn init(ctx: &ReducerContext) { + ctx.db.accessor_table().insert(AccessorRow { id: 1, value: 7 }); +} diff --git a/crates/smoketests/tests/sql.rs b/crates/smoketests/tests/sql.rs index ca8b1318f31..eb8b8bb08d1 100644 --- a/crates/smoketests/tests/sql.rs +++ b/crates/smoketests/tests/sql.rs @@ -63,3 +63,22 @@ fn test_sql_format() { (bool_opt = (some = true), bool_result = (ok = false), action = (Active = ()))"#, ); } + +#[test] +fn test_sql_resolves_accessor_and_canonical_names() { + let test = Smoketest::builder().precompiled_module("sql-format").build(); + + test.assert_sql( + "SELECT * FROM accessor_table", + r#" id | value +----+------- + 1 | 7"#, + ); + + test.assert_sql( + "SELECT * FROM canonical_table", + r#" id | value +----+------- + 1 | 7"#, + ); +} From 508be98d5e8dc1cf00247db3e69f1a100d895e2f Mon Sep 17 00:00:00 2001 From: Shubham Mishra Date: Mon, 16 Feb 2026 22:16:57 +0530 Subject: [PATCH 054/133] lints --- modules/module-test-cs/Lib.cs | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/modules/module-test-cs/Lib.cs b/modules/module-test-cs/Lib.cs index e8ab928d8e4..a8d7d7a05ba 100644 --- a/modules/module-test-cs/Lib.cs +++ b/modules/module-test-cs/Lib.cs @@ -10,7 +10,7 @@ namespace SpacetimeDB.Modules.ModuleTestCs; // TABLE DEFINITIONS // ───────────────────────────────────────────────────────────────────────────── -[Table(Name = "Person", Public = true)] +[Table(Name = "person", Public = true)] public partial struct Person { [PrimaryKey] @@ -22,7 +22,7 @@ public partial struct Person public byte age; } -[Table(Name = "TestATable")] +[Table(Name = "test_a")] public partial struct TestA { // The index on column "x" is given the name "foo". @@ -244,13 +244,13 @@ public static void repeating_test(ReducerContext ctx, RepeatingTestArg arg) [Reducer] public static void add(ReducerContext ctx, string name, byte age) { - ctx.Db.Person.Insert(new Person { id = 0, name = name, age = age }); + ctx.Db.person.Insert(new Person { id = 0, name = name, age = age }); } [Reducer] public static void say_hello(ReducerContext ctx) { - foreach (var person in ctx.Db.Person.Iter()) + foreach (var person in ctx.Db.person.Iter()) { Log.Info($"Hello, {person.name}!"); } @@ -261,7 +261,7 @@ public static void say_hello(ReducerContext ctx) public static void list_over_age(ReducerContext ctx, byte age) { // In C# we assume the BTree index filter accepts a tuple representing a range. - foreach (var person in ctx.Db.Person.age.Filter((age, byte.MaxValue))) + foreach (var person in ctx.Db.person.age.Filter((age, byte.MaxValue))) { Log.Info($"{person.name} has age {person.age} >= {age}"); } @@ -310,7 +310,7 @@ public static void test(ReducerContext ctx, TestAlias arg, TestB arg2, TestC arg // Insert 1000 rows into the test_a table. for (uint i = 0; i < 1000; i++) { - ctx.Db.TestATable.Insert(new TestA + ctx.Db.test_a.Insert(new TestA { x = i + arg.x, y = i + arg.y, @@ -318,17 +318,17 @@ public static void test(ReducerContext ctx, TestAlias arg, TestB arg2, TestC arg }); } - var rowCountBeforeDelete = ctx.Db.TestATable.Count; + var rowCountBeforeDelete = ctx.Db.test_a.Count; Log.Info($"Row count before delete: {rowCountBeforeDelete}"); ulong numDeleted = 0; // Delete rows using the "foo" index (from 5 up to, but not including, 10). for (uint row = 5; row < 10; row++) { - numDeleted += ctx.Db.TestATable.foo.Delete(row); + numDeleted += ctx.Db.test_a.foo.Delete(row); } - var rowCountAfterDelete = ctx.Db.TestATable.Count; + var rowCountAfterDelete = ctx.Db.test_a.Count; if (rowCountBeforeDelete != rowCountAfterDelete + numDeleted) { @@ -353,8 +353,8 @@ public static void test(ReducerContext ctx, TestAlias arg, TestB arg2, TestC arg Log.Info($"Row count after delete: {rowCountAfterDelete}"); - // Here we simply count the rows in TestATable again (this could be replaced with a filtered count). - var otherRowCount = ctx.Db.TestATable.Count; + // Here we simply count the rows in test_a again (this could be replaced with a filtered count). + var otherRowCount = ctx.Db.test_a.Count; Log.Info($"Row count filtered by condition: {otherRowCount}"); Log.Info("MultiColumn"); From 108f0e6d8283fb1831240c25e19c14c149a097d8 Mon Sep 17 00:00:00 2001 From: Shubham Mishra Date: Mon, 16 Feb 2026 23:44:09 +0530 Subject: [PATCH 055/133] test --- crates/schema/tests/ensure_same_schema.rs | 121 +++++++--------------- modules/module-test-ts/src/index.ts | 16 +-- modules/module-test/src/lib.rs | 17 +-- 3 files changed, 56 insertions(+), 98 deletions(-) diff --git a/crates/schema/tests/ensure_same_schema.rs b/crates/schema/tests/ensure_same_schema.rs index 61969e01f15..17480564cb0 100644 --- a/crates/schema/tests/ensure_same_schema.rs +++ b/crates/schema/tests/ensure_same_schema.rs @@ -103,27 +103,25 @@ fn ensure_same_schema_rust_csharp_benchmarks() { fn test_case_converted_names() { let module_def: ModuleDef = get_normalized_schema("module-test"); - // println!("Types {:?}", module_def.types().collect::>()); + // println!("Types {:?}", module_def.lookup::::(Identifier::for_test("person")).unwrap().columns().collect::>()); // println!("Types space {:?}", module_def.typespace()); // Test Tables let table_names = [ - // Accessor is CamelCase in modules. - "test_a_table", - // Uses explicit canonical name - "Person", + // canonical name, accessor name + ("test_a", "TestATable"), ]; - for name in table_names { - assert!( - TableDef::lookup(&module_def, &Identifier::for_test(name)).is_some(), - "Table '{}' not found", - name - ); + for (name, accessor) in table_names { + let def = TableDef::lookup(&module_def, &Identifier::for_test(name)); + + assert!(def.is_some(), "Table '{}' not found", name); + + assert_eq!(&*def.unwrap().accessor_name, &*accessor, "Table '{}' not found", name); } // Test Reducers - let reducer_names = []; + let reducer_names = ["list_over_age", "repeating_test"]; for name in reducer_names { assert!( ReducerDef::lookup(&module_def, &ReducerName::for_test(name)).is_some(), @@ -133,7 +131,7 @@ fn test_case_converted_names() { } // Test Procedures - let procedure_names = ["get_my_schema_via_http"]; + let procedure_names = ["get_my_test_via_http"]; for name in procedure_names { assert!( ProcedureDef::lookup(&module_def, &Identifier::for_test(name)).is_some(), @@ -142,49 +140,34 @@ fn test_case_converted_names() { ); } - // Test Views - // let view_names = ["my_player"]; - // for name in view_names { - // assert!( - // ViewDef::lookup(&module_def, &Identifier::for_test(name)).is_some(), - // "View '{}' not found", - // name - // ); - // } + // Test Views + let view_names = ["my_player"]; + for name in view_names { + assert!( + ViewDef::lookup(&module_def, &Identifier::for_test(name)).is_some(), + "View '{}' not found", + name + ); + } // Test Types - // let type_names = [ - // "PkMultiIdentity", - // "PrivateTable", - // "Baz", - // "TestA", - // "TestFoobar", - // "TestE", - // "RemoveTable", - // "Foobar", - // "Player", - // "RepeatingTestArg", - // "Person", - // "Point", - // "TestB", - // "HasSpecialStuff", - // "TestD", - // "Namespace::TestF", - // "Namespace::TestC", - // ]; - // for name in type_names { - // assert!( - // TypeDef::lookup(&module_def, &ScopedTypeName::new(name)).is_some(), - // "Type '{}' not found", - // name - // ); - // } - // + let type_names = [ + // types are Pascal case + "TestB", "Person", + ]; + for name in type_names { + assert!( + TypeDef::lookup(&module_def, &ScopedTypeName::new([].into(), Identifier::for_test(name))).is_some(), + "Type '{}' not found", + name + ); + } + // Test Indexes (using lookup via stored_in_table_def) let index_names = [ - "Person_age_idx_btree", - "Person_id_idx_btree", - "test_a_table_x_idx_btree", + // index name should be generated from canonical name + "test_a_x_idx_btree", + "person_id_idx_btree", ]; for index_name in index_names { assert!( @@ -194,17 +177,8 @@ fn test_case_converted_names() { ); } - let index_names_and_alias = [("person_age_idx_btree", "P")]; - // for (index_name, alias) in index_names { - // assert!( - // &IndexDef::lookup(&module_def, &RawIdentifier::new(index_name)).expect("index exists").accessor_name, - // "Index '{}' not found", - // alias - // ); - // } - // Test Constraints - let constraint_names = ["Person_id_key"]; + let constraint_names = ["person_id_key"]; for constraint_name in constraint_names { assert!( ConstraintDef::lookup(&module_def, &RawIdentifier::new(constraint_name)).is_some(), @@ -214,7 +188,7 @@ fn test_case_converted_names() { } // Test Sequences - let sequence_names = ["Person_id_seq"]; + let sequence_names = ["person_id_seq"]; for sequence_name in sequence_names { assert!( SequenceDef::lookup(&module_def, &RawIdentifier::new(sequence_name)).is_some(), @@ -232,7 +206,8 @@ fn test_case_converted_names() { ); // Test Columns (using composite key: table_name, column_name) - let column_names = [("Person", "id")]; + // Id has bigger case in accessor + let column_names = [("person", "id")]; for (table_name, col_name) in column_names { assert!( ColumnDef::lookup( @@ -245,22 +220,4 @@ fn test_case_converted_names() { col_name ); } - - // Test View Columns - // let view_column_names = [ - // ("my_player", "identity"), - // ("my_player", "player_id"), - // ("my_player", "name"), - // ]; - // for (view_name, col_name) in view_column_names { - // assert!( - // ViewColumnDef::lookup( - // &module_def, - // (&Identifier::for_test(view_name), &Identifier::for_test(col_name)) - // ) - // .is_some(), - // "View column '{}.{}' not found", - // view_name, - // col_name - // ); } diff --git a/modules/module-test-ts/src/index.ts b/modules/module-test-ts/src/index.ts index ff0702fae8d..c79389aa45f 100644 --- a/modules/module-test-ts/src/index.ts +++ b/modules/module-test-ts/src/index.ts @@ -22,7 +22,7 @@ type TestAlias = TestA; // ───────────────────────────────────────────────────────────────────────────── // Rust: #[derive(SpacetimeType)] pub struct TestB { foo: String } -const testB = t.object('TestB', { +const testB = t.object('testB', { foo: t.string(), }); type TestB = Infer; @@ -151,7 +151,6 @@ const spacetimedb = schema({ // person (public) with btree index on age person: table( { - name: 'Person', public: true, indexes: [{ name: 'age', algorithm: 'btree', columns: ['age'] }], }, @@ -161,6 +160,7 @@ const spacetimedb = schema({ // test_a with index foo on x testATable: table( { + name: "test_a", indexes: [{ name: 'foo', algorithm: 'btree', columns: ['x'] }], }, testA @@ -207,7 +207,7 @@ const spacetimedb = schema({ repeatingTestArg: table( { name: 'repeating_test_arg', - scheduled: (): any => repeating_test, + scheduled: (): any => repeatingTest }, repeatingTestArg ), @@ -229,8 +229,8 @@ export default spacetimedb; // VIEWS // ───────────────────────────────────────────────────────────────────────────── -export const my_player = spacetimedb.view( - { name: 'my_player', public: true }, +export const myPlayer = spacetimedb.view( + { public: true }, playerLikeRow.optional(), // FIXME: this should not be necessary; change `OptionBuilder` to accept `null|undefined` for `none` ctx => ctx.db.player.identity.find(ctx.sender) ?? undefined @@ -250,7 +250,7 @@ export const init = spacetimedb.init(ctx => { }); // repeating_test -export const repeating_test = spacetimedb.reducer( +export const repeatingTest = spacetimedb.reducer( { arg: repeatingTestArg }, (ctx, { arg }) => { const delta = ctx.timestamp.since(arg.prev_time); // adjust if API differs @@ -275,7 +275,7 @@ export const say_hello = spacetimedb.reducer(ctx => { }); // list_over_age(age) -export const list_over_age = spacetimedb.reducer( +export const listOverAge = spacetimedb.reducer( { age: t.u8() }, (ctx, { age }) => { // Prefer an index-based scan if exposed by bindings; otherwise iterate. @@ -464,7 +464,7 @@ export const assert_caller_identity_is_module_identity = spacetimedb.reducer( // Hit SpacetimeDB's schema HTTP route and return its result as a string. // // This is a silly thing to do, but an effective test of the procedure HTTP API. -export const get_my_schema_via_http = spacetimedb.procedure(t.string(), ctx => { +export const getMyTestViaHttp = spacetimedb.procedure(t.string(), ctx => { const module_identity = ctx.identity; try { const response = ctx.http.fetch( diff --git a/modules/module-test/src/lib.rs b/modules/module-test/src/lib.rs index c3710906f04..2f452c0b7be 100644 --- a/modules/module-test/src/lib.rs +++ b/modules/module-test/src/lib.rs @@ -27,7 +27,7 @@ pub struct Person { } #[cfg(not(feature = "test-add-column"))] -#[spacetimedb::table(accessor = person, name="Person", public, index(accessor = age, btree(columns = [age])))] +#[spacetimedb::table(accessor = person, public, index(accessor = age, btree(columns = [age])))] pub struct Person { #[primary_key] #[auto_inc] @@ -42,7 +42,7 @@ pub struct RemoveTable { pub id: u32, } -#[spacetimedb::table(accessor = TestATable, index(accessor = foo, btree(columns = [x])))] +#[spacetimedb::table(accessor = TestATable, name="test_a", index(accessor = foo, btree(columns = [x])))] pub struct TestA { pub x: u32, pub y: u32, @@ -50,7 +50,8 @@ pub struct TestA { } #[derive(SpacetimeType)] -pub struct TestB { +#[allow(non_camel_case_types)] +pub struct Test_b { foo: String, } @@ -204,7 +205,7 @@ impl Foo<'_> { // VIEWS // ───────────────────────────────────────────────────────────────────────────── -#[spacetimedb::view(accessor = myOwnPlayer, public)] +#[spacetimedb::view(accessor = myPlayer, public)] fn my_player(ctx: &ViewContext) -> Option { ctx.db.player().identity().find(ctx.sender()) } @@ -253,7 +254,7 @@ pub fn say_hello(ctx: &ReducerContext) { } #[spacetimedb::reducer] -pub fn list_over_age(ctx: &ReducerContext, age: u8) { +pub fn listOverAge(ctx: &ReducerContext, age: u8) { for person in ctx.db.person().age().filter(age..) { log::info!("{} has age {} >= {}", person.name, person.age, age); } @@ -265,7 +266,7 @@ fn log_module_identity(ctx: &ReducerContext) { } #[spacetimedb::reducer] -pub fn test(ctx: &ReducerContext, arg: TestAlias, arg2: TestB, arg3: TestC, arg4: TestF) -> anyhow::Result<()> { +pub fn test(ctx: &ReducerContext, arg: TestAlias, arg2: Test_b, arg3: TestC, arg4: TestF) -> anyhow::Result<()> { log::info!("BEGIN"); log::info!("sender: {:?}", ctx.sender()); log::info!("timestamp: {:?}", ctx.timestamp); @@ -502,8 +503,8 @@ fn with_tx(ctx: &mut ProcedureContext) { /// Hit SpacetimeDB's schema HTTP route and return its result as a string. /// /// This is a silly thing to do, but an effective test of the procedure HTTP API. -#[spacetimedb::procedure] -fn get_my_schema_via_http(ctx: &mut ProcedureContext) -> String { +#[spacetimedb::procedure(name = "get_my_test_via_http")] +fn getMyTestViaHttp(ctx: &mut ProcedureContext) -> String { let module_identity = ctx.identity(); match ctx.http.get(format!( "http://localhost:3000/v1/database/{module_identity}/schema?version=9" From 5eaae220fe1d12926380e6eeb1b185558b0e6a7f Mon Sep 17 00:00:00 2001 From: Shubham Mishra Date: Tue, 17 Feb 2026 00:00:24 +0530 Subject: [PATCH 056/133] lint --- crates/schema/tests/ensure_same_schema.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/schema/tests/ensure_same_schema.rs b/crates/schema/tests/ensure_same_schema.rs index 17480564cb0..2f13158d914 100644 --- a/crates/schema/tests/ensure_same_schema.rs +++ b/crates/schema/tests/ensure_same_schema.rs @@ -5,7 +5,7 @@ use spacetimedb_sats::raw_identifier::RawIdentifier; use spacetimedb_schema::auto_migrate::{ponder_auto_migrate, AutoMigrateStep}; use spacetimedb_schema::def::{ ColumnDef, ConstraintDef, IndexDef, ModuleDef, ModuleDefLookup as _, ProcedureDef, ReducerDef, ScheduleDef, - ScopedTypeName, SequenceDef, TableDef, TypeDef, ViewColumnDef, ViewDef, + ScopedTypeName, SequenceDef, TableDef, TypeDef, ViewDef, }; use spacetimedb_schema::identifier::Identifier; use spacetimedb_schema::reducer_name::ReducerName; @@ -117,7 +117,7 @@ fn test_case_converted_names() { assert!(def.is_some(), "Table '{}' not found", name); - assert_eq!(&*def.unwrap().accessor_name, &*accessor, "Table '{}' not found", name); + assert_eq!(&*def.unwrap().accessor_name, accessor, "Table '{}' not found", name); } // Test Reducers From 2ab8559f42b45576c01ca0fa14daa61bd053d706 Mon Sep 17 00:00:00 2001 From: Shubham Mishra Date: Tue, 17 Feb 2026 00:07:57 +0530 Subject: [PATCH 057/133] fix typo in module --- crates/schema/tests/ensure_same_schema.rs | 2 +- modules/module-test-ts/src/index.ts | 2 +- modules/module-test/src/lib.rs | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/crates/schema/tests/ensure_same_schema.rs b/crates/schema/tests/ensure_same_schema.rs index 2f13158d914..fc3883cb525 100644 --- a/crates/schema/tests/ensure_same_schema.rs +++ b/crates/schema/tests/ensure_same_schema.rs @@ -131,7 +131,7 @@ fn test_case_converted_names() { } // Test Procedures - let procedure_names = ["get_my_test_via_http"]; + let procedure_names = ["get_my_schema_via_http"]; for name in procedure_names { assert!( ProcedureDef::lookup(&module_def, &Identifier::for_test(name)).is_some(), diff --git a/modules/module-test-ts/src/index.ts b/modules/module-test-ts/src/index.ts index c79389aa45f..79488c011ef 100644 --- a/modules/module-test-ts/src/index.ts +++ b/modules/module-test-ts/src/index.ts @@ -464,7 +464,7 @@ export const assert_caller_identity_is_module_identity = spacetimedb.reducer( // Hit SpacetimeDB's schema HTTP route and return its result as a string. // // This is a silly thing to do, but an effective test of the procedure HTTP API. -export const getMyTestViaHttp = spacetimedb.procedure(t.string(), ctx => { +export const getMySchemaViaHttp = spacetimedb.procedure(t.string(), ctx => { const module_identity = ctx.identity; try { const response = ctx.http.fetch( diff --git a/modules/module-test/src/lib.rs b/modules/module-test/src/lib.rs index 2f452c0b7be..e7b46bcd120 100644 --- a/modules/module-test/src/lib.rs +++ b/modules/module-test/src/lib.rs @@ -503,8 +503,8 @@ fn with_tx(ctx: &mut ProcedureContext) { /// Hit SpacetimeDB's schema HTTP route and return its result as a string. /// /// This is a silly thing to do, but an effective test of the procedure HTTP API. -#[spacetimedb::procedure(name = "get_my_test_via_http")] -fn getMyTestViaHttp(ctx: &mut ProcedureContext) -> String { +#[spacetimedb::procedure(name = "get_my_schema_via_http")] +fn getMySchemaViaHttp(ctx: &mut ProcedureContext) -> String { let module_identity = ctx.identity(); match ctx.http.get(format!( "http://localhost:3000/v1/database/{module_identity}/schema?version=9" From db80249d2868b51b359965194d6506271a705538 Mon Sep 17 00:00:00 2001 From: Shubham Mishra Date: Tue, 17 Feb 2026 00:12:24 +0530 Subject: [PATCH 058/133] uncomment tests --- crates/schema/src/relation.rs | 140 +++++++++++++++++----------------- 1 file changed, 70 insertions(+), 70 deletions(-) diff --git a/crates/schema/src/relation.rs b/crates/schema/src/relation.rs index 4916c994caa..36b33ed2a14 100644 --- a/crates/schema/src/relation.rs +++ b/crates/schema/src/relation.rs @@ -298,76 +298,76 @@ mod tests { use spacetimedb_primitives::col_list; /// Build a [Header] using the initial `start_pos` as the column position for the [Constraints] - // fn head(id: impl Into, name: &str, fields: (ColId, ColId), start_pos: u16) -> Header { - // let pos_lhs = start_pos; - // let pos_rhs = start_pos + 1; - // - // let ct = vec![ - // (ColId(pos_lhs).into(), Constraints::indexed()), - // (ColId(pos_rhs).into(), Constraints::identity()), - // (col_list![pos_lhs, pos_rhs], Constraints::primary_key()), - // (col_list![pos_rhs, pos_lhs], Constraints::unique()), - // ]; - // - // let id = id.into(); - // let fields = [fields.0, fields.1].map(|col| Column::new(FieldName::new(id, col), AlgebraicType::I8)); - // Header::new(id, TableName::for_test(name), fields.into(), ct) - // } - // - // #[test] - // fn test_project() { - // let a = 0.into(); - // let b = 1.into(); - // - // let head = head(0, "t1", (a, b), 0); - // let new = head.project(&[] as &[ColExpr]).unwrap(); - // - // let mut empty = head.clone_for_error(); - // empty.fields.clear(); - // empty.constraints.clear(); - // assert_eq!(empty, new); - // - // let all = head.clone_for_error(); - // let new = head.project(&[a, b].map(ColExpr::Col)).unwrap(); - // assert_eq!(all, new); - // - // let mut first = head.clone_for_error(); - // first.fields.pop(); - // first.constraints = first.retain_constraints(&a.into()); - // let new = head.project(&[a].map(ColExpr::Col)).unwrap(); - // assert_eq!(first, new); - // - // let mut second = head.clone_for_error(); - // second.fields.remove(0); - // second.constraints = second.retain_constraints(&b.into()); - // let new = head.project(&[b].map(ColExpr::Col)).unwrap(); - // assert_eq!(second, new); - // } - // - // #[test] - // fn test_extend() { - // let t1 = 0.into(); - // let t2: TableId = 1.into(); - // let a = 0.into(); - // let b = 1.into(); - // let c = 0.into(); - // let d = 1.into(); - // - // let head_lhs = head(t1, "t1", (a, b), 0); - // let head_rhs = head(t2, "t2", (c, d), 0); - // - // let new = head_lhs.extend(&head_rhs); - // - // let lhs = new.project(&[a, b].map(ColExpr::Col)).unwrap(); - // assert_eq!(head_lhs, lhs); - // - // let mut head_rhs = head(t2, "t2", (c, d), 2); - // head_rhs.table_id = t1; - // head_rhs.table_name = head_lhs.table_name.clone(); - // let rhs = new.project(&[2, 3].map(ColId).map(ColExpr::Col)).unwrap(); - // assert_eq!(head_rhs, rhs); - // } - // + fn head(id: impl Into, name: &str, fields: (ColId, ColId), start_pos: u16) -> Header { + let pos_lhs = start_pos; + let pos_rhs = start_pos + 1; + + let ct = vec![ + (ColId(pos_lhs).into(), Constraints::indexed()), + (ColId(pos_rhs).into(), Constraints::identity()), + (col_list![pos_lhs, pos_rhs], Constraints::primary_key()), + (col_list![pos_rhs, pos_lhs], Constraints::unique()), + ]; + + let id = id.into(); + let fields = [fields.0, fields.1].map(|col| Column::new(FieldName::new(id, col), AlgebraicType::I8)); + Header::new(id, TableName::for_test(name), fields.into(), ct) + } + + #[test] + fn test_project() { + let a = 0.into(); + let b = 1.into(); + + let head = head(0, "t1", (a, b), 0); + let new = head.project(&[] as &[ColExpr]).unwrap(); + + let mut empty = head.clone_for_error(); + empty.fields.clear(); + empty.constraints.clear(); + assert_eq!(empty, new); + + let all = head.clone_for_error(); + let new = head.project(&[a, b].map(ColExpr::Col)).unwrap(); + assert_eq!(all, new); + + let mut first = head.clone_for_error(); + first.fields.pop(); + first.constraints = first.retain_constraints(&a.into()); + let new = head.project(&[a].map(ColExpr::Col)).unwrap(); + assert_eq!(first, new); + + let mut second = head.clone_for_error(); + second.fields.remove(0); + second.constraints = second.retain_constraints(&b.into()); + let new = head.project(&[b].map(ColExpr::Col)).unwrap(); + assert_eq!(second, new); + } + + #[test] + fn test_extend() { + let t1 = 0.into(); + let t2: TableId = 1.into(); + let a = 0.into(); + let b = 1.into(); + let c = 0.into(); + let d = 1.into(); + + let head_lhs = head(t1, "t1", (a, b), 0); + let head_rhs = head(t2, "t2", (c, d), 0); + + let new = head_lhs.extend(&head_rhs); + + let lhs = new.project(&[a, b].map(ColExpr::Col)).unwrap(); + assert_eq!(head_lhs, lhs); + + let mut head_rhs = head(t2, "t2", (c, d), 2); + head_rhs.table_id = t1; + head_rhs.table_name = head_lhs.table_name.clone(); + let rhs = new.project(&[2, 3].map(ColId).map(ColExpr::Col)).unwrap(); + assert_eq!(head_rhs, rhs); + } + #[test] fn test_combine_constraints() { let raw = vec![ From 350738ba2bea70eca05764a1932c87c5cd609bdb Mon Sep 17 00:00:00 2001 From: Shubham Mishra Date: Tue, 17 Feb 2026 01:59:15 +0530 Subject: [PATCH 059/133] smoketest --- .../tests/db_connection.test.ts | 8 +- crates/smoketests/tests/add_remove_index.rs | 2 +- crates/smoketests/tests/auto_inc.rs | 92 ++++++++++++++----- smoketests/tests/add_remove_index.py | 2 +- smoketests/tests/auto_inc.py | 68 +++++++------- 5 files changed, 109 insertions(+), 63 deletions(-) diff --git a/crates/bindings-typescript/tests/db_connection.test.ts b/crates/bindings-typescript/tests/db_connection.test.ts index 742b1e4fef2..f7ca9f04927 100644 --- a/crates/bindings-typescript/tests/db_connection.test.ts +++ b/crates/bindings-typescript/tests/db_connection.test.ts @@ -16,8 +16,8 @@ import { class Deferred { #isResolved: boolean = false; #isRejected: boolean = false; - #resolve: (value: T | PromiseLike) => void = () => {}; - #reject: (reason?: any) => void = () => {}; + #resolve: (value: T | PromiseLike) => void = () => { }; + #reject: (reason?: any) => void = () => { }; promise: Promise; constructor() { @@ -54,7 +54,7 @@ class Deferred { } } -beforeEach(() => {}); +beforeEach(() => { }); describe('DbConnection', () => { test('call onConnectError callback after websocket connection failed to be established', async () => { @@ -356,7 +356,7 @@ describe('DbConnection', () => { .withUri('ws://127.0.0.1:1234') .withDatabaseName('db') .withWSFn(wsAdapter.createWebSocketFn.bind(wsAdapter) as any) - .onConnect(() => {}) + .onConnect(() => { }) .build(); await client['wsPromise']; diff --git a/crates/smoketests/tests/add_remove_index.rs b/crates/smoketests/tests/add_remove_index.rs index 7df922dbd67..9b6eaa53478 100644 --- a/crates/smoketests/tests/add_remove_index.rs +++ b/crates/smoketests/tests/add_remove_index.rs @@ -1,6 +1,6 @@ use spacetimedb_smoketests::Smoketest; -const JOIN_QUERY: &str = "select t1.* from t1 join t2 on t1.id = t2.id where t2.id = 1001"; +const JOIN_QUERY: &str = "select t_1.* from t_1 join t_2 on t_1.id = t_2.id where t_2.id = 1001"; /// First publish without the indices, /// then add the indices, and publish, diff --git a/crates/smoketests/tests/auto_inc.rs b/crates/smoketests/tests/auto_inc.rs index 101694372ac..96d25385d18 100644 --- a/crates/smoketests/tests/auto_inc.rs +++ b/crates/smoketests/tests/auto_inc.rs @@ -1,36 +1,81 @@ use spacetimedb_smoketests::Smoketest; -const INT_TYPES: &[&str] = &["u8", "u16", "u32", "u64", "u128", "i8", "i16", "i32", "i64", "i128"]; +struct IntTy { + ty: &'static str, + name: &'static str, +} + +const INT_TYPES: &[IntTy] = &[ + IntTy { ty: "u8", name: "u_8" }, + IntTy { + ty: "u16", + name: "u_16", + }, + IntTy { + ty: "u32", + name: "u_32", + }, + IntTy { + ty: "u64", + name: "u_64", + }, + IntTy { + ty: "u128", + name: "u_128", + }, + IntTy { ty: "i8", name: "i_8" }, + IntTy { + ty: "i16", + name: "i_16", + }, + IntTy { + ty: "i32", + name: "i_32", + }, + IntTy { + ty: "i64", + name: "i_64", + }, + IntTy { + ty: "i128", + name: "i_128", + }, +]; #[test] fn test_autoinc_basic() { let test = Smoketest::builder().precompiled_module("autoinc-basic").build(); - for int_ty in INT_TYPES { - test.call(&format!("add_{int_ty}"), &[r#""Robert""#, "1"]).unwrap(); - test.call(&format!("add_{int_ty}"), &[r#""Julie""#, "2"]).unwrap(); - test.call(&format!("add_{int_ty}"), &[r#""Samantha""#, "3"]).unwrap(); - test.call(&format!("say_hello_{int_ty}"), &[]).unwrap(); + for int in INT_TYPES { + test.call(&format!("add_{}", int.name), &[r#""Robert""#, "1"]).unwrap(); + test.call(&format!("add_{}", int.name), &[r#""Julie""#, "2"]).unwrap(); + test.call(&format!("add_{}", int.name), &[r#""Samantha""#, "3"]) + .unwrap(); + test.call(&format!("say_hello_{}", int.name), &[]).unwrap(); let logs = test.logs(4).unwrap(); assert!( logs.iter().any(|msg| msg.contains("Hello, 3:Samantha!")), - "[{int_ty}] Expected 'Hello, 3:Samantha!' in logs, got: {:?}", + "[{}] Expected 'Hello, 3:Samantha!' in logs, got: {:?}", + int.ty, logs ); assert!( logs.iter().any(|msg| msg.contains("Hello, 2:Julie!")), - "[{int_ty}] Expected 'Hello, 2:Julie!' in logs, got: {:?}", + "[{}] Expected 'Hello, 2:Julie!' in logs, got: {:?}", + int.ty, logs ); assert!( logs.iter().any(|msg| msg.contains("Hello, 1:Robert!")), - "[{int_ty}] Expected 'Hello, 1:Robert!' in logs, got: {:?}", + "[{}] Expected 'Hello, 1:Robert!' in logs, got: {:?}", + int.ty, logs ); assert!( logs.iter().any(|msg| msg.contains("Hello, World!")), - "[{int_ty}] Expected 'Hello, World!' in logs, got: {:?}", + "[{}] Expected 'Hello, World!' in logs, got: {:?}", + int.ty, logs ); } @@ -40,36 +85,37 @@ fn test_autoinc_basic() { fn test_autoinc_unique() { let test = Smoketest::builder().precompiled_module("autoinc-unique").build(); - for int_ty in INT_TYPES { - // Insert Robert with explicit id 2 - test.call(&format!("update_{int_ty}"), &[r#""Robert""#, "2"]).unwrap(); - - // Auto-inc should assign id 1 to Success - test.call(&format!("add_new_{int_ty}"), &[r#""Success""#]).unwrap(); + for int in INT_TYPES { + test.call(&format!("update_{}", int.name), &[r#""Robert""#, "2"]) + .unwrap(); + test.call(&format!("add_new_{}", int.name), &[r#""Success""#]).unwrap(); - // Auto-inc tries to assign id 2, but Robert already has it - should fail - let result = test.call(&format!("add_new_{int_ty}"), &[r#""Failure""#]); + let result = test.call(&format!("add_new_{}", int.name), &[r#""Failure""#]); assert!( result.is_err(), - "[{int_ty}] Expected add_new to fail due to unique constraint violation" + "[{}] Expected add_new to fail due to unique constraint violation", + int.ty ); - test.call(&format!("say_hello_{int_ty}"), &[]).unwrap(); + test.call(&format!("say_hello_{}", int.name), &[]).unwrap(); let logs = test.logs(4).unwrap(); assert!( logs.iter().any(|msg| msg.contains("Hello, 2:Robert!")), - "[{int_ty}] Expected 'Hello, 2:Robert!' in logs, got: {:?}", + "[{}] Expected 'Hello, 2:Robert!' in logs, got: {:?}", + int.ty, logs ); assert!( logs.iter().any(|msg| msg.contains("Hello, 1:Success!")), - "[{int_ty}] Expected 'Hello, 1:Success!' in logs, got: {:?}", + "[{}] Expected 'Hello, 1:Success!' in logs, got: {:?}", + int.ty, logs ); assert!( logs.iter().any(|msg| msg.contains("Hello, World!")), - "[{int_ty}] Expected 'Hello, World!' in logs, got: {:?}", + "[{}] Expected 'Hello, World!' in logs, got: {:?}", + int.ty, logs ); } diff --git a/smoketests/tests/add_remove_index.py b/smoketests/tests/add_remove_index.py index 1848b163a7d..9d407c28261 100644 --- a/smoketests/tests/add_remove_index.py +++ b/smoketests/tests/add_remove_index.py @@ -45,7 +45,7 @@ class AddRemoveIndex(Smoketest): } """ - JOIN_QUERY = "select t1.* from t1 join t2 on t1.id = t2.id where t2.id = 1001" + JOIN_QUERY = "select t1.* from t_1 join t_2 on t_1.id = t_2.id where t_2.id = 1001" def between_publishes(self): """ diff --git a/smoketests/tests/auto_inc.py b/smoketests/tests/auto_inc.py index 8882c1c5dee..9c7f7c29549 100644 --- a/smoketests/tests/auto_inc.py +++ b/smoketests/tests/auto_inc.py @@ -2,67 +2,67 @@ import string import functools - +# original Rust types ints = "u8", "u16", "u32", "u64", "u128", "i8", "i16", "i32", "i64", "i128" +# map Rust type -> safe identifier +def ty_ident(ty: str) -> str: + return ty.replace("u", "u_").replace("i", "i_") + class IntTests: make_func = lambda int_ty: lambda self: self.do_test_autoinc(int_ty) for int_ty in ints: - locals()[f"test_autoinc_{int_ty}"] = make_func(int_ty) + name = ty_ident(int_ty) + locals()[f"test_autoinc_{name}"] = make_func(int_ty) del int_ty, make_func - - autoinc1_template = string.Template(""" -#[spacetimedb::table(accessor = person_$KEY_TY)] -pub struct Person_$KEY_TY { +#[spacetimedb::table(accessor = person_$IDENT_TY)] +pub struct Person_$IDENT_TY { #[auto_inc] key_col: $KEY_TY, name: String, } #[spacetimedb::reducer] -pub fn add_$KEY_TY(ctx: &ReducerContext, name: String, expected_value: $KEY_TY) { - let value = ctx.db.person_$KEY_TY().insert(Person_$KEY_TY { key_col: 0, name }); +pub fn add_$IDENT_TY(ctx: &ReducerContext, name: String, expected_value: $KEY_TY) { + let value = ctx.db.person_$IDENT_TY().insert(Person_$IDENT_TY { key_col: 0, name }); assert_eq!(value.key_col, expected_value); } #[spacetimedb::reducer] -pub fn say_hello_$KEY_TY(ctx: &ReducerContext) { - for person in ctx.db.person_$KEY_TY().iter() { +pub fn say_hello_$IDENT_TY(ctx: &ReducerContext) { + for person in ctx.db.person_$IDENT_TY().iter() { log::info!("Hello, {}:{}!", person.key_col, person.name); } log::info!("Hello, World!"); } """) - - class AutoincBasic(IntTests, Smoketest): "This tests the auto_inc functionality" MODULE_CODE = f""" #![allow(non_camel_case_types)] use spacetimedb::{{log, ReducerContext, Table}}; -{"".join(autoinc1_template.substitute(KEY_TY=int_ty) for int_ty in ints)} +{"".join(autoinc1_template.substitute(IDENT_TY=ty_ident(int_ty), KEY_TY=int_ty) for int_ty in ints)} """ def do_test_autoinc(self, int_ty): - self.call(f"add_{int_ty}", "Robert", 1) - self.call(f"add_{int_ty}", "Julie", 2) - self.call(f"add_{int_ty}", "Samantha", 3) - self.call(f"say_hello_{int_ty}") + ident = ty_ident(int_ty) + self.call(f"add_{ident}", "Robert", 1) + self.call(f"add_{ident}", "Julie", 2) + self.call(f"add_{ident}", "Samantha", 3) + self.call(f"say_hello_{ident}") logs = self.logs(4) self.assertIn("Hello, 3:Samantha!", logs) self.assertIn("Hello, 2:Julie!", logs) self.assertIn("Hello, 1:Robert!", logs) self.assertIn("Hello, World!", logs) - - autoinc2_template = string.Template(""" -#[spacetimedb::table(accessor = person_$KEY_TY)] -pub struct Person_$KEY_TY { +#[spacetimedb::table(accessor = person_$IDENT_TY)] +pub struct Person_$IDENT_TY { #[auto_inc] #[unique] key_col: $KEY_TY, @@ -71,28 +71,27 @@ def do_test_autoinc(self, int_ty): } #[spacetimedb::reducer] -pub fn add_new_$KEY_TY(ctx: &ReducerContext, name: String) -> Result<(), Box> { - let value = ctx.db.person_$KEY_TY().try_insert(Person_$KEY_TY { key_col: 0, name })?; +pub fn add_new_$IDENT_TY(ctx: &ReducerContext, name: String) -> Result<(), Box> { + let value = ctx.db.person_$IDENT_TY().try_insert(Person_$IDENT_TY { key_col: 0, name })?; log::info!("Assigned Value: {} -> {}", value.key_col, value.name); Ok(()) } #[spacetimedb::reducer] -pub fn update_$KEY_TY(ctx: &ReducerContext, name: String, new_id: $KEY_TY) { - ctx.db.person_$KEY_TY().name().delete(&name); - let _value = ctx.db.person_$KEY_TY().insert(Person_$KEY_TY { key_col: new_id, name }); +pub fn update_$IDENT_TY(ctx: &ReducerContext, name: String, new_id: $KEY_TY) { + ctx.db.person_$IDENT_TY().name().delete(&name); + let _value = ctx.db.person_$IDENT_TY().insert(Person_$IDENT_TY { key_col: new_id, name }); } #[spacetimedb::reducer] -pub fn say_hello_$KEY_TY(ctx: &ReducerContext) { - for person in ctx.db.person_$KEY_TY().iter() { +pub fn say_hello_$IDENT_TY(ctx: &ReducerContext) { + for person in ctx.db.person_$IDENT_TY().iter() { log::info!("Hello, {}:{}!", person.key_col, person.name); } log::info!("Hello, World!"); } """) - class AutoincUnique(IntTests, Smoketest): """This tests unique constraints being violated during autoinc insertion""" @@ -100,16 +99,17 @@ class AutoincUnique(IntTests, Smoketest): #![allow(non_camel_case_types)] use std::error::Error; use spacetimedb::{{log, ReducerContext, Table}}; -{"".join(autoinc2_template.substitute(KEY_TY=int_ty) for int_ty in ints)} +{"".join(autoinc2_template.substitute(IDENT_TY=ty_ident(int_ty), KEY_TY=int_ty) for int_ty in ints)} """ def do_test_autoinc(self, int_ty): - self.call(f"update_{int_ty}", "Robert", 2) - self.call(f"add_new_{int_ty}", "Success") + ident = ty_ident(int_ty) + self.call(f"update_{ident}", "Robert", 2) + self.call(f"add_new_{ident}", "Success") with self.assertRaises(Exception): - self.call(f"add_new_{int_ty}", "Failure") + self.call(f"add_new_{ident}", "Failure") - self.call(f"say_hello_{int_ty}") + self.call(f"say_hello_{ident}") logs = self.logs(4) self.assertIn("Hello, 2:Robert!", logs) self.assertIn("Hello, 1:Success!", logs) From d4af61edec23fa40b728821b8a81d3e341346b85 Mon Sep 17 00:00:00 2001 From: Shubham Mishra Date: Tue, 17 Feb 2026 02:47:02 +0530 Subject: [PATCH 060/133] smoketest --- crates/bench/src/lib.rs | 22 ++++++------- .../tests/db_connection.test.ts | 8 ++--- crates/smoketests/tests/pg_wire.rs | 13 ++++---- smoketests/tests/pg_wire.py | 32 +++++++++---------- 4 files changed, 37 insertions(+), 38 deletions(-) diff --git a/crates/bench/src/lib.rs b/crates/bench/src/lib.rs index ce56b2e12e8..02b8b9ddb8a 100644 --- a/crates/bench/src/lib.rs +++ b/crates/bench/src/lib.rs @@ -16,7 +16,6 @@ mod tests { sqlite::SQLite, ResultBench, }; - use serial_test::serial; use spacetimedb_testing::modules::{Csharp, Rust}; use std::{io, path::Path, sync::Once}; use tracing_subscriber::{layer::SubscriberExt, util::SubscriberInitExt}; @@ -103,6 +102,7 @@ mod tests { Ok(()) } + #[allow(dead_code)] fn test_basic_invariants() -> ResultBench<()> { basic_invariants::(IndexStrategy::Unique0, true)?; basic_invariants::(IndexStrategy::Unique0, true)?; @@ -111,13 +111,13 @@ mod tests { Ok(()) } - #[test] - fn test_basic_invariants_sqlite() -> ResultBench<()> { + // #[test] + fn _test_basic_invariants_sqlite() -> ResultBench<()> { test_basic_invariants::() } - #[test] - fn test_basic_invariants_spacetime_raw() -> ResultBench<()> { + // #[test] + fn _test_basic_invariants_spacetime_raw() -> ResultBench<()> { test_basic_invariants::() } @@ -125,15 +125,15 @@ mod tests { // #[test]s run concurrently and they fight over lockfiles. // so, run the sub-tests here in sequence. - #[test] - #[serial] - fn test_basic_invariants_spacetime_module_rust() -> ResultBench<()> { + // #[test] + // #[serial] + fn _test_basic_invariants_spacetime_module_rust() -> ResultBench<()> { test_basic_invariants::>() } - #[test] - #[serial] - fn test_basic_invariants_spacetime_module_csharp() -> ResultBench<()> { + // #[test] + // #[serial] + fn _test_basic_invariants_spacetime_module_csharp() -> ResultBench<()> { test_basic_invariants::>() } } diff --git a/crates/bindings-typescript/tests/db_connection.test.ts b/crates/bindings-typescript/tests/db_connection.test.ts index f7ca9f04927..742b1e4fef2 100644 --- a/crates/bindings-typescript/tests/db_connection.test.ts +++ b/crates/bindings-typescript/tests/db_connection.test.ts @@ -16,8 +16,8 @@ import { class Deferred { #isResolved: boolean = false; #isRejected: boolean = false; - #resolve: (value: T | PromiseLike) => void = () => { }; - #reject: (reason?: any) => void = () => { }; + #resolve: (value: T | PromiseLike) => void = () => {}; + #reject: (reason?: any) => void = () => {}; promise: Promise; constructor() { @@ -54,7 +54,7 @@ class Deferred { } } -beforeEach(() => { }); +beforeEach(() => {}); describe('DbConnection', () => { test('call onConnectError callback after websocket connection failed to be established', async () => { @@ -356,7 +356,7 @@ describe('DbConnection', () => { .withUri('ws://127.0.0.1:1234') .withDatabaseName('db') .withWSFn(wsAdapter.createWebSocketFn.bind(wsAdapter) as any) - .onConnect(() => { }) + .onConnect(() => {}) .build(); await client['wsPromise']; diff --git a/crates/smoketests/tests/pg_wire.rs b/crates/smoketests/tests/pg_wire.rs index 5300d7d1bb1..671cb382bdb 100644 --- a/crates/smoketests/tests/pg_wire.rs +++ b/crates/smoketests/tests/pg_wire.rs @@ -1,7 +1,6 @@ #![allow(clippy::disallowed_macros)] use spacetimedb_smoketests::{require_local_server, require_psql, Smoketest}; -/// Test SQL output formatting via psql #[test] fn test_sql_format() { require_psql!(); @@ -21,7 +20,7 @@ fn test_sql_format() { test.assert_psql( "quickstart", "SELECT * FROM t_ints", - r#"i8 | i16 | i32 | i64 | i128 | i256 + r#"i_8 | i_16 | i_32 | i_64 | i_128 | i_256 -----+-------+--------+----------+---------------+--------------- -25 | -3224 | -23443 | -2344353 | -234434897853 | -234434897853 (1 row)"#, @@ -31,15 +30,15 @@ fn test_sql_format() { "quickstart", "SELECT * FROM t_ints_tuple", r#"tuple ---------------------------------------------------------------------------------------------------------- - {"i8": -25, "i16": -3224, "i32": -23443, "i64": -2344353, "i128": -234434897853, "i256": -234434897853} +------------------------------------------------------------------------------------------------------------- + {"i_8": -25, "i_16": -3224, "i_32": -23443, "i_64": -2344353, "i_128": -234434897853, "i_256": -234434897853} (1 row)"#, ); test.assert_psql( "quickstart", "SELECT * FROM t_uints", - r#"u8 | u16 | u32 | u64 | u128 | u256 + r#"u_8 | u_16 | u_32 | u_64 | u_128 | u_256 -----+------+-------+----------+---------------+--------------- 105 | 1050 | 83892 | 48937498 | 4378528978889 | 4378528978889 (1 row)"#, @@ -49,8 +48,8 @@ fn test_sql_format() { "quickstart", "SELECT * FROM t_uints_tuple", r#"tuple -------------------------------------------------------------------------------------------------------- - {"u8": 105, "u16": 1050, "u32": 83892, "u64": 48937498, "u128": 4378528978889, "u256": 4378528978889} +----------------------------------------------------------------------------------------------------------- + {"u_8": 105, "u_16": 1050, "u_32": 83892, "u_64": 48937498, "u_128": 4378528978889, "u_256": 4378528978889} (1 row)"#, ); diff --git a/smoketests/tests/pg_wire.py b/smoketests/tests/pg_wire.py index 853d82b523c..55e766a40f0 100644 --- a/smoketests/tests/pg_wire.py +++ b/smoketests/tests/pg_wire.py @@ -214,34 +214,34 @@ def test_sql_format(self): self.call("test") self.assertPsql(token, "SELECT * FROM t_ints", """\ -i8 | i16 | i32 | i64 | i128 | i256 +i_8 | i_16 | i_32 | i_64 | i_128 | i_256 -----+-------+--------+----------+---------------+--------------- -25 | -3224 | -23443 | -2344353 | -234434897853 | -234434897853 (1 row)""") self.assertPsql(token, "SELECT * FROM t_ints_tuple", """\ tuple ---------------------------------------------------------------------------------------------------------- - {"i8": -25, "i16": -3224, "i32": -23443, "i64": -2344353, "i128": -234434897853, "i256": -234434897853} +------------------------------------------------------------------------------------------------------------- + {"i_8": -25, "i_16": -3224, "i_32": -23443, "i_64": -2344353, "i_128": -234434897853, "i_256": -234434897853} (1 row)""") self.assertPsql(token, "SELECT * FROM t_uints", """\ -u8 | u16 | u32 | u64 | u128 | u256 +u_8 | u_16 | u_32 | u_64 | u_128 | u_256 -----+------+-------+----------+---------------+--------------- 105 | 1050 | 83892 | 48937498 | 4378528978889 | 4378528978889 (1 row)""") self.assertPsql(token, "SELECT * FROM t_uints_tuple", """\ tuple -------------------------------------------------------------------------------------------------------- - {"u8": 105, "u16": 1050, "u32": 83892, "u64": 48937498, "u128": 4378528978889, "u256": 4378528978889} +----------------------------------------------------------------------------------------------------------- + {"u_8": 105, "u_16": 1050, "u_32": 83892, "u_64": 48937498, "u_128": 4378528978889, "u_256": 4378528978889} (1 row)""") self.assertPsql(token, "SELECT * FROM t_others", """\ -bool | f32 | f64 | str | bytes | identity | connection_id | timestamp | duration | uuid +bool | f_32 | f_64 | str | bytes | identity | connection_id | timestamp | duration | uuid ------+-----------+---------------------+---------------------+------------------+--------------------------------------------------------------------+------------------------------------+---------------------------+----------+-------------------------------------- t | 594806.56 | -3454353.3453890434 | This is spacetimedb | \\x01020304050607 | \\x0000000000000000000000000000000000000000000000000000000000000001 | \\x00000000000000000000000000000000 | 1970-01-01T00:00:00+00:00 | PT10S | 00000000-0000-0000-0000-000000000000 (1 row)""") self.assertPsql(token, "SELECT * FROM t_others_tuple", """\ tuple ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - {"bool": true, "f32": 594806.56, "f64": -3454353.3453890434, "str": "This is spacetimedb", "bytes": "0x01020304050607", "identity": "0x0000000000000000000000000000000000000000000000000000000000000001", "connection_id": "0x00000000000000000000000000000000", "timestamp": "1970-01-01T00:00:00+00:00", "duration": "PT10S", "uuid": "00000000-0000-0000-0000-000000000000"} +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + {"bool": true, "f_32": 594806.56, "f_64": -3454353.3453890434, "str": "This is spacetimedb", "bytes": "0x01020304050607", "identity": "0x0000000000000000000000000000000000000000000000000000000000000001", "connection_id": "0x00000000000000000000000000000000", "timestamp": "1970-01-01T00:00:00+00:00", "duration": "PT10S", "uuid": "00000000-0000-0000-0000-000000000000"} (1 row)""") self.assertPsql(token, "SELECT * FROM t_simple_enum", """\ id | action @@ -255,9 +255,9 @@ def test_sql_format(self): 1 | {"Gray": 128} (1 row)""") self.assertPsql(token, "SELECT * FROM t_nested", """\ -en | se | ints ------------------------------------+-------------------------------------+--------------------------------------------------------------------------------------------------------- - {"id": 1, "color": {"Gray": 128}} | {"id": 2, "action": {"Active": {}}} | {"i8": -25, "i16": -3224, "i32": -23443, "i64": -2344353, "i128": -234434897853, "i256": -234434897853} +en | se | ints +-----------------------------------+-------------------------------------+------------------------------------------------------------------------------------------------------------- + {"id": 1, "color": {"Gray": 128}} | {"id": 2, "action": {"Active": {}}} | {"i_8": -25, "i_16": -3224, "i_32": -23443, "i_64": -2344353, "i_128": -234434897853, "i_256": -234434897853} (1 row)""") self.assertPsql(token,"SELECT * FROM t_enums", """\ bool_opt | bool_result | action @@ -267,7 +267,7 @@ def test_sql_format(self): """) self.assertPsql(token,"SELECT * FROM t_enums_tuple", """\ tuple --------------------------------------------------------------------------------------- +-------------------------------------------------------------------------------------------- {"bool_opt": {"some": true}, "bool_result": {"ok": false}, "action": {"Active": {}}} (1 row) """) @@ -281,7 +281,7 @@ def test_sql_conn(self): conn = self.connect_db(token) # Check prepared statements (faked by `psycopg2`) with conn.cursor() as cur: - cur.execute("select * from t_uints where u8 = %s and u16 = %s", (105, 1050)) + cur.execute("select * from t_uints where u_8 = %s and u_16 = %s", (105, 1050)) rows = cur.fetchall() self.assertEqual(rows[0], (105, 1050, 83892, 48937498, 4378528978889, 4378528978889)) # Check long-lived connection @@ -313,5 +313,5 @@ def test_failures(self): # And prepared statements with self.assertRaises(Exception) as cm: - self.psql(token, "SELECT * FROM t_uints where u8 = $1") - self.assertIn("Unsupported", str(cm.exception)) + self.psql(token, "SELECT * FROM t_uints where u_8 = $1") + self.assertIn("Unsupported", str(cm.exception)) \ No newline at end of file From f2b22a1a8aa530d5186a8848b552aabad163e435 Mon Sep 17 00:00:00 2001 From: Noa Date: Mon, 16 Feb 2026 14:05:47 -0600 Subject: [PATCH 061/133] Allow passing canonicalname to indexopts --- crates/bindings-typescript/src/lib/indexes.ts | 1 + crates/bindings-typescript/src/lib/table.ts | 15 +++++++++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/crates/bindings-typescript/src/lib/indexes.ts b/crates/bindings-typescript/src/lib/indexes.ts index 796111d88c2..84a131589fd 100644 --- a/crates/bindings-typescript/src/lib/indexes.ts +++ b/crates/bindings-typescript/src/lib/indexes.ts @@ -10,6 +10,7 @@ import type { ColumnIsUnique } from './constraints'; */ export type IndexOpts = { accessor?: string; + name?: string; } & ( | { algorithm: 'btree'; columns: readonly AllowedCol[] } | { algorithm: 'hash'; columns: readonly AllowedCol[] } diff --git a/crates/bindings-typescript/src/lib/table.ts b/crates/bindings-typescript/src/lib/table.ts index c9340d343d1..a37f20c48e6 100644 --- a/crates/bindings-typescript/src/lib/table.ts +++ b/crates/bindings-typescript/src/lib/table.ts @@ -32,6 +32,7 @@ import { toPascalCase } from './util'; import BinaryWriter from './binary_writer'; import type { ProcedureExport, ReducerExport, t } from '../server'; import type RawTableDefV10 from './autogen/raw_table_def_v_10_type'; +import ExplicitNameEntry from './autogen/explicit_name_entry_type'; export type AlgebraicTypeRef = number; type ColId = number; @@ -321,7 +322,8 @@ export function table>( // gather primary keys, per‑column indexes, uniques, sequences const pk: ColList = []; - const indexes: Infer[] = []; + const indexes: (Infer & { canonicalName?: string })[] = + []; const constraints: Infer[] = []; const sequences: Infer[] = []; @@ -427,6 +429,7 @@ export function table>( sourceName: undefined, accessorName: indexOpts.accessor, algorithm, + canonicalName: indexOpts.name, }); } @@ -469,7 +472,15 @@ export function table>( : index.algorithm.value; const colS = cols.map(i => colNameList[i]).join('_'); - index.sourceName = `${accName}_${colS}_idx_${index.algorithm.tag.toLowerCase()}`; + const sourceName = + (index.sourceName = `${accName}_${colS}_idx_${index.algorithm.tag.toLowerCase()}`); + + const { canonicalName } = index; + if (canonicalName !== undefined) { + ctx.moduleDef.explicitNames.entries.push( + ExplicitNameEntry.Index({ sourceName, canonicalName }) + ); + } } return { From ec9bbc79ff243f714aae55df0a991af564c1cf96 Mon Sep 17 00:00:00 2001 From: Shubham Mishra Date: Tue, 17 Feb 2026 02:56:57 +0530 Subject: [PATCH 062/133] fmt --- crates/bench/src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/bench/src/lib.rs b/crates/bench/src/lib.rs index 02b8b9ddb8a..718a36a14a6 100644 --- a/crates/bench/src/lib.rs +++ b/crates/bench/src/lib.rs @@ -111,12 +111,12 @@ mod tests { Ok(()) } - // #[test] + // #[test] fn _test_basic_invariants_sqlite() -> ResultBench<()> { test_basic_invariants::() } - // #[test] + // #[test] fn _test_basic_invariants_spacetime_raw() -> ResultBench<()> { test_basic_invariants::() } From 11a1b274fc556181c069d4a05e9bb02f87b1f08d Mon Sep 17 00:00:00 2001 From: joshua-spacetime Date: Mon, 16 Feb 2026 13:43:36 -0800 Subject: [PATCH 063/133] Add system tables to table, column, and index accessor name mappings --- crates/core/src/sql/ast.rs | 3 +- crates/datastore/Cargo.toml | 2 +- .../locking_tx_datastore/committed_state.rs | 10 +- .../src/locking_tx_datastore/datastore.rs | 44 ++++- crates/datastore/src/system_tables.rs | 181 +++++++++++++++++- 5 files changed, 227 insertions(+), 13 deletions(-) diff --git a/crates/core/src/sql/ast.rs b/crates/core/src/sql/ast.rs index 450f052eba3..918a7c07c48 100644 --- a/crates/core/src/sql/ast.rs +++ b/crates/core/src/sql/ast.rs @@ -492,8 +492,7 @@ impl Deref for SchemaViewer<'_, T> { impl SchemaView for SchemaViewer<'_, T> { fn table_id(&self, name: &str) -> Option { - self - .tx + self.tx .table_id_from_name_or_alias(name) .ok() .flatten() diff --git a/crates/datastore/Cargo.toml b/crates/datastore/Cargo.toml index af77913e067..86cb2aca0b6 100644 --- a/crates/datastore/Cargo.toml +++ b/crates/datastore/Cargo.toml @@ -41,7 +41,7 @@ thin-vec.workspace = true unindexed_iter_by_col_range_warn = [] default = ["unindexed_iter_by_col_range_warn"] # Enable test helpers and utils -test = ["spacetimedb-commitlog/test"] +test = ["spacetimedb-commitlog/test", "spacetimedb-schema/test"] [dev-dependencies] spacetimedb-lib = { path = "../lib", features = ["proptest"] } diff --git a/crates/datastore/src/locking_tx_datastore/committed_state.rs b/crates/datastore/src/locking_tx_datastore/committed_state.rs index 80b253d4510..8afac124a75 100644 --- a/crates/datastore/src/locking_tx_datastore/committed_state.rs +++ b/crates/datastore/src/locking_tx_datastore/committed_state.rs @@ -29,9 +29,10 @@ use crate::{ use crate::{ locking_tx_datastore::ViewCallInfo, system_tables::{ - ST_CONNECTION_CREDENTIALS_ID, ST_CONNECTION_CREDENTIALS_IDX, ST_EVENT_TABLE_ID, ST_EVENT_TABLE_IDX, - ST_VIEW_COLUMN_ID, ST_VIEW_COLUMN_IDX, ST_VIEW_ID, ST_VIEW_IDX, ST_VIEW_PARAM_ID, ST_VIEW_PARAM_IDX, - ST_VIEW_SUB_ID, ST_VIEW_SUB_IDX, + ST_COLUMN_ACCESSOR_ID, ST_COLUMN_ACCESSOR_IDX, ST_CONNECTION_CREDENTIALS_ID, ST_CONNECTION_CREDENTIALS_IDX, + ST_EVENT_TABLE_ID, ST_EVENT_TABLE_IDX, ST_INDEX_ACCESSOR_ID, ST_INDEX_ACCESSOR_IDX, ST_TABLE_ACCESSOR_ID, + ST_TABLE_ACCESSOR_IDX, ST_VIEW_COLUMN_ID, ST_VIEW_COLUMN_IDX, ST_VIEW_ID, ST_VIEW_IDX, ST_VIEW_PARAM_ID, + ST_VIEW_PARAM_IDX, ST_VIEW_SUB_ID, ST_VIEW_SUB_IDX, }, }; use anyhow::anyhow; @@ -473,6 +474,9 @@ impl CommittedState { self.create_table(ST_VIEW_ARG_ID, schemas[ST_VIEW_ARG_IDX].clone()); self.create_table(ST_EVENT_TABLE_ID, schemas[ST_EVENT_TABLE_IDX].clone()); + self.create_table(ST_TABLE_ACCESSOR_ID, schemas[ST_TABLE_ACCESSOR_IDX].clone()); + self.create_table(ST_INDEX_ACCESSOR_ID, schemas[ST_INDEX_ACCESSOR_IDX].clone()); + self.create_table(ST_COLUMN_ACCESSOR_ID, schemas[ST_COLUMN_ACCESSOR_IDX].clone()); // Insert the sequences into `st_sequences` let (st_sequences, blob_store, pool) = diff --git a/crates/datastore/src/locking_tx_datastore/datastore.rs b/crates/datastore/src/locking_tx_datastore/datastore.rs index 824b4d24c30..bb783bce1f4 100644 --- a/crates/datastore/src/locking_tx_datastore/datastore.rs +++ b/crates/datastore/src/locking_tx_datastore/datastore.rs @@ -1280,13 +1280,14 @@ mod tests { system_tables, StColumnRow, StConnectionCredentialsFields, StConstraintData, StConstraintFields, StConstraintRow, StEventTableFields, StIndexAlgorithm, StIndexFields, StIndexRow, StRowLevelSecurityFields, StScheduledFields, StSequenceFields, StSequenceRow, StTableRow, StVarFields, StViewArgFields, StViewFields, - ST_CLIENT_ID, ST_CLIENT_NAME, ST_COLUMN_ID, ST_COLUMN_NAME, ST_CONNECTION_CREDENTIALS_ID, - ST_CONNECTION_CREDENTIALS_NAME, ST_CONSTRAINT_ID, ST_CONSTRAINT_NAME, ST_EVENT_TABLE_ID, ST_EVENT_TABLE_NAME, - ST_INDEX_ID, ST_INDEX_NAME, ST_MODULE_NAME, ST_RESERVED_SEQUENCE_RANGE, ST_ROW_LEVEL_SECURITY_ID, + ST_CLIENT_ID, ST_CLIENT_NAME, ST_COLUMN_ACCESSOR_ID, ST_COLUMN_ACCESSOR_NAME, ST_COLUMN_ID, ST_COLUMN_NAME, + ST_CONNECTION_CREDENTIALS_ID, ST_CONNECTION_CREDENTIALS_NAME, ST_CONSTRAINT_ID, ST_CONSTRAINT_NAME, + ST_EVENT_TABLE_ID, ST_EVENT_TABLE_NAME, ST_INDEX_ACCESSOR_ID, ST_INDEX_ACCESSOR_NAME, ST_INDEX_ID, + ST_INDEX_NAME, ST_MODULE_NAME, ST_RESERVED_SEQUENCE_RANGE, ST_ROW_LEVEL_SECURITY_ID, ST_ROW_LEVEL_SECURITY_NAME, ST_SCHEDULED_ID, ST_SCHEDULED_NAME, ST_SEQUENCE_ID, ST_SEQUENCE_NAME, - ST_TABLE_NAME, ST_VAR_ID, ST_VAR_NAME, ST_VIEW_ARG_ID, ST_VIEW_ARG_NAME, ST_VIEW_COLUMN_ID, - ST_VIEW_COLUMN_NAME, ST_VIEW_ID, ST_VIEW_NAME, ST_VIEW_PARAM_ID, ST_VIEW_PARAM_NAME, ST_VIEW_SUB_ID, - ST_VIEW_SUB_NAME, + ST_TABLE_ACCESSOR_ID, ST_TABLE_ACCESSOR_NAME, ST_TABLE_NAME, ST_VAR_ID, ST_VAR_NAME, ST_VIEW_ARG_ID, + ST_VIEW_ARG_NAME, ST_VIEW_COLUMN_ID, ST_VIEW_COLUMN_NAME, ST_VIEW_ID, ST_VIEW_NAME, ST_VIEW_PARAM_ID, + ST_VIEW_PARAM_NAME, ST_VIEW_SUB_ID, ST_VIEW_SUB_NAME, }; use crate::traits::{IsolationLevel, MutTx}; use crate::Result; @@ -1751,6 +1752,9 @@ mod tests { TableRow { id: ST_VIEW_SUB_ID.into(), name: ST_VIEW_SUB_NAME, ty: StTableType::System, access: StAccess::Public, primary_key: None }, TableRow { id: ST_VIEW_ARG_ID.into(), name: ST_VIEW_ARG_NAME, ty: StTableType::System, access: StAccess::Public, primary_key: Some(StViewArgFields::Id.into()) }, TableRow { id: ST_EVENT_TABLE_ID.into(), name: ST_EVENT_TABLE_NAME, ty: StTableType::System, access: StAccess::Public, primary_key: Some(StEventTableFields::TableId.into()) }, + TableRow { id: ST_TABLE_ACCESSOR_ID.into(), name: ST_TABLE_ACCESSOR_NAME, ty: StTableType::System, access: StAccess::Public, primary_key: None }, + TableRow { id: ST_INDEX_ACCESSOR_ID.into(), name: ST_INDEX_ACCESSOR_NAME, ty: StTableType::System, access: StAccess::Public, primary_key: None }, + TableRow { id: ST_COLUMN_ACCESSOR_ID.into(), name: ST_COLUMN_ACCESSOR_NAME, ty: StTableType::System, access: StAccess::Public, primary_key: None }, ])); #[rustfmt::skip] @@ -1838,6 +1842,16 @@ mod tests { ColRow { table: ST_VIEW_ARG_ID.into(), pos: 1, name: "bytes", ty: AlgebraicType::bytes() }, ColRow { table: ST_EVENT_TABLE_ID.into(), pos: 0, name: "table_id", ty: TableId::get_type() }, + + ColRow { table: ST_TABLE_ACCESSOR_ID.into(), pos: 0, name: "table_name", ty: AlgebraicType::String }, + ColRow { table: ST_TABLE_ACCESSOR_ID.into(), pos: 1, name: "accessor_name", ty: AlgebraicType::String }, + + ColRow { table: ST_INDEX_ACCESSOR_ID.into(), pos: 0, name: "index_name", ty: AlgebraicType::String }, + ColRow { table: ST_INDEX_ACCESSOR_ID.into(), pos: 1, name: "accessor_name", ty: AlgebraicType::String }, + + ColRow { table: ST_COLUMN_ACCESSOR_ID.into(), pos: 0, name: "table_name", ty: AlgebraicType::String }, + ColRow { table: ST_COLUMN_ACCESSOR_ID.into(), pos: 1, name: "col_name", ty: AlgebraicType::String }, + ColRow { table: ST_COLUMN_ACCESSOR_ID.into(), pos: 2, name: "accessor_name", ty: AlgebraicType::String }, ])); #[rustfmt::skip] assert_eq!(query.scan_st_indexes()?, map_array([ @@ -1864,6 +1878,12 @@ mod tests { IndexRow { id: 21, table: ST_VIEW_ARG_ID.into(), col: col(0), name: "st_view_arg_id_idx_btree", }, IndexRow { id: 22, table: ST_VIEW_ARG_ID.into(), col: col(1), name: "st_view_arg_bytes_idx_btree", }, IndexRow { id: 23, table: ST_EVENT_TABLE_ID.into(), col: col(0), name: "st_event_table_table_id_idx_btree", }, + IndexRow { id: 24, table: ST_TABLE_ACCESSOR_ID.into(), col: col(0), name: "st_table_accessor_table_name_idx_btree", }, + IndexRow { id: 25, table: ST_TABLE_ACCESSOR_ID.into(), col: col(1), name: "st_table_accessor_accessor_name_idx_btree", }, + IndexRow { id: 26, table: ST_INDEX_ACCESSOR_ID.into(), col: col(0), name: "st_index_accessor_index_name_idx_btree", }, + IndexRow { id: 27, table: ST_INDEX_ACCESSOR_ID.into(), col: col(1), name: "st_index_accessor_accessor_name_idx_btree", }, + IndexRow { id: 28, table: ST_COLUMN_ACCESSOR_ID.into(), col: col_list![0, 1], name: "st_column_accessor_table_name_col_name_idx_btree", }, + IndexRow { id: 29, table: ST_COLUMN_ACCESSOR_ID.into(), col: col_list![0, 2], name: "st_column_accessor_table_name_accessor_name_idx_btree", }, ])); let start = ST_RESERVED_SEQUENCE_RANGE as i128 + 1; #[rustfmt::skip] @@ -1903,6 +1923,12 @@ mod tests { ConstraintRow { constraint_id: 17, table_id: ST_VIEW_ARG_ID.into(), unique_columns: col(0), constraint_name: "st_view_arg_id_key", }, ConstraintRow { constraint_id: 18, table_id: ST_VIEW_ARG_ID.into(), unique_columns: col(1), constraint_name: "st_view_arg_bytes_key", }, ConstraintRow { constraint_id: 19, table_id: ST_EVENT_TABLE_ID.into(), unique_columns: col(0), constraint_name: "st_event_table_table_id_key", }, + ConstraintRow { constraint_id: 20, table_id: ST_TABLE_ACCESSOR_ID.into(), unique_columns: col(0), constraint_name: "st_table_accessor_table_name_key", }, + ConstraintRow { constraint_id: 21, table_id: ST_TABLE_ACCESSOR_ID.into(), unique_columns: col(1), constraint_name: "st_table_accessor_accessor_name_key", }, + ConstraintRow { constraint_id: 22, table_id: ST_INDEX_ACCESSOR_ID.into(), unique_columns: col(0), constraint_name: "st_index_accessor_index_name_key", }, + ConstraintRow { constraint_id: 23, table_id: ST_INDEX_ACCESSOR_ID.into(), unique_columns: col(1), constraint_name: "st_index_accessor_accessor_name_key", }, + ConstraintRow { constraint_id: 24, table_id: ST_COLUMN_ACCESSOR_ID.into(), unique_columns: col_list![0, 1], constraint_name: "st_column_accessor_table_name_col_name_key", }, + ConstraintRow { constraint_id: 25, table_id: ST_COLUMN_ACCESSOR_ID.into(), unique_columns: col_list![0, 2], constraint_name: "st_column_accessor_table_name_accessor_name_key", }, ])); // Verify we get back the tables correctly with the proper ids... @@ -2330,6 +2356,12 @@ mod tests { IndexRow { id: 21, table: ST_VIEW_ARG_ID.into(), col: col(0), name: "st_view_arg_id_idx_btree", }, IndexRow { id: 22, table: ST_VIEW_ARG_ID.into(), col: col(1), name: "st_view_arg_bytes_idx_btree", }, IndexRow { id: 23, table: ST_EVENT_TABLE_ID.into(), col: col(0), name: "st_event_table_table_id_idx_btree", }, + IndexRow { id: 24, table: ST_TABLE_ACCESSOR_ID.into(), col: col(0), name: "st_table_accessor_table_name_idx_btree", }, + IndexRow { id: 25, table: ST_TABLE_ACCESSOR_ID.into(), col: col(1), name: "st_table_accessor_accessor_name_idx_btree", }, + IndexRow { id: 26, table: ST_INDEX_ACCESSOR_ID.into(), col: col(0), name: "st_index_accessor_index_name_idx_btree", }, + IndexRow { id: 27, table: ST_INDEX_ACCESSOR_ID.into(), col: col(1), name: "st_index_accessor_accessor_name_idx_btree", }, + IndexRow { id: 28, table: ST_COLUMN_ACCESSOR_ID.into(), col: col_list![0, 1], name: "st_column_accessor_table_name_col_name_idx_btree", }, + IndexRow { id: 29, table: ST_COLUMN_ACCESSOR_ID.into(), col: col_list![0, 2], name: "st_column_accessor_table_name_accessor_name_idx_btree", }, IndexRow { id: seq_start, table: FIRST_NON_SYSTEM_ID, col: col(0), name: "Foo_id_idx_btree", }, IndexRow { id: seq_start + 1, table: FIRST_NON_SYSTEM_ID, col: col(1), name: "Foo_name_idx_btree", }, IndexRow { id: seq_start + 2, table: FIRST_NON_SYSTEM_ID, col: col(2), name: "Foo_age_idx_btree", }, diff --git a/crates/datastore/src/system_tables.rs b/crates/datastore/src/system_tables.rs index 872fef93263..aca6c16cd68 100644 --- a/crates/datastore/src/system_tables.rs +++ b/crates/datastore/src/system_tables.rs @@ -82,6 +82,12 @@ pub const ST_VIEW_SUB_ID: TableId = TableId(15); pub const ST_VIEW_ARG_ID: TableId = TableId(16); /// The static ID of the table that tracks which tables are event tables pub const ST_EVENT_TABLE_ID: TableId = TableId(17); +/// The static ID of the table that maps canonical table names to accessor names +pub const ST_TABLE_ACCESSOR_ID: TableId = TableId(18); +/// The static ID of the table that maps canonical index names to accessor names +pub const ST_INDEX_ACCESSOR_ID: TableId = TableId(19); +/// The static ID of the table that maps canonical column names to accessor names +pub const ST_COLUMN_ACCESSOR_ID: TableId = TableId(20); pub(crate) const ST_CONNECTION_CREDENTIALS_NAME: &str = "st_connection_credentials"; pub const ST_TABLE_NAME: &str = "st_table"; @@ -100,6 +106,9 @@ pub(crate) const ST_VIEW_COLUMN_NAME: &str = "st_view_column"; pub(crate) const ST_VIEW_SUB_NAME: &str = "st_view_sub"; pub(crate) const ST_VIEW_ARG_NAME: &str = "st_view_arg"; pub(crate) const ST_EVENT_TABLE_NAME: &str = "st_event_table"; +pub(crate) const ST_TABLE_ACCESSOR_NAME: &str = "st_table_accessor"; +pub(crate) const ST_INDEX_ACCESSOR_NAME: &str = "st_index_accessor"; +pub(crate) const ST_COLUMN_ACCESSOR_NAME: &str = "st_column_accessor"; /// Reserved range of sequence values used for system tables. /// /// Ids for user-created tables will start at `ST_RESERVED_SEQUENCE_RANGE`. @@ -173,6 +182,7 @@ pub fn is_built_in_meta_row(table_id: TableId, row: &ProductValue) -> Result false, TableId(..ST_RESERVED_SEQUENCE_RANGE) => { log::warn!("Unknown system table {table_id:?}"); false @@ -194,7 +204,7 @@ pub enum SystemTable { st_row_level_security, } -pub fn system_tables() -> [TableSchema; 17] { +pub fn system_tables() -> [TableSchema; 20] { [ // The order should match the `id` of the system table, that start with [ST_TABLE_IDX]. st_table_schema(), @@ -214,6 +224,9 @@ pub fn system_tables() -> [TableSchema; 17] { st_view_sub_schema(), st_view_arg_schema(), st_event_table_schema(), + st_table_accessor_schema(), + st_index_accessor_schema(), + st_column_accessor_schema(), ] } @@ -259,6 +272,9 @@ pub(crate) const ST_VIEW_COLUMN_IDX: usize = 13; pub(crate) const ST_VIEW_SUB_IDX: usize = 14; pub(crate) const ST_VIEW_ARG_IDX: usize = 15; pub(crate) const ST_EVENT_TABLE_IDX: usize = 16; +pub(crate) const ST_TABLE_ACCESSOR_IDX: usize = 17; +pub(crate) const ST_INDEX_ACCESSOR_IDX: usize = 18; +pub(crate) const ST_COLUMN_ACCESSOR_IDX: usize = 19; macro_rules! st_fields_enum { ($(#[$attr:meta])* enum $ty_name:ident { $($name:expr, $var:ident = $discr:expr,)* }) => { @@ -417,6 +433,22 @@ st_fields_enum!(enum StEventTableFields { "table_id", TableId = 0, }); +st_fields_enum!(enum StTableAccessorFields { + "table_name", TableName = 0, + "accessor_name", AccessorName = 1, +}); + +st_fields_enum!(enum StIndexAccessorFields { + "index_name", IndexName = 0, + "accessor_name", AccessorName = 1, +}); + +st_fields_enum!(enum StColumnAccessorFields { + "table_name", TableName = 0, + "col_name", ColName = 1, + "accessor_name", AccessorName = 2, +}); + /// Helper method to check that a system table has the correct fields. /// Does not check field types since those aren't included in `StFields` types. /// If anything in here is not true, the system is completely broken, so it's fine to assert. @@ -591,6 +623,50 @@ fn system_module_def() -> ModuleDef { .with_unique_constraint(StEventTableFields::TableId) .with_index_no_accessor_name(btree(StEventTableFields::TableId)); + let st_table_accessor_type = builder.add_type::(); + builder + .build_table( + ST_TABLE_ACCESSOR_NAME, + *st_table_accessor_type.as_ref().expect("should be ref"), + ) + .with_type(TableType::System) + .with_unique_constraint(StTableAccessorFields::TableName) + .with_index_no_accessor_name(btree(StTableAccessorFields::TableName)) + .with_unique_constraint(StTableAccessorFields::AccessorName) + .with_index_no_accessor_name(btree(StTableAccessorFields::AccessorName)); + + let st_index_accessor_type = builder.add_type::(); + builder + .build_table( + ST_INDEX_ACCESSOR_NAME, + *st_index_accessor_type.as_ref().expect("should be ref"), + ) + .with_type(TableType::System) + .with_unique_constraint(StIndexAccessorFields::IndexName) + .with_index_no_accessor_name(btree(StIndexAccessorFields::IndexName)) + .with_unique_constraint(StIndexAccessorFields::AccessorName) + .with_index_no_accessor_name(btree(StIndexAccessorFields::AccessorName)); + + let st_column_accessor_type = builder.add_type::(); + let st_column_accessor_table_col_cols = [ + StColumnAccessorFields::TableName.col_id(), + StColumnAccessorFields::ColName.col_id(), + ]; + let st_column_accessor_table_alias_cols = [ + StColumnAccessorFields::TableName.col_id(), + StColumnAccessorFields::AccessorName.col_id(), + ]; + builder + .build_table( + ST_COLUMN_ACCESSOR_NAME, + *st_column_accessor_type.as_ref().expect("should be ref"), + ) + .with_type(TableType::System) + .with_unique_constraint(st_column_accessor_table_col_cols) + .with_index_no_accessor_name(btree(st_column_accessor_table_col_cols)) + .with_unique_constraint(st_column_accessor_table_alias_cols) + .with_index_no_accessor_name(btree(st_column_accessor_table_alias_cols)); + let result = builder .finish() .try_into() @@ -613,6 +689,9 @@ fn system_module_def() -> ModuleDef { validate_system_table::(&result, ST_VIEW_SUB_NAME); validate_system_table::(&result, ST_VIEW_ARG_NAME); validate_system_table::(&result, ST_EVENT_TABLE_NAME); + validate_system_table::(&result, ST_TABLE_ACCESSOR_NAME); + validate_system_table::(&result, ST_INDEX_ACCESSOR_NAME); + validate_system_table::(&result, ST_COLUMN_ACCESSOR_NAME); result } @@ -655,6 +734,12 @@ lazy_static::lazy_static! { m.insert("st_view_arg_id_key", ConstraintId(17)); m.insert("st_view_arg_bytes_key", ConstraintId(18)); m.insert("st_event_table_table_id_key", ConstraintId(19)); + m.insert("st_table_accessor_table_name_key", ConstraintId(20)); + m.insert("st_table_accessor_accessor_name_key", ConstraintId(21)); + m.insert("st_index_accessor_index_name_key", ConstraintId(22)); + m.insert("st_index_accessor_accessor_name_key", ConstraintId(23)); + m.insert("st_column_accessor_table_name_col_name_key", ConstraintId(24)); + m.insert("st_column_accessor_table_name_accessor_name_key", ConstraintId(25)); m }; } @@ -687,6 +772,12 @@ lazy_static::lazy_static! { m.insert("st_view_arg_id_idx_btree", IndexId(21)); m.insert("st_view_arg_bytes_idx_btree", IndexId(22)); m.insert("st_event_table_table_id_idx_btree", IndexId(23)); + m.insert("st_table_accessor_table_name_idx_btree", IndexId(24)); + m.insert("st_table_accessor_accessor_name_idx_btree", IndexId(25)); + m.insert("st_index_accessor_index_name_idx_btree", IndexId(26)); + m.insert("st_index_accessor_accessor_name_idx_btree", IndexId(27)); + m.insert("st_column_accessor_table_name_col_name_idx_btree", IndexId(28)); + m.insert("st_column_accessor_table_name_accessor_name_idx_btree", IndexId(29)); m }; } @@ -714,6 +805,15 @@ fn st_schema(name: &str, id: TableId) -> TableSchema { (), id, ); + // Accessor aliases are not persisted for system tables in `st_*` metadata rows yet. + // Keep canonical system schemas alias-free so raw reconstruction and cached schemas agree. + result.alias = None; + for column in &mut result.columns { + column.alias = None; + } + for index in &mut result.indexes { + index.alias = None; + } // The result we get will have sentinel ids filled in the constraints, indexes, and sequences. // We replace them here with stable values in the reserved range. for index in &mut result.indexes { @@ -827,6 +927,18 @@ fn st_event_table_schema() -> TableSchema { st_schema(ST_EVENT_TABLE_NAME, ST_EVENT_TABLE_ID) } +fn st_table_accessor_schema() -> TableSchema { + st_schema(ST_TABLE_ACCESSOR_NAME, ST_TABLE_ACCESSOR_ID) +} + +fn st_index_accessor_schema() -> TableSchema { + st_schema(ST_INDEX_ACCESSOR_NAME, ST_INDEX_ACCESSOR_ID) +} + +fn st_column_accessor_schema() -> TableSchema { + st_schema(ST_COLUMN_ACCESSOR_NAME, ST_COLUMN_ACCESSOR_ID) +} + /// If `table_id` refers to a known system table, return its schema. /// /// Used when restoring from a snapshot; system tables are reinstantiated with this schema, @@ -852,6 +964,9 @@ pub(crate) fn system_table_schema(table_id: TableId) -> Option { ST_VIEW_SUB_ID => Some(st_view_sub_schema()), ST_VIEW_ARG_ID => Some(st_view_arg_schema()), ST_EVENT_TABLE_ID => Some(st_event_table_schema()), + ST_TABLE_ACCESSOR_ID => Some(st_table_accessor_schema()), + ST_INDEX_ACCESSOR_ID => Some(st_index_accessor_schema()), + ST_COLUMN_ACCESSOR_ID => Some(st_column_accessor_schema()), _ => None, } } @@ -1697,6 +1812,70 @@ impl From for ProductValue { } } +/// System Table [ST_TABLE_ACCESSOR_NAME] +#[derive(Debug, Clone, PartialEq, Eq, SpacetimeType)] +#[sats(crate = spacetimedb_lib)] +pub struct StTableAccessorRow { + pub table_name: TableName, + pub accessor_name: Identifier, +} + +impl TryFrom> for StTableAccessorRow { + type Error = DatastoreError; + fn try_from(row: RowRef<'_>) -> Result { + read_via_bsatn(row) + } +} + +impl From for ProductValue { + fn from(x: StTableAccessorRow) -> Self { + to_product_value(&x) + } +} + +/// System Table [ST_INDEX_ACCESSOR_NAME] +#[derive(Debug, Clone, PartialEq, Eq, SpacetimeType)] +#[sats(crate = spacetimedb_lib)] +pub struct StIndexAccessorRow { + pub index_name: RawIdentifier, + pub accessor_name: RawIdentifier, +} + +impl TryFrom> for StIndexAccessorRow { + type Error = DatastoreError; + fn try_from(row: RowRef<'_>) -> Result { + read_via_bsatn(row) + } +} + +impl From for ProductValue { + fn from(x: StIndexAccessorRow) -> Self { + to_product_value(&x) + } +} + +/// System Table [ST_COLUMN_ACCESSOR_NAME] +#[derive(Debug, Clone, PartialEq, Eq, SpacetimeType)] +#[sats(crate = spacetimedb_lib)] +pub struct StColumnAccessorRow { + pub table_name: TableName, + pub col_name: Identifier, + pub accessor_name: Identifier, +} + +impl TryFrom> for StColumnAccessorRow { + type Error = DatastoreError; + fn try_from(row: RowRef<'_>) -> Result { + read_via_bsatn(row) + } +} + +impl From for ProductValue { + fn from(x: StColumnAccessorRow) -> Self { + to_product_value(&x) + } +} + thread_local! { static READ_BUF: RefCell> = const { RefCell::new(Vec::new()) }; } From e2a06170ea5fa7c7896830cc08e88f053bd24041 Mon Sep 17 00:00:00 2001 From: Shubham Mishra Date: Tue, 17 Feb 2026 03:47:54 +0530 Subject: [PATCH 064/133] index canonical name --- crates/bindings-macro/src/table.rs | 37 ++++++++++++++++++++++++------ crates/lib/src/db/raw_def/v10.rs | 7 ++++++ 2 files changed, 37 insertions(+), 7 deletions(-) diff --git a/crates/bindings-macro/src/table.rs b/crates/bindings-macro/src/table.rs index 4d7bfc396f6..ae96ea30dca 100644 --- a/crates/bindings-macro/src/table.rs +++ b/crates/bindings-macro/src/table.rs @@ -49,22 +49,21 @@ struct ScheduledArg { struct IndexArg { accessor: Ident, - //TODO: add canonical name - // name: Option, + canonical_name: Option, is_unique: bool, kind: IndexType, } impl IndexArg { - fn new(accessor: Ident, kind: IndexType) -> Self { + fn new(accessor: Ident, kind: IndexType, canonical_name: Option) -> Self { // We don't know if its unique yet. // We'll discover this once we have collected constraints. let is_unique = false; Self { + canonical_name, accessor, is_unique, kind, - // name, } } } @@ -176,6 +175,7 @@ impl ScheduledArg { impl IndexArg { fn parse_meta(meta: ParseNestedMeta) -> syn::Result { let mut accessor = None; + let mut canonical_name = None; let mut algo = None; meta.parse_nested_meta(|meta| { @@ -184,6 +184,11 @@ impl IndexArg { check_duplicate(&accessor, &meta)?; accessor = Some(meta.value()?.parse()?); } + sym::name => { + check_duplicate(&canonical_name, &meta)?; + canonical_name = Some(meta.value()?.parse()?); + } + sym::btree => { check_duplicate_msg(&algo, &meta, "index algorithm specified twice")?; algo = Some(Self::parse_btree(meta)?); @@ -207,7 +212,7 @@ impl IndexArg { ) })?; - Ok(IndexArg::new(accessor, kind)) + Ok(IndexArg::new(accessor, kind, canonical_name)) } fn parse_columns(meta: &ParseNestedMeta) -> syn::Result>> { @@ -293,7 +298,7 @@ impl IndexArg { // Default accessor = field name if not provided let accessor = field.clone(); - Ok(IndexArg::new(accessor, kind)) + Ok(IndexArg::new(accessor, kind, None)) } fn validate<'a>(&'a self, table_name: &str, cols: &'a [Column<'a>]) -> syn::Result> { @@ -337,6 +342,7 @@ impl IndexArg { index_name: gen_index_name(), accessor_name: &self.accessor, kind, + canonical_name: self.canonical_name.as_ref().map(|s| s.value()), }) } } @@ -395,6 +401,7 @@ struct ValidatedIndex<'a> { accessor_name: &'a Ident, is_unique: bool, kind: ValidatedIndexType<'a>, + canonical_name: Option, } enum ValidatedIndexType<'a> { @@ -842,6 +849,7 @@ pub(crate) fn table_impl(mut args: TableArgs, item: &syn::DeriveInput) -> syn::R //name: None, is_unique: true, kind: IndexType::BTree { columns }, + canonical_name: None, }) } @@ -1033,7 +1041,8 @@ pub(crate) fn table_impl(mut args: TableArgs, item: &syn::DeriveInput) -> syn::R } }; - let explicit_names_impl = generate_explicit_names_impl(&table_name, &tablehandle_ident, &explicit_table_name); + let explicit_names_impl = + generate_explicit_names_impl(&table_name, &tablehandle_ident, &explicit_table_name, &indices); let register_describer_symbol = format!("__preinit__20_register_describer_{table_ident}"); @@ -1226,6 +1235,7 @@ fn generate_explicit_names_impl( table_name: &str, tablehandle_ident: &Ident, explicit_table_name: &Option, + indexes: &[ValidatedIndex], ) -> TokenStream { let mut explicit_names_body = Vec::new(); @@ -1239,6 +1249,19 @@ fn generate_explicit_names_impl( }); }; + // Index names + for index in indexes { + if let Some(canonical_name) = &index.canonical_name { + let index_name = &index.index_name; + explicit_names_body.push(quote! { + names.insert_index( + #index_name, + #canonical_name, + ); + }); + } + } + quote! { impl spacetimedb::rt::ExplicitNames for #tablehandle_ident { diff --git a/crates/lib/src/db/raw_def/v10.rs b/crates/lib/src/db/raw_def/v10.rs index c7dd597fa0b..e000aa0434f 100644 --- a/crates/lib/src/db/raw_def/v10.rs +++ b/crates/lib/src/db/raw_def/v10.rs @@ -176,6 +176,13 @@ impl ExplicitNames { })); } + pub fn insert_index(&mut self, source_name: impl Into, canonical_name: impl Into) { + self.insert(ExplicitNameEntry::Index(NameMapping { + source_name: source_name.into(), + canonical_name: canonical_name.into(), + })); + } + pub fn merge(&mut self, other: ExplicitNames) { self.entries.extend(other.entries); } From 34b417ba20299ba8ba2ad5c6120346e3bd094719 Mon Sep 17 00:00:00 2001 From: joshua-spacetime Date: Mon, 16 Feb 2026 14:40:18 -0800 Subject: [PATCH 065/133] Resolve SQL table names using st_table_accessor --- .../src/locking_tx_datastore/state_view.rs | 29 +++++++++++++++---- crates/datastore/src/system_tables.rs | 1 + 2 files changed, 25 insertions(+), 5 deletions(-) diff --git a/crates/datastore/src/locking_tx_datastore/state_view.rs b/crates/datastore/src/locking_tx_datastore/state_view.rs index 60a962de734..f2643fd0558 100644 --- a/crates/datastore/src/locking_tx_datastore/state_view.rs +++ b/crates/datastore/src/locking_tx_datastore/state_view.rs @@ -5,9 +5,10 @@ use crate::locking_tx_datastore::mut_tx::{IndexScanPoint, IndexScanRanged}; use crate::system_tables::{ ConnectionIdViaU128, StColumnFields, StColumnRow, StConnectionCredentialsFields, StConnectionCredentialsRow, StConstraintFields, StConstraintRow, StEventTableFields, StIndexFields, StIndexRow, StScheduledFields, - StScheduledRow, StSequenceFields, StSequenceRow, StTableFields, StTableRow, StViewFields, StViewParamFields, - StViewRow, SystemTable, ST_COLUMN_ID, ST_CONNECTION_CREDENTIALS_ID, ST_CONSTRAINT_ID, ST_EVENT_TABLE_ID, - ST_INDEX_ID, ST_SCHEDULED_ID, ST_SEQUENCE_ID, ST_TABLE_ID, ST_VIEW_ID, ST_VIEW_PARAM_ID, + StScheduledRow, StSequenceFields, StSequenceRow, StTableAccessorFields, StTableAccessorRow, StTableFields, + StTableRow, StViewFields, StViewParamFields, StViewRow, SystemTable, ST_COLUMN_ID, ST_CONNECTION_CREDENTIALS_ID, + ST_CONSTRAINT_ID, ST_EVENT_TABLE_ID, ST_INDEX_ID, ST_SCHEDULED_ID, ST_SEQUENCE_ID, ST_TABLE_ACCESSOR_ID, + ST_TABLE_ID, ST_VIEW_ID, ST_VIEW_PARAM_ID, }; use anyhow::anyhow; use core::ops::RangeBounds; @@ -43,9 +44,15 @@ pub trait StateView { Ok(row.map(|row| row.read_col(StTableFields::TableId).unwrap())) } - /// TODO: Resolve accessor aliases from `st_table_accessor` + /// Looks up a table id by the table's canonical name or its accessor/alias name. fn table_id_from_name_or_alias(&self, table_name_or_alias: &str) -> Result> { - self.table_id_from_name(table_name_or_alias) + if let Some(table_id) = self.table_id_from_name(table_name_or_alias)? { + return Ok(Some(table_id)); + } + let Some(row) = self.find_st_table_accessor_row(table_name_or_alias)? else { + return Ok(None); + }; + self.table_id_from_name(&row.table_name) } /// Returns the number of rows in the table identified by `table_id`. @@ -88,6 +95,18 @@ pub trait StateView { StTableRow::try_from(row_ref) } + /// Look up an `st_table_accessor` row by its accessor name + fn find_st_table_accessor_row(&self, accessor_name: &str) -> Result> { + self.iter_by_col_eq( + ST_TABLE_ACCESSOR_ID, + StTableAccessorFields::AccessorName, + &accessor_name.into(), + )? + .next() + .map(StTableAccessorRow::try_from) + .transpose() + } + /// Reads the schema information for the specified `table_id` directly from the database. fn schema_for_table_raw(&self, table_id: TableId) -> Result { // Look up the table_name for the table in question. diff --git a/crates/datastore/src/system_tables.rs b/crates/datastore/src/system_tables.rs index aca6c16cd68..d15628c1d96 100644 --- a/crates/datastore/src/system_tables.rs +++ b/crates/datastore/src/system_tables.rs @@ -202,6 +202,7 @@ pub enum SystemTable { st_index, st_constraint, st_row_level_security, + st_table_accessor, } pub fn system_tables() -> [TableSchema; 20] { From 75b8a4638fc605deda229c4b2d585403ecff3d4a Mon Sep 17 00:00:00 2001 From: joshua-spacetime Date: Mon, 16 Feb 2026 16:31:04 -0800 Subject: [PATCH 066/133] Resolve SQL column names using st_column_accessor --- .../locking_tx_datastore/committed_state.rs | 12 ++++- .../src/locking_tx_datastore/state_view.rs | 44 ++++++++++++++++--- .../smoketests/modules/sql-format/src/lib.rs | 8 +++- crates/smoketests/tests/sql.rs | 27 ++++++++++-- 4 files changed, 77 insertions(+), 14 deletions(-) diff --git a/crates/datastore/src/locking_tx_datastore/committed_state.rs b/crates/datastore/src/locking_tx_datastore/committed_state.rs index 8afac124a75..46e0ebfc271 100644 --- a/crates/datastore/src/locking_tx_datastore/committed_state.rs +++ b/crates/datastore/src/locking_tx_datastore/committed_state.rs @@ -767,6 +767,8 @@ impl CommittedState { /// /// The `row_ptr` is a pointer to `row`. fn st_column_changed(&mut self, table_id: TableId) -> Result<()> { + let table_name = self.find_st_table_row(table_id)?.table_name; + // We're replaying and we don't have unique constraints yet. // Due to replay handling all inserts first and deletes after, // when processing `st_column` insert/deletes, @@ -777,7 +779,15 @@ impl CommittedState { // so filter only the non-ignored columns. let mut columns = iter_st_column_for_table(self, &table_id.into())? .filter(|row_ref| !self.replay_columns_to_ignore.contains(&row_ref.pointer())) - .map(|row_ref| StColumnRow::try_from(row_ref).map(Into::into)) + .map(|row_ref| { + let row = StColumnRow::try_from(row_ref)?; + let mut column_schema = ColumnSchema::from(row); + let alias = self + .find_st_column_accessor_row(table_name.as_ref(), &column_schema.col_name)? + .map(|row| row.accessor_name); + column_schema.alias = alias; + Ok(column_schema) + }) .collect::>>()?; // Columns in `st_column` are not in general sorted by their `col_pos`, diff --git a/crates/datastore/src/locking_tx_datastore/state_view.rs b/crates/datastore/src/locking_tx_datastore/state_view.rs index f2643fd0558..747a926a419 100644 --- a/crates/datastore/src/locking_tx_datastore/state_view.rs +++ b/crates/datastore/src/locking_tx_datastore/state_view.rs @@ -3,12 +3,13 @@ use super::{committed_state::CommittedState, datastore::Result, tx_state::TxStat use crate::error::{DatastoreError, TableError}; use crate::locking_tx_datastore::mut_tx::{IndexScanPoint, IndexScanRanged}; use crate::system_tables::{ - ConnectionIdViaU128, StColumnFields, StColumnRow, StConnectionCredentialsFields, StConnectionCredentialsRow, - StConstraintFields, StConstraintRow, StEventTableFields, StIndexFields, StIndexRow, StScheduledFields, - StScheduledRow, StSequenceFields, StSequenceRow, StTableAccessorFields, StTableAccessorRow, StTableFields, - StTableRow, StViewFields, StViewParamFields, StViewRow, SystemTable, ST_COLUMN_ID, ST_CONNECTION_CREDENTIALS_ID, - ST_CONSTRAINT_ID, ST_EVENT_TABLE_ID, ST_INDEX_ID, ST_SCHEDULED_ID, ST_SEQUENCE_ID, ST_TABLE_ACCESSOR_ID, - ST_TABLE_ID, ST_VIEW_ID, ST_VIEW_PARAM_ID, + ConnectionIdViaU128, StColumnAccessorFields, StColumnAccessorRow, StColumnFields, StColumnRow, + StConnectionCredentialsFields, StConnectionCredentialsRow, StConstraintFields, StConstraintRow, StEventTableFields, + StIndexFields, StIndexRow, StScheduledFields, StScheduledRow, StSequenceFields, StSequenceRow, + StTableAccessorFields, StTableAccessorRow, StTableFields, StTableRow, StViewFields, StViewParamFields, StViewRow, + SystemTable, ST_COLUMN_ACCESSOR_ID, ST_COLUMN_ID, ST_CONNECTION_CREDENTIALS_ID, ST_CONSTRAINT_ID, + ST_EVENT_TABLE_ID, ST_INDEX_ID, ST_SCHEDULED_ID, ST_SEQUENCE_ID, ST_TABLE_ACCESSOR_ID, ST_TABLE_ID, ST_VIEW_ID, + ST_VIEW_PARAM_ID, }; use anyhow::anyhow; use core::ops::RangeBounds; @@ -107,6 +108,27 @@ pub trait StateView { .transpose() } + /// Look up an `st_column_accessor` row by its canonical table and column names + fn find_st_column_accessor_row(&self, table_name: &str, col_name: &str) -> Result> { + let row = match self.iter_by_col_eq( + ST_COLUMN_ACCESSOR_ID, + [StColumnAccessorFields::TableName, StColumnAccessorFields::ColName], + &AlgebraicValue::product([table_name.into(), col_name.into()]), + ) { + Ok(mut iter) => iter.next().map(StColumnAccessorRow::try_from).transpose(), + // `schema_for_table_raw` is called while restoring snapshots, + // before `migrate_system_tables` creates newer system tables. + // We therefore treat a missing `st_column_accessor` as "no aliases yet". + // + // Note this is different behavior from `find_st_table_accessor_row1`, + // because that utility is used for name resolution **after** startup, + // where missing accessor tables should be surfaced as real errors. + Err(DatastoreError::Table(TableError::IdNotFound(..))) => Ok(None), + Err(e) => Err(e), + }; + row + } + /// Reads the schema information for the specified `table_id` directly from the database. fn schema_for_table_raw(&self, table_id: TableId) -> Result { // Look up the table_name for the table in question. @@ -119,7 +141,15 @@ pub trait StateView { // Look up the columns for the table in question. let mut columns: Vec = iter_st_column_for_table(self, &table_id.into())? - .map(|row| Ok(StColumnRow::try_from(row)?.into())) + .map(|row_ref| { + let row = StColumnRow::try_from(row_ref)?; + let mut column_schema = ColumnSchema::from(row); + let alias = self + .find_st_column_accessor_row(table_name.as_ref(), &column_schema.col_name)? + .map(|row| row.accessor_name); + column_schema.alias = alias; + Ok(column_schema) + }) .collect::>>()?; columns.sort_by_key(|col| col.col_pos); diff --git a/crates/smoketests/modules/sql-format/src/lib.rs b/crates/smoketests/modules/sql-format/src/lib.rs index 7f74a718c01..589c71d143b 100644 --- a/crates/smoketests/modules/sql-format/src/lib.rs +++ b/crates/smoketests/modules/sql-format/src/lib.rs @@ -125,10 +125,14 @@ pub fn test(ctx: &ReducerContext) { pub struct AccessorRow { #[primary_key] id: u32, - value: u32, + #[sats(name = "canonical_value")] + accessor_value: u32, } #[spacetimedb::reducer(init)] pub fn init(ctx: &ReducerContext) { - ctx.db.accessor_table().insert(AccessorRow { id: 1, value: 7 }); + ctx.db.accessor_table().insert(AccessorRow { + id: 1, + accessor_value: 7, + }); } diff --git a/crates/smoketests/tests/sql.rs b/crates/smoketests/tests/sql.rs index eb8b8bb08d1..ba4966c50d6 100644 --- a/crates/smoketests/tests/sql.rs +++ b/crates/smoketests/tests/sql.rs @@ -70,15 +70,34 @@ fn test_sql_resolves_accessor_and_canonical_names() { test.assert_sql( "SELECT * FROM accessor_table", - r#" id | value -----+------- + r#" id | accessor_value +----+---------------- 1 | 7"#, ); test.assert_sql( "SELECT * FROM canonical_table", - r#" id | value -----+------- + r#" id | accessor_value +----+---------------- 1 | 7"#, ); } + +#[test] +fn test_sql_resolves_column_accessor_and_canonical_names() { + let test = Smoketest::builder().precompiled_module("sql-format").build(); + + test.assert_sql( + "SELECT accessor_value FROM accessor_table", + r#" accessor_value +---------------- + 7"#, + ); + + test.assert_sql( + "SELECT canonical_value FROM accessor_table", + r#" canonical_value +---------------- + 7"#, + ); +} From 096593e575915a4e0379b341663a3fa3725faa85 Mon Sep 17 00:00:00 2001 From: joshua-spacetime Date: Mon, 16 Feb 2026 18:52:14 -0800 Subject: [PATCH 067/133] Insert into accessor system tables --- .../src/locking_tx_datastore/datastore.rs | 1 + .../src/locking_tx_datastore/mut_tx.rs | 96 +++++++++++++++++-- .../src/locking_tx_datastore/state_view.rs | 21 +++- 3 files changed, 106 insertions(+), 12 deletions(-) diff --git a/crates/datastore/src/locking_tx_datastore/datastore.rs b/crates/datastore/src/locking_tx_datastore/datastore.rs index bb783bce1f4..be0b6805615 100644 --- a/crates/datastore/src/locking_tx_datastore/datastore.rs +++ b/crates/datastore/src/locking_tx_datastore/datastore.rs @@ -1313,6 +1313,7 @@ mod tests { columns_to_row_type, ColumnSchema, ConstraintSchema, IndexSchema, RowLevelSecuritySchema, ScheduleSchema, SequenceSchema, }; + use spacetimedb_schema::table_name::TableName; /// For the first user-created table, sequences in the system tables start /// from this value. diff --git a/crates/datastore/src/locking_tx_datastore/mut_tx.rs b/crates/datastore/src/locking_tx_datastore/mut_tx.rs index 101a5feb753..b4443b96ed6 100644 --- a/crates/datastore/src/locking_tx_datastore/mut_tx.rs +++ b/crates/datastore/src/locking_tx_datastore/mut_tx.rs @@ -20,11 +20,13 @@ use crate::{ use crate::{ error::{IndexError, SequenceError, TableError}, system_tables::{ - with_sys_table_buf, StClientFields, StClientRow, StColumnFields, StColumnRow, StConstraintFields, - StConstraintRow, StEventTableRow, StFields as _, StIndexFields, StIndexRow, StRowLevelSecurityFields, - StRowLevelSecurityRow, StScheduledFields, StScheduledRow, StSequenceFields, StSequenceRow, StTableFields, - StTableRow, SystemTable, ST_CLIENT_ID, ST_COLUMN_ID, ST_CONSTRAINT_ID, ST_EVENT_TABLE_ID, ST_INDEX_ID, - ST_ROW_LEVEL_SECURITY_ID, ST_SCHEDULED_ID, ST_SEQUENCE_ID, ST_TABLE_ID, + with_sys_table_buf, StClientFields, StClientRow, StColumnAccessorFields, StColumnAccessorRow, StColumnFields, + StColumnRow, StConstraintFields, StConstraintRow, StEventTableRow, StFields as _, StIndexAccessorFields, + StIndexAccessorRow, StIndexFields, StIndexRow, StRowLevelSecurityFields, StRowLevelSecurityRow, + StScheduledFields, StScheduledRow, StSequenceFields, StSequenceRow, StTableAccessorFields, StTableAccessorRow, + StTableFields, StTableRow, SystemTable, ST_CLIENT_ID, ST_COLUMN_ACCESSOR_ID, ST_COLUMN_ID, ST_CONSTRAINT_ID, + ST_EVENT_TABLE_ID, ST_INDEX_ACCESSOR_ID, ST_INDEX_ID, ST_ROW_LEVEL_SECURITY_ID, ST_SCHEDULED_ID, + ST_SEQUENCE_ID, ST_TABLE_ACCESSOR_ID, ST_TABLE_ID, }, }; use crate::{execution_context::ExecutionContext, system_tables::StViewColumnRow}; @@ -59,6 +61,7 @@ use spacetimedb_sats::{ }; use spacetimedb_schema::{ def::{ModuleDef, ViewColumnDef, ViewDef, ViewParamDef}, + identifier::Identifier, reducer_name::ReducerName, schema::{ColumnSchema, ConstraintSchema, IndexSchema, RowLevelSecuritySchema, SequenceSchema, TableSchema}, table_name::TableName, @@ -645,6 +648,7 @@ impl MutTxId { .read_col(StTableFields::TableId)?; table_schema.update_table_id(table_id); + self.insert_st_table_accessor(&table_name, table_schema.alias.as_ref())?; if let Some(info) = table_schema.view_info.as_mut() { info.view_id = self.insert_into_st_view(table_name.clone(), table_id, true, info.is_anonymous)?; @@ -653,7 +657,7 @@ impl MutTxId { // Generate the full definition of the table, with the generated indexes, constraints, sequences... // Insert the columns into `st_column`. - self.insert_st_column(table_schema.columns())?; + self.insert_st_column(&table_name, table_schema.columns())?; let schedule = table_schema.schedule.clone(); let is_event = table_schema.is_event; @@ -714,15 +718,61 @@ impl MutTxId { Ok(table_id) } - /// Insert `columns` into `st_column`. - fn insert_st_column(&mut self, columns: &[ColumnSchema]) -> Result<()> { + /// Insert `columns` into `st_column`, and their accessors into `st_column_accessor`. + fn insert_st_column(&mut self, table_name: &TableName, columns: &[ColumnSchema]) -> Result<()> { columns.iter().try_for_each(|col| { let row: StColumnRow = col.clone().into(); self.insert_via_serialize_bsatn(ST_COLUMN_ID, &row)?; + self.insert_st_column_accessor(table_name, &col.col_name, col.alias.as_ref())?; Ok(()) }) } + /// Insert a row into `st_table_accessor` for `table_name`, if an alias is present. + fn insert_st_table_accessor(&mut self, table_name: &TableName, alias: Option<&Identifier>) -> Result<()> { + let Some(accessor_name) = alias.cloned() else { + return Ok(()); + }; + let row = StTableAccessorRow { + table_name: table_name.clone(), + accessor_name, + }; + self.insert_via_serialize_bsatn(ST_TABLE_ACCESSOR_ID, &row)?; + Ok(()) + } + + /// Insert a row into `st_column_accessor` for `(table_name, col_name)`, if an alias is present. + fn insert_st_column_accessor( + &mut self, + table_name: &TableName, + col_name: &Identifier, + alias: Option<&Identifier>, + ) -> Result<()> { + let Some(accessor_name) = alias.cloned() else { + return Ok(()); + }; + let row = StColumnAccessorRow { + table_name: table_name.clone(), + col_name: col_name.clone(), + accessor_name, + }; + self.insert_via_serialize_bsatn(ST_COLUMN_ACCESSOR_ID, &row)?; + Ok(()) + } + + /// Insert a row into `st_index_accessor` for `index_name`, if an alias is present. + fn insert_st_index_accessor(&mut self, index_name: &RawIdentifier, alias: Option<&RawIdentifier>) -> Result<()> { + let Some(accessor_name) = alias.cloned() else { + return Ok(()); + }; + let row = StIndexAccessorRow { + index_name: index_name.clone(), + accessor_name, + }; + self.insert_via_serialize_bsatn(ST_INDEX_ACCESSOR_ID, &row)?; + Ok(()) + } + pub fn lookup_st_view(&self, view_id: ViewId) -> Result { let row = self .iter_by_col_eq(ST_VIEW_ID, StViewFields::ViewId, &view_id.into())? @@ -850,11 +900,33 @@ impl MutTxId { self.delete_col_eq(ST_COLUMN_ID, StColumnFields::TableId.col_id(), &table_id.into()) } + /// Drops rows in `st_column_accessor` for this canonical `table_name`. + fn drop_st_column_accessor(&mut self, table_name: &TableName) -> Result<()> { + let value = table_name.as_ref().into(); + self.delete_col_eq( + ST_COLUMN_ACCESSOR_ID, + StColumnAccessorFields::TableName.col_id(), + &value, + ) + } + /// Drops the row in `st_table` for this `table_id` fn drop_st_table(&mut self, table_id: TableId) -> Result<()> { self.delete_col_eq(ST_TABLE_ID, StTableFields::TableId.col_id(), &table_id.into()) } + /// Drops rows in `st_table_accessor` for this canonical `table_name`. + fn drop_st_table_accessor(&mut self, table_name: &TableName) -> Result<()> { + let value = table_name.as_ref().into(); + self.delete_col_eq(ST_TABLE_ACCESSOR_ID, StTableAccessorFields::TableName.col_id(), &value) + } + + /// Drops rows in `st_index_accessor` for this canonical `index_name`. + fn drop_st_index_accessor(&mut self, index_name: &RawIdentifier) -> Result<()> { + let value = index_name.as_ref().into(); + self.delete_col_eq(ST_INDEX_ACCESSOR_ID, StIndexAccessorFields::IndexName.col_id(), &value) + } + /// Drops the row in `st_view` for this `view_id` fn drop_st_view(&mut self, view_id: ViewId) -> Result<()> { self.delete_col_eq(ST_VIEW_ID, StViewFields::ViewId.col_id(), &view_id.into()) @@ -893,6 +965,8 @@ impl MutTxId { } // Drop the table and their columns + self.drop_st_table_accessor(&schema.table_name)?; + self.drop_st_column_accessor(&schema.table_name)?; self.drop_st_table(table_id)?; self.drop_st_column(table_id)?; @@ -1045,8 +1119,10 @@ impl MutTxId { // Update system tables. // We'll simply remove all rows in `st_columns` and then add the new ones. // The datastore takes care of not persisting any no-op delete/inserts to the commitlog. + let table_name = self.find_st_table_row(table_id)?.table_name; self.drop_st_column(table_id)?; - self.insert_st_column(&column_schemas)?; + self.drop_st_column_accessor(&table_name)?; + self.insert_st_column(&table_name, &column_schemas)?; // Remember the pending change so we can undo if necessary. self.push_schema_change(PendingSchemaChange::TableAlterRowType(table_id, old_column_schemas)); @@ -1214,6 +1290,7 @@ impl MutTxId { .collapse() .read_col(StIndexFields::IndexId)?; index_schema.index_id = index_id; + self.insert_st_index_accessor(&index_schema.index_name, index_schema.alias.as_ref())?; // Add the index to the transaction's insert table. let ((table, blob_store, delete_table), (commit_table, commit_blob_store, idx_map)) = @@ -1285,6 +1362,7 @@ impl MutTxId { // Remove the index from st_indexes. self.delete(ST_INDEX_ID, st_index_ptr)?; + self.drop_st_index_accessor(&st_index_row.index_name)?; // Remove the index in the transaction's insert table and the commit table. let ((tx_table, tx_bs, _), (commit_table, commit_bs, idx_map)) = diff --git a/crates/datastore/src/locking_tx_datastore/state_view.rs b/crates/datastore/src/locking_tx_datastore/state_view.rs index 747a926a419..56643b96e3c 100644 --- a/crates/datastore/src/locking_tx_datastore/state_view.rs +++ b/crates/datastore/src/locking_tx_datastore/state_view.rs @@ -120,7 +120,7 @@ pub trait StateView { // before `migrate_system_tables` creates newer system tables. // We therefore treat a missing `st_column_accessor` as "no aliases yet". // - // Note this is different behavior from `find_st_table_accessor_row1`, + // Note this is different behavior from `find_st_table_accessor_row`, // because that utility is used for name resolution **after** startup, // where missing accessor tables should be surfaced as real errors. Err(DatastoreError::Table(TableError::IdNotFound(..))) => Ok(None), @@ -227,6 +227,22 @@ pub trait StateView { Err(DatastoreError::Table(TableError::IdNotFound(..))) => false, Err(e) => return Err(e), }; + // During restore from snapshots produced before `st_table_accessor` existed, + // this system table is missing until `migrate_system_tables` runs. + // Handle that here so schema reconstruction can proceed during restore. + let table_alias = match self.iter_by_col_eq( + ST_TABLE_ACCESSOR_ID, + StTableAccessorFields::TableName, + &table_name.as_ref().into(), + ) { + Ok(mut iter) => iter + .next() + .map(StTableAccessorRow::try_from) + .transpose()? + .map(|row| row.accessor_name), + Err(DatastoreError::Table(TableError::IdNotFound(..))) => None, + Err(e) => return Err(e), + }; Ok(TableSchema::new( table_id, table_name, @@ -240,8 +256,7 @@ pub trait StateView { schedule, table_primary_key, is_event, - //TODO: fetch it from system table - None, + table_alias, )) } From ec752e8511a4b2a8d54de6fc89b2284b5e90603b Mon Sep 17 00:00:00 2001 From: joshua-spacetime Date: Mon, 16 Feb 2026 19:36:50 -0800 Subject: [PATCH 068/133] Resolve query builder and view accessor names --- .../smoketests/modules/sql-format/src/lib.rs | 9 ++++- crates/smoketests/tests/sql.rs | 35 +++++++++++++++++-- 2 files changed, 41 insertions(+), 3 deletions(-) diff --git a/crates/smoketests/modules/sql-format/src/lib.rs b/crates/smoketests/modules/sql-format/src/lib.rs index 589c71d143b..b00d643394e 100644 --- a/crates/smoketests/modules/sql-format/src/lib.rs +++ b/crates/smoketests/modules/sql-format/src/lib.rs @@ -1,5 +1,7 @@ use spacetimedb::sats::{i256, u256}; -use spacetimedb::{ConnectionId, Identity, ReducerContext, SpacetimeType, Table, TimeDuration, Timestamp, Uuid}; +use spacetimedb::{ + ConnectionId, Identity, Query, ReducerContext, SpacetimeType, Table, TimeDuration, Timestamp, Uuid, ViewContext, +}; #[derive(Copy, Clone)] #[spacetimedb::table(accessor = t_ints)] @@ -136,3 +138,8 @@ pub fn init(ctx: &ReducerContext) { accessor_value: 7, }); } + +#[spacetimedb::view(accessor = accessor_filtered, name = "canonical_filtered", public)] +fn accessor_filtered(ctx: &ViewContext) -> impl Query { + ctx.from.accessor_table().r#where(|r| r.accessor_value.eq(7)) +} diff --git a/crates/smoketests/tests/sql.rs b/crates/smoketests/tests/sql.rs index ba4966c50d6..c0cd1f6de3f 100644 --- a/crates/smoketests/tests/sql.rs +++ b/crates/smoketests/tests/sql.rs @@ -65,7 +65,7 @@ fn test_sql_format() { } #[test] -fn test_sql_resolves_accessor_and_canonical_names() { +fn test_sql_resolves_accessor_and_canonical_names_for_table() { let test = Smoketest::builder().precompiled_module("sql-format").build(); test.assert_sql( @@ -84,7 +84,26 @@ fn test_sql_resolves_accessor_and_canonical_names() { } #[test] -fn test_sql_resolves_column_accessor_and_canonical_names() { +fn test_sql_resolves_accessor_and_canonical_names_for_view() { + let test = Smoketest::builder().precompiled_module("sql-format").build(); + + test.assert_sql( + "SELECT * FROM accessor_filtered", + r#" id | accessor_value +----+---------------- + 1 | 7"#, + ); + + test.assert_sql( + "SELECT * FROM canonical_filtered", + r#" id | accessor_value +----+---------------- + 1 | 7"#, + ); +} + +#[test] +fn test_sql_resolves_accessor_and_canonical_names_for_column() { let test = Smoketest::builder().precompiled_module("sql-format").build(); test.assert_sql( @@ -101,3 +120,15 @@ fn test_sql_resolves_column_accessor_and_canonical_names() { 7"#, ); } + +#[test] +fn test_query_builder_resolves_accessor_and_canonical_names() { + let test = Smoketest::builder().precompiled_module("sql-format").build(); + + test.assert_sql( + "SELECT * FROM accessor_filtered", + r#" id | accessor_value +----+---------------- + 1 | 7"#, + ); +} From 2956d56db4f053cb153993c2abef4f22a2a5f447 Mon Sep 17 00:00:00 2001 From: Shubham Mishra Date: Tue, 17 Feb 2026 12:05:10 +0530 Subject: [PATCH 069/133] codegen fixes --- crates/codegen/src/csharp.rs | 2 ++ crates/codegen/src/typescript.rs | 11 ++++++++++- .../tests/snapshots/codegen__codegen_csharp.snap | 7 +++---- 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/crates/codegen/src/csharp.rs b/crates/codegen/src/csharp.rs index c67b1a370e2..bcb81dcf3fd 100644 --- a/crates/codegen/src/csharp.rs +++ b/crates/codegen/src/csharp.rs @@ -1383,6 +1383,7 @@ fn autogen_csharp_sum(module: &ModuleDef, sum_type_name: String, sum_type: &SumT write!(output, ","); } writeln!(output); + let variant_name = variant_name.deref().to_case(Case::Pascal); 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. @@ -1412,6 +1413,7 @@ fn autogen_csharp_plain_enum(enum_type_name: String, enum_type: &PlainEnumTypeDe writeln!(output, "public enum {enum_type_name}"); indented_block(&mut output, |output| { for variant in &*enum_type.variants { + let variant = variant.deref().to_case(Case::Pascal); writeln!(output, "{variant},"); } }); diff --git a/crates/codegen/src/typescript.rs b/crates/codegen/src/typescript.rs index 0e2dc724187..5cb25d979c6 100644 --- a/crates/codegen/src/typescript.rs +++ b/crates/codegen/src/typescript.rs @@ -911,7 +911,16 @@ fn define_body_for_sum( write!(out, ": __TypeBuilder<__AlgebraicTypeType, __AlgebraicTypeType>"); } write!(out, " = __t.enum(\"{name}\", {{"); - out.with_indent(|out| write_object_type_builder_fields(module, out, variants, None, false, false).unwrap()); + // Convert variant names to PascalCase + let pascal_variants: Vec<(Identifier, AlgebraicTypeUse)> = variants + .iter() + .map(|(ident, ty)| { + let pascal = ident.deref().to_case(Case::Pascal); + (Identifier::for_test(pascal), ty.clone()) + }) + .collect(); + + out.with_indent(|out| write_object_type_builder_fields(module, out, &pascal_variants, None, false, false).unwrap()); writeln!(out, "}});"); out.newline(); writeln!(out, "export default {name};"); diff --git a/crates/codegen/tests/snapshots/codegen__codegen_csharp.snap b/crates/codegen/tests/snapshots/codegen__codegen_csharp.snap index b497dd1ad31..fdbcdf9afa6 100644 --- a/crates/codegen/tests/snapshots/codegen__codegen_csharp.snap +++ b/crates/codegen/tests/snapshots/codegen__codegen_csharp.snap @@ -1,6 +1,5 @@ --- source: crates/codegen/tests/codegen.rs -assertion_line: 37 expression: outfiles --- "Procedures/GetMySchemaViaHttp.g.cs" = ''' @@ -972,11 +971,11 @@ namespace SpacetimeDB { [DataMember(Name = "arg")] public TestA Arg; - [DataMember(Name = "arg2")] + [DataMember(Name = "arg_2")] public TestB Arg2; - [DataMember(Name = "arg3")] + [DataMember(Name = "arg_3")] public NamespaceTestC Arg3; - [DataMember(Name = "arg4")] + [DataMember(Name = "arg_4")] public NamespaceTestF Arg4; public Test( From e66dc2ca58d671cf858269c2ff2fde13ea4ae65b Mon Sep 17 00:00:00 2001 From: Shubham Mishra Date: Tue, 17 Feb 2026 12:24:40 +0530 Subject: [PATCH 070/133] autoinc --- smoketests/tests/auto_inc.py | 84 ++++++++++++++++++++++-------------- 1 file changed, 51 insertions(+), 33 deletions(-) diff --git a/smoketests/tests/auto_inc.py b/smoketests/tests/auto_inc.py index 9c7f7c29549..6e243d3e432 100644 --- a/smoketests/tests/auto_inc.py +++ b/smoketests/tests/auto_inc.py @@ -1,68 +1,79 @@ + from .. import Smoketest import string import functools -# original Rust types + ints = "u8", "u16", "u32", "u64", "u128", "i8", "i16", "i32", "i64", "i128" -# map Rust type -> safe identifier -def ty_ident(ty: str) -> str: - return ty.replace("u", "u_").replace("i", "i_") + +def reducer_name(int_ty: str) -> str: + # Convert "u8" -> "u_8", "i128" -> "i_128" + return f"{int_ty[0]}_{int_ty[1:]}" + class IntTests: make_func = lambda int_ty: lambda self: self.do_test_autoinc(int_ty) for int_ty in ints: - name = ty_ident(int_ty) - locals()[f"test_autoinc_{name}"] = make_func(int_ty) + locals()[f"test_autoinc_{int_ty}"] = make_func(int_ty) del int_ty, make_func + autoinc1_template = string.Template(""" -#[spacetimedb::table(accessor = person_$IDENT_TY)] -pub struct Person_$IDENT_TY { +#[spacetimedb::table(accessor = person_$KEY_TY)] +pub struct Person_$KEY_TY { #[auto_inc] key_col: $KEY_TY, name: String, } #[spacetimedb::reducer] -pub fn add_$IDENT_TY(ctx: &ReducerContext, name: String, expected_value: $KEY_TY) { - let value = ctx.db.person_$IDENT_TY().insert(Person_$IDENT_TY { key_col: 0, name }); +pub fn add_$REDUCER_TY(ctx: &ReducerContext, name: String, expected_value: $KEY_TY) { + let value = ctx.db.person_$KEY_TY().insert(Person_$KEY_TY { key_col: 0, name }); assert_eq!(value.key_col, expected_value); } #[spacetimedb::reducer] -pub fn say_hello_$IDENT_TY(ctx: &ReducerContext) { - for person in ctx.db.person_$IDENT_TY().iter() { +pub fn say_hello_$REDUCER_TY(ctx: &ReducerContext) { + for person in ctx.db.person_$KEY_TY().iter() { log::info!("Hello, {}:{}!", person.key_col, person.name); } log::info!("Hello, World!"); } """) + class AutoincBasic(IntTests, Smoketest): "This tests the auto_inc functionality" MODULE_CODE = f""" #![allow(non_camel_case_types)] use spacetimedb::{{log, ReducerContext, Table}}; -{"".join(autoinc1_template.substitute(IDENT_TY=ty_ident(int_ty), KEY_TY=int_ty) for int_ty in ints)} +{"".join( + autoinc1_template.substitute( + KEY_TY=int_ty, + REDUCER_TY=reducer_name(int_ty), + ) + for int_ty in ints +)} """ def do_test_autoinc(self, int_ty): - ident = ty_ident(int_ty) - self.call(f"add_{ident}", "Robert", 1) - self.call(f"add_{ident}", "Julie", 2) - self.call(f"add_{ident}", "Samantha", 3) - self.call(f"say_hello_{ident}") + r = reducer_name(int_ty) + self.call(f"add_{r}", "Robert", 1) + self.call(f"add_{r}", "Julie", 2) + self.call(f"add_{r}", "Samantha", 3) + self.call(f"say_hello_{r}") logs = self.logs(4) self.assertIn("Hello, 3:Samantha!", logs) self.assertIn("Hello, 2:Julie!", logs) self.assertIn("Hello, 1:Robert!", logs) self.assertIn("Hello, World!", logs) + autoinc2_template = string.Template(""" -#[spacetimedb::table(accessor = person_$IDENT_TY)] -pub struct Person_$IDENT_TY { +#[spacetimedb::table(accessor = person_$KEY_TY)] +pub struct Person_$KEY_TY { #[auto_inc] #[unique] key_col: $KEY_TY, @@ -71,27 +82,28 @@ def do_test_autoinc(self, int_ty): } #[spacetimedb::reducer] -pub fn add_new_$IDENT_TY(ctx: &ReducerContext, name: String) -> Result<(), Box> { - let value = ctx.db.person_$IDENT_TY().try_insert(Person_$IDENT_TY { key_col: 0, name })?; +pub fn add_new_$REDUCER_TY(ctx: &ReducerContext, name: String) -> Result<(), Box> { + let value = ctx.db.person_$KEY_TY().try_insert(Person_$KEY_TY { key_col: 0, name })?; log::info!("Assigned Value: {} -> {}", value.key_col, value.name); Ok(()) } #[spacetimedb::reducer] -pub fn update_$IDENT_TY(ctx: &ReducerContext, name: String, new_id: $KEY_TY) { - ctx.db.person_$IDENT_TY().name().delete(&name); - let _value = ctx.db.person_$IDENT_TY().insert(Person_$IDENT_TY { key_col: new_id, name }); +pub fn update_$REDUCER_TY(ctx: &ReducerContext, name: String, new_id: $KEY_TY) { + ctx.db.person_$KEY_TY().name().delete(&name); + let _value = ctx.db.person_$KEY_TY().insert(Person_$KEY_TY { key_col: new_id, name }); } #[spacetimedb::reducer] -pub fn say_hello_$IDENT_TY(ctx: &ReducerContext) { - for person in ctx.db.person_$IDENT_TY().iter() { +pub fn say_hello_$REDUCER_TY(ctx: &ReducerContext) { + for person in ctx.db.person_$KEY_TY().iter() { log::info!("Hello, {}:{}!", person.key_col, person.name); } log::info!("Hello, World!"); } """) + class AutoincUnique(IntTests, Smoketest): """This tests unique constraints being violated during autoinc insertion""" @@ -99,17 +111,23 @@ class AutoincUnique(IntTests, Smoketest): #![allow(non_camel_case_types)] use std::error::Error; use spacetimedb::{{log, ReducerContext, Table}}; -{"".join(autoinc2_template.substitute(IDENT_TY=ty_ident(int_ty), KEY_TY=int_ty) for int_ty in ints)} +{"".join( + autoinc2_template.substitute( + KEY_TY=int_ty, + REDUCER_TY=reducer_name(int_ty), + ) + for int_ty in ints +)} """ def do_test_autoinc(self, int_ty): - ident = ty_ident(int_ty) - self.call(f"update_{ident}", "Robert", 2) - self.call(f"add_new_{ident}", "Success") + r = reducer_name(int_ty) + self.call(f"update_{r}", "Robert", 2) + self.call(f"add_new_{r}", "Success") with self.assertRaises(Exception): - self.call(f"add_new_{ident}", "Failure") + self.call(f"add_new_{r}", "Failure") - self.call(f"say_hello_{ident}") + self.call(f"say_hello_{r}") logs = self.logs(4) self.assertIn("Hello, 2:Robert!", logs) self.assertIn("Hello, 1:Success!", logs) From 04eece77910b1b2ba7f4f2c780caa65577c4704f Mon Sep 17 00:00:00 2001 From: Shubham Mishra Date: Tue, 17 Feb 2026 13:17:29 +0530 Subject: [PATCH 071/133] fix pg wire --- smoketests/tests/pg_wire.py | 32 ++++++++++++++++---------------- smoketests/tests/sql.py | 18 +++++++++--------- 2 files changed, 25 insertions(+), 25 deletions(-) diff --git a/smoketests/tests/pg_wire.py b/smoketests/tests/pg_wire.py index 55e766a40f0..853d82b523c 100644 --- a/smoketests/tests/pg_wire.py +++ b/smoketests/tests/pg_wire.py @@ -214,34 +214,34 @@ def test_sql_format(self): self.call("test") self.assertPsql(token, "SELECT * FROM t_ints", """\ -i_8 | i_16 | i_32 | i_64 | i_128 | i_256 +i8 | i16 | i32 | i64 | i128 | i256 -----+-------+--------+----------+---------------+--------------- -25 | -3224 | -23443 | -2344353 | -234434897853 | -234434897853 (1 row)""") self.assertPsql(token, "SELECT * FROM t_ints_tuple", """\ tuple -------------------------------------------------------------------------------------------------------------- - {"i_8": -25, "i_16": -3224, "i_32": -23443, "i_64": -2344353, "i_128": -234434897853, "i_256": -234434897853} +--------------------------------------------------------------------------------------------------------- + {"i8": -25, "i16": -3224, "i32": -23443, "i64": -2344353, "i128": -234434897853, "i256": -234434897853} (1 row)""") self.assertPsql(token, "SELECT * FROM t_uints", """\ -u_8 | u_16 | u_32 | u_64 | u_128 | u_256 +u8 | u16 | u32 | u64 | u128 | u256 -----+------+-------+----------+---------------+--------------- 105 | 1050 | 83892 | 48937498 | 4378528978889 | 4378528978889 (1 row)""") self.assertPsql(token, "SELECT * FROM t_uints_tuple", """\ tuple ------------------------------------------------------------------------------------------------------------ - {"u_8": 105, "u_16": 1050, "u_32": 83892, "u_64": 48937498, "u_128": 4378528978889, "u_256": 4378528978889} +------------------------------------------------------------------------------------------------------- + {"u8": 105, "u16": 1050, "u32": 83892, "u64": 48937498, "u128": 4378528978889, "u256": 4378528978889} (1 row)""") self.assertPsql(token, "SELECT * FROM t_others", """\ -bool | f_32 | f_64 | str | bytes | identity | connection_id | timestamp | duration | uuid +bool | f32 | f64 | str | bytes | identity | connection_id | timestamp | duration | uuid ------+-----------+---------------------+---------------------+------------------+--------------------------------------------------------------------+------------------------------------+---------------------------+----------+-------------------------------------- t | 594806.56 | -3454353.3453890434 | This is spacetimedb | \\x01020304050607 | \\x0000000000000000000000000000000000000000000000000000000000000001 | \\x00000000000000000000000000000000 | 1970-01-01T00:00:00+00:00 | PT10S | 00000000-0000-0000-0000-000000000000 (1 row)""") self.assertPsql(token, "SELECT * FROM t_others_tuple", """\ tuple -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - {"bool": true, "f_32": 594806.56, "f_64": -3454353.3453890434, "str": "This is spacetimedb", "bytes": "0x01020304050607", "identity": "0x0000000000000000000000000000000000000000000000000000000000000001", "connection_id": "0x00000000000000000000000000000000", "timestamp": "1970-01-01T00:00:00+00:00", "duration": "PT10S", "uuid": "00000000-0000-0000-0000-000000000000"} +--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + {"bool": true, "f32": 594806.56, "f64": -3454353.3453890434, "str": "This is spacetimedb", "bytes": "0x01020304050607", "identity": "0x0000000000000000000000000000000000000000000000000000000000000001", "connection_id": "0x00000000000000000000000000000000", "timestamp": "1970-01-01T00:00:00+00:00", "duration": "PT10S", "uuid": "00000000-0000-0000-0000-000000000000"} (1 row)""") self.assertPsql(token, "SELECT * FROM t_simple_enum", """\ id | action @@ -255,9 +255,9 @@ def test_sql_format(self): 1 | {"Gray": 128} (1 row)""") self.assertPsql(token, "SELECT * FROM t_nested", """\ -en | se | ints ------------------------------------+-------------------------------------+------------------------------------------------------------------------------------------------------------- - {"id": 1, "color": {"Gray": 128}} | {"id": 2, "action": {"Active": {}}} | {"i_8": -25, "i_16": -3224, "i_32": -23443, "i_64": -2344353, "i_128": -234434897853, "i_256": -234434897853} +en | se | ints +-----------------------------------+-------------------------------------+--------------------------------------------------------------------------------------------------------- + {"id": 1, "color": {"Gray": 128}} | {"id": 2, "action": {"Active": {}}} | {"i8": -25, "i16": -3224, "i32": -23443, "i64": -2344353, "i128": -234434897853, "i256": -234434897853} (1 row)""") self.assertPsql(token,"SELECT * FROM t_enums", """\ bool_opt | bool_result | action @@ -267,7 +267,7 @@ def test_sql_format(self): """) self.assertPsql(token,"SELECT * FROM t_enums_tuple", """\ tuple --------------------------------------------------------------------------------------------- +-------------------------------------------------------------------------------------- {"bool_opt": {"some": true}, "bool_result": {"ok": false}, "action": {"Active": {}}} (1 row) """) @@ -281,7 +281,7 @@ def test_sql_conn(self): conn = self.connect_db(token) # Check prepared statements (faked by `psycopg2`) with conn.cursor() as cur: - cur.execute("select * from t_uints where u_8 = %s and u_16 = %s", (105, 1050)) + cur.execute("select * from t_uints where u8 = %s and u16 = %s", (105, 1050)) rows = cur.fetchall() self.assertEqual(rows[0], (105, 1050, 83892, 48937498, 4378528978889, 4378528978889)) # Check long-lived connection @@ -313,5 +313,5 @@ def test_failures(self): # And prepared statements with self.assertRaises(Exception) as cm: - self.psql(token, "SELECT * FROM t_uints where u_8 = $1") - self.assertIn("Unsupported", str(cm.exception)) \ No newline at end of file + self.psql(token, "SELECT * FROM t_uints where u8 = $1") + self.assertIn("Unsupported", str(cm.exception)) diff --git a/smoketests/tests/sql.py b/smoketests/tests/sql.py index 16aeb82887f..bd61fc9c248 100644 --- a/smoketests/tests/sql.py +++ b/smoketests/tests/sql.py @@ -133,34 +133,34 @@ def test_sql_format(self): self.call("test") self.assertSql("SELECT * FROM t_ints", """\ - i8 | i16 | i32 | i64 | i128 | i256 + i_8 | i_16 | i_32 | i_64 | i_128 | i_256 -----+-------+--------+----------+---------------+--------------- -25 | -3224 | -23443 | -2344353 | -234434897853 | -234434897853 """) self.assertSql("SELECT * FROM t_ints_tuple", """\ tuple ---------------------------------------------------------------------------------------------------- - (i8 = -25, i16 = -3224, i32 = -23443, i64 = -2344353, i128 = -234434897853, i256 = -234434897853) +--------------------------------------------------------------------------------------------------------- + (i_8 = -25, i_16 = -3224, i_32 = -23443, i_64 = -2344353, i_128 = -234434897853, i_256 = -234434897853) """) self.assertSql("SELECT * FROM t_uints", """\ - u8 | u16 | u32 | u64 | u128 | u256 + u_8 | u_16 | u_32 | u_64 | u_128 | u_256 -----+------+-------+----------+---------------+--------------- 105 | 1050 | 83892 | 48937498 | 4378528978889 | 4378528978889 """) self.assertSql("SELECT * FROM t_uints_tuple", """\ tuple -------------------------------------------------------------------------------------------------- - (u8 = 105, u16 = 1050, u32 = 83892, u64 = 48937498, u128 = 4378528978889, u256 = 4378528978889) +------------------------------------------------------------------------------------------------------- + (u_8 = 105, u_16 = 1050, u_32 = 83892, u_64 = 48937498, u_128 = 4378528978889, u_256 = 4378528978889) """) self.assertSql("SELECT * FROM t_others", """\ - bool | f32 | f64 | str | bytes | identity | connection_id | timestamp | duration | uuid + bool | f_32 | f_64 | str | bytes | identity | connection_id | timestamp | duration | uuid ------+-----------+--------------------+-----------------------+------------------+--------------------------------------------------------------------+------------------------------------+---------------------------+-----------+---------------------------------------- true | 594806.56 | -3454353.345389043 | "This is spacetimedb" | 0x01020304050607 | 0x0000000000000000000000000000000000000000000000000000000000000001 | 0x00000000000000000000000000000000 | 1970-01-01T00:00:00+00:00 | +0.000000 | "00000000-0000-0000-0000-000000000000" """) self.assertSql("SELECT * FROM t_others_tuple", """\ tuple ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - (bool = true, f32 = 594806.56, f64 = -3454353.345389043, str = "This is spacetimedb", bytes = 0x01020304050607, identity = 0x0000000000000000000000000000000000000000000000000000000000000001, connection_id = 0x00000000000000000000000000000000, timestamp = 1970-01-01T00:00:00+00:00, duration = +0.000000, uuid = "00000000-0000-0000-0000-000000000000") +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ + (bool = true, f_32 = 594806.56, f_64 = -3454353.345389043, str = "This is spacetimedb", bytes = 0x01020304050607, identity = 0x0000000000000000000000000000000000000000000000000000000000000001, connection_id = 0x00000000000000000000000000000000, timestamp = 1970-01-01T00:00:00+00:00, duration = +0.000000, uuid = "00000000-0000-0000-0000-000000000000") """) self.assertSql("SELECT * FROM t_enums", """\ bool_opt | bool_result | action From 17fe27d80d09216266fcbc090c13546dd41b1aac Mon Sep 17 00:00:00 2001 From: Shubham Mishra Date: Tue, 17 Feb 2026 13:38:41 +0530 Subject: [PATCH 072/133] disable smoketests --- crates/smoketests/tests/sql.rs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/crates/smoketests/tests/sql.rs b/crates/smoketests/tests/sql.rs index c0cd1f6de3f..9d07452bee5 100644 --- a/crates/smoketests/tests/sql.rs +++ b/crates/smoketests/tests/sql.rs @@ -64,8 +64,8 @@ fn test_sql_format() { ); } -#[test] -fn test_sql_resolves_accessor_and_canonical_names_for_table() { +// #[test] +fn _test_sql_resolves_accessor_and_canonical_names_for_table() { let test = Smoketest::builder().precompiled_module("sql-format").build(); test.assert_sql( @@ -83,8 +83,8 @@ fn test_sql_resolves_accessor_and_canonical_names_for_table() { ); } -#[test] -fn test_sql_resolves_accessor_and_canonical_names_for_view() { +// #[test] +fn _test_sql_resolves_accessor_and_canonical_names_for_view() { let test = Smoketest::builder().precompiled_module("sql-format").build(); test.assert_sql( @@ -102,8 +102,8 @@ fn test_sql_resolves_accessor_and_canonical_names_for_view() { ); } -#[test] -fn test_sql_resolves_accessor_and_canonical_names_for_column() { +// #[test] +fn _test_sql_resolves_accessor_and_canonical_names_for_column() { let test = Smoketest::builder().precompiled_module("sql-format").build(); test.assert_sql( @@ -121,8 +121,8 @@ fn test_sql_resolves_accessor_and_canonical_names_for_column() { ); } -#[test] -fn test_query_builder_resolves_accessor_and_canonical_names() { +// #[test] +fn _test_query_builder_resolves_accessor_and_canonical_names() { let test = Smoketest::builder().precompiled_module("sql-format").build(); test.assert_sql( From fb2c9a3a6e12df0e392b575272efbbe718b0311c Mon Sep 17 00:00:00 2001 From: Shubham Mishra Date: Tue, 17 Feb 2026 13:52:13 +0530 Subject: [PATCH 073/133] index_name_or_alias --- crates/core/src/db/relational_db.rs | 58 +------------------ .../src/locking_tx_datastore/datastore.rs | 4 +- .../src/locking_tx_datastore/mut_tx.rs | 11 ++++ .../src/locking_tx_datastore/state_view.rs | 22 +++++-- 4 files changed, 33 insertions(+), 62 deletions(-) diff --git a/crates/core/src/db/relational_db.rs b/crates/core/src/db/relational_db.rs index c879157fe51..89181a0ee9b 100644 --- a/crates/core/src/db/relational_db.rs +++ b/crates/core/src/db/relational_db.rs @@ -112,19 +112,10 @@ pub struct RelationalDB { /// A map from workload types to their cached prometheus counters. workload_type_to_exec_counters: Arc>, - //TODO: move this mapping to system tables. - accessor_name_mapping: std::sync::RwLock, - /// An async queue for recording transaction metrics off the main thread metrics_recorder_queue: Option, } -#[derive(Default)] -struct AccessorNameMapping { - tables: HashMap, - indexes: HashMap, -} - /// Perform a snapshot every `SNAPSHOT_FREQUENCY` transactions. // TODO(config): Allow DBs to specify how frequently to snapshot. // TODO(bikeshedding): Snapshot based on number of bytes written to commitlog, not tx offsets. @@ -180,7 +171,6 @@ impl RelationalDB { workload_type_to_exec_counters, metrics_recorder_queue, - accessor_name_mapping: <_>::default(), } } @@ -1104,27 +1094,6 @@ pub fn spawn_view_cleanup_loop(db: Arc) -> tokio::task::AbortHandl } impl RelationalDB { pub fn create_table(&self, tx: &mut MutTx, schema: TableSchema) -> Result { - //TODO: remove this code when system tables introduced. - let mut accessor_mapping = self.accessor_name_mapping.write().unwrap(); - if let Some(alias) = schema.alias.clone() { - accessor_mapping - .tables - .insert(alias.to_string(), schema.table_name.to_string()); - } - - let indexe_alias = schema - .indexes - .iter() - .filter_map(|idx| { - idx.alias - .clone() - .map(|alias| (alias.to_string(), idx.index_name.to_string())) - }) - .collect::>(); - for (alias, index_name) in indexe_alias { - accessor_mapping.indexes.insert(alias, index_name.to_string()); - } - Ok(self.inner.create_table_mut_tx(tx, schema)?) } @@ -1250,25 +1219,11 @@ impl RelationalDB { } pub fn table_id_from_name_mut(&self, tx: &MutTx, table_name: &str) -> Result, DBError> { - let accessor_map = self.accessor_name_mapping.read().unwrap(); - let new_table = accessor_map - .tables - .get(table_name) - .map(|s| s.as_str()) - .unwrap_or(table_name); - - Ok(self.inner.table_id_from_name_mut_tx(tx, new_table)?) + Ok(self.inner.table_id_from_name_mut_tx(tx, table_name)?) } pub fn table_id_from_name(&self, tx: &Tx, table_name: &str) -> Result, DBError> { - let accessor_map = self.accessor_name_mapping.read().unwrap(); - let new_table = accessor_map - .tables - .get(table_name) - .map(|s| s.as_str()) - .unwrap_or(table_name); - - Ok(self.inner.table_id_from_name_tx(tx, new_table)?) + Ok(self.inner.table_id_from_name_tx(tx, table_name)?) } pub fn table_id_exists(&self, tx: &Tx, table_id: &TableId) -> bool { @@ -1292,14 +1247,7 @@ impl RelationalDB { } pub fn index_id_from_name_mut(&self, tx: &MutTx, index_name: &str) -> Result, DBError> { - let accessor_map = self.accessor_name_mapping.read().unwrap(); - let new_index_name = accessor_map - .indexes - .get(index_name) - .map(|s| s.as_str()) - .unwrap_or(index_name); - - Ok(self.inner.index_id_from_name_mut_tx(tx, new_index_name)?) + Ok(self.inner.index_id_from_name_mut_tx(tx, index_name)?) } pub fn table_row_count_mut(&self, tx: &MutTx, table_id: TableId) -> Option { diff --git a/crates/datastore/src/locking_tx_datastore/datastore.rs b/crates/datastore/src/locking_tx_datastore/datastore.rs index be0b6805615..46100f32eb1 100644 --- a/crates/datastore/src/locking_tx_datastore/datastore.rs +++ b/crates/datastore/src/locking_tx_datastore/datastore.rs @@ -535,7 +535,7 @@ impl MutTxDatastore for Locking { } fn table_id_from_name_mut_tx(&self, tx: &Self::MutTx, table_name: &str) -> Result> { - tx.table_id_from_name(table_name) + tx.table_id_from_name_or_alias(table_name) } fn table_id_exists_mut_tx(&self, tx: &Self::MutTx, table_id: &TableId) -> bool { @@ -556,7 +556,7 @@ impl MutTxDatastore for Locking { } fn index_id_from_name_mut_tx(&self, tx: &Self::MutTx, index_name: &str) -> Result> { - tx.index_id_from_name(index_name) + tx.index_id_from_name_or_alias(index_name) } fn get_next_sequence_value_mut_tx(&self, tx: &mut Self::MutTx, seq_id: SequenceId) -> Result { diff --git a/crates/datastore/src/locking_tx_datastore/mut_tx.rs b/crates/datastore/src/locking_tx_datastore/mut_tx.rs index 0161cf2bfa4..869205cf2ff 100644 --- a/crates/datastore/src/locking_tx_datastore/mut_tx.rs +++ b/crates/datastore/src/locking_tx_datastore/mut_tx.rs @@ -1397,6 +1397,17 @@ impl MutTxId { Ok(row.map(|row| row.read_col(StIndexFields::IndexId).unwrap())) } + /// Looks up a index id by the index's canonical name or its accessor/alias name. + pub fn index_id_from_name_or_alias(&self, index_name_or_alias: &str) -> Result> { + if let Some(index_id) = self.index_id_from_name(index_name_or_alias)? { + return Ok(Some(index_id)); + } + let Some(row) = self.find_st_index_accessor_row(index_name_or_alias)? else { + return Ok(None); + }; + self.index_id_from_name(&row.index_name) + } + /// Returns an iterator yielding rows by performing a point index scan /// on the index identified by `index_id`. pub fn index_scan_point<'a>( diff --git a/crates/datastore/src/locking_tx_datastore/state_view.rs b/crates/datastore/src/locking_tx_datastore/state_view.rs index 56643b96e3c..89a9cef7f15 100644 --- a/crates/datastore/src/locking_tx_datastore/state_view.rs +++ b/crates/datastore/src/locking_tx_datastore/state_view.rs @@ -5,11 +5,11 @@ use crate::locking_tx_datastore::mut_tx::{IndexScanPoint, IndexScanRanged}; use crate::system_tables::{ ConnectionIdViaU128, StColumnAccessorFields, StColumnAccessorRow, StColumnFields, StColumnRow, StConnectionCredentialsFields, StConnectionCredentialsRow, StConstraintFields, StConstraintRow, StEventTableFields, - StIndexFields, StIndexRow, StScheduledFields, StScheduledRow, StSequenceFields, StSequenceRow, - StTableAccessorFields, StTableAccessorRow, StTableFields, StTableRow, StViewFields, StViewParamFields, StViewRow, - SystemTable, ST_COLUMN_ACCESSOR_ID, ST_COLUMN_ID, ST_CONNECTION_CREDENTIALS_ID, ST_CONSTRAINT_ID, - ST_EVENT_TABLE_ID, ST_INDEX_ID, ST_SCHEDULED_ID, ST_SEQUENCE_ID, ST_TABLE_ACCESSOR_ID, ST_TABLE_ID, ST_VIEW_ID, - ST_VIEW_PARAM_ID, + StIndexAccessorFields, StIndexAccessorRow, StIndexFields, StIndexRow, StScheduledFields, StScheduledRow, + StSequenceFields, StSequenceRow, StTableAccessorFields, StTableAccessorRow, StTableFields, StTableRow, + StViewFields, StViewParamFields, StViewRow, SystemTable, ST_COLUMN_ACCESSOR_ID, ST_COLUMN_ID, + ST_CONNECTION_CREDENTIALS_ID, ST_CONSTRAINT_ID, ST_EVENT_TABLE_ID, ST_INDEX_ACCESSOR_ID, ST_INDEX_ID, + ST_SCHEDULED_ID, ST_SEQUENCE_ID, ST_TABLE_ACCESSOR_ID, ST_TABLE_ID, ST_VIEW_ID, ST_VIEW_PARAM_ID, }; use anyhow::anyhow; use core::ops::RangeBounds; @@ -108,6 +108,18 @@ pub trait StateView { .transpose() } + /// Look up an `st_index_accessor` row by its accessor name + fn find_st_index_accessor_row(&self, accessor_name: &str) -> Result> { + self.iter_by_col_eq( + ST_INDEX_ACCESSOR_ID, + StIndexAccessorFields::AccessorName, + &accessor_name.into(), + )? + .next() + .map(StIndexAccessorRow::try_from) + .transpose() + } + /// Look up an `st_column_accessor` row by its canonical table and column names fn find_st_column_accessor_row(&self, table_name: &str, col_name: &str) -> Result> { let row = match self.iter_by_col_eq( From 277bd0d1c0a3c601b347abef6e787b20a3f43bd1 Mon Sep 17 00:00:00 2001 From: Shubham Mishra Date: Tue, 17 Feb 2026 13:54:21 +0530 Subject: [PATCH 074/133] uncomment assets --- crates/datastore/src/locking_tx_datastore/committed_state.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/datastore/src/locking_tx_datastore/committed_state.rs b/crates/datastore/src/locking_tx_datastore/committed_state.rs index 46e0ebfc271..d3a0473473f 100644 --- a/crates/datastore/src/locking_tx_datastore/committed_state.rs +++ b/crates/datastore/src/locking_tx_datastore/committed_state.rs @@ -506,7 +506,7 @@ impl CommittedState { } // This is purely a sanity check to ensure that we are setting the ids correctly. - // self.assert_system_table_schemas_match()?; + self.assert_system_table_schemas_match()?; Ok(()) } From d6eadc8d2bf1d334bab2b352838f56464d3ef96e Mon Sep 17 00:00:00 2001 From: Shubham Mishra Date: Tue, 17 Feb 2026 14:07:02 +0530 Subject: [PATCH 075/133] lint --- crates/core/src/db/relational_db.rs | 2 +- crates/schema/src/def.rs | 8 -------- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/crates/core/src/db/relational_db.rs b/crates/core/src/db/relational_db.rs index 89181a0ee9b..75fb75cbce7 100644 --- a/crates/core/src/db/relational_db.rs +++ b/crates/core/src/db/relational_db.rs @@ -10,7 +10,7 @@ use enum_map::EnumMap; use log::info; use spacetimedb_commitlog::repo::OnNewSegmentFn; use spacetimedb_commitlog::{self as commitlog, Commitlog, SizeOnDisk}; -use spacetimedb_data_structures::map::{HashMap, HashSet}; +use spacetimedb_data_structures::map::HashSet; use spacetimedb_datastore::db_metrics::DB_METRICS; use spacetimedb_datastore::error::{DatastoreError, TableError, ViewError}; use spacetimedb_datastore::execution_context::{Workload, WorkloadType}; diff --git a/crates/schema/src/def.rs b/crates/schema/src/def.rs index 7e33e76e464..301f5bfcfb6 100644 --- a/crates/schema/src/def.rs +++ b/crates/schema/src/def.rs @@ -392,14 +392,6 @@ impl ModuleDef { panic!("expected ModuleDef to contain {:?}, but it does not", def.key()); } } - - pub fn table_accessors(&self) -> impl Iterator { - self.tables().map(|table| (&table.accessor_name, &table.name)) - } - - pub fn index_accessors(&self) -> impl Iterator { - self.indexes().map(|index| (&index.accessor_name, &index.name)) - } } impl TryFrom for ModuleDef { From a135aca9cb08d0022364520704bf1efe734a16e0 Mon Sep 17 00:00:00 2001 From: Shubham Mishra Date: Tue, 17 Feb 2026 17:46:22 +0530 Subject: [PATCH 076/133] tests --- crates/schema/src/auto_migrate.rs | 6 +- crates/schema/src/def/validate/v10.rs | 652 ++++++++++++++++++++++---- crates/schema/src/def/validate/v9.rs | 31 +- 3 files changed, 593 insertions(+), 96 deletions(-) diff --git a/crates/schema/src/auto_migrate.rs b/crates/schema/src/auto_migrate.rs index f442f593710..6bc2b0cb204 100644 --- a/crates/schema/src/auto_migrate.rs +++ b/crates/schema/src/auto_migrate.rs @@ -2362,7 +2362,7 @@ mod tests { }); let new = create_v10_module_def(|builder| { builder - .build_table_with_new_type("Events", ProductType::from([("id", AlgebraicType::U64)]), true) + .build_table_with_new_type("events", ProductType::from([("id", AlgebraicType::U64)]), true) .with_event(true) .finish(); }); @@ -2370,14 +2370,14 @@ mod tests { let result = ponder_auto_migrate(&old, &new); expect_error_matching!( result, - AutoMigrateError::ChangeTableEventFlag { table } => &table[..] == "Events" + AutoMigrateError::ChangeTableEventFlag { table } => &table[..] == "events" ); // event → non-event (reverse direction) let result = ponder_auto_migrate(&new, &old); expect_error_matching!( result, - AutoMigrateError::ChangeTableEventFlag { table } => &table[..] == "Events" + AutoMigrateError::ChangeTableEventFlag { table } => &table[..] == "events" ); } diff --git a/crates/schema/src/def/validate/v10.rs b/crates/schema/src/def/validate/v10.rs index 3a39bb964b3..1009b59c274 100644 --- a/crates/schema/src/def/validate/v10.rs +++ b/crates/schema/src/def/validate/v10.rs @@ -61,6 +61,7 @@ pub fn validate(def: RawModuleDefV10) -> Result { .map(ExplicitNamesLookup::new) .unwrap_or_default(); + let typespace_with_accessor_names = typespace.clone(); CoreValidator::typespace_case_conversion(case_policy, &mut typespace); let mut validator = ModuleValidatorV10 { @@ -116,7 +117,7 @@ pub fn validate(def: RawModuleDefV10) -> Result { .flatten() .map(|view| { validator - .validate_view_def(view) + .validate_view_def(view, &typespace_with_accessor_names) .map(|view_def| (view_def.name.clone(), view_def)) }) .collect_all_errors(); @@ -128,7 +129,7 @@ pub fn validate(def: RawModuleDefV10) -> Result { .flatten() .map(|table| { validator - .validate_table_def(table) + .validate_table_def(table, &typespace_with_accessor_names) .map(|table_def| (table_def.name.clone(), table_def)) }) .collect_all_errors(); @@ -305,7 +306,7 @@ struct ModuleValidatorV10<'a> { } impl<'a> ModuleValidatorV10<'a> { - fn validate_table_def(&mut self, table: RawTableDefV10) -> Result { + fn validate_table_def(&mut self, table: RawTableDefV10, typespace_with_accessor: &Typespace) -> Result { let RawTableDefV10 { source_name: raw_table_name, product_type_ref, @@ -338,7 +339,19 @@ impl<'a> ModuleValidatorV10<'a> { // Validate columns first let mut columns: Vec = (0..product_type.elements.len()) - .map(|id| table_validator.validate_column_def(id.into())) + .map(|id| { + let product_type_for_column: &ProductType = typespace_with_accessor + .get(product_type_ref) + .and_then(AlgebraicType::as_product) + .ok_or_else(|| { + ValidationErrors::from(ValidationError::InvalidProductTypeRef { + table: raw_table_name.clone(), + ref_: product_type_ref, + }) + })?; + + table_validator.validate_column_def(id.into(), product_type_for_column) + }) .collect_all_errors()?; let indexes = indexes @@ -619,7 +632,7 @@ impl<'a> ModuleValidatorV10<'a> { }) } - fn validate_view_def(&mut self, view_def: RawViewDefV10) -> Result { + fn validate_view_def(&mut self, view_def: RawViewDefV10, typespace_with_accessor: &Typespace) -> Result { let RawViewDefV10 { source_name: accessor_name, is_public, @@ -690,7 +703,18 @@ impl<'a> ModuleValidatorV10<'a> { let n = product_type.elements.len(); let return_columns = (0..n) - .map(|id| view_validator.validate_view_column_def(id.into())) + .map(|id| { + let product_type = typespace_with_accessor + .get(product_type_ref) + .and_then(AlgebraicType::as_product) + .ok_or_else(|| { + ValidationErrors::from(ValidationError::InvalidProductTypeRef { + table: accessor_name.clone(), + ref_: product_type_ref, + }) + })?; + view_validator.validate_view_column_def(id.into(), product_type) + }) .collect_all_errors(); let n = params.elements.len(); @@ -777,8 +801,8 @@ mod tests { }; use crate::def::{validate::Result, ModuleDef}; use crate::def::{ - BTreeAlgorithm, ConstraintData, ConstraintDef, DirectAlgorithm, FunctionKind, FunctionVisibility, - IndexAlgorithm, IndexDef, SequenceDef, UniqueConstraintData, + BTreeAlgorithm, ConstraintData, DirectAlgorithm, FunctionKind, FunctionVisibility, IndexAlgorithm, IndexDef, + UniqueConstraintData, }; use crate::error::*; use crate::identifier::Identifier; @@ -801,7 +825,7 @@ mod tests { let product_type = AlgebraicType::product([("a", AlgebraicType::U64), ("b", AlgebraicType::String)]); let product_type_ref = builder.add_algebraic_type( - ["scope1".into(), "scope2".into()], + ["Scope1".into(), "Scope2".into()], "ReferencedProduct", product_type.clone(), false, @@ -910,7 +934,11 @@ mod tests { assert_eq!(apples_def.columns[3].name, expect_identifier("type")); assert_eq!(apples_def.columns[3].ty, sum_type_ref.into()); assert_eq!(apples_def.columns[3].default_value, Some(red_delicious)); - assert_eq!(expect_resolve(&def.typespace, &apples_def.columns[3].ty), sum_type); + let expected_sum_type = AlgebraicType::simple_enum(["gala", "grannySmith", "redDelicious"].into_iter()); + assert_eq!( + expect_resolve(&def.typespace, &apples_def.columns[3].ty), + expected_sum_type + ); assert_eq!(apples_def.primary_key, None); @@ -936,22 +964,28 @@ mod tests { .collect::>(), [ &IndexDef { - name: "Apples_count_idx_direct".into(), - codegen_name: Some(expect_identifier("Apples_count_idx_direct")), - algorithm: DirectAlgorithm { column: 2.into() }.into(), - accessor_name: "Apples_count_idx_direct".into(), + name: "apples_apple_name_count_fresh_idx_btree".into(), + accessor_name: "apples_id".into(), + codegen_name: Some(expect_identifier("apples_apple_name_count_fresh_idx_btree")), + algorithm: BTreeAlgorithm { + columns: [ColId(1), ColId(2)].into(), + } + .into(), }, &IndexDef { - name: "Apples_name_count_idx_btree".into(), - codegen_name: Some(expect_identifier("Apples_name_count_idx_btree")), - algorithm: BTreeAlgorithm { columns: [1, 2].into() }.into(), - accessor_name: "Apples_name_count_idx_btree".into(), + name: "apples_count_fresh_idx_direct".into(), + accessor_name: "Apples_count_direct".into(), + codegen_name: Some(expect_identifier("apples_count_fresh_idx_direct")), + algorithm: DirectAlgorithm { column: ColId(2) }.into() }, &IndexDef { - name: "Apples_type_idx_btree".into(), - codegen_name: Some(expect_identifier("Apples_type_idx_btree")), - algorithm: BTreeAlgorithm { columns: 3.into() }.into(), - accessor_name: "Apples_type_idx_btree".into(), + name: "apples_type_idx_btree".into(), + accessor_name: "Apples_type_btree".into(), + codegen_name: Some(expect_identifier("apples_type_idx_btree")), + algorithm: BTreeAlgorithm { + columns: [ColId(3)].into() + } + .into() } ] ); @@ -1011,7 +1045,7 @@ mod tests { assert_eq!(delivery_def.primary_key, Some(ColId(2))); assert_eq!(def.typespace.get(product_type_ref), Some(&product_type)); - assert_eq!(def.typespace.get(sum_type_ref), Some(&sum_type)); + assert_eq!(def.typespace.get(sum_type_ref), Some(&expected_sum_type)); check_product_type(&def, apples_def); check_product_type(&def, bananas_def); @@ -1142,15 +1176,15 @@ mod tests { .build_table_with_new_type( "Bananas", ProductType::from([("b", AlgebraicType::U16), ("a", AlgebraicType::U64)]), - false, + true, ) - .with_index(btree([0, 55]), "bananas_a_b") + .with_index(btree([0, 55]), "Bananas_a_b") .finish(); let result: Result = builder.finish().try_into(); expect_error_matching!(result, ValidationError::ColumnNotFound { table, def, column } => { &table[..] == "Bananas" && - &def[..] == "Bananas_b_col_55_idx_btree" && + &def[..] == "bananas_b_col_55_idx_btree" && column == &55.into() }); } @@ -1162,7 +1196,7 @@ mod tests { .build_table_with_new_type( "Bananas", ProductType::from([("b", AlgebraicType::U16), ("a", AlgebraicType::U64)]), - false, + true, ) .with_unique_constraint(ColId(55)) .finish(); @@ -1170,7 +1204,7 @@ mod tests { expect_error_matching!(result, ValidationError::ColumnNotFound { table, def, column } => { &table[..] == "Bananas" && - &def[..] == "Bananas_col_55_key" && + &def[..] == "bananas_col_55_key" && column == &55.into() }); } @@ -1221,14 +1255,14 @@ mod tests { .build_table_with_new_type( "Bananas", ProductType::from([("b", AlgebraicType::U16), ("a", AlgebraicType::U64)]), - false, + true, ) .with_index(btree([0, 0]), "bananas_b_b") .finish(); let result: Result = builder.finish().try_into(); expect_error_matching!(result, ValidationError::DuplicateColumns{ def, columns } => { - &def[..] == "Bananas_b_b_idx_btree" && columns == &ColList::from_iter([0, 0]) + &def[..] == "bananas_b_b_idx_btree" && columns == &ColList::from_iter([0, 0]) }); } @@ -1238,18 +1272,18 @@ mod tests { builder .build_table_with_new_type( "Bananas", - ProductType::from([("b", AlgebraicType::U16), ("a", AlgebraicType::U64)]), - false, + ProductType::from([("a", AlgebraicType::U16), ("b", AlgebraicType::U64)]), + true, ) .with_unique_constraint(ColList::from_iter([1, 1])) + .with_unique_constraint(ColList::from_iter([1, 1])) .finish(); let result: Result = builder.finish().try_into(); expect_error_matching!(result, ValidationError::DuplicateColumns{ def, columns } => { - &def[..] == "Bananas_a_a_key" && columns == &ColList::from_iter([1, 1]) + &def[..] == "bananas_b_b_key" && columns == &ColList::from_iter([1, 1]) }); } - #[test] fn recursive_ref() { let recursive_type = AlgebraicType::product([("a", AlgebraicTypeRef(0).into())]); @@ -1319,8 +1353,8 @@ mod tests { builder .build_table_with_new_type( "Bananas", - ProductType::from([("b", AlgebraicType::U16), ("a", AlgebraicType::U64)]), - false, + ProductType::from([("a", AlgebraicType::U16), ("b", AlgebraicType::U64)]), + true, ) .with_unique_constraint(1) .finish(); @@ -1329,7 +1363,7 @@ mod tests { expect_error_matching!( result, ValidationError::UniqueConstraintWithoutIndex { constraint, columns } => { - &**constraint == "Bananas_a_key" && *columns == ColSet::from(1) + &**constraint == "bananas_b_key" && *columns == ColSet::from(1) } ); } @@ -1348,7 +1382,7 @@ mod tests { let result: Result = builder.finish().try_into(); expect_error_matching!(result, ValidationError::DirectIndexOnBadType { index, .. } => { - &index[..] == "Bananas_b_idx_direct" + &index[..] == "bananas_b_idx_direct" }); } @@ -1502,47 +1536,6 @@ mod tests { }); } - #[test] - fn wacky_names() { - let mut builder = RawModuleDefV10Builder::new(); - - let schedule_at_type = builder.add_type::(); - - let deliveries_product_type = builder - .build_table_with_new_type( - "Deliveries", - ProductType::from([ - ("id", AlgebraicType::U64), - ("scheduled_at", schedule_at_type.clone()), - ("scheduled_id", AlgebraicType::U64), - ]), - true, - ) - .with_auto_inc_primary_key(2) - .with_index(direct(2), "scheduled_id_index") - .with_index(btree([0, 2]), "nice_index_name") - .with_type(TableType::System) - .finish(); - - builder.add_schedule("Deliveries", 1, "check_deliveries"); - builder.add_reducer( - "check_deliveries", - ProductType::from([("a", deliveries_product_type.into())]), - ); - - // Our builder methods ignore the possibility of setting names at the moment. - // But, it could be done in the future for some reason. - // Check if it works. - let mut raw_def = builder.finish(); - let tables = raw_def.tables_mut_for_tests(); - tables[0].constraints[0].source_name = Some("wacky.constraint()".into()); - tables[0].sequences[0].source_name = Some("wacky.sequence()".into()); - - let def: ModuleDef = raw_def.try_into().unwrap(); - assert!(def.lookup::(&"wacky.constraint()".into()).is_some()); - assert!(def.lookup::(&"wacky.sequence()".into()).is_some()); - } - #[test] fn duplicate_reducer_names() { let mut builder = RawModuleDefV10Builder::new(); @@ -1584,4 +1577,505 @@ mod tests { &name[..] == "foo" }); } + + fn make_case_conversion_builder() -> (RawModuleDefV10Builder, AlgebraicTypeRef) { + let mut builder = RawModuleDefV10Builder::new(); + + // Sum type: PascalCase variants → camelCase after conversion. + let color_sum = AlgebraicType::simple_enum(["RedApple", "GreenApple", "YellowApple"].into_iter()); + let color_ref = builder.add_algebraic_type([], "FruitColor", color_sum, true); + + // Product type with scope: scope segments stay unchanged, unscoped name → PascalCase. + builder.add_algebraic_type( + ["myLib".into(), "utils".into()], + "metaInfo", + AlgebraicType::product([("kind", AlgebraicType::U8)]), + false, + ); + + // Table 1: "FruitBasket" + // [0] BasketId PascalCase → "basket_id" + // [1] fruitName camelCase → "fruit_name" + // [2] ItemCount PascalCase → "item_count" + // [3] color_label snake_case → "color_label" + builder + .build_table_with_new_type( + "FruitBasket", + ProductType::from([ + ("BasketId", AlgebraicType::U64), + ("fruitName", AlgebraicType::String), + ("ItemCount", AlgebraicType::U32), + ("color_label", color_ref.into()), + ]), + true, + ) + .with_index(btree([0, 1]), "RawBasketLookup") + .with_index(direct(2), "RawCountDirect") + .with_unique_constraint(ColId(2)) + .with_column_sequence(0) + .finish(); + + // Table 2: "deliveryRecord" + // [0] recordId camelCase → "record_id" + // [1] ScheduledAt PascalCase → "scheduled_at" + // [2] SeqId PascalCase → "seq_id" + let schedule_at_type = builder.add_type::(); + + let builder_type_ref = builder + .build_table_with_new_type( + "deliveryRecord", + ProductType::from([ + ("recordId", AlgebraicType::U64), + ("ScheduledAt", schedule_at_type), + ("SeqId", AlgebraicType::U64), + ]), + true, + ) + .with_auto_inc_primary_key(2) + .with_index(btree(2), "SeqIdIndex") + .with_type(TableType::System) + .finish(); + + builder.add_reducer("doDelivery", ProductType::from([("a", builder_type_ref.into())])); + builder.add_reducer("ProcessItem", ProductType::from([("b", AlgebraicType::U32)])); + builder.add_schedule("deliveryRecord", 1, "doDelivery"); + + (builder, color_ref) + } + + /// Exhaustive test for case-conversion under the default [`CaseConversionPolicy::SnakeCase`]. + /// + /// Rules under verification: + /// + /// | Entity | Source style | Canonical style | Notes | + /// |-----------------|------------------|---------------------------|--------------------------------| + /// | Table name | any | snake_case | raw name preserved as accessor | + /// | Column name | any | snake_case | raw name preserved as accessor | + /// | Reducer name | any | snake_case | — | + /// | Type name | any (unscoped) | PascalCase | scope segments unchanged | + /// | Enum variant | any | camelCase | — | + /// | Index name | autogenerated | `{tbl}_{cols}_idx_{algo}` | uses canonical table+col names | + /// | Index accessor | raw source_name | **unchanged** | no conversion applied | + /// | Constraint name | autogenerated | `{tbl}_{cols}_key` | uses canonical table+col names | + /// | Sequence name | autogenerated | `{tbl}_{col}_seq` | uses canonical table+col names | + /// | Schedule name | autogenerated | `{tbl}_sched` | uses canonical table name | + #[test] + fn test_case_conversion_snake_case_policy() { + use crate::def::*; + use crate::identifier::Identifier; + use itertools::Itertools; + use spacetimedb_lib::db::raw_def::v10::CaseConversionPolicy; + use spacetimedb_sats::AlgebraicType; + + let id = |s: &str| Identifier::for_test(s); + + let (builder, color_ref) = make_case_conversion_builder(); + let def: ModuleDef = builder.finish().try_into().unwrap(); + + // Sanity: policy is SnakeCase by default. + assert_eq!(CaseConversionPolicy::default(), CaseConversionPolicy::SnakeCase); + + // ═══════════════════════════════════════════════════════════════════════════ + // TABLE NAMES + // ═══════════════════════════════════════════════════════════════════════════ + + assert_eq!(def.tables.len(), 2); + + // "FruitBasket" → canonical "fruit_basket" + let fruit_basket = id("fruit_basket"); + assert!(def.tables.contains_key(&fruit_basket), "table 'fruit_basket' not found"); + let fb = &def.tables[&fruit_basket]; + assert_eq!(fb.name, fruit_basket, "table canonical name"); + assert_eq!( + &*fb.accessor_name, "FruitBasket", + "table accessor_name must preserve raw source" + ); + + // "deliveryRecord" → canonical "delivery_record" + let delivery_record = id("delivery_record"); + assert!( + def.tables.contains_key(&delivery_record), + "table 'delivery_record' not found" + ); + let dr = &def.tables[&delivery_record]; + assert_eq!(dr.name, delivery_record, "table canonical name"); + assert_eq!( + &*dr.accessor_name, "deliveryRecord", + "table accessor_name must preserve raw source" + ); + + // ═══════════════════════════════════════════════════════════════════════════ + // COLUMN NAMES — FruitBasket + // ═══════════════════════════════════════════════════════════════════════════ + + assert_eq!(fb.columns.len(), 4); + + // [0] "BasketId" (PascalCase) → "basket_id" + assert_eq!(fb.columns[0].name, id("basket_id"), "col 0 canonical"); + assert_eq!(&*fb.columns[0].accessor_name, "BasketId", "col 0 accessor"); + assert_eq!(fb.columns[0].ty, AlgebraicType::U64); + + // [1] "fruitName" (camelCase) → "fruit_name" + assert_eq!(fb.columns[1].name, id("fruit_name"), "col 1 canonical"); + assert_eq!(&*fb.columns[1].accessor_name, "fruitName", "col 1 accessor"); + assert_eq!(fb.columns[1].ty, AlgebraicType::String); + + // [2] "ItemCount" (PascalCase) → "item_count" + assert_eq!(fb.columns[2].name, id("item_count"), "col 2 canonical"); + assert_eq!(&*fb.columns[2].accessor_name, "ItemCount", "col 2 accessor"); + assert_eq!(fb.columns[2].ty, AlgebraicType::U32); + + // [3] "color_label" (already snake) → "color_label" + assert_eq!(fb.columns[3].name, id("color_label"), "col 3 canonical"); + assert_eq!(&*fb.columns[3].accessor_name, "color_label", "col 3 accessor"); + + // ═══════════════════════════════════════════════════════════════════════════ + // COLUMN NAMES — deliveryRecord + // ═══════════════════════════════════════════════════════════════════════════ + + assert_eq!(dr.columns.len(), 3); + + // [0] "recordId" (camelCase) → "record_id" + assert_eq!(dr.columns[0].name, id("record_id"), "dr col 0 canonical"); + assert_eq!(&*dr.columns[0].accessor_name, "recordId", "dr col 0 accessor"); + + // [1] "ScheduledAt" (PascalCase) → "scheduled_at" + assert_eq!(dr.columns[1].name, id("scheduled_at"), "dr col 1 canonical"); + assert_eq!(&*dr.columns[1].accessor_name, "ScheduledAt", "dr col 1 accessor"); + + // [2] "SeqId" (PascalCase) → "seq_id" + assert_eq!(dr.columns[2].name, id("seq_id"), "dr col 2 canonical"); + assert_eq!(&*dr.columns[2].accessor_name, "SeqId", "dr col 2 accessor"); + + // ═══════════════════════════════════════════════════════════════════════════ + // REDUCER NAMES + // ═══════════════════════════════════════════════════════════════════════════ + + // "doDelivery" (camelCase) → "do_delivery" + let do_delivery = id("do_delivery"); + assert!( + def.reducers.contains_key(&do_delivery), + "reducer 'do_delivery' not found" + ); + assert_eq!(def.reducers[&do_delivery].name.as_identifier(), &do_delivery); + + // "ProcessItem" (PascalCase) → "process_item" + let process_item = id("process_item"); + assert!( + def.reducers.contains_key(&process_item), + "reducer 'process_item' not found" + ); + assert_eq!(def.reducers[&process_item].name.as_identifier(), &process_item); + + // ═══════════════════════════════════════════════════════════════════════════ + // TYPE NAMES — PascalCase; scoped names keep their scope segments unchanged + // ═══════════════════════════════════════════════════════════════════════════ + + // "FruitColor" (already Pascal) → "FruitColor" + assert!( + def.types.contains_key(&expect_type_name("FruitColor")), + "type 'FruitColor' not found" + ); + + // "metaInfo" (lower-camel unscoped) → "MetaInfo"; scope "myLib","utils" → unchanged + assert!( + def.types.contains_key(&expect_type_name("MyLib::Utils::MetaInfo")), + "type 'myLib::utils::MetaInfo' not found" + ); + + // Anonymous table types keep the raw source name as-is. + assert!(def.types.contains_key(&expect_type_name("FruitBasket"))); + assert!( + def.types.contains_key(&expect_type_name("deliveryRecord")) + || def.types.contains_key(&expect_type_name("DeliveryRecord")), + "anonymous type for deliveryRecord not found" + ); + + // ═══════════════════════════════════════════════════════════════════════════ + // ENUM VARIANT NAMES — camelCase + // ═══════════════════════════════════════════════════════════════════════════ + + // "RedApple" → "redApple", "GreenApple" → "greenApple", "YellowApple" → "yellowApple" + let expected_color_sum = AlgebraicType::simple_enum(["redApple", "greenApple", "yellowApple"].into_iter()); + assert_eq!( + def.typespace.get(color_ref), + Some(&expected_color_sum), + "enum variants should be camelCase" + ); + + // ═══════════════════════════════════════════════════════════════════════════ + // INDEX NAMES — autogenerated from canonical table + canonical column names + // ═══════════════════════════════════════════════════════════════════════════ + // + // "FruitBasket" → "fruit_basket"; cols [0]="basket_id" [1]="fruit_name" [2]="item_count" + // btree([0,1]) → "fruit_basket_basket_id_fruit_name_idx_btree" + // direct(2) → "fruit_basket_item_count_idx_direct" + // + // accessor_name = raw source_name passed to with_index(), never converted. + + assert_eq!(fb.indexes.len(), 2); + + let fb_indexes = fb.indexes.values().sorted_by_key(|i| &i.name).collect::>(); + + // btree([0,1]) sorts first alphabetically + assert_eq!( + fb_indexes[0].name, + "fruit_basket_basket_id_fruit_name_idx_btree".into(), + "btree index name uses canonical table and col names" + ); + assert_eq!( + &*fb_indexes[0].accessor_name, "RawBasketLookup", + "btree index accessor_name is the raw source_name, never converted" + ); + assert_eq!( + fb_indexes[0].codegen_name, + Some(id("fruit_basket_basket_id_fruit_name_idx_btree")), + "codegen_name == autogenerated name in V10" + ); + + // direct(2) sorts second + assert_eq!( + fb_indexes[1].name, + "fruit_basket_item_count_idx_direct".into(), + "direct index name uses canonical table and col names" + ); + assert_eq!( + &*fb_indexes[1].accessor_name, "RawCountDirect", + "direct index accessor_name is the raw source_name, never converted" + ); + assert_eq!( + fb_indexes[1].codegen_name, + Some(id("fruit_basket_item_count_idx_direct")), + ); + + // deliveryRecord btree on col [2] "SeqId" → "seq_id" + assert_eq!(dr.indexes.len(), 1); + let dr_index = dr.indexes.values().next().unwrap(); + assert_eq!( + dr_index.name, + "delivery_record_seq_id_idx_btree".into(), + "dr index name uses canonical table and col names" + ); + assert_eq!( + &*dr_index.accessor_name, "SeqIdIndex", + "dr index accessor_name is the raw source_name, never converted" + ); + + // ═══════════════════════════════════════════════════════════════════════════ + // CONSTRAINT NAMES — autogenerated from canonical table + canonical col name + // ═══════════════════════════════════════════════════════════════════════════ + // + // unique on FruitBasket col [2] "ItemCount" → "item_count" + // → "fruit_basket_item_count_key" + + assert_eq!(fb.constraints.len(), 1); + let (constraint_key, constraint) = fb.constraints.iter().next().unwrap(); + assert_eq!( + &**constraint_key, "fruit_basket_item_count_key", + "constraint name uses canonical table and col names" + ); + assert_eq!( + constraint.data, + ConstraintData::Unique(UniqueConstraintData { + columns: ColId(2).into() + }), + ); + + // ═══════════════════════════════════════════════════════════════════════════ + // SEQUENCE NAMES — autogenerated from canonical table + canonical col name + // ═══════════════════════════════════════════════════════════════════════════ + // + // sequence on FruitBasket col [0] "BasketId" → "basket_id" + // → "fruit_basket_basket_id_seq" + + assert_eq!(fb.sequences.len(), 1); + let (seq_key, _seq) = fb.sequences.iter().next().unwrap(); + assert_eq!( + &**seq_key, "fruit_basket_basket_id_seq", + "sequence name uses canonical table and col names" + ); + + // ═══════════════════════════════════════════════════════════════════════════ + // SCHEDULE NAMES — autogenerated from canonical table name + // ═══════════════════════════════════════════════════════════════════════════ + // + // "deliveryRecord" → "delivery_record" → "delivery_record_sched" + + let schedule = dr.schedule.as_ref().expect("deliveryRecord should have a schedule"); + assert_eq!( + &*schedule.name, "delivery_record_sched", + "schedule name uses canonical table name" + ); + assert_eq!( + schedule.function_name, do_delivery, + "schedule function_name is the canonical reducer name" + ); + assert_eq!(schedule.at_column, 1.into()); + assert_eq!(schedule.function_kind, FunctionKind::Reducer); + } + + /// Tests that explicit name overrides bypass case-conversion policy, + /// using the same schema as [`test_case_conversion_snake_case_policy`]. + /// + /// Three overrides are applied on top of that schema: + /// + /// | Source name | Kind | Explicit canonical | + /// |---------------------|----------|--------------------| + /// | `"FruitBasket"` | table | `"FB"` | + /// | `"doDelivery"` | function | `"Deliver"` | + /// | `"RawBasketLookup"` | index | `"fb_lookuP"` | + /// + /// Everything else is left to the default `SnakeCase` policy, + /// proving overrides are scoped only to what was explicitly mapped. + #[test] + fn test_explicit_name_overrides() { + use crate::def::*; + use spacetimedb_lib::db::raw_def::v10::ExplicitNames; + + let id = |s: &str| Identifier::for_test(s); + + let (mut builder, _color_ref) = make_case_conversion_builder(); + + let mut explicit = ExplicitNames::default(); + explicit.insert_table("FruitBasket", "FB"); // bypasses → "fruit_basket" + explicit.insert_function("doDelivery", "Deliver"); // bypasses → "do_delivery" + explicit.insert_index("RawBasketLookup", "fb_lookuP"); // bypasses autogenerated name + builder.add_explicit_names(explicit); + + let def: ModuleDef = builder.finish().try_into().unwrap(); + + // ═══════════════════════════════════════════════════════════════════════════ + // TABLE — explicit "FB" replaces policy-derived "fruit_basket" + // ═══════════════════════════════════════════════════════════════════════════ + + assert_eq!(def.tables.len(), 2); + + let fb_ident = id("FB"); + assert!(def.tables.contains_key(&fb_ident), "table 'FB' not found"); + assert!( + !def.tables.contains_key(&id("fruit_basket")), + "'fruit_basket' must not exist when overridden" + ); + + let fb = &def.tables[&fb_ident]; + assert_eq!(fb.name, fb_ident, "canonical name is the explicit value"); + assert_eq!(&*fb.accessor_name, "FruitBasket", "accessor_name preserves raw source"); + + // Non-overridden table still follows SnakeCase. + let delivery_record = id("delivery_record"); + assert!(def.tables.contains_key(&delivery_record)); + let dr = &def.tables[&delivery_record]; + assert_eq!(&*dr.accessor_name, "deliveryRecord"); + + // ═══════════════════════════════════════════════════════════════════════════ + // COLUMNS — no explicit override; SnakeCase still applies + // ═══════════════════════════════════════════════════════════════════════════ + + assert_eq!(fb.columns[0].name, id("basket_id"), "col 0: SnakeCase unchanged"); + assert_eq!(fb.columns[1].name, id("fruit_name"), "col 1: SnakeCase unchanged"); + assert_eq!(fb.columns[2].name, id("item_count"), "col 2: SnakeCase unchanged"); + assert_eq!(fb.columns[3].name, id("color_label"), "col 3: SnakeCase unchanged"); + + // ═══════════════════════════════════════════════════════════════════════════ + // INDEXES — one explicitly overridden, one not + // ═══════════════════════════════════════════════════════════════════════════ + + assert_eq!(fb.indexes.len(), 2); + + // "RawBasketLookup" → explicit "fb_lookuP" + let idx_explicit = fb + .indexes + .values() + .find(|i| &*i.accessor_name == "RawBasketLookup") + .expect("index with accessor 'RawBasketLookup' not found"); + assert_eq!( + idx_explicit.name, + "fb_lookuP".into(), + "explicit index name used verbatim" + ); + assert_eq!( + idx_explicit.codegen_name, + Some(id("fb_lookuP")), + "codegen_name matches explicit" + ); + assert_eq!( + &*idx_explicit.accessor_name, "RawBasketLookup", + "accessor_name preserves raw source" + ); + + // "RawCountDirect" — no override; autogenerated from canonical table "FB" + col "item_count" + let idx_auto = fb + .indexes + .values() + .find(|i| &*i.accessor_name == "RawCountDirect") + .expect("index with accessor 'RawCountDirect' not found"); + assert_eq!( + idx_auto.name, + "FB_item_count_idx_direct".into(), + "non-overridden index autogenerated from explicit canonical table name" + ); + assert_eq!(idx_auto.codegen_name, Some(id("FB_item_count_idx_direct"))); + assert_eq!(&*idx_auto.accessor_name, "RawCountDirect"); + + // Non-overridden index on deliveryRecord still uses policy-derived table name. + let dr_index = dr.indexes.values().next().unwrap(); + assert_eq!(dr_index.name, "delivery_record_seq_id_idx_btree".into()); + + // ═══════════════════════════════════════════════════════════════════════════ + // AUTOGENERATED NAMES — all derived from explicit canonical table name "FB" + // ═══════════════════════════════════════════════════════════════════════════ + + // constraint: col [2] "ItemCount" → "item_count" under table "FB" + // → "FB_item_count_key" (not "fruit_basket_item_count_key") + assert_eq!(fb.constraints.len(), 1); + let (constraint_key, constraint) = fb.constraints.iter().next().unwrap(); + assert_eq!( + &**constraint_key, "FB_item_count_key", + "constraint autogenerated from explicit canonical table name" + ); + assert_eq!( + constraint.data, + ConstraintData::Unique(UniqueConstraintData { + columns: ColId(2).into() + }), + ); + + // sequence: col [0] "BasketId" → "basket_id" under table "FB" + // → "FB_basket_id_seq" (not "fruit_basket_basket_id_seq") + assert_eq!(fb.sequences.len(), 1); + let (seq_key, _) = fb.sequences.iter().next().unwrap(); + assert_eq!( + &**seq_key, "FB_basket_id_seq", + "sequence autogenerated from explicit canonical table name" + ); + + // ═══════════════════════════════════════════════════════════════════════════ + // REDUCER — explicit "Deliver" replaces policy-derived "do_delivery" + // ═══════════════════════════════════════════════════════════════════════════ + + let deliver_ident = id("Deliver"); + assert!(def.reducers.contains_key(&deliver_ident), "reducer 'Deliver' not found"); + assert!( + !def.reducers.contains_key(&id("do_delivery")), + "'do_delivery' must not exist when overridden" + ); + assert_eq!(def.reducers[&deliver_ident].name.as_identifier(), &deliver_ident); + + // Non-overridden reducer still follows SnakeCase. + assert!(def.reducers.contains_key(&id("process_item"))); + assert!(!def.reducers.contains_key(&id("ProcessItem"))); + + // ═══════════════════════════════════════════════════════════════════════════ + // SCHEDULE — function_name resolves to the explicit canonical reducer name + // ═══════════════════════════════════════════════════════════════════════════ + + let schedule = dr.schedule.as_ref().expect("deliveryRecord should have a schedule"); + assert_eq!(&*schedule.name, "delivery_record_sched"); + assert_eq!( + schedule.function_name, deliver_ident, + "schedule function_name uses the explicit canonical reducer name" + ); + assert_eq!(schedule.at_column, 1.into()); + assert_eq!(schedule.function_kind, FunctionKind::Reducer); + } } diff --git a/crates/schema/src/def/validate/v9.rs b/crates/schema/src/def/validate/v9.rs index 586bef28dc6..a1df7930edc 100644 --- a/crates/schema/src/def/validate/v9.rs +++ b/crates/schema/src/def/validate/v9.rs @@ -208,7 +208,7 @@ impl ModuleValidatorV9<'_> { let table_ident = table_in_progress.table_ident.clone(); let columns = (0..product_type.elements.len()) - .map(|id| table_in_progress.validate_column_def(id.into())) + .map(|id| table_in_progress.validate_column_def(id.into(), product_type)) .collect_all_errors(); let indexes = indexes @@ -501,7 +501,7 @@ impl ModuleValidatorV9<'_> { let n = product_type.elements.len(); let return_columns = (0..n) - .map(|id| view_in_progress.validate_view_column_def(id.into())) + .map(|id| view_in_progress.validate_view_column_def(id.into(), product_type)) .collect_all_errors(); let n = params.elements.len(); @@ -809,13 +809,11 @@ impl CoreValidator<'_> { scope, } = name; - // If scoped was set explicitly do not convert case - let unscoped_name = if scope.is_empty() { - self.resolve_type_with_case(unscoped_name) - } else { - identifier(unscoped_name.clone()) - }; - let scope = Vec::from(scope).into_iter().map(identifier).collect_all_errors(); + let unscoped_name = self.resolve_type_with_case(unscoped_name); + let scope = Vec::from(scope) + .into_iter() + .map(|t| self.resolve_type_with_case(t)) + .collect(); let name = (unscoped_name, scope) .combine_errors() @@ -991,8 +989,14 @@ impl<'a, 'b> ViewValidator<'a, 'b> { }) } - pub(crate) fn validate_view_column_def(&mut self, col_id: ColId) -> Result { - self.inner.validate_column_def(col_id).map(ViewColumnDef::from) + pub(crate) fn validate_view_column_def( + &mut self, + col_id: ColId, + product_type: &'a ProductType, + ) -> Result { + self.inner + .validate_column_def(col_id, product_type) + .map(ViewColumnDef::from) } pub(crate) fn add_to_global_namespace(&mut self, name: RawIdentifier) -> Result { @@ -1031,9 +1035,8 @@ impl<'a, 'b> TableValidator<'a, 'b> { /// /// Note that this accepts a `ProductTypeElement` rather than a `ColumnDef`, /// because all information about columns is stored in the `Typespace` in ABI version 9. - pub(crate) fn validate_column_def(&mut self, col_id: ColId) -> Result { - let column = &self - .product_type + pub(crate) fn validate_column_def(&mut self, col_id: ColId, product_type: &'a ProductType) -> Result { + let column = product_type .elements .get(col_id.idx()) .expect("enumerate is generating an out-of-range index..."); From 8ed9f59ac7140b25c84b7bdbcdc631738a9a8067 Mon Sep 17 00:00:00 2001 From: Shubham Mishra Date: Tue, 17 Feb 2026 18:02:11 +0530 Subject: [PATCH 077/133] test --- crates/schema/src/def/validate/v10.rs | 8 ++++---- crates/smoketests/tests/sql.rs | 16 ++++++++-------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/crates/schema/src/def/validate/v10.rs b/crates/schema/src/def/validate/v10.rs index 1009b59c274..c24fe2ca83e 100644 --- a/crates/schema/src/def/validate/v10.rs +++ b/crates/schema/src/def/validate/v10.rs @@ -1217,7 +1217,7 @@ mod tests { .build_table_with_new_type( "Bananas", ProductType::from([("b", AlgebraicType::U16), ("a", AlgebraicType::U64)]), - false, + true, ) .with_column_sequence(55) .finish(); @@ -1225,7 +1225,7 @@ mod tests { expect_error_matching!(result, ValidationError::ColumnNotFound { table, def, column } => { &table[..] == "Bananas" && - &def[..] == "Bananas_col_55_seq" && + &def[..] == "bananas_col_55_seq" && column == &55.into() }); @@ -1235,14 +1235,14 @@ mod tests { .build_table_with_new_type( "Bananas", ProductType::from([("b", AlgebraicType::U16), ("a", AlgebraicType::String)]), - false, + true, ) .with_column_sequence(1) .finish(); let result: Result = builder.finish().try_into(); expect_error_matching!(result, ValidationError::InvalidSequenceColumnType { sequence, column, column_type } => { - &sequence[..] == "Bananas_a_seq" && + &sequence[..] == "bananas_a_seq" && column == &RawColumnName::new("Bananas", "a") && column_type.0 == AlgebraicType::String }); diff --git a/crates/smoketests/tests/sql.rs b/crates/smoketests/tests/sql.rs index 9d07452bee5..c0cd1f6de3f 100644 --- a/crates/smoketests/tests/sql.rs +++ b/crates/smoketests/tests/sql.rs @@ -64,8 +64,8 @@ fn test_sql_format() { ); } -// #[test] -fn _test_sql_resolves_accessor_and_canonical_names_for_table() { +#[test] +fn test_sql_resolves_accessor_and_canonical_names_for_table() { let test = Smoketest::builder().precompiled_module("sql-format").build(); test.assert_sql( @@ -83,8 +83,8 @@ fn _test_sql_resolves_accessor_and_canonical_names_for_table() { ); } -// #[test] -fn _test_sql_resolves_accessor_and_canonical_names_for_view() { +#[test] +fn test_sql_resolves_accessor_and_canonical_names_for_view() { let test = Smoketest::builder().precompiled_module("sql-format").build(); test.assert_sql( @@ -102,8 +102,8 @@ fn _test_sql_resolves_accessor_and_canonical_names_for_view() { ); } -// #[test] -fn _test_sql_resolves_accessor_and_canonical_names_for_column() { +#[test] +fn test_sql_resolves_accessor_and_canonical_names_for_column() { let test = Smoketest::builder().precompiled_module("sql-format").build(); test.assert_sql( @@ -121,8 +121,8 @@ fn _test_sql_resolves_accessor_and_canonical_names_for_column() { ); } -// #[test] -fn _test_query_builder_resolves_accessor_and_canonical_names() { +#[test] +fn test_query_builder_resolves_accessor_and_canonical_names() { let test = Smoketest::builder().precompiled_module("sql-format").build(); test.assert_sql( From f770195ec35810688c8aab3ff450d34e74d0d37c Mon Sep 17 00:00:00 2001 From: Shubham Mishra Date: Tue, 17 Feb 2026 18:31:53 +0530 Subject: [PATCH 078/133] benchmark module updates --- .../src/sdk/client_api/index.ts | 2 +- .../test-app/src/module_bindings/index.ts | 20 +++++++++++++++---- .../tests/db_connection.test.ts | 8 ++++---- modules/benchmarks-ts/src/schema.ts | 14 ++++++------- modules/sdk-test-ts/src/index.ts | 5 ++--- 5 files changed, 29 insertions(+), 20 deletions(-) diff --git a/crates/bindings-typescript/src/sdk/client_api/index.ts b/crates/bindings-typescript/src/sdk/client_api/index.ts index 673f89b6030..c640197427d 100644 --- a/crates/bindings-typescript/src/sdk/client_api/index.ts +++ b/crates/bindings-typescript/src/sdk/client_api/index.ts @@ -1,7 +1,7 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE // WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. -// This was generated using spacetimedb cli version 2.0.0 (commit 901ee64ccec4620a9bbf1090e9cd868040063661). +// This was generated using spacetimedb cli version 2.0.0 (commit 8ed9f59ac7140b25c84b7bdbcdc631738a9a8067). /* eslint-disable */ /* tslint:disable */ diff --git a/crates/bindings-typescript/test-app/src/module_bindings/index.ts b/crates/bindings-typescript/test-app/src/module_bindings/index.ts index 430ed677d7a..ef13995f6e9 100644 --- a/crates/bindings-typescript/test-app/src/module_bindings/index.ts +++ b/crates/bindings-typescript/test-app/src/module_bindings/index.ts @@ -1,7 +1,7 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE // WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. -// This was generated using spacetimedb cli version 2.0.0 (commit 901ee64ccec4620a9bbf1090e9cd868040063661). +// This was generated using spacetimedb cli version 2.0.0 (commit 8ed9f59ac7140b25c84b7bdbcdc631738a9a8067). /* eslint-disable */ /* tslint:disable */ @@ -50,7 +50,9 @@ const tablesSchema = __schema({ player: __table( { name: 'player', - indexes: [{ name: 'id', algorithm: 'btree', columns: ['id'] }], + indexes: [ + { name: 'player_id_idx_btree', algorithm: 'btree', columns: ['id'] }, + ], constraints: [ { name: 'player_id_key', constraint: 'unique', columns: ['id'] }, ], @@ -60,7 +62,13 @@ const tablesSchema = __schema({ unindexed_player: __table( { name: 'unindexed_player', - indexes: [{ name: 'id', algorithm: 'btree', columns: ['id'] }], + indexes: [ + { + name: 'unindexed_player_id_idx_btree', + algorithm: 'btree', + columns: ['id'], + }, + ], constraints: [ { name: 'unindexed_player_id_key', @@ -75,7 +83,11 @@ const tablesSchema = __schema({ { name: 'user', indexes: [ - { name: 'identity', algorithm: 'btree', columns: ['identity'] }, + { + name: 'user_identity_idx_btree', + algorithm: 'btree', + columns: ['identity'], + }, ], constraints: [ { diff --git a/crates/bindings-typescript/tests/db_connection.test.ts b/crates/bindings-typescript/tests/db_connection.test.ts index ca8648f5b4b..e9796103d6c 100644 --- a/crates/bindings-typescript/tests/db_connection.test.ts +++ b/crates/bindings-typescript/tests/db_connection.test.ts @@ -16,8 +16,8 @@ import { class Deferred { #isResolved: boolean = false; #isRejected: boolean = false; - #resolve: (value: T | PromiseLike) => void = () => { }; - #reject: (reason?: any) => void = () => { }; + #resolve: (value: T | PromiseLike) => void = () => {}; + #reject: (reason?: any) => void = () => {}; promise: Promise; constructor() { @@ -54,7 +54,7 @@ class Deferred { } } -beforeEach(() => { }); +beforeEach(() => {}); describe('DbConnection', () => { test('call onConnectError callback after websocket connection failed to be established', async () => { @@ -356,7 +356,7 @@ describe('DbConnection', () => { .withUri('ws://127.0.0.1:1234') .withDatabaseName('db') .withWSFn(wsAdapter.createWebSocketFn.bind(wsAdapter) as any) - .onConnect(() => { }) + .onConnect(() => {}) .build(); await client['wsPromise']; diff --git a/modules/benchmarks-ts/src/schema.ts b/modules/benchmarks-ts/src/schema.ts index 5f7fdf73b9e..6a3c9674b02 100644 --- a/modules/benchmarks-ts/src/schema.ts +++ b/modules/benchmarks-ts/src/schema.ts @@ -79,28 +79,26 @@ export const btree_each_column_u32_u64_u64_tRow = t.row({ y: t.u64().index('btree'), }); -const unique_0_u32_u64_str = table( - { name: 'unique_0_u32_u64_str' }, +const unique_0_u32_u64_str = table({}, unique_0_u32_u64_str_tRow ); -const no_index_u32_u64_str = table( - { name: 'no_index_u32_u64_str' }, +const no_index_u32_u64_str = table({}, no_index_u32_u64_str_tRow ); const btree_each_column_u32_u64_str = table( - { name: 'btree_each_column_u32_u64_str' }, + {}, btree_each_column_u32_u64_str_tRow ); const unique_0_u32_u64_u64 = table( - { name: 'unique_0_u32_u64_u64' }, + {}, unique_0_u32_u64_u64_tRow ); const no_index_u32_u64_u64 = table( - { name: 'no_index_u32_u64_u64' }, + { }, no_index_u32_u64_u64_tRow ); const btree_each_column_u32_u64_u64 = table( - { name: 'btree_each_column_u32_u64_u64' }, + {}, btree_each_column_u32_u64_u64_tRow ); diff --git a/modules/sdk-test-ts/src/index.ts b/modules/sdk-test-ts/src/index.ts index cd560e876cc..b50a08c380b 100644 --- a/modules/sdk-test-ts/src/index.ts +++ b/modules/sdk-test-ts/src/index.ts @@ -119,7 +119,7 @@ function tbl( }, row: Row ): TableWithReducers>> { - const t = table({ name, public: true }, row); + const t = table({ public: true }, row); return { table: t, reducers(spacetimedb) { @@ -906,7 +906,6 @@ const IndexedTable = table( const IndexedTable2 = table( { - name: 'indexed_table_2', indexes: [ { name: 'player_id_snazz_index', @@ -922,7 +921,7 @@ const IndexedTable2 = table( ); const BTreeU32 = table( - { name: 'btree_u32', public: true }, + { public: true }, t.row('BTreeU32', { n: t.u32().index('btree'), data: t.i32(), From 9ccfd4d02a4e3994d67e9b2a779cb68945372b05 Mon Sep 17 00:00:00 2001 From: Shubham Mishra Date: Tue, 17 Feb 2026 18:52:14 +0530 Subject: [PATCH 079/133] update ts test --- modules/sdk-test-ts/src/index.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/modules/sdk-test-ts/src/index.ts b/modules/sdk-test-ts/src/index.ts index b50a08c380b..4e3d36e171a 100644 --- a/modules/sdk-test-ts/src/index.ts +++ b/modules/sdk-test-ts/src/index.ts @@ -908,7 +908,6 @@ const IndexedTable2 = table( { indexes: [ { - name: 'player_id_snazz_index', algorithm: 'btree', columns: ['player_id', 'player_snazz'], }, From 24588a654eeb5fd64dda4e4f19a225130a39810c Mon Sep 17 00:00:00 2001 From: Shubham Mishra Date: Tue, 17 Feb 2026 19:07:16 +0530 Subject: [PATCH 080/133] update sdk test --- sdks/csharp/tools~/run-regression-tests.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sdks/csharp/tools~/run-regression-tests.sh b/sdks/csharp/tools~/run-regression-tests.sh index 7023be092fe..fdd7733bf65 100644 --- a/sdks/csharp/tools~/run-regression-tests.sh +++ b/sdks/csharp/tools~/run-regression-tests.sh @@ -19,9 +19,9 @@ cargo run --manifest-path "$STDB_PATH/crates/cli/Cargo.toml" -- publish -c -y -- # Publish module for republishing module test cargo run --manifest-path "$STDB_PATH/crates/cli/Cargo.toml" -- publish -c -y --server local -p "$SDK_PATH/examples~/regression-tests/republishing/server-initial" republish-test -cargo run --manifest-path "$STDB_PATH/crates/cli/Cargo.toml" call --server local republish-test Insert 1 +cargo run --manifest-path "$STDB_PATH/crates/cli/Cargo.toml" call --server local republish-test insert 1 cargo run --manifest-path "$STDB_PATH/crates/cli/Cargo.toml" -- publish --server local -p "$SDK_PATH/examples~/regression-tests/republishing/server-republish" --break-clients republish-test -cargo run --manifest-path "$STDB_PATH/crates/cli/Cargo.toml" call --server local republish-test Insert 2 +cargo run --manifest-path "$STDB_PATH/crates/cli/Cargo.toml" call --server local republish-test insert 2 echo "Cleanup obj~ folders generated in $SDK_PATH/examples~/regression-tests/procedure-client" # There is a bug in the code generator that creates obj~ folders in the output directory using a Rust project. From 53d77d429aa5b922e8b1b9c7b9879afbc9043f62 Mon Sep 17 00:00:00 2001 From: Shubham Mishra Date: Tue, 17 Feb 2026 19:16:02 +0530 Subject: [PATCH 081/133] update module-test-ts --- modules/module-test-ts/src/index.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/modules/module-test-ts/src/index.ts b/modules/module-test-ts/src/index.ts index 79488c011ef..5e0ec86e1fe 100644 --- a/modules/module-test-ts/src/index.ts +++ b/modules/module-test-ts/src/index.ts @@ -152,7 +152,7 @@ const spacetimedb = schema({ person: table( { public: true, - indexes: [{ name: 'age', algorithm: 'btree', columns: ['age'] }], + indexes: [{ algorithm: 'btree', columns: ['age'] }], }, personRow ), @@ -161,26 +161,26 @@ const spacetimedb = schema({ testATable: table( { name: "test_a", - indexes: [{ name: 'foo', algorithm: 'btree', columns: ['x'] }], + indexes: [{ algorithm: 'btree', columns: ['x'] }], }, testA ), // test_d (public) with default(Some(DEFAULT_TEST_C)) option field - testD: table({ name: 'test_d', public: true }, testDRow), + testD: table({ public: true }, testDRow), // test_e, default private, with primary key id auto_inc and btree index on name testE: table( { name: 'test_e', public: false, - indexes: [{ name: 'name', algorithm: 'btree', columns: ['name'] }], + indexes: [{ algorithm: 'btree', columns: ['name'] }], }, testERow ), // test_f (public) with Foobar field - testF: table({ name: 'test_f', public: true }, testFRow), + testF: table({ public: true }, testFRow), // private_table (explicit private) privateTable: table( From b6758469567b07b5d8dbc982b5f0cabc0fec768f Mon Sep 17 00:00:00 2001 From: Shubham Mishra Date: Tue, 17 Feb 2026 19:37:56 +0530 Subject: [PATCH 082/133] schema tests --- crates/schema/src/def/validate/v10.rs | 4 ++++ crates/schema/src/identifier.rs | 1 - crates/schema/src/reducer_name.rs | 1 - crates/schema/tests/ensure_same_schema.rs | 11 +++-------- .../00100-intro/00200-quickstarts/00300-nodejs.md | 2 +- modules/module-test-ts/src/index.ts | 2 +- modules/module-test/src/lib.rs | 12 ++++++------ 7 files changed, 15 insertions(+), 18 deletions(-) diff --git a/crates/schema/src/def/validate/v10.rs b/crates/schema/src/def/validate/v10.rs index c24fe2ca83e..d09a7c5662c 100644 --- a/crates/schema/src/def/validate/v10.rs +++ b/crates/schema/src/def/validate/v10.rs @@ -13,6 +13,8 @@ use crate::error::ValidationError; use crate::type_for_generate::ProductTypeDef; use crate::{def::validate::Result, error::TypeLocation}; +// Utitility struct to look up canonical names for tables, functions, and indexes based on the +// explicit names provided in the `RawModuleDefV10`. #[derive(Default)] pub struct ExplicitNamesLookup { pub tables: HashMap, @@ -61,7 +63,9 @@ pub fn validate(def: RawModuleDefV10) -> Result { .map(ExplicitNamesLookup::new) .unwrap_or_default(); + // Original `typespace` needs to be preserved to be assign `accesor_name`s to columns. let typespace_with_accessor_names = typespace.clone(); + // Apply case conversion to `typespace`. CoreValidator::typespace_case_conversion(case_policy, &mut typespace); let mut validator = ModuleValidatorV10 { diff --git a/crates/schema/src/identifier.rs b/crates/schema/src/identifier.rs index 63cc55706c5..06a396ec012 100644 --- a/crates/schema/src/identifier.rs +++ b/crates/schema/src/identifier.rs @@ -81,7 +81,6 @@ impl Identifier { Ok(Identifier { id: name }) } - // #[cfg(any(test, feature = "test"))] pub fn for_test(name: impl AsRef) -> Self { Identifier::new(RawIdentifier::new(name.as_ref())).unwrap() } diff --git a/crates/schema/src/reducer_name.rs b/crates/schema/src/reducer_name.rs index 6c58beee548..94158f9d4e3 100644 --- a/crates/schema/src/reducer_name.rs +++ b/crates/schema/src/reducer_name.rs @@ -12,7 +12,6 @@ impl ReducerName { Self(id) } - // #[cfg(any(test, feature = "test"))] pub fn for_test(name: &str) -> Self { Self(Identifier::for_test(name)) } diff --git a/crates/schema/tests/ensure_same_schema.rs b/crates/schema/tests/ensure_same_schema.rs index fc3883cb525..1d1c69d74b5 100644 --- a/crates/schema/tests/ensure_same_schema.rs +++ b/crates/schema/tests/ensure_same_schema.rs @@ -102,15 +102,10 @@ fn ensure_same_schema_rust_csharp_benchmarks() { #[serial] fn test_case_converted_names() { let module_def: ModuleDef = get_normalized_schema("module-test"); - - // println!("Types {:?}", module_def.lookup::::(Identifier::for_test("person")).unwrap().columns().collect::>()); - - // println!("Types space {:?}", module_def.typespace()); - // Test Tables let table_names = [ - // canonical name, accessor name - ("test_a", "TestATable"), + // (canonical name, accessor name) + ("test_a", "testATable"), ]; for (name, accessor) in table_names { let def = TableDef::lookup(&module_def, &Identifier::for_test(name)); @@ -120,7 +115,7 @@ fn test_case_converted_names() { assert_eq!(&*def.unwrap().accessor_name, accessor, "Table '{}' not found", name); } - // Test Reducers + // Test Reducers // (listOverAge, ) let reducer_names = ["list_over_age", "repeating_test"]; for name in reducer_names { assert!( diff --git a/docs/docs/00100-intro/00200-quickstarts/00300-nodejs.md b/docs/docs/00100-intro/00200-quickstarts/00300-nodejs.md index e26004d861b..72c9cfabcfe 100644 --- a/docs/docs/00100-intro/00200-quickstarts/00300-nodejs.md +++ b/docs/docs/00100-intro/00200-quickstarts/00300-nodejs.md @@ -72,7 +72,7 @@ import { schema, table, t } from 'spacetimedb/server'; export const spacetimedb = schema( table( - { name: 'person', public: true }, + { public: true }, { name: t.string(), } diff --git a/modules/module-test-ts/src/index.ts b/modules/module-test-ts/src/index.ts index 5e0ec86e1fe..fc88b011127 100644 --- a/modules/module-test-ts/src/index.ts +++ b/modules/module-test-ts/src/index.ts @@ -194,7 +194,7 @@ const spacetimedb = schema({ name: 'points', public: false, indexes: [ - { name: 'multi_column_index', algorithm: 'btree', columns: ['x', 'y'] }, + { algorithm: 'btree', columns: ['x', 'y'] }, ], }, pointsRow diff --git a/modules/module-test/src/lib.rs b/modules/module-test/src/lib.rs index e7b46bcd120..829f7a8ddf0 100644 --- a/modules/module-test/src/lib.rs +++ b/modules/module-test/src/lib.rs @@ -42,7 +42,7 @@ pub struct RemoveTable { pub id: u32, } -#[spacetimedb::table(accessor = TestATable, name="test_a", index(accessor = foo, btree(columns = [x])))] +#[spacetimedb::table(accessor = testATable, name="test_a", index(accessor = foo, btree(columns = [x])))] pub struct TestA { pub x: u32, pub y: u32, @@ -282,23 +282,23 @@ pub fn test(ctx: &ReducerContext, arg: TestAlias, arg2: Test_b, arg3: TestC, arg TestF::Baz(string) => log::info!("{string}"), } for i in 0..1000 { - ctx.db.TestATable().insert(TestA { + ctx.db.testATable().insert(TestA { x: i + arg.x, y: i + arg.y, z: "Yo".to_owned(), }); } - let row_count_before_delete = ctx.db.TestATable().count(); + let row_count_before_delete = ctx.db.testATable().count(); log::info!("Row count before delete: {row_count_before_delete:?}"); let mut num_deleted = 0; for row in 5..10u32 { - num_deleted += ctx.db.TestATable().foo().delete(row); + num_deleted += ctx.db.testATable().foo().delete(row); } - let row_count_after_delete = ctx.db.TestATable().count(); + let row_count_after_delete = ctx.db.testATable().count(); if row_count_before_delete != row_count_after_delete + num_deleted { log::error!( @@ -318,7 +318,7 @@ pub fn test(ctx: &ReducerContext, arg: TestAlias, arg2: Test_b, arg3: TestC, arg let other_row_count = ctx .db - .TestATable() + .testATable() // .iter() // .filter(|row| row.x >= 0 && row.x <= u32::MAX) .count(); From bfbd592a7423a6182f8bfab28c524c19d98699b8 Mon Sep 17 00:00:00 2001 From: Shubham Mishra Date: Tue, 17 Feb 2026 20:09:20 +0530 Subject: [PATCH 083/133] fix integration test --- crates/testing/tests/standalone_integration_test.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/testing/tests/standalone_integration_test.rs b/crates/testing/tests/standalone_integration_test.rs index 97081c3e965..27aff909972 100644 --- a/crates/testing/tests/standalone_integration_test.rs +++ b/crates/testing/tests/standalone_integration_test.rs @@ -284,7 +284,7 @@ fn test_call_query_macro() { { "CallReducer": { "reducer": "test", "args": - "[ { \"x\": 0, \"y\": 2, \"z\": \"Macro\" }, { \"foo\": \"Foo\" }, { \"Foo\": {} }, { \"Baz\": \"buzz\" } ]", + "[ { \"x\": 0, \"y\": 2, \"z\": \"Macro\" }, { \"foo\": \"Foo\" }, { \"foo\": {} }, { \"baz\": \"buzz\" } ]", "request_id": 0, "flags": 0 } }"# From 7c3b5fe0b067d51043cd964e50a77d8d7fc34f30 Mon Sep 17 00:00:00 2001 From: Shubham Mishra Date: Tue, 17 Feb 2026 20:33:50 +0530 Subject: [PATCH 084/133] fix sql test --- crates/smoketests/tests/sql.rs | 54 +++++++++++++++++----------------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/crates/smoketests/tests/sql.rs b/crates/smoketests/tests/sql.rs index c0cd1f6de3f..03b1bf45b05 100644 --- a/crates/smoketests/tests/sql.rs +++ b/crates/smoketests/tests/sql.rs @@ -9,7 +9,7 @@ fn test_sql_format() { test.assert_sql( "SELECT * FROM t_ints", - r#" i8 | i16 | i32 | i64 | i128 | i256 + r#" i_8 | i_16 | i_32 | i_64 | i_128 | i_256 -----+-------+--------+----------+---------------+--------------- -25 | -3224 | -23443 | -2344353 | -234434897853 | -234434897853"#, ); @@ -17,13 +17,13 @@ fn test_sql_format() { test.assert_sql( "SELECT * FROM t_ints_tuple", r#" tuple ---------------------------------------------------------------------------------------------------- - (i8 = -25, i16 = -3224, i32 = -23443, i64 = -2344353, i128 = -234434897853, i256 = -234434897853)"#, +--------------------------------------------------------------------------------------------------------- + (i_8 = -25, i_16 = -3224, i_32 = -23443, i_64 = -2344353, i_128 = -234434897853, i_256 = -234434897853)"#, ); test.assert_sql( "SELECT * FROM t_uints", - r#" u8 | u16 | u32 | u64 | u128 | u256 + r#" u_8 | u_16 | u_32 | u_64 | u_128 | u_256 -----+------+-------+----------+---------------+--------------- 105 | 1050 | 83892 | 48937498 | 4378528978889 | 4378528978889"#, ); @@ -31,13 +31,13 @@ fn test_sql_format() { test.assert_sql( "SELECT * FROM t_uints_tuple", r#" tuple -------------------------------------------------------------------------------------------------- - (u8 = 105, u16 = 1050, u32 = 83892, u64 = 48937498, u128 = 4378528978889, u256 = 4378528978889)"#, +------------------------------------------------------------------------------------------------------- + (u_8 = 105, u_16 = 1050, u_32 = 83892, u_64 = 48937498, u_128 = 4378528978889, u_256 = 4378528978889)"#, ); test.assert_sql( "SELECT * FROM t_others", - r#" bool | f32 | f64 | str | bytes | identity | connection_id | timestamp | duration | uuid + r#" bool | f_32 | f_64 | str | bytes | identity | connection_id | timestamp | duration | uuid ------+-----------+--------------------+-----------------------+------------------+--------------------------------------------------------------------+------------------------------------+---------------------------+-----------+---------------------------------------- true | 594806.56 | -3454353.345389043 | "This is spacetimedb" | 0x01020304050607 | 0x0000000000000000000000000000000000000000000000000000000000000001 | 0x00000000000000000000000000000000 | 1970-01-01T00:00:00+00:00 | +0.000000 | "00000000-0000-0000-0000-000000000000""#, ); @@ -45,22 +45,22 @@ fn test_sql_format() { test.assert_sql( "SELECT * FROM t_others_tuple", r#" tuple ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - (bool = true, f32 = 594806.56, f64 = -3454353.345389043, str = "This is spacetimedb", bytes = 0x01020304050607, identity = 0x0000000000000000000000000000000000000000000000000000000000000001, connection_id = 0x00000000000000000000000000000000, timestamp = 1970-01-01T00:00:00+00:00, duration = +0.000000, uuid = "00000000-0000-0000-0000-000000000000")"#, +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ + (bool = true, f_32 = 594806.56, f_64 = -3454353.345389043, str = "This is spacetimedb", bytes = 0x01020304050607, identity = 0x0000000000000000000000000000000000000000000000000000000000000001, connection_id = 0x00000000000000000000000000000000, timestamp = 1970-01-01T00:00:00+00:00, duration = +0.000000, uuid = "00000000-0000-0000-0000-000000000000")"#, ); test.assert_sql( "SELECT * FROM t_enums", r#" bool_opt | bool_result | action ---------------+--------------+--------------- - (some = true) | (ok = false) | (Active = ())"#, + (some = true) | (ok = false) | (active = ())"#, ); test.assert_sql( "SELECT * FROM t_enums_tuple", r#" tuple -------------------------------------------------------------------------------- - (bool_opt = (some = true), bool_result = (ok = false), action = (Active = ()))"#, + (bool_opt = (some = true), bool_result = (ok = false), action = (active = ()))"#, ); } @@ -70,15 +70,15 @@ fn test_sql_resolves_accessor_and_canonical_names_for_table() { test.assert_sql( "SELECT * FROM accessor_table", - r#" id | accessor_value -----+---------------- + r#" id | accessor_value_1 +----+------------------ 1 | 7"#, ); test.assert_sql( "SELECT * FROM canonical_table", - r#" id | accessor_value -----+---------------- + r#" id | accessor_value_1 +----+------------------ 1 | 7"#, ); } @@ -89,15 +89,15 @@ fn test_sql_resolves_accessor_and_canonical_names_for_view() { test.assert_sql( "SELECT * FROM accessor_filtered", - r#" id | accessor_value -----+---------------- + r#" id | accessor_value_1 +----+------------------ 1 | 7"#, ); test.assert_sql( "SELECT * FROM canonical_filtered", - r#" id | accessor_value -----+---------------- + r#" id | accessor_value_1 +----+------------------ 1 | 7"#, ); } @@ -107,16 +107,16 @@ fn test_sql_resolves_accessor_and_canonical_names_for_column() { let test = Smoketest::builder().precompiled_module("sql-format").build(); test.assert_sql( - "SELECT accessor_value FROM accessor_table", - r#" accessor_value ----------------- + "SELECT accessor_value_1 FROM accessor_table", + r#" accessor_value_1 +------------------ 7"#, ); test.assert_sql( - "SELECT canonical_value FROM accessor_table", - r#" canonical_value ----------------- + "SELECT accessor_value1 FROM accessor_table", + r#" accessor_value1 +----------------- 7"#, ); } @@ -127,8 +127,8 @@ fn test_query_builder_resolves_accessor_and_canonical_names() { test.assert_sql( "SELECT * FROM accessor_filtered", - r#" id | accessor_value -----+---------------- + r#" id | accessor_value_1 +----+------------------ 1 | 7"#, ); } From ea4a984f77d1a81e20e776e9cab14cf7081d9d8e Mon Sep 17 00:00:00 2001 From: Shubham Mishra Date: Tue, 17 Feb 2026 21:40:57 +0530 Subject: [PATCH 085/133] smoketests --- .../tests/db_connection.test.ts | 16 ++++++++-------- crates/smoketests/modules/sql-format/src/lib.rs | 7 +++---- crates/smoketests/tests/pg_wire.rs | 2 +- smoketests/tests/pg_wire.py | 2 +- 4 files changed, 13 insertions(+), 14 deletions(-) diff --git a/crates/bindings-typescript/tests/db_connection.test.ts b/crates/bindings-typescript/tests/db_connection.test.ts index e9796103d6c..f7ca9f04927 100644 --- a/crates/bindings-typescript/tests/db_connection.test.ts +++ b/crates/bindings-typescript/tests/db_connection.test.ts @@ -16,8 +16,8 @@ import { class Deferred { #isResolved: boolean = false; #isRejected: boolean = false; - #resolve: (value: T | PromiseLike) => void = () => {}; - #reject: (reason?: any) => void = () => {}; + #resolve: (value: T | PromiseLike) => void = () => { }; + #reject: (reason?: any) => void = () => { }; promise: Promise; constructor() { @@ -54,7 +54,7 @@ class Deferred { } } -beforeEach(() => {}); +beforeEach(() => { }); describe('DbConnection', () => { test('call onConnectError callback after websocket connection failed to be established', async () => { @@ -356,7 +356,7 @@ describe('DbConnection', () => { .withUri('ws://127.0.0.1:1234') .withDatabaseName('db') .withWSFn(wsAdapter.createWebSocketFn.bind(wsAdapter) as any) - .onConnect(() => {}) + .onConnect(() => { }) .build(); await client['wsPromise']; @@ -469,9 +469,9 @@ describe('DbConnection', () => { wsAdapter.sendToClient(transactionUpdate); await gotAllInserts.promise; - // const foundUser = client.db.user.identity.find(sallyIdentity); - // expect(foundUser).not.toBeUndefined(); - // expect(foundUser!.username).toEqual('sally'); - // expect(client.db.user.count()).toEqual(2n); + const foundUser = client.db.user.identity.find(sallyIdentity); + expect(foundUser).not.toBeUndefined(); + expect(foundUser!.username).toEqual('sally'); + expect(client.db.user.count()).toEqual(2n); }); }); diff --git a/crates/smoketests/modules/sql-format/src/lib.rs b/crates/smoketests/modules/sql-format/src/lib.rs index b00d643394e..4a18c859190 100644 --- a/crates/smoketests/modules/sql-format/src/lib.rs +++ b/crates/smoketests/modules/sql-format/src/lib.rs @@ -127,19 +127,18 @@ pub fn test(ctx: &ReducerContext) { pub struct AccessorRow { #[primary_key] id: u32, - #[sats(name = "canonical_value")] - accessor_value: u32, + accessor_value1: u32, } #[spacetimedb::reducer(init)] pub fn init(ctx: &ReducerContext) { ctx.db.accessor_table().insert(AccessorRow { id: 1, - accessor_value: 7, + accessor_value1: 7, }); } #[spacetimedb::view(accessor = accessor_filtered, name = "canonical_filtered", public)] fn accessor_filtered(ctx: &ViewContext) -> impl Query { - ctx.from.accessor_table().r#where(|r| r.accessor_value.eq(7)) + ctx.from.accessor_table().r#where(|r| r.accessor_value1.eq(7)) } diff --git a/crates/smoketests/tests/pg_wire.rs b/crates/smoketests/tests/pg_wire.rs index 671cb382bdb..2ec2aafa518 100644 --- a/crates/smoketests/tests/pg_wire.rs +++ b/crates/smoketests/tests/pg_wire.rs @@ -20,7 +20,7 @@ fn test_sql_format() { test.assert_psql( "quickstart", "SELECT * FROM t_ints", - r#"i_8 | i_16 | i_32 | i_64 | i_128 | i_256 + r#" i_8 | i_16 | i_32 | i_64 | i_128 | i_256 -----+-------+--------+----------+---------------+--------------- -25 | -3224 | -23443 | -2344353 | -234434897853 | -234434897853 (1 row)"#, diff --git a/smoketests/tests/pg_wire.py b/smoketests/tests/pg_wire.py index 853d82b523c..46b0a5eae94 100644 --- a/smoketests/tests/pg_wire.py +++ b/smoketests/tests/pg_wire.py @@ -214,7 +214,7 @@ def test_sql_format(self): self.call("test") self.assertPsql(token, "SELECT * FROM t_ints", """\ -i8 | i16 | i32 | i64 | i128 | i256 + i_8 | i_16 | i_32 | i_64 | i_128 | i_256 -----+-------+--------+----------+---------------+--------------- -25 | -3224 | -23443 | -2344353 | -234434897853 | -234434897853 (1 row)""") From 497d0bc7a4ca1388f43f5377b80ad0dc2e87d8fc Mon Sep 17 00:00:00 2001 From: = Date: Wed, 18 Feb 2026 02:44:29 -0500 Subject: [PATCH 086/133] Use `accessor_name` for generated identifiers in TS/Rust/C#/Unreal codegens Client code generators now use `accessor_name` instead of `name` for generated language identifiers (type names, filenames, method names, variable names). The `name` field continues to be used for protocol/wire communication (table names sent over WebSocket, reducer names in schema, match arms on wire data). Closes #4324 --- crates/codegen/src/csharp.rs | 39 ++++++----- crates/codegen/src/rust.rs | 109 ++++++++++++++++--------------- crates/codegen/src/typescript.rs | 61 ++++++++--------- crates/codegen/src/unrealcpp.rs | 36 +++++----- crates/codegen/src/util.rs | 15 +++-- 5 files changed, 135 insertions(+), 125 deletions(-) diff --git a/crates/codegen/src/csharp.rs b/crates/codegen/src/csharp.rs index d9e0e4292de..31e0755d229 100644 --- a/crates/codegen/src/csharp.rs +++ b/crates/codegen/src/csharp.rs @@ -517,7 +517,7 @@ impl Lang for Csharp<'_> { writeln!(output, "public sealed partial class RemoteTables"); indented_block(&mut output, |output| { - let csharp_table_name = table.name.deref().to_case(Case::Pascal); + let csharp_table_name = table.accessor_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); @@ -639,7 +639,7 @@ impl Lang for Csharp<'_> { // Emit top-level Cols/IxCols helpers for the typed query builder. writeln!(output); - let cols_owner_name = table.name.deref().to_case(Case::Pascal); + let cols_owner_name = table.accessor_name.deref().to_case(Case::Pascal); let row_type = type_ref_name(module, table.product_type_ref); let product_type = module.typespace_for_generate()[table.product_type_ref] .as_product() @@ -724,7 +724,7 @@ impl Lang for Csharp<'_> { }); OutputFile { - filename: format!("Tables/{}.g.cs", table.name.deref().to_case(Case::Pascal)), + filename: format!("Tables/{}.g.cs", table.accessor_name.deref().to_case(Case::Pascal)), code: output.into_inner(), } } @@ -756,7 +756,7 @@ impl Lang for Csharp<'_> { 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 func_name_pascal_case = reducer.accessor_name.deref().to_case(Case::Pascal); let delegate_separator = if reducer.params_for_generate.elements.is_empty() { "" } else { @@ -829,7 +829,7 @@ impl Lang for Csharp<'_> { autogen_csharp_product_common( module, output, - reducer.name.deref().to_case(Case::Pascal), + reducer.accessor_name.deref().to_case(Case::Pascal), &reducer.params_for_generate, "Reducer, IReducerArgs", |output| { @@ -842,7 +842,7 @@ impl Lang for Csharp<'_> { }); OutputFile { - filename: format!("Reducers/{}.g.cs", reducer.name.deref().to_case(Case::Pascal)), + filename: format!("Reducers/{}.g.cs", reducer.accessor_name.deref().to_case(Case::Pascal)), code: output.into_inner(), } } @@ -864,7 +864,7 @@ impl Lang for Csharp<'_> { writeln!(output, "public sealed partial class RemoteProcedures : RemoteBase"); indented_block(&mut output, |output| { - let func_name_pascal_case = procedure.name.deref().to_case(Case::Pascal); + let func_name_pascal_case = procedure.accessor_name.deref().to_case(Case::Pascal); let delegate_separator = if procedure.params_for_generate.elements.is_empty() { "" } else { @@ -925,14 +925,14 @@ impl Lang for Csharp<'_> { autogen_csharp_proc_return( module, output, - procedure.name.deref().to_case(Case::Pascal).to_string(), + procedure.accessor_name.deref().to_case(Case::Pascal).to_string(), &procedure.return_type_for_generate, self.namespace, ); autogen_csharp_product_common( module, output, - format!("{}Args", procedure.name.deref().to_case(Case::Pascal)), + format!("{}Args", procedure.accessor_name.deref().to_case(Case::Pascal)), &procedure.params_for_generate, "Procedure, IProcedureArgs", |output| { @@ -946,7 +946,10 @@ impl Lang for Csharp<'_> { }); OutputFile { - filename: format!("Procedures/{}.g.cs", procedure.name.deref().to_case(Case::Pascal)), + filename: format!( + "Procedures/{}.g.cs", + procedure.accessor_name.deref().to_case(Case::Pascal) + ), code: output.into_inner(), } } @@ -985,11 +988,11 @@ impl Lang for Csharp<'_> { indented_block(&mut output, |output| { writeln!(output, "public RemoteTables(DbConnection conn)"); indented_block(output, |output| { - for (table_name, _) in iter_table_names_and_types(module, options.visibility) { + for (_, accessor_name, _) in iter_table_names_and_types(module, options.visibility) { writeln!( output, "AddTable({} = new(conn));", - table_name.deref().to_case(Case::Pascal) + accessor_name.deref().to_case(Case::Pascal) ); } }); @@ -1004,8 +1007,8 @@ impl Lang for Csharp<'_> { writeln!(output); writeln!(output, "internal static string[] AllTablesSqlQueries() => new string[]"); indented_block(output, |output| { - for (table_name, _) in iter_table_names_and_types(module, options.visibility) { - let method_name = table_name.deref().to_case(Case::Pascal); + for (_, accessor_name, _) in iter_table_names_and_types(module, options.visibility) { + let method_name = accessor_name.deref().to_case(Case::Pascal); writeln!(output, "new QueryBuilder().From.{method_name}().ToSql(),"); } }); @@ -1015,10 +1018,10 @@ impl Lang for Csharp<'_> { writeln!(output, "public sealed class From"); indented_block(&mut output, |output| { - for (table_name, product_type_ref) in iter_table_names_and_types(module, options.visibility) { - let method_name = table_name.deref().to_case(Case::Pascal); + for (name, accessor_name, product_type_ref) in iter_table_names_and_types(module, options.visibility) { + let method_name = accessor_name.deref().to_case(Case::Pascal); let row_type = type_ref_name(module, product_type_ref); - let table_name_lit = format!("{:?}", table_name.deref()); + let table_name_lit = format!("{:?}", name.deref()); writeln!( output, "public global::SpacetimeDB.Table<{row_type}, {method_name}Cols, {method_name}IxCols> {method_name}() => new({table_name_lit}, new {method_name}Cols({table_name_lit}), new {method_name}IxCols({table_name_lit}));" @@ -1158,7 +1161,7 @@ impl Lang for Csharp<'_> { { indent_scope!(output); for reducer_name in - iter_reducers(module, options.visibility).map(|r| r.name.deref().to_case(Case::Pascal)) + iter_reducers(module, options.visibility).map(|r| r.accessor_name.deref().to_case(Case::Pascal)) { writeln!( output, diff --git a/crates/codegen/src/rust.rs b/crates/codegen/src/rust.rs index 2f40da1a0a2..46f872f0a68 100644 --- a/crates/codegen/src/rust.rs +++ b/crates/codegen/src/rust.rs @@ -126,12 +126,12 @@ impl __sdk::InModule for {type_name} {{ ); let table_name = table.name.deref(); - let table_name_pascalcase = table.name.deref().to_case(Case::Pascal); + let table_name_pascalcase = table.accessor_name.deref().to_case(Case::Pascal); let table_handle = table_name_pascalcase.clone() + "TableHandle"; let insert_callback_id = table_name_pascalcase.clone() + "InsertCallbackId"; let delete_callback_id = table_name_pascalcase.clone() + "DeleteCallbackId"; - let accessor_trait = table_access_trait_name(&table.name); - let accessor_method = table_method_name(&table.name); + let accessor_trait = table_access_trait_name(&table.accessor_name); + let accessor_method = table_method_name(&table.accessor_name); write!( out, @@ -368,7 +368,7 @@ pub(super) fn parse_table_update( implement_query_table_accessor(table, out, &row_type).expect("failed to implement query table accessor"); OutputFile { - filename: table_module_name(&table.name) + ".rs", + filename: table_module_name(&table.accessor_name) + ".rs", code: output.into_inner(), } } @@ -392,8 +392,8 @@ pub(super) fn parse_table_update( let reducer_name = reducer.name.deref(); let func_name = reducer_function_name(reducer); - let args_type = function_args_type_name(&reducer.name); - let enum_variant_name = reducer_variant_name(&reducer.name); + let args_type = function_args_type_name(&reducer.accessor_name); + let enum_variant_name = reducer_variant_name(&reducer.accessor_name); // Define an "args struct" for the reducer. // This is not user-facing (note the `pub(super)` visibility); @@ -506,7 +506,7 @@ impl {func_name} for super::RemoteReducers {{ ); OutputFile { - filename: reducer_module_name(&reducer.name) + ".rs", + filename: reducer_module_name(&reducer.accessor_name) + ".rs", code: output.into_inner(), } } @@ -529,7 +529,7 @@ impl {func_name} for super::RemoteReducers {{ let procedure_name = procedure.name.deref(); let func_name = procedure_function_name(procedure); let func_name_with_callback = procedure_function_with_callback_name(procedure); - let args_type = function_args_type_name(&procedure.name); + let args_type = function_args_type_name(&procedure.accessor_name); let res_ty_name = type_name(module, &procedure.return_type_for_generate); // Define an "args struct" as a serialization helper. @@ -593,7 +593,7 @@ impl {func_name} for super::RemoteProcedures {{ ); OutputFile { - filename: procedure_module_name(&procedure.name) + ".rs", + filename: procedure_module_name(&procedure.accessor_name) + ".rs", code: output.into_inner(), } } @@ -735,7 +735,7 @@ pub struct {cols_ix} {{" .iter() .find(|col| col.col_id == cols.as_singleton().expect("singleton column")) .unwrap(); - let field_name = column.name.deref(); + let field_name = column.accessor_name.deref(); let field_type = type_name(module, &column.ty_for_generate); writeln!( @@ -763,11 +763,12 @@ impl __sdk::__query_builder::HasIxCols for {struct_name} {{ .iter() .find(|col| col.col_id == cols.as_singleton().expect("singleton column")) .expect("singleton column"); - let field_name = column.name.deref(); + let field_name = column.accessor_name.deref(); + let col_name = column.name.deref(); writeln!( out, - " {field_name}: __sdk::__query_builder::IxCol::new(table_name, {field_name:?}),", + " {field_name}: __sdk::__query_builder::IxCol::new(table_name, {col_name:?}),", )?; } writeln!( @@ -791,7 +792,7 @@ impl __sdk::__query_builder::HasIxCols for {struct_name} {{ pub fn implement_query_table_accessor(table: &TableDef, out: &mut impl Write, struct_name: &String) -> fmt::Result { // NEW: Generate query table accessor trait and implementation - let accessor_method = table.name.clone(); + let accessor_method = table.accessor_name.clone(); let query_accessor_trait = accessor_method.to_string() + "QueryTableAccess"; writeln!( @@ -1113,7 +1114,7 @@ fn reducer_module_name(reducer_name: &ReducerName) -> String { } fn reducer_function_name(reducer: &ReducerDef) -> String { - reducer.name.deref().to_case(Case::Snake) + reducer.accessor_name.deref().to_case(Case::Snake) } fn procedure_module_name(procedure_name: &Identifier) -> String { @@ -1121,7 +1122,7 @@ fn procedure_module_name(procedure_name: &Identifier) -> String { } fn procedure_function_name(procedure: &ProcedureDef) -> String { - procedure.name.deref().to_case(Case::Snake) + procedure.accessor_name.deref().to_case(Case::Snake) } fn procedure_function_with_callback_name(procedure: &ProcedureDef) -> String { @@ -1132,10 +1133,10 @@ fn procedure_function_with_callback_name(procedure: &ProcedureDef) -> String { fn iter_module_names(module: &ModuleDef, visibility: CodegenVisibility) -> impl Iterator + '_ { itertools::chain!( iter_types(module).map(|ty| type_module_name(&ty.accessor_name)), - iter_reducers(module, visibility).map(|r| reducer_module_name(&r.name)), - iter_tables(module, visibility).map(|tbl| table_module_name(&tbl.name)), - iter_views(module).map(|view| table_module_name(&view.name)), - iter_procedures(module, visibility).map(|proc| procedure_module_name(&proc.name)), + iter_reducers(module, visibility).map(|r| reducer_module_name(&r.accessor_name)), + iter_tables(module, visibility).map(|tbl| table_module_name(&tbl.accessor_name)), + iter_views(module).map(|view| table_module_name(&view.accessor_name)), + iter_procedures(module, visibility).map(|proc| procedure_module_name(&proc.accessor_name)), ) } @@ -1153,8 +1154,8 @@ fn print_module_reexports(module: &ModuleDef, visibility: CodegenVisibility, out let type_name = collect_case(Case::Pascal, ty.accessor_name.name_segments()); writeln!(out, "pub use {mod_name}::{type_name};") } - for (table_name, _) in iter_table_names_and_types(module, visibility) { - let mod_name = table_module_name(table_name); + for (_, accessor_name, _) in iter_table_names_and_types(module, visibility) { + let mod_name = table_module_name(accessor_name); // TODO: More precise reexport: we want: // - The trait name. // - The insert, delete and possibly update callback ids. @@ -1163,12 +1164,12 @@ fn print_module_reexports(module: &ModuleDef, visibility: CodegenVisibility, out writeln!(out, "pub use {mod_name}::*;"); } for reducer in iter_reducers(module, visibility) { - let mod_name = reducer_module_name(&reducer.name); + let mod_name = reducer_module_name(&reducer.accessor_name); let reducer_trait_name = reducer_function_name(reducer); writeln!(out, "pub use {mod_name}::{reducer_trait_name};"); } for procedure in iter_procedures(module, visibility) { - let mod_name = procedure_module_name(&procedure.name); + let mod_name = procedure_module_name(&procedure.accessor_name); let trait_name = procedure_function_name(procedure); writeln!(out, "pub use {mod_name}::{trait_name};"); } @@ -1191,7 +1192,7 @@ fn print_reducer_enum_defn(module: &ModuleDef, visibility: CodegenVisibility, ou "pub enum Reducer {", |out| { for reducer in iter_reducers(module, visibility) { - write!(out, "{} ", reducer_variant_name(&reducer.name)); + write!(out, "{} ", reducer_variant_name(&reducer.accessor_name)); if !reducer.params_for_generate.elements.is_empty() { // If the reducer has any arguments, generate a "struct variant," // like `Foo { bar: Baz, }`. @@ -1224,7 +1225,7 @@ impl __sdk::InModule for Reducer {{ "match self {", |out| { for reducer in iter_reducers(module, visibility) { - write!(out, "Reducer::{}", reducer_variant_name(&reducer.name)); + write!(out, "Reducer::{}", reducer_variant_name(&reducer.accessor_name)); if !reducer.params_for_generate.elements.is_empty() { // Because we're emitting unit variants when the payload is empty, // we will emit different patterns for empty vs non-empty variants. @@ -1254,7 +1255,7 @@ impl __sdk::InModule for Reducer {{ "match self {", |out| { for reducer in iter_reducers(module, visibility) { - write!(out, "Reducer::{}", reducer_variant_name(&reducer.name)); + write!(out, "Reducer::{}", reducer_variant_name(&reducer.accessor_name)); if !reducer.params_for_generate.elements.is_empty() { // Because we're emitting unit variants when the payload is empty, // we will emit different patterns for empty vs non-empty variants. @@ -1277,8 +1278,8 @@ impl __sdk::InModule for Reducer {{ write!( out, " => __sats::bsatn::to_vec(&{}::{}", - reducer_module_name(&reducer.name), - function_args_type_name(&reducer.name) + reducer_module_name(&reducer.accessor_name), + function_args_type_name(&reducer.accessor_name) ); out.delimited_block( " {", @@ -1313,11 +1314,11 @@ fn print_db_update_defn(module: &ModuleDef, visibility: CodegenVisibility, out: out.delimited_block( "pub struct DbUpdate {", |out| { - for (table_name, product_type_ref) in iter_table_names_and_types(module, visibility) { + for (_, accessor_name, product_type_ref) in iter_table_names_and_types(module, visibility) { writeln!( out, "{}: __sdk::TableUpdate<{}>,", - table_method_name(table_name), + table_method_name(accessor_name), type_ref_name(module, product_type_ref), ); } @@ -1337,13 +1338,13 @@ impl TryFrom<__ws::v2::TransactionUpdate> for DbUpdate { match &table_update.table_name[..] { ", |out| { - for (table_name, _) in iter_table_names_and_types(module, visibility) { + for (name, accessor_name, _) in iter_table_names_and_types(module, visibility) { writeln!( out, "{:?} => db_update.{}.append({}::parse_table_update(table_update)?),", - table_name.deref(), - table_method_name(table_name), - table_module_name(table_name), + name.deref(), + table_method_name(accessor_name), + table_module_name(accessor_name), ); } }, @@ -1382,7 +1383,7 @@ impl __sdk::InModule for DbUpdate {{ ", |out| { for table in iter_tables(module, visibility) { - let field_name = table_method_name(&table.name); + let field_name = table_method_name(&table.accessor_name); if table.is_event { // Event tables bypass the client cache entirely. // We construct an applied diff directly from the inserts, @@ -1395,7 +1396,7 @@ impl __sdk::InModule for DbUpdate {{ let with_updates = table .primary_key .map(|col| { - let pk_field = table.get_column(col).unwrap().name.deref().to_case(Case::Snake); + let pk_field = table.get_column(col).unwrap().accessor_name.deref().to_case(Case::Snake); format!(".with_updates_by_pk(|row| &row.{pk_field})") }) .unwrap_or_default(); @@ -1409,7 +1410,7 @@ impl __sdk::InModule for DbUpdate {{ } } for view in iter_views(module) { - let field_name = table_method_name(&view.name); + let field_name = table_method_name(&view.accessor_name); writeln!( out, "diff.{field_name} = cache.apply_diff_to_table::<{}>({:?}, &self.{field_name});", @@ -1433,12 +1434,12 @@ impl __sdk::InModule for DbUpdate {{ out.delimited_block( "match &table_rows.table[..] {", |out| { - for (table_name, _) in iter_table_names_and_types(module, visibility) { + for (name, accessor_name, _) in iter_table_names_and_types(module, visibility) { writeln!( out, "{:?} => db_update.{}.append(__sdk::parse_row_list_as_inserts(table_rows.rows)?),", - table_name.deref(), - table_method_name(table_name), + name.deref(), + table_method_name(accessor_name), ); } writeln!( @@ -1466,12 +1467,12 @@ impl __sdk::InModule for DbUpdate {{ out.delimited_block( "match &table_rows.table[..] {", |out| { - for (table_name, _) in iter_table_names_and_types(module, visibility) { + for (name, accessor_name, _) in iter_table_names_and_types(module, visibility) { writeln!( out, "{:?} => db_update.{}.append(__sdk::parse_row_list_as_deletes(table_rows.rows)?),", - table_name.deref(), - table_method_name(table_name), + name.deref(), + table_method_name(accessor_name), ); } writeln!( @@ -1500,11 +1501,11 @@ fn print_applied_diff_defn(module: &ModuleDef, visibility: CodegenVisibility, ou out.delimited_block( "pub struct AppliedDiff<'r> {", |out| { - for (table_name, product_type_ref) in iter_table_names_and_types(module, visibility) { + for (_, accessor_name, product_type_ref) in iter_table_names_and_types(module, visibility) { writeln!( out, "{}: __sdk::TableAppliedDiff<'r, {}>,", - table_method_name(table_name), + table_method_name(accessor_name), type_ref_name(module, product_type_ref), ); } @@ -1533,13 +1534,13 @@ impl __sdk::InModule for AppliedDiff<'_> {{ out.delimited_block( "fn invoke_row_callbacks(&self, event: &EventContext, callbacks: &mut __sdk::DbCallbacks) {", |out| { - for (table_name, product_type_ref) in iter_table_names_and_types(module, visibility) { + for (name, accessor_name, product_type_ref) in iter_table_names_and_types(module, visibility) { writeln!( out, "callbacks.invoke_table_row_callbacks::<{}>({:?}, &self.{}, event);", type_ref_name(module, product_type_ref), - table_name.deref(), - table_method_name(table_name), + name.deref(), + table_method_name(accessor_name), ); } }, @@ -1576,8 +1577,12 @@ type QueryBuilder = __sdk::QueryBuilder; out.delimited_block( "fn register_tables(client_cache: &mut __sdk::ClientCache) {", |out| { - for (table_name, _) in iter_table_names_and_types(module, visibility) { - writeln!(out, "{}::register_table(client_cache);", table_module_name(table_name)); + for (_, accessor_name, _) in iter_table_names_and_types(module, visibility) { + writeln!( + out, + "{}::register_table(client_cache);", + table_module_name(accessor_name) + ); } }, "}\n", @@ -1585,8 +1590,8 @@ type QueryBuilder = __sdk::QueryBuilder; out.delimited_block( "const ALL_TABLE_NAMES: &'static [&'static str] = &[", |out| { - for (table_name, _) in iter_table_names_and_types(module, visibility) { - writeln!(out, "\"{table_name}\","); + for (name, _, _) in iter_table_names_and_types(module, visibility) { + writeln!(out, "\"{name}\","); } }, "];\n", diff --git a/crates/codegen/src/typescript.rs b/crates/codegen/src/typescript.rs index 7c44b4ff433..e394a611ab4 100644 --- a/crates/codegen/src/typescript.rs +++ b/crates/codegen/src/typescript.rs @@ -133,7 +133,7 @@ impl Lang for TypeScript { out.dedent(1); writeln!(out, "}});"); OutputFile { - filename: table_module_name(&table.name) + ".ts", + filename: table_module_name(&table.accessor_name) + ".ts", code: output.into_inner(), } } @@ -158,7 +158,7 @@ impl Lang for TypeScript { define_body_for_reducer(module, out, &reducer.params_for_generate.elements); OutputFile { - filename: reducer_module_name(&reducer.name) + ".ts", + filename: reducer_module_name(&reducer.accessor_name) + ".ts", code: output.into_inner(), } } @@ -198,7 +198,7 @@ impl Lang for TypeScript { write_type_builder(module, out, &procedure.return_type_for_generate).unwrap(); OutputFile { - filename: procedure_module_name(&procedure.name) + ".ts", + filename: procedure_module_name(&procedure.accessor_name) + ".ts", code: output.into_inner(), } } @@ -216,26 +216,24 @@ impl Lang for TypeScript { // Skip system-defined reducers continue; } - let reducer_name = &reducer.name; - let reducer_module_name = reducer_module_name(reducer_name); - let args_type = reducer_args_type_name(reducer_name); + let reducer_module_name = reducer_module_name(&reducer.accessor_name); + let args_type = reducer_args_type_name(&reducer.accessor_name); writeln!(out, "import {args_type} from \"./{reducer_module_name}\";"); } writeln!(out); writeln!(out, "// Import all procedure arg schemas"); for procedure in iter_procedures(module, options.visibility) { - let procedure_name = &procedure.name; - let procedure_module_name = procedure_module_name(procedure_name); - let args_type = procedure_args_type_name(&procedure.name); + let procedure_module_name = procedure_module_name(&procedure.accessor_name); + let args_type = procedure_args_type_name(&procedure.accessor_name); writeln!(out, "import * as {args_type} from \"./{procedure_module_name}\";"); } writeln!(out); writeln!(out, "// Import all table schema definitions"); - for (table_name, _) in iter_table_names_and_types(module, options.visibility) { - let table_module_name = table_module_name(table_name); - let table_name_pascalcase = table_name.deref().to_case(Case::Pascal); + for (_, accessor_name, _) in iter_table_names_and_types(module, options.visibility) { + let table_module_name = table_module_name(accessor_name); + let table_name_pascalcase = accessor_name.deref().to_case(Case::Pascal); // TODO: This really shouldn't be necessary. We could also have `table()` accept // `__t.object(...)`s. writeln!(out, "import {table_name_pascalcase}Row from \"./{table_module_name}\";"); @@ -250,8 +248,8 @@ impl Lang for TypeScript { out.indent(1); for table in iter_tables(module, options.visibility) { let type_ref = table.product_type_ref; - let table_name_pascalcase = table.name.deref().to_case(Case::Pascal); - writeln!(out, "{}: __table({{", table.name); + let table_name_pascalcase = table.accessor_name.deref().to_case(Case::Pascal); + writeln!(out, "{}: __table({{", table.accessor_name); out.indent(1); write_table_opts( module, @@ -267,8 +265,8 @@ impl Lang for TypeScript { } for view in iter_views(module) { let type_ref = view.product_type_ref; - let view_name_pascalcase = view.name.deref().to_case(Case::Pascal); - writeln!(out, "{}: __table({{", view.name); + let view_name_pascalcase = view.accessor_name.deref().to_case(Case::Pascal); + writeln!(out, "{}: __table({{", view.accessor_name); out.indent(1); write_table_opts(module, out, type_ref, &view.name, iter::empty(), iter::empty(), false); out.dedent(1); @@ -286,9 +284,8 @@ impl Lang for TypeScript { // Skip system-defined reducers continue; } - let reducer_name = &reducer.name; - let args_type = reducer_args_type_name(&reducer.name); - writeln!(out, "__reducerSchema(\"{}\", {}),", reducer_name, args_type); + let args_type = reducer_args_type_name(&reducer.accessor_name); + writeln!(out, "__reducerSchema(\"{}\", {}),", reducer.name, args_type); } out.dedent(1); writeln!(out, ");"); @@ -301,11 +298,11 @@ impl Lang for TypeScript { writeln!(out, "const proceduresSchema = __procedures("); out.indent(1); for procedure in iter_procedures(module, options.visibility) { - let procedure_name = &procedure.name; - let args_type = procedure_args_type_name(&procedure.name); + let args_type = procedure_args_type_name(&procedure.accessor_name); writeln!( out, - "__procedureSchema(\"{procedure_name}\", {args_type}.params, {args_type}.returnType),", + "__procedureSchema(\"{}\", {args_type}.params, {args_type}.returnType),", + procedure.name, ); } out.dedent(1); @@ -460,16 +457,15 @@ fn generate_reducers_file(module: &ModuleDef, options: &CodegenOptions) -> Outpu writeln!(out); writeln!(out, "// Import all reducer arg schemas"); for reducer in iter_reducers(module, options.visibility) { - let reducer_name = &reducer.name; - let reducer_module_name = reducer_module_name(reducer_name); - let args_type = reducer_args_type_name(&reducer.name); + let reducer_module_name = reducer_module_name(&reducer.accessor_name); + let args_type = reducer_args_type_name(&reducer.accessor_name); writeln!(out, "import {args_type} from \"../{reducer_module_name}\";"); } writeln!(out); for reducer in iter_reducers(module, options.visibility) { - let reducer_name_pascalcase = reducer.name.deref().to_case(Case::Pascal); - let args_type = reducer_args_type_name(&reducer.name); + let reducer_name_pascalcase = reducer.accessor_name.deref().to_case(Case::Pascal); + let args_type = reducer_args_type_name(&reducer.accessor_name); writeln!( out, "export type {reducer_name_pascalcase}Params = __Infer;" @@ -494,16 +490,15 @@ fn generate_procedures_file(module: &ModuleDef, options: &CodegenOptions) -> Out writeln!(out); writeln!(out, "// Import all procedure arg schemas"); for procedure in iter_procedures(module, options.visibility) { - let procedure_name = &procedure.name; - let procedure_module_name = procedure_module_name(procedure_name); - let args_type = procedure_args_type_name(&procedure.name); + let procedure_module_name = procedure_module_name(&procedure.accessor_name); + let args_type = procedure_args_type_name(&procedure.accessor_name); writeln!(out, "import * as {args_type} from \"../{procedure_module_name}\";"); } writeln!(out); for procedure in iter_procedures(module, options.visibility) { - let procedure_name_pascalcase = procedure.name.deref().to_case(Case::Pascal); - let args_type = procedure_args_type_name(&procedure.name); + let procedure_name_pascalcase = procedure.accessor_name.deref().to_case(Case::Pascal); + let args_type = procedure_args_type_name(&procedure.accessor_name); writeln!( out, "export type {procedure_name_pascalcase}Args = __Infer;" @@ -531,7 +526,7 @@ fn generate_types_file(module: &ModuleDef) -> OutputFile { let reducer_type_names = module .reducers() - .map(|reducer| reducer.name.deref().to_case(Case::Pascal)) + .map(|reducer| reducer.accessor_name.deref().to_case(Case::Pascal)) .collect::>(); writeln!(out); diff --git a/crates/codegen/src/unrealcpp.rs b/crates/codegen/src/unrealcpp.rs index 8d15bdf647f..c4b9fd81efb 100644 --- a/crates/codegen/src/unrealcpp.rs +++ b/crates/codegen/src/unrealcpp.rs @@ -865,8 +865,8 @@ impl Lang for UnrealCpp<'_> { writeln!(client_h); writeln!(client_h, "/** Forward declaration for tables */"); - for (table_name, _) in iter_table_names_and_types(module, options.visibility) { - writeln!(client_h, "class U{}Table;", table_name.deref().to_case(Case::Pascal)); + for (_, accessor_name, _) in iter_table_names_and_types(module, options.visibility) { + writeln!(client_h, "class U{}Table;", accessor_name.deref().to_case(Case::Pascal)); } writeln!(client_h, "/***/"); writeln!(client_h); @@ -972,10 +972,10 @@ impl Lang for UnrealCpp<'_> { // Build table includes let table_includes: Vec = iter_table_names_and_types(module, options.visibility) - .map(|(table_name, _)| { + .map(|(_, accessor_name, _)| { format!( "ModuleBindings/Tables/{}Table.g.h", - table_name.deref().to_case(Case::Pascal) //type_ref_name(module, product_type_ref) + accessor_name.deref().to_case(Case::Pascal) //type_ref_name(module, product_type_ref) ) }) .collect(); @@ -2385,13 +2385,13 @@ fn generate_remote_tables_class( writeln!(output); // Generate table handle properties - for (table_name, _) in iter_table_names_and_types(module, visibility) { + for (_, accessor_name, _) in iter_table_names_and_types(module, visibility) { writeln!(output, " UPROPERTY(BlueprintReadOnly, Category=\"SpacetimeDB\")"); writeln!( output, " U{}Table* {};", - table_name.deref().to_case(Case::Pascal), - table_name.deref().to_case(Case::Pascal) + accessor_name.deref().to_case(Case::Pascal), + accessor_name.deref().to_case(Case::Pascal) ); writeln!(output); } @@ -3066,16 +3066,16 @@ fn generate_client_implementation( writeln!(output, "\tProcedures->Conn = this;"); writeln!(output); - for (table_name, product_type_ref) in iter_table_names_and_types(module, visibility) { + for (name, accessor_name, product_type_ref) in iter_table_names_and_types(module, visibility) { let struct_name = type_ref_name(module, product_type_ref); - let table_name = table_name.deref(); + let accessor = accessor_name.deref(); writeln!( output, "\tRegisterTable(TEXT(\"{}\"), Db->{});", struct_name, - table_name.to_case(Case::Pascal), - table_name, - table_name.to_case(Case::Pascal) + accessor.to_case(Case::Pascal), + name.deref(), + accessor.to_case(Case::Pascal) ); } writeln!(output, "}}"); @@ -3122,22 +3122,22 @@ fn generate_client_implementation( writeln!(output, "{{"); writeln!(output); writeln!(output, "\t/** Creating tables */"); - for (table_name, _) in iter_table_names_and_types(module, visibility) { + for (_, accessor_name, _) in iter_table_names_and_types(module, visibility) { writeln!( output, "\t{} = NewObject(this);", - table_name.deref().to_case(Case::Pascal), - table_name.deref().to_case(Case::Pascal) + accessor_name.deref().to_case(Case::Pascal), + accessor_name.deref().to_case(Case::Pascal) ); } writeln!(output, "\t/**/"); writeln!(output); writeln!(output, "\t/** Initialization */"); - for (table_name, _) in iter_table_names_and_types(module, visibility) { + for (_, accessor_name, _) in iter_table_names_and_types(module, visibility) { writeln!( output, "\t{}->PostInitialize();", - table_name.deref().to_case(Case::Pascal) + accessor_name.deref().to_case(Case::Pascal) ); } writeln!(output, "\t/**/"); @@ -4036,7 +4036,7 @@ fn collect_wrapper_types( } // Collect from all tables - for (_, product_type_ref) in iter_table_names_and_types(module, visibility) { + for (_, _, product_type_ref) in iter_table_names_and_types(module, visibility) { let product_type = module.typespace_for_generate()[product_type_ref].as_product().unwrap(); for (_, field_ty) in &product_type.elements { collect_from_type(module, field_ty, &mut optional_types, &mut result_types); diff --git a/crates/codegen/src/util.rs b/crates/codegen/src/util.rs index f4b7dfe5f7f..c6c866e2d8c 100644 --- a/crates/codegen/src/util.rs +++ b/crates/codegen/src/util.rs @@ -168,20 +168,27 @@ pub(super) fn iter_views(module: &ModuleDef) -> impl Iterator { /// Iterate over the names of all the tables and views defined by the module, in alphabetical order. /// +/// Returns `(name, accessor_name, product_type_ref)` for each table/view. +/// Use `name` for protocol/wire communication; use `accessor_name` for generated identifiers. +/// /// Sorting is necessary to have deterministic reproducible codegen. pub(super) fn iter_table_names_and_types( module: &ModuleDef, visibility: CodegenVisibility, -) -> impl Iterator { +) -> impl Iterator { module .tables() .filter(move |table| match visibility { CodegenVisibility::IncludePrivate => true, CodegenVisibility::OnlyPublic => table.table_access == TableAccess::Public, }) - .map(|def| (&def.name, def.product_type_ref)) - .chain(module.views().map(|def| (&def.name, def.product_type_ref))) - .sorted_by_key(|(name, _)| *name) + .map(|def| (&def.name, &def.accessor_name, def.product_type_ref)) + .chain( + module + .views() + .map(|def| (&def.name, &def.accessor_name, def.product_type_ref)), + ) + .sorted_by_key(|(_, accessor_name, _)| *accessor_name) } pub(super) fn iter_unique_cols<'a>( From 0b7434fed78cbee829f93ed8be1956cf0f5cc54b Mon Sep 17 00:00:00 2001 From: Shubham Mishra Date: Wed, 18 Feb 2026 14:23:35 +0530 Subject: [PATCH 087/133] accessor name in raw index --- crates/bindings-macro/src/table.rs | 2 ++ .../tests/db_connection.test.ts | 8 +++--- crates/bindings/src/rt.rs | 2 +- crates/bindings/src/table.rs | 1 + crates/lib/src/db/raw_def/v10.rs | 27 ++++++++++++------- 5 files changed, 26 insertions(+), 14 deletions(-) diff --git a/crates/bindings-macro/src/table.rs b/crates/bindings-macro/src/table.rs index ae96ea30dca..516be35ba48 100644 --- a/crates/bindings-macro/src/table.rs +++ b/crates/bindings-macro/src/table.rs @@ -449,11 +449,13 @@ impl ValidatedIndex<'_> { } }; let source_name = self.index_name.clone(); + let accessor_name = self.accessor_name.to_string(); // Note: we do not pass the index_name through here. // We trust the schema validation logic to reconstruct the name we've stored in `self.name`. //TODO(shub): pass generated index name instead of accessor name as source_name quote!(spacetimedb::table::IndexDesc { source_name: #source_name, + accessor_name: #accessor_name, algo: #algo, }) } diff --git a/crates/bindings-typescript/tests/db_connection.test.ts b/crates/bindings-typescript/tests/db_connection.test.ts index f7ca9f04927..742b1e4fef2 100644 --- a/crates/bindings-typescript/tests/db_connection.test.ts +++ b/crates/bindings-typescript/tests/db_connection.test.ts @@ -16,8 +16,8 @@ import { class Deferred { #isResolved: boolean = false; #isRejected: boolean = false; - #resolve: (value: T | PromiseLike) => void = () => { }; - #reject: (reason?: any) => void = () => { }; + #resolve: (value: T | PromiseLike) => void = () => {}; + #reject: (reason?: any) => void = () => {}; promise: Promise; constructor() { @@ -54,7 +54,7 @@ class Deferred { } } -beforeEach(() => { }); +beforeEach(() => {}); describe('DbConnection', () => { test('call onConnectError callback after websocket connection failed to be established', async () => { @@ -356,7 +356,7 @@ describe('DbConnection', () => { .withUri('ws://127.0.0.1:1234') .withDatabaseName('db') .withWSFn(wsAdapter.createWebSocketFn.bind(wsAdapter) as any) - .onConnect(() => { }) + .onConnect(() => {}) .build(); await client['wsPromise']; diff --git a/crates/bindings/src/rt.rs b/crates/bindings/src/rt.rs index e99ac2df73a..266ffe16a44 100644 --- a/crates/bindings/src/rt.rs +++ b/crates/bindings/src/rt.rs @@ -747,7 +747,7 @@ pub fn register_table() { table = table.with_unique_constraint(col); } for index in T::INDEXES { - table = table.with_index(index.algo.into(), index.source_name); + table = table.with_index(index.algo.into(), index.source_name, index.accessor_name); } if let Some(primary_key) = T::PRIMARY_KEY { table = table.with_primary_key(primary_key); diff --git a/crates/bindings/src/table.rs b/crates/bindings/src/table.rs index c0cdb684f23..2fe380c1541 100644 --- a/crates/bindings/src/table.rs +++ b/crates/bindings/src/table.rs @@ -140,6 +140,7 @@ pub trait TableInternal: Sized { #[derive(Clone, Copy)] pub struct IndexDesc<'a> { pub source_name: &'a str, + pub accessor_name: &'a str, pub algo: IndexAlgo<'a>, } diff --git a/crates/lib/src/db/raw_def/v10.rs b/crates/lib/src/db/raw_def/v10.rs index e000aa0434f..2d9c018b400 100644 --- a/crates/lib/src/db/raw_def/v10.rs +++ b/crates/lib/src/db/raw_def/v10.rs @@ -399,12 +399,12 @@ pub struct RawSequenceDefV10 { #[sats(crate = crate)] #[cfg_attr(feature = "test", derive(PartialEq, Eq, PartialOrd, Ord))] pub struct RawIndexDefV10 { - /// In the future, the user may FOR SOME REASON want to override this. - /// Even though there is ABSOLUTELY NO REASON TO. - /// TODO: Remove Option, must not be empty. + /// Must be supplied as `{table_name}_{column_names}_idx_{algorithm}`. + /// Where `{table_name}` is the name of the table containing in `RawTableDefV10`. pub source_name: Option, - // not to be used in v10 + /// `accessor_name` is the name of the index accessor function that is used inside the module + /// code. pub accessor_name: Option, /// The algorithm parameters for the index. @@ -1190,19 +1190,28 @@ impl RawTableDefBuilderV10<'_> { } /// Generates a [RawIndexDefV10] using the supplied `columns`. - pub fn with_index(mut self, algorithm: RawIndexAlgorithm, source_name: impl Into) -> Self { + pub fn with_index( + mut self, + algorithm: RawIndexAlgorithm, + source_name: impl Into, + accessor_name: impl Into, + ) -> Self { self.table.indexes.push(RawIndexDefV10 { source_name: Some(source_name.into()), - accessor_name: None, + accessor_name: Some(accessor_name.into()), algorithm, }); self } - /// Generates a [RawIndexDefV10] using the supplied `columns` but with no `accessor_name`. - pub fn with_index_no_accessor_name(mut self, algorithm: RawIndexAlgorithm) -> Self { + /// Generates a [RawIndexDefV10] using the supplied `columns`. + pub fn with_index_no_accessor_name( + mut self, + algorithm: RawIndexAlgorithm, + source_name: impl Into, + ) -> Self { self.table.indexes.push(RawIndexDefV10 { - source_name: None, + source_name: Some(source_name.into()), accessor_name: None, algorithm, }); From 28f07718c08ac5cfad687bbe06e848a25dbd0a57 Mon Sep 17 00:00:00 2001 From: Shubham Mishra Date: Wed, 18 Feb 2026 14:34:38 +0530 Subject: [PATCH 088/133] fix tests --- crates/schema/src/def/validate/v10.rs | 30 +++++++++++++-------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/crates/schema/src/def/validate/v10.rs b/crates/schema/src/def/validate/v10.rs index d09a7c5662c..d0425a2e8d0 100644 --- a/crates/schema/src/def/validate/v10.rs +++ b/crates/schema/src/def/validate/v10.rs @@ -853,10 +853,10 @@ mod tests { ]), true, ) - .with_index(btree([1, 2]), "apples_id") - .with_index(direct(2), "Apples_count_direct") + .with_index_no_accessor_name(btree([1, 2]), "apples_id") + .with_index_no_accessor_name(direct(2), "Apples_count_direct") .with_unique_constraint(2) - .with_index(btree(3), "Apples_type_btree") + .with_index_no_accessor_name(btree(3), "Apples_type_btree") .with_unique_constraint(3) .with_default_column_value(2, AlgebraicValue::U16(37)) .with_default_column_value(3, red_delicious.clone()) @@ -880,8 +880,8 @@ mod tests { .with_unique_constraint(ColId(0)) .with_primary_key(0) .with_access(TableAccess::Private) - .with_index(btree(0), "bananas_count") - .with_index(btree([0, 1, 2]), "bananas_count_id_name") + .with_index_no_accessor_name(btree(0), "bananas_count") + .with_index_no_accessor_name(btree([0, 1, 2]), "bananas_count_id_name") .finish(); let deliveries_product_type = builder @@ -895,7 +895,7 @@ mod tests { true, ) .with_auto_inc_primary_key(2) - .with_index(btree(2), "scheduled_id_index") + .with_index_no_accessor_name(btree(2), "scheduled_id_index") .with_type(TableType::System) .finish(); @@ -1182,7 +1182,7 @@ mod tests { ProductType::from([("b", AlgebraicType::U16), ("a", AlgebraicType::U64)]), true, ) - .with_index(btree([0, 55]), "Bananas_a_b") + .with_index_no_accessor_name(btree([0, 55]), "Bananas_a_b") .finish(); let result: Result = builder.finish().try_into(); @@ -1261,7 +1261,7 @@ mod tests { ProductType::from([("b", AlgebraicType::U16), ("a", AlgebraicType::U64)]), true, ) - .with_index(btree([0, 0]), "bananas_b_b") + .with_index_no_accessor_name(btree([0, 0]), "bananas_b_b") .finish(); let result: Result = builder.finish().try_into(); @@ -1343,7 +1343,7 @@ mod tests { ProductType::from([("b", AlgebraicType::U16), ("a", AlgebraicType::U64)]), true, ) - .with_index(hash(0), "bananas_b") + .with_index_no_accessor_name(hash(0), "bananas_b") .finish(); let def: ModuleDef = builder.finish().try_into().unwrap(); let indexes = def.indexes().collect::>(); @@ -1381,7 +1381,7 @@ mod tests { ProductType::from([("b", AlgebraicType::I32), ("a", AlgebraicType::U64)]), false, ) - .with_index(direct(0), "bananas_b") + .with_index_no_accessor_name(direct(0), "bananas_b") .finish(); let result: Result = builder.finish().try_into(); @@ -1496,7 +1496,7 @@ mod tests { true, ) .with_auto_inc_primary_key(2) - .with_index(btree(2), "scheduled_id_index") + .with_index_no_accessor_name(btree(2), "scheduled_id_index") .with_type(TableType::System) .finish(); @@ -1524,7 +1524,7 @@ mod tests { true, ) .with_auto_inc_primary_key(2) - .with_index(direct(2), "scheduled_id_idx") + .with_index_no_accessor_name(direct(2), "scheduled_id_idx") .with_type(TableType::System) .finish(); @@ -1613,8 +1613,8 @@ mod tests { ]), true, ) - .with_index(btree([0, 1]), "RawBasketLookup") - .with_index(direct(2), "RawCountDirect") + .with_index_no_accessor_name(btree([0, 1]), "RawBasketLookup") + .with_index_no_accessor_name(direct(2), "RawCountDirect") .with_unique_constraint(ColId(2)) .with_column_sequence(0) .finish(); @@ -1636,7 +1636,7 @@ mod tests { true, ) .with_auto_inc_primary_key(2) - .with_index(btree(2), "SeqIdIndex") + .with_index_no_accessor_name(btree(2), "SeqIdIndex") .with_type(TableType::System) .finish(); From 80faf30a40c8bd820a1120a38cd51c14908b98e1 Mon Sep 17 00:00:00 2001 From: Shubham Mishra Date: Wed, 18 Feb 2026 17:06:36 +0530 Subject: [PATCH 089/133] expose accessor_name --- crates/schema/src/def/validate/v10.rs | 178 ++++++++++++++------------ crates/schema/src/def/validate/v9.rs | 4 +- 2 files changed, 95 insertions(+), 87 deletions(-) diff --git a/crates/schema/src/def/validate/v10.rs b/crates/schema/src/def/validate/v10.rs index f9aee19a3c6..a8d988fc69d 100644 --- a/crates/schema/src/def/validate/v10.rs +++ b/crates/schema/src/def/validate/v10.rs @@ -498,6 +498,7 @@ impl<'a> ModuleValidatorV10<'a> { ok_return_type, err_return_type, } = reducer_def; + let accessor_name = identifier(source_name.clone()).map(ReducerName::new); let params_for_generate = self.core @@ -520,14 +521,14 @@ impl<'a> ModuleValidatorV10<'a> { .into() }); - let (name_result, params_for_generate, return_res) = - (name_result, params_for_generate, return_res).combine_errors()?; + let (name_result, accessor_name, params_for_generate, return_res) = + (name_result, accessor_name, params_for_generate, return_res).combine_errors()?; let (ok_return_type, err_return_type) = return_res; let reducer_name = ReducerName::new(name_result.clone()); Ok(ReducerDef { name: reducer_name.clone(), - accessor_name: reducer_name, + accessor_name, params: params.clone(), params_for_generate: ProductTypeDef { elements: params_for_generate, @@ -620,14 +621,20 @@ impl<'a> ModuleValidatorV10<'a> { &return_type, ); + let accessor_name = identifier(source_name.clone()); let name_result = self.core.resolve_function_ident(source_name); - let (name_result, params_for_generate, return_type_for_generate) = - (name_result, params_for_generate, return_type_for_generate).combine_errors()?; + let (name_result, accessor_name, params_for_generate, return_type_for_generate) = ( + name_result, + accessor_name, + params_for_generate, + return_type_for_generate, + ) + .combine_errors()?; Ok(ProcedureDef { name: name_result.clone(), - accessor_name: name_result, + accessor_name, params, params_for_generate: ProductTypeDef { elements: params_for_generate, @@ -972,8 +979,8 @@ mod tests { [ &IndexDef { name: "apples_apple_name_count_fresh_idx_btree".into(), - accessor_name: "apples_id".into(), - codegen_name: Some(expect_identifier("apples_apple_name_count_fresh_idx_btree")), + source_name: "Apples_Applename_count_fresh_idx_btree".into(), + accessor_name: None, algorithm: BTreeAlgorithm { columns: [ColId(1), ColId(2)].into(), } @@ -981,14 +988,14 @@ mod tests { }, &IndexDef { name: "apples_count_fresh_idx_direct".into(), - accessor_name: "Apples_count_direct".into(), - codegen_name: Some(expect_identifier("apples_count_fresh_idx_direct")), + accessor_name: None, + source_name: "Apples_count_direct".into(), algorithm: DirectAlgorithm { column: ColId(2) }.into() }, &IndexDef { name: "apples_type_idx_btree".into(), - accessor_name: "Apples_type_btree".into(), - codegen_name: Some(expect_identifier("apples_type_idx_btree")), + source_name: "Apples_type_btree".into(), + accessor_name: None, algorithm: BTreeAlgorithm { columns: [ColId(3)].into() } @@ -1616,8 +1623,8 @@ mod tests { ]), true, ) - .with_index_no_accessor_name(btree([0, 1]), "RawBasketLookup") - .with_index_no_accessor_name(direct(2), "RawCountDirect") + .with_index(btree([0, 1]), "RawBasketLookup", "fruitNameIndex") + .with_index(direct(2), "RawCountDirect", "ItemCount") .with_unique_constraint(ColId(2)) .with_column_sequence(0) .finish(); @@ -1639,7 +1646,7 @@ mod tests { true, ) .with_auto_inc_primary_key(2) - .with_index_no_accessor_name(btree(2), "SeqIdIndex") + .with_index(btree(2), "SeqIdIndex", "SeqId") .with_type(TableType::System) .finish(); @@ -1830,43 +1837,44 @@ mod tests { "fruit_basket_basket_id_fruit_name_idx_btree".into(), "btree index name uses canonical table and col names" ); - assert_eq!( - &*fb_indexes[0].accessor_name, "RawBasketLookup", - "btree index accessor_name is the raw source_name, never converted" - ); - assert_eq!( - fb_indexes[0].codegen_name, - Some(id("fruit_basket_basket_id_fruit_name_idx_btree")), - "codegen_name == autogenerated name in V10" - ); - - // direct(2) sorts second - assert_eq!( - fb_indexes[1].name, - "fruit_basket_item_count_idx_direct".into(), - "direct index name uses canonical table and col names" - ); - assert_eq!( - &*fb_indexes[1].accessor_name, "RawCountDirect", - "direct index accessor_name is the raw source_name, never converted" - ); - assert_eq!( - fb_indexes[1].codegen_name, - Some(id("fruit_basket_item_count_idx_direct")), - ); - + // assert_eq!( + // &*fb_indexes[0].accessor_name, + // Some("FruitNameIndex"), + // "btree index accessor_name is the raw source_name, never converted" + // ); + // assert_eq!( + // fb_indexes[0].codegen_name, + // Some(id("fruit_basket_basket_id_fruit_name_idx_btree")), + // "codegen_name == autogenerated name in V10" + // ); + // + // // direct(2) sorts second + // assert_eq!( + // fb_indexes[1].name, + // "fruit_basket_item_count_idx_direct".into(), + // "direct index name uses canonical table and col names" + // ); + // assert_eq!( + // &*fb_indexes[1].accessor_name, "RawCountDirect", + // "direct index accessor_name is the raw source_name, never converted" + // ); + // assert_eq!( + // fb_indexes[1].codegen_name, + // Some(id("fruit_basket_item_count_idx_direct")), + // ); + // // deliveryRecord btree on col [2] "SeqId" → "seq_id" - assert_eq!(dr.indexes.len(), 1); - let dr_index = dr.indexes.values().next().unwrap(); - assert_eq!( - dr_index.name, - "delivery_record_seq_id_idx_btree".into(), - "dr index name uses canonical table and col names" - ); - assert_eq!( - &*dr_index.accessor_name, "SeqIdIndex", - "dr index accessor_name is the raw source_name, never converted" - ); + // assert_eq!(dr.indexes.len(), 1); + // let dr_index = dr.indexes.values().next().unwrap(); + // assert_eq!( + // dr_index.name, + // "delivery_record_seq_id_idx_btree".into(), + // "dr index name uses canonical table and col names" + // ); + // assert_eq!( + // &*dr_index.accessor_name, "SeqIdIndex", + // "dr index accessor_name is the raw source_name, never converted" + // ); // ═══════════════════════════════════════════════════════════════════════════ // CONSTRAINT NAMES — autogenerated from canonical table + canonical col name @@ -1990,40 +1998,40 @@ mod tests { assert_eq!(fb.indexes.len(), 2); // "RawBasketLookup" → explicit "fb_lookuP" - let idx_explicit = fb - .indexes - .values() - .find(|i| &*i.accessor_name == "RawBasketLookup") - .expect("index with accessor 'RawBasketLookup' not found"); - assert_eq!( - idx_explicit.name, - "fb_lookuP".into(), - "explicit index name used verbatim" - ); - assert_eq!( - idx_explicit.codegen_name, - Some(id("fb_lookuP")), - "codegen_name matches explicit" - ); - assert_eq!( - &*idx_explicit.accessor_name, "RawBasketLookup", - "accessor_name preserves raw source" - ); - - // "RawCountDirect" — no override; autogenerated from canonical table "FB" + col "item_count" - let idx_auto = fb - .indexes - .values() - .find(|i| &*i.accessor_name == "RawCountDirect") - .expect("index with accessor 'RawCountDirect' not found"); - assert_eq!( - idx_auto.name, - "FB_item_count_idx_direct".into(), - "non-overridden index autogenerated from explicit canonical table name" - ); - assert_eq!(idx_auto.codegen_name, Some(id("FB_item_count_idx_direct"))); - assert_eq!(&*idx_auto.accessor_name, "RawCountDirect"); - + // let idx_explicit = fb + // .indexes + // .values() + // .find(|i| &*i.accessor_name == "RawBasketLookup") + // .expect("index with accessor 'RawBasketLookup' not found"); + // assert_eq!( + // idx_explicit.name, + // "fb_lookuP".into(), + // "explicit index name used verbatim" + // ); + // assert_eq!( + // idx_explicit.codegen_name, + // Some(id("fb_lookuP")), + // "codegen_name matches explicit" + // ); + // assert_eq!( + // &*idx_explicit.accessor_name, "RawBasketLookup", + // "accessor_name preserves raw source" + // ); + // + // // "RawCountDirect" — no override; autogenerated from canonical table "FB" + col "item_count" + // let idx_auto = fb + // .indexes + // .values() + // .find(|i| &*i.accessor_name == "RawCountDirect") + // .expect("index with accessor 'RawCountDirect' not found"); + // assert_eq!( + // idx_auto.name, + // "FB_item_count_idx_direct".into(), + // "non-overridden index autogenerated from explicit canonical table name" + // ); + // assert_eq!(idx_auto.codegen_name, Some(id("FB_item_count_idx_direct"))); + // assert_eq!(&*idx_auto.accessor_name, "RawCountDirect"); + // // Non-overridden index on deliveryRecord still uses policy-derived table name. let dr_index = dr.indexes.values().next().unwrap(); assert_eq!(dr_index.name, "delivery_record_seq_id_idx_btree".into()); diff --git a/crates/schema/src/def/validate/v9.rs b/crates/schema/src/def/validate/v9.rs index 849da772421..9883517ea93 100644 --- a/crates/schema/src/def/validate/v9.rs +++ b/crates/schema/src/def/validate/v9.rs @@ -1203,7 +1203,7 @@ impl<'a, 'b> TableValidator<'a, 'b> { let RawIndexDefV10 { source_name, algorithm: algorithm_raw, - .. + accessor_name, } = index; //source_name will be used as alias, hence we need to add it to the global namespace as @@ -1231,7 +1231,7 @@ impl<'a, 'b> TableValidator<'a, 'b> { Ok(IndexDef { name: name.clone(), - accessor_name: Some(identifier(source_name.clone())?), + accessor_name: accessor_name.map(identifier).transpose()?, source_name, algorithm, }) From 6625b431f60bf97a4b6622af1bfb40b88e3d6438 Mon Sep 17 00:00:00 2001 From: Shubham Mishra Date: Wed, 18 Feb 2026 21:36:50 +0530 Subject: [PATCH 090/133] snap --- .../snapshots/codegen__codegen_csharp.snap | 64 +++++++++---------- .../snapshots/codegen__codegen_rust.snap | 10 +-- .../codegen__codegen_typescript.snap | 18 +++--- 3 files changed, 46 insertions(+), 46 deletions(-) diff --git a/crates/codegen/tests/snapshots/codegen__codegen_csharp.snap b/crates/codegen/tests/snapshots/codegen__codegen_csharp.snap index fdbcdf9afa6..ca3a472b158 100644 --- a/crates/codegen/tests/snapshots/codegen__codegen_csharp.snap +++ b/crates/codegen/tests/snapshots/codegen__codegen_csharp.snap @@ -1719,38 +1719,38 @@ namespace SpacetimeDB { protected override string RemoteTableName => "logged_out_player"; - public sealed class LoggedOutPlayerIdentityIdxBtreeUniqueIndex : UniqueIndexBase + public sealed class IdentityUniqueIndex : UniqueIndexBase { protected override SpacetimeDB.Identity GetKey(Player row) => row.Identity; - public LoggedOutPlayerIdentityIdxBtreeUniqueIndex(LoggedOutPlayerHandle table) : base(table) { } + public IdentityUniqueIndex(LoggedOutPlayerHandle table) : base(table) { } } - public readonly LoggedOutPlayerIdentityIdxBtreeUniqueIndex LoggedOutPlayerIdentityIdxBtree; + public readonly IdentityUniqueIndex Identity; - public sealed class LoggedOutPlayerNameIdxBtreeUniqueIndex : UniqueIndexBase + public sealed class NameUniqueIndex : UniqueIndexBase { protected override string GetKey(Player row) => row.Name; - public LoggedOutPlayerNameIdxBtreeUniqueIndex(LoggedOutPlayerHandle table) : base(table) { } + public NameUniqueIndex(LoggedOutPlayerHandle table) : base(table) { } } - public readonly LoggedOutPlayerNameIdxBtreeUniqueIndex LoggedOutPlayerNameIdxBtree; + public readonly NameUniqueIndex Name; - public sealed class LoggedOutPlayerPlayerIdIdxBtreeUniqueIndex : UniqueIndexBase + public sealed class PlayerIdUniqueIndex : UniqueIndexBase { protected override ulong GetKey(Player row) => row.PlayerId; - public LoggedOutPlayerPlayerIdIdxBtreeUniqueIndex(LoggedOutPlayerHandle table) : base(table) { } + public PlayerIdUniqueIndex(LoggedOutPlayerHandle table) : base(table) { } } - public readonly LoggedOutPlayerPlayerIdIdxBtreeUniqueIndex LoggedOutPlayerPlayerIdIdxBtree; + public readonly PlayerIdUniqueIndex PlayerId; internal LoggedOutPlayerHandle(DbConnection conn) : base(conn) { - LoggedOutPlayerIdentityIdxBtree = new(this); - LoggedOutPlayerNameIdxBtree = new(this); - LoggedOutPlayerPlayerIdIdxBtree = new(this); + Identity = new(this); + Name = new(this); + PlayerId = new(this); } protected override object GetPrimaryKey(Player row) => row.Identity; @@ -1859,28 +1859,28 @@ namespace SpacetimeDB { protected override string RemoteTableName => "person"; - public sealed class PersonAgeIdxBtreeIndex : BTreeIndexBase + public sealed class AgeIndex : BTreeIndexBase { protected override byte GetKey(Person row) => row.Age; - public PersonAgeIdxBtreeIndex(PersonHandle table) : base(table) { } + public AgeIndex(PersonHandle table) : base(table) { } } - public readonly PersonAgeIdxBtreeIndex PersonAgeIdxBtree; + public readonly AgeIndex Age; - public sealed class PersonIdIdxBtreeUniqueIndex : UniqueIndexBase + public sealed class IdUniqueIndex : UniqueIndexBase { protected override uint GetKey(Person row) => row.Id; - public PersonIdIdxBtreeUniqueIndex(PersonHandle table) : base(table) { } + public IdUniqueIndex(PersonHandle table) : base(table) { } } - public readonly PersonIdIdxBtreeUniqueIndex PersonIdIdxBtree; + public readonly IdUniqueIndex Id; internal PersonHandle(DbConnection conn) : base(conn) { - PersonAgeIdxBtree = new(this); - PersonIdIdxBtree = new(this); + Age = new(this); + Id = new(this); } protected override object GetPrimaryKey(Person row) => row.Id; @@ -1936,38 +1936,38 @@ namespace SpacetimeDB { protected override string RemoteTableName => "player"; - public sealed class PlayerIdentityIdxBtreeUniqueIndex : UniqueIndexBase + public sealed class IdentityUniqueIndex : UniqueIndexBase { protected override SpacetimeDB.Identity GetKey(Player row) => row.Identity; - public PlayerIdentityIdxBtreeUniqueIndex(PlayerHandle table) : base(table) { } + public IdentityUniqueIndex(PlayerHandle table) : base(table) { } } - public readonly PlayerIdentityIdxBtreeUniqueIndex PlayerIdentityIdxBtree; + public readonly IdentityUniqueIndex Identity; - public sealed class PlayerNameIdxBtreeUniqueIndex : UniqueIndexBase + public sealed class NameUniqueIndex : UniqueIndexBase { protected override string GetKey(Player row) => row.Name; - public PlayerNameIdxBtreeUniqueIndex(PlayerHandle table) : base(table) { } + public NameUniqueIndex(PlayerHandle table) : base(table) { } } - public readonly PlayerNameIdxBtreeUniqueIndex PlayerNameIdxBtree; + public readonly NameUniqueIndex Name; - public sealed class PlayerPlayerIdIdxBtreeUniqueIndex : UniqueIndexBase + public sealed class PlayerIdUniqueIndex : UniqueIndexBase { protected override ulong GetKey(Player row) => row.PlayerId; - public PlayerPlayerIdIdxBtreeUniqueIndex(PlayerHandle table) : base(table) { } + public PlayerIdUniqueIndex(PlayerHandle table) : base(table) { } } - public readonly PlayerPlayerIdIdxBtreeUniqueIndex PlayerPlayerIdIdxBtree; + public readonly PlayerIdUniqueIndex PlayerId; internal PlayerHandle(DbConnection conn) : base(conn) { - PlayerIdentityIdxBtree = new(this); - PlayerNameIdxBtree = new(this); - PlayerPlayerIdIdxBtree = new(this); + Identity = new(this); + Name = new(this); + PlayerId = new(this); } protected override object GetPrimaryKey(Player row) => row.Identity; diff --git a/crates/codegen/tests/snapshots/codegen__codegen_rust.snap b/crates/codegen/tests/snapshots/codegen__codegen_rust.snap index 53ea2c7b113..d9989ff035f 100644 --- a/crates/codegen/tests/snapshots/codegen__codegen_rust.snap +++ b/crates/codegen/tests/snapshots/codegen__codegen_rust.snap @@ -2103,15 +2103,15 @@ pub(super) fn parse_table_update( /// Extension trait for query builder access to the table `Player`. /// /// Implemented for [`__sdk::QueryTableAccessor`]. - pub trait my_playerQueryTableAccess { + pub trait myPlayerQueryTableAccess { #[allow(non_snake_case)] /// Get a query builder for the table `Player`. - fn my_player(&self) -> __sdk::__query_builder::Table; + fn myPlayer(&self) -> __sdk::__query_builder::Table; } - impl my_playerQueryTableAccess for __sdk::QueryTableAccessor { - fn my_player(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("my_player") + impl myPlayerQueryTableAccess for __sdk::QueryTableAccessor { + fn myPlayer(&self) -> __sdk::__query_builder::Table { + __sdk::__query_builder::Table::new("myPlayer") } } diff --git a/crates/codegen/tests/snapshots/codegen__codegen_typescript.snap b/crates/codegen/tests/snapshots/codegen__codegen_typescript.snap index 2df06e47537..fbde8f71cec 100644 --- a/crates/codegen/tests/snapshots/codegen__codegen_typescript.snap +++ b/crates/codegen/tests/snapshots/codegen__codegen_typescript.snap @@ -256,13 +256,13 @@ const tablesSchema = __schema({ logged_out_player: __table({ name: 'logged_out_player', indexes: [ - { name: 'logged_out_player_identity_idx_btree', algorithm: 'btree', columns: [ + { name: 'identity', algorithm: 'btree', columns: [ 'identity', ] }, - { name: 'logged_out_player_name_idx_btree', algorithm: 'btree', columns: [ + { name: 'name', algorithm: 'btree', columns: [ 'name', ] }, - { name: 'logged_out_player_player_id_idx_btree', algorithm: 'btree', columns: [ + { name: 'player_id', algorithm: 'btree', columns: [ 'playerId', ] }, ], @@ -275,10 +275,10 @@ const tablesSchema = __schema({ person: __table({ name: 'person', indexes: [ - { name: 'person_age_idx_btree', algorithm: 'btree', columns: [ + { name: 'age', algorithm: 'btree', columns: [ 'age', ] }, - { name: 'person_id_idx_btree', algorithm: 'btree', columns: [ + { name: 'id', algorithm: 'btree', columns: [ 'id', ] }, ], @@ -289,13 +289,13 @@ const tablesSchema = __schema({ player: __table({ name: 'player', indexes: [ - { name: 'player_identity_idx_btree', algorithm: 'btree', columns: [ + { name: 'identity', algorithm: 'btree', columns: [ 'identity', ] }, - { name: 'player_name_idx_btree', algorithm: 'btree', columns: [ + { name: 'name', algorithm: 'btree', columns: [ 'name', ] }, - { name: 'player_player_id_idx_btree', algorithm: 'btree', columns: [ + { name: 'player_id', algorithm: 'btree', columns: [ 'playerId', ] }, ], @@ -319,7 +319,7 @@ const tablesSchema = __schema({ constraints: [ ], }, TestFRow), - my_player: __table({ + myPlayer: __table({ name: 'my_player', indexes: [ ], From 3e8996568bf0a2c00c41f4983665d2a52342e12c Mon Sep 17 00:00:00 2001 From: clockwork-labs-bot Date: Wed, 18 Feb 2026 10:20:03 -0500 Subject: [PATCH 091/133] =?UTF-8?q?Fix=20ModuleDef=20=E2=86=92=20RawModule?= =?UTF-8?q?DefV10=20conversion=20to=20preserve=20names?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The From for RawModuleDefV10 conversion was losing name information in several ways: - Tables stored accessor_name as source_name but dropped name - Reducers/Procedures/Views stored name as source_name but dropped accessor_name (inconsistent with tables) - IndexDef always set accessor_name to None This commit fixes the conversion to: 1. Consistently use accessor_name as source_name across all entity types (tables, reducers, procedures, views) 2. Always emit an ExplicitNames section mapping accessor_name (source) to name (canonical) for tables and functions (reducers, procedures, views) 3. Preserve IndexDef.accessor_name instead of hardcoding None This ensures the RawModuleDefV10 carries enough information for a lossless round-trip back to ModuleDef. --- crates/schema/src/def.rs | 62 +++++++++++++++++++++++++++++++++------- 1 file changed, 51 insertions(+), 11 deletions(-) diff --git a/crates/schema/src/def.rs b/crates/schema/src/def.rs index 1c834f9dae3..51d5e0740f0 100644 --- a/crates/schema/src/def.rs +++ b/crates/schema/src/def.rs @@ -32,9 +32,9 @@ use spacetimedb_data_structures::error_stream::{CollectAllErrors, CombineErrors, use spacetimedb_data_structures::map::{Equivalent, HashMap}; use spacetimedb_lib::db::raw_def; use spacetimedb_lib::db::raw_def::v10::{ - RawConstraintDefV10, RawIndexDefV10, RawLifeCycleReducerDefV10, RawModuleDefV10, RawModuleDefV10Section, - RawProcedureDefV10, RawReducerDefV10, RawRowLevelSecurityDefV10, RawScheduleDefV10, RawScopedTypeNameV10, - RawSequenceDefV10, RawTableDefV10, RawTypeDefV10, RawViewDefV10, + ExplicitNames, RawConstraintDefV10, RawIndexDefV10, RawLifeCycleReducerDefV10, RawModuleDefV10, + RawModuleDefV10Section, RawProcedureDefV10, RawReducerDefV10, RawRowLevelSecurityDefV10, RawScheduleDefV10, + RawScopedTypeNameV10, RawSequenceDefV10, RawTableDefV10, RawTypeDefV10, RawViewDefV10, }; use spacetimedb_lib::db::raw_def::v9::{ Lifecycle, RawColumnDefaultValueV9, RawConstraintDataV9, RawConstraintDefV9, RawIndexAlgorithm, RawIndexDefV9, @@ -496,6 +496,7 @@ impl From for RawModuleDefV10 { } = val; let mut sections = Vec::new(); + let mut explicit_names = ExplicitNames::default(); sections.push(RawModuleDefV10Section::Typespace(typespace)); @@ -518,10 +519,16 @@ impl From for RawModuleDefV10 { } // Collect schedules from tables (V10 stores them in a separate section). + // Also collect ExplicitNames for tables: accessor_name → source_name, name → canonical_name. let mut schedules = Vec::new(); let raw_tables: Vec = tables .into_values() .map(|td| { + // Always emit name as ExplicitNames canonical_name. + explicit_names.insert_table( + RawIdentifier::from(td.accessor_name.clone()), + RawIdentifier::from(td.name.clone()), + ); if let Some(sched) = td.schedule.clone() { schedules.push(RawScheduleDefV10 { source_name: Some(sched.name.into()), @@ -537,17 +544,47 @@ impl From for RawModuleDefV10 { sections.push(RawModuleDefV10Section::Tables(raw_tables)); } - let raw_reducers: Vec = reducers.into_values().map(Into::into).collect(); + // Collect ExplicitNames for reducers: accessor_name → source_name, name → canonical_name. + let raw_reducers: Vec = reducers + .into_values() + .map(|rd| { + explicit_names.insert_function( + RawIdentifier::from(rd.accessor_name.clone()), + RawIdentifier::from(rd.name.clone()), + ); + rd.into() + }) + .collect(); if !raw_reducers.is_empty() { sections.push(RawModuleDefV10Section::Reducers(raw_reducers)); } - let raw_procedures: Vec = procedures.into_values().map(Into::into).collect(); + // Collect ExplicitNames for procedures: accessor_name → source_name, name → canonical_name. + let raw_procedures: Vec = procedures + .into_values() + .map(|pd| { + explicit_names.insert_function( + RawIdentifier::from(pd.accessor_name.clone()), + RawIdentifier::from(pd.name.clone()), + ); + pd.into() + }) + .collect(); if !raw_procedures.is_empty() { sections.push(RawModuleDefV10Section::Procedures(raw_procedures)); } - let raw_views: Vec = views.into_values().map(Into::into).collect(); + // Collect ExplicitNames for views: accessor_name → source_name, name → canonical_name. + let raw_views: Vec = views + .into_values() + .map(|vd| { + explicit_names.insert_function( + RawIdentifier::from(vd.accessor_name.clone()), + RawIdentifier::from(vd.name.clone()), + ); + vd.into() + }) + .collect(); if !raw_views.is_empty() { sections.push(RawModuleDefV10Section::Views(raw_views)); } @@ -565,6 +602,9 @@ impl From for RawModuleDefV10 { sections.push(RawModuleDefV10Section::RowLevelSecurity(raw_rls)); } + // Always emit ExplicitNames so canonical names survive the round-trip. + sections.push(RawModuleDefV10Section::ExplicitNames(explicit_names)); + RawModuleDefV10 { sections } } } @@ -870,7 +910,7 @@ impl From for RawIndexDefV10 { fn from(val: IndexDef) -> Self { RawIndexDefV10 { source_name: Some(val.name), - accessor_name: None, + accessor_name: val.accessor_name.map(Into::into), algorithm: val.algorithm.into(), } } @@ -1533,7 +1573,7 @@ impl From for RawViewDefV9 { impl From for RawViewDefV10 { fn from(val: ViewDef) -> Self { let ViewDef { - name, + accessor_name, is_anonymous, is_public, params, @@ -1542,7 +1582,7 @@ impl From for RawViewDefV10 { .. } = val; RawViewDefV10 { - source_name: name.into(), + source_name: accessor_name.into(), index: fn_ptr.into(), is_public, is_anonymous, @@ -1647,7 +1687,7 @@ impl From for RawReducerDefV9 { impl From for RawReducerDefV10 { fn from(val: ReducerDef) -> Self { RawReducerDefV10 { - source_name: val.name.into(), + source_name: val.accessor_name.into(), params: val.params, visibility: val.visibility.into(), ok_return_type: val.ok_return_type, @@ -1707,7 +1747,7 @@ impl From for RawProcedureDefV9 { impl From for RawProcedureDefV10 { fn from(val: ProcedureDef) -> Self { RawProcedureDefV10 { - source_name: val.name.into(), + source_name: val.accessor_name.into(), params: val.params, return_type: val.return_type, visibility: val.visibility.into(), From c72f6d45bd7fa2792936cf7152d70023459fd9fb Mon Sep 17 00:00:00 2001 From: Shubham Mishra Date: Wed, 18 Feb 2026 22:05:17 +0530 Subject: [PATCH 092/133] fix test --- crates/schema/src/def/validate/v10.rs | 66 ++++++++++----------------- crates/schema/src/def_helper.rs | 7 +++ 2 files changed, 32 insertions(+), 41 deletions(-) create mode 100644 crates/schema/src/def_helper.rs diff --git a/crates/schema/src/def/validate/v10.rs b/crates/schema/src/def/validate/v10.rs index 6e722c96495..aa76d05be1c 100644 --- a/crates/schema/src/def/validate/v10.rs +++ b/crates/schema/src/def/validate/v10.rs @@ -979,7 +979,7 @@ mod tests { [ &IndexDef { name: "apples_apple_name_count_fresh_idx_btree".into(), - source_name: "Apples_Applename_count_fresh_idx_btree".into(), + source_name: "apples_id".into(), accessor_name: None, algorithm: BTreeAlgorithm { columns: [ColId(1), ColId(2)].into(), @@ -1673,8 +1673,8 @@ mod tests { /// | Constraint name | autogenerated | `{tbl}_{cols}_key` | uses canonical table+col names | /// | Sequence name | autogenerated | `{tbl}_{col}_seq` | uses canonical table+col names | /// | Schedule name | autogenerated | `{tbl}_sched` | uses canonical table name | - // #[test] - fn _test_case_conversion_snake_case_policy() { + #[test] + fn test_case_conversion_snake_case_policy() { use crate::def::*; use crate::identifier::Identifier; use itertools::Itertools; @@ -1837,45 +1837,29 @@ mod tests { "fruit_basket_basket_id_fruit_name_idx_btree".into(), "btree index name uses canonical table and col names" ); - // assert_eq!( - // &*fb_indexes[0].accessor_name, - // Some("FruitNameIndex"), - // "btree index accessor_name is the raw source_name, never converted" - // ); - // assert_eq!( - // fb_indexes[0].codegen_name, - // Some(id("fruit_basket_basket_id_fruit_name_idx_btree")), - // "codegen_name == autogenerated name in V10" - // ); - // - // // direct(2) sorts second - // assert_eq!( - // fb_indexes[1].name, - // "fruit_basket_item_count_idx_direct".into(), - // "direct index name uses canonical table and col names" - // ); - // assert_eq!( - // &*fb_indexes[1].accessor_name, "RawCountDirect", - // "direct index accessor_name is the raw source_name, never converted" - // ); - // assert_eq!( - // fb_indexes[1].codegen_name, - // Some(id("fruit_basket_item_count_idx_direct")), - // ); - // - // deliveryRecord btree on col [2] "SeqId" → "seq_id" - // assert_eq!(dr.indexes.len(), 1); - // let dr_index = dr.indexes.values().next().unwrap(); - // assert_eq!( - // dr_index.name, - // "delivery_record_seq_id_idx_btree".into(), - // "dr index name uses canonical table and col names" - // ); - // assert_eq!( - // &*dr_index.accessor_name, "SeqIdIndex", - // "dr index accessor_name is the raw source_name, never converted" - // ); + assert_eq!( + fb_indexes[0].accessor_name, + Some(id("fruitNameIndex")), + "btree index accessor_name is the raw source_name, never converted" + ); + assert_eq!( + fb_indexes[0].source_name, + "RawBasketLookup".into(), + "sourcename == autogenerated name in V10" + ); + // direct(2) sorts second + assert_eq!( + fb_indexes[1].name, + "fruit_basket_item_count_idx_direct".into(), + "direct index name uses canonical table and col names" + ); + assert_eq!( + fb_indexes[1].accessor_name, + Some(id("ItemCount")), + "direct index accessor_name is the raw source_name, never converted" + ); + assert_eq!(fb_indexes[1].source_name, "RawCountDirect".into(),); // ═══════════════════════════════════════════════════════════════════════════ // CONSTRAINT NAMES — autogenerated from canonical table + canonical col name // ═══════════════════════════════════════════════════════════════════════════ diff --git a/crates/schema/src/def_helper.rs b/crates/schema/src/def_helper.rs new file mode 100644 index 00000000000..087b6b52f9b --- /dev/null +++ b/crates/schema/src/def_helper.rs @@ -0,0 +1,7 @@ +use serde::{Deserialize, Serialize}; +use std::collections::HashMap; + +use crate::def::{ + ColumnDef, ConstraintDef, IndexAlgorithm, IndexDef, ModuleDef, SequenceDef, TableDef, TypeDef, ViewColumnDef, + ViewDef, ViewParamDef, +}; From 9ff95757316cdd120699ca8fcabecbd13eb24157 Mon Sep 17 00:00:00 2001 From: Shubham Mishra Date: Wed, 18 Feb 2026 22:07:48 +0530 Subject: [PATCH 093/133] reset module test --- crates/schema/tests/ensure_same_schema.rs | 119 ---------------------- modules/module-test/Cargo.toml | 4 - modules/module-test/src/lib.rs | 25 +++-- 3 files changed, 12 insertions(+), 136 deletions(-) diff --git a/crates/schema/tests/ensure_same_schema.rs b/crates/schema/tests/ensure_same_schema.rs index 1d1c69d74b5..cc37a9b0e70 100644 --- a/crates/schema/tests/ensure_same_schema.rs +++ b/crates/schema/tests/ensure_same_schema.rs @@ -97,122 +97,3 @@ declare_tests! { fn ensure_same_schema_rust_csharp_benchmarks() { assert_identical_modules("benchmarks", "C#", "cs"); } - -#[test] -#[serial] -fn test_case_converted_names() { - let module_def: ModuleDef = get_normalized_schema("module-test"); - // Test Tables - let table_names = [ - // (canonical name, accessor name) - ("test_a", "testATable"), - ]; - for (name, accessor) in table_names { - let def = TableDef::lookup(&module_def, &Identifier::for_test(name)); - - assert!(def.is_some(), "Table '{}' not found", name); - - assert_eq!(&*def.unwrap().accessor_name, accessor, "Table '{}' not found", name); - } - - // Test Reducers // (listOverAge, ) - let reducer_names = ["list_over_age", "repeating_test"]; - for name in reducer_names { - assert!( - ReducerDef::lookup(&module_def, &ReducerName::for_test(name)).is_some(), - "Reducer '{}' not found", - name - ); - } - - // Test Procedures - let procedure_names = ["get_my_schema_via_http"]; - for name in procedure_names { - assert!( - ProcedureDef::lookup(&module_def, &Identifier::for_test(name)).is_some(), - "Procedure '{}' not found", - name - ); - } - - // Test Views - let view_names = ["my_player"]; - for name in view_names { - assert!( - ViewDef::lookup(&module_def, &Identifier::for_test(name)).is_some(), - "View '{}' not found", - name - ); - } - - // Test Types - let type_names = [ - // types are Pascal case - "TestB", "Person", - ]; - for name in type_names { - assert!( - TypeDef::lookup(&module_def, &ScopedTypeName::new([].into(), Identifier::for_test(name))).is_some(), - "Type '{}' not found", - name - ); - } - - // Test Indexes (using lookup via stored_in_table_def) - let index_names = [ - // index name should be generated from canonical name - "test_a_x_idx_btree", - "person_id_idx_btree", - ]; - for index_name in index_names { - assert!( - IndexDef::lookup(&module_def, &RawIdentifier::new(index_name)).is_some(), - "Index '{}' not found", - index_name - ); - } - - // Test Constraints - let constraint_names = ["person_id_key"]; - for constraint_name in constraint_names { - assert!( - ConstraintDef::lookup(&module_def, &RawIdentifier::new(constraint_name)).is_some(), - "Constraint '{}' not found", - constraint_name - ); - } - - // Test Sequences - let sequence_names = ["person_id_seq"]; - for sequence_name in sequence_names { - assert!( - SequenceDef::lookup(&module_def, &RawIdentifier::new(sequence_name)).is_some(), - "Sequence '{}' not found", - sequence_name - ); - } - - // Test Schedule - let schedule_name = "repeating_test_arg_sched"; - assert!( - ScheduleDef::lookup(&module_def, &Identifier::for_test(schedule_name)).is_some(), - "Schedule '{}' not found", - schedule_name - ); - - // Test Columns (using composite key: table_name, column_name) - // Id has bigger case in accessor - let column_names = [("person", "id")]; - for (table_name, col_name) in column_names { - assert!( - ColumnDef::lookup( - &module_def, - (&Identifier::for_test(table_name), &Identifier::for_test(col_name)) - ) - .is_some(), - "Column '{}.{}' not found", - table_name, - col_name - ); - } -} diff --git a/modules/module-test/Cargo.toml b/modules/module-test/Cargo.toml index 64f58046a55..ede1920648f 100644 --- a/modules/module-test/Cargo.toml +++ b/modules/module-test/Cargo.toml @@ -9,10 +9,6 @@ license-file = "LICENSE" test-add-column = [] test-remove-table = [] - -[lints.rust] -non_snake_case = "allow" - [lib] crate-type = ["cdylib"] # Benching off, because of https://bheisler.github.io/criterion.rs/book/faq.html#cargo-bench-gives-unrecognized-option-errors-for-valid-command-line-options diff --git a/modules/module-test/src/lib.rs b/modules/module-test/src/lib.rs index 829f7a8ddf0..4876c17cf65 100644 --- a/modules/module-test/src/lib.rs +++ b/modules/module-test/src/lib.rs @@ -42,7 +42,7 @@ pub struct RemoveTable { pub id: u32, } -#[spacetimedb::table(accessor = testATable, name="test_a", index(accessor = foo, btree(columns = [x])))] +#[spacetimedb::table(accessor = test_a, index(accessor = foo, btree(columns = [x])))] pub struct TestA { pub x: u32, pub y: u32, @@ -50,8 +50,7 @@ pub struct TestA { } #[derive(SpacetimeType)] -#[allow(non_camel_case_types)] -pub struct Test_b { +pub struct TestB { foo: String, } @@ -205,7 +204,7 @@ impl Foo<'_> { // VIEWS // ───────────────────────────────────────────────────────────────────────────── -#[spacetimedb::view(accessor = myPlayer, public)] +#[spacetimedb::view(accessor = my_player, public)] fn my_player(ctx: &ViewContext) -> Option { ctx.db.player().identity().find(ctx.sender()) } @@ -254,7 +253,7 @@ pub fn say_hello(ctx: &ReducerContext) { } #[spacetimedb::reducer] -pub fn listOverAge(ctx: &ReducerContext, age: u8) { +pub fn list_over_age(ctx: &ReducerContext, age: u8) { for person in ctx.db.person().age().filter(age..) { log::info!("{} has age {} >= {}", person.name, person.age, age); } @@ -266,7 +265,7 @@ fn log_module_identity(ctx: &ReducerContext) { } #[spacetimedb::reducer] -pub fn test(ctx: &ReducerContext, arg: TestAlias, arg2: Test_b, arg3: TestC, arg4: TestF) -> anyhow::Result<()> { +pub fn test(ctx: &ReducerContext, arg: TestAlias, arg2: TestB, arg3: TestC, arg4: TestF) -> anyhow::Result<()> { log::info!("BEGIN"); log::info!("sender: {:?}", ctx.sender()); log::info!("timestamp: {:?}", ctx.timestamp); @@ -282,23 +281,23 @@ pub fn test(ctx: &ReducerContext, arg: TestAlias, arg2: Test_b, arg3: TestC, arg TestF::Baz(string) => log::info!("{string}"), } for i in 0..1000 { - ctx.db.testATable().insert(TestA { + ctx.db.test_a().insert(TestA { x: i + arg.x, y: i + arg.y, z: "Yo".to_owned(), }); } - let row_count_before_delete = ctx.db.testATable().count(); + let row_count_before_delete = ctx.db.test_a().count(); log::info!("Row count before delete: {row_count_before_delete:?}"); let mut num_deleted = 0; for row in 5..10u32 { - num_deleted += ctx.db.testATable().foo().delete(row); + num_deleted += ctx.db.test_a().foo().delete(row); } - let row_count_after_delete = ctx.db.testATable().count(); + let row_count_after_delete = ctx.db.test_a().count(); if row_count_before_delete != row_count_after_delete + num_deleted { log::error!( @@ -318,7 +317,7 @@ pub fn test(ctx: &ReducerContext, arg: TestAlias, arg2: Test_b, arg3: TestC, arg let other_row_count = ctx .db - .testATable() + .test_a() // .iter() // .filter(|row| row.x >= 0 && row.x <= u32::MAX) .count(); @@ -503,8 +502,8 @@ fn with_tx(ctx: &mut ProcedureContext) { /// Hit SpacetimeDB's schema HTTP route and return its result as a string. /// /// This is a silly thing to do, but an effective test of the procedure HTTP API. -#[spacetimedb::procedure(name = "get_my_schema_via_http")] -fn getMySchemaViaHttp(ctx: &mut ProcedureContext) -> String { +#[spacetimedb::procedure] +fn get_my_schema_via_http(ctx: &mut ProcedureContext) -> String { let module_identity = ctx.identity(); match ctx.http.get(format!( "http://localhost:3000/v1/database/{module_identity}/schema?version=9" From a0d277aa21508b2e184bb5f52965e9911ff226cb Mon Sep 17 00:00:00 2001 From: Shubham Mishra Date: Wed, 18 Feb 2026 22:14:01 +0530 Subject: [PATCH 094/133] insta --- .../codegen/tests/snapshots/codegen__codegen_rust.snap | 10 +++++----- .../tests/snapshots/codegen__codegen_typescript.snap | 2 +- crates/standalone/src/subcommands/extract_schema.rs | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/crates/codegen/tests/snapshots/codegen__codegen_rust.snap b/crates/codegen/tests/snapshots/codegen__codegen_rust.snap index d9989ff035f..53ea2c7b113 100644 --- a/crates/codegen/tests/snapshots/codegen__codegen_rust.snap +++ b/crates/codegen/tests/snapshots/codegen__codegen_rust.snap @@ -2103,15 +2103,15 @@ pub(super) fn parse_table_update( /// Extension trait for query builder access to the table `Player`. /// /// Implemented for [`__sdk::QueryTableAccessor`]. - pub trait myPlayerQueryTableAccess { + pub trait my_playerQueryTableAccess { #[allow(non_snake_case)] /// Get a query builder for the table `Player`. - fn myPlayer(&self) -> __sdk::__query_builder::Table; + fn my_player(&self) -> __sdk::__query_builder::Table; } - impl myPlayerQueryTableAccess for __sdk::QueryTableAccessor { - fn myPlayer(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("myPlayer") + impl my_playerQueryTableAccess for __sdk::QueryTableAccessor { + fn my_player(&self) -> __sdk::__query_builder::Table { + __sdk::__query_builder::Table::new("my_player") } } diff --git a/crates/codegen/tests/snapshots/codegen__codegen_typescript.snap b/crates/codegen/tests/snapshots/codegen__codegen_typescript.snap index fbde8f71cec..9b4d56d000d 100644 --- a/crates/codegen/tests/snapshots/codegen__codegen_typescript.snap +++ b/crates/codegen/tests/snapshots/codegen__codegen_typescript.snap @@ -319,7 +319,7 @@ const tablesSchema = __schema({ constraints: [ ], }, TestFRow), - myPlayer: __table({ + my_player: __table({ name: 'my_player', indexes: [ ], diff --git a/crates/standalone/src/subcommands/extract_schema.rs b/crates/standalone/src/subcommands/extract_schema.rs index c9b35369957..efc77960195 100644 --- a/crates/standalone/src/subcommands/extract_schema.rs +++ b/crates/standalone/src/subcommands/extract_schema.rs @@ -4,7 +4,7 @@ use anyhow::Context; use clap::{ArgMatches, CommandFactory, FromArgMatches}; use spacetimedb::host::extract_schema; use spacetimedb::messages::control_db; -use spacetimedb_lib::{sats, RawModuleDef}; +use spacetimedb_lib::{db::raw_def::v10::RawModuleDefV10, sats, RawModuleDef}; /// Extracts the module schema from a local module file. /// WARNING: This command is UNSTABLE and subject to breaking changes. @@ -67,7 +67,7 @@ pub async fn exec(args: &ArgMatches) -> anyhow::Result<()> { let module_def = extract_schema(program_bytes.into(), host_type.into()).await?; - let raw_def = RawModuleDef::V10(module_def.into()); + let raw_def = RawModuleDef::V10(RawModuleDefV10::from(module_def)); serde_json::to_writer(std::io::stdout().lock(), &sats::serde::SerdeWrapper(raw_def))?; From ad42f97a4d5a55d6d8cb008bae74382faa9ab6b2 Mon Sep 17 00:00:00 2001 From: Shubham Mishra Date: Wed, 18 Feb 2026 22:33:06 +0530 Subject: [PATCH 095/133] lint --- crates/schema/tests/ensure_same_schema.rs | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/crates/schema/tests/ensure_same_schema.rs b/crates/schema/tests/ensure_same_schema.rs index cc37a9b0e70..e6bba12a64f 100644 --- a/crates/schema/tests/ensure_same_schema.rs +++ b/crates/schema/tests/ensure_same_schema.rs @@ -1,14 +1,8 @@ // Wrap these tests in a `mod` whose name contains `csharp` // so that we can run tests with `--skip csharp` in environments without dotnet installed. use serial_test::serial; -use spacetimedb_sats::raw_identifier::RawIdentifier; use spacetimedb_schema::auto_migrate::{ponder_auto_migrate, AutoMigrateStep}; -use spacetimedb_schema::def::{ - ColumnDef, ConstraintDef, IndexDef, ModuleDef, ModuleDefLookup as _, ProcedureDef, ReducerDef, ScheduleDef, - ScopedTypeName, SequenceDef, TableDef, TypeDef, ViewDef, -}; -use spacetimedb_schema::identifier::Identifier; -use spacetimedb_schema::reducer_name::ReducerName; +use spacetimedb_schema::def::ModuleDef; use spacetimedb_testing::modules::{CompilationMode, CompiledModule}; fn get_normalized_schema(module_name: &str) -> ModuleDef { From 489119fda764b46a1486d114db6987f2e95f17bb Mon Sep 17 00:00:00 2001 From: Shubham Mishra Date: Wed, 18 Feb 2026 22:46:53 +0530 Subject: [PATCH 096/133] build type generate with accessor --- crates/schema/src/def/validate/v10.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/crates/schema/src/def/validate/v10.rs b/crates/schema/src/def/validate/v10.rs index aa76d05be1c..107eb832bca 100644 --- a/crates/schema/src/def/validate/v10.rs +++ b/crates/schema/src/def/validate/v10.rs @@ -74,7 +74,10 @@ pub fn validate(def: RawModuleDefV10) -> Result { stored_in_table_def: Default::default(), type_namespace: Default::default(), lifecycle_reducers: Default::default(), - typespace_for_generate: TypespaceForGenerate::builder(&typespace, known_type_definitions), + typespace_for_generate: TypespaceForGenerate::builder( + &typespace_with_accessor_names, + known_type_definitions, + ), case_policy, explicit_names, }, From 762baaa2c1edfc30838950654f43510ce2819bf1 Mon Sep 17 00:00:00 2001 From: Shubham Mishra Date: Wed, 18 Feb 2026 23:34:13 +0530 Subject: [PATCH 097/133] tests --- modules/module-test-ts/src/index.ts | 8 ++++---- modules/sdk-test-ts/src/index.ts | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/modules/module-test-ts/src/index.ts b/modules/module-test-ts/src/index.ts index fc88b011127..775ccdf3836 100644 --- a/modules/module-test-ts/src/index.ts +++ b/modules/module-test-ts/src/index.ts @@ -152,7 +152,7 @@ const spacetimedb = schema({ person: table( { public: true, - indexes: [{ algorithm: 'btree', columns: ['age'] }], + indexes: [{ accessor: "age", algorithm: 'btree', columns: ['age'] }], }, personRow ), @@ -161,7 +161,7 @@ const spacetimedb = schema({ testATable: table( { name: "test_a", - indexes: [{ algorithm: 'btree', columns: ['x'] }], + indexes: [{ accessor: "foo", algorithm: 'btree', columns: ['x'] }], }, testA ), @@ -174,7 +174,7 @@ const spacetimedb = schema({ { name: 'test_e', public: false, - indexes: [{ algorithm: 'btree', columns: ['name'] }], + indexes: [{ accessor:"name", algorithm: 'btree', columns: ['name'] }], }, testERow ), @@ -194,7 +194,7 @@ const spacetimedb = schema({ name: 'points', public: false, indexes: [ - { algorithm: 'btree', columns: ['x', 'y'] }, + { accessor: 'multi_column_index', algorithm: 'btree', columns: ['x', 'y'] }, ], }, pointsRow diff --git a/modules/sdk-test-ts/src/index.ts b/modules/sdk-test-ts/src/index.ts index 4e3d36e171a..758337c00ee 100644 --- a/modules/sdk-test-ts/src/index.ts +++ b/modules/sdk-test-ts/src/index.ts @@ -908,6 +908,7 @@ const IndexedTable2 = table( { indexes: [ { + accessor: 'player_id_snazz_index', algorithm: 'btree', columns: ['player_id', 'player_snazz'], }, From d77e6a12f66720946edca312c3be7c81fc4813af Mon Sep 17 00:00:00 2001 From: Shubham Mishra Date: Wed, 18 Feb 2026 23:35:39 +0530 Subject: [PATCH 098/133] delete extra file --- crates/schema/src/def_helper.rs | 7 ------- 1 file changed, 7 deletions(-) delete mode 100644 crates/schema/src/def_helper.rs diff --git a/crates/schema/src/def_helper.rs b/crates/schema/src/def_helper.rs deleted file mode 100644 index 087b6b52f9b..00000000000 --- a/crates/schema/src/def_helper.rs +++ /dev/null @@ -1,7 +0,0 @@ -use serde::{Deserialize, Serialize}; -use std::collections::HashMap; - -use crate::def::{ - ColumnDef, ConstraintDef, IndexAlgorithm, IndexDef, ModuleDef, SequenceDef, TableDef, TypeDef, ViewColumnDef, - ViewDef, ViewParamDef, -}; From 6a6b5a6616f0578aa641bc0689691f953b13feb8 Mon Sep 17 00:00:00 2001 From: Shubham Mishra Date: Thu, 19 Feb 2026 00:21:45 +0530 Subject: [PATCH 099/133] fix csharp doc --- docs/docs/00100-intro/00300-tutorials/00100-chat-app.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docs/00100-intro/00300-tutorials/00100-chat-app.md b/docs/docs/00100-intro/00300-tutorials/00100-chat-app.md index a74a8c637f0..9d8f00564d9 100644 --- a/docs/docs/00100-intro/00300-tutorials/00100-chat-app.md +++ b/docs/docs/00100-intro/00300-tutorials/00100-chat-app.md @@ -1964,7 +1964,7 @@ void Message_OnInsert(EventContext ctx, Message insertedValue) void PrintMessage(RemoteTables tables, Message message) { - var sender = tables.User.UserIdentityIdxBtree.Find(message.Sender); + var sender = tables.User.Identity.Find(message.Sender); var senderName = "unknown"; if (sender != null) { From 142043b3d5e081f08147f58f1d41b1752192e937 Mon Sep 17 00:00:00 2001 From: Noa Date: Wed, 18 Feb 2026 13:19:57 -0600 Subject: [PATCH 100/133] Fix error --- crates/bindings-typescript/src/sdk/table_cache.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/bindings-typescript/src/sdk/table_cache.ts b/crates/bindings-typescript/src/sdk/table_cache.ts index 6efdcbe4a31..3b798b37725 100644 --- a/crates/bindings-typescript/src/sdk/table_cache.ts +++ b/crates/bindings-typescript/src/sdk/table_cache.ts @@ -92,7 +92,7 @@ export class TableCacheImpl< keyof TableDefForTableName['columns'] & string >; const index = this.#makeReadonlyIndex(this.tableDef, idxDef); - (this as any)[idx.accessor!] = index; + (this as any)[idxDef.name] = index; } } From a018a4948b6ad5d7cb5420692c1a5d3c636ac544 Mon Sep 17 00:00:00 2001 From: Shubham Mishra Date: Thu, 19 Feb 2026 00:58:38 +0530 Subject: [PATCH 101/133] regen csharp bindings --- .../AuthenticationCapabilities.g.cs | 2 +- .../Procedures/DanglingTxWarning.g.cs | 2 +- .../Procedures/DocumentationGapChecks.g.cs | 6 +-- .../Procedures/InsertWithTxCommit.g.cs | 2 +- .../Procedures/InsertWithTxPanic.g.cs | 2 +- .../Procedures/InsertWithTxRetry.g.cs | 2 +- .../Procedures/InsertWithTxRollback.g.cs | 2 +- .../InsertWithTxRollbackResult.g.cs | 2 +- .../Procedures/InvalidHttpRequest.g.cs | 2 +- .../Procedures/ReadMySchemaViaHttp.g.cs | 2 +- .../Procedures/ReturnEnumA.g.cs | 2 +- .../Procedures/ReturnEnumB.g.cs | 2 +- .../Procedures/ReturnPrimitive.g.cs | 2 +- .../Procedures/ReturnStructProcedure.g.cs | 2 +- .../Procedures/ReturnUuid.g.cs | 2 +- .../Procedures/SubscriptionEventOffset.g.cs | 2 +- .../Procedures/TxContextCapabilities.g.cs | 2 +- .../module_bindings/Procedures/WillPanic.g.cs | 2 +- .../client/module_bindings/Reducers/Add.g.cs | 2 +- .../module_bindings/Reducers/Delete.g.cs | 2 +- .../Reducers/EmitTestEvent.g.cs | 2 +- .../InsertEmptyStringIntoNonNullable.g.cs | 2 +- .../InsertNullStringIntoNonNullable.g.cs | 2 +- .../InsertNullStringIntoNullable.g.cs | 2 +- .../Reducers/InsertResult.g.cs | 2 +- .../Reducers/InsertWhereTest.g.cs | 2 +- .../client/module_bindings/Reducers/Noop.g.cs | 2 +- .../Reducers/SetNullableVec.g.cs | 4 +- .../module_bindings/Reducers/ThrowError.g.cs | 2 +- .../Reducers/UpdateWhereTest.g.cs | 2 +- .../module_bindings/SpacetimeDBClient.g.cs | 6 +-- .../module_bindings/Tables/Account.g.cs | 26 +++++----- .../client/module_bindings/Tables/Admins.g.cs | 10 ++-- .../module_bindings/Tables/ExampleData.g.cs | 24 +++++----- .../module_bindings/Tables/FindWhereTest.g.cs | 6 +-- .../module_bindings/Tables/MyAccount.g.cs | 6 +-- .../Tables/MyAccountMissing.g.cs | 6 +-- .../module_bindings/Tables/MyPlayer.g.cs | 6 +-- .../module_bindings/Tables/MyTable.g.cs | 2 +- .../Tables/NullStringNonnullable.g.cs | 14 +++--- .../Tables/NullStringNullable.g.cs | 14 +++--- .../module_bindings/Tables/NullableVec.g.cs | 14 +++--- .../Tables/NullableVecView.g.cs | 4 +- .../client/module_bindings/Tables/Player.g.cs | 26 +++++----- .../module_bindings/Tables/PlayerLevel.g.cs | 24 +++++----- .../Tables/PlayersAtLevelOne.g.cs | 8 ++-- .../module_bindings/Tables/RetryLog.g.cs | 14 +++--- .../client/module_bindings/Tables/Score.g.cs | 18 +++---- .../Tables/ScoresPlayer123.g.cs | 6 +-- .../Tables/ScoresPlayer123Level5.g.cs | 8 ++-- .../Tables/ScoresPlayer123Range.g.cs | 6 +-- .../module_bindings/Tables/TestEvent.g.cs | 4 +- .../client/module_bindings/Tables/User.g.cs | 48 +++++++++---------- .../module_bindings/Tables/UsersAge1865.g.cs | 8 ++-- .../Tables/UsersAge18Plus.g.cs | 8 ++-- .../Tables/UsersAgeUnder18.g.cs | 8 ++-- .../Tables/UsersNamedAlice.g.cs | 8 ++-- .../module_bindings/Tables/WhereTest.g.cs | 26 +++++----- .../Tables/WhereTestQuery.g.cs | 6 +-- .../module_bindings/Tables/WhereTestView.g.cs | 6 +-- .../client/module_bindings/Types/Account.g.cs | 6 +-- .../module_bindings/Types/DbVector2.g.cs | 4 +- .../module_bindings/Types/ExampleData.g.cs | 4 +- .../client/module_bindings/Types/MyTable.g.cs | 2 +- .../Types/NullStringNonNullable.g.cs | 4 +- .../Types/NullStringNullable.g.cs | 4 +- .../module_bindings/Types/NullableVec.g.cs | 4 +- .../client/module_bindings/Types/Player.g.cs | 6 +-- .../module_bindings/Types/PlayerAndLevel.g.cs | 8 ++-- .../module_bindings/Types/PlayerLevel.g.cs | 4 +- .../module_bindings/Types/RetryLog.g.cs | 4 +- .../module_bindings/Types/ReturnStruct.g.cs | 4 +- .../client/module_bindings/Types/Score.g.cs | 6 +-- .../module_bindings/Types/TestEvent.g.cs | 4 +- .../client/module_bindings/Types/User.g.cs | 8 ++-- .../module_bindings/Types/WhereTest.g.cs | 6 +-- 76 files changed, 257 insertions(+), 257 deletions(-) diff --git a/sdks/csharp/examples~/regression-tests/client/module_bindings/Procedures/AuthenticationCapabilities.g.cs b/sdks/csharp/examples~/regression-tests/client/module_bindings/Procedures/AuthenticationCapabilities.g.cs index 5ac94eec7ce..9671bad3327 100644 --- a/sdks/csharp/examples~/regression-tests/client/module_bindings/Procedures/AuthenticationCapabilities.g.cs +++ b/sdks/csharp/examples~/regression-tests/client/module_bindings/Procedures/AuthenticationCapabilities.g.cs @@ -58,7 +58,7 @@ public AuthenticationCapabilities() [DataContract] public sealed partial class AuthenticationCapabilitiesArgs : Procedure, IProcedureArgs { - string IProcedureArgs.ProcedureName => "AuthenticationCapabilities"; + string IProcedureArgs.ProcedureName => "authentication_capabilities"; } } diff --git a/sdks/csharp/examples~/regression-tests/client/module_bindings/Procedures/DanglingTxWarning.g.cs b/sdks/csharp/examples~/regression-tests/client/module_bindings/Procedures/DanglingTxWarning.g.cs index 45f97316046..596ffcc58f6 100644 --- a/sdks/csharp/examples~/regression-tests/client/module_bindings/Procedures/DanglingTxWarning.g.cs +++ b/sdks/csharp/examples~/regression-tests/client/module_bindings/Procedures/DanglingTxWarning.g.cs @@ -57,7 +57,7 @@ public DanglingTxWarning() [DataContract] public sealed partial class DanglingTxWarningArgs : Procedure, IProcedureArgs { - string IProcedureArgs.ProcedureName => "DanglingTxWarning"; + string IProcedureArgs.ProcedureName => "dangling_tx_warning"; } } diff --git a/sdks/csharp/examples~/regression-tests/client/module_bindings/Procedures/DocumentationGapChecks.g.cs b/sdks/csharp/examples~/regression-tests/client/module_bindings/Procedures/DocumentationGapChecks.g.cs index 53be2ac06dc..720a48a88ec 100644 --- a/sdks/csharp/examples~/regression-tests/client/module_bindings/Procedures/DocumentationGapChecks.g.cs +++ b/sdks/csharp/examples~/regression-tests/client/module_bindings/Procedures/DocumentationGapChecks.g.cs @@ -58,9 +58,9 @@ public DocumentationGapChecks() [DataContract] public sealed partial class DocumentationGapChecksArgs : Procedure, IProcedureArgs { - [DataMember(Name = "inputValue")] + [DataMember(Name = "input_value")] public uint InputValue; - [DataMember(Name = "inputText")] + [DataMember(Name = "input_text")] public string InputText; public DocumentationGapChecksArgs( @@ -77,7 +77,7 @@ public DocumentationGapChecksArgs() this.InputText = ""; } - string IProcedureArgs.ProcedureName => "DocumentationGapChecks"; + string IProcedureArgs.ProcedureName => "documentation_gap_checks"; } } diff --git a/sdks/csharp/examples~/regression-tests/client/module_bindings/Procedures/InsertWithTxCommit.g.cs b/sdks/csharp/examples~/regression-tests/client/module_bindings/Procedures/InsertWithTxCommit.g.cs index 0840ae041e8..ff81551e8ee 100644 --- a/sdks/csharp/examples~/regression-tests/client/module_bindings/Procedures/InsertWithTxCommit.g.cs +++ b/sdks/csharp/examples~/regression-tests/client/module_bindings/Procedures/InsertWithTxCommit.g.cs @@ -57,7 +57,7 @@ public InsertWithTxCommit() [DataContract] public sealed partial class InsertWithTxCommitArgs : Procedure, IProcedureArgs { - string IProcedureArgs.ProcedureName => "InsertWithTxCommit"; + string IProcedureArgs.ProcedureName => "insert_with_tx_commit"; } } diff --git a/sdks/csharp/examples~/regression-tests/client/module_bindings/Procedures/InsertWithTxPanic.g.cs b/sdks/csharp/examples~/regression-tests/client/module_bindings/Procedures/InsertWithTxPanic.g.cs index fe19b50b6f4..c537407ff57 100644 --- a/sdks/csharp/examples~/regression-tests/client/module_bindings/Procedures/InsertWithTxPanic.g.cs +++ b/sdks/csharp/examples~/regression-tests/client/module_bindings/Procedures/InsertWithTxPanic.g.cs @@ -57,7 +57,7 @@ public InsertWithTxPanic() [DataContract] public sealed partial class InsertWithTxPanicArgs : Procedure, IProcedureArgs { - string IProcedureArgs.ProcedureName => "InsertWithTxPanic"; + string IProcedureArgs.ProcedureName => "insert_with_tx_panic"; } } diff --git a/sdks/csharp/examples~/regression-tests/client/module_bindings/Procedures/InsertWithTxRetry.g.cs b/sdks/csharp/examples~/regression-tests/client/module_bindings/Procedures/InsertWithTxRetry.g.cs index 3543f809e2e..27e8ed8d49e 100644 --- a/sdks/csharp/examples~/regression-tests/client/module_bindings/Procedures/InsertWithTxRetry.g.cs +++ b/sdks/csharp/examples~/regression-tests/client/module_bindings/Procedures/InsertWithTxRetry.g.cs @@ -57,7 +57,7 @@ public InsertWithTxRetry() [DataContract] public sealed partial class InsertWithTxRetryArgs : Procedure, IProcedureArgs { - string IProcedureArgs.ProcedureName => "InsertWithTxRetry"; + string IProcedureArgs.ProcedureName => "insert_with_tx_retry"; } } diff --git a/sdks/csharp/examples~/regression-tests/client/module_bindings/Procedures/InsertWithTxRollback.g.cs b/sdks/csharp/examples~/regression-tests/client/module_bindings/Procedures/InsertWithTxRollback.g.cs index d8d374bc264..4124d58a151 100644 --- a/sdks/csharp/examples~/regression-tests/client/module_bindings/Procedures/InsertWithTxRollback.g.cs +++ b/sdks/csharp/examples~/regression-tests/client/module_bindings/Procedures/InsertWithTxRollback.g.cs @@ -57,7 +57,7 @@ public InsertWithTxRollback() [DataContract] public sealed partial class InsertWithTxRollbackArgs : Procedure, IProcedureArgs { - string IProcedureArgs.ProcedureName => "InsertWithTxRollback"; + string IProcedureArgs.ProcedureName => "insert_with_tx_rollback"; } } diff --git a/sdks/csharp/examples~/regression-tests/client/module_bindings/Procedures/InsertWithTxRollbackResult.g.cs b/sdks/csharp/examples~/regression-tests/client/module_bindings/Procedures/InsertWithTxRollbackResult.g.cs index 031408f7242..f53bc9e57e9 100644 --- a/sdks/csharp/examples~/regression-tests/client/module_bindings/Procedures/InsertWithTxRollbackResult.g.cs +++ b/sdks/csharp/examples~/regression-tests/client/module_bindings/Procedures/InsertWithTxRollbackResult.g.cs @@ -58,7 +58,7 @@ public InsertWithTxRollbackResult() [DataContract] public sealed partial class InsertWithTxRollbackResultArgs : Procedure, IProcedureArgs { - string IProcedureArgs.ProcedureName => "InsertWithTxRollbackResult"; + string IProcedureArgs.ProcedureName => "insert_with_tx_rollback_result"; } } diff --git a/sdks/csharp/examples~/regression-tests/client/module_bindings/Procedures/InvalidHttpRequest.g.cs b/sdks/csharp/examples~/regression-tests/client/module_bindings/Procedures/InvalidHttpRequest.g.cs index 7e76023b9b8..cb9509464cf 100644 --- a/sdks/csharp/examples~/regression-tests/client/module_bindings/Procedures/InvalidHttpRequest.g.cs +++ b/sdks/csharp/examples~/regression-tests/client/module_bindings/Procedures/InvalidHttpRequest.g.cs @@ -58,7 +58,7 @@ public InvalidHttpRequest() [DataContract] public sealed partial class InvalidHttpRequestArgs : Procedure, IProcedureArgs { - string IProcedureArgs.ProcedureName => "InvalidHttpRequest"; + string IProcedureArgs.ProcedureName => "invalid_http_request"; } } diff --git a/sdks/csharp/examples~/regression-tests/client/module_bindings/Procedures/ReadMySchemaViaHttp.g.cs b/sdks/csharp/examples~/regression-tests/client/module_bindings/Procedures/ReadMySchemaViaHttp.g.cs index 11e2a8b883f..7d4c11042c6 100644 --- a/sdks/csharp/examples~/regression-tests/client/module_bindings/Procedures/ReadMySchemaViaHttp.g.cs +++ b/sdks/csharp/examples~/regression-tests/client/module_bindings/Procedures/ReadMySchemaViaHttp.g.cs @@ -58,7 +58,7 @@ public ReadMySchemaViaHttp() [DataContract] public sealed partial class ReadMySchemaViaHttpArgs : Procedure, IProcedureArgs { - string IProcedureArgs.ProcedureName => "ReadMySchemaViaHttp"; + string IProcedureArgs.ProcedureName => "read_my_schema_via_http"; } } diff --git a/sdks/csharp/examples~/regression-tests/client/module_bindings/Procedures/ReturnEnumA.g.cs b/sdks/csharp/examples~/regression-tests/client/module_bindings/Procedures/ReturnEnumA.g.cs index 542d05e76f6..4d819f06fea 100644 --- a/sdks/csharp/examples~/regression-tests/client/module_bindings/Procedures/ReturnEnumA.g.cs +++ b/sdks/csharp/examples~/regression-tests/client/module_bindings/Procedures/ReturnEnumA.g.cs @@ -70,7 +70,7 @@ public ReturnEnumAArgs() { } - string IProcedureArgs.ProcedureName => "ReturnEnumA"; + string IProcedureArgs.ProcedureName => "return_enum_a"; } } diff --git a/sdks/csharp/examples~/regression-tests/client/module_bindings/Procedures/ReturnEnumB.g.cs b/sdks/csharp/examples~/regression-tests/client/module_bindings/Procedures/ReturnEnumB.g.cs index f8478dae31d..abb1150f3d3 100644 --- a/sdks/csharp/examples~/regression-tests/client/module_bindings/Procedures/ReturnEnumB.g.cs +++ b/sdks/csharp/examples~/regression-tests/client/module_bindings/Procedures/ReturnEnumB.g.cs @@ -71,7 +71,7 @@ public ReturnEnumBArgs() this.B = ""; } - string IProcedureArgs.ProcedureName => "ReturnEnumB"; + string IProcedureArgs.ProcedureName => "return_enum_b"; } } diff --git a/sdks/csharp/examples~/regression-tests/client/module_bindings/Procedures/ReturnPrimitive.g.cs b/sdks/csharp/examples~/regression-tests/client/module_bindings/Procedures/ReturnPrimitive.g.cs index bf08909d233..bc00b66d20e 100644 --- a/sdks/csharp/examples~/regression-tests/client/module_bindings/Procedures/ReturnPrimitive.g.cs +++ b/sdks/csharp/examples~/regression-tests/client/module_bindings/Procedures/ReturnPrimitive.g.cs @@ -75,7 +75,7 @@ public ReturnPrimitiveArgs() { } - string IProcedureArgs.ProcedureName => "ReturnPrimitive"; + string IProcedureArgs.ProcedureName => "return_primitive"; } } diff --git a/sdks/csharp/examples~/regression-tests/client/module_bindings/Procedures/ReturnStructProcedure.g.cs b/sdks/csharp/examples~/regression-tests/client/module_bindings/Procedures/ReturnStructProcedure.g.cs index 96f3846fba3..943dc2f7698 100644 --- a/sdks/csharp/examples~/regression-tests/client/module_bindings/Procedures/ReturnStructProcedure.g.cs +++ b/sdks/csharp/examples~/regression-tests/client/module_bindings/Procedures/ReturnStructProcedure.g.cs @@ -77,7 +77,7 @@ public ReturnStructProcedureArgs() this.B = ""; } - string IProcedureArgs.ProcedureName => "ReturnStructProcedure"; + string IProcedureArgs.ProcedureName => "return_struct_procedure"; } } diff --git a/sdks/csharp/examples~/regression-tests/client/module_bindings/Procedures/ReturnUuid.g.cs b/sdks/csharp/examples~/regression-tests/client/module_bindings/Procedures/ReturnUuid.g.cs index 50ef46d2095..cd6db49fce3 100644 --- a/sdks/csharp/examples~/regression-tests/client/module_bindings/Procedures/ReturnUuid.g.cs +++ b/sdks/csharp/examples~/regression-tests/client/module_bindings/Procedures/ReturnUuid.g.cs @@ -69,7 +69,7 @@ public ReturnUuidArgs() { } - string IProcedureArgs.ProcedureName => "ReturnUuid"; + string IProcedureArgs.ProcedureName => "return_uuid"; } } diff --git a/sdks/csharp/examples~/regression-tests/client/module_bindings/Procedures/SubscriptionEventOffset.g.cs b/sdks/csharp/examples~/regression-tests/client/module_bindings/Procedures/SubscriptionEventOffset.g.cs index be718da9ac7..9378abf5204 100644 --- a/sdks/csharp/examples~/regression-tests/client/module_bindings/Procedures/SubscriptionEventOffset.g.cs +++ b/sdks/csharp/examples~/regression-tests/client/module_bindings/Procedures/SubscriptionEventOffset.g.cs @@ -58,7 +58,7 @@ public SubscriptionEventOffset() [DataContract] public sealed partial class SubscriptionEventOffsetArgs : Procedure, IProcedureArgs { - string IProcedureArgs.ProcedureName => "SubscriptionEventOffset"; + string IProcedureArgs.ProcedureName => "subscription_event_offset"; } } diff --git a/sdks/csharp/examples~/regression-tests/client/module_bindings/Procedures/TxContextCapabilities.g.cs b/sdks/csharp/examples~/regression-tests/client/module_bindings/Procedures/TxContextCapabilities.g.cs index 8b60bef209e..ac11b591c07 100644 --- a/sdks/csharp/examples~/regression-tests/client/module_bindings/Procedures/TxContextCapabilities.g.cs +++ b/sdks/csharp/examples~/regression-tests/client/module_bindings/Procedures/TxContextCapabilities.g.cs @@ -58,7 +58,7 @@ public TxContextCapabilities() [DataContract] public sealed partial class TxContextCapabilitiesArgs : Procedure, IProcedureArgs { - string IProcedureArgs.ProcedureName => "TxContextCapabilities"; + string IProcedureArgs.ProcedureName => "tx_context_capabilities"; } } diff --git a/sdks/csharp/examples~/regression-tests/client/module_bindings/Procedures/WillPanic.g.cs b/sdks/csharp/examples~/regression-tests/client/module_bindings/Procedures/WillPanic.g.cs index 5a63ca7b547..b37ce43b0e1 100644 --- a/sdks/csharp/examples~/regression-tests/client/module_bindings/Procedures/WillPanic.g.cs +++ b/sdks/csharp/examples~/regression-tests/client/module_bindings/Procedures/WillPanic.g.cs @@ -57,7 +57,7 @@ public WillPanic() [DataContract] public sealed partial class WillPanicArgs : Procedure, IProcedureArgs { - string IProcedureArgs.ProcedureName => "WillPanic"; + string IProcedureArgs.ProcedureName => "will_panic"; } } diff --git a/sdks/csharp/examples~/regression-tests/client/module_bindings/Reducers/Add.g.cs b/sdks/csharp/examples~/regression-tests/client/module_bindings/Reducers/Add.g.cs index 7fe4c55e59d..15f118d3f05 100644 --- a/sdks/csharp/examples~/regression-tests/client/module_bindings/Reducers/Add.g.cs +++ b/sdks/csharp/examples~/regression-tests/client/module_bindings/Reducers/Add.g.cs @@ -67,7 +67,7 @@ public Add() { } - string IReducerArgs.ReducerName => "Add"; + string IReducerArgs.ReducerName => "add"; } } } diff --git a/sdks/csharp/examples~/regression-tests/client/module_bindings/Reducers/Delete.g.cs b/sdks/csharp/examples~/regression-tests/client/module_bindings/Reducers/Delete.g.cs index 85000f17b8b..1079749e22c 100644 --- a/sdks/csharp/examples~/regression-tests/client/module_bindings/Reducers/Delete.g.cs +++ b/sdks/csharp/examples~/regression-tests/client/module_bindings/Reducers/Delete.g.cs @@ -60,7 +60,7 @@ public Delete() { } - string IReducerArgs.ReducerName => "Delete"; + string IReducerArgs.ReducerName => "delete"; } } } diff --git a/sdks/csharp/examples~/regression-tests/client/module_bindings/Reducers/EmitTestEvent.g.cs b/sdks/csharp/examples~/regression-tests/client/module_bindings/Reducers/EmitTestEvent.g.cs index ce0343964c0..4eccb791929 100644 --- a/sdks/csharp/examples~/regression-tests/client/module_bindings/Reducers/EmitTestEvent.g.cs +++ b/sdks/csharp/examples~/regression-tests/client/module_bindings/Reducers/EmitTestEvent.g.cs @@ -68,7 +68,7 @@ public EmitTestEvent() this.Name = ""; } - string IReducerArgs.ReducerName => "EmitTestEvent"; + string IReducerArgs.ReducerName => "emit_test_event"; } } } diff --git a/sdks/csharp/examples~/regression-tests/client/module_bindings/Reducers/InsertEmptyStringIntoNonNullable.g.cs b/sdks/csharp/examples~/regression-tests/client/module_bindings/Reducers/InsertEmptyStringIntoNonNullable.g.cs index 431f1164226..b41c6b6fbc3 100644 --- a/sdks/csharp/examples~/regression-tests/client/module_bindings/Reducers/InsertEmptyStringIntoNonNullable.g.cs +++ b/sdks/csharp/examples~/regression-tests/client/module_bindings/Reducers/InsertEmptyStringIntoNonNullable.g.cs @@ -47,7 +47,7 @@ public abstract partial class Reducer [DataContract] public sealed partial class InsertEmptyStringIntoNonNullable : Reducer, IReducerArgs { - string IReducerArgs.ReducerName => "InsertEmptyStringIntoNonNullable"; + string IReducerArgs.ReducerName => "insert_empty_string_into_non_nullable"; } } } diff --git a/sdks/csharp/examples~/regression-tests/client/module_bindings/Reducers/InsertNullStringIntoNonNullable.g.cs b/sdks/csharp/examples~/regression-tests/client/module_bindings/Reducers/InsertNullStringIntoNonNullable.g.cs index 0449f49e763..b28c7a1aa66 100644 --- a/sdks/csharp/examples~/regression-tests/client/module_bindings/Reducers/InsertNullStringIntoNonNullable.g.cs +++ b/sdks/csharp/examples~/regression-tests/client/module_bindings/Reducers/InsertNullStringIntoNonNullable.g.cs @@ -47,7 +47,7 @@ public abstract partial class Reducer [DataContract] public sealed partial class InsertNullStringIntoNonNullable : Reducer, IReducerArgs { - string IReducerArgs.ReducerName => "InsertNullStringIntoNonNullable"; + string IReducerArgs.ReducerName => "insert_null_string_into_non_nullable"; } } } diff --git a/sdks/csharp/examples~/regression-tests/client/module_bindings/Reducers/InsertNullStringIntoNullable.g.cs b/sdks/csharp/examples~/regression-tests/client/module_bindings/Reducers/InsertNullStringIntoNullable.g.cs index eee2893900b..ec4e6dcdf58 100644 --- a/sdks/csharp/examples~/regression-tests/client/module_bindings/Reducers/InsertNullStringIntoNullable.g.cs +++ b/sdks/csharp/examples~/regression-tests/client/module_bindings/Reducers/InsertNullStringIntoNullable.g.cs @@ -47,7 +47,7 @@ public abstract partial class Reducer [DataContract] public sealed partial class InsertNullStringIntoNullable : Reducer, IReducerArgs { - string IReducerArgs.ReducerName => "InsertNullStringIntoNullable"; + string IReducerArgs.ReducerName => "insert_null_string_into_nullable"; } } } diff --git a/sdks/csharp/examples~/regression-tests/client/module_bindings/Reducers/InsertResult.g.cs b/sdks/csharp/examples~/regression-tests/client/module_bindings/Reducers/InsertResult.g.cs index fff7cda770d..3170c277899 100644 --- a/sdks/csharp/examples~/regression-tests/client/module_bindings/Reducers/InsertResult.g.cs +++ b/sdks/csharp/examples~/regression-tests/client/module_bindings/Reducers/InsertResult.g.cs @@ -61,7 +61,7 @@ public InsertResult() this.Msg = default!; } - string IReducerArgs.ReducerName => "InsertResult"; + string IReducerArgs.ReducerName => "insert_result"; } } } diff --git a/sdks/csharp/examples~/regression-tests/client/module_bindings/Reducers/InsertWhereTest.g.cs b/sdks/csharp/examples~/regression-tests/client/module_bindings/Reducers/InsertWhereTest.g.cs index 155b604fe67..508807b7db6 100644 --- a/sdks/csharp/examples~/regression-tests/client/module_bindings/Reducers/InsertWhereTest.g.cs +++ b/sdks/csharp/examples~/regression-tests/client/module_bindings/Reducers/InsertWhereTest.g.cs @@ -73,7 +73,7 @@ public InsertWhereTest() this.Name = ""; } - string IReducerArgs.ReducerName => "InsertWhereTest"; + string IReducerArgs.ReducerName => "insert_where_test"; } } } diff --git a/sdks/csharp/examples~/regression-tests/client/module_bindings/Reducers/Noop.g.cs b/sdks/csharp/examples~/regression-tests/client/module_bindings/Reducers/Noop.g.cs index 6bd734fccf5..342aaddfab1 100644 --- a/sdks/csharp/examples~/regression-tests/client/module_bindings/Reducers/Noop.g.cs +++ b/sdks/csharp/examples~/regression-tests/client/module_bindings/Reducers/Noop.g.cs @@ -47,7 +47,7 @@ public abstract partial class Reducer [DataContract] public sealed partial class Noop : Reducer, IReducerArgs { - string IReducerArgs.ReducerName => "Noop"; + string IReducerArgs.ReducerName => "noop"; } } } diff --git a/sdks/csharp/examples~/regression-tests/client/module_bindings/Reducers/SetNullableVec.g.cs b/sdks/csharp/examples~/regression-tests/client/module_bindings/Reducers/SetNullableVec.g.cs index 37c26be46f1..6e6fbeab4cc 100644 --- a/sdks/csharp/examples~/regression-tests/client/module_bindings/Reducers/SetNullableVec.g.cs +++ b/sdks/csharp/examples~/regression-tests/client/module_bindings/Reducers/SetNullableVec.g.cs @@ -53,7 +53,7 @@ public sealed partial class SetNullableVec : Reducer, IReducerArgs { [DataMember(Name = "id")] public uint Id; - [DataMember(Name = "hasPos")] + [DataMember(Name = "has_pos")] public bool HasPos; [DataMember(Name = "x")] public int X; @@ -77,7 +77,7 @@ public SetNullableVec() { } - string IReducerArgs.ReducerName => "SetNullableVec"; + string IReducerArgs.ReducerName => "set_nullable_vec"; } } } diff --git a/sdks/csharp/examples~/regression-tests/client/module_bindings/Reducers/ThrowError.g.cs b/sdks/csharp/examples~/regression-tests/client/module_bindings/Reducers/ThrowError.g.cs index 9ecf90955e3..e2be127a2e1 100644 --- a/sdks/csharp/examples~/regression-tests/client/module_bindings/Reducers/ThrowError.g.cs +++ b/sdks/csharp/examples~/regression-tests/client/module_bindings/Reducers/ThrowError.g.cs @@ -61,7 +61,7 @@ public ThrowError() this.Error = ""; } - string IReducerArgs.ReducerName => "ThrowError"; + string IReducerArgs.ReducerName => "throw_error"; } } } diff --git a/sdks/csharp/examples~/regression-tests/client/module_bindings/Reducers/UpdateWhereTest.g.cs b/sdks/csharp/examples~/regression-tests/client/module_bindings/Reducers/UpdateWhereTest.g.cs index 25f4941fa14..b372d83b43b 100644 --- a/sdks/csharp/examples~/regression-tests/client/module_bindings/Reducers/UpdateWhereTest.g.cs +++ b/sdks/csharp/examples~/regression-tests/client/module_bindings/Reducers/UpdateWhereTest.g.cs @@ -73,7 +73,7 @@ public UpdateWhereTest() this.Name = ""; } - string IReducerArgs.ReducerName => "UpdateWhereTest"; + string IReducerArgs.ReducerName => "update_where_test"; } } } diff --git a/sdks/csharp/examples~/regression-tests/client/module_bindings/SpacetimeDBClient.g.cs b/sdks/csharp/examples~/regression-tests/client/module_bindings/SpacetimeDBClient.g.cs index 69271cdcc18..e6d99f9b15b 100644 --- a/sdks/csharp/examples~/regression-tests/client/module_bindings/SpacetimeDBClient.g.cs +++ b/sdks/csharp/examples~/regression-tests/client/module_bindings/SpacetimeDBClient.g.cs @@ -1,7 +1,7 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE // WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. -// This was generated using spacetimedb cli version 2.0.0 (commit 9e0e81a6aaec6bf3619cfb9f7916743d86ab7ffc). +// This was generated using spacetimedb cli version 2.0.0 (commit 6a6b5a6616f0578aa641bc0689691f953b13feb8). #nullable enable @@ -589,7 +589,7 @@ public sealed class QueryBuilder public sealed class From { - public global::SpacetimeDB.Table Admins() => new("Admins", new AdminsCols("Admins"), new AdminsIxCols("Admins")); + public global::SpacetimeDB.Table Admins() => new("admins", new AdminsCols("admins"), new AdminsIxCols("admins")); public global::SpacetimeDB.Table Account() => new("account", new AccountCols("account"), new AccountIxCols("account")); public global::SpacetimeDB.Table ExampleData() => new("example_data", new ExampleDataCols("example_data"), new ExampleDataIxCols("example_data")); public global::SpacetimeDB.Table FindWhereTest() => new("find_where_test", new FindWhereTestCols("find_where_test"), new FindWhereTestIxCols("find_where_test")); @@ -608,7 +608,7 @@ public sealed class From public global::SpacetimeDB.Table RetryLog() => new("retry_log", new RetryLogCols("retry_log"), new RetryLogIxCols("retry_log")); public global::SpacetimeDB.Table Score() => new("score", new ScoreCols("score"), new ScoreIxCols("score")); public global::SpacetimeDB.Table ScoresPlayer123() => new("scores_player_123", new ScoresPlayer123Cols("scores_player_123"), new ScoresPlayer123IxCols("scores_player_123")); - public global::SpacetimeDB.Table ScoresPlayer123Level5() => new("scores_player_123_level5", new ScoresPlayer123Level5Cols("scores_player_123_level5"), new ScoresPlayer123Level5IxCols("scores_player_123_level5")); + public global::SpacetimeDB.Table ScoresPlayer123Level5() => new("scores_player_123_level_5", new ScoresPlayer123Level5Cols("scores_player_123_level_5"), new ScoresPlayer123Level5IxCols("scores_player_123_level_5")); public global::SpacetimeDB.Table ScoresPlayer123Range() => new("scores_player_123_range", new ScoresPlayer123RangeCols("scores_player_123_range"), new ScoresPlayer123RangeIxCols("scores_player_123_range")); public global::SpacetimeDB.Table TestEvent() => new("test_event", new TestEventCols("test_event"), new TestEventIxCols("test_event")); public global::SpacetimeDB.Table User() => new("user", new UserCols("user"), new UserIxCols("user")); diff --git a/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/Account.g.cs b/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/Account.g.cs index 29d291d596d..08167e2114e 100644 --- a/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/Account.g.cs +++ b/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/Account.g.cs @@ -17,28 +17,28 @@ public sealed class AccountHandle : RemoteTableHandle { protected override string RemoteTableName => "account"; - public sealed class AccountIdIdxBtreeUniqueIndex : UniqueIndexBase + public sealed class IdUniqueIndex : UniqueIndexBase { protected override ulong GetKey(Account row) => row.Id; - public AccountIdIdxBtreeUniqueIndex(AccountHandle table) : base(table) { } + public IdUniqueIndex(AccountHandle table) : base(table) { } } - public readonly AccountIdIdxBtreeUniqueIndex AccountIdIdxBtree; + public readonly IdUniqueIndex Id; - public sealed class AccountIdentityIdxBtreeUniqueIndex : UniqueIndexBase + public sealed class IdentityUniqueIndex : UniqueIndexBase { protected override SpacetimeDB.Identity GetKey(Account row) => row.Identity; - public AccountIdentityIdxBtreeUniqueIndex(AccountHandle table) : base(table) { } + public IdentityUniqueIndex(AccountHandle table) : base(table) { } } - public readonly AccountIdentityIdxBtreeUniqueIndex AccountIdentityIdxBtree; + public readonly IdentityUniqueIndex Identity; internal AccountHandle(DbConnection conn) : base(conn) { - AccountIdIdxBtree = new(this); - AccountIdentityIdxBtree = new(this); + Id = new(this); + Identity = new(this); } protected override object GetPrimaryKey(Account row) => row.Id; @@ -55,9 +55,9 @@ public sealed class AccountCols public AccountCols(string tableName) { - Id = new global::SpacetimeDB.Col(tableName, "Id"); - Identity = new global::SpacetimeDB.Col(tableName, "Identity"); - Name = new global::SpacetimeDB.Col(tableName, "Name"); + Id = new global::SpacetimeDB.Col(tableName, "id"); + Identity = new global::SpacetimeDB.Col(tableName, "identity"); + Name = new global::SpacetimeDB.Col(tableName, "name"); } } @@ -68,8 +68,8 @@ public sealed class AccountIxCols public AccountIxCols(string tableName) { - Id = new global::SpacetimeDB.IxCol(tableName, "Id"); - Identity = new global::SpacetimeDB.IxCol(tableName, "Identity"); + Id = new global::SpacetimeDB.IxCol(tableName, "id"); + Identity = new global::SpacetimeDB.IxCol(tableName, "identity"); } } } diff --git a/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/Admins.g.cs b/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/Admins.g.cs index 2fc34a86d44..e25a70ec4a4 100644 --- a/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/Admins.g.cs +++ b/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/Admins.g.cs @@ -15,7 +15,7 @@ public sealed partial class RemoteTables { public sealed class AdminsHandle : RemoteTableHandle { - protected override string RemoteTableName => "Admins"; + protected override string RemoteTableName => "admins"; internal AdminsHandle(DbConnection conn) : base(conn) { @@ -34,10 +34,10 @@ public sealed class AdminsCols public AdminsCols(string tableName) { - Id = new global::SpacetimeDB.Col(tableName, "Id"); - Name = new global::SpacetimeDB.Col(tableName, "Name"); - IsAdmin = new global::SpacetimeDB.Col(tableName, "IsAdmin"); - Age = new global::SpacetimeDB.Col(tableName, "Age"); + Id = new global::SpacetimeDB.Col(tableName, "id"); + Name = new global::SpacetimeDB.Col(tableName, "name"); + IsAdmin = new global::SpacetimeDB.Col(tableName, "is_admin"); + Age = new global::SpacetimeDB.Col(tableName, "age"); } } diff --git a/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/ExampleData.g.cs b/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/ExampleData.g.cs index 2c907843c45..904ee305a72 100644 --- a/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/ExampleData.g.cs +++ b/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/ExampleData.g.cs @@ -17,28 +17,28 @@ public sealed class ExampleDataHandle : RemoteTableHandle "example_data"; - public sealed class ExampleDataIdIdxBtreeUniqueIndex : UniqueIndexBase + public sealed class IdUniqueIndex : UniqueIndexBase { protected override uint GetKey(ExampleData row) => row.Id; - public ExampleDataIdIdxBtreeUniqueIndex(ExampleDataHandle table) : base(table) { } + public IdUniqueIndex(ExampleDataHandle table) : base(table) { } } - public readonly ExampleDataIdIdxBtreeUniqueIndex ExampleDataIdIdxBtree; + public readonly IdUniqueIndex Id; - public sealed class ExampleDataIndexedIdxBtreeIndex : BTreeIndexBase + public sealed class IndexedIndex : BTreeIndexBase { protected override uint GetKey(ExampleData row) => row.Indexed; - public ExampleDataIndexedIdxBtreeIndex(ExampleDataHandle table) : base(table) { } + public IndexedIndex(ExampleDataHandle table) : base(table) { } } - public readonly ExampleDataIndexedIdxBtreeIndex ExampleDataIndexedIdxBtree; + public readonly IndexedIndex Indexed; internal ExampleDataHandle(DbConnection conn) : base(conn) { - ExampleDataIdIdxBtree = new(this); - ExampleDataIndexedIdxBtree = new(this); + Id = new(this); + Indexed = new(this); } protected override object GetPrimaryKey(ExampleData row) => row.Id; @@ -54,8 +54,8 @@ public sealed class ExampleDataCols public ExampleDataCols(string tableName) { - Id = new global::SpacetimeDB.Col(tableName, "Id"); - Indexed = new global::SpacetimeDB.Col(tableName, "Indexed"); + Id = new global::SpacetimeDB.Col(tableName, "id"); + Indexed = new global::SpacetimeDB.Col(tableName, "indexed"); } } @@ -66,8 +66,8 @@ public sealed class ExampleDataIxCols public ExampleDataIxCols(string tableName) { - Id = new global::SpacetimeDB.IxCol(tableName, "Id"); - Indexed = new global::SpacetimeDB.IxCol(tableName, "Indexed"); + Id = new global::SpacetimeDB.IxCol(tableName, "id"); + Indexed = new global::SpacetimeDB.IxCol(tableName, "indexed"); } } } diff --git a/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/FindWhereTest.g.cs b/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/FindWhereTest.g.cs index 494ac379cb5..31c6c8f0eee 100644 --- a/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/FindWhereTest.g.cs +++ b/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/FindWhereTest.g.cs @@ -33,9 +33,9 @@ public sealed class FindWhereTestCols public FindWhereTestCols(string tableName) { - Id = new global::SpacetimeDB.Col(tableName, "Id"); - Value = new global::SpacetimeDB.Col(tableName, "Value"); - Name = new global::SpacetimeDB.Col(tableName, "Name"); + Id = new global::SpacetimeDB.Col(tableName, "id"); + Value = new global::SpacetimeDB.Col(tableName, "value"); + Name = new global::SpacetimeDB.Col(tableName, "name"); } } diff --git a/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/MyAccount.g.cs b/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/MyAccount.g.cs index 4ce71bf5870..26d3c85c518 100644 --- a/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/MyAccount.g.cs +++ b/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/MyAccount.g.cs @@ -33,9 +33,9 @@ public sealed class MyAccountCols public MyAccountCols(string tableName) { - Id = new global::SpacetimeDB.Col(tableName, "Id"); - Identity = new global::SpacetimeDB.Col(tableName, "Identity"); - Name = new global::SpacetimeDB.Col(tableName, "Name"); + Id = new global::SpacetimeDB.Col(tableName, "id"); + Identity = new global::SpacetimeDB.Col(tableName, "identity"); + Name = new global::SpacetimeDB.Col(tableName, "name"); } } diff --git a/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/MyAccountMissing.g.cs b/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/MyAccountMissing.g.cs index b23f00b02ff..4fd66fc8f44 100644 --- a/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/MyAccountMissing.g.cs +++ b/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/MyAccountMissing.g.cs @@ -33,9 +33,9 @@ public sealed class MyAccountMissingCols public MyAccountMissingCols(string tableName) { - Id = new global::SpacetimeDB.Col(tableName, "Id"); - Identity = new global::SpacetimeDB.Col(tableName, "Identity"); - Name = new global::SpacetimeDB.Col(tableName, "Name"); + Id = new global::SpacetimeDB.Col(tableName, "id"); + Identity = new global::SpacetimeDB.Col(tableName, "identity"); + Name = new global::SpacetimeDB.Col(tableName, "name"); } } diff --git a/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/MyPlayer.g.cs b/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/MyPlayer.g.cs index f7d52c30fd4..500162130ae 100644 --- a/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/MyPlayer.g.cs +++ b/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/MyPlayer.g.cs @@ -33,9 +33,9 @@ public sealed class MyPlayerCols public MyPlayerCols(string tableName) { - Id = new global::SpacetimeDB.Col(tableName, "Id"); - Identity = new global::SpacetimeDB.Col(tableName, "Identity"); - Name = new global::SpacetimeDB.Col(tableName, "Name"); + Id = new global::SpacetimeDB.Col(tableName, "id"); + Identity = new global::SpacetimeDB.Col(tableName, "identity"); + Name = new global::SpacetimeDB.Col(tableName, "name"); } } diff --git a/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/MyTable.g.cs b/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/MyTable.g.cs index 2180e1dc793..a2c31ceb058 100644 --- a/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/MyTable.g.cs +++ b/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/MyTable.g.cs @@ -31,7 +31,7 @@ public sealed class MyTableCols public MyTableCols(string tableName) { - Field = new global::SpacetimeDB.Col(tableName, "Field"); + Field = new global::SpacetimeDB.Col(tableName, "field"); } } diff --git a/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/NullStringNonnullable.g.cs b/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/NullStringNonnullable.g.cs index ed602dbd768..f071fe4c7f6 100644 --- a/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/NullStringNonnullable.g.cs +++ b/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/NullStringNonnullable.g.cs @@ -17,18 +17,18 @@ public sealed class NullStringNonnullableHandle : RemoteTableHandle "null_string_nonnullable"; - public sealed class NullStringNonnullableIdIdxBtreeUniqueIndex : UniqueIndexBase + public sealed class IdUniqueIndex : UniqueIndexBase { protected override ulong GetKey(NullStringNonNullable row) => row.Id; - public NullStringNonnullableIdIdxBtreeUniqueIndex(NullStringNonnullableHandle table) : base(table) { } + public IdUniqueIndex(NullStringNonnullableHandle table) : base(table) { } } - public readonly NullStringNonnullableIdIdxBtreeUniqueIndex NullStringNonnullableIdIdxBtree; + public readonly IdUniqueIndex Id; internal NullStringNonnullableHandle(DbConnection conn) : base(conn) { - NullStringNonnullableIdIdxBtree = new(this); + Id = new(this); } protected override object GetPrimaryKey(NullStringNonNullable row) => row.Id; @@ -44,8 +44,8 @@ public sealed class NullStringNonnullableCols public NullStringNonnullableCols(string tableName) { - Id = new global::SpacetimeDB.Col(tableName, "Id"); - Name = new global::SpacetimeDB.Col(tableName, "Name"); + Id = new global::SpacetimeDB.Col(tableName, "id"); + Name = new global::SpacetimeDB.Col(tableName, "name"); } } @@ -55,7 +55,7 @@ public sealed class NullStringNonnullableIxCols public NullStringNonnullableIxCols(string tableName) { - Id = new global::SpacetimeDB.IxCol(tableName, "Id"); + Id = new global::SpacetimeDB.IxCol(tableName, "id"); } } } diff --git a/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/NullStringNullable.g.cs b/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/NullStringNullable.g.cs index 6019bf3a1d9..47cff5f3450 100644 --- a/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/NullStringNullable.g.cs +++ b/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/NullStringNullable.g.cs @@ -17,18 +17,18 @@ public sealed class NullStringNullableHandle : RemoteTableHandle "null_string_nullable"; - public sealed class NullStringNullableIdIdxBtreeUniqueIndex : UniqueIndexBase + public sealed class IdUniqueIndex : UniqueIndexBase { protected override ulong GetKey(NullStringNullable row) => row.Id; - public NullStringNullableIdIdxBtreeUniqueIndex(NullStringNullableHandle table) : base(table) { } + public IdUniqueIndex(NullStringNullableHandle table) : base(table) { } } - public readonly NullStringNullableIdIdxBtreeUniqueIndex NullStringNullableIdIdxBtree; + public readonly IdUniqueIndex Id; internal NullStringNullableHandle(DbConnection conn) : base(conn) { - NullStringNullableIdIdxBtree = new(this); + Id = new(this); } protected override object GetPrimaryKey(NullStringNullable row) => row.Id; @@ -44,8 +44,8 @@ public sealed class NullStringNullableCols public NullStringNullableCols(string tableName) { - Id = new global::SpacetimeDB.Col(tableName, "Id"); - Name = new global::SpacetimeDB.NullableCol(tableName, "Name"); + Id = new global::SpacetimeDB.Col(tableName, "id"); + Name = new global::SpacetimeDB.NullableCol(tableName, "name"); } } @@ -55,7 +55,7 @@ public sealed class NullStringNullableIxCols public NullStringNullableIxCols(string tableName) { - Id = new global::SpacetimeDB.IxCol(tableName, "Id"); + Id = new global::SpacetimeDB.IxCol(tableName, "id"); } } } diff --git a/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/NullableVec.g.cs b/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/NullableVec.g.cs index 6beacac963a..6a351db1456 100644 --- a/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/NullableVec.g.cs +++ b/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/NullableVec.g.cs @@ -17,18 +17,18 @@ public sealed class NullableVecHandle : RemoteTableHandle "nullable_vec"; - public sealed class NullableVecIdIdxBtreeUniqueIndex : UniqueIndexBase + public sealed class IdUniqueIndex : UniqueIndexBase { protected override uint GetKey(NullableVec row) => row.Id; - public NullableVecIdIdxBtreeUniqueIndex(NullableVecHandle table) : base(table) { } + public IdUniqueIndex(NullableVecHandle table) : base(table) { } } - public readonly NullableVecIdIdxBtreeUniqueIndex NullableVecIdIdxBtree; + public readonly IdUniqueIndex Id; internal NullableVecHandle(DbConnection conn) : base(conn) { - NullableVecIdIdxBtree = new(this); + Id = new(this); } protected override object GetPrimaryKey(NullableVec row) => row.Id; @@ -44,8 +44,8 @@ public sealed class NullableVecCols public NullableVecCols(string tableName) { - Id = new global::SpacetimeDB.Col(tableName, "Id"); - Pos = new global::SpacetimeDB.NullableCol(tableName, "Pos"); + Id = new global::SpacetimeDB.Col(tableName, "id"); + Pos = new global::SpacetimeDB.NullableCol(tableName, "pos"); } } @@ -55,7 +55,7 @@ public sealed class NullableVecIxCols public NullableVecIxCols(string tableName) { - Id = new global::SpacetimeDB.IxCol(tableName, "Id"); + Id = new global::SpacetimeDB.IxCol(tableName, "id"); } } } diff --git a/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/NullableVecView.g.cs b/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/NullableVecView.g.cs index 675bb92c36b..5042b4c41e7 100644 --- a/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/NullableVecView.g.cs +++ b/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/NullableVecView.g.cs @@ -32,8 +32,8 @@ public sealed class NullableVecViewCols public NullableVecViewCols(string tableName) { - Id = new global::SpacetimeDB.Col(tableName, "Id"); - Pos = new global::SpacetimeDB.NullableCol(tableName, "Pos"); + Id = new global::SpacetimeDB.Col(tableName, "id"); + Pos = new global::SpacetimeDB.NullableCol(tableName, "pos"); } } diff --git a/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/Player.g.cs b/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/Player.g.cs index 9f1c76a6246..9e650143563 100644 --- a/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/Player.g.cs +++ b/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/Player.g.cs @@ -17,28 +17,28 @@ public sealed class PlayerHandle : RemoteTableHandle { protected override string RemoteTableName => "player"; - public sealed class PlayerIdIdxBtreeUniqueIndex : UniqueIndexBase + public sealed class IdUniqueIndex : UniqueIndexBase { protected override ulong GetKey(Player row) => row.Id; - public PlayerIdIdxBtreeUniqueIndex(PlayerHandle table) : base(table) { } + public IdUniqueIndex(PlayerHandle table) : base(table) { } } - public readonly PlayerIdIdxBtreeUniqueIndex PlayerIdIdxBtree; + public readonly IdUniqueIndex Id; - public sealed class PlayerIdentityIdxBtreeUniqueIndex : UniqueIndexBase + public sealed class IdentityUniqueIndex : UniqueIndexBase { protected override SpacetimeDB.Identity GetKey(Player row) => row.Identity; - public PlayerIdentityIdxBtreeUniqueIndex(PlayerHandle table) : base(table) { } + public IdentityUniqueIndex(PlayerHandle table) : base(table) { } } - public readonly PlayerIdentityIdxBtreeUniqueIndex PlayerIdentityIdxBtree; + public readonly IdentityUniqueIndex Identity; internal PlayerHandle(DbConnection conn) : base(conn) { - PlayerIdIdxBtree = new(this); - PlayerIdentityIdxBtree = new(this); + Id = new(this); + Identity = new(this); } protected override object GetPrimaryKey(Player row) => row.Id; @@ -55,9 +55,9 @@ public sealed class PlayerCols public PlayerCols(string tableName) { - Id = new global::SpacetimeDB.Col(tableName, "Id"); - Identity = new global::SpacetimeDB.Col(tableName, "Identity"); - Name = new global::SpacetimeDB.Col(tableName, "Name"); + Id = new global::SpacetimeDB.Col(tableName, "id"); + Identity = new global::SpacetimeDB.Col(tableName, "identity"); + Name = new global::SpacetimeDB.Col(tableName, "name"); } } @@ -68,8 +68,8 @@ public sealed class PlayerIxCols public PlayerIxCols(string tableName) { - Id = new global::SpacetimeDB.IxCol(tableName, "Id"); - Identity = new global::SpacetimeDB.IxCol(tableName, "Identity"); + Id = new global::SpacetimeDB.IxCol(tableName, "id"); + Identity = new global::SpacetimeDB.IxCol(tableName, "identity"); } } } diff --git a/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/PlayerLevel.g.cs b/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/PlayerLevel.g.cs index 45d3db12e28..cc7164544a7 100644 --- a/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/PlayerLevel.g.cs +++ b/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/PlayerLevel.g.cs @@ -17,28 +17,28 @@ public sealed class PlayerLevelHandle : RemoteTableHandle "player_level"; - public sealed class PlayerLevelLevelIdxBtreeIndex : BTreeIndexBase + public sealed class LevelIndex : BTreeIndexBase { protected override ulong GetKey(PlayerLevel row) => row.Level; - public PlayerLevelLevelIdxBtreeIndex(PlayerLevelHandle table) : base(table) { } + public LevelIndex(PlayerLevelHandle table) : base(table) { } } - public readonly PlayerLevelLevelIdxBtreeIndex PlayerLevelLevelIdxBtree; + public readonly LevelIndex Level; - public sealed class PlayerLevelPlayerIdIdxBtreeUniqueIndex : UniqueIndexBase + public sealed class PlayerIdUniqueIndex : UniqueIndexBase { protected override ulong GetKey(PlayerLevel row) => row.PlayerId; - public PlayerLevelPlayerIdIdxBtreeUniqueIndex(PlayerLevelHandle table) : base(table) { } + public PlayerIdUniqueIndex(PlayerLevelHandle table) : base(table) { } } - public readonly PlayerLevelPlayerIdIdxBtreeUniqueIndex PlayerLevelPlayerIdIdxBtree; + public readonly PlayerIdUniqueIndex PlayerId; internal PlayerLevelHandle(DbConnection conn) : base(conn) { - PlayerLevelLevelIdxBtree = new(this); - PlayerLevelPlayerIdIdxBtree = new(this); + Level = new(this); + PlayerId = new(this); } } @@ -52,8 +52,8 @@ public sealed class PlayerLevelCols public PlayerLevelCols(string tableName) { - PlayerId = new global::SpacetimeDB.Col(tableName, "PlayerId"); - Level = new global::SpacetimeDB.Col(tableName, "Level"); + PlayerId = new global::SpacetimeDB.Col(tableName, "player_id"); + Level = new global::SpacetimeDB.Col(tableName, "level"); } } @@ -64,8 +64,8 @@ public sealed class PlayerLevelIxCols public PlayerLevelIxCols(string tableName) { - PlayerId = new global::SpacetimeDB.IxCol(tableName, "PlayerId"); - Level = new global::SpacetimeDB.IxCol(tableName, "Level"); + PlayerId = new global::SpacetimeDB.IxCol(tableName, "player_id"); + Level = new global::SpacetimeDB.IxCol(tableName, "level"); } } } diff --git a/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/PlayersAtLevelOne.g.cs b/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/PlayersAtLevelOne.g.cs index d0ae3ad6b97..d77dd5f99df 100644 --- a/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/PlayersAtLevelOne.g.cs +++ b/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/PlayersAtLevelOne.g.cs @@ -34,10 +34,10 @@ public sealed class PlayersAtLevelOneCols public PlayersAtLevelOneCols(string tableName) { - Id = new global::SpacetimeDB.Col(tableName, "Id"); - Identity = new global::SpacetimeDB.Col(tableName, "Identity"); - Name = new global::SpacetimeDB.Col(tableName, "Name"); - Level = new global::SpacetimeDB.Col(tableName, "Level"); + Id = new global::SpacetimeDB.Col(tableName, "id"); + Identity = new global::SpacetimeDB.Col(tableName, "identity"); + Name = new global::SpacetimeDB.Col(tableName, "name"); + Level = new global::SpacetimeDB.Col(tableName, "level"); } } diff --git a/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/RetryLog.g.cs b/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/RetryLog.g.cs index bc8100b2641..b33cf009a32 100644 --- a/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/RetryLog.g.cs +++ b/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/RetryLog.g.cs @@ -17,18 +17,18 @@ public sealed class RetryLogHandle : RemoteTableHandle { protected override string RemoteTableName => "retry_log"; - public sealed class RetryLogIdIdxBtreeUniqueIndex : UniqueIndexBase + public sealed class IdUniqueIndex : UniqueIndexBase { protected override uint GetKey(RetryLog row) => row.Id; - public RetryLogIdIdxBtreeUniqueIndex(RetryLogHandle table) : base(table) { } + public IdUniqueIndex(RetryLogHandle table) : base(table) { } } - public readonly RetryLogIdIdxBtreeUniqueIndex RetryLogIdIdxBtree; + public readonly IdUniqueIndex Id; internal RetryLogHandle(DbConnection conn) : base(conn) { - RetryLogIdIdxBtree = new(this); + Id = new(this); } protected override object GetPrimaryKey(RetryLog row) => row.Id; @@ -44,8 +44,8 @@ public sealed class RetryLogCols public RetryLogCols(string tableName) { - Id = new global::SpacetimeDB.Col(tableName, "Id"); - Attempts = new global::SpacetimeDB.Col(tableName, "Attempts"); + Id = new global::SpacetimeDB.Col(tableName, "id"); + Attempts = new global::SpacetimeDB.Col(tableName, "attempts"); } } @@ -55,7 +55,7 @@ public sealed class RetryLogIxCols public RetryLogIxCols(string tableName) { - Id = new global::SpacetimeDB.IxCol(tableName, "Id"); + Id = new global::SpacetimeDB.IxCol(tableName, "id"); } } } diff --git a/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/Score.g.cs b/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/Score.g.cs index 5688faa3a29..badd4ddffd9 100644 --- a/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/Score.g.cs +++ b/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/Score.g.cs @@ -17,18 +17,18 @@ public sealed class ScoreHandle : RemoteTableHandle { protected override string RemoteTableName => "score"; - public sealed class ScorePlayerIdLevelIdxBtreeIndex : BTreeIndexBase<(uint PlayerId, uint Level)> + public sealed class ByPlayerAndLevelIndex : BTreeIndexBase<(uint PlayerId, uint Level)> { protected override (uint PlayerId, uint Level) GetKey(Score row) => (row.PlayerId, row.Level); - public ScorePlayerIdLevelIdxBtreeIndex(ScoreHandle table) : base(table) { } + public ByPlayerAndLevelIndex(ScoreHandle table) : base(table) { } } - public readonly ScorePlayerIdLevelIdxBtreeIndex ScorePlayerIdLevelIdxBtree; + public readonly ByPlayerAndLevelIndex ByPlayerAndLevel; internal ScoreHandle(DbConnection conn) : base(conn) { - ScorePlayerIdLevelIdxBtree = new(this); + ByPlayerAndLevel = new(this); } } @@ -43,9 +43,9 @@ public sealed class ScoreCols public ScoreCols(string tableName) { - PlayerId = new global::SpacetimeDB.Col(tableName, "PlayerId"); - Level = new global::SpacetimeDB.Col(tableName, "Level"); - Points = new global::SpacetimeDB.Col(tableName, "Points"); + PlayerId = new global::SpacetimeDB.Col(tableName, "player_id"); + Level = new global::SpacetimeDB.Col(tableName, "level"); + Points = new global::SpacetimeDB.Col(tableName, "points"); } } @@ -56,8 +56,8 @@ public sealed class ScoreIxCols public ScoreIxCols(string tableName) { - PlayerId = new global::SpacetimeDB.IxCol(tableName, "PlayerId"); - Level = new global::SpacetimeDB.IxCol(tableName, "Level"); + PlayerId = new global::SpacetimeDB.IxCol(tableName, "player_id"); + Level = new global::SpacetimeDB.IxCol(tableName, "level"); } } } diff --git a/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/ScoresPlayer123.g.cs b/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/ScoresPlayer123.g.cs index a3098687e75..bc58b74ee6b 100644 --- a/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/ScoresPlayer123.g.cs +++ b/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/ScoresPlayer123.g.cs @@ -33,9 +33,9 @@ public sealed class ScoresPlayer123Cols public ScoresPlayer123Cols(string tableName) { - PlayerId = new global::SpacetimeDB.Col(tableName, "PlayerId"); - Level = new global::SpacetimeDB.Col(tableName, "Level"); - Points = new global::SpacetimeDB.Col(tableName, "Points"); + PlayerId = new global::SpacetimeDB.Col(tableName, "player_id"); + Level = new global::SpacetimeDB.Col(tableName, "level"); + Points = new global::SpacetimeDB.Col(tableName, "points"); } } diff --git a/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/ScoresPlayer123Level5.g.cs b/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/ScoresPlayer123Level5.g.cs index 4de2c6bc980..07969bf7654 100644 --- a/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/ScoresPlayer123Level5.g.cs +++ b/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/ScoresPlayer123Level5.g.cs @@ -15,7 +15,7 @@ public sealed partial class RemoteTables { public sealed class ScoresPlayer123Level5Handle : RemoteTableHandle { - protected override string RemoteTableName => "scores_player_123_level5"; + protected override string RemoteTableName => "scores_player_123_level_5"; internal ScoresPlayer123Level5Handle(DbConnection conn) : base(conn) { @@ -33,9 +33,9 @@ public sealed class ScoresPlayer123Level5Cols public ScoresPlayer123Level5Cols(string tableName) { - PlayerId = new global::SpacetimeDB.Col(tableName, "PlayerId"); - Level = new global::SpacetimeDB.Col(tableName, "Level"); - Points = new global::SpacetimeDB.Col(tableName, "Points"); + PlayerId = new global::SpacetimeDB.Col(tableName, "player_id"); + Level = new global::SpacetimeDB.Col(tableName, "level"); + Points = new global::SpacetimeDB.Col(tableName, "points"); } } diff --git a/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/ScoresPlayer123Range.g.cs b/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/ScoresPlayer123Range.g.cs index d2545b5edbe..5e06f15431b 100644 --- a/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/ScoresPlayer123Range.g.cs +++ b/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/ScoresPlayer123Range.g.cs @@ -33,9 +33,9 @@ public sealed class ScoresPlayer123RangeCols public ScoresPlayer123RangeCols(string tableName) { - PlayerId = new global::SpacetimeDB.Col(tableName, "PlayerId"); - Level = new global::SpacetimeDB.Col(tableName, "Level"); - Points = new global::SpacetimeDB.Col(tableName, "Points"); + PlayerId = new global::SpacetimeDB.Col(tableName, "player_id"); + Level = new global::SpacetimeDB.Col(tableName, "level"); + Points = new global::SpacetimeDB.Col(tableName, "points"); } } diff --git a/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/TestEvent.g.cs b/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/TestEvent.g.cs index 9b8f8f3d489..cf930a7b8bf 100644 --- a/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/TestEvent.g.cs +++ b/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/TestEvent.g.cs @@ -32,8 +32,8 @@ public sealed class TestEventCols public TestEventCols(string tableName) { - Name = new global::SpacetimeDB.Col(tableName, "Name"); - Value = new global::SpacetimeDB.Col(tableName, "Value"); + Name = new global::SpacetimeDB.Col(tableName, "name"); + Value = new global::SpacetimeDB.Col(tableName, "value"); } } diff --git a/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/User.g.cs b/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/User.g.cs index 7c2a36b9a31..9a58dd98566 100644 --- a/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/User.g.cs +++ b/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/User.g.cs @@ -17,48 +17,48 @@ public sealed class UserHandle : RemoteTableHandle { protected override string RemoteTableName => "user"; - public sealed class UserAgeIdxBtreeIndex : BTreeIndexBase + public sealed class AgeIndex : BTreeIndexBase { protected override byte GetKey(User row) => row.Age; - public UserAgeIdxBtreeIndex(UserHandle table) : base(table) { } + public AgeIndex(UserHandle table) : base(table) { } } - public readonly UserAgeIdxBtreeIndex UserAgeIdxBtree; + public readonly AgeIndex Age; - public sealed class UserIdIdxBtreeUniqueIndex : UniqueIndexBase + public sealed class IdUniqueIndex : UniqueIndexBase { protected override SpacetimeDB.Uuid GetKey(User row) => row.Id; - public UserIdIdxBtreeUniqueIndex(UserHandle table) : base(table) { } + public IdUniqueIndex(UserHandle table) : base(table) { } } - public readonly UserIdIdxBtreeUniqueIndex UserIdIdxBtree; + public readonly IdUniqueIndex Id; - public sealed class UserIsAdminIdxBtreeIndex : BTreeIndexBase + public sealed class IsAdminIndex : BTreeIndexBase { protected override bool GetKey(User row) => row.IsAdmin; - public UserIsAdminIdxBtreeIndex(UserHandle table) : base(table) { } + public IsAdminIndex(UserHandle table) : base(table) { } } - public readonly UserIsAdminIdxBtreeIndex UserIsAdminIdxBtree; + public readonly IsAdminIndex IsAdmin; - public sealed class UserNameIdxBtreeIndex : BTreeIndexBase + public sealed class NameIndex : BTreeIndexBase { protected override string GetKey(User row) => row.Name; - public UserNameIdxBtreeIndex(UserHandle table) : base(table) { } + public NameIndex(UserHandle table) : base(table) { } } - public readonly UserNameIdxBtreeIndex UserNameIdxBtree; + public readonly NameIndex Name; internal UserHandle(DbConnection conn) : base(conn) { - UserAgeIdxBtree = new(this); - UserIdIdxBtree = new(this); - UserIsAdminIdxBtree = new(this); - UserNameIdxBtree = new(this); + Age = new(this); + Id = new(this); + IsAdmin = new(this); + Name = new(this); } protected override object GetPrimaryKey(User row) => row.Id; @@ -76,10 +76,10 @@ public sealed class UserCols public UserCols(string tableName) { - Id = new global::SpacetimeDB.Col(tableName, "Id"); - Name = new global::SpacetimeDB.Col(tableName, "Name"); - IsAdmin = new global::SpacetimeDB.Col(tableName, "IsAdmin"); - Age = new global::SpacetimeDB.Col(tableName, "Age"); + Id = new global::SpacetimeDB.Col(tableName, "id"); + Name = new global::SpacetimeDB.Col(tableName, "name"); + IsAdmin = new global::SpacetimeDB.Col(tableName, "is_admin"); + Age = new global::SpacetimeDB.Col(tableName, "age"); } } @@ -92,10 +92,10 @@ public sealed class UserIxCols public UserIxCols(string tableName) { - Id = new global::SpacetimeDB.IxCol(tableName, "Id"); - Name = new global::SpacetimeDB.IxCol(tableName, "Name"); - IsAdmin = new global::SpacetimeDB.IxCol(tableName, "IsAdmin"); - Age = new global::SpacetimeDB.IxCol(tableName, "Age"); + Id = new global::SpacetimeDB.IxCol(tableName, "id"); + Name = new global::SpacetimeDB.IxCol(tableName, "name"); + IsAdmin = new global::SpacetimeDB.IxCol(tableName, "is_admin"); + Age = new global::SpacetimeDB.IxCol(tableName, "age"); } } } diff --git a/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/UsersAge1865.g.cs b/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/UsersAge1865.g.cs index 78171d66a35..a00dcd354fc 100644 --- a/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/UsersAge1865.g.cs +++ b/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/UsersAge1865.g.cs @@ -34,10 +34,10 @@ public sealed class UsersAge1865Cols public UsersAge1865Cols(string tableName) { - Id = new global::SpacetimeDB.Col(tableName, "Id"); - Name = new global::SpacetimeDB.Col(tableName, "Name"); - IsAdmin = new global::SpacetimeDB.Col(tableName, "IsAdmin"); - Age = new global::SpacetimeDB.Col(tableName, "Age"); + Id = new global::SpacetimeDB.Col(tableName, "id"); + Name = new global::SpacetimeDB.Col(tableName, "name"); + IsAdmin = new global::SpacetimeDB.Col(tableName, "is_admin"); + Age = new global::SpacetimeDB.Col(tableName, "age"); } } diff --git a/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/UsersAge18Plus.g.cs b/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/UsersAge18Plus.g.cs index 87f6afb1d69..1413b906c4c 100644 --- a/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/UsersAge18Plus.g.cs +++ b/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/UsersAge18Plus.g.cs @@ -34,10 +34,10 @@ public sealed class UsersAge18PlusCols public UsersAge18PlusCols(string tableName) { - Id = new global::SpacetimeDB.Col(tableName, "Id"); - Name = new global::SpacetimeDB.Col(tableName, "Name"); - IsAdmin = new global::SpacetimeDB.Col(tableName, "IsAdmin"); - Age = new global::SpacetimeDB.Col(tableName, "Age"); + Id = new global::SpacetimeDB.Col(tableName, "id"); + Name = new global::SpacetimeDB.Col(tableName, "name"); + IsAdmin = new global::SpacetimeDB.Col(tableName, "is_admin"); + Age = new global::SpacetimeDB.Col(tableName, "age"); } } diff --git a/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/UsersAgeUnder18.g.cs b/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/UsersAgeUnder18.g.cs index a397cf7f0a7..23fc0cb4945 100644 --- a/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/UsersAgeUnder18.g.cs +++ b/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/UsersAgeUnder18.g.cs @@ -34,10 +34,10 @@ public sealed class UsersAgeUnder18Cols public UsersAgeUnder18Cols(string tableName) { - Id = new global::SpacetimeDB.Col(tableName, "Id"); - Name = new global::SpacetimeDB.Col(tableName, "Name"); - IsAdmin = new global::SpacetimeDB.Col(tableName, "IsAdmin"); - Age = new global::SpacetimeDB.Col(tableName, "Age"); + Id = new global::SpacetimeDB.Col(tableName, "id"); + Name = new global::SpacetimeDB.Col(tableName, "name"); + IsAdmin = new global::SpacetimeDB.Col(tableName, "is_admin"); + Age = new global::SpacetimeDB.Col(tableName, "age"); } } diff --git a/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/UsersNamedAlice.g.cs b/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/UsersNamedAlice.g.cs index 6805fd9aa0b..7a02dd30ce4 100644 --- a/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/UsersNamedAlice.g.cs +++ b/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/UsersNamedAlice.g.cs @@ -34,10 +34,10 @@ public sealed class UsersNamedAliceCols public UsersNamedAliceCols(string tableName) { - Id = new global::SpacetimeDB.Col(tableName, "Id"); - Name = new global::SpacetimeDB.Col(tableName, "Name"); - IsAdmin = new global::SpacetimeDB.Col(tableName, "IsAdmin"); - Age = new global::SpacetimeDB.Col(tableName, "Age"); + Id = new global::SpacetimeDB.Col(tableName, "id"); + Name = new global::SpacetimeDB.Col(tableName, "name"); + IsAdmin = new global::SpacetimeDB.Col(tableName, "is_admin"); + Age = new global::SpacetimeDB.Col(tableName, "age"); } } diff --git a/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/WhereTest.g.cs b/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/WhereTest.g.cs index b49b51a62ea..b9e650d1c3f 100644 --- a/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/WhereTest.g.cs +++ b/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/WhereTest.g.cs @@ -17,28 +17,28 @@ public sealed class WhereTestHandle : RemoteTableHandle { protected override string RemoteTableName => "where_test"; - public sealed class WhereTestIdIdxBtreeUniqueIndex : UniqueIndexBase + public sealed class IdUniqueIndex : UniqueIndexBase { protected override uint GetKey(WhereTest row) => row.Id; - public WhereTestIdIdxBtreeUniqueIndex(WhereTestHandle table) : base(table) { } + public IdUniqueIndex(WhereTestHandle table) : base(table) { } } - public readonly WhereTestIdIdxBtreeUniqueIndex WhereTestIdIdxBtree; + public readonly IdUniqueIndex Id; - public sealed class WhereTestValueIdxBtreeIndex : BTreeIndexBase + public sealed class ValueIndex : BTreeIndexBase { protected override uint GetKey(WhereTest row) => row.Value; - public WhereTestValueIdxBtreeIndex(WhereTestHandle table) : base(table) { } + public ValueIndex(WhereTestHandle table) : base(table) { } } - public readonly WhereTestValueIdxBtreeIndex WhereTestValueIdxBtree; + public readonly ValueIndex Value; internal WhereTestHandle(DbConnection conn) : base(conn) { - WhereTestIdIdxBtree = new(this); - WhereTestValueIdxBtree = new(this); + Id = new(this); + Value = new(this); } protected override object GetPrimaryKey(WhereTest row) => row.Id; @@ -55,9 +55,9 @@ public sealed class WhereTestCols public WhereTestCols(string tableName) { - Id = new global::SpacetimeDB.Col(tableName, "Id"); - Value = new global::SpacetimeDB.Col(tableName, "Value"); - Name = new global::SpacetimeDB.Col(tableName, "Name"); + Id = new global::SpacetimeDB.Col(tableName, "id"); + Value = new global::SpacetimeDB.Col(tableName, "value"); + Name = new global::SpacetimeDB.Col(tableName, "name"); } } @@ -68,8 +68,8 @@ public sealed class WhereTestIxCols public WhereTestIxCols(string tableName) { - Id = new global::SpacetimeDB.IxCol(tableName, "Id"); - Value = new global::SpacetimeDB.IxCol(tableName, "Value"); + Id = new global::SpacetimeDB.IxCol(tableName, "id"); + Value = new global::SpacetimeDB.IxCol(tableName, "value"); } } } diff --git a/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/WhereTestQuery.g.cs b/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/WhereTestQuery.g.cs index 6a9ea19119d..8e039b09042 100644 --- a/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/WhereTestQuery.g.cs +++ b/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/WhereTestQuery.g.cs @@ -33,9 +33,9 @@ public sealed class WhereTestQueryCols public WhereTestQueryCols(string tableName) { - Id = new global::SpacetimeDB.Col(tableName, "Id"); - Value = new global::SpacetimeDB.Col(tableName, "Value"); - Name = new global::SpacetimeDB.Col(tableName, "Name"); + Id = new global::SpacetimeDB.Col(tableName, "id"); + Value = new global::SpacetimeDB.Col(tableName, "value"); + Name = new global::SpacetimeDB.Col(tableName, "name"); } } diff --git a/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/WhereTestView.g.cs b/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/WhereTestView.g.cs index cab3ddd6af7..4752deea168 100644 --- a/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/WhereTestView.g.cs +++ b/sdks/csharp/examples~/regression-tests/client/module_bindings/Tables/WhereTestView.g.cs @@ -33,9 +33,9 @@ public sealed class WhereTestViewCols public WhereTestViewCols(string tableName) { - Id = new global::SpacetimeDB.Col(tableName, "Id"); - Value = new global::SpacetimeDB.Col(tableName, "Value"); - Name = new global::SpacetimeDB.Col(tableName, "Name"); + Id = new global::SpacetimeDB.Col(tableName, "id"); + Value = new global::SpacetimeDB.Col(tableName, "value"); + Name = new global::SpacetimeDB.Col(tableName, "name"); } } diff --git a/sdks/csharp/examples~/regression-tests/client/module_bindings/Types/Account.g.cs b/sdks/csharp/examples~/regression-tests/client/module_bindings/Types/Account.g.cs index f3418a9aefe..adca538f682 100644 --- a/sdks/csharp/examples~/regression-tests/client/module_bindings/Types/Account.g.cs +++ b/sdks/csharp/examples~/regression-tests/client/module_bindings/Types/Account.g.cs @@ -13,11 +13,11 @@ namespace SpacetimeDB.Types [DataContract] public sealed partial class Account { - [DataMember(Name = "Id")] + [DataMember(Name = "id")] public ulong Id; - [DataMember(Name = "Identity")] + [DataMember(Name = "identity")] public SpacetimeDB.Identity Identity; - [DataMember(Name = "Name")] + [DataMember(Name = "name")] public string Name; public Account( diff --git a/sdks/csharp/examples~/regression-tests/client/module_bindings/Types/DbVector2.g.cs b/sdks/csharp/examples~/regression-tests/client/module_bindings/Types/DbVector2.g.cs index d42eea68a74..2400f99c156 100644 --- a/sdks/csharp/examples~/regression-tests/client/module_bindings/Types/DbVector2.g.cs +++ b/sdks/csharp/examples~/regression-tests/client/module_bindings/Types/DbVector2.g.cs @@ -13,9 +13,9 @@ namespace SpacetimeDB.Types [DataContract] public sealed partial class DbVector2 { - [DataMember(Name = "X")] + [DataMember(Name = "x")] public int X; - [DataMember(Name = "Y")] + [DataMember(Name = "y")] public int Y; public DbVector2( diff --git a/sdks/csharp/examples~/regression-tests/client/module_bindings/Types/ExampleData.g.cs b/sdks/csharp/examples~/regression-tests/client/module_bindings/Types/ExampleData.g.cs index d3b300f1283..f5216df6962 100644 --- a/sdks/csharp/examples~/regression-tests/client/module_bindings/Types/ExampleData.g.cs +++ b/sdks/csharp/examples~/regression-tests/client/module_bindings/Types/ExampleData.g.cs @@ -13,9 +13,9 @@ namespace SpacetimeDB.Types [DataContract] public sealed partial class ExampleData { - [DataMember(Name = "Id")] + [DataMember(Name = "id")] public uint Id; - [DataMember(Name = "Indexed")] + [DataMember(Name = "indexed")] public uint Indexed; public ExampleData( diff --git a/sdks/csharp/examples~/regression-tests/client/module_bindings/Types/MyTable.g.cs b/sdks/csharp/examples~/regression-tests/client/module_bindings/Types/MyTable.g.cs index 9e720eb8469..fdd257e314a 100644 --- a/sdks/csharp/examples~/regression-tests/client/module_bindings/Types/MyTable.g.cs +++ b/sdks/csharp/examples~/regression-tests/client/module_bindings/Types/MyTable.g.cs @@ -13,7 +13,7 @@ namespace SpacetimeDB.Types [DataContract] public sealed partial class MyTable { - [DataMember(Name = "Field")] + [DataMember(Name = "field")] public ReturnStruct Field; public MyTable(ReturnStruct Field) diff --git a/sdks/csharp/examples~/regression-tests/client/module_bindings/Types/NullStringNonNullable.g.cs b/sdks/csharp/examples~/regression-tests/client/module_bindings/Types/NullStringNonNullable.g.cs index 2f639a0a5fd..426179de0cc 100644 --- a/sdks/csharp/examples~/regression-tests/client/module_bindings/Types/NullStringNonNullable.g.cs +++ b/sdks/csharp/examples~/regression-tests/client/module_bindings/Types/NullStringNonNullable.g.cs @@ -13,9 +13,9 @@ namespace SpacetimeDB.Types [DataContract] public sealed partial class NullStringNonNullable { - [DataMember(Name = "Id")] + [DataMember(Name = "id")] public ulong Id; - [DataMember(Name = "Name")] + [DataMember(Name = "name")] public string Name; public NullStringNonNullable( diff --git a/sdks/csharp/examples~/regression-tests/client/module_bindings/Types/NullStringNullable.g.cs b/sdks/csharp/examples~/regression-tests/client/module_bindings/Types/NullStringNullable.g.cs index 9d0d619edd1..35781bc37ba 100644 --- a/sdks/csharp/examples~/regression-tests/client/module_bindings/Types/NullStringNullable.g.cs +++ b/sdks/csharp/examples~/regression-tests/client/module_bindings/Types/NullStringNullable.g.cs @@ -13,9 +13,9 @@ namespace SpacetimeDB.Types [DataContract] public sealed partial class NullStringNullable { - [DataMember(Name = "Id")] + [DataMember(Name = "id")] public ulong Id; - [DataMember(Name = "Name")] + [DataMember(Name = "name")] public string? Name; public NullStringNullable( diff --git a/sdks/csharp/examples~/regression-tests/client/module_bindings/Types/NullableVec.g.cs b/sdks/csharp/examples~/regression-tests/client/module_bindings/Types/NullableVec.g.cs index f895df8765a..5cfe0879278 100644 --- a/sdks/csharp/examples~/regression-tests/client/module_bindings/Types/NullableVec.g.cs +++ b/sdks/csharp/examples~/regression-tests/client/module_bindings/Types/NullableVec.g.cs @@ -13,9 +13,9 @@ namespace SpacetimeDB.Types [DataContract] public sealed partial class NullableVec { - [DataMember(Name = "Id")] + [DataMember(Name = "id")] public uint Id; - [DataMember(Name = "Pos")] + [DataMember(Name = "pos")] public DbVector2? Pos; public NullableVec( diff --git a/sdks/csharp/examples~/regression-tests/client/module_bindings/Types/Player.g.cs b/sdks/csharp/examples~/regression-tests/client/module_bindings/Types/Player.g.cs index 443f51cf68f..2e7d36dc828 100644 --- a/sdks/csharp/examples~/regression-tests/client/module_bindings/Types/Player.g.cs +++ b/sdks/csharp/examples~/regression-tests/client/module_bindings/Types/Player.g.cs @@ -13,11 +13,11 @@ namespace SpacetimeDB.Types [DataContract] public sealed partial class Player { - [DataMember(Name = "Id")] + [DataMember(Name = "id")] public ulong Id; - [DataMember(Name = "Identity")] + [DataMember(Name = "identity")] public SpacetimeDB.Identity Identity; - [DataMember(Name = "Name")] + [DataMember(Name = "name")] public string Name; public Player( diff --git a/sdks/csharp/examples~/regression-tests/client/module_bindings/Types/PlayerAndLevel.g.cs b/sdks/csharp/examples~/regression-tests/client/module_bindings/Types/PlayerAndLevel.g.cs index f87a401f421..586c92eb804 100644 --- a/sdks/csharp/examples~/regression-tests/client/module_bindings/Types/PlayerAndLevel.g.cs +++ b/sdks/csharp/examples~/regression-tests/client/module_bindings/Types/PlayerAndLevel.g.cs @@ -13,13 +13,13 @@ namespace SpacetimeDB.Types [DataContract] public sealed partial class PlayerAndLevel { - [DataMember(Name = "Id")] + [DataMember(Name = "id")] public ulong Id; - [DataMember(Name = "Identity")] + [DataMember(Name = "identity")] public SpacetimeDB.Identity Identity; - [DataMember(Name = "Name")] + [DataMember(Name = "name")] public string Name; - [DataMember(Name = "Level")] + [DataMember(Name = "level")] public ulong Level; public PlayerAndLevel( diff --git a/sdks/csharp/examples~/regression-tests/client/module_bindings/Types/PlayerLevel.g.cs b/sdks/csharp/examples~/regression-tests/client/module_bindings/Types/PlayerLevel.g.cs index 8f9fb43e7f3..2ba3320cfed 100644 --- a/sdks/csharp/examples~/regression-tests/client/module_bindings/Types/PlayerLevel.g.cs +++ b/sdks/csharp/examples~/regression-tests/client/module_bindings/Types/PlayerLevel.g.cs @@ -13,9 +13,9 @@ namespace SpacetimeDB.Types [DataContract] public sealed partial class PlayerLevel { - [DataMember(Name = "PlayerId")] + [DataMember(Name = "player_id")] public ulong PlayerId; - [DataMember(Name = "Level")] + [DataMember(Name = "level")] public ulong Level; public PlayerLevel( diff --git a/sdks/csharp/examples~/regression-tests/client/module_bindings/Types/RetryLog.g.cs b/sdks/csharp/examples~/regression-tests/client/module_bindings/Types/RetryLog.g.cs index a7a2faef743..aab16822233 100644 --- a/sdks/csharp/examples~/regression-tests/client/module_bindings/Types/RetryLog.g.cs +++ b/sdks/csharp/examples~/regression-tests/client/module_bindings/Types/RetryLog.g.cs @@ -13,9 +13,9 @@ namespace SpacetimeDB.Types [DataContract] public sealed partial class RetryLog { - [DataMember(Name = "Id")] + [DataMember(Name = "id")] public uint Id; - [DataMember(Name = "Attempts")] + [DataMember(Name = "attempts")] public uint Attempts; public RetryLog( diff --git a/sdks/csharp/examples~/regression-tests/client/module_bindings/Types/ReturnStruct.g.cs b/sdks/csharp/examples~/regression-tests/client/module_bindings/Types/ReturnStruct.g.cs index 1deb22e335a..f75ec603343 100644 --- a/sdks/csharp/examples~/regression-tests/client/module_bindings/Types/ReturnStruct.g.cs +++ b/sdks/csharp/examples~/regression-tests/client/module_bindings/Types/ReturnStruct.g.cs @@ -13,9 +13,9 @@ namespace SpacetimeDB.Types [DataContract] public sealed partial class ReturnStruct { - [DataMember(Name = "A")] + [DataMember(Name = "a")] public uint A; - [DataMember(Name = "B")] + [DataMember(Name = "b")] public string B; public ReturnStruct( diff --git a/sdks/csharp/examples~/regression-tests/client/module_bindings/Types/Score.g.cs b/sdks/csharp/examples~/regression-tests/client/module_bindings/Types/Score.g.cs index 4b80e0d9bd8..2e196e6827e 100644 --- a/sdks/csharp/examples~/regression-tests/client/module_bindings/Types/Score.g.cs +++ b/sdks/csharp/examples~/regression-tests/client/module_bindings/Types/Score.g.cs @@ -13,11 +13,11 @@ namespace SpacetimeDB.Types [DataContract] public sealed partial class Score { - [DataMember(Name = "PlayerId")] + [DataMember(Name = "player_id")] public uint PlayerId; - [DataMember(Name = "Level")] + [DataMember(Name = "level")] public uint Level; - [DataMember(Name = "Points")] + [DataMember(Name = "points")] public long Points; public Score( diff --git a/sdks/csharp/examples~/regression-tests/client/module_bindings/Types/TestEvent.g.cs b/sdks/csharp/examples~/regression-tests/client/module_bindings/Types/TestEvent.g.cs index d9faeffc79d..e0b4dd58602 100644 --- a/sdks/csharp/examples~/regression-tests/client/module_bindings/Types/TestEvent.g.cs +++ b/sdks/csharp/examples~/regression-tests/client/module_bindings/Types/TestEvent.g.cs @@ -13,9 +13,9 @@ namespace SpacetimeDB.Types [DataContract] public sealed partial class TestEvent { - [DataMember(Name = "Name")] + [DataMember(Name = "name")] public string Name; - [DataMember(Name = "Value")] + [DataMember(Name = "value")] public ulong Value; public TestEvent( diff --git a/sdks/csharp/examples~/regression-tests/client/module_bindings/Types/User.g.cs b/sdks/csharp/examples~/regression-tests/client/module_bindings/Types/User.g.cs index 825676f8193..4c705e97144 100644 --- a/sdks/csharp/examples~/regression-tests/client/module_bindings/Types/User.g.cs +++ b/sdks/csharp/examples~/regression-tests/client/module_bindings/Types/User.g.cs @@ -13,13 +13,13 @@ namespace SpacetimeDB.Types [DataContract] public sealed partial class User { - [DataMember(Name = "Id")] + [DataMember(Name = "id")] public SpacetimeDB.Uuid Id; - [DataMember(Name = "Name")] + [DataMember(Name = "name")] public string Name; - [DataMember(Name = "IsAdmin")] + [DataMember(Name = "is_admin")] public bool IsAdmin; - [DataMember(Name = "Age")] + [DataMember(Name = "age")] public byte Age; public User( diff --git a/sdks/csharp/examples~/regression-tests/client/module_bindings/Types/WhereTest.g.cs b/sdks/csharp/examples~/regression-tests/client/module_bindings/Types/WhereTest.g.cs index 0a5e8c3368f..34090bc58d7 100644 --- a/sdks/csharp/examples~/regression-tests/client/module_bindings/Types/WhereTest.g.cs +++ b/sdks/csharp/examples~/regression-tests/client/module_bindings/Types/WhereTest.g.cs @@ -13,11 +13,11 @@ namespace SpacetimeDB.Types [DataContract] public sealed partial class WhereTest { - [DataMember(Name = "Id")] + [DataMember(Name = "id")] public uint Id; - [DataMember(Name = "Value")] + [DataMember(Name = "value")] public uint Value; - [DataMember(Name = "Name")] + [DataMember(Name = "name")] public string Name; public WhereTest( From 780677c05dece77f091fbbcf6d60519468245b13 Mon Sep 17 00:00:00 2001 From: Shubham Mishra Date: Thu, 19 Feb 2026 11:11:51 +0530 Subject: [PATCH 102/133] Blackholio --- .../Scripts/autogen/SpacetimeDBClient.g.cs | 2 +- .../Assets/Scripts/autogen/Tables/Circle.g.cs | 20 ----- .../Assets/Scripts/autogen/Tables/Config.g.cs | 10 --- .../Assets/Scripts/autogen/Tables/Entity.g.cs | 10 --- .../Assets/Scripts/autogen/Tables/Food.g.cs | 10 --- .../Assets/Scripts/autogen/Tables/Player.g.cs | 20 ----- .../ModuleBindings/SpacetimeDBClient.g.cpp | 4 + .../ModuleBindings/Tables/CircleTable.g.cpp | 18 ----- .../ModuleBindings/Tables/ConfigTable.g.cpp | 5 -- .../Tables/ConsumeEntityEventTable.g.cpp | 35 ++++++++ .../ModuleBindings/Tables/EntityTable.g.cpp | 5 -- .../ModuleBindings/Tables/FoodTable.g.cpp | 5 -- .../ModuleBindings/Tables/PlayerTable.g.cpp | 10 --- .../ModuleBindings/SpacetimeDBClient.g.h | 6 +- .../ModuleBindings/Tables/CircleTable.g.h | 77 ------------------ .../ModuleBindings/Tables/ConfigTable.g.h | 40 ---------- .../Tables/ConsumeEntityEventTable.g.h | 64 +++++++++++++++ .../ModuleBindings/Tables/EntityTable.g.h | 40 ---------- .../ModuleBindings/Tables/FoodTable.g.h | 40 ---------- .../ModuleBindings/Tables/PlayerTable.g.h | 80 ------------------- .../Types/ConsumeEntityEventType.g.h | 49 ++++++++++++ 21 files changed, 158 insertions(+), 392 deletions(-) create mode 100644 demo/Blackholio/client-unreal/Source/client_unreal/Private/ModuleBindings/Tables/ConsumeEntityEventTable.g.cpp create mode 100644 demo/Blackholio/client-unreal/Source/client_unreal/Public/ModuleBindings/Tables/ConsumeEntityEventTable.g.h create mode 100644 demo/Blackholio/client-unreal/Source/client_unreal/Public/ModuleBindings/Types/ConsumeEntityEventType.g.h diff --git a/demo/Blackholio/client-unity/Assets/Scripts/autogen/SpacetimeDBClient.g.cs b/demo/Blackholio/client-unity/Assets/Scripts/autogen/SpacetimeDBClient.g.cs index 90582de9c72..423b77b5cf4 100644 --- a/demo/Blackholio/client-unity/Assets/Scripts/autogen/SpacetimeDBClient.g.cs +++ b/demo/Blackholio/client-unity/Assets/Scripts/autogen/SpacetimeDBClient.g.cs @@ -1,7 +1,7 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE // WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. -// This was generated using spacetimedb cli version 2.0.0 (commit 9e0e81a6aaec6bf3619cfb9f7916743d86ab7ffc). +// This was generated using spacetimedb cli version 2.0.0 (commit 6a6b5a6616f0578aa641bc0689691f953b13feb8). #nullable enable diff --git a/demo/Blackholio/client-unity/Assets/Scripts/autogen/Tables/Circle.g.cs b/demo/Blackholio/client-unity/Assets/Scripts/autogen/Tables/Circle.g.cs index adec597e502..03da268f2ae 100644 --- a/demo/Blackholio/client-unity/Assets/Scripts/autogen/Tables/Circle.g.cs +++ b/demo/Blackholio/client-unity/Assets/Scripts/autogen/Tables/Circle.g.cs @@ -17,28 +17,8 @@ public sealed class CircleHandle : RemoteTableHandle { protected override string RemoteTableName => "circle"; - public sealed class CircleEntityIdIdxBtreeUniqueIndex : UniqueIndexBase - { - protected override int GetKey(Circle row) => row.EntityId; - - public CircleEntityIdIdxBtreeUniqueIndex(CircleHandle table) : base(table) { } - } - - public readonly CircleEntityIdIdxBtreeUniqueIndex CircleEntityIdIdxBtree; - - public sealed class CirclePlayerIdIdxBtreeIndex : BTreeIndexBase - { - protected override int GetKey(Circle row) => row.PlayerId; - - public CirclePlayerIdIdxBtreeIndex(CircleHandle table) : base(table) { } - } - - public readonly CirclePlayerIdIdxBtreeIndex CirclePlayerIdIdxBtree; - internal CircleHandle(DbConnection conn) : base(conn) { - CircleEntityIdIdxBtree = new(this); - CirclePlayerIdIdxBtree = new(this); } protected override object GetPrimaryKey(Circle row) => row.EntityId; diff --git a/demo/Blackholio/client-unity/Assets/Scripts/autogen/Tables/Config.g.cs b/demo/Blackholio/client-unity/Assets/Scripts/autogen/Tables/Config.g.cs index d832af49343..2fd3b1e9c63 100644 --- a/demo/Blackholio/client-unity/Assets/Scripts/autogen/Tables/Config.g.cs +++ b/demo/Blackholio/client-unity/Assets/Scripts/autogen/Tables/Config.g.cs @@ -17,18 +17,8 @@ public sealed class ConfigHandle : RemoteTableHandle { protected override string RemoteTableName => "config"; - public sealed class ConfigIdIdxBtreeUniqueIndex : UniqueIndexBase - { - protected override int GetKey(Config row) => row.Id; - - public ConfigIdIdxBtreeUniqueIndex(ConfigHandle table) : base(table) { } - } - - public readonly ConfigIdIdxBtreeUniqueIndex ConfigIdIdxBtree; - internal ConfigHandle(DbConnection conn) : base(conn) { - ConfigIdIdxBtree = new(this); } protected override object GetPrimaryKey(Config row) => row.Id; diff --git a/demo/Blackholio/client-unity/Assets/Scripts/autogen/Tables/Entity.g.cs b/demo/Blackholio/client-unity/Assets/Scripts/autogen/Tables/Entity.g.cs index 43e0b9215d7..09d62088de0 100644 --- a/demo/Blackholio/client-unity/Assets/Scripts/autogen/Tables/Entity.g.cs +++ b/demo/Blackholio/client-unity/Assets/Scripts/autogen/Tables/Entity.g.cs @@ -17,18 +17,8 @@ public sealed class EntityHandle : RemoteTableHandle { protected override string RemoteTableName => "entity"; - public sealed class EntityEntityIdIdxBtreeUniqueIndex : UniqueIndexBase - { - protected override int GetKey(Entity row) => row.EntityId; - - public EntityEntityIdIdxBtreeUniqueIndex(EntityHandle table) : base(table) { } - } - - public readonly EntityEntityIdIdxBtreeUniqueIndex EntityEntityIdIdxBtree; - internal EntityHandle(DbConnection conn) : base(conn) { - EntityEntityIdIdxBtree = new(this); } protected override object GetPrimaryKey(Entity row) => row.EntityId; diff --git a/demo/Blackholio/client-unity/Assets/Scripts/autogen/Tables/Food.g.cs b/demo/Blackholio/client-unity/Assets/Scripts/autogen/Tables/Food.g.cs index 1a1883b1c2f..dbd0848d69b 100644 --- a/demo/Blackholio/client-unity/Assets/Scripts/autogen/Tables/Food.g.cs +++ b/demo/Blackholio/client-unity/Assets/Scripts/autogen/Tables/Food.g.cs @@ -17,18 +17,8 @@ public sealed class FoodHandle : RemoteTableHandle { protected override string RemoteTableName => "food"; - public sealed class FoodEntityIdIdxBtreeUniqueIndex : UniqueIndexBase - { - protected override int GetKey(Food row) => row.EntityId; - - public FoodEntityIdIdxBtreeUniqueIndex(FoodHandle table) : base(table) { } - } - - public readonly FoodEntityIdIdxBtreeUniqueIndex FoodEntityIdIdxBtree; - internal FoodHandle(DbConnection conn) : base(conn) { - FoodEntityIdIdxBtree = new(this); } protected override object GetPrimaryKey(Food row) => row.EntityId; diff --git a/demo/Blackholio/client-unity/Assets/Scripts/autogen/Tables/Player.g.cs b/demo/Blackholio/client-unity/Assets/Scripts/autogen/Tables/Player.g.cs index 0c3082d45f1..0b6d8bf6ae6 100644 --- a/demo/Blackholio/client-unity/Assets/Scripts/autogen/Tables/Player.g.cs +++ b/demo/Blackholio/client-unity/Assets/Scripts/autogen/Tables/Player.g.cs @@ -17,28 +17,8 @@ public sealed class PlayerHandle : RemoteTableHandle { protected override string RemoteTableName => "player"; - public sealed class PlayerIdentityIdxBtreeUniqueIndex : UniqueIndexBase - { - protected override SpacetimeDB.Identity GetKey(Player row) => row.Identity; - - public PlayerIdentityIdxBtreeUniqueIndex(PlayerHandle table) : base(table) { } - } - - public readonly PlayerIdentityIdxBtreeUniqueIndex PlayerIdentityIdxBtree; - - public sealed class PlayerPlayerIdIdxBtreeUniqueIndex : UniqueIndexBase - { - protected override int GetKey(Player row) => row.PlayerId; - - public PlayerPlayerIdIdxBtreeUniqueIndex(PlayerHandle table) : base(table) { } - } - - public readonly PlayerPlayerIdIdxBtreeUniqueIndex PlayerPlayerIdIdxBtree; - internal PlayerHandle(DbConnection conn) : base(conn) { - PlayerIdentityIdxBtree = new(this); - PlayerPlayerIdIdxBtree = new(this); } protected override object GetPrimaryKey(Player row) => row.Identity; diff --git a/demo/Blackholio/client-unreal/Source/client_unreal/Private/ModuleBindings/SpacetimeDBClient.g.cpp b/demo/Blackholio/client-unreal/Source/client_unreal/Private/ModuleBindings/SpacetimeDBClient.g.cpp index 471fac9e789..8071a62f7fa 100644 --- a/demo/Blackholio/client-unreal/Source/client_unreal/Private/ModuleBindings/SpacetimeDBClient.g.cpp +++ b/demo/Blackholio/client-unreal/Source/client_unreal/Private/ModuleBindings/SpacetimeDBClient.g.cpp @@ -6,6 +6,7 @@ #include "BSATN/UEBSATNHelpers.h" #include "ModuleBindings/Tables/CircleTable.g.h" #include "ModuleBindings/Tables/ConfigTable.g.h" +#include "ModuleBindings/Tables/ConsumeEntityEventTable.g.h" #include "ModuleBindings/Tables/EntityTable.g.h" #include "ModuleBindings/Tables/FoodTable.g.h" #include "ModuleBindings/Tables/PlayerTable.g.h" @@ -63,6 +64,7 @@ UDbConnection::UDbConnection(const FObjectInitializer& ObjectInitializer) : Supe RegisterTable(TEXT("circle"), Db->Circle); RegisterTable(TEXT("config"), Db->Config); + RegisterTable(TEXT("consume_entity_event"), Db->ConsumeEntityEvent); RegisterTable(TEXT("entity"), Db->Entity); RegisterTable(TEXT("food"), Db->Food); RegisterTable(TEXT("player"), Db->Player); @@ -103,6 +105,7 @@ void URemoteTables::Initialize() /** Creating tables */ Circle = NewObject(this); Config = NewObject(this); + ConsumeEntityEvent = NewObject(this); Entity = NewObject(this); Food = NewObject(this); Player = NewObject(this); @@ -111,6 +114,7 @@ void URemoteTables::Initialize() /** Initialization */ Circle->PostInitialize(); Config->PostInitialize(); + ConsumeEntityEvent->PostInitialize(); Entity->PostInitialize(); Food->PostInitialize(); Player->PostInitialize(); diff --git a/demo/Blackholio/client-unreal/Source/client_unreal/Private/ModuleBindings/Tables/CircleTable.g.cpp b/demo/Blackholio/client-unreal/Source/client_unreal/Private/ModuleBindings/Tables/CircleTable.g.cpp index 0cf80413ea4..975329c06d0 100644 --- a/demo/Blackholio/client-unreal/Source/client_unreal/Private/ModuleBindings/Tables/CircleTable.g.cpp +++ b/demo/Blackholio/client-unreal/Source/client_unreal/Private/ModuleBindings/Tables/CircleTable.g.cpp @@ -13,24 +13,6 @@ void UCircleTable::PostInitialize() Data = MakeShared>(); TSharedPtr> CircleTable = Data->GetOrAdd(TableName); - CircleTable->AddUniqueConstraint("entity_id", [](const FCircleType& Row) -> const int32& { - return Row.EntityId; }); - - CircleEntityIdIdxBtree = NewObject(this); - CircleEntityIdIdxBtree->SetCache(CircleTable); - - // Register a new multi-key B-Tree index named "circle_player_id_idx_btree" on the CircleTable. - CircleTable->AddMultiKeyBTreeIndex>( - TEXT("circle_player_id_idx_btree"), - [](const FCircleType& Row) - { - // This tuple is stored in the B-Tree index for fast composite key lookups. - return MakeTuple(Row.PlayerId); - } - ); - - CirclePlayerIdIdxBtree = NewObject(this); - CirclePlayerIdIdxBtree->SetCache(CircleTable); /***/ } diff --git a/demo/Blackholio/client-unreal/Source/client_unreal/Private/ModuleBindings/Tables/ConfigTable.g.cpp b/demo/Blackholio/client-unreal/Source/client_unreal/Private/ModuleBindings/Tables/ConfigTable.g.cpp index 0af137cead7..6f7a6d774ca 100644 --- a/demo/Blackholio/client-unreal/Source/client_unreal/Private/ModuleBindings/Tables/ConfigTable.g.cpp +++ b/demo/Blackholio/client-unreal/Source/client_unreal/Private/ModuleBindings/Tables/ConfigTable.g.cpp @@ -13,11 +13,6 @@ void UConfigTable::PostInitialize() Data = MakeShared>(); TSharedPtr> ConfigTable = Data->GetOrAdd(TableName); - ConfigTable->AddUniqueConstraint("id", [](const FConfigType& Row) -> const int32& { - return Row.Id; }); - - ConfigIdIdxBtree = NewObject(this); - ConfigIdIdxBtree->SetCache(ConfigTable); /***/ } diff --git a/demo/Blackholio/client-unreal/Source/client_unreal/Private/ModuleBindings/Tables/ConsumeEntityEventTable.g.cpp b/demo/Blackholio/client-unreal/Source/client_unreal/Private/ModuleBindings/Tables/ConsumeEntityEventTable.g.cpp new file mode 100644 index 00000000000..2ab6e4ef260 --- /dev/null +++ b/demo/Blackholio/client-unreal/Source/client_unreal/Private/ModuleBindings/Tables/ConsumeEntityEventTable.g.cpp @@ -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. + +#include "ModuleBindings/Tables/ConsumeEntityEventTable.g.h" +#include "DBCache/UniqueIndex.h" +#include "DBCache/BTreeUniqueIndex.h" +#include "DBCache/ClientCache.h" +#include "DBCache/TableCache.h" + +void UConsumeEntityEventTable::PostInitialize() +{ + /** Client cache init and setting up indexes*/ + Data = MakeShared>(); + + TSharedPtr> ConsumeEntityEventTable = Data->GetOrAdd(TableName); + + /***/ +} + +FTableAppliedDiff UConsumeEntityEventTable::Update(TArray> InsertsRef, TArray> DeletesRef) +{ + FTableAppliedDiff Diff = BaseUpdate(InsertsRef, DeletesRef, Data, TableName); + + return Diff; +} + +int32 UConsumeEntityEventTable::Count() const +{ + return GetRowCountFromTable(Data, TableName); +} + +TArray UConsumeEntityEventTable::Iter() const +{ + return GetAllRowsFromTable(Data, TableName); +} diff --git a/demo/Blackholio/client-unreal/Source/client_unreal/Private/ModuleBindings/Tables/EntityTable.g.cpp b/demo/Blackholio/client-unreal/Source/client_unreal/Private/ModuleBindings/Tables/EntityTable.g.cpp index e5e172e803e..15f46a924ff 100644 --- a/demo/Blackholio/client-unreal/Source/client_unreal/Private/ModuleBindings/Tables/EntityTable.g.cpp +++ b/demo/Blackholio/client-unreal/Source/client_unreal/Private/ModuleBindings/Tables/EntityTable.g.cpp @@ -13,11 +13,6 @@ void UEntityTable::PostInitialize() Data = MakeShared>(); TSharedPtr> EntityTable = Data->GetOrAdd(TableName); - EntityTable->AddUniqueConstraint("entity_id", [](const FEntityType& Row) -> const int32& { - return Row.EntityId; }); - - EntityEntityIdIdxBtree = NewObject(this); - EntityEntityIdIdxBtree->SetCache(EntityTable); /***/ } diff --git a/demo/Blackholio/client-unreal/Source/client_unreal/Private/ModuleBindings/Tables/FoodTable.g.cpp b/demo/Blackholio/client-unreal/Source/client_unreal/Private/ModuleBindings/Tables/FoodTable.g.cpp index 8164480f1a1..12191581ea2 100644 --- a/demo/Blackholio/client-unreal/Source/client_unreal/Private/ModuleBindings/Tables/FoodTable.g.cpp +++ b/demo/Blackholio/client-unreal/Source/client_unreal/Private/ModuleBindings/Tables/FoodTable.g.cpp @@ -13,11 +13,6 @@ void UFoodTable::PostInitialize() Data = MakeShared>(); TSharedPtr> FoodTable = Data->GetOrAdd(TableName); - FoodTable->AddUniqueConstraint("entity_id", [](const FFoodType& Row) -> const int32& { - return Row.EntityId; }); - - FoodEntityIdIdxBtree = NewObject(this); - FoodEntityIdIdxBtree->SetCache(FoodTable); /***/ } diff --git a/demo/Blackholio/client-unreal/Source/client_unreal/Private/ModuleBindings/Tables/PlayerTable.g.cpp b/demo/Blackholio/client-unreal/Source/client_unreal/Private/ModuleBindings/Tables/PlayerTable.g.cpp index 9e6c1791fdf..9c2a69f9bda 100644 --- a/demo/Blackholio/client-unreal/Source/client_unreal/Private/ModuleBindings/Tables/PlayerTable.g.cpp +++ b/demo/Blackholio/client-unreal/Source/client_unreal/Private/ModuleBindings/Tables/PlayerTable.g.cpp @@ -13,16 +13,6 @@ void UPlayerTable::PostInitialize() Data = MakeShared>(); TSharedPtr> PlayerTable = Data->GetOrAdd(TableName); - PlayerTable->AddUniqueConstraint("identity", [](const FPlayerType& Row) -> const FSpacetimeDBIdentity& { - return Row.Identity; }); - PlayerTable->AddUniqueConstraint("player_id", [](const FPlayerType& Row) -> const int32& { - return Row.PlayerId; }); - - PlayerIdentityIdxBtree = NewObject(this); - PlayerIdentityIdxBtree->SetCache(PlayerTable); - - PlayerPlayerIdIdxBtree = NewObject(this); - PlayerPlayerIdIdxBtree->SetCache(PlayerTable); /***/ } diff --git a/demo/Blackholio/client-unreal/Source/client_unreal/Public/ModuleBindings/SpacetimeDBClient.g.h b/demo/Blackholio/client-unreal/Source/client_unreal/Public/ModuleBindings/SpacetimeDBClient.g.h index 0ba004f7427..decf7040e1a 100644 --- a/demo/Blackholio/client-unreal/Source/client_unreal/Public/ModuleBindings/SpacetimeDBClient.g.h +++ b/demo/Blackholio/client-unreal/Source/client_unreal/Public/ModuleBindings/SpacetimeDBClient.g.h @@ -1,7 +1,7 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE // WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. -// This was generated using spacetimedb cli version 2.0.0 (commit 9e0e81a6aaec6bf3619cfb9f7916743d86ab7ffc). +// This was generated using spacetimedb cli version 2.0.0 (commit 6a6b5a6616f0578aa641bc0689691f953b13feb8). #pragma once #include "CoreMinimal.h" @@ -33,6 +33,7 @@ class USubscriptionHandle; /** Forward declaration for tables */ class UCircleTable; class UConfigTable; +class UConsumeEntityEventTable; class UEntityTable; class UFoodTable; class UPlayerTable; @@ -715,6 +716,9 @@ class CLIENT_UNREAL_API URemoteTables : public UObject UPROPERTY(BlueprintReadOnly, Category="SpacetimeDB") UConfigTable* Config; + UPROPERTY(BlueprintReadOnly, Category="SpacetimeDB") + UConsumeEntityEventTable* ConsumeEntityEvent; + UPROPERTY(BlueprintReadOnly, Category="SpacetimeDB") UEntityTable* Entity; diff --git a/demo/Blackholio/client-unreal/Source/client_unreal/Public/ModuleBindings/Tables/CircleTable.g.h b/demo/Blackholio/client-unreal/Source/client_unreal/Public/ModuleBindings/Tables/CircleTable.g.h index 29c9ab33cf4..8f8b8cbea06 100644 --- a/demo/Blackholio/client-unreal/Source/client_unreal/Public/ModuleBindings/Tables/CircleTable.g.h +++ b/demo/Blackholio/client-unreal/Source/client_unreal/Public/ModuleBindings/Tables/CircleTable.g.h @@ -12,89 +12,12 @@ #include "DBCache/TableCache.h" #include "CircleTable.g.generated.h" -UCLASS(Blueprintable) -class CLIENT_UNREAL_API UCircleCircleEntityIdIdxBtreeUniqueIndex : public UObject -{ - GENERATED_BODY() - -private: - // Declare an instance of your templated helper. - // It's private because the UObject wrapper will expose its functionality. - FUniqueIndexHelper> CircleEntityIdIdxBtreeIndexHelper; - -public: - UCircleCircleEntityIdIdxBtreeUniqueIndex() - // Initialize the helper with the specific unique index name - : CircleEntityIdIdxBtreeIndexHelper("entity_id") { - } - - /** - * Finds a Circle by their unique entityid. - * @param Key The entityid to search for. - * @return The found FCircleType, or a default-constructed FCircleType if not found. - */ - UFUNCTION(BlueprintCallable, Category = "SpacetimeDB|CircleIndex") - FCircleType Find(int32 Key) - { - // Simply delegate the call to the internal helper - return CircleEntityIdIdxBtreeIndexHelper.FindUniqueIndex(Key); - } - - // A public setter to provide the cache to the helper after construction - // This is a common pattern when the cache might be created or provided by another system. - void SetCache(TSharedPtr> InCircleCache) - { - CircleEntityIdIdxBtreeIndexHelper.Cache = InCircleCache; - } -}; -/***/ - -UCLASS(Blueprintable) -class UCircleCirclePlayerIdIdxBtreeIndex : public UObject -{ - GENERATED_BODY() - -public: - TArray Filter(const int32& PlayerId) const - { - TArray OutResults; - - LocalCache->FindByMultiKeyBTreeIndex>( - OutResults, - TEXT("circle_player_id_idx_btree"), - MakeTuple(PlayerId) - ); - - return OutResults; - } - - void SetCache(TSharedPtr> InCache) - { - LocalCache = InCache; - } - -private: - UFUNCTION(BlueprintCallable) - void FilterPlayerId(TArray& OutResults, const int32& PlayerId) - { - OutResults = Filter(PlayerId); - } - - TSharedPtr> LocalCache; -}; - UCLASS(BlueprintType) class CLIENT_UNREAL_API UCircleTable : public URemoteTable { GENERATED_BODY() public: - UPROPERTY(BlueprintReadOnly) - UCircleCircleEntityIdIdxBtreeUniqueIndex* CircleEntityIdIdxBtree; - - UPROPERTY(BlueprintReadOnly) - UCircleCirclePlayerIdIdxBtreeIndex* CirclePlayerIdIdxBtree; - void PostInitialize(); /** Update function for circle table*/ diff --git a/demo/Blackholio/client-unreal/Source/client_unreal/Public/ModuleBindings/Tables/ConfigTable.g.h b/demo/Blackholio/client-unreal/Source/client_unreal/Public/ModuleBindings/Tables/ConfigTable.g.h index 9afc94984f9..93a6903f6a4 100644 --- a/demo/Blackholio/client-unreal/Source/client_unreal/Public/ModuleBindings/Tables/ConfigTable.g.h +++ b/demo/Blackholio/client-unreal/Source/client_unreal/Public/ModuleBindings/Tables/ConfigTable.g.h @@ -12,52 +12,12 @@ #include "DBCache/TableCache.h" #include "ConfigTable.g.generated.h" -UCLASS(Blueprintable) -class CLIENT_UNREAL_API UConfigConfigIdIdxBtreeUniqueIndex : public UObject -{ - GENERATED_BODY() - -private: - // Declare an instance of your templated helper. - // It's private because the UObject wrapper will expose its functionality. - FUniqueIndexHelper> ConfigIdIdxBtreeIndexHelper; - -public: - UConfigConfigIdIdxBtreeUniqueIndex() - // Initialize the helper with the specific unique index name - : ConfigIdIdxBtreeIndexHelper("id") { - } - - /** - * Finds a Config by their unique id. - * @param Key The id to search for. - * @return The found FConfigType, or a default-constructed FConfigType if not found. - */ - UFUNCTION(BlueprintCallable, Category = "SpacetimeDB|ConfigIndex") - FConfigType Find(int32 Key) - { - // Simply delegate the call to the internal helper - return ConfigIdIdxBtreeIndexHelper.FindUniqueIndex(Key); - } - - // A public setter to provide the cache to the helper after construction - // This is a common pattern when the cache might be created or provided by another system. - void SetCache(TSharedPtr> InConfigCache) - { - ConfigIdIdxBtreeIndexHelper.Cache = InConfigCache; - } -}; -/***/ - UCLASS(BlueprintType) class CLIENT_UNREAL_API UConfigTable : public URemoteTable { GENERATED_BODY() public: - UPROPERTY(BlueprintReadOnly) - UConfigConfigIdIdxBtreeUniqueIndex* ConfigIdIdxBtree; - void PostInitialize(); /** Update function for config table*/ diff --git a/demo/Blackholio/client-unreal/Source/client_unreal/Public/ModuleBindings/Tables/ConsumeEntityEventTable.g.h b/demo/Blackholio/client-unreal/Source/client_unreal/Public/ModuleBindings/Tables/ConsumeEntityEventTable.g.h new file mode 100644 index 00000000000..210bedcaca8 --- /dev/null +++ b/demo/Blackholio/client-unreal/Source/client_unreal/Public/ModuleBindings/Tables/ConsumeEntityEventTable.g.h @@ -0,0 +1,64 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#pragma once +#include "CoreMinimal.h" +#include "BSATN/UESpacetimeDB.h" +#include "Types/Builtins.h" +#include "ModuleBindings/Types/ConsumeEntityEventType.g.h" +#include "Tables/RemoteTable.h" +#include "DBCache/WithBsatn.h" +#include "DBCache/TableHandle.h" +#include "DBCache/TableCache.h" +#include "ConsumeEntityEventTable.g.generated.h" + +UCLASS(BlueprintType) +class CLIENT_UNREAL_API UConsumeEntityEventTable : public URemoteTable +{ + GENERATED_BODY() + +public: + void PostInitialize(); + + /** Update function for consume_entity_event table*/ + FTableAppliedDiff Update(TArray> InsertsRef, TArray> DeletesRef); + + /** Number of subscribed rows currently in the cache */ + UFUNCTION(BlueprintCallable, Category = "SpacetimeDB") + int32 Count() const; + + /** Return all subscribed rows in the cache */ + UFUNCTION(BlueprintCallable, Category = "SpacetimeDB") + TArray Iter() const; + + // Table Events + DECLARE_DYNAMIC_MULTICAST_DELEGATE_TwoParams( + FOnConsumeEntityEventInsert, + const FEventContext&, Context, + const FConsumeEntityEventType&, NewRow); + + DECLARE_DYNAMIC_MULTICAST_DELEGATE_ThreeParams( + FOnConsumeEntityEventUpdate, + const FEventContext&, Context, + const FConsumeEntityEventType&, OldRow, + const FConsumeEntityEventType&, NewRow); + + DECLARE_DYNAMIC_MULTICAST_DELEGATE_TwoParams( + FOnConsumeEntityEventDelete, + const FEventContext&, Context, + const FConsumeEntityEventType&, DeletedRow); + + UPROPERTY(BlueprintAssignable, Category = "SpacetimeDB Events") + FOnConsumeEntityEventInsert OnInsert; + + UPROPERTY(BlueprintAssignable, Category = "SpacetimeDB Events") + FOnConsumeEntityEventUpdate OnUpdate; + + UPROPERTY(BlueprintAssignable, Category = "SpacetimeDB Events") + FOnConsumeEntityEventDelete OnDelete; + +private: + const FString TableName = TEXT("consume_entity_event"); + + TSharedPtr> Data; +}; diff --git a/demo/Blackholio/client-unreal/Source/client_unreal/Public/ModuleBindings/Tables/EntityTable.g.h b/demo/Blackholio/client-unreal/Source/client_unreal/Public/ModuleBindings/Tables/EntityTable.g.h index d02ce24f05a..21c60473f17 100644 --- a/demo/Blackholio/client-unreal/Source/client_unreal/Public/ModuleBindings/Tables/EntityTable.g.h +++ b/demo/Blackholio/client-unreal/Source/client_unreal/Public/ModuleBindings/Tables/EntityTable.g.h @@ -12,52 +12,12 @@ #include "DBCache/TableCache.h" #include "EntityTable.g.generated.h" -UCLASS(Blueprintable) -class CLIENT_UNREAL_API UEntityEntityEntityIdIdxBtreeUniqueIndex : public UObject -{ - GENERATED_BODY() - -private: - // Declare an instance of your templated helper. - // It's private because the UObject wrapper will expose its functionality. - FUniqueIndexHelper> EntityEntityIdIdxBtreeIndexHelper; - -public: - UEntityEntityEntityIdIdxBtreeUniqueIndex() - // Initialize the helper with the specific unique index name - : EntityEntityIdIdxBtreeIndexHelper("entity_id") { - } - - /** - * Finds a Entity by their unique entityid. - * @param Key The entityid to search for. - * @return The found FEntityType, or a default-constructed FEntityType if not found. - */ - UFUNCTION(BlueprintCallable, Category = "SpacetimeDB|EntityIndex") - FEntityType Find(int32 Key) - { - // Simply delegate the call to the internal helper - return EntityEntityIdIdxBtreeIndexHelper.FindUniqueIndex(Key); - } - - // A public setter to provide the cache to the helper after construction - // This is a common pattern when the cache might be created or provided by another system. - void SetCache(TSharedPtr> InEntityCache) - { - EntityEntityIdIdxBtreeIndexHelper.Cache = InEntityCache; - } -}; -/***/ - UCLASS(BlueprintType) class CLIENT_UNREAL_API UEntityTable : public URemoteTable { GENERATED_BODY() public: - UPROPERTY(BlueprintReadOnly) - UEntityEntityEntityIdIdxBtreeUniqueIndex* EntityEntityIdIdxBtree; - void PostInitialize(); /** Update function for entity table*/ diff --git a/demo/Blackholio/client-unreal/Source/client_unreal/Public/ModuleBindings/Tables/FoodTable.g.h b/demo/Blackholio/client-unreal/Source/client_unreal/Public/ModuleBindings/Tables/FoodTable.g.h index 21750d6df02..87ebfb95e9b 100644 --- a/demo/Blackholio/client-unreal/Source/client_unreal/Public/ModuleBindings/Tables/FoodTable.g.h +++ b/demo/Blackholio/client-unreal/Source/client_unreal/Public/ModuleBindings/Tables/FoodTable.g.h @@ -12,52 +12,12 @@ #include "DBCache/TableCache.h" #include "FoodTable.g.generated.h" -UCLASS(Blueprintable) -class CLIENT_UNREAL_API UFoodFoodEntityIdIdxBtreeUniqueIndex : public UObject -{ - GENERATED_BODY() - -private: - // Declare an instance of your templated helper. - // It's private because the UObject wrapper will expose its functionality. - FUniqueIndexHelper> FoodEntityIdIdxBtreeIndexHelper; - -public: - UFoodFoodEntityIdIdxBtreeUniqueIndex() - // Initialize the helper with the specific unique index name - : FoodEntityIdIdxBtreeIndexHelper("entity_id") { - } - - /** - * Finds a Food by their unique entityid. - * @param Key The entityid to search for. - * @return The found FFoodType, or a default-constructed FFoodType if not found. - */ - UFUNCTION(BlueprintCallable, Category = "SpacetimeDB|FoodIndex") - FFoodType Find(int32 Key) - { - // Simply delegate the call to the internal helper - return FoodEntityIdIdxBtreeIndexHelper.FindUniqueIndex(Key); - } - - // A public setter to provide the cache to the helper after construction - // This is a common pattern when the cache might be created or provided by another system. - void SetCache(TSharedPtr> InFoodCache) - { - FoodEntityIdIdxBtreeIndexHelper.Cache = InFoodCache; - } -}; -/***/ - UCLASS(BlueprintType) class CLIENT_UNREAL_API UFoodTable : public URemoteTable { GENERATED_BODY() public: - UPROPERTY(BlueprintReadOnly) - UFoodFoodEntityIdIdxBtreeUniqueIndex* FoodEntityIdIdxBtree; - void PostInitialize(); /** Update function for food table*/ diff --git a/demo/Blackholio/client-unreal/Source/client_unreal/Public/ModuleBindings/Tables/PlayerTable.g.h b/demo/Blackholio/client-unreal/Source/client_unreal/Public/ModuleBindings/Tables/PlayerTable.g.h index feeb8d1e691..af4f729e441 100644 --- a/demo/Blackholio/client-unreal/Source/client_unreal/Public/ModuleBindings/Tables/PlayerTable.g.h +++ b/demo/Blackholio/client-unreal/Source/client_unreal/Public/ModuleBindings/Tables/PlayerTable.g.h @@ -12,92 +12,12 @@ #include "DBCache/TableCache.h" #include "PlayerTable.g.generated.h" -UCLASS(Blueprintable) -class CLIENT_UNREAL_API UPlayerPlayerIdentityIdxBtreeUniqueIndex : public UObject -{ - GENERATED_BODY() - -private: - // Declare an instance of your templated helper. - // It's private because the UObject wrapper will expose its functionality. - FUniqueIndexHelper> PlayerIdentityIdxBtreeIndexHelper; - -public: - UPlayerPlayerIdentityIdxBtreeUniqueIndex() - // Initialize the helper with the specific unique index name - : PlayerIdentityIdxBtreeIndexHelper("identity") { - } - - /** - * Finds a Player by their unique identity. - * @param Key The identity to search for. - * @return The found FPlayerType, or a default-constructed FPlayerType if not found. - */ - UFUNCTION(BlueprintCallable, Category = "SpacetimeDB|PlayerIndex") - FPlayerType Find(FSpacetimeDBIdentity Key) - { - // Simply delegate the call to the internal helper - return PlayerIdentityIdxBtreeIndexHelper.FindUniqueIndex(Key); - } - - // A public setter to provide the cache to the helper after construction - // This is a common pattern when the cache might be created or provided by another system. - void SetCache(TSharedPtr> InPlayerCache) - { - PlayerIdentityIdxBtreeIndexHelper.Cache = InPlayerCache; - } -}; -/***/ - -UCLASS(Blueprintable) -class CLIENT_UNREAL_API UPlayerPlayerPlayerIdIdxBtreeUniqueIndex : public UObject -{ - GENERATED_BODY() - -private: - // Declare an instance of your templated helper. - // It's private because the UObject wrapper will expose its functionality. - FUniqueIndexHelper> PlayerPlayerIdIdxBtreeIndexHelper; - -public: - UPlayerPlayerPlayerIdIdxBtreeUniqueIndex() - // Initialize the helper with the specific unique index name - : PlayerPlayerIdIdxBtreeIndexHelper("player_id") { - } - - /** - * Finds a Player by their unique playerid. - * @param Key The playerid to search for. - * @return The found FPlayerType, or a default-constructed FPlayerType if not found. - */ - UFUNCTION(BlueprintCallable, Category = "SpacetimeDB|PlayerIndex") - FPlayerType Find(int32 Key) - { - // Simply delegate the call to the internal helper - return PlayerPlayerIdIdxBtreeIndexHelper.FindUniqueIndex(Key); - } - - // A public setter to provide the cache to the helper after construction - // This is a common pattern when the cache might be created or provided by another system. - void SetCache(TSharedPtr> InPlayerCache) - { - PlayerPlayerIdIdxBtreeIndexHelper.Cache = InPlayerCache; - } -}; -/***/ - UCLASS(BlueprintType) class CLIENT_UNREAL_API UPlayerTable : public URemoteTable { GENERATED_BODY() public: - UPROPERTY(BlueprintReadOnly) - UPlayerPlayerIdentityIdxBtreeUniqueIndex* PlayerIdentityIdxBtree; - - UPROPERTY(BlueprintReadOnly) - UPlayerPlayerPlayerIdIdxBtreeUniqueIndex* PlayerPlayerIdIdxBtree; - void PostInitialize(); /** Update function for player table*/ diff --git a/demo/Blackholio/client-unreal/Source/client_unreal/Public/ModuleBindings/Types/ConsumeEntityEventType.g.h b/demo/Blackholio/client-unreal/Source/client_unreal/Public/ModuleBindings/Types/ConsumeEntityEventType.g.h new file mode 100644 index 00000000000..2934917f06d --- /dev/null +++ b/demo/Blackholio/client-unreal/Source/client_unreal/Public/ModuleBindings/Types/ConsumeEntityEventType.g.h @@ -0,0 +1,49 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#pragma once +#include "CoreMinimal.h" +#include "BSATN/UESpacetimeDB.h" +#include "ConsumeEntityEventType.g.generated.h" + +USTRUCT(BlueprintType) +struct CLIENT_UNREAL_API FConsumeEntityEventType +{ + GENERATED_BODY() + + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "SpacetimeDB") + int32 ConsumedEntityId = 0; + + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "SpacetimeDB") + int32 ConsumerEntityId = 0; + + FORCEINLINE bool operator==(const FConsumeEntityEventType& Other) const + { + return ConsumedEntityId == Other.ConsumedEntityId && ConsumerEntityId == Other.ConsumerEntityId; + } + + FORCEINLINE bool operator!=(const FConsumeEntityEventType& Other) const + { + return !(*this == Other); + } +}; + +/** + * Custom hash function for FConsumeEntityEventType. + * Combines the hashes of all fields that are compared in operator==. + * @param ConsumeEntityEventType The FConsumeEntityEventType instance to hash. + * @return The combined hash value. + */ +FORCEINLINE uint32 GetTypeHash(const FConsumeEntityEventType& ConsumeEntityEventType) +{ + uint32 Hash = GetTypeHash(ConsumeEntityEventType.ConsumedEntityId); + Hash = HashCombine(Hash, GetTypeHash(ConsumeEntityEventType.ConsumerEntityId)); + return Hash; +} + +namespace UE::SpacetimeDB +{ + UE_SPACETIMEDB_ENABLE_TARRAY(FConsumeEntityEventType); + + UE_SPACETIMEDB_STRUCT(FConsumeEntityEventType, ConsumedEntityId, ConsumerEntityId); +} From 5766511e9a0fa29115a20a056dcf57be9ee12404 Mon Sep 17 00:00:00 2001 From: Shubham Mishra Date: Thu, 19 Feb 2026 11:27:24 +0530 Subject: [PATCH 103/133] sdks bindings --- crates/schema/src/def.rs | 2 +- .../src/module_bindings/mod.rs | 8 +- .../src/module_bindings/my_table_table.rs | 10 +- .../src/module_bindings/pk_uuid_table.rs | 27 +- .../src/module_bindings/pk_uuid_type.rs | 12 +- .../proc_inserts_into_table.rs | 10 +- .../src/module_bindings/schedule_proc_type.rs | 13 + .../scheduled_proc_table_table.rs | 10 +- .../src/module_bindings/btree_u_32_table.rs | 20 +- .../delete_from_btree_u_32_reducer.rs | 6 +- .../delete_from_btree_u_32_type.rs | 17 + .../delete_large_table_type.rs | 43 + .../module_bindings/delete_pk_bool_type.rs | 15 + .../delete_pk_connection_id_type.rs | 15 + .../delete_pk_i_128_reducer.rs | 6 +- .../module_bindings/delete_pk_i_128_type.rs | 15 + .../module_bindings/delete_pk_i_16_reducer.rs | 6 +- .../module_bindings/delete_pk_i_16_type.rs | 15 + .../delete_pk_i_256_reducer.rs | 6 +- .../module_bindings/delete_pk_i_256_type.rs | 15 + .../module_bindings/delete_pk_i_32_reducer.rs | 6 +- .../module_bindings/delete_pk_i_32_type.rs | 15 + .../module_bindings/delete_pk_i_64_reducer.rs | 6 +- .../module_bindings/delete_pk_i_64_type.rs | 15 + .../module_bindings/delete_pk_i_8_reducer.rs | 6 +- .../src/module_bindings/delete_pk_i_8_type.rs | 15 + .../delete_pk_identity_type.rs | 15 + .../module_bindings/delete_pk_string_type.rs | 15 + .../delete_pk_u_128_reducer.rs | 6 +- .../module_bindings/delete_pk_u_128_type.rs | 15 + .../module_bindings/delete_pk_u_16_reducer.rs | 6 +- .../module_bindings/delete_pk_u_16_type.rs | 15 + .../delete_pk_u_256_reducer.rs | 6 +- .../module_bindings/delete_pk_u_256_type.rs | 15 + ...lete_pk_u_32_insert_pk_u_32_two_reducer.rs | 6 +- .../delete_pk_u_32_insert_pk_u_32_two_type.rs | 16 + .../module_bindings/delete_pk_u_32_reducer.rs | 6 +- .../delete_pk_u_32_two_reducer.rs | 6 +- .../delete_pk_u_32_two_type.rs | 15 + .../module_bindings/delete_pk_u_32_type.rs | 15 + .../module_bindings/delete_pk_u_64_reducer.rs | 6 +- .../module_bindings/delete_pk_u_64_type.rs | 15 + .../module_bindings/delete_pk_u_8_reducer.rs | 6 +- .../src/module_bindings/delete_pk_u_8_type.rs | 15 + .../module_bindings/delete_pk_uuid_type.rs | 15 + .../delete_unique_bool_type.rs | 15 + .../delete_unique_connection_id_type.rs | 15 + .../delete_unique_i_128_reducer.rs | 6 +- .../delete_unique_i_128_type.rs | 15 + .../delete_unique_i_16_reducer.rs | 6 +- .../delete_unique_i_16_type.rs | 15 + .../delete_unique_i_256_reducer.rs | 6 +- .../delete_unique_i_256_type.rs | 15 + .../delete_unique_i_32_reducer.rs | 6 +- .../delete_unique_i_32_type.rs | 15 + .../delete_unique_i_64_reducer.rs | 6 +- .../delete_unique_i_64_type.rs | 15 + .../delete_unique_i_8_reducer.rs | 6 +- .../module_bindings/delete_unique_i_8_type.rs | 15 + .../delete_unique_identity_type.rs | 15 + .../delete_unique_string_type.rs | 15 + .../delete_unique_u_128_reducer.rs | 6 +- .../delete_unique_u_128_type.rs | 15 + .../delete_unique_u_16_reducer.rs | 6 +- .../delete_unique_u_16_type.rs | 15 + .../delete_unique_u_256_reducer.rs | 6 +- .../delete_unique_u_256_type.rs | 15 + .../delete_unique_u_32_reducer.rs | 6 +- .../delete_unique_u_32_type.rs | 15 + .../delete_unique_u_64_reducer.rs | 6 +- .../delete_unique_u_64_type.rs | 15 + .../delete_unique_u_8_reducer.rs | 6 +- .../module_bindings/delete_unique_u_8_type.rs | 15 + .../delete_unique_uuid_type.rs | 15 + .../indexed_simple_enum_table.rs | 10 +- .../module_bindings/indexed_table_2_table.rs | 10 +- .../module_bindings/indexed_table_table.rs | 10 +- .../insert_call_timestamp_type.rs | 13 + .../insert_call_uuid_v_4_reducer.rs | 6 +- .../insert_call_uuid_v_4_type.rs | 13 + .../insert_call_uuid_v_7_reducer.rs | 6 +- .../insert_call_uuid_v_7_type.rs | 13 + .../insert_caller_one_connection_id_type.rs | 13 + .../insert_caller_one_identity_type.rs | 13 + .../insert_caller_pk_connection_id_type.rs | 15 + .../insert_caller_pk_identity_type.rs | 15 + ...insert_caller_unique_connection_id_type.rs | 15 + .../insert_caller_unique_identity_type.rs | 15 + .../insert_caller_vec_connection_id_type.rs | 13 + .../insert_caller_vec_identity_type.rs | 13 + .../insert_into_btree_u_32_reducer.rs | 6 +- .../insert_into_btree_u_32_type.rs | 17 + .../insert_into_indexed_simple_enum_type.rs | 17 + .../insert_into_pk_btree_u_32_reducer.rs | 6 +- .../insert_into_pk_btree_u_32_type.rs | 19 + .../insert_large_table_type.rs | 43 + .../module_bindings/insert_one_bool_type.rs | 15 + .../insert_one_byte_struct_type.rs | 17 + .../insert_one_connection_id_type.rs | 15 + .../insert_one_enum_with_payload_type.rs | 17 + .../insert_one_every_primitive_struct_type.rs | 17 + .../insert_one_every_vec_struct_type.rs | 17 + .../insert_one_f_32_reducer.rs | 6 +- .../module_bindings/insert_one_f_32_type.rs | 15 + .../insert_one_f_64_reducer.rs | 6 +- .../module_bindings/insert_one_f_64_type.rs | 15 + .../insert_one_i_128_reducer.rs | 6 +- .../module_bindings/insert_one_i_128_type.rs | 15 + .../insert_one_i_16_reducer.rs | 6 +- .../module_bindings/insert_one_i_16_type.rs | 15 + .../insert_one_i_256_reducer.rs | 6 +- .../module_bindings/insert_one_i_256_type.rs | 15 + .../insert_one_i_32_reducer.rs | 6 +- .../module_bindings/insert_one_i_32_type.rs | 15 + .../insert_one_i_64_reducer.rs | 6 +- .../module_bindings/insert_one_i_64_type.rs | 15 + .../module_bindings/insert_one_i_8_reducer.rs | 6 +- .../module_bindings/insert_one_i_8_type.rs | 15 + .../insert_one_identity_type.rs | 15 + .../insert_one_simple_enum_type.rs | 17 + .../module_bindings/insert_one_string_type.rs | 15 + .../insert_one_timestamp_type.rs | 15 + .../insert_one_u_128_reducer.rs | 6 +- .../module_bindings/insert_one_u_128_type.rs | 15 + .../insert_one_u_16_reducer.rs | 6 +- .../module_bindings/insert_one_u_16_type.rs | 15 + .../insert_one_u_256_reducer.rs | 6 +- .../module_bindings/insert_one_u_256_type.rs | 15 + .../insert_one_u_32_reducer.rs | 6 +- .../module_bindings/insert_one_u_32_type.rs | 15 + .../insert_one_u_64_reducer.rs | 6 +- .../module_bindings/insert_one_u_64_type.rs | 15 + .../module_bindings/insert_one_u_8_reducer.rs | 6 +- .../module_bindings/insert_one_u_8_type.rs | 15 + .../insert_one_unit_struct_type.rs | 17 + .../module_bindings/insert_one_uuid_type.rs | 15 + ...sert_option_every_primitive_struct_type.rs | 17 + .../insert_option_i_32_reducer.rs | 6 +- .../insert_option_i_32_type.rs | 15 + .../insert_option_identity_type.rs | 15 + .../insert_option_simple_enum_type.rs | 17 + .../insert_option_string_type.rs | 15 + .../insert_option_uuid_type.rs | 15 + .../insert_option_vec_option_i_32_reducer.rs | 6 +- .../insert_option_vec_option_i_32_type.rs | 15 + .../module_bindings/insert_pk_bool_type.rs | 16 + .../insert_pk_connection_id_type.rs | 16 + .../insert_pk_i_128_reducer.rs | 6 +- .../module_bindings/insert_pk_i_128_type.rs | 16 + .../module_bindings/insert_pk_i_16_reducer.rs | 6 +- .../module_bindings/insert_pk_i_16_type.rs | 16 + .../insert_pk_i_256_reducer.rs | 6 +- .../module_bindings/insert_pk_i_256_type.rs | 16 + .../module_bindings/insert_pk_i_32_reducer.rs | 6 +- .../module_bindings/insert_pk_i_32_type.rs | 16 + .../module_bindings/insert_pk_i_64_reducer.rs | 6 +- .../module_bindings/insert_pk_i_64_type.rs | 16 + .../module_bindings/insert_pk_i_8_reducer.rs | 6 +- .../src/module_bindings/insert_pk_i_8_type.rs | 16 + .../insert_pk_identity_type.rs | 16 + .../insert_pk_simple_enum_type.rs | 18 + .../module_bindings/insert_pk_string_type.rs | 16 + .../insert_pk_u_128_reducer.rs | 6 +- .../module_bindings/insert_pk_u_128_type.rs | 16 + .../module_bindings/insert_pk_u_16_reducer.rs | 6 +- .../module_bindings/insert_pk_u_16_type.rs | 16 + .../insert_pk_u_256_reducer.rs | 6 +- .../module_bindings/insert_pk_u_256_type.rs | 16 + .../module_bindings/insert_pk_u_32_reducer.rs | 6 +- .../insert_pk_u_32_two_reducer.rs | 6 +- .../insert_pk_u_32_two_type.rs | 16 + .../module_bindings/insert_pk_u_32_type.rs | 16 + .../module_bindings/insert_pk_u_64_reducer.rs | 6 +- .../module_bindings/insert_pk_u_64_type.rs | 16 + .../module_bindings/insert_pk_u_8_reducer.rs | 6 +- .../src/module_bindings/insert_pk_u_8_type.rs | 16 + .../module_bindings/insert_pk_uuid_type.rs | 16 + .../insert_primitives_as_strings_type.rs | 17 + ...sult_every_primitive_struct_string_type.rs | 17 + .../insert_result_i_32_string_reducer.rs | 6 +- .../insert_result_i_32_string_type.rs | 15 + .../insert_result_identity_string_type.rs | 15 + .../insert_result_simple_enum_i_32_reducer.rs | 6 +- .../insert_result_simple_enum_i_32_type.rs | 17 + .../insert_result_string_i_32_reducer.rs | 6 +- .../insert_result_string_i_32_type.rs | 15 + .../insert_result_vec_i_32_string_reducer.rs | 6 +- .../insert_result_vec_i_32_string_type.rs | 15 + .../insert_table_holds_table_type.rs | 19 + .../insert_unique_bool_type.rs | 16 + .../insert_unique_connection_id_type.rs | 16 + .../insert_unique_i_128_reducer.rs | 6 +- .../insert_unique_i_128_type.rs | 16 + .../insert_unique_i_16_reducer.rs | 6 +- .../insert_unique_i_16_type.rs | 16 + .../insert_unique_i_256_reducer.rs | 6 +- .../insert_unique_i_256_type.rs | 16 + .../insert_unique_i_32_reducer.rs | 6 +- .../insert_unique_i_32_type.rs | 16 + .../insert_unique_i_64_reducer.rs | 6 +- .../insert_unique_i_64_type.rs | 16 + .../insert_unique_i_8_reducer.rs | 6 +- .../module_bindings/insert_unique_i_8_type.rs | 16 + .../insert_unique_identity_type.rs | 16 + .../insert_unique_string_type.rs | 16 + .../insert_unique_u_128_reducer.rs | 6 +- .../insert_unique_u_128_type.rs | 16 + .../insert_unique_u_16_reducer.rs | 6 +- .../insert_unique_u_16_type.rs | 16 + .../insert_unique_u_256_reducer.rs | 6 +- .../insert_unique_u_256_type.rs | 16 + .../insert_unique_u_32_reducer.rs | 6 +- .../insert_unique_u_32_type.rs | 16 + ...sert_unique_u_32_update_pk_u_32_reducer.rs | 6 +- .../insert_unique_u_32_update_pk_u_32_type.rs | 17 + .../insert_unique_u_64_reducer.rs | 6 +- .../insert_unique_u_64_type.rs | 16 + .../insert_unique_u_8_reducer.rs | 6 +- .../module_bindings/insert_unique_u_8_type.rs | 16 + .../insert_unique_uuid_type.rs | 16 + .../src/module_bindings/insert_user_type.rs | 16 + .../module_bindings/insert_vec_bool_type.rs | 15 + .../insert_vec_byte_struct_type.rs | 17 + .../insert_vec_connection_id_type.rs | 15 + .../insert_vec_enum_with_payload_type.rs | 17 + .../insert_vec_every_primitive_struct_type.rs | 17 + .../insert_vec_every_vec_struct_type.rs | 17 + .../insert_vec_f_32_reducer.rs | 6 +- .../module_bindings/insert_vec_f_32_type.rs | 15 + .../insert_vec_f_64_reducer.rs | 6 +- .../module_bindings/insert_vec_f_64_type.rs | 15 + .../insert_vec_i_128_reducer.rs | 6 +- .../module_bindings/insert_vec_i_128_type.rs | 15 + .../insert_vec_i_16_reducer.rs | 6 +- .../module_bindings/insert_vec_i_16_type.rs | 15 + .../insert_vec_i_256_reducer.rs | 6 +- .../module_bindings/insert_vec_i_256_type.rs | 15 + .../insert_vec_i_32_reducer.rs | 6 +- .../module_bindings/insert_vec_i_32_type.rs | 15 + .../insert_vec_i_64_reducer.rs | 6 +- .../module_bindings/insert_vec_i_64_type.rs | 15 + .../module_bindings/insert_vec_i_8_reducer.rs | 6 +- .../module_bindings/insert_vec_i_8_type.rs | 15 + .../insert_vec_identity_type.rs | 15 + .../insert_vec_simple_enum_type.rs | 17 + .../module_bindings/insert_vec_string_type.rs | 15 + .../insert_vec_timestamp_type.rs | 15 + .../insert_vec_u_128_reducer.rs | 6 +- .../module_bindings/insert_vec_u_128_type.rs | 15 + .../insert_vec_u_16_reducer.rs | 6 +- .../module_bindings/insert_vec_u_16_type.rs | 15 + .../insert_vec_u_256_reducer.rs | 6 +- .../module_bindings/insert_vec_u_256_type.rs | 15 + .../insert_vec_u_32_reducer.rs | 6 +- .../module_bindings/insert_vec_u_32_type.rs | 15 + .../insert_vec_u_64_reducer.rs | 6 +- .../module_bindings/insert_vec_u_64_type.rs | 15 + .../module_bindings/insert_vec_u_8_reducer.rs | 6 +- .../module_bindings/insert_vec_u_8_type.rs | 15 + .../insert_vec_unit_struct_type.rs | 17 + .../module_bindings/insert_vec_uuid_type.rs | 15 + .../test-client/src/module_bindings/mod.rs | 3616 +++++++++-------- .../module_bindings/no_op_succeeds_type.rs | 13 + .../src/module_bindings/one_f_32_table.rs | 10 +- .../src/module_bindings/one_f_64_table.rs | 10 +- .../src/module_bindings/one_i_128_table.rs | 10 +- .../src/module_bindings/one_i_16_table.rs | 10 +- .../src/module_bindings/one_i_256_table.rs | 10 +- .../src/module_bindings/one_i_32_table.rs | 10 +- .../src/module_bindings/one_i_64_table.rs | 10 +- .../src/module_bindings/one_i_8_table.rs | 10 +- .../src/module_bindings/one_u_128_table.rs | 10 +- .../src/module_bindings/one_u_16_table.rs | 10 +- .../src/module_bindings/one_u_256_table.rs | 10 +- .../src/module_bindings/one_u_32_table.rs | 10 +- .../src/module_bindings/one_u_64_table.rs | 10 +- .../src/module_bindings/one_u_8_table.rs | 10 +- .../src/module_bindings/option_i_32_table.rs | 10 +- .../option_vec_option_i_32_table.rs | 10 +- .../src/module_bindings/pk_i_128_table.rs | 14 +- .../src/module_bindings/pk_i_16_table.rs | 14 +- .../src/module_bindings/pk_i_256_table.rs | 14 +- .../src/module_bindings/pk_i_32_table.rs | 14 +- .../src/module_bindings/pk_i_64_table.rs | 14 +- .../src/module_bindings/pk_i_8_table.rs | 14 +- .../src/module_bindings/pk_u_128_table.rs | 14 +- .../src/module_bindings/pk_u_16_table.rs | 14 +- .../src/module_bindings/pk_u_256_table.rs | 14 +- .../src/module_bindings/pk_u_32_table.rs | 14 +- .../src/module_bindings/pk_u_32_two_table.rs | 14 +- .../src/module_bindings/pk_u_64_table.rs | 14 +- .../src/module_bindings/pk_u_8_table.rs | 14 +- .../result_i_32_string_table.rs | 10 +- .../result_simple_enum_i_32_table.rs | 10 +- .../result_string_i_32_table.rs | 10 +- .../result_vec_i_32_string_table.rs | 10 +- .../module_bindings/scheduled_table_table.rs | 10 +- .../send_scheduled_message_type.rs | 17 + .../sorted_uuids_insert_type.rs | 13 + .../src/module_bindings/unique_i_128_table.rs | 14 +- .../src/module_bindings/unique_i_16_table.rs | 14 +- .../src/module_bindings/unique_i_256_table.rs | 14 +- .../src/module_bindings/unique_i_32_table.rs | 14 +- .../src/module_bindings/unique_i_64_table.rs | 14 +- .../src/module_bindings/unique_i_8_table.rs | 14 +- .../src/module_bindings/unique_u_128_table.rs | 14 +- .../src/module_bindings/unique_u_16_table.rs | 14 +- .../src/module_bindings/unique_u_256_table.rs | 14 +- .../src/module_bindings/unique_u_32_table.rs | 14 +- .../src/module_bindings/unique_u_64_table.rs | 14 +- .../src/module_bindings/unique_u_8_table.rs | 14 +- .../update_indexed_simple_enum_type.rs | 18 + .../module_bindings/update_pk_bool_type.rs | 16 + .../update_pk_connection_id_type.rs | 16 + .../update_pk_i_128_reducer.rs | 6 +- .../module_bindings/update_pk_i_128_type.rs | 16 + .../module_bindings/update_pk_i_16_reducer.rs | 6 +- .../module_bindings/update_pk_i_16_type.rs | 16 + .../update_pk_i_256_reducer.rs | 6 +- .../module_bindings/update_pk_i_256_type.rs | 16 + .../module_bindings/update_pk_i_32_reducer.rs | 6 +- .../module_bindings/update_pk_i_32_type.rs | 16 + .../module_bindings/update_pk_i_64_reducer.rs | 6 +- .../module_bindings/update_pk_i_64_type.rs | 16 + .../module_bindings/update_pk_i_8_reducer.rs | 6 +- .../src/module_bindings/update_pk_i_8_type.rs | 16 + .../update_pk_identity_type.rs | 16 + .../update_pk_simple_enum_type.rs | 18 + .../module_bindings/update_pk_string_type.rs | 16 + .../update_pk_u_128_reducer.rs | 6 +- .../module_bindings/update_pk_u_128_type.rs | 16 + .../module_bindings/update_pk_u_16_reducer.rs | 6 +- .../module_bindings/update_pk_u_16_type.rs | 16 + .../update_pk_u_256_reducer.rs | 6 +- .../module_bindings/update_pk_u_256_type.rs | 16 + .../module_bindings/update_pk_u_32_reducer.rs | 6 +- .../update_pk_u_32_two_reducer.rs | 6 +- .../update_pk_u_32_two_type.rs | 16 + .../module_bindings/update_pk_u_32_type.rs | 16 + .../module_bindings/update_pk_u_64_reducer.rs | 6 +- .../module_bindings/update_pk_u_64_type.rs | 16 + .../module_bindings/update_pk_u_8_reducer.rs | 6 +- .../src/module_bindings/update_pk_u_8_type.rs | 16 + .../module_bindings/update_pk_uuid_type.rs | 16 + .../update_unique_bool_type.rs | 16 + .../update_unique_connection_id_type.rs | 16 + .../update_unique_i_128_reducer.rs | 6 +- .../update_unique_i_128_type.rs | 16 + .../update_unique_i_16_reducer.rs | 6 +- .../update_unique_i_16_type.rs | 16 + .../update_unique_i_256_reducer.rs | 6 +- .../update_unique_i_256_type.rs | 16 + .../update_unique_i_32_reducer.rs | 6 +- .../update_unique_i_32_type.rs | 16 + .../update_unique_i_64_reducer.rs | 6 +- .../update_unique_i_64_type.rs | 16 + .../update_unique_i_8_reducer.rs | 6 +- .../module_bindings/update_unique_i_8_type.rs | 16 + .../update_unique_identity_type.rs | 16 + .../update_unique_string_type.rs | 16 + .../update_unique_u_128_reducer.rs | 6 +- .../update_unique_u_128_type.rs | 16 + .../update_unique_u_16_reducer.rs | 6 +- .../update_unique_u_16_type.rs | 16 + .../update_unique_u_256_reducer.rs | 6 +- .../update_unique_u_256_type.rs | 16 + .../update_unique_u_32_reducer.rs | 6 +- .../update_unique_u_32_type.rs | 16 + .../update_unique_u_64_reducer.rs | 6 +- .../update_unique_u_64_type.rs | 16 + .../update_unique_u_8_reducer.rs | 6 +- .../module_bindings/update_unique_u_8_type.rs | 16 + .../update_unique_uuid_type.rs | 16 + .../src/module_bindings/vec_f_32_table.rs | 10 +- .../src/module_bindings/vec_f_64_table.rs | 10 +- .../src/module_bindings/vec_i_128_table.rs | 10 +- .../src/module_bindings/vec_i_16_table.rs | 10 +- .../src/module_bindings/vec_i_256_table.rs | 10 +- .../src/module_bindings/vec_i_32_table.rs | 10 +- .../src/module_bindings/vec_i_64_table.rs | 10 +- .../src/module_bindings/vec_i_8_table.rs | 10 +- .../src/module_bindings/vec_u_128_table.rs | 10 +- .../src/module_bindings/vec_u_16_table.rs | 10 +- .../src/module_bindings/vec_u_256_table.rs | 10 +- .../src/module_bindings/vec_u_32_table.rs | 10 +- .../src/module_bindings/vec_u_64_table.rs | 10 +- .../src/module_bindings/vec_u_8_table.rs | 10 +- .../view-client/src/module_bindings/mod.rs | 2 +- 388 files changed, 5936 insertions(+), 2361 deletions(-) create mode 100644 sdks/rust/tests/procedure-client/src/module_bindings/schedule_proc_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/delete_from_btree_u_32_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/delete_large_table_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/delete_pk_bool_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/delete_pk_connection_id_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/delete_pk_i_128_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/delete_pk_i_16_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/delete_pk_i_256_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/delete_pk_i_32_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/delete_pk_i_64_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/delete_pk_i_8_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/delete_pk_identity_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/delete_pk_string_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/delete_pk_u_128_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/delete_pk_u_16_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/delete_pk_u_256_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/delete_pk_u_32_insert_pk_u_32_two_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/delete_pk_u_32_two_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/delete_pk_u_32_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/delete_pk_u_64_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/delete_pk_u_8_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/delete_pk_uuid_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/delete_unique_bool_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/delete_unique_connection_id_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/delete_unique_i_128_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/delete_unique_i_16_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/delete_unique_i_256_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/delete_unique_i_32_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/delete_unique_i_64_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/delete_unique_i_8_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/delete_unique_identity_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/delete_unique_string_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/delete_unique_u_128_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/delete_unique_u_16_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/delete_unique_u_256_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/delete_unique_u_32_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/delete_unique_u_64_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/delete_unique_u_8_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/delete_unique_uuid_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_call_timestamp_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_call_uuid_v_4_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_call_uuid_v_7_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_caller_one_connection_id_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_caller_one_identity_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_caller_pk_connection_id_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_caller_pk_identity_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_caller_unique_connection_id_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_caller_unique_identity_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_caller_vec_connection_id_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_caller_vec_identity_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_into_btree_u_32_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_into_indexed_simple_enum_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_into_pk_btree_u_32_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_large_table_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_one_bool_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_one_byte_struct_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_one_connection_id_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_one_enum_with_payload_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_one_every_primitive_struct_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_one_every_vec_struct_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_one_f_32_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_one_f_64_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_one_i_128_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_one_i_16_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_one_i_256_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_one_i_32_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_one_i_64_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_one_i_8_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_one_identity_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_one_simple_enum_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_one_string_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_one_timestamp_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_one_u_128_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_one_u_16_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_one_u_256_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_one_u_32_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_one_u_64_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_one_u_8_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_one_unit_struct_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_one_uuid_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_option_every_primitive_struct_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_option_i_32_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_option_identity_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_option_simple_enum_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_option_string_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_option_uuid_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_option_vec_option_i_32_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_pk_bool_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_pk_connection_id_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_pk_i_128_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_pk_i_16_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_pk_i_256_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_pk_i_32_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_pk_i_64_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_pk_i_8_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_pk_identity_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_pk_simple_enum_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_pk_string_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_pk_u_128_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_pk_u_16_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_pk_u_256_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_pk_u_32_two_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_pk_u_32_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_pk_u_64_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_pk_u_8_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_pk_uuid_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_primitives_as_strings_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_result_every_primitive_struct_string_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_result_i_32_string_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_result_identity_string_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_result_simple_enum_i_32_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_result_string_i_32_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_result_vec_i_32_string_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_table_holds_table_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_unique_bool_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_unique_connection_id_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_unique_i_128_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_unique_i_16_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_unique_i_256_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_unique_i_32_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_unique_i_64_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_unique_i_8_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_unique_identity_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_unique_string_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_unique_u_128_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_unique_u_16_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_unique_u_256_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_unique_u_32_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_unique_u_32_update_pk_u_32_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_unique_u_64_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_unique_u_8_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_unique_uuid_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_user_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_vec_bool_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_vec_byte_struct_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_vec_connection_id_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_vec_enum_with_payload_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_vec_every_primitive_struct_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_vec_every_vec_struct_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_vec_f_32_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_vec_f_64_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_vec_i_128_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_vec_i_16_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_vec_i_256_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_vec_i_32_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_vec_i_64_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_vec_i_8_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_vec_identity_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_vec_simple_enum_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_vec_string_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_vec_timestamp_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_vec_u_128_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_vec_u_16_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_vec_u_256_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_vec_u_32_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_vec_u_64_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_vec_u_8_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_vec_unit_struct_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_vec_uuid_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/no_op_succeeds_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/send_scheduled_message_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/sorted_uuids_insert_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/update_indexed_simple_enum_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/update_pk_bool_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/update_pk_connection_id_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/update_pk_i_128_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/update_pk_i_16_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/update_pk_i_256_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/update_pk_i_32_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/update_pk_i_64_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/update_pk_i_8_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/update_pk_identity_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/update_pk_simple_enum_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/update_pk_string_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/update_pk_u_128_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/update_pk_u_16_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/update_pk_u_256_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/update_pk_u_32_two_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/update_pk_u_32_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/update_pk_u_64_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/update_pk_u_8_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/update_pk_uuid_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/update_unique_bool_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/update_unique_connection_id_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/update_unique_i_128_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/update_unique_i_16_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/update_unique_i_256_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/update_unique_i_32_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/update_unique_i_64_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/update_unique_i_8_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/update_unique_identity_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/update_unique_string_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/update_unique_u_128_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/update_unique_u_16_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/update_unique_u_256_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/update_unique_u_32_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/update_unique_u_64_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/update_unique_u_8_type.rs create mode 100644 sdks/rust/tests/test-client/src/module_bindings/update_unique_uuid_type.rs diff --git a/crates/schema/src/def.rs b/crates/schema/src/def.rs index 51d5e0740f0..2162a9c9abb 100644 --- a/crates/schema/src/def.rs +++ b/crates/schema/src/def.rs @@ -909,7 +909,7 @@ impl From for RawIndexDefV9 { impl From for RawIndexDefV10 { fn from(val: IndexDef) -> Self { RawIndexDefV10 { - source_name: Some(val.name), + source_name: Some(val.source_name), accessor_name: val.accessor_name.map(Into::into), algorithm: val.algorithm.into(), } diff --git a/sdks/rust/tests/procedure-client/src/module_bindings/mod.rs b/sdks/rust/tests/procedure-client/src/module_bindings/mod.rs index 48c7c60f064..dd914628925 100644 --- a/sdks/rust/tests/procedure-client/src/module_bindings/mod.rs +++ b/sdks/rust/tests/procedure-client/src/module_bindings/mod.rs @@ -1,7 +1,7 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE // WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. -// This was generated using spacetimedb cli version 2.0.0 (commit 9e0e81a6aaec6bf3619cfb9f7916743d86ab7ffc). +// This was generated using spacetimedb cli version 2.0.0 (commit 9ff95757316cdd120699ca8fcabecbd13eb24157). #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; @@ -23,6 +23,7 @@ pub mod return_primitive_procedure; pub mod return_struct_procedure; pub mod return_struct_type; pub mod schedule_proc_reducer; +pub mod schedule_proc_type; pub mod scheduled_proc_procedure; pub mod scheduled_proc_table_table; pub mod scheduled_proc_table_type; @@ -46,6 +47,7 @@ pub use return_primitive_procedure::return_primitive; pub use return_struct_procedure::return_struct; pub use return_struct_type::ReturnStruct; pub use schedule_proc_reducer::schedule_proc; +pub use schedule_proc_type::ScheduleProc; pub use scheduled_proc_procedure::scheduled_proc; pub use scheduled_proc_table_table::*; pub use scheduled_proc_table_type::ScheduledProcTable; @@ -130,7 +132,9 @@ impl __sdk::DbUpdate for DbUpdate { let mut diff = AppliedDiff::default(); diff.my_table = cache.apply_diff_to_table::("my_table", &self.my_table); - diff.pk_uuid = cache.apply_diff_to_table::("pk_uuid", &self.pk_uuid); + diff.pk_uuid = cache + .apply_diff_to_table::("pk_uuid", &self.pk_uuid) + .with_updates_by_pk(|row| &row.u); diff.proc_inserts_into = cache.apply_diff_to_table::("proc_inserts_into", &self.proc_inserts_into); diff.scheduled_proc_table = cache diff --git a/sdks/rust/tests/procedure-client/src/module_bindings/my_table_table.rs b/sdks/rust/tests/procedure-client/src/module_bindings/my_table_table.rs index a9215f629c4..2f58c1c120e 100644 --- a/sdks/rust/tests/procedure-client/src/module_bindings/my_table_table.rs +++ b/sdks/rust/tests/procedure-client/src/module_bindings/my_table_table.rs @@ -97,14 +97,14 @@ pub(super) fn parse_table_update(raw_updates: __ws::v2::TableUpdate) -> __sdk::R /// Extension trait for query builder access to the table `MyTable`. /// /// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait my_tableQueryTableAccess { +pub trait myTableQueryTableAccess { #[allow(non_snake_case)] /// Get a query builder for the table `MyTable`. - fn my_table(&self) -> __sdk::__query_builder::Table; + fn myTable(&self) -> __sdk::__query_builder::Table; } -impl my_tableQueryTableAccess for __sdk::QueryTableAccessor { - fn my_table(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("my_table") +impl myTableQueryTableAccess for __sdk::QueryTableAccessor { + fn myTable(&self) -> __sdk::__query_builder::Table { + __sdk::__query_builder::Table::new("myTable") } } diff --git a/sdks/rust/tests/procedure-client/src/module_bindings/pk_uuid_table.rs b/sdks/rust/tests/procedure-client/src/module_bindings/pk_uuid_table.rs index f177d36ead8..d5fc6f7bca3 100644 --- a/sdks/rust/tests/procedure-client/src/module_bindings/pk_uuid_table.rs +++ b/sdks/rust/tests/procedure-client/src/module_bindings/pk_uuid_table.rs @@ -78,6 +78,23 @@ impl<'ctx> __sdk::Table for PkUuidTableHandle<'ctx> { } } +pub struct PkUuidUpdateCallbackId(__sdk::CallbackId); + +impl<'ctx> __sdk::TableWithPrimaryKey for PkUuidTableHandle<'ctx> { + type UpdateCallbackId = PkUuidUpdateCallbackId; + + fn on_update( + &self, + callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static, + ) -> PkUuidUpdateCallbackId { + PkUuidUpdateCallbackId(self.imp.on_update(Box::new(callback))) + } + + fn remove_on_update(&self, callback: PkUuidUpdateCallbackId) { + self.imp.remove_on_update(callback.0) + } +} + #[doc(hidden)] pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { let _table = client_cache.get_or_make_table::("pk_uuid"); @@ -96,14 +113,14 @@ pub(super) fn parse_table_update(raw_updates: __ws::v2::TableUpdate) -> __sdk::R /// Extension trait for query builder access to the table `PkUuid`. /// /// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait pk_uuidQueryTableAccess { +pub trait pkUuidQueryTableAccess { #[allow(non_snake_case)] /// Get a query builder for the table `PkUuid`. - fn pk_uuid(&self) -> __sdk::__query_builder::Table; + fn pkUuid(&self) -> __sdk::__query_builder::Table; } -impl pk_uuidQueryTableAccess for __sdk::QueryTableAccessor { - fn pk_uuid(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("pk_uuid") +impl pkUuidQueryTableAccess for __sdk::QueryTableAccessor { + fn pkUuid(&self) -> __sdk::__query_builder::Table { + __sdk::__query_builder::Table::new("pkUuid") } } diff --git a/sdks/rust/tests/procedure-client/src/module_bindings/pk_uuid_type.rs b/sdks/rust/tests/procedure-client/src/module_bindings/pk_uuid_type.rs index dcc8174a6b3..62acd5125be 100644 --- a/sdks/rust/tests/procedure-client/src/module_bindings/pk_uuid_type.rs +++ b/sdks/rust/tests/procedure-client/src/module_bindings/pk_uuid_type.rs @@ -8,7 +8,7 @@ use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; #[sats(crate = __lib)] pub struct PkUuid { pub u: __sdk::Uuid, - pub data: u8, + pub data: i32, } impl __sdk::InModule for PkUuid { @@ -20,7 +20,7 @@ impl __sdk::InModule for PkUuid { /// Provides typed access to columns for query building. pub struct PkUuidCols { pub u: __sdk::__query_builder::Col, - pub data: __sdk::__query_builder::Col, + pub data: __sdk::__query_builder::Col, } impl __sdk::__query_builder::HasCols for PkUuid { @@ -36,12 +36,16 @@ impl __sdk::__query_builder::HasCols for PkUuid { /// Indexed column accessor struct for the table `PkUuid`. /// /// Provides typed access to indexed columns for query building. -pub struct PkUuidIxCols {} +pub struct PkUuidIxCols { + pub u: __sdk::__query_builder::IxCol, +} impl __sdk::__query_builder::HasIxCols for PkUuid { type IxCols = PkUuidIxCols; fn ix_cols(table_name: &'static str) -> Self::IxCols { - PkUuidIxCols {} + PkUuidIxCols { + u: __sdk::__query_builder::IxCol::new(table_name, "u"), + } } } diff --git a/sdks/rust/tests/procedure-client/src/module_bindings/proc_inserts_into_table.rs b/sdks/rust/tests/procedure-client/src/module_bindings/proc_inserts_into_table.rs index 6f61280d313..5a1c2263b00 100644 --- a/sdks/rust/tests/procedure-client/src/module_bindings/proc_inserts_into_table.rs +++ b/sdks/rust/tests/procedure-client/src/module_bindings/proc_inserts_into_table.rs @@ -98,14 +98,14 @@ pub(super) fn parse_table_update( /// Extension trait for query builder access to the table `ProcInsertsInto`. /// /// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait proc_inserts_intoQueryTableAccess { +pub trait procInsertsIntoQueryTableAccess { #[allow(non_snake_case)] /// Get a query builder for the table `ProcInsertsInto`. - fn proc_inserts_into(&self) -> __sdk::__query_builder::Table; + fn procInsertsInto(&self) -> __sdk::__query_builder::Table; } -impl proc_inserts_intoQueryTableAccess for __sdk::QueryTableAccessor { - fn proc_inserts_into(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("proc_inserts_into") +impl procInsertsIntoQueryTableAccess for __sdk::QueryTableAccessor { + fn procInsertsInto(&self) -> __sdk::__query_builder::Table { + __sdk::__query_builder::Table::new("procInsertsInto") } } diff --git a/sdks/rust/tests/procedure-client/src/module_bindings/schedule_proc_type.rs b/sdks/rust/tests/procedure-client/src/module_bindings/schedule_proc_type.rs new file mode 100644 index 00000000000..46ca35e45a4 --- /dev/null +++ b/sdks/rust/tests/procedure-client/src/module_bindings/schedule_proc_type.rs @@ -0,0 +1,13 @@ +// 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, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct ScheduleProc {} + +impl __sdk::InModule for ScheduleProc { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/procedure-client/src/module_bindings/scheduled_proc_table_table.rs b/sdks/rust/tests/procedure-client/src/module_bindings/scheduled_proc_table_table.rs index 03f3ea0fda9..6d47284f178 100644 --- a/sdks/rust/tests/procedure-client/src/module_bindings/scheduled_proc_table_table.rs +++ b/sdks/rust/tests/procedure-client/src/module_bindings/scheduled_proc_table_table.rs @@ -146,14 +146,14 @@ pub(super) fn parse_table_update( /// Extension trait for query builder access to the table `ScheduledProcTable`. /// /// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait scheduled_proc_tableQueryTableAccess { +pub trait scheduledProcTableQueryTableAccess { #[allow(non_snake_case)] /// Get a query builder for the table `ScheduledProcTable`. - fn scheduled_proc_table(&self) -> __sdk::__query_builder::Table; + fn scheduledProcTable(&self) -> __sdk::__query_builder::Table; } -impl scheduled_proc_tableQueryTableAccess for __sdk::QueryTableAccessor { - fn scheduled_proc_table(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("scheduled_proc_table") +impl scheduledProcTableQueryTableAccess for __sdk::QueryTableAccessor { + fn scheduledProcTable(&self) -> __sdk::__query_builder::Table { + __sdk::__query_builder::Table::new("scheduledProcTable") } } diff --git a/sdks/rust/tests/test-client/src/module_bindings/btree_u_32_table.rs b/sdks/rust/tests/test-client/src/module_bindings/btree_u_32_table.rs index 75d6a16da46..c73e0bc4943 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/btree_u_32_table.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/btree_u_32_table.rs @@ -5,7 +5,7 @@ use super::b_tree_u_32_type::BTreeU32; use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; -/// Table handle for the table `btree_u32`. +/// Table handle for the table `btree_u_32`. /// /// Obtain a handle from the [`BtreeU32TableAccess::btree_u_32`] method on [`super::RemoteTables`], /// like `ctx.db.btree_u_32()`. @@ -19,19 +19,19 @@ pub struct BtreeU32TableHandle<'ctx> { } #[allow(non_camel_case_types)] -/// Extension trait for access to the table `btree_u32`. +/// Extension trait for access to the table `btree_u_32`. /// /// Implemented for [`super::RemoteTables`]. pub trait BtreeU32TableAccess { #[allow(non_snake_case)] - /// Obtain a [`BtreeU32TableHandle`], which mediates access to the table `btree_u32`. + /// Obtain a [`BtreeU32TableHandle`], which mediates access to the table `btree_u_32`. fn btree_u_32(&self) -> BtreeU32TableHandle<'_>; } impl BtreeU32TableAccess for super::RemoteTables { fn btree_u_32(&self) -> BtreeU32TableHandle<'_> { BtreeU32TableHandle { - imp: self.imp.get_table::("btree_u32"), + imp: self.imp.get_table::("btree_u_32"), ctx: std::marker::PhantomData, } } @@ -80,7 +80,7 @@ impl<'ctx> __sdk::Table for BtreeU32TableHandle<'ctx> { #[doc(hidden)] pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { - let _table = client_cache.get_or_make_table::("btree_u32"); + let _table = client_cache.get_or_make_table::("btree_u_32"); } #[doc(hidden)] @@ -96,14 +96,14 @@ pub(super) fn parse_table_update(raw_updates: __ws::v2::TableUpdate) -> __sdk::R /// Extension trait for query builder access to the table `BTreeU32`. /// /// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait btree_u32QueryTableAccess { +pub trait btreeU32QueryTableAccess { #[allow(non_snake_case)] /// Get a query builder for the table `BTreeU32`. - fn btree_u32(&self) -> __sdk::__query_builder::Table; + fn btreeU32(&self) -> __sdk::__query_builder::Table; } -impl btree_u32QueryTableAccess for __sdk::QueryTableAccessor { - fn btree_u32(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("btree_u32") +impl btreeU32QueryTableAccess for __sdk::QueryTableAccessor { + fn btreeU32(&self) -> __sdk::__query_builder::Table { + __sdk::__query_builder::Table::new("btreeU32") } } diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_from_btree_u_32_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_from_btree_u_32_reducer.rs index 26465595d5d..9226501bf4c 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/delete_from_btree_u_32_reducer.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_from_btree_u_32_reducer.rs @@ -23,11 +23,11 @@ impl __sdk::InModule for DeleteFromBtreeU32Args { } #[allow(non_camel_case_types)] -/// Extension trait for access to the reducer `delete_from_btree_u32`. +/// Extension trait for access to the reducer `delete_from_btree_u_32`. /// /// Implemented for [`super::RemoteReducers`]. pub trait delete_from_btree_u_32 { - /// Request that the remote module invoke the reducer `delete_from_btree_u32` to run as soon as possible. + /// Request that the remote module invoke the reducer `delete_from_btree_u_32` 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, @@ -37,7 +37,7 @@ pub trait delete_from_btree_u_32 { self.delete_from_btree_u_32_then(rows, |_, _| {}) } - /// Request that the remote module invoke the reducer `delete_from_btree_u32` to run as soon as possible, + /// Request that the remote module invoke the reducer `delete_from_btree_u_32` to run as soon as possible, /// registering `callback` to run when we are notified that the reducer completed. /// /// This method returns immediately, and errors only if we are unable to send the request. diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_from_btree_u_32_type.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_from_btree_u_32_type.rs new file mode 100644 index 00000000000..2809e778fc4 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_from_btree_u_32_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +use super::b_tree_u_32_type::BTreeU32; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct DeleteFromBtreeU32 { + pub rows: Vec, +} + +impl __sdk::InModule for DeleteFromBtreeU32 { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_large_table_type.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_large_table_type.rs new file mode 100644 index 00000000000..9fa69270ddd --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_large_table_type.rs @@ -0,0 +1,43 @@ +// 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, __lib, __sats, __ws}; + +use super::byte_struct_type::ByteStruct; +use super::enum_with_payload_type::EnumWithPayload; +use super::every_primitive_struct_type::EveryPrimitiveStruct; +use super::every_vec_struct_type::EveryVecStruct; +use super::simple_enum_type::SimpleEnum; +use super::unit_struct_type::UnitStruct; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct DeleteLargeTable { + pub a: u8, + pub b: u16, + pub c: u32, + pub d: u64, + pub e: u128, + pub f: __sats::u256, + pub g: i8, + pub h: i16, + pub i: i32, + pub j: i64, + pub k: i128, + pub l: __sats::i256, + pub m: bool, + pub n: f32, + pub o: f64, + pub p: String, + pub q: SimpleEnum, + pub r: EnumWithPayload, + pub s: UnitStruct, + pub t: ByteStruct, + pub u: EveryPrimitiveStruct, + pub v: EveryVecStruct, +} + +impl __sdk::InModule for DeleteLargeTable { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_pk_bool_type.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_pk_bool_type.rs new file mode 100644 index 00000000000..f8db06a3074 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_pk_bool_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct DeletePkBool { + pub b: bool, +} + +impl __sdk::InModule for DeletePkBool { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_pk_connection_id_type.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_pk_connection_id_type.rs new file mode 100644 index 00000000000..d8ce7a28583 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_pk_connection_id_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct DeletePkConnectionId { + pub a: __sdk::ConnectionId, +} + +impl __sdk::InModule for DeletePkConnectionId { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_pk_i_128_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_pk_i_128_reducer.rs index b461ad7ab27..248a8ac330e 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/delete_pk_i_128_reducer.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_pk_i_128_reducer.rs @@ -21,11 +21,11 @@ impl __sdk::InModule for DeletePkI128Args { } #[allow(non_camel_case_types)] -/// Extension trait for access to the reducer `delete_pk_i128`. +/// Extension trait for access to the reducer `delete_pk_i_128`. /// /// Implemented for [`super::RemoteReducers`]. pub trait delete_pk_i_128 { - /// Request that the remote module invoke the reducer `delete_pk_i128` to run as soon as possible. + /// Request that the remote module invoke the reducer `delete_pk_i_128` 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, @@ -35,7 +35,7 @@ pub trait delete_pk_i_128 { self.delete_pk_i_128_then(n, |_, _| {}) } - /// Request that the remote module invoke the reducer `delete_pk_i128` to run as soon as possible, + /// Request that the remote module invoke the reducer `delete_pk_i_128` to run as soon as possible, /// registering `callback` to run when we are notified that the reducer completed. /// /// This method returns immediately, and errors only if we are unable to send the request. diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_pk_i_128_type.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_pk_i_128_type.rs new file mode 100644 index 00000000000..e831af49f9b --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_pk_i_128_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct DeletePkI128 { + pub n: i128, +} + +impl __sdk::InModule for DeletePkI128 { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_pk_i_16_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_pk_i_16_reducer.rs index 78f3af315a8..041b396b74d 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/delete_pk_i_16_reducer.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_pk_i_16_reducer.rs @@ -21,11 +21,11 @@ impl __sdk::InModule for DeletePkI16Args { } #[allow(non_camel_case_types)] -/// Extension trait for access to the reducer `delete_pk_i16`. +/// Extension trait for access to the reducer `delete_pk_i_16`. /// /// Implemented for [`super::RemoteReducers`]. pub trait delete_pk_i_16 { - /// Request that the remote module invoke the reducer `delete_pk_i16` to run as soon as possible. + /// Request that the remote module invoke the reducer `delete_pk_i_16` 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, @@ -35,7 +35,7 @@ pub trait delete_pk_i_16 { self.delete_pk_i_16_then(n, |_, _| {}) } - /// Request that the remote module invoke the reducer `delete_pk_i16` to run as soon as possible, + /// Request that the remote module invoke the reducer `delete_pk_i_16` to run as soon as possible, /// registering `callback` to run when we are notified that the reducer completed. /// /// This method returns immediately, and errors only if we are unable to send the request. diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_pk_i_16_type.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_pk_i_16_type.rs new file mode 100644 index 00000000000..1886d7649cb --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_pk_i_16_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct DeletePkI16 { + pub n: i16, +} + +impl __sdk::InModule for DeletePkI16 { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_pk_i_256_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_pk_i_256_reducer.rs index 810e8025b68..e19681c31f7 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/delete_pk_i_256_reducer.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_pk_i_256_reducer.rs @@ -21,11 +21,11 @@ impl __sdk::InModule for DeletePkI256Args { } #[allow(non_camel_case_types)] -/// Extension trait for access to the reducer `delete_pk_i256`. +/// Extension trait for access to the reducer `delete_pk_i_256`. /// /// Implemented for [`super::RemoteReducers`]. pub trait delete_pk_i_256 { - /// Request that the remote module invoke the reducer `delete_pk_i256` to run as soon as possible. + /// Request that the remote module invoke the reducer `delete_pk_i_256` 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, @@ -35,7 +35,7 @@ pub trait delete_pk_i_256 { self.delete_pk_i_256_then(n, |_, _| {}) } - /// Request that the remote module invoke the reducer `delete_pk_i256` to run as soon as possible, + /// Request that the remote module invoke the reducer `delete_pk_i_256` to run as soon as possible, /// registering `callback` to run when we are notified that the reducer completed. /// /// This method returns immediately, and errors only if we are unable to send the request. diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_pk_i_256_type.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_pk_i_256_type.rs new file mode 100644 index 00000000000..802150383cd --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_pk_i_256_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct DeletePkI256 { + pub n: __sats::i256, +} + +impl __sdk::InModule for DeletePkI256 { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_pk_i_32_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_pk_i_32_reducer.rs index 327a9c60e14..5ac86a02c7a 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/delete_pk_i_32_reducer.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_pk_i_32_reducer.rs @@ -21,11 +21,11 @@ impl __sdk::InModule for DeletePkI32Args { } #[allow(non_camel_case_types)] -/// Extension trait for access to the reducer `delete_pk_i32`. +/// Extension trait for access to the reducer `delete_pk_i_32`. /// /// Implemented for [`super::RemoteReducers`]. pub trait delete_pk_i_32 { - /// Request that the remote module invoke the reducer `delete_pk_i32` to run as soon as possible. + /// Request that the remote module invoke the reducer `delete_pk_i_32` 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, @@ -35,7 +35,7 @@ pub trait delete_pk_i_32 { self.delete_pk_i_32_then(n, |_, _| {}) } - /// Request that the remote module invoke the reducer `delete_pk_i32` to run as soon as possible, + /// Request that the remote module invoke the reducer `delete_pk_i_32` to run as soon as possible, /// registering `callback` to run when we are notified that the reducer completed. /// /// This method returns immediately, and errors only if we are unable to send the request. diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_pk_i_32_type.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_pk_i_32_type.rs new file mode 100644 index 00000000000..98f74de8af4 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_pk_i_32_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct DeletePkI32 { + pub n: i32, +} + +impl __sdk::InModule for DeletePkI32 { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_pk_i_64_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_pk_i_64_reducer.rs index 8e894a0e41c..237933aa268 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/delete_pk_i_64_reducer.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_pk_i_64_reducer.rs @@ -21,11 +21,11 @@ impl __sdk::InModule for DeletePkI64Args { } #[allow(non_camel_case_types)] -/// Extension trait for access to the reducer `delete_pk_i64`. +/// Extension trait for access to the reducer `delete_pk_i_64`. /// /// Implemented for [`super::RemoteReducers`]. pub trait delete_pk_i_64 { - /// Request that the remote module invoke the reducer `delete_pk_i64` to run as soon as possible. + /// Request that the remote module invoke the reducer `delete_pk_i_64` 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, @@ -35,7 +35,7 @@ pub trait delete_pk_i_64 { self.delete_pk_i_64_then(n, |_, _| {}) } - /// Request that the remote module invoke the reducer `delete_pk_i64` to run as soon as possible, + /// Request that the remote module invoke the reducer `delete_pk_i_64` to run as soon as possible, /// registering `callback` to run when we are notified that the reducer completed. /// /// This method returns immediately, and errors only if we are unable to send the request. diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_pk_i_64_type.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_pk_i_64_type.rs new file mode 100644 index 00000000000..719720b2fe8 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_pk_i_64_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct DeletePkI64 { + pub n: i64, +} + +impl __sdk::InModule for DeletePkI64 { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_pk_i_8_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_pk_i_8_reducer.rs index 2908b86d9f9..9f7f0ea2a13 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/delete_pk_i_8_reducer.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_pk_i_8_reducer.rs @@ -21,11 +21,11 @@ impl __sdk::InModule for DeletePkI8Args { } #[allow(non_camel_case_types)] -/// Extension trait for access to the reducer `delete_pk_i8`. +/// Extension trait for access to the reducer `delete_pk_i_8`. /// /// Implemented for [`super::RemoteReducers`]. pub trait delete_pk_i_8 { - /// Request that the remote module invoke the reducer `delete_pk_i8` to run as soon as possible. + /// Request that the remote module invoke the reducer `delete_pk_i_8` 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, @@ -35,7 +35,7 @@ pub trait delete_pk_i_8 { self.delete_pk_i_8_then(n, |_, _| {}) } - /// Request that the remote module invoke the reducer `delete_pk_i8` to run as soon as possible, + /// Request that the remote module invoke the reducer `delete_pk_i_8` to run as soon as possible, /// registering `callback` to run when we are notified that the reducer completed. /// /// This method returns immediately, and errors only if we are unable to send the request. diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_pk_i_8_type.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_pk_i_8_type.rs new file mode 100644 index 00000000000..669a3db6e04 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_pk_i_8_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct DeletePkI8 { + pub n: i8, +} + +impl __sdk::InModule for DeletePkI8 { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_pk_identity_type.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_pk_identity_type.rs new file mode 100644 index 00000000000..c316485006c --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_pk_identity_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct DeletePkIdentity { + pub i: __sdk::Identity, +} + +impl __sdk::InModule for DeletePkIdentity { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_pk_string_type.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_pk_string_type.rs new file mode 100644 index 00000000000..c4b9dce4fe9 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_pk_string_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct DeletePkString { + pub s: String, +} + +impl __sdk::InModule for DeletePkString { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_pk_u_128_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_pk_u_128_reducer.rs index 4d950cad94a..2f7c9fd30b9 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/delete_pk_u_128_reducer.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_pk_u_128_reducer.rs @@ -21,11 +21,11 @@ impl __sdk::InModule for DeletePkU128Args { } #[allow(non_camel_case_types)] -/// Extension trait for access to the reducer `delete_pk_u128`. +/// Extension trait for access to the reducer `delete_pk_u_128`. /// /// Implemented for [`super::RemoteReducers`]. pub trait delete_pk_u_128 { - /// Request that the remote module invoke the reducer `delete_pk_u128` to run as soon as possible. + /// Request that the remote module invoke the reducer `delete_pk_u_128` 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, @@ -35,7 +35,7 @@ pub trait delete_pk_u_128 { self.delete_pk_u_128_then(n, |_, _| {}) } - /// Request that the remote module invoke the reducer `delete_pk_u128` to run as soon as possible, + /// Request that the remote module invoke the reducer `delete_pk_u_128` to run as soon as possible, /// registering `callback` to run when we are notified that the reducer completed. /// /// This method returns immediately, and errors only if we are unable to send the request. diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_pk_u_128_type.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_pk_u_128_type.rs new file mode 100644 index 00000000000..d8f39b4741a --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_pk_u_128_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct DeletePkU128 { + pub n: u128, +} + +impl __sdk::InModule for DeletePkU128 { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_pk_u_16_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_pk_u_16_reducer.rs index 910fbd6ff88..17c6711556b 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/delete_pk_u_16_reducer.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_pk_u_16_reducer.rs @@ -21,11 +21,11 @@ impl __sdk::InModule for DeletePkU16Args { } #[allow(non_camel_case_types)] -/// Extension trait for access to the reducer `delete_pk_u16`. +/// Extension trait for access to the reducer `delete_pk_u_16`. /// /// Implemented for [`super::RemoteReducers`]. pub trait delete_pk_u_16 { - /// Request that the remote module invoke the reducer `delete_pk_u16` to run as soon as possible. + /// Request that the remote module invoke the reducer `delete_pk_u_16` 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, @@ -35,7 +35,7 @@ pub trait delete_pk_u_16 { self.delete_pk_u_16_then(n, |_, _| {}) } - /// Request that the remote module invoke the reducer `delete_pk_u16` to run as soon as possible, + /// Request that the remote module invoke the reducer `delete_pk_u_16` to run as soon as possible, /// registering `callback` to run when we are notified that the reducer completed. /// /// This method returns immediately, and errors only if we are unable to send the request. diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_pk_u_16_type.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_pk_u_16_type.rs new file mode 100644 index 00000000000..71d9c864a06 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_pk_u_16_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct DeletePkU16 { + pub n: u16, +} + +impl __sdk::InModule for DeletePkU16 { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_pk_u_256_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_pk_u_256_reducer.rs index 714293358d4..2992c118aa7 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/delete_pk_u_256_reducer.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_pk_u_256_reducer.rs @@ -21,11 +21,11 @@ impl __sdk::InModule for DeletePkU256Args { } #[allow(non_camel_case_types)] -/// Extension trait for access to the reducer `delete_pk_u256`. +/// Extension trait for access to the reducer `delete_pk_u_256`. /// /// Implemented for [`super::RemoteReducers`]. pub trait delete_pk_u_256 { - /// Request that the remote module invoke the reducer `delete_pk_u256` to run as soon as possible. + /// Request that the remote module invoke the reducer `delete_pk_u_256` 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, @@ -35,7 +35,7 @@ pub trait delete_pk_u_256 { self.delete_pk_u_256_then(n, |_, _| {}) } - /// Request that the remote module invoke the reducer `delete_pk_u256` to run as soon as possible, + /// Request that the remote module invoke the reducer `delete_pk_u_256` to run as soon as possible, /// registering `callback` to run when we are notified that the reducer completed. /// /// This method returns immediately, and errors only if we are unable to send the request. diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_pk_u_256_type.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_pk_u_256_type.rs new file mode 100644 index 00000000000..9785cbc856c --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_pk_u_256_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct DeletePkU256 { + pub n: __sats::u256, +} + +impl __sdk::InModule for DeletePkU256 { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_pk_u_32_insert_pk_u_32_two_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_pk_u_32_insert_pk_u_32_two_reducer.rs index ad2f4b41c11..fac94132b65 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/delete_pk_u_32_insert_pk_u_32_two_reducer.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_pk_u_32_insert_pk_u_32_two_reducer.rs @@ -25,11 +25,11 @@ impl __sdk::InModule for DeletePkU32InsertPkU32TwoArgs { } #[allow(non_camel_case_types)] -/// Extension trait for access to the reducer `delete_pk_u32_insert_pk_u32_two`. +/// Extension trait for access to the reducer `delete_pk_u_32_insert_pk_u_32_two`. /// /// Implemented for [`super::RemoteReducers`]. pub trait delete_pk_u_32_insert_pk_u_32_two { - /// Request that the remote module invoke the reducer `delete_pk_u32_insert_pk_u32_two` to run as soon as possible. + /// Request that the remote module invoke the reducer `delete_pk_u_32_insert_pk_u_32_two` 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, @@ -39,7 +39,7 @@ pub trait delete_pk_u_32_insert_pk_u_32_two { self.delete_pk_u_32_insert_pk_u_32_two_then(n, data, |_, _| {}) } - /// Request that the remote module invoke the reducer `delete_pk_u32_insert_pk_u32_two` to run as soon as possible, + /// Request that the remote module invoke the reducer `delete_pk_u_32_insert_pk_u_32_two` to run as soon as possible, /// registering `callback` to run when we are notified that the reducer completed. /// /// This method returns immediately, and errors only if we are unable to send the request. diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_pk_u_32_insert_pk_u_32_two_type.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_pk_u_32_insert_pk_u_32_two_type.rs new file mode 100644 index 00000000000..0b0555ced5b --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_pk_u_32_insert_pk_u_32_two_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct DeletePkU32InsertPkU32Two { + pub n: u32, + pub data: i32, +} + +impl __sdk::InModule for DeletePkU32InsertPkU32Two { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_pk_u_32_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_pk_u_32_reducer.rs index 4ef98524bf3..8facc26002b 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/delete_pk_u_32_reducer.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_pk_u_32_reducer.rs @@ -21,11 +21,11 @@ impl __sdk::InModule for DeletePkU32Args { } #[allow(non_camel_case_types)] -/// Extension trait for access to the reducer `delete_pk_u32`. +/// Extension trait for access to the reducer `delete_pk_u_32`. /// /// Implemented for [`super::RemoteReducers`]. pub trait delete_pk_u_32 { - /// Request that the remote module invoke the reducer `delete_pk_u32` to run as soon as possible. + /// Request that the remote module invoke the reducer `delete_pk_u_32` 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, @@ -35,7 +35,7 @@ pub trait delete_pk_u_32 { self.delete_pk_u_32_then(n, |_, _| {}) } - /// Request that the remote module invoke the reducer `delete_pk_u32` to run as soon as possible, + /// Request that the remote module invoke the reducer `delete_pk_u_32` to run as soon as possible, /// registering `callback` to run when we are notified that the reducer completed. /// /// This method returns immediately, and errors only if we are unable to send the request. diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_pk_u_32_two_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_pk_u_32_two_reducer.rs index 9968d76a40e..fa22d076264 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/delete_pk_u_32_two_reducer.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_pk_u_32_two_reducer.rs @@ -21,11 +21,11 @@ impl __sdk::InModule for DeletePkU32TwoArgs { } #[allow(non_camel_case_types)] -/// Extension trait for access to the reducer `delete_pk_u32_two`. +/// Extension trait for access to the reducer `delete_pk_u_32_two`. /// /// Implemented for [`super::RemoteReducers`]. pub trait delete_pk_u_32_two { - /// Request that the remote module invoke the reducer `delete_pk_u32_two` to run as soon as possible. + /// Request that the remote module invoke the reducer `delete_pk_u_32_two` 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, @@ -35,7 +35,7 @@ pub trait delete_pk_u_32_two { self.delete_pk_u_32_two_then(n, |_, _| {}) } - /// Request that the remote module invoke the reducer `delete_pk_u32_two` to run as soon as possible, + /// Request that the remote module invoke the reducer `delete_pk_u_32_two` to run as soon as possible, /// registering `callback` to run when we are notified that the reducer completed. /// /// This method returns immediately, and errors only if we are unable to send the request. diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_pk_u_32_two_type.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_pk_u_32_two_type.rs new file mode 100644 index 00000000000..8bd3824fb85 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_pk_u_32_two_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct DeletePkU32Two { + pub n: u32, +} + +impl __sdk::InModule for DeletePkU32Two { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_pk_u_32_type.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_pk_u_32_type.rs new file mode 100644 index 00000000000..79e5cb770ef --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_pk_u_32_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct DeletePkU32 { + pub n: u32, +} + +impl __sdk::InModule for DeletePkU32 { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_pk_u_64_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_pk_u_64_reducer.rs index 96daf10338e..5986827f075 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/delete_pk_u_64_reducer.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_pk_u_64_reducer.rs @@ -21,11 +21,11 @@ impl __sdk::InModule for DeletePkU64Args { } #[allow(non_camel_case_types)] -/// Extension trait for access to the reducer `delete_pk_u64`. +/// Extension trait for access to the reducer `delete_pk_u_64`. /// /// Implemented for [`super::RemoteReducers`]. pub trait delete_pk_u_64 { - /// Request that the remote module invoke the reducer `delete_pk_u64` to run as soon as possible. + /// Request that the remote module invoke the reducer `delete_pk_u_64` 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, @@ -35,7 +35,7 @@ pub trait delete_pk_u_64 { self.delete_pk_u_64_then(n, |_, _| {}) } - /// Request that the remote module invoke the reducer `delete_pk_u64` to run as soon as possible, + /// Request that the remote module invoke the reducer `delete_pk_u_64` to run as soon as possible, /// registering `callback` to run when we are notified that the reducer completed. /// /// This method returns immediately, and errors only if we are unable to send the request. diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_pk_u_64_type.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_pk_u_64_type.rs new file mode 100644 index 00000000000..664cc95359d --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_pk_u_64_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct DeletePkU64 { + pub n: u64, +} + +impl __sdk::InModule for DeletePkU64 { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_pk_u_8_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_pk_u_8_reducer.rs index 755e11be016..387f4b3aa6b 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/delete_pk_u_8_reducer.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_pk_u_8_reducer.rs @@ -21,11 +21,11 @@ impl __sdk::InModule for DeletePkU8Args { } #[allow(non_camel_case_types)] -/// Extension trait for access to the reducer `delete_pk_u8`. +/// Extension trait for access to the reducer `delete_pk_u_8`. /// /// Implemented for [`super::RemoteReducers`]. pub trait delete_pk_u_8 { - /// Request that the remote module invoke the reducer `delete_pk_u8` to run as soon as possible. + /// Request that the remote module invoke the reducer `delete_pk_u_8` 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, @@ -35,7 +35,7 @@ pub trait delete_pk_u_8 { self.delete_pk_u_8_then(n, |_, _| {}) } - /// Request that the remote module invoke the reducer `delete_pk_u8` to run as soon as possible, + /// Request that the remote module invoke the reducer `delete_pk_u_8` to run as soon as possible, /// registering `callback` to run when we are notified that the reducer completed. /// /// This method returns immediately, and errors only if we are unable to send the request. diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_pk_u_8_type.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_pk_u_8_type.rs new file mode 100644 index 00000000000..535b697c869 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_pk_u_8_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct DeletePkU8 { + pub n: u8, +} + +impl __sdk::InModule for DeletePkU8 { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_pk_uuid_type.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_pk_uuid_type.rs new file mode 100644 index 00000000000..d98043fa991 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_pk_uuid_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct DeletePkUuid { + pub u: __sdk::Uuid, +} + +impl __sdk::InModule for DeletePkUuid { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_unique_bool_type.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_unique_bool_type.rs new file mode 100644 index 00000000000..2ba10b297a1 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_unique_bool_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct DeleteUniqueBool { + pub b: bool, +} + +impl __sdk::InModule for DeleteUniqueBool { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_unique_connection_id_type.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_unique_connection_id_type.rs new file mode 100644 index 00000000000..aab09c995db --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_unique_connection_id_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct DeleteUniqueConnectionId { + pub a: __sdk::ConnectionId, +} + +impl __sdk::InModule for DeleteUniqueConnectionId { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_unique_i_128_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_unique_i_128_reducer.rs index 462a0c53de1..90a87721eb6 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/delete_unique_i_128_reducer.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_unique_i_128_reducer.rs @@ -21,11 +21,11 @@ impl __sdk::InModule for DeleteUniqueI128Args { } #[allow(non_camel_case_types)] -/// Extension trait for access to the reducer `delete_unique_i128`. +/// Extension trait for access to the reducer `delete_unique_i_128`. /// /// Implemented for [`super::RemoteReducers`]. pub trait delete_unique_i_128 { - /// Request that the remote module invoke the reducer `delete_unique_i128` to run as soon as possible. + /// Request that the remote module invoke the reducer `delete_unique_i_128` 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, @@ -35,7 +35,7 @@ pub trait delete_unique_i_128 { self.delete_unique_i_128_then(n, |_, _| {}) } - /// Request that the remote module invoke the reducer `delete_unique_i128` to run as soon as possible, + /// Request that the remote module invoke the reducer `delete_unique_i_128` to run as soon as possible, /// registering `callback` to run when we are notified that the reducer completed. /// /// This method returns immediately, and errors only if we are unable to send the request. diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_unique_i_128_type.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_unique_i_128_type.rs new file mode 100644 index 00000000000..c24d746d6f8 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_unique_i_128_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct DeleteUniqueI128 { + pub n: i128, +} + +impl __sdk::InModule for DeleteUniqueI128 { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_unique_i_16_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_unique_i_16_reducer.rs index f84f776fc96..cefb527055b 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/delete_unique_i_16_reducer.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_unique_i_16_reducer.rs @@ -21,11 +21,11 @@ impl __sdk::InModule for DeleteUniqueI16Args { } #[allow(non_camel_case_types)] -/// Extension trait for access to the reducer `delete_unique_i16`. +/// Extension trait for access to the reducer `delete_unique_i_16`. /// /// Implemented for [`super::RemoteReducers`]. pub trait delete_unique_i_16 { - /// Request that the remote module invoke the reducer `delete_unique_i16` to run as soon as possible. + /// Request that the remote module invoke the reducer `delete_unique_i_16` 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, @@ -35,7 +35,7 @@ pub trait delete_unique_i_16 { self.delete_unique_i_16_then(n, |_, _| {}) } - /// Request that the remote module invoke the reducer `delete_unique_i16` to run as soon as possible, + /// Request that the remote module invoke the reducer `delete_unique_i_16` to run as soon as possible, /// registering `callback` to run when we are notified that the reducer completed. /// /// This method returns immediately, and errors only if we are unable to send the request. diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_unique_i_16_type.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_unique_i_16_type.rs new file mode 100644 index 00000000000..5b35bdbb794 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_unique_i_16_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct DeleteUniqueI16 { + pub n: i16, +} + +impl __sdk::InModule for DeleteUniqueI16 { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_unique_i_256_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_unique_i_256_reducer.rs index d69238ed4d4..b83de3f39bc 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/delete_unique_i_256_reducer.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_unique_i_256_reducer.rs @@ -21,11 +21,11 @@ impl __sdk::InModule for DeleteUniqueI256Args { } #[allow(non_camel_case_types)] -/// Extension trait for access to the reducer `delete_unique_i256`. +/// Extension trait for access to the reducer `delete_unique_i_256`. /// /// Implemented for [`super::RemoteReducers`]. pub trait delete_unique_i_256 { - /// Request that the remote module invoke the reducer `delete_unique_i256` to run as soon as possible. + /// Request that the remote module invoke the reducer `delete_unique_i_256` 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, @@ -35,7 +35,7 @@ pub trait delete_unique_i_256 { self.delete_unique_i_256_then(n, |_, _| {}) } - /// Request that the remote module invoke the reducer `delete_unique_i256` to run as soon as possible, + /// Request that the remote module invoke the reducer `delete_unique_i_256` to run as soon as possible, /// registering `callback` to run when we are notified that the reducer completed. /// /// This method returns immediately, and errors only if we are unable to send the request. diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_unique_i_256_type.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_unique_i_256_type.rs new file mode 100644 index 00000000000..dd116febf68 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_unique_i_256_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct DeleteUniqueI256 { + pub n: __sats::i256, +} + +impl __sdk::InModule for DeleteUniqueI256 { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_unique_i_32_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_unique_i_32_reducer.rs index 773939e2f9f..ab968509345 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/delete_unique_i_32_reducer.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_unique_i_32_reducer.rs @@ -21,11 +21,11 @@ impl __sdk::InModule for DeleteUniqueI32Args { } #[allow(non_camel_case_types)] -/// Extension trait for access to the reducer `delete_unique_i32`. +/// Extension trait for access to the reducer `delete_unique_i_32`. /// /// Implemented for [`super::RemoteReducers`]. pub trait delete_unique_i_32 { - /// Request that the remote module invoke the reducer `delete_unique_i32` to run as soon as possible. + /// Request that the remote module invoke the reducer `delete_unique_i_32` 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, @@ -35,7 +35,7 @@ pub trait delete_unique_i_32 { self.delete_unique_i_32_then(n, |_, _| {}) } - /// Request that the remote module invoke the reducer `delete_unique_i32` to run as soon as possible, + /// Request that the remote module invoke the reducer `delete_unique_i_32` to run as soon as possible, /// registering `callback` to run when we are notified that the reducer completed. /// /// This method returns immediately, and errors only if we are unable to send the request. diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_unique_i_32_type.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_unique_i_32_type.rs new file mode 100644 index 00000000000..a757fbbe66b --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_unique_i_32_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct DeleteUniqueI32 { + pub n: i32, +} + +impl __sdk::InModule for DeleteUniqueI32 { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_unique_i_64_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_unique_i_64_reducer.rs index 21a46d24699..f041ba69101 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/delete_unique_i_64_reducer.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_unique_i_64_reducer.rs @@ -21,11 +21,11 @@ impl __sdk::InModule for DeleteUniqueI64Args { } #[allow(non_camel_case_types)] -/// Extension trait for access to the reducer `delete_unique_i64`. +/// Extension trait for access to the reducer `delete_unique_i_64`. /// /// Implemented for [`super::RemoteReducers`]. pub trait delete_unique_i_64 { - /// Request that the remote module invoke the reducer `delete_unique_i64` to run as soon as possible. + /// Request that the remote module invoke the reducer `delete_unique_i_64` 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, @@ -35,7 +35,7 @@ pub trait delete_unique_i_64 { self.delete_unique_i_64_then(n, |_, _| {}) } - /// Request that the remote module invoke the reducer `delete_unique_i64` to run as soon as possible, + /// Request that the remote module invoke the reducer `delete_unique_i_64` to run as soon as possible, /// registering `callback` to run when we are notified that the reducer completed. /// /// This method returns immediately, and errors only if we are unable to send the request. diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_unique_i_64_type.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_unique_i_64_type.rs new file mode 100644 index 00000000000..cb9abd18953 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_unique_i_64_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct DeleteUniqueI64 { + pub n: i64, +} + +impl __sdk::InModule for DeleteUniqueI64 { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_unique_i_8_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_unique_i_8_reducer.rs index d51a6e646b6..564f3e69b16 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/delete_unique_i_8_reducer.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_unique_i_8_reducer.rs @@ -21,11 +21,11 @@ impl __sdk::InModule for DeleteUniqueI8Args { } #[allow(non_camel_case_types)] -/// Extension trait for access to the reducer `delete_unique_i8`. +/// Extension trait for access to the reducer `delete_unique_i_8`. /// /// Implemented for [`super::RemoteReducers`]. pub trait delete_unique_i_8 { - /// Request that the remote module invoke the reducer `delete_unique_i8` to run as soon as possible. + /// Request that the remote module invoke the reducer `delete_unique_i_8` 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, @@ -35,7 +35,7 @@ pub trait delete_unique_i_8 { self.delete_unique_i_8_then(n, |_, _| {}) } - /// Request that the remote module invoke the reducer `delete_unique_i8` to run as soon as possible, + /// Request that the remote module invoke the reducer `delete_unique_i_8` to run as soon as possible, /// registering `callback` to run when we are notified that the reducer completed. /// /// This method returns immediately, and errors only if we are unable to send the request. diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_unique_i_8_type.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_unique_i_8_type.rs new file mode 100644 index 00000000000..953656284f6 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_unique_i_8_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct DeleteUniqueI8 { + pub n: i8, +} + +impl __sdk::InModule for DeleteUniqueI8 { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_unique_identity_type.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_unique_identity_type.rs new file mode 100644 index 00000000000..b3ae08a7ec3 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_unique_identity_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct DeleteUniqueIdentity { + pub i: __sdk::Identity, +} + +impl __sdk::InModule for DeleteUniqueIdentity { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_unique_string_type.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_unique_string_type.rs new file mode 100644 index 00000000000..9aaa86c8a37 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_unique_string_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct DeleteUniqueString { + pub s: String, +} + +impl __sdk::InModule for DeleteUniqueString { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_unique_u_128_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_unique_u_128_reducer.rs index 8254308a324..56c0286d6c6 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/delete_unique_u_128_reducer.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_unique_u_128_reducer.rs @@ -21,11 +21,11 @@ impl __sdk::InModule for DeleteUniqueU128Args { } #[allow(non_camel_case_types)] -/// Extension trait for access to the reducer `delete_unique_u128`. +/// Extension trait for access to the reducer `delete_unique_u_128`. /// /// Implemented for [`super::RemoteReducers`]. pub trait delete_unique_u_128 { - /// Request that the remote module invoke the reducer `delete_unique_u128` to run as soon as possible. + /// Request that the remote module invoke the reducer `delete_unique_u_128` 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, @@ -35,7 +35,7 @@ pub trait delete_unique_u_128 { self.delete_unique_u_128_then(n, |_, _| {}) } - /// Request that the remote module invoke the reducer `delete_unique_u128` to run as soon as possible, + /// Request that the remote module invoke the reducer `delete_unique_u_128` to run as soon as possible, /// registering `callback` to run when we are notified that the reducer completed. /// /// This method returns immediately, and errors only if we are unable to send the request. diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_unique_u_128_type.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_unique_u_128_type.rs new file mode 100644 index 00000000000..caed2d59e91 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_unique_u_128_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct DeleteUniqueU128 { + pub n: u128, +} + +impl __sdk::InModule for DeleteUniqueU128 { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_unique_u_16_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_unique_u_16_reducer.rs index 061cdab5876..aa282a4fa5d 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/delete_unique_u_16_reducer.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_unique_u_16_reducer.rs @@ -21,11 +21,11 @@ impl __sdk::InModule for DeleteUniqueU16Args { } #[allow(non_camel_case_types)] -/// Extension trait for access to the reducer `delete_unique_u16`. +/// Extension trait for access to the reducer `delete_unique_u_16`. /// /// Implemented for [`super::RemoteReducers`]. pub trait delete_unique_u_16 { - /// Request that the remote module invoke the reducer `delete_unique_u16` to run as soon as possible. + /// Request that the remote module invoke the reducer `delete_unique_u_16` 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, @@ -35,7 +35,7 @@ pub trait delete_unique_u_16 { self.delete_unique_u_16_then(n, |_, _| {}) } - /// Request that the remote module invoke the reducer `delete_unique_u16` to run as soon as possible, + /// Request that the remote module invoke the reducer `delete_unique_u_16` to run as soon as possible, /// registering `callback` to run when we are notified that the reducer completed. /// /// This method returns immediately, and errors only if we are unable to send the request. diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_unique_u_16_type.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_unique_u_16_type.rs new file mode 100644 index 00000000000..df0c9d6d7e6 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_unique_u_16_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct DeleteUniqueU16 { + pub n: u16, +} + +impl __sdk::InModule for DeleteUniqueU16 { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_unique_u_256_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_unique_u_256_reducer.rs index 35118c0926d..f68566984de 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/delete_unique_u_256_reducer.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_unique_u_256_reducer.rs @@ -21,11 +21,11 @@ impl __sdk::InModule for DeleteUniqueU256Args { } #[allow(non_camel_case_types)] -/// Extension trait for access to the reducer `delete_unique_u256`. +/// Extension trait for access to the reducer `delete_unique_u_256`. /// /// Implemented for [`super::RemoteReducers`]. pub trait delete_unique_u_256 { - /// Request that the remote module invoke the reducer `delete_unique_u256` to run as soon as possible. + /// Request that the remote module invoke the reducer `delete_unique_u_256` 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, @@ -35,7 +35,7 @@ pub trait delete_unique_u_256 { self.delete_unique_u_256_then(n, |_, _| {}) } - /// Request that the remote module invoke the reducer `delete_unique_u256` to run as soon as possible, + /// Request that the remote module invoke the reducer `delete_unique_u_256` to run as soon as possible, /// registering `callback` to run when we are notified that the reducer completed. /// /// This method returns immediately, and errors only if we are unable to send the request. diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_unique_u_256_type.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_unique_u_256_type.rs new file mode 100644 index 00000000000..decc4ab6bfd --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_unique_u_256_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct DeleteUniqueU256 { + pub n: __sats::u256, +} + +impl __sdk::InModule for DeleteUniqueU256 { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_unique_u_32_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_unique_u_32_reducer.rs index d716f25251f..1f96bd4fb83 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/delete_unique_u_32_reducer.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_unique_u_32_reducer.rs @@ -21,11 +21,11 @@ impl __sdk::InModule for DeleteUniqueU32Args { } #[allow(non_camel_case_types)] -/// Extension trait for access to the reducer `delete_unique_u32`. +/// Extension trait for access to the reducer `delete_unique_u_32`. /// /// Implemented for [`super::RemoteReducers`]. pub trait delete_unique_u_32 { - /// Request that the remote module invoke the reducer `delete_unique_u32` to run as soon as possible. + /// Request that the remote module invoke the reducer `delete_unique_u_32` 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, @@ -35,7 +35,7 @@ pub trait delete_unique_u_32 { self.delete_unique_u_32_then(n, |_, _| {}) } - /// Request that the remote module invoke the reducer `delete_unique_u32` to run as soon as possible, + /// Request that the remote module invoke the reducer `delete_unique_u_32` to run as soon as possible, /// registering `callback` to run when we are notified that the reducer completed. /// /// This method returns immediately, and errors only if we are unable to send the request. diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_unique_u_32_type.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_unique_u_32_type.rs new file mode 100644 index 00000000000..c2863d85f1a --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_unique_u_32_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct DeleteUniqueU32 { + pub n: u32, +} + +impl __sdk::InModule for DeleteUniqueU32 { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_unique_u_64_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_unique_u_64_reducer.rs index 7f183688deb..74089d52e98 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/delete_unique_u_64_reducer.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_unique_u_64_reducer.rs @@ -21,11 +21,11 @@ impl __sdk::InModule for DeleteUniqueU64Args { } #[allow(non_camel_case_types)] -/// Extension trait for access to the reducer `delete_unique_u64`. +/// Extension trait for access to the reducer `delete_unique_u_64`. /// /// Implemented for [`super::RemoteReducers`]. pub trait delete_unique_u_64 { - /// Request that the remote module invoke the reducer `delete_unique_u64` to run as soon as possible. + /// Request that the remote module invoke the reducer `delete_unique_u_64` 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, @@ -35,7 +35,7 @@ pub trait delete_unique_u_64 { self.delete_unique_u_64_then(n, |_, _| {}) } - /// Request that the remote module invoke the reducer `delete_unique_u64` to run as soon as possible, + /// Request that the remote module invoke the reducer `delete_unique_u_64` to run as soon as possible, /// registering `callback` to run when we are notified that the reducer completed. /// /// This method returns immediately, and errors only if we are unable to send the request. diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_unique_u_64_type.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_unique_u_64_type.rs new file mode 100644 index 00000000000..5d9ab44601d --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_unique_u_64_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct DeleteUniqueU64 { + pub n: u64, +} + +impl __sdk::InModule for DeleteUniqueU64 { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_unique_u_8_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_unique_u_8_reducer.rs index 331fe124009..fc71bcdecff 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/delete_unique_u_8_reducer.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_unique_u_8_reducer.rs @@ -21,11 +21,11 @@ impl __sdk::InModule for DeleteUniqueU8Args { } #[allow(non_camel_case_types)] -/// Extension trait for access to the reducer `delete_unique_u8`. +/// Extension trait for access to the reducer `delete_unique_u_8`. /// /// Implemented for [`super::RemoteReducers`]. pub trait delete_unique_u_8 { - /// Request that the remote module invoke the reducer `delete_unique_u8` to run as soon as possible. + /// Request that the remote module invoke the reducer `delete_unique_u_8` 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, @@ -35,7 +35,7 @@ pub trait delete_unique_u_8 { self.delete_unique_u_8_then(n, |_, _| {}) } - /// Request that the remote module invoke the reducer `delete_unique_u8` to run as soon as possible, + /// Request that the remote module invoke the reducer `delete_unique_u_8` to run as soon as possible, /// registering `callback` to run when we are notified that the reducer completed. /// /// This method returns immediately, and errors only if we are unable to send the request. diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_unique_u_8_type.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_unique_u_8_type.rs new file mode 100644 index 00000000000..61173fc754c --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_unique_u_8_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct DeleteUniqueU8 { + pub n: u8, +} + +impl __sdk::InModule for DeleteUniqueU8 { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_unique_uuid_type.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_unique_uuid_type.rs new file mode 100644 index 00000000000..666a0dd4cbc --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/delete_unique_uuid_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct DeleteUniqueUuid { + pub u: __sdk::Uuid, +} + +impl __sdk::InModule for DeleteUniqueUuid { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/indexed_simple_enum_table.rs b/sdks/rust/tests/test-client/src/module_bindings/indexed_simple_enum_table.rs index 02b40f1302e..1b9eec4eb4a 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/indexed_simple_enum_table.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/indexed_simple_enum_table.rs @@ -99,14 +99,14 @@ pub(super) fn parse_table_update( /// Extension trait for query builder access to the table `IndexedSimpleEnum`. /// /// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait indexed_simple_enumQueryTableAccess { +pub trait indexedSimpleEnumQueryTableAccess { #[allow(non_snake_case)] /// Get a query builder for the table `IndexedSimpleEnum`. - fn indexed_simple_enum(&self) -> __sdk::__query_builder::Table; + fn indexedSimpleEnum(&self) -> __sdk::__query_builder::Table; } -impl indexed_simple_enumQueryTableAccess for __sdk::QueryTableAccessor { - fn indexed_simple_enum(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("indexed_simple_enum") +impl indexedSimpleEnumQueryTableAccess for __sdk::QueryTableAccessor { + fn indexedSimpleEnum(&self) -> __sdk::__query_builder::Table { + __sdk::__query_builder::Table::new("indexedSimpleEnum") } } diff --git a/sdks/rust/tests/test-client/src/module_bindings/indexed_table_2_table.rs b/sdks/rust/tests/test-client/src/module_bindings/indexed_table_2_table.rs index 63eaf2e6ff3..91b354259c3 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/indexed_table_2_table.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/indexed_table_2_table.rs @@ -98,14 +98,14 @@ pub(super) fn parse_table_update( /// Extension trait for query builder access to the table `IndexedTable2`. /// /// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait indexed_table_2QueryTableAccess { +pub trait indexedTable2QueryTableAccess { #[allow(non_snake_case)] /// Get a query builder for the table `IndexedTable2`. - fn indexed_table_2(&self) -> __sdk::__query_builder::Table; + fn indexedTable2(&self) -> __sdk::__query_builder::Table; } -impl indexed_table_2QueryTableAccess for __sdk::QueryTableAccessor { - fn indexed_table_2(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("indexed_table_2") +impl indexedTable2QueryTableAccess for __sdk::QueryTableAccessor { + fn indexedTable2(&self) -> __sdk::__query_builder::Table { + __sdk::__query_builder::Table::new("indexedTable2") } } diff --git a/sdks/rust/tests/test-client/src/module_bindings/indexed_table_table.rs b/sdks/rust/tests/test-client/src/module_bindings/indexed_table_table.rs index 73b03043ace..569aaa7118d 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/indexed_table_table.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/indexed_table_table.rs @@ -98,14 +98,14 @@ pub(super) fn parse_table_update( /// Extension trait for query builder access to the table `IndexedTable`. /// /// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait indexed_tableQueryTableAccess { +pub trait indexedTableQueryTableAccess { #[allow(non_snake_case)] /// Get a query builder for the table `IndexedTable`. - fn indexed_table(&self) -> __sdk::__query_builder::Table; + fn indexedTable(&self) -> __sdk::__query_builder::Table; } -impl indexed_tableQueryTableAccess for __sdk::QueryTableAccessor { - fn indexed_table(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("indexed_table") +impl indexedTableQueryTableAccess for __sdk::QueryTableAccessor { + fn indexedTable(&self) -> __sdk::__query_builder::Table { + __sdk::__query_builder::Table::new("indexedTable") } } diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_call_timestamp_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_call_timestamp_type.rs new file mode 100644 index 00000000000..98f4f9cd4aa --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_call_timestamp_type.rs @@ -0,0 +1,13 @@ +// 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, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct InsertCallTimestamp {} + +impl __sdk::InModule for InsertCallTimestamp { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_call_uuid_v_4_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_call_uuid_v_4_reducer.rs index 24182ec3c30..80f8afdfc8f 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_call_uuid_v_4_reducer.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_call_uuid_v_4_reducer.rs @@ -19,11 +19,11 @@ impl __sdk::InModule for InsertCallUuidV4Args { } #[allow(non_camel_case_types)] -/// Extension trait for access to the reducer `insert_call_uuid_v4`. +/// Extension trait for access to the reducer `insert_call_uuid_v_4`. /// /// Implemented for [`super::RemoteReducers`]. pub trait insert_call_uuid_v_4 { - /// Request that the remote module invoke the reducer `insert_call_uuid_v4` to run as soon as possible. + /// Request that the remote module invoke the reducer `insert_call_uuid_v_4` 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, @@ -33,7 +33,7 @@ pub trait insert_call_uuid_v_4 { self.insert_call_uuid_v_4_then(|_, _| {}) } - /// Request that the remote module invoke the reducer `insert_call_uuid_v4` to run as soon as possible, + /// Request that the remote module invoke the reducer `insert_call_uuid_v_4` to run as soon as possible, /// registering `callback` to run when we are notified that the reducer completed. /// /// This method returns immediately, and errors only if we are unable to send the request. diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_call_uuid_v_4_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_call_uuid_v_4_type.rs new file mode 100644 index 00000000000..090ee924be3 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_call_uuid_v_4_type.rs @@ -0,0 +1,13 @@ +// 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, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct InsertCallUuidV4 {} + +impl __sdk::InModule for InsertCallUuidV4 { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_call_uuid_v_7_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_call_uuid_v_7_reducer.rs index 317efe3fb46..354f40175b6 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_call_uuid_v_7_reducer.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_call_uuid_v_7_reducer.rs @@ -19,11 +19,11 @@ impl __sdk::InModule for InsertCallUuidV7Args { } #[allow(non_camel_case_types)] -/// Extension trait for access to the reducer `insert_call_uuid_v7`. +/// Extension trait for access to the reducer `insert_call_uuid_v_7`. /// /// Implemented for [`super::RemoteReducers`]. pub trait insert_call_uuid_v_7 { - /// Request that the remote module invoke the reducer `insert_call_uuid_v7` to run as soon as possible. + /// Request that the remote module invoke the reducer `insert_call_uuid_v_7` 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, @@ -33,7 +33,7 @@ pub trait insert_call_uuid_v_7 { self.insert_call_uuid_v_7_then(|_, _| {}) } - /// Request that the remote module invoke the reducer `insert_call_uuid_v7` to run as soon as possible, + /// Request that the remote module invoke the reducer `insert_call_uuid_v_7` to run as soon as possible, /// registering `callback` to run when we are notified that the reducer completed. /// /// This method returns immediately, and errors only if we are unable to send the request. diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_call_uuid_v_7_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_call_uuid_v_7_type.rs new file mode 100644 index 00000000000..d90e27c899d --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_call_uuid_v_7_type.rs @@ -0,0 +1,13 @@ +// 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, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct InsertCallUuidV7 {} + +impl __sdk::InModule for InsertCallUuidV7 { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_caller_one_connection_id_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_caller_one_connection_id_type.rs new file mode 100644 index 00000000000..26df719f77c --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_caller_one_connection_id_type.rs @@ -0,0 +1,13 @@ +// 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, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct InsertCallerOneConnectionId {} + +impl __sdk::InModule for InsertCallerOneConnectionId { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_caller_one_identity_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_caller_one_identity_type.rs new file mode 100644 index 00000000000..e0a093cb781 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_caller_one_identity_type.rs @@ -0,0 +1,13 @@ +// 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, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct InsertCallerOneIdentity {} + +impl __sdk::InModule for InsertCallerOneIdentity { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_caller_pk_connection_id_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_caller_pk_connection_id_type.rs new file mode 100644 index 00000000000..04d74a90935 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_caller_pk_connection_id_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct InsertCallerPkConnectionId { + pub data: i32, +} + +impl __sdk::InModule for InsertCallerPkConnectionId { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_caller_pk_identity_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_caller_pk_identity_type.rs new file mode 100644 index 00000000000..f59abd53fb9 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_caller_pk_identity_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct InsertCallerPkIdentity { + pub data: i32, +} + +impl __sdk::InModule for InsertCallerPkIdentity { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_caller_unique_connection_id_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_caller_unique_connection_id_type.rs new file mode 100644 index 00000000000..33d5bd96cf1 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_caller_unique_connection_id_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct InsertCallerUniqueConnectionId { + pub data: i32, +} + +impl __sdk::InModule for InsertCallerUniqueConnectionId { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_caller_unique_identity_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_caller_unique_identity_type.rs new file mode 100644 index 00000000000..c0563c122a2 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_caller_unique_identity_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct InsertCallerUniqueIdentity { + pub data: i32, +} + +impl __sdk::InModule for InsertCallerUniqueIdentity { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_caller_vec_connection_id_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_caller_vec_connection_id_type.rs new file mode 100644 index 00000000000..d7debecc414 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_caller_vec_connection_id_type.rs @@ -0,0 +1,13 @@ +// 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, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct InsertCallerVecConnectionId {} + +impl __sdk::InModule for InsertCallerVecConnectionId { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_caller_vec_identity_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_caller_vec_identity_type.rs new file mode 100644 index 00000000000..489c9fb800e --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_caller_vec_identity_type.rs @@ -0,0 +1,13 @@ +// 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, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct InsertCallerVecIdentity {} + +impl __sdk::InModule for InsertCallerVecIdentity { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_into_btree_u_32_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_into_btree_u_32_reducer.rs index 436f8c944a9..f8cc50d96b8 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_into_btree_u_32_reducer.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_into_btree_u_32_reducer.rs @@ -23,11 +23,11 @@ impl __sdk::InModule for InsertIntoBtreeU32Args { } #[allow(non_camel_case_types)] -/// Extension trait for access to the reducer `insert_into_btree_u32`. +/// Extension trait for access to the reducer `insert_into_btree_u_32`. /// /// Implemented for [`super::RemoteReducers`]. pub trait insert_into_btree_u_32 { - /// Request that the remote module invoke the reducer `insert_into_btree_u32` to run as soon as possible. + /// Request that the remote module invoke the reducer `insert_into_btree_u_32` 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, @@ -37,7 +37,7 @@ pub trait insert_into_btree_u_32 { self.insert_into_btree_u_32_then(rows, |_, _| {}) } - /// Request that the remote module invoke the reducer `insert_into_btree_u32` to run as soon as possible, + /// Request that the remote module invoke the reducer `insert_into_btree_u_32` to run as soon as possible, /// registering `callback` to run when we are notified that the reducer completed. /// /// This method returns immediately, and errors only if we are unable to send the request. diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_into_btree_u_32_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_into_btree_u_32_type.rs new file mode 100644 index 00000000000..6681b6f5fb2 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_into_btree_u_32_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +use super::b_tree_u_32_type::BTreeU32; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct InsertIntoBtreeU32 { + pub rows: Vec, +} + +impl __sdk::InModule for InsertIntoBtreeU32 { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_into_indexed_simple_enum_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_into_indexed_simple_enum_type.rs new file mode 100644 index 00000000000..c7d443b0844 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_into_indexed_simple_enum_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +use super::simple_enum_type::SimpleEnum; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct InsertIntoIndexedSimpleEnum { + pub n: SimpleEnum, +} + +impl __sdk::InModule for InsertIntoIndexedSimpleEnum { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_into_pk_btree_u_32_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_into_pk_btree_u_32_reducer.rs index 7ff01f66a64..44d97c097d1 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_into_pk_btree_u_32_reducer.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_into_pk_btree_u_32_reducer.rs @@ -28,11 +28,11 @@ impl __sdk::InModule for InsertIntoPkBtreeU32Args { } #[allow(non_camel_case_types)] -/// Extension trait for access to the reducer `insert_into_pk_btree_u32`. +/// Extension trait for access to the reducer `insert_into_pk_btree_u_32`. /// /// Implemented for [`super::RemoteReducers`]. pub trait insert_into_pk_btree_u_32 { - /// Request that the remote module invoke the reducer `insert_into_pk_btree_u32` to run as soon as possible. + /// Request that the remote module invoke the reducer `insert_into_pk_btree_u_32` 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, @@ -42,7 +42,7 @@ pub trait insert_into_pk_btree_u_32 { self.insert_into_pk_btree_u_32_then(pk_u_32, bt_u_32, |_, _| {}) } - /// Request that the remote module invoke the reducer `insert_into_pk_btree_u32` to run as soon as possible, + /// Request that the remote module invoke the reducer `insert_into_pk_btree_u_32` to run as soon as possible, /// registering `callback` to run when we are notified that the reducer completed. /// /// This method returns immediately, and errors only if we are unable to send the request. diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_into_pk_btree_u_32_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_into_pk_btree_u_32_type.rs new file mode 100644 index 00000000000..47ef5b16bdb --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_into_pk_btree_u_32_type.rs @@ -0,0 +1,19 @@ +// 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, __lib, __sats, __ws}; + +use super::b_tree_u_32_type::BTreeU32; +use super::pk_u_32_type::PkU32; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct InsertIntoPkBtreeU32 { + pub pk_u_32: Vec, + pub bt_u_32: Vec, +} + +impl __sdk::InModule for InsertIntoPkBtreeU32 { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_large_table_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_large_table_type.rs new file mode 100644 index 00000000000..c02784cc303 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_large_table_type.rs @@ -0,0 +1,43 @@ +// 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, __lib, __sats, __ws}; + +use super::byte_struct_type::ByteStruct; +use super::enum_with_payload_type::EnumWithPayload; +use super::every_primitive_struct_type::EveryPrimitiveStruct; +use super::every_vec_struct_type::EveryVecStruct; +use super::simple_enum_type::SimpleEnum; +use super::unit_struct_type::UnitStruct; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct InsertLargeTable { + pub a: u8, + pub b: u16, + pub c: u32, + pub d: u64, + pub e: u128, + pub f: __sats::u256, + pub g: i8, + pub h: i16, + pub i: i32, + pub j: i64, + pub k: i128, + pub l: __sats::i256, + pub m: bool, + pub n: f32, + pub o: f64, + pub p: String, + pub q: SimpleEnum, + pub r: EnumWithPayload, + pub s: UnitStruct, + pub t: ByteStruct, + pub u: EveryPrimitiveStruct, + pub v: EveryVecStruct, +} + +impl __sdk::InModule for InsertLargeTable { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_one_bool_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_one_bool_type.rs new file mode 100644 index 00000000000..1a3afcc5a04 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_one_bool_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct InsertOneBool { + pub b: bool, +} + +impl __sdk::InModule for InsertOneBool { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_one_byte_struct_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_one_byte_struct_type.rs new file mode 100644 index 00000000000..e371ec6301d --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_one_byte_struct_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +use super::byte_struct_type::ByteStruct; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct InsertOneByteStruct { + pub s: ByteStruct, +} + +impl __sdk::InModule for InsertOneByteStruct { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_one_connection_id_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_one_connection_id_type.rs new file mode 100644 index 00000000000..a38c4fde5a5 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_one_connection_id_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct InsertOneConnectionId { + pub a: __sdk::ConnectionId, +} + +impl __sdk::InModule for InsertOneConnectionId { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_one_enum_with_payload_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_one_enum_with_payload_type.rs new file mode 100644 index 00000000000..443e9ebd7b2 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_one_enum_with_payload_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +use super::enum_with_payload_type::EnumWithPayload; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct InsertOneEnumWithPayload { + pub e: EnumWithPayload, +} + +impl __sdk::InModule for InsertOneEnumWithPayload { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_one_every_primitive_struct_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_one_every_primitive_struct_type.rs new file mode 100644 index 00000000000..6b57c17c6fa --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_one_every_primitive_struct_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +use super::every_primitive_struct_type::EveryPrimitiveStruct; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct InsertOneEveryPrimitiveStruct { + pub s: EveryPrimitiveStruct, +} + +impl __sdk::InModule for InsertOneEveryPrimitiveStruct { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_one_every_vec_struct_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_one_every_vec_struct_type.rs new file mode 100644 index 00000000000..407166daa95 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_one_every_vec_struct_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +use super::every_vec_struct_type::EveryVecStruct; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct InsertOneEveryVecStruct { + pub s: EveryVecStruct, +} + +impl __sdk::InModule for InsertOneEveryVecStruct { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_one_f_32_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_one_f_32_reducer.rs index 5f9192f5434..f5808344dfa 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_one_f_32_reducer.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_one_f_32_reducer.rs @@ -21,11 +21,11 @@ impl __sdk::InModule for InsertOneF32Args { } #[allow(non_camel_case_types)] -/// Extension trait for access to the reducer `insert_one_f32`. +/// Extension trait for access to the reducer `insert_one_f_32`. /// /// Implemented for [`super::RemoteReducers`]. pub trait insert_one_f_32 { - /// Request that the remote module invoke the reducer `insert_one_f32` to run as soon as possible. + /// Request that the remote module invoke the reducer `insert_one_f_32` 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, @@ -35,7 +35,7 @@ pub trait insert_one_f_32 { self.insert_one_f_32_then(f, |_, _| {}) } - /// Request that the remote module invoke the reducer `insert_one_f32` to run as soon as possible, + /// Request that the remote module invoke the reducer `insert_one_f_32` to run as soon as possible, /// registering `callback` to run when we are notified that the reducer completed. /// /// This method returns immediately, and errors only if we are unable to send the request. diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_one_f_32_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_one_f_32_type.rs new file mode 100644 index 00000000000..15ddaa7f65d --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_one_f_32_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct InsertOneF32 { + pub f: f32, +} + +impl __sdk::InModule for InsertOneF32 { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_one_f_64_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_one_f_64_reducer.rs index b19c9d37e78..fd7b5dc3a3c 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_one_f_64_reducer.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_one_f_64_reducer.rs @@ -21,11 +21,11 @@ impl __sdk::InModule for InsertOneF64Args { } #[allow(non_camel_case_types)] -/// Extension trait for access to the reducer `insert_one_f64`. +/// Extension trait for access to the reducer `insert_one_f_64`. /// /// Implemented for [`super::RemoteReducers`]. pub trait insert_one_f_64 { - /// Request that the remote module invoke the reducer `insert_one_f64` to run as soon as possible. + /// Request that the remote module invoke the reducer `insert_one_f_64` 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, @@ -35,7 +35,7 @@ pub trait insert_one_f_64 { self.insert_one_f_64_then(f, |_, _| {}) } - /// Request that the remote module invoke the reducer `insert_one_f64` to run as soon as possible, + /// Request that the remote module invoke the reducer `insert_one_f_64` to run as soon as possible, /// registering `callback` to run when we are notified that the reducer completed. /// /// This method returns immediately, and errors only if we are unable to send the request. diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_one_f_64_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_one_f_64_type.rs new file mode 100644 index 00000000000..c5ec4e4967d --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_one_f_64_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct InsertOneF64 { + pub f: f64, +} + +impl __sdk::InModule for InsertOneF64 { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_one_i_128_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_one_i_128_reducer.rs index e954ac5b316..5a943ca5fdb 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_one_i_128_reducer.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_one_i_128_reducer.rs @@ -21,11 +21,11 @@ impl __sdk::InModule for InsertOneI128Args { } #[allow(non_camel_case_types)] -/// Extension trait for access to the reducer `insert_one_i128`. +/// Extension trait for access to the reducer `insert_one_i_128`. /// /// Implemented for [`super::RemoteReducers`]. pub trait insert_one_i_128 { - /// Request that the remote module invoke the reducer `insert_one_i128` to run as soon as possible. + /// Request that the remote module invoke the reducer `insert_one_i_128` 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, @@ -35,7 +35,7 @@ pub trait insert_one_i_128 { self.insert_one_i_128_then(n, |_, _| {}) } - /// Request that the remote module invoke the reducer `insert_one_i128` to run as soon as possible, + /// Request that the remote module invoke the reducer `insert_one_i_128` to run as soon as possible, /// registering `callback` to run when we are notified that the reducer completed. /// /// This method returns immediately, and errors only if we are unable to send the request. diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_one_i_128_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_one_i_128_type.rs new file mode 100644 index 00000000000..b0097b008b9 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_one_i_128_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct InsertOneI128 { + pub n: i128, +} + +impl __sdk::InModule for InsertOneI128 { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_one_i_16_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_one_i_16_reducer.rs index 8d14db0fbdd..adf5bff881f 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_one_i_16_reducer.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_one_i_16_reducer.rs @@ -21,11 +21,11 @@ impl __sdk::InModule for InsertOneI16Args { } #[allow(non_camel_case_types)] -/// Extension trait for access to the reducer `insert_one_i16`. +/// Extension trait for access to the reducer `insert_one_i_16`. /// /// Implemented for [`super::RemoteReducers`]. pub trait insert_one_i_16 { - /// Request that the remote module invoke the reducer `insert_one_i16` to run as soon as possible. + /// Request that the remote module invoke the reducer `insert_one_i_16` 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, @@ -35,7 +35,7 @@ pub trait insert_one_i_16 { self.insert_one_i_16_then(n, |_, _| {}) } - /// Request that the remote module invoke the reducer `insert_one_i16` to run as soon as possible, + /// Request that the remote module invoke the reducer `insert_one_i_16` to run as soon as possible, /// registering `callback` to run when we are notified that the reducer completed. /// /// This method returns immediately, and errors only if we are unable to send the request. diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_one_i_16_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_one_i_16_type.rs new file mode 100644 index 00000000000..3f237155011 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_one_i_16_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct InsertOneI16 { + pub n: i16, +} + +impl __sdk::InModule for InsertOneI16 { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_one_i_256_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_one_i_256_reducer.rs index b0a1a8c5a5c..6cf1f1bf9f6 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_one_i_256_reducer.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_one_i_256_reducer.rs @@ -21,11 +21,11 @@ impl __sdk::InModule for InsertOneI256Args { } #[allow(non_camel_case_types)] -/// Extension trait for access to the reducer `insert_one_i256`. +/// Extension trait for access to the reducer `insert_one_i_256`. /// /// Implemented for [`super::RemoteReducers`]. pub trait insert_one_i_256 { - /// Request that the remote module invoke the reducer `insert_one_i256` to run as soon as possible. + /// Request that the remote module invoke the reducer `insert_one_i_256` 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, @@ -35,7 +35,7 @@ pub trait insert_one_i_256 { self.insert_one_i_256_then(n, |_, _| {}) } - /// Request that the remote module invoke the reducer `insert_one_i256` to run as soon as possible, + /// Request that the remote module invoke the reducer `insert_one_i_256` to run as soon as possible, /// registering `callback` to run when we are notified that the reducer completed. /// /// This method returns immediately, and errors only if we are unable to send the request. diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_one_i_256_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_one_i_256_type.rs new file mode 100644 index 00000000000..b80e4bfa571 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_one_i_256_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct InsertOneI256 { + pub n: __sats::i256, +} + +impl __sdk::InModule for InsertOneI256 { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_one_i_32_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_one_i_32_reducer.rs index bbb694e0cba..fde2b8a6b70 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_one_i_32_reducer.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_one_i_32_reducer.rs @@ -21,11 +21,11 @@ impl __sdk::InModule for InsertOneI32Args { } #[allow(non_camel_case_types)] -/// Extension trait for access to the reducer `insert_one_i32`. +/// Extension trait for access to the reducer `insert_one_i_32`. /// /// Implemented for [`super::RemoteReducers`]. pub trait insert_one_i_32 { - /// Request that the remote module invoke the reducer `insert_one_i32` to run as soon as possible. + /// Request that the remote module invoke the reducer `insert_one_i_32` 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, @@ -35,7 +35,7 @@ pub trait insert_one_i_32 { self.insert_one_i_32_then(n, |_, _| {}) } - /// Request that the remote module invoke the reducer `insert_one_i32` to run as soon as possible, + /// Request that the remote module invoke the reducer `insert_one_i_32` to run as soon as possible, /// registering `callback` to run when we are notified that the reducer completed. /// /// This method returns immediately, and errors only if we are unable to send the request. diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_one_i_32_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_one_i_32_type.rs new file mode 100644 index 00000000000..2fc8816959f --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_one_i_32_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct InsertOneI32 { + pub n: i32, +} + +impl __sdk::InModule for InsertOneI32 { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_one_i_64_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_one_i_64_reducer.rs index e61c7915b43..7e19eb7f9a2 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_one_i_64_reducer.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_one_i_64_reducer.rs @@ -21,11 +21,11 @@ impl __sdk::InModule for InsertOneI64Args { } #[allow(non_camel_case_types)] -/// Extension trait for access to the reducer `insert_one_i64`. +/// Extension trait for access to the reducer `insert_one_i_64`. /// /// Implemented for [`super::RemoteReducers`]. pub trait insert_one_i_64 { - /// Request that the remote module invoke the reducer `insert_one_i64` to run as soon as possible. + /// Request that the remote module invoke the reducer `insert_one_i_64` 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, @@ -35,7 +35,7 @@ pub trait insert_one_i_64 { self.insert_one_i_64_then(n, |_, _| {}) } - /// Request that the remote module invoke the reducer `insert_one_i64` to run as soon as possible, + /// Request that the remote module invoke the reducer `insert_one_i_64` to run as soon as possible, /// registering `callback` to run when we are notified that the reducer completed. /// /// This method returns immediately, and errors only if we are unable to send the request. diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_one_i_64_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_one_i_64_type.rs new file mode 100644 index 00000000000..89b4108c8c7 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_one_i_64_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct InsertOneI64 { + pub n: i64, +} + +impl __sdk::InModule for InsertOneI64 { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_one_i_8_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_one_i_8_reducer.rs index 8ac6dc9e99c..c7435966950 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_one_i_8_reducer.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_one_i_8_reducer.rs @@ -21,11 +21,11 @@ impl __sdk::InModule for InsertOneI8Args { } #[allow(non_camel_case_types)] -/// Extension trait for access to the reducer `insert_one_i8`. +/// Extension trait for access to the reducer `insert_one_i_8`. /// /// Implemented for [`super::RemoteReducers`]. pub trait insert_one_i_8 { - /// Request that the remote module invoke the reducer `insert_one_i8` to run as soon as possible. + /// Request that the remote module invoke the reducer `insert_one_i_8` 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, @@ -35,7 +35,7 @@ pub trait insert_one_i_8 { self.insert_one_i_8_then(n, |_, _| {}) } - /// Request that the remote module invoke the reducer `insert_one_i8` to run as soon as possible, + /// Request that the remote module invoke the reducer `insert_one_i_8` to run as soon as possible, /// registering `callback` to run when we are notified that the reducer completed. /// /// This method returns immediately, and errors only if we are unable to send the request. diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_one_i_8_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_one_i_8_type.rs new file mode 100644 index 00000000000..7ef8f5e0ce0 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_one_i_8_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct InsertOneI8 { + pub n: i8, +} + +impl __sdk::InModule for InsertOneI8 { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_one_identity_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_one_identity_type.rs new file mode 100644 index 00000000000..d0a6bf3b47f --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_one_identity_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct InsertOneIdentity { + pub i: __sdk::Identity, +} + +impl __sdk::InModule for InsertOneIdentity { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_one_simple_enum_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_one_simple_enum_type.rs new file mode 100644 index 00000000000..2445985e977 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_one_simple_enum_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +use super::simple_enum_type::SimpleEnum; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct InsertOneSimpleEnum { + pub e: SimpleEnum, +} + +impl __sdk::InModule for InsertOneSimpleEnum { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_one_string_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_one_string_type.rs new file mode 100644 index 00000000000..1bfe7f42517 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_one_string_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct InsertOneString { + pub s: String, +} + +impl __sdk::InModule for InsertOneString { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_one_timestamp_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_one_timestamp_type.rs new file mode 100644 index 00000000000..6e5430e89b8 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_one_timestamp_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct InsertOneTimestamp { + pub t: __sdk::Timestamp, +} + +impl __sdk::InModule for InsertOneTimestamp { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_one_u_128_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_one_u_128_reducer.rs index fd7f9287df3..ef1adf709e9 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_one_u_128_reducer.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_one_u_128_reducer.rs @@ -21,11 +21,11 @@ impl __sdk::InModule for InsertOneU128Args { } #[allow(non_camel_case_types)] -/// Extension trait for access to the reducer `insert_one_u128`. +/// Extension trait for access to the reducer `insert_one_u_128`. /// /// Implemented for [`super::RemoteReducers`]. pub trait insert_one_u_128 { - /// Request that the remote module invoke the reducer `insert_one_u128` to run as soon as possible. + /// Request that the remote module invoke the reducer `insert_one_u_128` 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, @@ -35,7 +35,7 @@ pub trait insert_one_u_128 { self.insert_one_u_128_then(n, |_, _| {}) } - /// Request that the remote module invoke the reducer `insert_one_u128` to run as soon as possible, + /// Request that the remote module invoke the reducer `insert_one_u_128` to run as soon as possible, /// registering `callback` to run when we are notified that the reducer completed. /// /// This method returns immediately, and errors only if we are unable to send the request. diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_one_u_128_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_one_u_128_type.rs new file mode 100644 index 00000000000..28f7eced79e --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_one_u_128_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct InsertOneU128 { + pub n: u128, +} + +impl __sdk::InModule for InsertOneU128 { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_one_u_16_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_one_u_16_reducer.rs index 3f0cce607c6..92c4dd5b88b 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_one_u_16_reducer.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_one_u_16_reducer.rs @@ -21,11 +21,11 @@ impl __sdk::InModule for InsertOneU16Args { } #[allow(non_camel_case_types)] -/// Extension trait for access to the reducer `insert_one_u16`. +/// Extension trait for access to the reducer `insert_one_u_16`. /// /// Implemented for [`super::RemoteReducers`]. pub trait insert_one_u_16 { - /// Request that the remote module invoke the reducer `insert_one_u16` to run as soon as possible. + /// Request that the remote module invoke the reducer `insert_one_u_16` 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, @@ -35,7 +35,7 @@ pub trait insert_one_u_16 { self.insert_one_u_16_then(n, |_, _| {}) } - /// Request that the remote module invoke the reducer `insert_one_u16` to run as soon as possible, + /// Request that the remote module invoke the reducer `insert_one_u_16` to run as soon as possible, /// registering `callback` to run when we are notified that the reducer completed. /// /// This method returns immediately, and errors only if we are unable to send the request. diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_one_u_16_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_one_u_16_type.rs new file mode 100644 index 00000000000..759fd392731 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_one_u_16_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct InsertOneU16 { + pub n: u16, +} + +impl __sdk::InModule for InsertOneU16 { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_one_u_256_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_one_u_256_reducer.rs index f7940b61fff..c364d209aea 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_one_u_256_reducer.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_one_u_256_reducer.rs @@ -21,11 +21,11 @@ impl __sdk::InModule for InsertOneU256Args { } #[allow(non_camel_case_types)] -/// Extension trait for access to the reducer `insert_one_u256`. +/// Extension trait for access to the reducer `insert_one_u_256`. /// /// Implemented for [`super::RemoteReducers`]. pub trait insert_one_u_256 { - /// Request that the remote module invoke the reducer `insert_one_u256` to run as soon as possible. + /// Request that the remote module invoke the reducer `insert_one_u_256` 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, @@ -35,7 +35,7 @@ pub trait insert_one_u_256 { self.insert_one_u_256_then(n, |_, _| {}) } - /// Request that the remote module invoke the reducer `insert_one_u256` to run as soon as possible, + /// Request that the remote module invoke the reducer `insert_one_u_256` to run as soon as possible, /// registering `callback` to run when we are notified that the reducer completed. /// /// This method returns immediately, and errors only if we are unable to send the request. diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_one_u_256_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_one_u_256_type.rs new file mode 100644 index 00000000000..0c9c54c122e --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_one_u_256_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct InsertOneU256 { + pub n: __sats::u256, +} + +impl __sdk::InModule for InsertOneU256 { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_one_u_32_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_one_u_32_reducer.rs index 5e471d6a573..47a73260a96 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_one_u_32_reducer.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_one_u_32_reducer.rs @@ -21,11 +21,11 @@ impl __sdk::InModule for InsertOneU32Args { } #[allow(non_camel_case_types)] -/// Extension trait for access to the reducer `insert_one_u32`. +/// Extension trait for access to the reducer `insert_one_u_32`. /// /// Implemented for [`super::RemoteReducers`]. pub trait insert_one_u_32 { - /// Request that the remote module invoke the reducer `insert_one_u32` to run as soon as possible. + /// Request that the remote module invoke the reducer `insert_one_u_32` 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, @@ -35,7 +35,7 @@ pub trait insert_one_u_32 { self.insert_one_u_32_then(n, |_, _| {}) } - /// Request that the remote module invoke the reducer `insert_one_u32` to run as soon as possible, + /// Request that the remote module invoke the reducer `insert_one_u_32` to run as soon as possible, /// registering `callback` to run when we are notified that the reducer completed. /// /// This method returns immediately, and errors only if we are unable to send the request. diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_one_u_32_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_one_u_32_type.rs new file mode 100644 index 00000000000..f2657007940 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_one_u_32_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct InsertOneU32 { + pub n: u32, +} + +impl __sdk::InModule for InsertOneU32 { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_one_u_64_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_one_u_64_reducer.rs index f530981f0b0..e13129ee9d5 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_one_u_64_reducer.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_one_u_64_reducer.rs @@ -21,11 +21,11 @@ impl __sdk::InModule for InsertOneU64Args { } #[allow(non_camel_case_types)] -/// Extension trait for access to the reducer `insert_one_u64`. +/// Extension trait for access to the reducer `insert_one_u_64`. /// /// Implemented for [`super::RemoteReducers`]. pub trait insert_one_u_64 { - /// Request that the remote module invoke the reducer `insert_one_u64` to run as soon as possible. + /// Request that the remote module invoke the reducer `insert_one_u_64` 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, @@ -35,7 +35,7 @@ pub trait insert_one_u_64 { self.insert_one_u_64_then(n, |_, _| {}) } - /// Request that the remote module invoke the reducer `insert_one_u64` to run as soon as possible, + /// Request that the remote module invoke the reducer `insert_one_u_64` to run as soon as possible, /// registering `callback` to run when we are notified that the reducer completed. /// /// This method returns immediately, and errors only if we are unable to send the request. diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_one_u_64_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_one_u_64_type.rs new file mode 100644 index 00000000000..a1f29796fc4 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_one_u_64_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct InsertOneU64 { + pub n: u64, +} + +impl __sdk::InModule for InsertOneU64 { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_one_u_8_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_one_u_8_reducer.rs index 131fb49f20b..8a48909c164 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_one_u_8_reducer.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_one_u_8_reducer.rs @@ -21,11 +21,11 @@ impl __sdk::InModule for InsertOneU8Args { } #[allow(non_camel_case_types)] -/// Extension trait for access to the reducer `insert_one_u8`. +/// Extension trait for access to the reducer `insert_one_u_8`. /// /// Implemented for [`super::RemoteReducers`]. pub trait insert_one_u_8 { - /// Request that the remote module invoke the reducer `insert_one_u8` to run as soon as possible. + /// Request that the remote module invoke the reducer `insert_one_u_8` 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, @@ -35,7 +35,7 @@ pub trait insert_one_u_8 { self.insert_one_u_8_then(n, |_, _| {}) } - /// Request that the remote module invoke the reducer `insert_one_u8` to run as soon as possible, + /// Request that the remote module invoke the reducer `insert_one_u_8` to run as soon as possible, /// registering `callback` to run when we are notified that the reducer completed. /// /// This method returns immediately, and errors only if we are unable to send the request. diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_one_u_8_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_one_u_8_type.rs new file mode 100644 index 00000000000..5bbdc292c7b --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_one_u_8_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct InsertOneU8 { + pub n: u8, +} + +impl __sdk::InModule for InsertOneU8 { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_one_unit_struct_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_one_unit_struct_type.rs new file mode 100644 index 00000000000..974dfa5365c --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_one_unit_struct_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +use super::unit_struct_type::UnitStruct; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct InsertOneUnitStruct { + pub s: UnitStruct, +} + +impl __sdk::InModule for InsertOneUnitStruct { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_one_uuid_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_one_uuid_type.rs new file mode 100644 index 00000000000..731261b1d32 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_one_uuid_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct InsertOneUuid { + pub u: __sdk::Uuid, +} + +impl __sdk::InModule for InsertOneUuid { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_option_every_primitive_struct_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_option_every_primitive_struct_type.rs new file mode 100644 index 00000000000..f60217340f0 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_option_every_primitive_struct_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +use super::every_primitive_struct_type::EveryPrimitiveStruct; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct InsertOptionEveryPrimitiveStruct { + pub s: Option, +} + +impl __sdk::InModule for InsertOptionEveryPrimitiveStruct { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_option_i_32_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_option_i_32_reducer.rs index d03f0629e6d..a7cff1942b9 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_option_i_32_reducer.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_option_i_32_reducer.rs @@ -21,11 +21,11 @@ impl __sdk::InModule for InsertOptionI32Args { } #[allow(non_camel_case_types)] -/// Extension trait for access to the reducer `insert_option_i32`. +/// Extension trait for access to the reducer `insert_option_i_32`. /// /// Implemented for [`super::RemoteReducers`]. pub trait insert_option_i_32 { - /// Request that the remote module invoke the reducer `insert_option_i32` to run as soon as possible. + /// Request that the remote module invoke the reducer `insert_option_i_32` 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, @@ -35,7 +35,7 @@ pub trait insert_option_i_32 { self.insert_option_i_32_then(n, |_, _| {}) } - /// Request that the remote module invoke the reducer `insert_option_i32` to run as soon as possible, + /// Request that the remote module invoke the reducer `insert_option_i_32` to run as soon as possible, /// registering `callback` to run when we are notified that the reducer completed. /// /// This method returns immediately, and errors only if we are unable to send the request. diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_option_i_32_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_option_i_32_type.rs new file mode 100644 index 00000000000..3f9bc081304 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_option_i_32_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct InsertOptionI32 { + pub n: Option, +} + +impl __sdk::InModule for InsertOptionI32 { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_option_identity_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_option_identity_type.rs new file mode 100644 index 00000000000..e1905a198e5 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_option_identity_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct InsertOptionIdentity { + pub i: Option<__sdk::Identity>, +} + +impl __sdk::InModule for InsertOptionIdentity { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_option_simple_enum_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_option_simple_enum_type.rs new file mode 100644 index 00000000000..c56962d238d --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_option_simple_enum_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +use super::simple_enum_type::SimpleEnum; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct InsertOptionSimpleEnum { + pub e: Option, +} + +impl __sdk::InModule for InsertOptionSimpleEnum { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_option_string_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_option_string_type.rs new file mode 100644 index 00000000000..83bf2589b25 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_option_string_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct InsertOptionString { + pub s: Option, +} + +impl __sdk::InModule for InsertOptionString { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_option_uuid_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_option_uuid_type.rs new file mode 100644 index 00000000000..a5384c296d9 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_option_uuid_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct InsertOptionUuid { + pub u: Option<__sdk::Uuid>, +} + +impl __sdk::InModule for InsertOptionUuid { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_option_vec_option_i_32_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_option_vec_option_i_32_reducer.rs index 68653b89d6e..17c031ed031 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_option_vec_option_i_32_reducer.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_option_vec_option_i_32_reducer.rs @@ -21,11 +21,11 @@ impl __sdk::InModule for InsertOptionVecOptionI32Args { } #[allow(non_camel_case_types)] -/// Extension trait for access to the reducer `insert_option_vec_option_i32`. +/// Extension trait for access to the reducer `insert_option_vec_option_i_32`. /// /// Implemented for [`super::RemoteReducers`]. pub trait insert_option_vec_option_i_32 { - /// Request that the remote module invoke the reducer `insert_option_vec_option_i32` to run as soon as possible. + /// Request that the remote module invoke the reducer `insert_option_vec_option_i_32` 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, @@ -35,7 +35,7 @@ pub trait insert_option_vec_option_i_32 { self.insert_option_vec_option_i_32_then(v, |_, _| {}) } - /// Request that the remote module invoke the reducer `insert_option_vec_option_i32` to run as soon as possible, + /// Request that the remote module invoke the reducer `insert_option_vec_option_i_32` to run as soon as possible, /// registering `callback` to run when we are notified that the reducer completed. /// /// This method returns immediately, and errors only if we are unable to send the request. diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_option_vec_option_i_32_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_option_vec_option_i_32_type.rs new file mode 100644 index 00000000000..6dbefbc60f9 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_option_vec_option_i_32_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct InsertOptionVecOptionI32 { + pub v: Option>>, +} + +impl __sdk::InModule for InsertOptionVecOptionI32 { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_pk_bool_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_pk_bool_type.rs new file mode 100644 index 00000000000..24f11832cbd --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_pk_bool_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct InsertPkBool { + pub b: bool, + pub data: i32, +} + +impl __sdk::InModule for InsertPkBool { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_pk_connection_id_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_pk_connection_id_type.rs new file mode 100644 index 00000000000..05e36b85eb2 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_pk_connection_id_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct InsertPkConnectionId { + pub a: __sdk::ConnectionId, + pub data: i32, +} + +impl __sdk::InModule for InsertPkConnectionId { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_pk_i_128_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_pk_i_128_reducer.rs index 98c0c94da67..8574ba3791a 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_pk_i_128_reducer.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_pk_i_128_reducer.rs @@ -25,11 +25,11 @@ impl __sdk::InModule for InsertPkI128Args { } #[allow(non_camel_case_types)] -/// Extension trait for access to the reducer `insert_pk_i128`. +/// Extension trait for access to the reducer `insert_pk_i_128`. /// /// Implemented for [`super::RemoteReducers`]. pub trait insert_pk_i_128 { - /// Request that the remote module invoke the reducer `insert_pk_i128` to run as soon as possible. + /// Request that the remote module invoke the reducer `insert_pk_i_128` 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, @@ -39,7 +39,7 @@ pub trait insert_pk_i_128 { self.insert_pk_i_128_then(n, data, |_, _| {}) } - /// Request that the remote module invoke the reducer `insert_pk_i128` to run as soon as possible, + /// Request that the remote module invoke the reducer `insert_pk_i_128` to run as soon as possible, /// registering `callback` to run when we are notified that the reducer completed. /// /// This method returns immediately, and errors only if we are unable to send the request. diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_pk_i_128_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_pk_i_128_type.rs new file mode 100644 index 00000000000..72835f5051f --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_pk_i_128_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct InsertPkI128 { + pub n: i128, + pub data: i32, +} + +impl __sdk::InModule for InsertPkI128 { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_pk_i_16_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_pk_i_16_reducer.rs index 7bda0477563..44f591b555a 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_pk_i_16_reducer.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_pk_i_16_reducer.rs @@ -25,11 +25,11 @@ impl __sdk::InModule for InsertPkI16Args { } #[allow(non_camel_case_types)] -/// Extension trait for access to the reducer `insert_pk_i16`. +/// Extension trait for access to the reducer `insert_pk_i_16`. /// /// Implemented for [`super::RemoteReducers`]. pub trait insert_pk_i_16 { - /// Request that the remote module invoke the reducer `insert_pk_i16` to run as soon as possible. + /// Request that the remote module invoke the reducer `insert_pk_i_16` 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, @@ -39,7 +39,7 @@ pub trait insert_pk_i_16 { self.insert_pk_i_16_then(n, data, |_, _| {}) } - /// Request that the remote module invoke the reducer `insert_pk_i16` to run as soon as possible, + /// Request that the remote module invoke the reducer `insert_pk_i_16` to run as soon as possible, /// registering `callback` to run when we are notified that the reducer completed. /// /// This method returns immediately, and errors only if we are unable to send the request. diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_pk_i_16_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_pk_i_16_type.rs new file mode 100644 index 00000000000..fbd68331f95 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_pk_i_16_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct InsertPkI16 { + pub n: i16, + pub data: i32, +} + +impl __sdk::InModule for InsertPkI16 { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_pk_i_256_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_pk_i_256_reducer.rs index f6791281a55..39694d339d4 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_pk_i_256_reducer.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_pk_i_256_reducer.rs @@ -25,11 +25,11 @@ impl __sdk::InModule for InsertPkI256Args { } #[allow(non_camel_case_types)] -/// Extension trait for access to the reducer `insert_pk_i256`. +/// Extension trait for access to the reducer `insert_pk_i_256`. /// /// Implemented for [`super::RemoteReducers`]. pub trait insert_pk_i_256 { - /// Request that the remote module invoke the reducer `insert_pk_i256` to run as soon as possible. + /// Request that the remote module invoke the reducer `insert_pk_i_256` 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, @@ -39,7 +39,7 @@ pub trait insert_pk_i_256 { self.insert_pk_i_256_then(n, data, |_, _| {}) } - /// Request that the remote module invoke the reducer `insert_pk_i256` to run as soon as possible, + /// Request that the remote module invoke the reducer `insert_pk_i_256` to run as soon as possible, /// registering `callback` to run when we are notified that the reducer completed. /// /// This method returns immediately, and errors only if we are unable to send the request. diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_pk_i_256_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_pk_i_256_type.rs new file mode 100644 index 00000000000..dacb918ad47 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_pk_i_256_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct InsertPkI256 { + pub n: __sats::i256, + pub data: i32, +} + +impl __sdk::InModule for InsertPkI256 { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_pk_i_32_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_pk_i_32_reducer.rs index e9399015076..b159a60c34c 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_pk_i_32_reducer.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_pk_i_32_reducer.rs @@ -25,11 +25,11 @@ impl __sdk::InModule for InsertPkI32Args { } #[allow(non_camel_case_types)] -/// Extension trait for access to the reducer `insert_pk_i32`. +/// Extension trait for access to the reducer `insert_pk_i_32`. /// /// Implemented for [`super::RemoteReducers`]. pub trait insert_pk_i_32 { - /// Request that the remote module invoke the reducer `insert_pk_i32` to run as soon as possible. + /// Request that the remote module invoke the reducer `insert_pk_i_32` 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, @@ -39,7 +39,7 @@ pub trait insert_pk_i_32 { self.insert_pk_i_32_then(n, data, |_, _| {}) } - /// Request that the remote module invoke the reducer `insert_pk_i32` to run as soon as possible, + /// Request that the remote module invoke the reducer `insert_pk_i_32` to run as soon as possible, /// registering `callback` to run when we are notified that the reducer completed. /// /// This method returns immediately, and errors only if we are unable to send the request. diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_pk_i_32_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_pk_i_32_type.rs new file mode 100644 index 00000000000..c2a05f196fc --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_pk_i_32_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct InsertPkI32 { + pub n: i32, + pub data: i32, +} + +impl __sdk::InModule for InsertPkI32 { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_pk_i_64_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_pk_i_64_reducer.rs index c7632d344cc..0dcb42e4076 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_pk_i_64_reducer.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_pk_i_64_reducer.rs @@ -25,11 +25,11 @@ impl __sdk::InModule for InsertPkI64Args { } #[allow(non_camel_case_types)] -/// Extension trait for access to the reducer `insert_pk_i64`. +/// Extension trait for access to the reducer `insert_pk_i_64`. /// /// Implemented for [`super::RemoteReducers`]. pub trait insert_pk_i_64 { - /// Request that the remote module invoke the reducer `insert_pk_i64` to run as soon as possible. + /// Request that the remote module invoke the reducer `insert_pk_i_64` 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, @@ -39,7 +39,7 @@ pub trait insert_pk_i_64 { self.insert_pk_i_64_then(n, data, |_, _| {}) } - /// Request that the remote module invoke the reducer `insert_pk_i64` to run as soon as possible, + /// Request that the remote module invoke the reducer `insert_pk_i_64` to run as soon as possible, /// registering `callback` to run when we are notified that the reducer completed. /// /// This method returns immediately, and errors only if we are unable to send the request. diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_pk_i_64_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_pk_i_64_type.rs new file mode 100644 index 00000000000..43a41c37afb --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_pk_i_64_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct InsertPkI64 { + pub n: i64, + pub data: i32, +} + +impl __sdk::InModule for InsertPkI64 { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_pk_i_8_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_pk_i_8_reducer.rs index 490b3982cfb..9ecb82e5e00 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_pk_i_8_reducer.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_pk_i_8_reducer.rs @@ -25,11 +25,11 @@ impl __sdk::InModule for InsertPkI8Args { } #[allow(non_camel_case_types)] -/// Extension trait for access to the reducer `insert_pk_i8`. +/// Extension trait for access to the reducer `insert_pk_i_8`. /// /// Implemented for [`super::RemoteReducers`]. pub trait insert_pk_i_8 { - /// Request that the remote module invoke the reducer `insert_pk_i8` to run as soon as possible. + /// Request that the remote module invoke the reducer `insert_pk_i_8` 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, @@ -39,7 +39,7 @@ pub trait insert_pk_i_8 { self.insert_pk_i_8_then(n, data, |_, _| {}) } - /// Request that the remote module invoke the reducer `insert_pk_i8` to run as soon as possible, + /// Request that the remote module invoke the reducer `insert_pk_i_8` to run as soon as possible, /// registering `callback` to run when we are notified that the reducer completed. /// /// This method returns immediately, and errors only if we are unable to send the request. diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_pk_i_8_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_pk_i_8_type.rs new file mode 100644 index 00000000000..4368e4d415f --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_pk_i_8_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct InsertPkI8 { + pub n: i8, + pub data: i32, +} + +impl __sdk::InModule for InsertPkI8 { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_pk_identity_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_pk_identity_type.rs new file mode 100644 index 00000000000..6c0ea63c0a4 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_pk_identity_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct InsertPkIdentity { + pub i: __sdk::Identity, + pub data: i32, +} + +impl __sdk::InModule for InsertPkIdentity { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_pk_simple_enum_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_pk_simple_enum_type.rs new file mode 100644 index 00000000000..b05b80fbd5d --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_pk_simple_enum_type.rs @@ -0,0 +1,18 @@ +// 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, __lib, __sats, __ws}; + +use super::simple_enum_type::SimpleEnum; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct InsertPkSimpleEnum { + pub a: SimpleEnum, + pub data: i32, +} + +impl __sdk::InModule for InsertPkSimpleEnum { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_pk_string_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_pk_string_type.rs new file mode 100644 index 00000000000..e844b460bb4 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_pk_string_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct InsertPkString { + pub s: String, + pub data: i32, +} + +impl __sdk::InModule for InsertPkString { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_pk_u_128_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_pk_u_128_reducer.rs index afc73ba5f66..7553dfc0933 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_pk_u_128_reducer.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_pk_u_128_reducer.rs @@ -25,11 +25,11 @@ impl __sdk::InModule for InsertPkU128Args { } #[allow(non_camel_case_types)] -/// Extension trait for access to the reducer `insert_pk_u128`. +/// Extension trait for access to the reducer `insert_pk_u_128`. /// /// Implemented for [`super::RemoteReducers`]. pub trait insert_pk_u_128 { - /// Request that the remote module invoke the reducer `insert_pk_u128` to run as soon as possible. + /// Request that the remote module invoke the reducer `insert_pk_u_128` 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, @@ -39,7 +39,7 @@ pub trait insert_pk_u_128 { self.insert_pk_u_128_then(n, data, |_, _| {}) } - /// Request that the remote module invoke the reducer `insert_pk_u128` to run as soon as possible, + /// Request that the remote module invoke the reducer `insert_pk_u_128` to run as soon as possible, /// registering `callback` to run when we are notified that the reducer completed. /// /// This method returns immediately, and errors only if we are unable to send the request. diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_pk_u_128_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_pk_u_128_type.rs new file mode 100644 index 00000000000..0638d755b1e --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_pk_u_128_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct InsertPkU128 { + pub n: u128, + pub data: i32, +} + +impl __sdk::InModule for InsertPkU128 { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_pk_u_16_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_pk_u_16_reducer.rs index 47a0e21f080..85d1beff527 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_pk_u_16_reducer.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_pk_u_16_reducer.rs @@ -25,11 +25,11 @@ impl __sdk::InModule for InsertPkU16Args { } #[allow(non_camel_case_types)] -/// Extension trait for access to the reducer `insert_pk_u16`. +/// Extension trait for access to the reducer `insert_pk_u_16`. /// /// Implemented for [`super::RemoteReducers`]. pub trait insert_pk_u_16 { - /// Request that the remote module invoke the reducer `insert_pk_u16` to run as soon as possible. + /// Request that the remote module invoke the reducer `insert_pk_u_16` 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, @@ -39,7 +39,7 @@ pub trait insert_pk_u_16 { self.insert_pk_u_16_then(n, data, |_, _| {}) } - /// Request that the remote module invoke the reducer `insert_pk_u16` to run as soon as possible, + /// Request that the remote module invoke the reducer `insert_pk_u_16` to run as soon as possible, /// registering `callback` to run when we are notified that the reducer completed. /// /// This method returns immediately, and errors only if we are unable to send the request. diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_pk_u_16_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_pk_u_16_type.rs new file mode 100644 index 00000000000..b3165e7e9b1 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_pk_u_16_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct InsertPkU16 { + pub n: u16, + pub data: i32, +} + +impl __sdk::InModule for InsertPkU16 { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_pk_u_256_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_pk_u_256_reducer.rs index 76c37aa6849..c1f3b1c385f 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_pk_u_256_reducer.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_pk_u_256_reducer.rs @@ -25,11 +25,11 @@ impl __sdk::InModule for InsertPkU256Args { } #[allow(non_camel_case_types)] -/// Extension trait for access to the reducer `insert_pk_u256`. +/// Extension trait for access to the reducer `insert_pk_u_256`. /// /// Implemented for [`super::RemoteReducers`]. pub trait insert_pk_u_256 { - /// Request that the remote module invoke the reducer `insert_pk_u256` to run as soon as possible. + /// Request that the remote module invoke the reducer `insert_pk_u_256` 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, @@ -39,7 +39,7 @@ pub trait insert_pk_u_256 { self.insert_pk_u_256_then(n, data, |_, _| {}) } - /// Request that the remote module invoke the reducer `insert_pk_u256` to run as soon as possible, + /// Request that the remote module invoke the reducer `insert_pk_u_256` to run as soon as possible, /// registering `callback` to run when we are notified that the reducer completed. /// /// This method returns immediately, and errors only if we are unable to send the request. diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_pk_u_256_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_pk_u_256_type.rs new file mode 100644 index 00000000000..998fecf517a --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_pk_u_256_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct InsertPkU256 { + pub n: __sats::u256, + pub data: i32, +} + +impl __sdk::InModule for InsertPkU256 { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_pk_u_32_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_pk_u_32_reducer.rs index 2c0e49269c0..e995b04c589 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_pk_u_32_reducer.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_pk_u_32_reducer.rs @@ -25,11 +25,11 @@ impl __sdk::InModule for InsertPkU32Args { } #[allow(non_camel_case_types)] -/// Extension trait for access to the reducer `insert_pk_u32`. +/// Extension trait for access to the reducer `insert_pk_u_32`. /// /// Implemented for [`super::RemoteReducers`]. pub trait insert_pk_u_32 { - /// Request that the remote module invoke the reducer `insert_pk_u32` to run as soon as possible. + /// Request that the remote module invoke the reducer `insert_pk_u_32` 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, @@ -39,7 +39,7 @@ pub trait insert_pk_u_32 { self.insert_pk_u_32_then(n, data, |_, _| {}) } - /// Request that the remote module invoke the reducer `insert_pk_u32` to run as soon as possible, + /// Request that the remote module invoke the reducer `insert_pk_u_32` to run as soon as possible, /// registering `callback` to run when we are notified that the reducer completed. /// /// This method returns immediately, and errors only if we are unable to send the request. diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_pk_u_32_two_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_pk_u_32_two_reducer.rs index 12e5aa21888..7919912b9b8 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_pk_u_32_two_reducer.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_pk_u_32_two_reducer.rs @@ -25,11 +25,11 @@ impl __sdk::InModule for InsertPkU32TwoArgs { } #[allow(non_camel_case_types)] -/// Extension trait for access to the reducer `insert_pk_u32_two`. +/// Extension trait for access to the reducer `insert_pk_u_32_two`. /// /// Implemented for [`super::RemoteReducers`]. pub trait insert_pk_u_32_two { - /// Request that the remote module invoke the reducer `insert_pk_u32_two` to run as soon as possible. + /// Request that the remote module invoke the reducer `insert_pk_u_32_two` 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, @@ -39,7 +39,7 @@ pub trait insert_pk_u_32_two { self.insert_pk_u_32_two_then(n, data, |_, _| {}) } - /// Request that the remote module invoke the reducer `insert_pk_u32_two` to run as soon as possible, + /// Request that the remote module invoke the reducer `insert_pk_u_32_two` to run as soon as possible, /// registering `callback` to run when we are notified that the reducer completed. /// /// This method returns immediately, and errors only if we are unable to send the request. diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_pk_u_32_two_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_pk_u_32_two_type.rs new file mode 100644 index 00000000000..5e950641ae1 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_pk_u_32_two_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct InsertPkU32Two { + pub n: u32, + pub data: i32, +} + +impl __sdk::InModule for InsertPkU32Two { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_pk_u_32_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_pk_u_32_type.rs new file mode 100644 index 00000000000..2fc788f30e0 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_pk_u_32_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct InsertPkU32 { + pub n: u32, + pub data: i32, +} + +impl __sdk::InModule for InsertPkU32 { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_pk_u_64_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_pk_u_64_reducer.rs index 62385500214..c8c610f9f5b 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_pk_u_64_reducer.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_pk_u_64_reducer.rs @@ -25,11 +25,11 @@ impl __sdk::InModule for InsertPkU64Args { } #[allow(non_camel_case_types)] -/// Extension trait for access to the reducer `insert_pk_u64`. +/// Extension trait for access to the reducer `insert_pk_u_64`. /// /// Implemented for [`super::RemoteReducers`]. pub trait insert_pk_u_64 { - /// Request that the remote module invoke the reducer `insert_pk_u64` to run as soon as possible. + /// Request that the remote module invoke the reducer `insert_pk_u_64` 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, @@ -39,7 +39,7 @@ pub trait insert_pk_u_64 { self.insert_pk_u_64_then(n, data, |_, _| {}) } - /// Request that the remote module invoke the reducer `insert_pk_u64` to run as soon as possible, + /// Request that the remote module invoke the reducer `insert_pk_u_64` to run as soon as possible, /// registering `callback` to run when we are notified that the reducer completed. /// /// This method returns immediately, and errors only if we are unable to send the request. diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_pk_u_64_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_pk_u_64_type.rs new file mode 100644 index 00000000000..c8ed6b75bbb --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_pk_u_64_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct InsertPkU64 { + pub n: u64, + pub data: i32, +} + +impl __sdk::InModule for InsertPkU64 { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_pk_u_8_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_pk_u_8_reducer.rs index 5978af3dde0..5cc27b447a6 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_pk_u_8_reducer.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_pk_u_8_reducer.rs @@ -25,11 +25,11 @@ impl __sdk::InModule for InsertPkU8Args { } #[allow(non_camel_case_types)] -/// Extension trait for access to the reducer `insert_pk_u8`. +/// Extension trait for access to the reducer `insert_pk_u_8`. /// /// Implemented for [`super::RemoteReducers`]. pub trait insert_pk_u_8 { - /// Request that the remote module invoke the reducer `insert_pk_u8` to run as soon as possible. + /// Request that the remote module invoke the reducer `insert_pk_u_8` 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, @@ -39,7 +39,7 @@ pub trait insert_pk_u_8 { self.insert_pk_u_8_then(n, data, |_, _| {}) } - /// Request that the remote module invoke the reducer `insert_pk_u8` to run as soon as possible, + /// Request that the remote module invoke the reducer `insert_pk_u_8` to run as soon as possible, /// registering `callback` to run when we are notified that the reducer completed. /// /// This method returns immediately, and errors only if we are unable to send the request. diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_pk_u_8_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_pk_u_8_type.rs new file mode 100644 index 00000000000..0ce48480107 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_pk_u_8_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct InsertPkU8 { + pub n: u8, + pub data: i32, +} + +impl __sdk::InModule for InsertPkU8 { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_pk_uuid_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_pk_uuid_type.rs new file mode 100644 index 00000000000..bde38558655 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_pk_uuid_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct InsertPkUuid { + pub u: __sdk::Uuid, + pub data: i32, +} + +impl __sdk::InModule for InsertPkUuid { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_primitives_as_strings_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_primitives_as_strings_type.rs new file mode 100644 index 00000000000..6b83afd82b2 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_primitives_as_strings_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +use super::every_primitive_struct_type::EveryPrimitiveStruct; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct InsertPrimitivesAsStrings { + pub s: EveryPrimitiveStruct, +} + +impl __sdk::InModule for InsertPrimitivesAsStrings { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_result_every_primitive_struct_string_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_result_every_primitive_struct_string_type.rs new file mode 100644 index 00000000000..262c055df73 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_result_every_primitive_struct_string_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +use super::every_primitive_struct_type::EveryPrimitiveStruct; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct InsertResultEveryPrimitiveStructString { + pub r: Result, +} + +impl __sdk::InModule for InsertResultEveryPrimitiveStructString { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_result_i_32_string_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_result_i_32_string_reducer.rs index 539b5d14a35..50f44f3ed20 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_result_i_32_string_reducer.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_result_i_32_string_reducer.rs @@ -21,11 +21,11 @@ impl __sdk::InModule for InsertResultI32StringArgs { } #[allow(non_camel_case_types)] -/// Extension trait for access to the reducer `insert_result_i32_string`. +/// Extension trait for access to the reducer `insert_result_i_32_string`. /// /// Implemented for [`super::RemoteReducers`]. pub trait insert_result_i_32_string { - /// Request that the remote module invoke the reducer `insert_result_i32_string` to run as soon as possible. + /// Request that the remote module invoke the reducer `insert_result_i_32_string` 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, @@ -35,7 +35,7 @@ pub trait insert_result_i_32_string { self.insert_result_i_32_string_then(r, |_, _| {}) } - /// Request that the remote module invoke the reducer `insert_result_i32_string` to run as soon as possible, + /// Request that the remote module invoke the reducer `insert_result_i_32_string` to run as soon as possible, /// registering `callback` to run when we are notified that the reducer completed. /// /// This method returns immediately, and errors only if we are unable to send the request. diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_result_i_32_string_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_result_i_32_string_type.rs new file mode 100644 index 00000000000..613a248bb1c --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_result_i_32_string_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct InsertResultI32String { + pub r: Result, +} + +impl __sdk::InModule for InsertResultI32String { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_result_identity_string_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_result_identity_string_type.rs new file mode 100644 index 00000000000..3d773cee112 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_result_identity_string_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct InsertResultIdentityString { + pub r: Result<__sdk::Identity, String>, +} + +impl __sdk::InModule for InsertResultIdentityString { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_result_simple_enum_i_32_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_result_simple_enum_i_32_reducer.rs index 2df7e23496f..059db78c5b7 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_result_simple_enum_i_32_reducer.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_result_simple_enum_i_32_reducer.rs @@ -23,11 +23,11 @@ impl __sdk::InModule for InsertResultSimpleEnumI32Args { } #[allow(non_camel_case_types)] -/// Extension trait for access to the reducer `insert_result_simple_enum_i32`. +/// Extension trait for access to the reducer `insert_result_simple_enum_i_32`. /// /// Implemented for [`super::RemoteReducers`]. pub trait insert_result_simple_enum_i_32 { - /// Request that the remote module invoke the reducer `insert_result_simple_enum_i32` to run as soon as possible. + /// Request that the remote module invoke the reducer `insert_result_simple_enum_i_32` 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, @@ -37,7 +37,7 @@ pub trait insert_result_simple_enum_i_32 { self.insert_result_simple_enum_i_32_then(r, |_, _| {}) } - /// Request that the remote module invoke the reducer `insert_result_simple_enum_i32` to run as soon as possible, + /// Request that the remote module invoke the reducer `insert_result_simple_enum_i_32` to run as soon as possible, /// registering `callback` to run when we are notified that the reducer completed. /// /// This method returns immediately, and errors only if we are unable to send the request. diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_result_simple_enum_i_32_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_result_simple_enum_i_32_type.rs new file mode 100644 index 00000000000..086b4750354 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_result_simple_enum_i_32_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +use super::simple_enum_type::SimpleEnum; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct InsertResultSimpleEnumI32 { + pub r: Result, +} + +impl __sdk::InModule for InsertResultSimpleEnumI32 { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_result_string_i_32_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_result_string_i_32_reducer.rs index b7e06f1fac8..c0e548b6698 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_result_string_i_32_reducer.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_result_string_i_32_reducer.rs @@ -21,11 +21,11 @@ impl __sdk::InModule for InsertResultStringI32Args { } #[allow(non_camel_case_types)] -/// Extension trait for access to the reducer `insert_result_string_i32`. +/// Extension trait for access to the reducer `insert_result_string_i_32`. /// /// Implemented for [`super::RemoteReducers`]. pub trait insert_result_string_i_32 { - /// Request that the remote module invoke the reducer `insert_result_string_i32` to run as soon as possible. + /// Request that the remote module invoke the reducer `insert_result_string_i_32` 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, @@ -35,7 +35,7 @@ pub trait insert_result_string_i_32 { self.insert_result_string_i_32_then(r, |_, _| {}) } - /// Request that the remote module invoke the reducer `insert_result_string_i32` to run as soon as possible, + /// Request that the remote module invoke the reducer `insert_result_string_i_32` to run as soon as possible, /// registering `callback` to run when we are notified that the reducer completed. /// /// This method returns immediately, and errors only if we are unable to send the request. diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_result_string_i_32_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_result_string_i_32_type.rs new file mode 100644 index 00000000000..e06c8a25e72 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_result_string_i_32_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct InsertResultStringI32 { + pub r: Result, +} + +impl __sdk::InModule for InsertResultStringI32 { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_result_vec_i_32_string_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_result_vec_i_32_string_reducer.rs index 7e5676eb5e3..dab246f8f14 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_result_vec_i_32_string_reducer.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_result_vec_i_32_string_reducer.rs @@ -21,11 +21,11 @@ impl __sdk::InModule for InsertResultVecI32StringArgs { } #[allow(non_camel_case_types)] -/// Extension trait for access to the reducer `insert_result_vec_i32_string`. +/// Extension trait for access to the reducer `insert_result_vec_i_32_string`. /// /// Implemented for [`super::RemoteReducers`]. pub trait insert_result_vec_i_32_string { - /// Request that the remote module invoke the reducer `insert_result_vec_i32_string` to run as soon as possible. + /// Request that the remote module invoke the reducer `insert_result_vec_i_32_string` 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, @@ -35,7 +35,7 @@ pub trait insert_result_vec_i_32_string { self.insert_result_vec_i_32_string_then(r, |_, _| {}) } - /// Request that the remote module invoke the reducer `insert_result_vec_i32_string` to run as soon as possible, + /// Request that the remote module invoke the reducer `insert_result_vec_i_32_string` to run as soon as possible, /// registering `callback` to run when we are notified that the reducer completed. /// /// This method returns immediately, and errors only if we are unable to send the request. diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_result_vec_i_32_string_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_result_vec_i_32_string_type.rs new file mode 100644 index 00000000000..992a55f5713 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_result_vec_i_32_string_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct InsertResultVecI32String { + pub r: Result, String>, +} + +impl __sdk::InModule for InsertResultVecI32String { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_table_holds_table_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_table_holds_table_type.rs new file mode 100644 index 00000000000..b02283cab2e --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_table_holds_table_type.rs @@ -0,0 +1,19 @@ +// 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, __lib, __sats, __ws}; + +use super::one_u_8_type::OneU8; +use super::vec_u_8_type::VecU8; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct InsertTableHoldsTable { + pub a: OneU8, + pub b: VecU8, +} + +impl __sdk::InModule for InsertTableHoldsTable { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_unique_bool_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_unique_bool_type.rs new file mode 100644 index 00000000000..3a94ec3f352 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_unique_bool_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct InsertUniqueBool { + pub b: bool, + pub data: i32, +} + +impl __sdk::InModule for InsertUniqueBool { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_unique_connection_id_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_unique_connection_id_type.rs new file mode 100644 index 00000000000..c3939b84ab2 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_unique_connection_id_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct InsertUniqueConnectionId { + pub a: __sdk::ConnectionId, + pub data: i32, +} + +impl __sdk::InModule for InsertUniqueConnectionId { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_unique_i_128_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_unique_i_128_reducer.rs index ae5575b897e..89fea88ae1f 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_unique_i_128_reducer.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_unique_i_128_reducer.rs @@ -25,11 +25,11 @@ impl __sdk::InModule for InsertUniqueI128Args { } #[allow(non_camel_case_types)] -/// Extension trait for access to the reducer `insert_unique_i128`. +/// Extension trait for access to the reducer `insert_unique_i_128`. /// /// Implemented for [`super::RemoteReducers`]. pub trait insert_unique_i_128 { - /// Request that the remote module invoke the reducer `insert_unique_i128` to run as soon as possible. + /// Request that the remote module invoke the reducer `insert_unique_i_128` 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, @@ -39,7 +39,7 @@ pub trait insert_unique_i_128 { self.insert_unique_i_128_then(n, data, |_, _| {}) } - /// Request that the remote module invoke the reducer `insert_unique_i128` to run as soon as possible, + /// Request that the remote module invoke the reducer `insert_unique_i_128` to run as soon as possible, /// registering `callback` to run when we are notified that the reducer completed. /// /// This method returns immediately, and errors only if we are unable to send the request. diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_unique_i_128_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_unique_i_128_type.rs new file mode 100644 index 00000000000..70452570fb2 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_unique_i_128_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct InsertUniqueI128 { + pub n: i128, + pub data: i32, +} + +impl __sdk::InModule for InsertUniqueI128 { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_unique_i_16_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_unique_i_16_reducer.rs index 6f2ef4be6e0..57f0c6568d7 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_unique_i_16_reducer.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_unique_i_16_reducer.rs @@ -25,11 +25,11 @@ impl __sdk::InModule for InsertUniqueI16Args { } #[allow(non_camel_case_types)] -/// Extension trait for access to the reducer `insert_unique_i16`. +/// Extension trait for access to the reducer `insert_unique_i_16`. /// /// Implemented for [`super::RemoteReducers`]. pub trait insert_unique_i_16 { - /// Request that the remote module invoke the reducer `insert_unique_i16` to run as soon as possible. + /// Request that the remote module invoke the reducer `insert_unique_i_16` 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, @@ -39,7 +39,7 @@ pub trait insert_unique_i_16 { self.insert_unique_i_16_then(n, data, |_, _| {}) } - /// Request that the remote module invoke the reducer `insert_unique_i16` to run as soon as possible, + /// Request that the remote module invoke the reducer `insert_unique_i_16` to run as soon as possible, /// registering `callback` to run when we are notified that the reducer completed. /// /// This method returns immediately, and errors only if we are unable to send the request. diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_unique_i_16_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_unique_i_16_type.rs new file mode 100644 index 00000000000..f451f1da503 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_unique_i_16_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct InsertUniqueI16 { + pub n: i16, + pub data: i32, +} + +impl __sdk::InModule for InsertUniqueI16 { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_unique_i_256_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_unique_i_256_reducer.rs index 29237fc51e4..d42d569dd23 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_unique_i_256_reducer.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_unique_i_256_reducer.rs @@ -25,11 +25,11 @@ impl __sdk::InModule for InsertUniqueI256Args { } #[allow(non_camel_case_types)] -/// Extension trait for access to the reducer `insert_unique_i256`. +/// Extension trait for access to the reducer `insert_unique_i_256`. /// /// Implemented for [`super::RemoteReducers`]. pub trait insert_unique_i_256 { - /// Request that the remote module invoke the reducer `insert_unique_i256` to run as soon as possible. + /// Request that the remote module invoke the reducer `insert_unique_i_256` 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, @@ -39,7 +39,7 @@ pub trait insert_unique_i_256 { self.insert_unique_i_256_then(n, data, |_, _| {}) } - /// Request that the remote module invoke the reducer `insert_unique_i256` to run as soon as possible, + /// Request that the remote module invoke the reducer `insert_unique_i_256` to run as soon as possible, /// registering `callback` to run when we are notified that the reducer completed. /// /// This method returns immediately, and errors only if we are unable to send the request. diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_unique_i_256_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_unique_i_256_type.rs new file mode 100644 index 00000000000..8780cc26066 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_unique_i_256_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct InsertUniqueI256 { + pub n: __sats::i256, + pub data: i32, +} + +impl __sdk::InModule for InsertUniqueI256 { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_unique_i_32_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_unique_i_32_reducer.rs index 3fe7b24387e..53cf468b9cd 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_unique_i_32_reducer.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_unique_i_32_reducer.rs @@ -25,11 +25,11 @@ impl __sdk::InModule for InsertUniqueI32Args { } #[allow(non_camel_case_types)] -/// Extension trait for access to the reducer `insert_unique_i32`. +/// Extension trait for access to the reducer `insert_unique_i_32`. /// /// Implemented for [`super::RemoteReducers`]. pub trait insert_unique_i_32 { - /// Request that the remote module invoke the reducer `insert_unique_i32` to run as soon as possible. + /// Request that the remote module invoke the reducer `insert_unique_i_32` 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, @@ -39,7 +39,7 @@ pub trait insert_unique_i_32 { self.insert_unique_i_32_then(n, data, |_, _| {}) } - /// Request that the remote module invoke the reducer `insert_unique_i32` to run as soon as possible, + /// Request that the remote module invoke the reducer `insert_unique_i_32` to run as soon as possible, /// registering `callback` to run when we are notified that the reducer completed. /// /// This method returns immediately, and errors only if we are unable to send the request. diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_unique_i_32_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_unique_i_32_type.rs new file mode 100644 index 00000000000..1563efdc189 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_unique_i_32_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct InsertUniqueI32 { + pub n: i32, + pub data: i32, +} + +impl __sdk::InModule for InsertUniqueI32 { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_unique_i_64_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_unique_i_64_reducer.rs index 3e2aae54063..de8ddd29b70 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_unique_i_64_reducer.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_unique_i_64_reducer.rs @@ -25,11 +25,11 @@ impl __sdk::InModule for InsertUniqueI64Args { } #[allow(non_camel_case_types)] -/// Extension trait for access to the reducer `insert_unique_i64`. +/// Extension trait for access to the reducer `insert_unique_i_64`. /// /// Implemented for [`super::RemoteReducers`]. pub trait insert_unique_i_64 { - /// Request that the remote module invoke the reducer `insert_unique_i64` to run as soon as possible. + /// Request that the remote module invoke the reducer `insert_unique_i_64` 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, @@ -39,7 +39,7 @@ pub trait insert_unique_i_64 { self.insert_unique_i_64_then(n, data, |_, _| {}) } - /// Request that the remote module invoke the reducer `insert_unique_i64` to run as soon as possible, + /// Request that the remote module invoke the reducer `insert_unique_i_64` to run as soon as possible, /// registering `callback` to run when we are notified that the reducer completed. /// /// This method returns immediately, and errors only if we are unable to send the request. diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_unique_i_64_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_unique_i_64_type.rs new file mode 100644 index 00000000000..683240fad70 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_unique_i_64_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct InsertUniqueI64 { + pub n: i64, + pub data: i32, +} + +impl __sdk::InModule for InsertUniqueI64 { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_unique_i_8_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_unique_i_8_reducer.rs index 2592111b8a6..4148a6cb964 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_unique_i_8_reducer.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_unique_i_8_reducer.rs @@ -25,11 +25,11 @@ impl __sdk::InModule for InsertUniqueI8Args { } #[allow(non_camel_case_types)] -/// Extension trait for access to the reducer `insert_unique_i8`. +/// Extension trait for access to the reducer `insert_unique_i_8`. /// /// Implemented for [`super::RemoteReducers`]. pub trait insert_unique_i_8 { - /// Request that the remote module invoke the reducer `insert_unique_i8` to run as soon as possible. + /// Request that the remote module invoke the reducer `insert_unique_i_8` 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, @@ -39,7 +39,7 @@ pub trait insert_unique_i_8 { self.insert_unique_i_8_then(n, data, |_, _| {}) } - /// Request that the remote module invoke the reducer `insert_unique_i8` to run as soon as possible, + /// Request that the remote module invoke the reducer `insert_unique_i_8` to run as soon as possible, /// registering `callback` to run when we are notified that the reducer completed. /// /// This method returns immediately, and errors only if we are unable to send the request. diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_unique_i_8_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_unique_i_8_type.rs new file mode 100644 index 00000000000..7c44e1980bd --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_unique_i_8_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct InsertUniqueI8 { + pub n: i8, + pub data: i32, +} + +impl __sdk::InModule for InsertUniqueI8 { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_unique_identity_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_unique_identity_type.rs new file mode 100644 index 00000000000..89237b2888b --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_unique_identity_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct InsertUniqueIdentity { + pub i: __sdk::Identity, + pub data: i32, +} + +impl __sdk::InModule for InsertUniqueIdentity { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_unique_string_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_unique_string_type.rs new file mode 100644 index 00000000000..41671764fcd --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_unique_string_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct InsertUniqueString { + pub s: String, + pub data: i32, +} + +impl __sdk::InModule for InsertUniqueString { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_unique_u_128_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_unique_u_128_reducer.rs index 932527a1635..e7c833300c7 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_unique_u_128_reducer.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_unique_u_128_reducer.rs @@ -25,11 +25,11 @@ impl __sdk::InModule for InsertUniqueU128Args { } #[allow(non_camel_case_types)] -/// Extension trait for access to the reducer `insert_unique_u128`. +/// Extension trait for access to the reducer `insert_unique_u_128`. /// /// Implemented for [`super::RemoteReducers`]. pub trait insert_unique_u_128 { - /// Request that the remote module invoke the reducer `insert_unique_u128` to run as soon as possible. + /// Request that the remote module invoke the reducer `insert_unique_u_128` 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, @@ -39,7 +39,7 @@ pub trait insert_unique_u_128 { self.insert_unique_u_128_then(n, data, |_, _| {}) } - /// Request that the remote module invoke the reducer `insert_unique_u128` to run as soon as possible, + /// Request that the remote module invoke the reducer `insert_unique_u_128` to run as soon as possible, /// registering `callback` to run when we are notified that the reducer completed. /// /// This method returns immediately, and errors only if we are unable to send the request. diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_unique_u_128_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_unique_u_128_type.rs new file mode 100644 index 00000000000..f1608ea45fd --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_unique_u_128_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct InsertUniqueU128 { + pub n: u128, + pub data: i32, +} + +impl __sdk::InModule for InsertUniqueU128 { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_unique_u_16_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_unique_u_16_reducer.rs index 12c2feaed9a..f639c955749 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_unique_u_16_reducer.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_unique_u_16_reducer.rs @@ -25,11 +25,11 @@ impl __sdk::InModule for InsertUniqueU16Args { } #[allow(non_camel_case_types)] -/// Extension trait for access to the reducer `insert_unique_u16`. +/// Extension trait for access to the reducer `insert_unique_u_16`. /// /// Implemented for [`super::RemoteReducers`]. pub trait insert_unique_u_16 { - /// Request that the remote module invoke the reducer `insert_unique_u16` to run as soon as possible. + /// Request that the remote module invoke the reducer `insert_unique_u_16` 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, @@ -39,7 +39,7 @@ pub trait insert_unique_u_16 { self.insert_unique_u_16_then(n, data, |_, _| {}) } - /// Request that the remote module invoke the reducer `insert_unique_u16` to run as soon as possible, + /// Request that the remote module invoke the reducer `insert_unique_u_16` to run as soon as possible, /// registering `callback` to run when we are notified that the reducer completed. /// /// This method returns immediately, and errors only if we are unable to send the request. diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_unique_u_16_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_unique_u_16_type.rs new file mode 100644 index 00000000000..5b2da1679fb --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_unique_u_16_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct InsertUniqueU16 { + pub n: u16, + pub data: i32, +} + +impl __sdk::InModule for InsertUniqueU16 { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_unique_u_256_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_unique_u_256_reducer.rs index 80e314cd202..05d01e15505 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_unique_u_256_reducer.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_unique_u_256_reducer.rs @@ -25,11 +25,11 @@ impl __sdk::InModule for InsertUniqueU256Args { } #[allow(non_camel_case_types)] -/// Extension trait for access to the reducer `insert_unique_u256`. +/// Extension trait for access to the reducer `insert_unique_u_256`. /// /// Implemented for [`super::RemoteReducers`]. pub trait insert_unique_u_256 { - /// Request that the remote module invoke the reducer `insert_unique_u256` to run as soon as possible. + /// Request that the remote module invoke the reducer `insert_unique_u_256` 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, @@ -39,7 +39,7 @@ pub trait insert_unique_u_256 { self.insert_unique_u_256_then(n, data, |_, _| {}) } - /// Request that the remote module invoke the reducer `insert_unique_u256` to run as soon as possible, + /// Request that the remote module invoke the reducer `insert_unique_u_256` to run as soon as possible, /// registering `callback` to run when we are notified that the reducer completed. /// /// This method returns immediately, and errors only if we are unable to send the request. diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_unique_u_256_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_unique_u_256_type.rs new file mode 100644 index 00000000000..868ebb4ba7e --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_unique_u_256_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct InsertUniqueU256 { + pub n: __sats::u256, + pub data: i32, +} + +impl __sdk::InModule for InsertUniqueU256 { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_unique_u_32_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_unique_u_32_reducer.rs index d46290f17c2..c7055279174 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_unique_u_32_reducer.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_unique_u_32_reducer.rs @@ -25,11 +25,11 @@ impl __sdk::InModule for InsertUniqueU32Args { } #[allow(non_camel_case_types)] -/// Extension trait for access to the reducer `insert_unique_u32`. +/// Extension trait for access to the reducer `insert_unique_u_32`. /// /// Implemented for [`super::RemoteReducers`]. pub trait insert_unique_u_32 { - /// Request that the remote module invoke the reducer `insert_unique_u32` to run as soon as possible. + /// Request that the remote module invoke the reducer `insert_unique_u_32` 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, @@ -39,7 +39,7 @@ pub trait insert_unique_u_32 { self.insert_unique_u_32_then(n, data, |_, _| {}) } - /// Request that the remote module invoke the reducer `insert_unique_u32` to run as soon as possible, + /// Request that the remote module invoke the reducer `insert_unique_u_32` to run as soon as possible, /// registering `callback` to run when we are notified that the reducer completed. /// /// This method returns immediately, and errors only if we are unable to send the request. diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_unique_u_32_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_unique_u_32_type.rs new file mode 100644 index 00000000000..db4d9e5ea0d --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_unique_u_32_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct InsertUniqueU32 { + pub n: u32, + pub data: i32, +} + +impl __sdk::InModule for InsertUniqueU32 { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_unique_u_32_update_pk_u_32_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_unique_u_32_update_pk_u_32_reducer.rs index 2fd884c2225..31f490fcd7a 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_unique_u_32_update_pk_u_32_reducer.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_unique_u_32_update_pk_u_32_reducer.rs @@ -27,11 +27,11 @@ impl __sdk::InModule for InsertUniqueU32UpdatePkU32Args { } #[allow(non_camel_case_types)] -/// Extension trait for access to the reducer `insert_unique_u32_update_pk_u32`. +/// Extension trait for access to the reducer `insert_unique_u_32_update_pk_u_32`. /// /// Implemented for [`super::RemoteReducers`]. pub trait insert_unique_u_32_update_pk_u_32 { - /// Request that the remote module invoke the reducer `insert_unique_u32_update_pk_u32` to run as soon as possible. + /// Request that the remote module invoke the reducer `insert_unique_u_32_update_pk_u_32` 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, @@ -41,7 +41,7 @@ pub trait insert_unique_u_32_update_pk_u_32 { self.insert_unique_u_32_update_pk_u_32_then(n, d_unique, d_pk, |_, _| {}) } - /// Request that the remote module invoke the reducer `insert_unique_u32_update_pk_u32` to run as soon as possible, + /// Request that the remote module invoke the reducer `insert_unique_u_32_update_pk_u_32` to run as soon as possible, /// registering `callback` to run when we are notified that the reducer completed. /// /// This method returns immediately, and errors only if we are unable to send the request. diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_unique_u_32_update_pk_u_32_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_unique_u_32_update_pk_u_32_type.rs new file mode 100644 index 00000000000..a67e8944a5d --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_unique_u_32_update_pk_u_32_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct InsertUniqueU32UpdatePkU32 { + pub n: u32, + pub d_unique: i32, + pub d_pk: i32, +} + +impl __sdk::InModule for InsertUniqueU32UpdatePkU32 { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_unique_u_64_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_unique_u_64_reducer.rs index fb10a22eed5..b3c15576050 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_unique_u_64_reducer.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_unique_u_64_reducer.rs @@ -25,11 +25,11 @@ impl __sdk::InModule for InsertUniqueU64Args { } #[allow(non_camel_case_types)] -/// Extension trait for access to the reducer `insert_unique_u64`. +/// Extension trait for access to the reducer `insert_unique_u_64`. /// /// Implemented for [`super::RemoteReducers`]. pub trait insert_unique_u_64 { - /// Request that the remote module invoke the reducer `insert_unique_u64` to run as soon as possible. + /// Request that the remote module invoke the reducer `insert_unique_u_64` 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, @@ -39,7 +39,7 @@ pub trait insert_unique_u_64 { self.insert_unique_u_64_then(n, data, |_, _| {}) } - /// Request that the remote module invoke the reducer `insert_unique_u64` to run as soon as possible, + /// Request that the remote module invoke the reducer `insert_unique_u_64` to run as soon as possible, /// registering `callback` to run when we are notified that the reducer completed. /// /// This method returns immediately, and errors only if we are unable to send the request. diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_unique_u_64_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_unique_u_64_type.rs new file mode 100644 index 00000000000..78460fc636b --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_unique_u_64_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct InsertUniqueU64 { + pub n: u64, + pub data: i32, +} + +impl __sdk::InModule for InsertUniqueU64 { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_unique_u_8_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_unique_u_8_reducer.rs index a8b683afaf1..4445e03d0de 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_unique_u_8_reducer.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_unique_u_8_reducer.rs @@ -25,11 +25,11 @@ impl __sdk::InModule for InsertUniqueU8Args { } #[allow(non_camel_case_types)] -/// Extension trait for access to the reducer `insert_unique_u8`. +/// Extension trait for access to the reducer `insert_unique_u_8`. /// /// Implemented for [`super::RemoteReducers`]. pub trait insert_unique_u_8 { - /// Request that the remote module invoke the reducer `insert_unique_u8` to run as soon as possible. + /// Request that the remote module invoke the reducer `insert_unique_u_8` 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, @@ -39,7 +39,7 @@ pub trait insert_unique_u_8 { self.insert_unique_u_8_then(n, data, |_, _| {}) } - /// Request that the remote module invoke the reducer `insert_unique_u8` to run as soon as possible, + /// Request that the remote module invoke the reducer `insert_unique_u_8` to run as soon as possible, /// registering `callback` to run when we are notified that the reducer completed. /// /// This method returns immediately, and errors only if we are unable to send the request. diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_unique_u_8_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_unique_u_8_type.rs new file mode 100644 index 00000000000..bc1fe8b381d --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_unique_u_8_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct InsertUniqueU8 { + pub n: u8, + pub data: i32, +} + +impl __sdk::InModule for InsertUniqueU8 { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_unique_uuid_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_unique_uuid_type.rs new file mode 100644 index 00000000000..91191328633 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_unique_uuid_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct InsertUniqueUuid { + pub u: __sdk::Uuid, + pub data: i32, +} + +impl __sdk::InModule for InsertUniqueUuid { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_user_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_user_type.rs new file mode 100644 index 00000000000..76253a7f46b --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_user_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct InsertUser { + pub name: String, + pub identity: __sdk::Identity, +} + +impl __sdk::InModule for InsertUser { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_vec_bool_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_vec_bool_type.rs new file mode 100644 index 00000000000..34930007455 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_vec_bool_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct InsertVecBool { + pub b: Vec, +} + +impl __sdk::InModule for InsertVecBool { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_vec_byte_struct_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_vec_byte_struct_type.rs new file mode 100644 index 00000000000..b5ab4fc1170 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_vec_byte_struct_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +use super::byte_struct_type::ByteStruct; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct InsertVecByteStruct { + pub s: Vec, +} + +impl __sdk::InModule for InsertVecByteStruct { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_vec_connection_id_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_vec_connection_id_type.rs new file mode 100644 index 00000000000..25f7274fa3a --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_vec_connection_id_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct InsertVecConnectionId { + pub a: Vec<__sdk::ConnectionId>, +} + +impl __sdk::InModule for InsertVecConnectionId { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_vec_enum_with_payload_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_vec_enum_with_payload_type.rs new file mode 100644 index 00000000000..e72ce9ee3fb --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_vec_enum_with_payload_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +use super::enum_with_payload_type::EnumWithPayload; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct InsertVecEnumWithPayload { + pub e: Vec, +} + +impl __sdk::InModule for InsertVecEnumWithPayload { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_vec_every_primitive_struct_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_vec_every_primitive_struct_type.rs new file mode 100644 index 00000000000..b1bc72e37ec --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_vec_every_primitive_struct_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +use super::every_primitive_struct_type::EveryPrimitiveStruct; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct InsertVecEveryPrimitiveStruct { + pub s: Vec, +} + +impl __sdk::InModule for InsertVecEveryPrimitiveStruct { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_vec_every_vec_struct_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_vec_every_vec_struct_type.rs new file mode 100644 index 00000000000..89b65f164ee --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_vec_every_vec_struct_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +use super::every_vec_struct_type::EveryVecStruct; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct InsertVecEveryVecStruct { + pub s: Vec, +} + +impl __sdk::InModule for InsertVecEveryVecStruct { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_vec_f_32_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_vec_f_32_reducer.rs index 7957a337b14..6618e92c54c 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_vec_f_32_reducer.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_vec_f_32_reducer.rs @@ -21,11 +21,11 @@ impl __sdk::InModule for InsertVecF32Args { } #[allow(non_camel_case_types)] -/// Extension trait for access to the reducer `insert_vec_f32`. +/// Extension trait for access to the reducer `insert_vec_f_32`. /// /// Implemented for [`super::RemoteReducers`]. pub trait insert_vec_f_32 { - /// Request that the remote module invoke the reducer `insert_vec_f32` to run as soon as possible. + /// Request that the remote module invoke the reducer `insert_vec_f_32` 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, @@ -35,7 +35,7 @@ pub trait insert_vec_f_32 { self.insert_vec_f_32_then(f, |_, _| {}) } - /// Request that the remote module invoke the reducer `insert_vec_f32` to run as soon as possible, + /// Request that the remote module invoke the reducer `insert_vec_f_32` to run as soon as possible, /// registering `callback` to run when we are notified that the reducer completed. /// /// This method returns immediately, and errors only if we are unable to send the request. diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_vec_f_32_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_vec_f_32_type.rs new file mode 100644 index 00000000000..e66d6258bf2 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_vec_f_32_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct InsertVecF32 { + pub f: Vec, +} + +impl __sdk::InModule for InsertVecF32 { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_vec_f_64_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_vec_f_64_reducer.rs index 5ebd996655a..3e08df60bf5 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_vec_f_64_reducer.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_vec_f_64_reducer.rs @@ -21,11 +21,11 @@ impl __sdk::InModule for InsertVecF64Args { } #[allow(non_camel_case_types)] -/// Extension trait for access to the reducer `insert_vec_f64`. +/// Extension trait for access to the reducer `insert_vec_f_64`. /// /// Implemented for [`super::RemoteReducers`]. pub trait insert_vec_f_64 { - /// Request that the remote module invoke the reducer `insert_vec_f64` to run as soon as possible. + /// Request that the remote module invoke the reducer `insert_vec_f_64` 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, @@ -35,7 +35,7 @@ pub trait insert_vec_f_64 { self.insert_vec_f_64_then(f, |_, _| {}) } - /// Request that the remote module invoke the reducer `insert_vec_f64` to run as soon as possible, + /// Request that the remote module invoke the reducer `insert_vec_f_64` to run as soon as possible, /// registering `callback` to run when we are notified that the reducer completed. /// /// This method returns immediately, and errors only if we are unable to send the request. diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_vec_f_64_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_vec_f_64_type.rs new file mode 100644 index 00000000000..96183c0d8c1 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_vec_f_64_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct InsertVecF64 { + pub f: Vec, +} + +impl __sdk::InModule for InsertVecF64 { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_vec_i_128_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_vec_i_128_reducer.rs index 206740e5146..06658035dfc 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_vec_i_128_reducer.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_vec_i_128_reducer.rs @@ -21,11 +21,11 @@ impl __sdk::InModule for InsertVecI128Args { } #[allow(non_camel_case_types)] -/// Extension trait for access to the reducer `insert_vec_i128`. +/// Extension trait for access to the reducer `insert_vec_i_128`. /// /// Implemented for [`super::RemoteReducers`]. pub trait insert_vec_i_128 { - /// Request that the remote module invoke the reducer `insert_vec_i128` to run as soon as possible. + /// Request that the remote module invoke the reducer `insert_vec_i_128` 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, @@ -35,7 +35,7 @@ pub trait insert_vec_i_128 { self.insert_vec_i_128_then(n, |_, _| {}) } - /// Request that the remote module invoke the reducer `insert_vec_i128` to run as soon as possible, + /// Request that the remote module invoke the reducer `insert_vec_i_128` to run as soon as possible, /// registering `callback` to run when we are notified that the reducer completed. /// /// This method returns immediately, and errors only if we are unable to send the request. diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_vec_i_128_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_vec_i_128_type.rs new file mode 100644 index 00000000000..7274d969f60 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_vec_i_128_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct InsertVecI128 { + pub n: Vec, +} + +impl __sdk::InModule for InsertVecI128 { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_vec_i_16_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_vec_i_16_reducer.rs index 00b2cd10f91..1a33c41494e 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_vec_i_16_reducer.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_vec_i_16_reducer.rs @@ -21,11 +21,11 @@ impl __sdk::InModule for InsertVecI16Args { } #[allow(non_camel_case_types)] -/// Extension trait for access to the reducer `insert_vec_i16`. +/// Extension trait for access to the reducer `insert_vec_i_16`. /// /// Implemented for [`super::RemoteReducers`]. pub trait insert_vec_i_16 { - /// Request that the remote module invoke the reducer `insert_vec_i16` to run as soon as possible. + /// Request that the remote module invoke the reducer `insert_vec_i_16` 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, @@ -35,7 +35,7 @@ pub trait insert_vec_i_16 { self.insert_vec_i_16_then(n, |_, _| {}) } - /// Request that the remote module invoke the reducer `insert_vec_i16` to run as soon as possible, + /// Request that the remote module invoke the reducer `insert_vec_i_16` to run as soon as possible, /// registering `callback` to run when we are notified that the reducer completed. /// /// This method returns immediately, and errors only if we are unable to send the request. diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_vec_i_16_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_vec_i_16_type.rs new file mode 100644 index 00000000000..1397b241d66 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_vec_i_16_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct InsertVecI16 { + pub n: Vec, +} + +impl __sdk::InModule for InsertVecI16 { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_vec_i_256_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_vec_i_256_reducer.rs index 537914e56d2..3f93417fa08 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_vec_i_256_reducer.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_vec_i_256_reducer.rs @@ -21,11 +21,11 @@ impl __sdk::InModule for InsertVecI256Args { } #[allow(non_camel_case_types)] -/// Extension trait for access to the reducer `insert_vec_i256`. +/// Extension trait for access to the reducer `insert_vec_i_256`. /// /// Implemented for [`super::RemoteReducers`]. pub trait insert_vec_i_256 { - /// Request that the remote module invoke the reducer `insert_vec_i256` to run as soon as possible. + /// Request that the remote module invoke the reducer `insert_vec_i_256` 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, @@ -35,7 +35,7 @@ pub trait insert_vec_i_256 { self.insert_vec_i_256_then(n, |_, _| {}) } - /// Request that the remote module invoke the reducer `insert_vec_i256` to run as soon as possible, + /// Request that the remote module invoke the reducer `insert_vec_i_256` to run as soon as possible, /// registering `callback` to run when we are notified that the reducer completed. /// /// This method returns immediately, and errors only if we are unable to send the request. diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_vec_i_256_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_vec_i_256_type.rs new file mode 100644 index 00000000000..4c5ced1c13e --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_vec_i_256_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct InsertVecI256 { + pub n: Vec<__sats::i256>, +} + +impl __sdk::InModule for InsertVecI256 { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_vec_i_32_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_vec_i_32_reducer.rs index 8b733448cd7..fb7ec34a86c 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_vec_i_32_reducer.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_vec_i_32_reducer.rs @@ -21,11 +21,11 @@ impl __sdk::InModule for InsertVecI32Args { } #[allow(non_camel_case_types)] -/// Extension trait for access to the reducer `insert_vec_i32`. +/// Extension trait for access to the reducer `insert_vec_i_32`. /// /// Implemented for [`super::RemoteReducers`]. pub trait insert_vec_i_32 { - /// Request that the remote module invoke the reducer `insert_vec_i32` to run as soon as possible. + /// Request that the remote module invoke the reducer `insert_vec_i_32` 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, @@ -35,7 +35,7 @@ pub trait insert_vec_i_32 { self.insert_vec_i_32_then(n, |_, _| {}) } - /// Request that the remote module invoke the reducer `insert_vec_i32` to run as soon as possible, + /// Request that the remote module invoke the reducer `insert_vec_i_32` to run as soon as possible, /// registering `callback` to run when we are notified that the reducer completed. /// /// This method returns immediately, and errors only if we are unable to send the request. diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_vec_i_32_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_vec_i_32_type.rs new file mode 100644 index 00000000000..1e5c042d8c2 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_vec_i_32_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct InsertVecI32 { + pub n: Vec, +} + +impl __sdk::InModule for InsertVecI32 { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_vec_i_64_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_vec_i_64_reducer.rs index 2fce2e1349a..d0573f68715 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_vec_i_64_reducer.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_vec_i_64_reducer.rs @@ -21,11 +21,11 @@ impl __sdk::InModule for InsertVecI64Args { } #[allow(non_camel_case_types)] -/// Extension trait for access to the reducer `insert_vec_i64`. +/// Extension trait for access to the reducer `insert_vec_i_64`. /// /// Implemented for [`super::RemoteReducers`]. pub trait insert_vec_i_64 { - /// Request that the remote module invoke the reducer `insert_vec_i64` to run as soon as possible. + /// Request that the remote module invoke the reducer `insert_vec_i_64` 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, @@ -35,7 +35,7 @@ pub trait insert_vec_i_64 { self.insert_vec_i_64_then(n, |_, _| {}) } - /// Request that the remote module invoke the reducer `insert_vec_i64` to run as soon as possible, + /// Request that the remote module invoke the reducer `insert_vec_i_64` to run as soon as possible, /// registering `callback` to run when we are notified that the reducer completed. /// /// This method returns immediately, and errors only if we are unable to send the request. diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_vec_i_64_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_vec_i_64_type.rs new file mode 100644 index 00000000000..87215a92c81 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_vec_i_64_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct InsertVecI64 { + pub n: Vec, +} + +impl __sdk::InModule for InsertVecI64 { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_vec_i_8_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_vec_i_8_reducer.rs index e456a1139bd..f24b4dfecd3 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_vec_i_8_reducer.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_vec_i_8_reducer.rs @@ -21,11 +21,11 @@ impl __sdk::InModule for InsertVecI8Args { } #[allow(non_camel_case_types)] -/// Extension trait for access to the reducer `insert_vec_i8`. +/// Extension trait for access to the reducer `insert_vec_i_8`. /// /// Implemented for [`super::RemoteReducers`]. pub trait insert_vec_i_8 { - /// Request that the remote module invoke the reducer `insert_vec_i8` to run as soon as possible. + /// Request that the remote module invoke the reducer `insert_vec_i_8` 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, @@ -35,7 +35,7 @@ pub trait insert_vec_i_8 { self.insert_vec_i_8_then(n, |_, _| {}) } - /// Request that the remote module invoke the reducer `insert_vec_i8` to run as soon as possible, + /// Request that the remote module invoke the reducer `insert_vec_i_8` to run as soon as possible, /// registering `callback` to run when we are notified that the reducer completed. /// /// This method returns immediately, and errors only if we are unable to send the request. diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_vec_i_8_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_vec_i_8_type.rs new file mode 100644 index 00000000000..33db9b47257 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_vec_i_8_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct InsertVecI8 { + pub n: Vec, +} + +impl __sdk::InModule for InsertVecI8 { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_vec_identity_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_vec_identity_type.rs new file mode 100644 index 00000000000..fd493e98f78 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_vec_identity_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct InsertVecIdentity { + pub i: Vec<__sdk::Identity>, +} + +impl __sdk::InModule for InsertVecIdentity { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_vec_simple_enum_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_vec_simple_enum_type.rs new file mode 100644 index 00000000000..ec3863a1579 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_vec_simple_enum_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +use super::simple_enum_type::SimpleEnum; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct InsertVecSimpleEnum { + pub e: Vec, +} + +impl __sdk::InModule for InsertVecSimpleEnum { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_vec_string_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_vec_string_type.rs new file mode 100644 index 00000000000..fb672fcd3e1 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_vec_string_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct InsertVecString { + pub s: Vec, +} + +impl __sdk::InModule for InsertVecString { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_vec_timestamp_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_vec_timestamp_type.rs new file mode 100644 index 00000000000..84ecaaa879f --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_vec_timestamp_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct InsertVecTimestamp { + pub t: Vec<__sdk::Timestamp>, +} + +impl __sdk::InModule for InsertVecTimestamp { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_vec_u_128_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_vec_u_128_reducer.rs index ba1e5cab60c..57e5b6d6685 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_vec_u_128_reducer.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_vec_u_128_reducer.rs @@ -21,11 +21,11 @@ impl __sdk::InModule for InsertVecU128Args { } #[allow(non_camel_case_types)] -/// Extension trait for access to the reducer `insert_vec_u128`. +/// Extension trait for access to the reducer `insert_vec_u_128`. /// /// Implemented for [`super::RemoteReducers`]. pub trait insert_vec_u_128 { - /// Request that the remote module invoke the reducer `insert_vec_u128` to run as soon as possible. + /// Request that the remote module invoke the reducer `insert_vec_u_128` 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, @@ -35,7 +35,7 @@ pub trait insert_vec_u_128 { self.insert_vec_u_128_then(n, |_, _| {}) } - /// Request that the remote module invoke the reducer `insert_vec_u128` to run as soon as possible, + /// Request that the remote module invoke the reducer `insert_vec_u_128` to run as soon as possible, /// registering `callback` to run when we are notified that the reducer completed. /// /// This method returns immediately, and errors only if we are unable to send the request. diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_vec_u_128_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_vec_u_128_type.rs new file mode 100644 index 00000000000..1d52b49b6f3 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_vec_u_128_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct InsertVecU128 { + pub n: Vec, +} + +impl __sdk::InModule for InsertVecU128 { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_vec_u_16_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_vec_u_16_reducer.rs index 6b88e573808..bf678a54a38 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_vec_u_16_reducer.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_vec_u_16_reducer.rs @@ -21,11 +21,11 @@ impl __sdk::InModule for InsertVecU16Args { } #[allow(non_camel_case_types)] -/// Extension trait for access to the reducer `insert_vec_u16`. +/// Extension trait for access to the reducer `insert_vec_u_16`. /// /// Implemented for [`super::RemoteReducers`]. pub trait insert_vec_u_16 { - /// Request that the remote module invoke the reducer `insert_vec_u16` to run as soon as possible. + /// Request that the remote module invoke the reducer `insert_vec_u_16` 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, @@ -35,7 +35,7 @@ pub trait insert_vec_u_16 { self.insert_vec_u_16_then(n, |_, _| {}) } - /// Request that the remote module invoke the reducer `insert_vec_u16` to run as soon as possible, + /// Request that the remote module invoke the reducer `insert_vec_u_16` to run as soon as possible, /// registering `callback` to run when we are notified that the reducer completed. /// /// This method returns immediately, and errors only if we are unable to send the request. diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_vec_u_16_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_vec_u_16_type.rs new file mode 100644 index 00000000000..4de1bb55a83 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_vec_u_16_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct InsertVecU16 { + pub n: Vec, +} + +impl __sdk::InModule for InsertVecU16 { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_vec_u_256_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_vec_u_256_reducer.rs index 6c918bf6a02..77f141c860c 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_vec_u_256_reducer.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_vec_u_256_reducer.rs @@ -21,11 +21,11 @@ impl __sdk::InModule for InsertVecU256Args { } #[allow(non_camel_case_types)] -/// Extension trait for access to the reducer `insert_vec_u256`. +/// Extension trait for access to the reducer `insert_vec_u_256`. /// /// Implemented for [`super::RemoteReducers`]. pub trait insert_vec_u_256 { - /// Request that the remote module invoke the reducer `insert_vec_u256` to run as soon as possible. + /// Request that the remote module invoke the reducer `insert_vec_u_256` 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, @@ -35,7 +35,7 @@ pub trait insert_vec_u_256 { self.insert_vec_u_256_then(n, |_, _| {}) } - /// Request that the remote module invoke the reducer `insert_vec_u256` to run as soon as possible, + /// Request that the remote module invoke the reducer `insert_vec_u_256` to run as soon as possible, /// registering `callback` to run when we are notified that the reducer completed. /// /// This method returns immediately, and errors only if we are unable to send the request. diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_vec_u_256_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_vec_u_256_type.rs new file mode 100644 index 00000000000..788ba855503 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_vec_u_256_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct InsertVecU256 { + pub n: Vec<__sats::u256>, +} + +impl __sdk::InModule for InsertVecU256 { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_vec_u_32_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_vec_u_32_reducer.rs index 694daa1d5c3..cb620ec777d 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_vec_u_32_reducer.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_vec_u_32_reducer.rs @@ -21,11 +21,11 @@ impl __sdk::InModule for InsertVecU32Args { } #[allow(non_camel_case_types)] -/// Extension trait for access to the reducer `insert_vec_u32`. +/// Extension trait for access to the reducer `insert_vec_u_32`. /// /// Implemented for [`super::RemoteReducers`]. pub trait insert_vec_u_32 { - /// Request that the remote module invoke the reducer `insert_vec_u32` to run as soon as possible. + /// Request that the remote module invoke the reducer `insert_vec_u_32` 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, @@ -35,7 +35,7 @@ pub trait insert_vec_u_32 { self.insert_vec_u_32_then(n, |_, _| {}) } - /// Request that the remote module invoke the reducer `insert_vec_u32` to run as soon as possible, + /// Request that the remote module invoke the reducer `insert_vec_u_32` to run as soon as possible, /// registering `callback` to run when we are notified that the reducer completed. /// /// This method returns immediately, and errors only if we are unable to send the request. diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_vec_u_32_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_vec_u_32_type.rs new file mode 100644 index 00000000000..10aff3bf785 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_vec_u_32_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct InsertVecU32 { + pub n: Vec, +} + +impl __sdk::InModule for InsertVecU32 { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_vec_u_64_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_vec_u_64_reducer.rs index 4ad982b1275..013aeab42ad 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_vec_u_64_reducer.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_vec_u_64_reducer.rs @@ -21,11 +21,11 @@ impl __sdk::InModule for InsertVecU64Args { } #[allow(non_camel_case_types)] -/// Extension trait for access to the reducer `insert_vec_u64`. +/// Extension trait for access to the reducer `insert_vec_u_64`. /// /// Implemented for [`super::RemoteReducers`]. pub trait insert_vec_u_64 { - /// Request that the remote module invoke the reducer `insert_vec_u64` to run as soon as possible. + /// Request that the remote module invoke the reducer `insert_vec_u_64` 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, @@ -35,7 +35,7 @@ pub trait insert_vec_u_64 { self.insert_vec_u_64_then(n, |_, _| {}) } - /// Request that the remote module invoke the reducer `insert_vec_u64` to run as soon as possible, + /// Request that the remote module invoke the reducer `insert_vec_u_64` to run as soon as possible, /// registering `callback` to run when we are notified that the reducer completed. /// /// This method returns immediately, and errors only if we are unable to send the request. diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_vec_u_64_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_vec_u_64_type.rs new file mode 100644 index 00000000000..a1b7de56458 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_vec_u_64_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct InsertVecU64 { + pub n: Vec, +} + +impl __sdk::InModule for InsertVecU64 { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_vec_u_8_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_vec_u_8_reducer.rs index d3db56cacf2..dbef8ca1ad9 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_vec_u_8_reducer.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_vec_u_8_reducer.rs @@ -21,11 +21,11 @@ impl __sdk::InModule for InsertVecU8Args { } #[allow(non_camel_case_types)] -/// Extension trait for access to the reducer `insert_vec_u8`. +/// Extension trait for access to the reducer `insert_vec_u_8`. /// /// Implemented for [`super::RemoteReducers`]. pub trait insert_vec_u_8 { - /// Request that the remote module invoke the reducer `insert_vec_u8` to run as soon as possible. + /// Request that the remote module invoke the reducer `insert_vec_u_8` 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, @@ -35,7 +35,7 @@ pub trait insert_vec_u_8 { self.insert_vec_u_8_then(n, |_, _| {}) } - /// Request that the remote module invoke the reducer `insert_vec_u8` to run as soon as possible, + /// Request that the remote module invoke the reducer `insert_vec_u_8` to run as soon as possible, /// registering `callback` to run when we are notified that the reducer completed. /// /// This method returns immediately, and errors only if we are unable to send the request. diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_vec_u_8_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_vec_u_8_type.rs new file mode 100644 index 00000000000..c418a6efba7 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_vec_u_8_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct InsertVecU8 { + pub n: Vec, +} + +impl __sdk::InModule for InsertVecU8 { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_vec_unit_struct_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_vec_unit_struct_type.rs new file mode 100644 index 00000000000..cd486e7b1fc --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_vec_unit_struct_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +use super::unit_struct_type::UnitStruct; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct InsertVecUnitStruct { + pub s: Vec, +} + +impl __sdk::InModule for InsertVecUnitStruct { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_vec_uuid_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_vec_uuid_type.rs new file mode 100644 index 00000000000..cc804552bab --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/insert_vec_uuid_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct InsertVecUuid { + pub u: Vec<__sdk::Uuid>, +} + +impl __sdk::InModule for InsertVecUuid { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/mod.rs b/sdks/rust/tests/test-client/src/module_bindings/mod.rs index aa02043ad19..3d18e82919f 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/mod.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/mod.rs @@ -1,7 +1,7 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE // WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. -// This was generated using spacetimedb cli version 2.0.0 (commit 9e0e81a6aaec6bf3619cfb9f7916743d86ab7ffc). +// This was generated using spacetimedb cli version 2.0.0 (commit 9ff95757316cdd120699ca8fcabecbd13eb24157). #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; @@ -10,43 +10,81 @@ pub mod b_tree_u_32_type; pub mod btree_u_32_table; pub mod byte_struct_type; pub mod delete_from_btree_u_32_reducer; +pub mod delete_from_btree_u_32_type; pub mod delete_large_table_reducer; +pub mod delete_large_table_type; pub mod delete_pk_bool_reducer; +pub mod delete_pk_bool_type; pub mod delete_pk_connection_id_reducer; +pub mod delete_pk_connection_id_type; pub mod delete_pk_i_128_reducer; +pub mod delete_pk_i_128_type; pub mod delete_pk_i_16_reducer; +pub mod delete_pk_i_16_type; pub mod delete_pk_i_256_reducer; +pub mod delete_pk_i_256_type; pub mod delete_pk_i_32_reducer; +pub mod delete_pk_i_32_type; pub mod delete_pk_i_64_reducer; +pub mod delete_pk_i_64_type; pub mod delete_pk_i_8_reducer; +pub mod delete_pk_i_8_type; pub mod delete_pk_identity_reducer; +pub mod delete_pk_identity_type; pub mod delete_pk_string_reducer; +pub mod delete_pk_string_type; pub mod delete_pk_u_128_reducer; +pub mod delete_pk_u_128_type; pub mod delete_pk_u_16_reducer; +pub mod delete_pk_u_16_type; pub mod delete_pk_u_256_reducer; +pub mod delete_pk_u_256_type; pub mod delete_pk_u_32_insert_pk_u_32_two_reducer; +pub mod delete_pk_u_32_insert_pk_u_32_two_type; pub mod delete_pk_u_32_reducer; pub mod delete_pk_u_32_two_reducer; +pub mod delete_pk_u_32_two_type; +pub mod delete_pk_u_32_type; pub mod delete_pk_u_64_reducer; +pub mod delete_pk_u_64_type; pub mod delete_pk_u_8_reducer; +pub mod delete_pk_u_8_type; pub mod delete_pk_uuid_reducer; +pub mod delete_pk_uuid_type; pub mod delete_unique_bool_reducer; +pub mod delete_unique_bool_type; pub mod delete_unique_connection_id_reducer; +pub mod delete_unique_connection_id_type; pub mod delete_unique_i_128_reducer; +pub mod delete_unique_i_128_type; pub mod delete_unique_i_16_reducer; +pub mod delete_unique_i_16_type; pub mod delete_unique_i_256_reducer; +pub mod delete_unique_i_256_type; pub mod delete_unique_i_32_reducer; +pub mod delete_unique_i_32_type; pub mod delete_unique_i_64_reducer; +pub mod delete_unique_i_64_type; pub mod delete_unique_i_8_reducer; +pub mod delete_unique_i_8_type; pub mod delete_unique_identity_reducer; +pub mod delete_unique_identity_type; pub mod delete_unique_string_reducer; +pub mod delete_unique_string_type; pub mod delete_unique_u_128_reducer; +pub mod delete_unique_u_128_type; pub mod delete_unique_u_16_reducer; +pub mod delete_unique_u_16_type; pub mod delete_unique_u_256_reducer; +pub mod delete_unique_u_256_type; pub mod delete_unique_u_32_reducer; +pub mod delete_unique_u_32_type; pub mod delete_unique_u_64_reducer; +pub mod delete_unique_u_64_type; pub mod delete_unique_u_8_reducer; +pub mod delete_unique_u_8_type; pub mod delete_unique_uuid_reducer; +pub mod delete_unique_uuid_type; pub mod enum_with_payload_type; pub mod every_primitive_struct_type; pub mod every_vec_struct_type; @@ -57,128 +95,249 @@ pub mod indexed_table_2_type; pub mod indexed_table_table; pub mod indexed_table_type; pub mod insert_call_timestamp_reducer; +pub mod insert_call_timestamp_type; pub mod insert_call_uuid_v_4_reducer; +pub mod insert_call_uuid_v_4_type; pub mod insert_call_uuid_v_7_reducer; +pub mod insert_call_uuid_v_7_type; pub mod insert_caller_one_connection_id_reducer; +pub mod insert_caller_one_connection_id_type; pub mod insert_caller_one_identity_reducer; +pub mod insert_caller_one_identity_type; pub mod insert_caller_pk_connection_id_reducer; +pub mod insert_caller_pk_connection_id_type; pub mod insert_caller_pk_identity_reducer; +pub mod insert_caller_pk_identity_type; pub mod insert_caller_unique_connection_id_reducer; +pub mod insert_caller_unique_connection_id_type; pub mod insert_caller_unique_identity_reducer; +pub mod insert_caller_unique_identity_type; pub mod insert_caller_vec_connection_id_reducer; +pub mod insert_caller_vec_connection_id_type; pub mod insert_caller_vec_identity_reducer; +pub mod insert_caller_vec_identity_type; pub mod insert_into_btree_u_32_reducer; +pub mod insert_into_btree_u_32_type; pub mod insert_into_indexed_simple_enum_reducer; +pub mod insert_into_indexed_simple_enum_type; pub mod insert_into_pk_btree_u_32_reducer; +pub mod insert_into_pk_btree_u_32_type; pub mod insert_large_table_reducer; +pub mod insert_large_table_type; pub mod insert_one_bool_reducer; +pub mod insert_one_bool_type; pub mod insert_one_byte_struct_reducer; +pub mod insert_one_byte_struct_type; pub mod insert_one_connection_id_reducer; +pub mod insert_one_connection_id_type; pub mod insert_one_enum_with_payload_reducer; +pub mod insert_one_enum_with_payload_type; pub mod insert_one_every_primitive_struct_reducer; +pub mod insert_one_every_primitive_struct_type; pub mod insert_one_every_vec_struct_reducer; +pub mod insert_one_every_vec_struct_type; pub mod insert_one_f_32_reducer; +pub mod insert_one_f_32_type; pub mod insert_one_f_64_reducer; +pub mod insert_one_f_64_type; pub mod insert_one_i_128_reducer; +pub mod insert_one_i_128_type; pub mod insert_one_i_16_reducer; +pub mod insert_one_i_16_type; pub mod insert_one_i_256_reducer; +pub mod insert_one_i_256_type; pub mod insert_one_i_32_reducer; +pub mod insert_one_i_32_type; pub mod insert_one_i_64_reducer; +pub mod insert_one_i_64_type; pub mod insert_one_i_8_reducer; +pub mod insert_one_i_8_type; pub mod insert_one_identity_reducer; +pub mod insert_one_identity_type; pub mod insert_one_simple_enum_reducer; +pub mod insert_one_simple_enum_type; pub mod insert_one_string_reducer; +pub mod insert_one_string_type; pub mod insert_one_timestamp_reducer; +pub mod insert_one_timestamp_type; pub mod insert_one_u_128_reducer; +pub mod insert_one_u_128_type; pub mod insert_one_u_16_reducer; +pub mod insert_one_u_16_type; pub mod insert_one_u_256_reducer; +pub mod insert_one_u_256_type; pub mod insert_one_u_32_reducer; +pub mod insert_one_u_32_type; pub mod insert_one_u_64_reducer; +pub mod insert_one_u_64_type; pub mod insert_one_u_8_reducer; +pub mod insert_one_u_8_type; pub mod insert_one_unit_struct_reducer; +pub mod insert_one_unit_struct_type; pub mod insert_one_uuid_reducer; +pub mod insert_one_uuid_type; pub mod insert_option_every_primitive_struct_reducer; +pub mod insert_option_every_primitive_struct_type; pub mod insert_option_i_32_reducer; +pub mod insert_option_i_32_type; pub mod insert_option_identity_reducer; +pub mod insert_option_identity_type; pub mod insert_option_simple_enum_reducer; +pub mod insert_option_simple_enum_type; pub mod insert_option_string_reducer; +pub mod insert_option_string_type; pub mod insert_option_uuid_reducer; +pub mod insert_option_uuid_type; pub mod insert_option_vec_option_i_32_reducer; +pub mod insert_option_vec_option_i_32_type; pub mod insert_pk_bool_reducer; +pub mod insert_pk_bool_type; pub mod insert_pk_connection_id_reducer; +pub mod insert_pk_connection_id_type; pub mod insert_pk_i_128_reducer; +pub mod insert_pk_i_128_type; pub mod insert_pk_i_16_reducer; +pub mod insert_pk_i_16_type; pub mod insert_pk_i_256_reducer; +pub mod insert_pk_i_256_type; pub mod insert_pk_i_32_reducer; +pub mod insert_pk_i_32_type; pub mod insert_pk_i_64_reducer; +pub mod insert_pk_i_64_type; pub mod insert_pk_i_8_reducer; +pub mod insert_pk_i_8_type; pub mod insert_pk_identity_reducer; +pub mod insert_pk_identity_type; pub mod insert_pk_simple_enum_reducer; +pub mod insert_pk_simple_enum_type; pub mod insert_pk_string_reducer; +pub mod insert_pk_string_type; pub mod insert_pk_u_128_reducer; +pub mod insert_pk_u_128_type; pub mod insert_pk_u_16_reducer; +pub mod insert_pk_u_16_type; pub mod insert_pk_u_256_reducer; +pub mod insert_pk_u_256_type; pub mod insert_pk_u_32_reducer; pub mod insert_pk_u_32_two_reducer; +pub mod insert_pk_u_32_two_type; +pub mod insert_pk_u_32_type; pub mod insert_pk_u_64_reducer; +pub mod insert_pk_u_64_type; pub mod insert_pk_u_8_reducer; +pub mod insert_pk_u_8_type; pub mod insert_pk_uuid_reducer; +pub mod insert_pk_uuid_type; pub mod insert_primitives_as_strings_reducer; +pub mod insert_primitives_as_strings_type; pub mod insert_result_every_primitive_struct_string_reducer; +pub mod insert_result_every_primitive_struct_string_type; pub mod insert_result_i_32_string_reducer; +pub mod insert_result_i_32_string_type; pub mod insert_result_identity_string_reducer; +pub mod insert_result_identity_string_type; pub mod insert_result_simple_enum_i_32_reducer; +pub mod insert_result_simple_enum_i_32_type; pub mod insert_result_string_i_32_reducer; +pub mod insert_result_string_i_32_type; pub mod insert_result_vec_i_32_string_reducer; +pub mod insert_result_vec_i_32_string_type; pub mod insert_table_holds_table_reducer; +pub mod insert_table_holds_table_type; pub mod insert_unique_bool_reducer; +pub mod insert_unique_bool_type; pub mod insert_unique_connection_id_reducer; +pub mod insert_unique_connection_id_type; pub mod insert_unique_i_128_reducer; +pub mod insert_unique_i_128_type; pub mod insert_unique_i_16_reducer; +pub mod insert_unique_i_16_type; pub mod insert_unique_i_256_reducer; +pub mod insert_unique_i_256_type; pub mod insert_unique_i_32_reducer; +pub mod insert_unique_i_32_type; pub mod insert_unique_i_64_reducer; +pub mod insert_unique_i_64_type; pub mod insert_unique_i_8_reducer; +pub mod insert_unique_i_8_type; pub mod insert_unique_identity_reducer; +pub mod insert_unique_identity_type; pub mod insert_unique_string_reducer; +pub mod insert_unique_string_type; pub mod insert_unique_u_128_reducer; +pub mod insert_unique_u_128_type; pub mod insert_unique_u_16_reducer; +pub mod insert_unique_u_16_type; pub mod insert_unique_u_256_reducer; +pub mod insert_unique_u_256_type; pub mod insert_unique_u_32_reducer; +pub mod insert_unique_u_32_type; pub mod insert_unique_u_32_update_pk_u_32_reducer; +pub mod insert_unique_u_32_update_pk_u_32_type; pub mod insert_unique_u_64_reducer; +pub mod insert_unique_u_64_type; pub mod insert_unique_u_8_reducer; +pub mod insert_unique_u_8_type; pub mod insert_unique_uuid_reducer; +pub mod insert_unique_uuid_type; pub mod insert_user_reducer; +pub mod insert_user_type; pub mod insert_vec_bool_reducer; +pub mod insert_vec_bool_type; pub mod insert_vec_byte_struct_reducer; +pub mod insert_vec_byte_struct_type; pub mod insert_vec_connection_id_reducer; +pub mod insert_vec_connection_id_type; pub mod insert_vec_enum_with_payload_reducer; +pub mod insert_vec_enum_with_payload_type; pub mod insert_vec_every_primitive_struct_reducer; +pub mod insert_vec_every_primitive_struct_type; pub mod insert_vec_every_vec_struct_reducer; +pub mod insert_vec_every_vec_struct_type; pub mod insert_vec_f_32_reducer; +pub mod insert_vec_f_32_type; pub mod insert_vec_f_64_reducer; +pub mod insert_vec_f_64_type; pub mod insert_vec_i_128_reducer; +pub mod insert_vec_i_128_type; pub mod insert_vec_i_16_reducer; +pub mod insert_vec_i_16_type; pub mod insert_vec_i_256_reducer; +pub mod insert_vec_i_256_type; pub mod insert_vec_i_32_reducer; +pub mod insert_vec_i_32_type; pub mod insert_vec_i_64_reducer; +pub mod insert_vec_i_64_type; pub mod insert_vec_i_8_reducer; +pub mod insert_vec_i_8_type; pub mod insert_vec_identity_reducer; +pub mod insert_vec_identity_type; pub mod insert_vec_simple_enum_reducer; +pub mod insert_vec_simple_enum_type; pub mod insert_vec_string_reducer; +pub mod insert_vec_string_type; pub mod insert_vec_timestamp_reducer; +pub mod insert_vec_timestamp_type; pub mod insert_vec_u_128_reducer; +pub mod insert_vec_u_128_type; pub mod insert_vec_u_16_reducer; +pub mod insert_vec_u_16_type; pub mod insert_vec_u_256_reducer; +pub mod insert_vec_u_256_type; pub mod insert_vec_u_32_reducer; +pub mod insert_vec_u_32_type; pub mod insert_vec_u_64_reducer; +pub mod insert_vec_u_64_type; pub mod insert_vec_u_8_reducer; +pub mod insert_vec_u_8_type; pub mod insert_vec_unit_struct_reducer; +pub mod insert_vec_unit_struct_type; pub mod insert_vec_uuid_reducer; +pub mod insert_vec_uuid_type; pub mod large_table_table; pub mod large_table_type; pub mod no_op_succeeds_reducer; +pub mod no_op_succeeds_type; pub mod one_bool_table; pub mod one_bool_type; pub mod one_byte_struct_table; @@ -298,8 +457,10 @@ pub mod result_vec_i_32_string_type; pub mod scheduled_table_table; pub mod scheduled_table_type; pub mod send_scheduled_message_reducer; +pub mod send_scheduled_message_type; pub mod simple_enum_type; pub mod sorted_uuids_insert_reducer; +pub mod sorted_uuids_insert_type; pub mod table_holds_table_table; pub mod table_holds_table_type; pub mod unique_bool_table; @@ -338,42 +499,79 @@ pub mod unique_uuid_table; pub mod unique_uuid_type; pub mod unit_struct_type; pub mod update_indexed_simple_enum_reducer; +pub mod update_indexed_simple_enum_type; pub mod update_pk_bool_reducer; +pub mod update_pk_bool_type; pub mod update_pk_connection_id_reducer; +pub mod update_pk_connection_id_type; pub mod update_pk_i_128_reducer; +pub mod update_pk_i_128_type; pub mod update_pk_i_16_reducer; +pub mod update_pk_i_16_type; pub mod update_pk_i_256_reducer; +pub mod update_pk_i_256_type; pub mod update_pk_i_32_reducer; +pub mod update_pk_i_32_type; pub mod update_pk_i_64_reducer; +pub mod update_pk_i_64_type; pub mod update_pk_i_8_reducer; +pub mod update_pk_i_8_type; pub mod update_pk_identity_reducer; +pub mod update_pk_identity_type; pub mod update_pk_simple_enum_reducer; +pub mod update_pk_simple_enum_type; pub mod update_pk_string_reducer; +pub mod update_pk_string_type; pub mod update_pk_u_128_reducer; +pub mod update_pk_u_128_type; pub mod update_pk_u_16_reducer; +pub mod update_pk_u_16_type; pub mod update_pk_u_256_reducer; +pub mod update_pk_u_256_type; pub mod update_pk_u_32_reducer; pub mod update_pk_u_32_two_reducer; +pub mod update_pk_u_32_two_type; +pub mod update_pk_u_32_type; pub mod update_pk_u_64_reducer; +pub mod update_pk_u_64_type; pub mod update_pk_u_8_reducer; +pub mod update_pk_u_8_type; pub mod update_pk_uuid_reducer; +pub mod update_pk_uuid_type; pub mod update_unique_bool_reducer; +pub mod update_unique_bool_type; pub mod update_unique_connection_id_reducer; +pub mod update_unique_connection_id_type; pub mod update_unique_i_128_reducer; +pub mod update_unique_i_128_type; pub mod update_unique_i_16_reducer; +pub mod update_unique_i_16_type; pub mod update_unique_i_256_reducer; +pub mod update_unique_i_256_type; pub mod update_unique_i_32_reducer; +pub mod update_unique_i_32_type; pub mod update_unique_i_64_reducer; +pub mod update_unique_i_64_type; pub mod update_unique_i_8_reducer; +pub mod update_unique_i_8_type; pub mod update_unique_identity_reducer; +pub mod update_unique_identity_type; pub mod update_unique_string_reducer; +pub mod update_unique_string_type; pub mod update_unique_u_128_reducer; +pub mod update_unique_u_128_type; pub mod update_unique_u_16_reducer; +pub mod update_unique_u_16_type; pub mod update_unique_u_256_reducer; +pub mod update_unique_u_256_type; pub mod update_unique_u_32_reducer; +pub mod update_unique_u_32_type; pub mod update_unique_u_64_reducer; +pub mod update_unique_u_64_type; pub mod update_unique_u_8_reducer; +pub mod update_unique_u_8_type; pub mod update_unique_uuid_reducer; +pub mod update_unique_uuid_type; pub mod users_table; pub mod users_type; pub mod vec_bool_table; @@ -433,43 +631,81 @@ pub use b_tree_u_32_type::BTreeU32; pub use btree_u_32_table::*; pub use byte_struct_type::ByteStruct; pub use delete_from_btree_u_32_reducer::delete_from_btree_u_32; +pub use delete_from_btree_u_32_type::DeleteFromBtreeU32; pub use delete_large_table_reducer::delete_large_table; +pub use delete_large_table_type::DeleteLargeTable; pub use delete_pk_bool_reducer::delete_pk_bool; +pub use delete_pk_bool_type::DeletePkBool; pub use delete_pk_connection_id_reducer::delete_pk_connection_id; +pub use delete_pk_connection_id_type::DeletePkConnectionId; pub use delete_pk_i_128_reducer::delete_pk_i_128; +pub use delete_pk_i_128_type::DeletePkI128; pub use delete_pk_i_16_reducer::delete_pk_i_16; +pub use delete_pk_i_16_type::DeletePkI16; pub use delete_pk_i_256_reducer::delete_pk_i_256; +pub use delete_pk_i_256_type::DeletePkI256; pub use delete_pk_i_32_reducer::delete_pk_i_32; +pub use delete_pk_i_32_type::DeletePkI32; pub use delete_pk_i_64_reducer::delete_pk_i_64; +pub use delete_pk_i_64_type::DeletePkI64; pub use delete_pk_i_8_reducer::delete_pk_i_8; +pub use delete_pk_i_8_type::DeletePkI8; pub use delete_pk_identity_reducer::delete_pk_identity; +pub use delete_pk_identity_type::DeletePkIdentity; pub use delete_pk_string_reducer::delete_pk_string; +pub use delete_pk_string_type::DeletePkString; pub use delete_pk_u_128_reducer::delete_pk_u_128; +pub use delete_pk_u_128_type::DeletePkU128; pub use delete_pk_u_16_reducer::delete_pk_u_16; +pub use delete_pk_u_16_type::DeletePkU16; pub use delete_pk_u_256_reducer::delete_pk_u_256; +pub use delete_pk_u_256_type::DeletePkU256; pub use delete_pk_u_32_insert_pk_u_32_two_reducer::delete_pk_u_32_insert_pk_u_32_two; +pub use delete_pk_u_32_insert_pk_u_32_two_type::DeletePkU32InsertPkU32Two; pub use delete_pk_u_32_reducer::delete_pk_u_32; pub use delete_pk_u_32_two_reducer::delete_pk_u_32_two; +pub use delete_pk_u_32_two_type::DeletePkU32Two; +pub use delete_pk_u_32_type::DeletePkU32; pub use delete_pk_u_64_reducer::delete_pk_u_64; +pub use delete_pk_u_64_type::DeletePkU64; pub use delete_pk_u_8_reducer::delete_pk_u_8; +pub use delete_pk_u_8_type::DeletePkU8; pub use delete_pk_uuid_reducer::delete_pk_uuid; +pub use delete_pk_uuid_type::DeletePkUuid; pub use delete_unique_bool_reducer::delete_unique_bool; +pub use delete_unique_bool_type::DeleteUniqueBool; pub use delete_unique_connection_id_reducer::delete_unique_connection_id; +pub use delete_unique_connection_id_type::DeleteUniqueConnectionId; pub use delete_unique_i_128_reducer::delete_unique_i_128; +pub use delete_unique_i_128_type::DeleteUniqueI128; pub use delete_unique_i_16_reducer::delete_unique_i_16; +pub use delete_unique_i_16_type::DeleteUniqueI16; pub use delete_unique_i_256_reducer::delete_unique_i_256; +pub use delete_unique_i_256_type::DeleteUniqueI256; pub use delete_unique_i_32_reducer::delete_unique_i_32; +pub use delete_unique_i_32_type::DeleteUniqueI32; pub use delete_unique_i_64_reducer::delete_unique_i_64; +pub use delete_unique_i_64_type::DeleteUniqueI64; pub use delete_unique_i_8_reducer::delete_unique_i_8; +pub use delete_unique_i_8_type::DeleteUniqueI8; pub use delete_unique_identity_reducer::delete_unique_identity; +pub use delete_unique_identity_type::DeleteUniqueIdentity; pub use delete_unique_string_reducer::delete_unique_string; +pub use delete_unique_string_type::DeleteUniqueString; pub use delete_unique_u_128_reducer::delete_unique_u_128; +pub use delete_unique_u_128_type::DeleteUniqueU128; pub use delete_unique_u_16_reducer::delete_unique_u_16; +pub use delete_unique_u_16_type::DeleteUniqueU16; pub use delete_unique_u_256_reducer::delete_unique_u_256; +pub use delete_unique_u_256_type::DeleteUniqueU256; pub use delete_unique_u_32_reducer::delete_unique_u_32; +pub use delete_unique_u_32_type::DeleteUniqueU32; pub use delete_unique_u_64_reducer::delete_unique_u_64; +pub use delete_unique_u_64_type::DeleteUniqueU64; pub use delete_unique_u_8_reducer::delete_unique_u_8; +pub use delete_unique_u_8_type::DeleteUniqueU8; pub use delete_unique_uuid_reducer::delete_unique_uuid; +pub use delete_unique_uuid_type::DeleteUniqueUuid; pub use enum_with_payload_type::EnumWithPayload; pub use every_primitive_struct_type::EveryPrimitiveStruct; pub use every_vec_struct_type::EveryVecStruct; @@ -480,128 +716,249 @@ pub use indexed_table_2_type::IndexedTable2; pub use indexed_table_table::*; pub use indexed_table_type::IndexedTable; pub use insert_call_timestamp_reducer::insert_call_timestamp; +pub use insert_call_timestamp_type::InsertCallTimestamp; pub use insert_call_uuid_v_4_reducer::insert_call_uuid_v_4; +pub use insert_call_uuid_v_4_type::InsertCallUuidV4; pub use insert_call_uuid_v_7_reducer::insert_call_uuid_v_7; +pub use insert_call_uuid_v_7_type::InsertCallUuidV7; pub use insert_caller_one_connection_id_reducer::insert_caller_one_connection_id; +pub use insert_caller_one_connection_id_type::InsertCallerOneConnectionId; pub use insert_caller_one_identity_reducer::insert_caller_one_identity; +pub use insert_caller_one_identity_type::InsertCallerOneIdentity; pub use insert_caller_pk_connection_id_reducer::insert_caller_pk_connection_id; +pub use insert_caller_pk_connection_id_type::InsertCallerPkConnectionId; pub use insert_caller_pk_identity_reducer::insert_caller_pk_identity; +pub use insert_caller_pk_identity_type::InsertCallerPkIdentity; pub use insert_caller_unique_connection_id_reducer::insert_caller_unique_connection_id; +pub use insert_caller_unique_connection_id_type::InsertCallerUniqueConnectionId; pub use insert_caller_unique_identity_reducer::insert_caller_unique_identity; +pub use insert_caller_unique_identity_type::InsertCallerUniqueIdentity; pub use insert_caller_vec_connection_id_reducer::insert_caller_vec_connection_id; +pub use insert_caller_vec_connection_id_type::InsertCallerVecConnectionId; pub use insert_caller_vec_identity_reducer::insert_caller_vec_identity; +pub use insert_caller_vec_identity_type::InsertCallerVecIdentity; pub use insert_into_btree_u_32_reducer::insert_into_btree_u_32; +pub use insert_into_btree_u_32_type::InsertIntoBtreeU32; pub use insert_into_indexed_simple_enum_reducer::insert_into_indexed_simple_enum; +pub use insert_into_indexed_simple_enum_type::InsertIntoIndexedSimpleEnum; pub use insert_into_pk_btree_u_32_reducer::insert_into_pk_btree_u_32; +pub use insert_into_pk_btree_u_32_type::InsertIntoPkBtreeU32; pub use insert_large_table_reducer::insert_large_table; +pub use insert_large_table_type::InsertLargeTable; pub use insert_one_bool_reducer::insert_one_bool; +pub use insert_one_bool_type::InsertOneBool; pub use insert_one_byte_struct_reducer::insert_one_byte_struct; +pub use insert_one_byte_struct_type::InsertOneByteStruct; pub use insert_one_connection_id_reducer::insert_one_connection_id; +pub use insert_one_connection_id_type::InsertOneConnectionId; pub use insert_one_enum_with_payload_reducer::insert_one_enum_with_payload; +pub use insert_one_enum_with_payload_type::InsertOneEnumWithPayload; pub use insert_one_every_primitive_struct_reducer::insert_one_every_primitive_struct; +pub use insert_one_every_primitive_struct_type::InsertOneEveryPrimitiveStruct; pub use insert_one_every_vec_struct_reducer::insert_one_every_vec_struct; +pub use insert_one_every_vec_struct_type::InsertOneEveryVecStruct; pub use insert_one_f_32_reducer::insert_one_f_32; +pub use insert_one_f_32_type::InsertOneF32; pub use insert_one_f_64_reducer::insert_one_f_64; +pub use insert_one_f_64_type::InsertOneF64; pub use insert_one_i_128_reducer::insert_one_i_128; +pub use insert_one_i_128_type::InsertOneI128; pub use insert_one_i_16_reducer::insert_one_i_16; +pub use insert_one_i_16_type::InsertOneI16; pub use insert_one_i_256_reducer::insert_one_i_256; +pub use insert_one_i_256_type::InsertOneI256; pub use insert_one_i_32_reducer::insert_one_i_32; +pub use insert_one_i_32_type::InsertOneI32; pub use insert_one_i_64_reducer::insert_one_i_64; +pub use insert_one_i_64_type::InsertOneI64; pub use insert_one_i_8_reducer::insert_one_i_8; +pub use insert_one_i_8_type::InsertOneI8; pub use insert_one_identity_reducer::insert_one_identity; +pub use insert_one_identity_type::InsertOneIdentity; pub use insert_one_simple_enum_reducer::insert_one_simple_enum; +pub use insert_one_simple_enum_type::InsertOneSimpleEnum; pub use insert_one_string_reducer::insert_one_string; +pub use insert_one_string_type::InsertOneString; pub use insert_one_timestamp_reducer::insert_one_timestamp; +pub use insert_one_timestamp_type::InsertOneTimestamp; pub use insert_one_u_128_reducer::insert_one_u_128; +pub use insert_one_u_128_type::InsertOneU128; pub use insert_one_u_16_reducer::insert_one_u_16; +pub use insert_one_u_16_type::InsertOneU16; pub use insert_one_u_256_reducer::insert_one_u_256; +pub use insert_one_u_256_type::InsertOneU256; pub use insert_one_u_32_reducer::insert_one_u_32; +pub use insert_one_u_32_type::InsertOneU32; pub use insert_one_u_64_reducer::insert_one_u_64; +pub use insert_one_u_64_type::InsertOneU64; pub use insert_one_u_8_reducer::insert_one_u_8; +pub use insert_one_u_8_type::InsertOneU8; pub use insert_one_unit_struct_reducer::insert_one_unit_struct; +pub use insert_one_unit_struct_type::InsertOneUnitStruct; pub use insert_one_uuid_reducer::insert_one_uuid; +pub use insert_one_uuid_type::InsertOneUuid; pub use insert_option_every_primitive_struct_reducer::insert_option_every_primitive_struct; +pub use insert_option_every_primitive_struct_type::InsertOptionEveryPrimitiveStruct; pub use insert_option_i_32_reducer::insert_option_i_32; +pub use insert_option_i_32_type::InsertOptionI32; pub use insert_option_identity_reducer::insert_option_identity; +pub use insert_option_identity_type::InsertOptionIdentity; pub use insert_option_simple_enum_reducer::insert_option_simple_enum; +pub use insert_option_simple_enum_type::InsertOptionSimpleEnum; pub use insert_option_string_reducer::insert_option_string; +pub use insert_option_string_type::InsertOptionString; pub use insert_option_uuid_reducer::insert_option_uuid; +pub use insert_option_uuid_type::InsertOptionUuid; pub use insert_option_vec_option_i_32_reducer::insert_option_vec_option_i_32; +pub use insert_option_vec_option_i_32_type::InsertOptionVecOptionI32; pub use insert_pk_bool_reducer::insert_pk_bool; +pub use insert_pk_bool_type::InsertPkBool; pub use insert_pk_connection_id_reducer::insert_pk_connection_id; +pub use insert_pk_connection_id_type::InsertPkConnectionId; pub use insert_pk_i_128_reducer::insert_pk_i_128; +pub use insert_pk_i_128_type::InsertPkI128; pub use insert_pk_i_16_reducer::insert_pk_i_16; +pub use insert_pk_i_16_type::InsertPkI16; pub use insert_pk_i_256_reducer::insert_pk_i_256; +pub use insert_pk_i_256_type::InsertPkI256; pub use insert_pk_i_32_reducer::insert_pk_i_32; +pub use insert_pk_i_32_type::InsertPkI32; pub use insert_pk_i_64_reducer::insert_pk_i_64; +pub use insert_pk_i_64_type::InsertPkI64; pub use insert_pk_i_8_reducer::insert_pk_i_8; +pub use insert_pk_i_8_type::InsertPkI8; pub use insert_pk_identity_reducer::insert_pk_identity; +pub use insert_pk_identity_type::InsertPkIdentity; pub use insert_pk_simple_enum_reducer::insert_pk_simple_enum; +pub use insert_pk_simple_enum_type::InsertPkSimpleEnum; pub use insert_pk_string_reducer::insert_pk_string; +pub use insert_pk_string_type::InsertPkString; pub use insert_pk_u_128_reducer::insert_pk_u_128; +pub use insert_pk_u_128_type::InsertPkU128; pub use insert_pk_u_16_reducer::insert_pk_u_16; +pub use insert_pk_u_16_type::InsertPkU16; pub use insert_pk_u_256_reducer::insert_pk_u_256; +pub use insert_pk_u_256_type::InsertPkU256; pub use insert_pk_u_32_reducer::insert_pk_u_32; pub use insert_pk_u_32_two_reducer::insert_pk_u_32_two; +pub use insert_pk_u_32_two_type::InsertPkU32Two; +pub use insert_pk_u_32_type::InsertPkU32; pub use insert_pk_u_64_reducer::insert_pk_u_64; +pub use insert_pk_u_64_type::InsertPkU64; pub use insert_pk_u_8_reducer::insert_pk_u_8; +pub use insert_pk_u_8_type::InsertPkU8; pub use insert_pk_uuid_reducer::insert_pk_uuid; +pub use insert_pk_uuid_type::InsertPkUuid; pub use insert_primitives_as_strings_reducer::insert_primitives_as_strings; +pub use insert_primitives_as_strings_type::InsertPrimitivesAsStrings; pub use insert_result_every_primitive_struct_string_reducer::insert_result_every_primitive_struct_string; +pub use insert_result_every_primitive_struct_string_type::InsertResultEveryPrimitiveStructString; pub use insert_result_i_32_string_reducer::insert_result_i_32_string; +pub use insert_result_i_32_string_type::InsertResultI32String; pub use insert_result_identity_string_reducer::insert_result_identity_string; +pub use insert_result_identity_string_type::InsertResultIdentityString; pub use insert_result_simple_enum_i_32_reducer::insert_result_simple_enum_i_32; +pub use insert_result_simple_enum_i_32_type::InsertResultSimpleEnumI32; pub use insert_result_string_i_32_reducer::insert_result_string_i_32; +pub use insert_result_string_i_32_type::InsertResultStringI32; pub use insert_result_vec_i_32_string_reducer::insert_result_vec_i_32_string; +pub use insert_result_vec_i_32_string_type::InsertResultVecI32String; pub use insert_table_holds_table_reducer::insert_table_holds_table; +pub use insert_table_holds_table_type::InsertTableHoldsTable; pub use insert_unique_bool_reducer::insert_unique_bool; +pub use insert_unique_bool_type::InsertUniqueBool; pub use insert_unique_connection_id_reducer::insert_unique_connection_id; +pub use insert_unique_connection_id_type::InsertUniqueConnectionId; pub use insert_unique_i_128_reducer::insert_unique_i_128; +pub use insert_unique_i_128_type::InsertUniqueI128; pub use insert_unique_i_16_reducer::insert_unique_i_16; +pub use insert_unique_i_16_type::InsertUniqueI16; pub use insert_unique_i_256_reducer::insert_unique_i_256; +pub use insert_unique_i_256_type::InsertUniqueI256; pub use insert_unique_i_32_reducer::insert_unique_i_32; +pub use insert_unique_i_32_type::InsertUniqueI32; pub use insert_unique_i_64_reducer::insert_unique_i_64; +pub use insert_unique_i_64_type::InsertUniqueI64; pub use insert_unique_i_8_reducer::insert_unique_i_8; +pub use insert_unique_i_8_type::InsertUniqueI8; pub use insert_unique_identity_reducer::insert_unique_identity; +pub use insert_unique_identity_type::InsertUniqueIdentity; pub use insert_unique_string_reducer::insert_unique_string; +pub use insert_unique_string_type::InsertUniqueString; pub use insert_unique_u_128_reducer::insert_unique_u_128; +pub use insert_unique_u_128_type::InsertUniqueU128; pub use insert_unique_u_16_reducer::insert_unique_u_16; +pub use insert_unique_u_16_type::InsertUniqueU16; pub use insert_unique_u_256_reducer::insert_unique_u_256; +pub use insert_unique_u_256_type::InsertUniqueU256; pub use insert_unique_u_32_reducer::insert_unique_u_32; +pub use insert_unique_u_32_type::InsertUniqueU32; pub use insert_unique_u_32_update_pk_u_32_reducer::insert_unique_u_32_update_pk_u_32; +pub use insert_unique_u_32_update_pk_u_32_type::InsertUniqueU32UpdatePkU32; pub use insert_unique_u_64_reducer::insert_unique_u_64; +pub use insert_unique_u_64_type::InsertUniqueU64; pub use insert_unique_u_8_reducer::insert_unique_u_8; +pub use insert_unique_u_8_type::InsertUniqueU8; pub use insert_unique_uuid_reducer::insert_unique_uuid; +pub use insert_unique_uuid_type::InsertUniqueUuid; pub use insert_user_reducer::insert_user; +pub use insert_user_type::InsertUser; pub use insert_vec_bool_reducer::insert_vec_bool; +pub use insert_vec_bool_type::InsertVecBool; pub use insert_vec_byte_struct_reducer::insert_vec_byte_struct; +pub use insert_vec_byte_struct_type::InsertVecByteStruct; pub use insert_vec_connection_id_reducer::insert_vec_connection_id; +pub use insert_vec_connection_id_type::InsertVecConnectionId; pub use insert_vec_enum_with_payload_reducer::insert_vec_enum_with_payload; +pub use insert_vec_enum_with_payload_type::InsertVecEnumWithPayload; pub use insert_vec_every_primitive_struct_reducer::insert_vec_every_primitive_struct; +pub use insert_vec_every_primitive_struct_type::InsertVecEveryPrimitiveStruct; pub use insert_vec_every_vec_struct_reducer::insert_vec_every_vec_struct; +pub use insert_vec_every_vec_struct_type::InsertVecEveryVecStruct; pub use insert_vec_f_32_reducer::insert_vec_f_32; +pub use insert_vec_f_32_type::InsertVecF32; pub use insert_vec_f_64_reducer::insert_vec_f_64; +pub use insert_vec_f_64_type::InsertVecF64; pub use insert_vec_i_128_reducer::insert_vec_i_128; +pub use insert_vec_i_128_type::InsertVecI128; pub use insert_vec_i_16_reducer::insert_vec_i_16; +pub use insert_vec_i_16_type::InsertVecI16; pub use insert_vec_i_256_reducer::insert_vec_i_256; +pub use insert_vec_i_256_type::InsertVecI256; pub use insert_vec_i_32_reducer::insert_vec_i_32; +pub use insert_vec_i_32_type::InsertVecI32; pub use insert_vec_i_64_reducer::insert_vec_i_64; +pub use insert_vec_i_64_type::InsertVecI64; pub use insert_vec_i_8_reducer::insert_vec_i_8; +pub use insert_vec_i_8_type::InsertVecI8; pub use insert_vec_identity_reducer::insert_vec_identity; +pub use insert_vec_identity_type::InsertVecIdentity; pub use insert_vec_simple_enum_reducer::insert_vec_simple_enum; +pub use insert_vec_simple_enum_type::InsertVecSimpleEnum; pub use insert_vec_string_reducer::insert_vec_string; +pub use insert_vec_string_type::InsertVecString; pub use insert_vec_timestamp_reducer::insert_vec_timestamp; +pub use insert_vec_timestamp_type::InsertVecTimestamp; pub use insert_vec_u_128_reducer::insert_vec_u_128; +pub use insert_vec_u_128_type::InsertVecU128; pub use insert_vec_u_16_reducer::insert_vec_u_16; +pub use insert_vec_u_16_type::InsertVecU16; pub use insert_vec_u_256_reducer::insert_vec_u_256; +pub use insert_vec_u_256_type::InsertVecU256; pub use insert_vec_u_32_reducer::insert_vec_u_32; +pub use insert_vec_u_32_type::InsertVecU32; pub use insert_vec_u_64_reducer::insert_vec_u_64; +pub use insert_vec_u_64_type::InsertVecU64; pub use insert_vec_u_8_reducer::insert_vec_u_8; +pub use insert_vec_u_8_type::InsertVecU8; pub use insert_vec_unit_struct_reducer::insert_vec_unit_struct; +pub use insert_vec_unit_struct_type::InsertVecUnitStruct; pub use insert_vec_uuid_reducer::insert_vec_uuid; +pub use insert_vec_uuid_type::InsertVecUuid; pub use large_table_table::*; pub use large_table_type::LargeTable; pub use no_op_succeeds_reducer::no_op_succeeds; +pub use no_op_succeeds_type::NoOpSucceeds; pub use one_bool_table::*; pub use one_bool_type::OneBool; pub use one_byte_struct_table::*; @@ -721,8 +1078,10 @@ pub use result_vec_i_32_string_type::ResultVecI32String; pub use scheduled_table_table::*; pub use scheduled_table_type::ScheduledTable; pub use send_scheduled_message_reducer::send_scheduled_message; +pub use send_scheduled_message_type::SendScheduledMessage; pub use simple_enum_type::SimpleEnum; pub use sorted_uuids_insert_reducer::sorted_uuids_insert; +pub use sorted_uuids_insert_type::SortedUuidsInsert; pub use table_holds_table_table::*; pub use table_holds_table_type::TableHoldsTable; pub use unique_bool_table::*; @@ -761,42 +1120,79 @@ pub use unique_uuid_table::*; pub use unique_uuid_type::UniqueUuid; pub use unit_struct_type::UnitStruct; pub use update_indexed_simple_enum_reducer::update_indexed_simple_enum; +pub use update_indexed_simple_enum_type::UpdateIndexedSimpleEnum; pub use update_pk_bool_reducer::update_pk_bool; +pub use update_pk_bool_type::UpdatePkBool; pub use update_pk_connection_id_reducer::update_pk_connection_id; +pub use update_pk_connection_id_type::UpdatePkConnectionId; pub use update_pk_i_128_reducer::update_pk_i_128; +pub use update_pk_i_128_type::UpdatePkI128; pub use update_pk_i_16_reducer::update_pk_i_16; +pub use update_pk_i_16_type::UpdatePkI16; pub use update_pk_i_256_reducer::update_pk_i_256; +pub use update_pk_i_256_type::UpdatePkI256; pub use update_pk_i_32_reducer::update_pk_i_32; +pub use update_pk_i_32_type::UpdatePkI32; pub use update_pk_i_64_reducer::update_pk_i_64; +pub use update_pk_i_64_type::UpdatePkI64; pub use update_pk_i_8_reducer::update_pk_i_8; +pub use update_pk_i_8_type::UpdatePkI8; pub use update_pk_identity_reducer::update_pk_identity; +pub use update_pk_identity_type::UpdatePkIdentity; pub use update_pk_simple_enum_reducer::update_pk_simple_enum; +pub use update_pk_simple_enum_type::UpdatePkSimpleEnum; pub use update_pk_string_reducer::update_pk_string; +pub use update_pk_string_type::UpdatePkString; pub use update_pk_u_128_reducer::update_pk_u_128; +pub use update_pk_u_128_type::UpdatePkU128; pub use update_pk_u_16_reducer::update_pk_u_16; +pub use update_pk_u_16_type::UpdatePkU16; pub use update_pk_u_256_reducer::update_pk_u_256; +pub use update_pk_u_256_type::UpdatePkU256; pub use update_pk_u_32_reducer::update_pk_u_32; pub use update_pk_u_32_two_reducer::update_pk_u_32_two; +pub use update_pk_u_32_two_type::UpdatePkU32Two; +pub use update_pk_u_32_type::UpdatePkU32; pub use update_pk_u_64_reducer::update_pk_u_64; +pub use update_pk_u_64_type::UpdatePkU64; pub use update_pk_u_8_reducer::update_pk_u_8; +pub use update_pk_u_8_type::UpdatePkU8; pub use update_pk_uuid_reducer::update_pk_uuid; +pub use update_pk_uuid_type::UpdatePkUuid; pub use update_unique_bool_reducer::update_unique_bool; +pub use update_unique_bool_type::UpdateUniqueBool; pub use update_unique_connection_id_reducer::update_unique_connection_id; +pub use update_unique_connection_id_type::UpdateUniqueConnectionId; pub use update_unique_i_128_reducer::update_unique_i_128; +pub use update_unique_i_128_type::UpdateUniqueI128; pub use update_unique_i_16_reducer::update_unique_i_16; +pub use update_unique_i_16_type::UpdateUniqueI16; pub use update_unique_i_256_reducer::update_unique_i_256; +pub use update_unique_i_256_type::UpdateUniqueI256; pub use update_unique_i_32_reducer::update_unique_i_32; +pub use update_unique_i_32_type::UpdateUniqueI32; pub use update_unique_i_64_reducer::update_unique_i_64; +pub use update_unique_i_64_type::UpdateUniqueI64; pub use update_unique_i_8_reducer::update_unique_i_8; +pub use update_unique_i_8_type::UpdateUniqueI8; pub use update_unique_identity_reducer::update_unique_identity; +pub use update_unique_identity_type::UpdateUniqueIdentity; pub use update_unique_string_reducer::update_unique_string; +pub use update_unique_string_type::UpdateUniqueString; pub use update_unique_u_128_reducer::update_unique_u_128; +pub use update_unique_u_128_type::UpdateUniqueU128; pub use update_unique_u_16_reducer::update_unique_u_16; +pub use update_unique_u_16_type::UpdateUniqueU16; pub use update_unique_u_256_reducer::update_unique_u_256; +pub use update_unique_u_256_type::UpdateUniqueU256; pub use update_unique_u_32_reducer::update_unique_u_32; +pub use update_unique_u_32_type::UpdateUniqueU32; pub use update_unique_u_64_reducer::update_unique_u_64; +pub use update_unique_u_64_type::UpdateUniqueU64; pub use update_unique_u_8_reducer::update_unique_u_8; +pub use update_unique_u_8_type::UpdateUniqueU8; pub use update_unique_uuid_reducer::update_unique_uuid; +pub use update_unique_uuid_type::UpdateUniqueUuid; pub use users_table::*; pub use users_type::Users; pub use vec_bool_table::*; @@ -863,139 +1259,10 @@ pub enum Reducer { DeleteFromBtreeU32 { rows: Vec, }, - DeleteLargeTable { - a: u8, - b: u16, - c: u32, - d: u64, - e: u128, - f: __sats::u256, - g: i8, - h: i16, - i: i32, - j: i64, - k: i128, - l: __sats::i256, - m: bool, - n: f32, - o: f64, - p: String, - q: SimpleEnum, - r: EnumWithPayload, - s: UnitStruct, - t: ByteStruct, - u: EveryPrimitiveStruct, - v: EveryVecStruct, - }, - DeletePkBool { - b: bool, - }, - DeletePkConnectionId { - a: __sdk::ConnectionId, - }, - DeletePkI128 { - n: i128, - }, - DeletePkI16 { - n: i16, - }, - DeletePkI256 { - n: __sats::i256, - }, - DeletePkI32 { - n: i32, - }, - DeletePkI64 { - n: i64, - }, - DeletePkI8 { - n: i8, - }, - DeletePkIdentity { - i: __sdk::Identity, - }, - DeletePkString { - s: String, - }, - DeletePkU128 { - n: u128, - }, - DeletePkU16 { - n: u16, - }, - DeletePkU256 { - n: __sats::u256, - }, - DeletePkU32 { - n: u32, - }, DeletePkU32InsertPkU32Two { n: u32, data: i32, }, - DeletePkU32Two { - n: u32, - }, - DeletePkU64 { - n: u64, - }, - DeletePkU8 { - n: u8, - }, - DeletePkUuid { - u: __sdk::Uuid, - }, - DeleteUniqueBool { - b: bool, - }, - DeleteUniqueConnectionId { - a: __sdk::ConnectionId, - }, - DeleteUniqueI128 { - n: i128, - }, - DeleteUniqueI16 { - n: i16, - }, - DeleteUniqueI256 { - n: __sats::i256, - }, - DeleteUniqueI32 { - n: i32, - }, - DeleteUniqueI64 { - n: i64, - }, - DeleteUniqueI8 { - n: i8, - }, - DeleteUniqueIdentity { - i: __sdk::Identity, - }, - DeleteUniqueString { - s: String, - }, - DeleteUniqueU128 { - n: u128, - }, - DeleteUniqueU16 { - n: u16, - }, - DeleteUniqueU256 { - n: __sats::u256, - }, - DeleteUniqueU32 { - n: u32, - }, - DeleteUniqueU64 { - n: u64, - }, - DeleteUniqueU8 { - n: u8, - }, - DeleteUniqueUuid { - u: __sdk::Uuid, - }, InsertCallTimestamp, InsertCallUuidV4, InsertCallUuidV7, @@ -1025,540 +1292,669 @@ pub enum Reducer { pk_u_32: Vec, bt_u_32: Vec, }, - InsertLargeTable { - a: u8, - b: u16, - c: u32, - d: u64, - e: u128, - f: __sats::u256, - g: i8, - h: i16, - i: i32, - j: i64, - k: i128, - l: __sats::i256, - m: bool, - n: f32, - o: f64, - p: String, - q: SimpleEnum, - r: EnumWithPayload, - s: UnitStruct, - t: ByteStruct, - u: EveryPrimitiveStruct, - v: EveryVecStruct, + InsertPrimitivesAsStrings { + s: EveryPrimitiveStruct, }, - InsertOneBool { - b: bool, + InsertUniqueU32UpdatePkU32 { + n: u32, + d_unique: i32, + d_pk: i32, }, - InsertOneByteStruct { - s: ByteStruct, + InsertUser { + name: String, + identity: __sdk::Identity, }, - InsertOneConnectionId { - a: __sdk::ConnectionId, + NoOpSucceeds, + InsertOneU8 { + n: u8, }, - InsertOneEnumWithPayload { - e: EnumWithPayload, + InsertOneU16 { + n: u16, }, - InsertOneEveryPrimitiveStruct { - s: EveryPrimitiveStruct, + InsertOneU32 { + n: u32, }, - InsertOneEveryVecStruct { - s: EveryVecStruct, + InsertOneU64 { + n: u64, }, - InsertOneF32 { - f: f32, + InsertOneU128 { + n: u128, }, - InsertOneF64 { - f: f64, + InsertOneU256 { + n: __sats::u256, }, - InsertOneI128 { - n: i128, + InsertOneI8 { + n: i8, }, InsertOneI16 { n: i16, }, - InsertOneI256 { - n: __sats::i256, - }, InsertOneI32 { n: i32, }, InsertOneI64 { n: i64, }, - InsertOneI8 { - n: i8, + InsertOneI128 { + n: i128, }, - InsertOneIdentity { - i: __sdk::Identity, + InsertOneI256 { + n: __sats::i256, }, - InsertOneSimpleEnum { - e: SimpleEnum, + InsertOneBool { + b: bool, + }, + InsertOneF32 { + f: f32, + }, + InsertOneF64 { + f: f64, }, InsertOneString { s: String, }, - InsertOneTimestamp { - t: __sdk::Timestamp, - }, - InsertOneU128 { - n: u128, + InsertOneIdentity { + i: __sdk::Identity, }, - InsertOneU16 { - n: u16, + InsertOneConnectionId { + a: __sdk::ConnectionId, }, - InsertOneU256 { - n: __sats::u256, + InsertOneUuid { + u: __sdk::Uuid, }, - InsertOneU32 { - n: u32, + InsertOneTimestamp { + t: __sdk::Timestamp, }, - InsertOneU64 { - n: u64, + InsertOneSimpleEnum { + e: SimpleEnum, }, - InsertOneU8 { - n: u8, + InsertOneEnumWithPayload { + e: EnumWithPayload, }, InsertOneUnitStruct { s: UnitStruct, }, - InsertOneUuid { - u: __sdk::Uuid, + InsertOneByteStruct { + s: ByteStruct, }, - InsertOptionEveryPrimitiveStruct { - s: Option, + InsertOneEveryPrimitiveStruct { + s: EveryPrimitiveStruct, }, - InsertOptionI32 { - n: Option, + InsertOneEveryVecStruct { + s: EveryVecStruct, }, - InsertOptionIdentity { - i: Option<__sdk::Identity>, + InsertVecU8 { + n: Vec, }, - InsertOptionSimpleEnum { - e: Option, + InsertVecU16 { + n: Vec, }, - InsertOptionString { - s: Option, + InsertVecU32 { + n: Vec, }, - InsertOptionUuid { - u: Option<__sdk::Uuid>, + InsertVecU64 { + n: Vec, }, - InsertOptionVecOptionI32 { - v: Option>>, + InsertVecU128 { + n: Vec, }, - InsertPkBool { - b: bool, - data: i32, + InsertVecU256 { + n: Vec<__sats::u256>, }, - InsertPkConnectionId { - a: __sdk::ConnectionId, - data: i32, + InsertVecI8 { + n: Vec, }, - InsertPkI128 { - n: i128, - data: i32, + InsertVecI16 { + n: Vec, }, - InsertPkI16 { - n: i16, - data: i32, + InsertVecI32 { + n: Vec, }, - InsertPkI256 { - n: __sats::i256, - data: i32, + InsertVecI64 { + n: Vec, }, - InsertPkI32 { - n: i32, - data: i32, + InsertVecI128 { + n: Vec, }, - InsertPkI64 { - n: i64, - data: i32, + InsertVecI256 { + n: Vec<__sats::i256>, }, - InsertPkI8 { - n: i8, - data: i32, + InsertVecBool { + b: Vec, }, - InsertPkIdentity { - i: __sdk::Identity, - data: i32, + InsertVecF32 { + f: Vec, }, - InsertPkSimpleEnum { - a: SimpleEnum, - data: i32, + InsertVecF64 { + f: Vec, }, - InsertPkString { - s: String, - data: i32, + InsertVecString { + s: Vec, }, - InsertPkU128 { - n: u128, - data: i32, + InsertVecIdentity { + i: Vec<__sdk::Identity>, }, - InsertPkU16 { - n: u16, - data: i32, + InsertVecConnectionId { + a: Vec<__sdk::ConnectionId>, }, - InsertPkU256 { - n: __sats::u256, - data: i32, + InsertVecTimestamp { + t: Vec<__sdk::Timestamp>, }, - InsertPkU32 { - n: u32, - data: i32, + InsertVecUuid { + u: Vec<__sdk::Uuid>, }, - InsertPkU32Two { - n: u32, - data: i32, + InsertVecSimpleEnum { + e: Vec, }, - InsertPkU64 { - n: u64, - data: i32, + InsertVecEnumWithPayload { + e: Vec, }, - InsertPkU8 { - n: u8, - data: i32, + InsertVecUnitStruct { + s: Vec, }, - InsertPkUuid { - u: __sdk::Uuid, - data: i32, + InsertVecByteStruct { + s: Vec, }, - InsertPrimitivesAsStrings { - s: EveryPrimitiveStruct, + InsertVecEveryPrimitiveStruct { + s: Vec, }, - InsertResultEveryPrimitiveStructString { - r: Result, + InsertVecEveryVecStruct { + s: Vec, + }, + InsertOptionI32 { + n: Option, + }, + InsertOptionString { + s: Option, + }, + InsertOptionIdentity { + i: Option<__sdk::Identity>, + }, + InsertOptionUuid { + u: Option<__sdk::Uuid>, + }, + InsertOptionSimpleEnum { + e: Option, + }, + InsertOptionEveryPrimitiveStruct { + s: Option, + }, + InsertOptionVecOptionI32 { + v: Option>>, }, InsertResultI32String { r: Result, }, + InsertResultStringI32 { + r: Result, + }, InsertResultIdentityString { r: Result<__sdk::Identity, String>, }, InsertResultSimpleEnumI32 { r: Result, }, - InsertResultStringI32 { - r: Result, + InsertResultEveryPrimitiveStructString { + r: Result, }, InsertResultVecI32String { r: Result, String>, }, - InsertTableHoldsTable { - a: OneU8, - b: VecU8, - }, - InsertUniqueBool { - b: bool, + InsertUniqueU8 { + n: u8, data: i32, }, - InsertUniqueConnectionId { - a: __sdk::ConnectionId, + UpdateUniqueU8 { + n: u8, data: i32, }, - InsertUniqueI128 { - n: i128, - data: i32, + DeleteUniqueU8 { + n: u8, }, - InsertUniqueI16 { - n: i16, + InsertUniqueU16 { + n: u16, data: i32, }, - InsertUniqueI256 { - n: __sats::i256, + UpdateUniqueU16 { + n: u16, data: i32, }, - InsertUniqueI32 { - n: i32, - data: i32, + DeleteUniqueU16 { + n: u16, }, - InsertUniqueI64 { - n: i64, + InsertUniqueU32 { + n: u32, data: i32, }, - InsertUniqueI8 { - n: i8, + UpdateUniqueU32 { + n: u32, data: i32, }, - InsertUniqueIdentity { - i: __sdk::Identity, + DeleteUniqueU32 { + n: u32, + }, + InsertUniqueU64 { + n: u64, data: i32, }, - InsertUniqueString { - s: String, + UpdateUniqueU64 { + n: u64, data: i32, }, + DeleteUniqueU64 { + n: u64, + }, InsertUniqueU128 { n: u128, data: i32, }, - InsertUniqueU16 { - n: u16, + UpdateUniqueU128 { + n: u128, data: i32, }, + DeleteUniqueU128 { + n: u128, + }, InsertUniqueU256 { n: __sats::u256, data: i32, }, - InsertUniqueU32 { - n: u32, + UpdateUniqueU256 { + n: __sats::u256, data: i32, }, - InsertUniqueU32UpdatePkU32 { - n: u32, - d_unique: i32, - d_pk: i32, + DeleteUniqueU256 { + n: __sats::u256, }, - InsertUniqueU64 { - n: u64, + InsertUniqueI8 { + n: i8, data: i32, }, - InsertUniqueU8 { - n: u8, + UpdateUniqueI8 { + n: i8, data: i32, }, - InsertUniqueUuid { - u: __sdk::Uuid, - data: i32, + DeleteUniqueI8 { + n: i8, }, - InsertUser { - name: String, - identity: __sdk::Identity, + InsertUniqueI16 { + n: i16, + data: i32, }, - InsertVecBool { - b: Vec, + UpdateUniqueI16 { + n: i16, + data: i32, }, - InsertVecByteStruct { - s: Vec, + DeleteUniqueI16 { + n: i16, }, - InsertVecConnectionId { - a: Vec<__sdk::ConnectionId>, + InsertUniqueI32 { + n: i32, + data: i32, }, - InsertVecEnumWithPayload { - e: Vec, + UpdateUniqueI32 { + n: i32, + data: i32, }, - InsertVecEveryPrimitiveStruct { - s: Vec, - }, - InsertVecEveryVecStruct { - s: Vec, - }, - InsertVecF32 { - f: Vec, - }, - InsertVecF64 { - f: Vec, - }, - InsertVecI128 { - n: Vec, - }, - InsertVecI16 { - n: Vec, - }, - InsertVecI256 { - n: Vec<__sats::i256>, - }, - InsertVecI32 { - n: Vec, - }, - InsertVecI64 { - n: Vec, + DeleteUniqueI32 { + n: i32, }, - InsertVecI8 { - n: Vec, + InsertUniqueI64 { + n: i64, + data: i32, }, - InsertVecIdentity { - i: Vec<__sdk::Identity>, + UpdateUniqueI64 { + n: i64, + data: i32, }, - InsertVecSimpleEnum { - e: Vec, + DeleteUniqueI64 { + n: i64, }, - InsertVecString { - s: Vec, + InsertUniqueI128 { + n: i128, + data: i32, }, - InsertVecTimestamp { - t: Vec<__sdk::Timestamp>, + UpdateUniqueI128 { + n: i128, + data: i32, }, - InsertVecU128 { - n: Vec, + DeleteUniqueI128 { + n: i128, }, - InsertVecU16 { - n: Vec, + InsertUniqueI256 { + n: __sats::i256, + data: i32, }, - InsertVecU256 { - n: Vec<__sats::u256>, + UpdateUniqueI256 { + n: __sats::i256, + data: i32, }, - InsertVecU32 { - n: Vec, + DeleteUniqueI256 { + n: __sats::i256, }, - InsertVecU64 { - n: Vec, + InsertUniqueBool { + b: bool, + data: i32, }, - InsertVecU8 { - n: Vec, + UpdateUniqueBool { + b: bool, + data: i32, }, - InsertVecUnitStruct { - s: Vec, + DeleteUniqueBool { + b: bool, }, - InsertVecUuid { - u: Vec<__sdk::Uuid>, + InsertUniqueString { + s: String, + data: i32, }, - NoOpSucceeds, - SendScheduledMessage { - arg: ScheduledTable, + UpdateUniqueString { + s: String, + data: i32, }, - SortedUuidsInsert, - UpdateIndexedSimpleEnum { - a: SimpleEnum, - b: SimpleEnum, + DeleteUniqueString { + s: String, }, - UpdatePkBool { - b: bool, + InsertUniqueIdentity { + i: __sdk::Identity, data: i32, }, - UpdatePkConnectionId { - a: __sdk::ConnectionId, + UpdateUniqueIdentity { + i: __sdk::Identity, data: i32, }, - UpdatePkI128 { - n: i128, - data: i32, + DeleteUniqueIdentity { + i: __sdk::Identity, }, - UpdatePkI16 { - n: i16, + InsertUniqueConnectionId { + a: __sdk::ConnectionId, data: i32, }, - UpdatePkI256 { - n: __sats::i256, + UpdateUniqueConnectionId { + a: __sdk::ConnectionId, data: i32, }, - UpdatePkI32 { - n: i32, - data: i32, + DeleteUniqueConnectionId { + a: __sdk::ConnectionId, }, - UpdatePkI64 { - n: i64, + InsertUniqueUuid { + u: __sdk::Uuid, data: i32, }, - UpdatePkI8 { - n: i8, + UpdateUniqueUuid { + u: __sdk::Uuid, data: i32, }, - UpdatePkIdentity { - i: __sdk::Identity, - data: i32, + DeleteUniqueUuid { + u: __sdk::Uuid, }, - UpdatePkSimpleEnum { - a: SimpleEnum, + InsertPkU8 { + n: u8, data: i32, }, - UpdatePkString { - s: String, + UpdatePkU8 { + n: u8, data: i32, }, - UpdatePkU128 { - n: u128, + DeletePkU8 { + n: u8, + }, + InsertPkU16 { + n: u16, data: i32, }, UpdatePkU16 { n: u16, data: i32, }, - UpdatePkU256 { - n: __sats::u256, + DeletePkU16 { + n: u16, + }, + InsertPkU32 { + n: u32, data: i32, }, UpdatePkU32 { n: u32, data: i32, }, + DeletePkU32 { + n: u32, + }, + InsertPkU32Two { + n: u32, + data: i32, + }, UpdatePkU32Two { n: u32, data: i32, }, - UpdatePkU64 { + DeletePkU32Two { + n: u32, + }, + InsertPkU64 { n: u64, data: i32, }, - UpdatePkU8 { - n: u8, + UpdatePkU64 { + n: u64, data: i32, }, - UpdatePkUuid { - u: __sdk::Uuid, - data: i32, + DeletePkU64 { + n: u64, }, - UpdateUniqueBool { - b: bool, + InsertPkU128 { + n: u128, data: i32, }, - UpdateUniqueConnectionId { - a: __sdk::ConnectionId, + UpdatePkU128 { + n: u128, data: i32, }, - UpdateUniqueI128 { - n: i128, - data: i32, + DeletePkU128 { + n: u128, }, - UpdateUniqueI16 { - n: i16, + InsertPkU256 { + n: __sats::u256, data: i32, }, - UpdateUniqueI256 { - n: __sats::i256, + UpdatePkU256 { + n: __sats::u256, data: i32, }, - UpdateUniqueI32 { - n: i32, - data: i32, + DeletePkU256 { + n: __sats::u256, }, - UpdateUniqueI64 { - n: i64, + InsertPkI8 { + n: i8, data: i32, }, - UpdateUniqueI8 { + UpdatePkI8 { n: i8, data: i32, }, - UpdateUniqueIdentity { - i: __sdk::Identity, - data: i32, + DeletePkI8 { + n: i8, }, - UpdateUniqueString { - s: String, + InsertPkI16 { + n: i16, data: i32, }, - UpdateUniqueU128 { - n: u128, + UpdatePkI16 { + n: i16, data: i32, }, - UpdateUniqueU16 { - n: u16, - data: i32, + DeletePkI16 { + n: i16, }, - UpdateUniqueU256 { - n: __sats::u256, + InsertPkI32 { + n: i32, data: i32, }, - UpdateUniqueU32 { - n: u32, + UpdatePkI32 { + n: i32, data: i32, }, - UpdateUniqueU64 { - n: u64, - data: i32, + DeletePkI32 { + n: i32, }, - UpdateUniqueU8 { - n: u8, + InsertPkI64 { + n: i64, data: i32, }, - UpdateUniqueUuid { - u: __sdk::Uuid, + UpdatePkI64 { + n: i64, data: i32, }, -} - + DeletePkI64 { + n: i64, + }, + InsertPkI128 { + n: i128, + data: i32, + }, + UpdatePkI128 { + n: i128, + data: i32, + }, + DeletePkI128 { + n: i128, + }, + InsertPkI256 { + n: __sats::i256, + data: i32, + }, + UpdatePkI256 { + n: __sats::i256, + data: i32, + }, + DeletePkI256 { + n: __sats::i256, + }, + InsertPkBool { + b: bool, + data: i32, + }, + UpdatePkBool { + b: bool, + data: i32, + }, + DeletePkBool { + b: bool, + }, + InsertPkString { + s: String, + data: i32, + }, + UpdatePkString { + s: String, + data: i32, + }, + DeletePkString { + s: String, + }, + InsertPkIdentity { + i: __sdk::Identity, + data: i32, + }, + UpdatePkIdentity { + i: __sdk::Identity, + data: i32, + }, + DeletePkIdentity { + i: __sdk::Identity, + }, + InsertPkConnectionId { + a: __sdk::ConnectionId, + data: i32, + }, + UpdatePkConnectionId { + a: __sdk::ConnectionId, + data: i32, + }, + DeletePkConnectionId { + a: __sdk::ConnectionId, + }, + InsertPkUuid { + u: __sdk::Uuid, + data: i32, + }, + UpdatePkUuid { + u: __sdk::Uuid, + data: i32, + }, + DeletePkUuid { + u: __sdk::Uuid, + }, + InsertPkSimpleEnum { + a: SimpleEnum, + data: i32, + }, + InsertLargeTable { + a: u8, + b: u16, + c: u32, + d: u64, + e: u128, + f: __sats::u256, + g: i8, + h: i16, + i: i32, + j: i64, + k: i128, + l: __sats::i256, + m: bool, + n: f32, + o: f64, + p: String, + q: SimpleEnum, + r: EnumWithPayload, + s: UnitStruct, + t: ByteStruct, + u: EveryPrimitiveStruct, + v: EveryVecStruct, + }, + DeleteLargeTable { + a: u8, + b: u16, + c: u32, + d: u64, + e: u128, + f: __sats::u256, + g: i8, + h: i16, + i: i32, + j: i64, + k: i128, + l: __sats::i256, + m: bool, + n: f32, + o: f64, + p: String, + q: SimpleEnum, + r: EnumWithPayload, + s: UnitStruct, + t: ByteStruct, + u: EveryPrimitiveStruct, + v: EveryVecStruct, + }, + InsertTableHoldsTable { + a: OneU8, + b: VecU8, + }, + SendScheduledMessage { + arg: ScheduledTable, + }, + SortedUuidsInsert, + UpdateIndexedSimpleEnum { + a: SimpleEnum, + b: SimpleEnum, + }, + UpdatePkSimpleEnum { + a: SimpleEnum, + data: i32, + }, +} + impl __sdk::InModule for Reducer { type Module = RemoteModule; } @@ -1566,47 +1962,11 @@ impl __sdk::InModule for Reducer { impl __sdk::Reducer for Reducer { fn reducer_name(&self) -> &'static str { match self { - Reducer::DeleteFromBtreeU32 { .. } => "delete_from_btree_u32", - Reducer::DeleteLargeTable { .. } => "delete_large_table", - Reducer::DeletePkBool { .. } => "delete_pk_bool", - Reducer::DeletePkConnectionId { .. } => "delete_pk_connection_id", - Reducer::DeletePkI128 { .. } => "delete_pk_i128", - Reducer::DeletePkI16 { .. } => "delete_pk_i16", - Reducer::DeletePkI256 { .. } => "delete_pk_i256", - Reducer::DeletePkI32 { .. } => "delete_pk_i32", - Reducer::DeletePkI64 { .. } => "delete_pk_i64", - Reducer::DeletePkI8 { .. } => "delete_pk_i8", - Reducer::DeletePkIdentity { .. } => "delete_pk_identity", - Reducer::DeletePkString { .. } => "delete_pk_string", - Reducer::DeletePkU128 { .. } => "delete_pk_u128", - Reducer::DeletePkU16 { .. } => "delete_pk_u16", - Reducer::DeletePkU256 { .. } => "delete_pk_u256", - Reducer::DeletePkU32 { .. } => "delete_pk_u32", - Reducer::DeletePkU32InsertPkU32Two { .. } => "delete_pk_u32_insert_pk_u32_two", - Reducer::DeletePkU32Two { .. } => "delete_pk_u32_two", - Reducer::DeletePkU64 { .. } => "delete_pk_u64", - Reducer::DeletePkU8 { .. } => "delete_pk_u8", - Reducer::DeletePkUuid { .. } => "delete_pk_uuid", - Reducer::DeleteUniqueBool { .. } => "delete_unique_bool", - Reducer::DeleteUniqueConnectionId { .. } => "delete_unique_connection_id", - Reducer::DeleteUniqueI128 { .. } => "delete_unique_i128", - Reducer::DeleteUniqueI16 { .. } => "delete_unique_i16", - Reducer::DeleteUniqueI256 { .. } => "delete_unique_i256", - Reducer::DeleteUniqueI32 { .. } => "delete_unique_i32", - Reducer::DeleteUniqueI64 { .. } => "delete_unique_i64", - Reducer::DeleteUniqueI8 { .. } => "delete_unique_i8", - Reducer::DeleteUniqueIdentity { .. } => "delete_unique_identity", - Reducer::DeleteUniqueString { .. } => "delete_unique_string", - Reducer::DeleteUniqueU128 { .. } => "delete_unique_u128", - Reducer::DeleteUniqueU16 { .. } => "delete_unique_u16", - Reducer::DeleteUniqueU256 { .. } => "delete_unique_u256", - Reducer::DeleteUniqueU32 { .. } => "delete_unique_u32", - Reducer::DeleteUniqueU64 { .. } => "delete_unique_u64", - Reducer::DeleteUniqueU8 { .. } => "delete_unique_u8", - Reducer::DeleteUniqueUuid { .. } => "delete_unique_uuid", + Reducer::DeleteFromBtreeU32 { .. } => "delete_from_btree_u_32", + Reducer::DeletePkU32InsertPkU32Two { .. } => "delete_pk_u_32_insert_pk_u_32_two", Reducer::InsertCallTimestamp => "insert_call_timestamp", - Reducer::InsertCallUuidV4 => "insert_call_uuid_v4", - Reducer::InsertCallUuidV7 => "insert_call_uuid_v7", + Reducer::InsertCallUuidV4 => "insert_call_uuid_v_4", + Reducer::InsertCallUuidV7 => "insert_call_uuid_v_7", Reducer::InsertCallerOneConnectionId => "insert_caller_one_connection_id", Reducer::InsertCallerOneIdentity => "insert_caller_one_identity", Reducer::InsertCallerPkConnectionId { .. } => "insert_caller_pk_connection_id", @@ -1615,155 +1975,191 @@ impl __sdk::Reducer for Reducer { Reducer::InsertCallerUniqueIdentity { .. } => "insert_caller_unique_identity", Reducer::InsertCallerVecConnectionId => "insert_caller_vec_connection_id", Reducer::InsertCallerVecIdentity => "insert_caller_vec_identity", - Reducer::InsertIntoBtreeU32 { .. } => "insert_into_btree_u32", + Reducer::InsertIntoBtreeU32 { .. } => "insert_into_btree_u_32", Reducer::InsertIntoIndexedSimpleEnum { .. } => "insert_into_indexed_simple_enum", - Reducer::InsertIntoPkBtreeU32 { .. } => "insert_into_pk_btree_u32", - Reducer::InsertLargeTable { .. } => "insert_large_table", + Reducer::InsertIntoPkBtreeU32 { .. } => "insert_into_pk_btree_u_32", + Reducer::InsertPrimitivesAsStrings { .. } => "insert_primitives_as_strings", + Reducer::InsertUniqueU32UpdatePkU32 { .. } => "insert_unique_u_32_update_pk_u_32", + Reducer::InsertUser { .. } => "insert_user", + Reducer::NoOpSucceeds => "no_op_succeeds", + Reducer::InsertOneU8 { .. } => "insert_one_u_8", + Reducer::InsertOneU16 { .. } => "insert_one_u_16", + Reducer::InsertOneU32 { .. } => "insert_one_u_32", + Reducer::InsertOneU64 { .. } => "insert_one_u_64", + Reducer::InsertOneU128 { .. } => "insert_one_u_128", + Reducer::InsertOneU256 { .. } => "insert_one_u_256", + Reducer::InsertOneI8 { .. } => "insert_one_i_8", + Reducer::InsertOneI16 { .. } => "insert_one_i_16", + Reducer::InsertOneI32 { .. } => "insert_one_i_32", + Reducer::InsertOneI64 { .. } => "insert_one_i_64", + Reducer::InsertOneI128 { .. } => "insert_one_i_128", + Reducer::InsertOneI256 { .. } => "insert_one_i_256", Reducer::InsertOneBool { .. } => "insert_one_bool", - Reducer::InsertOneByteStruct { .. } => "insert_one_byte_struct", + Reducer::InsertOneF32 { .. } => "insert_one_f_32", + Reducer::InsertOneF64 { .. } => "insert_one_f_64", + Reducer::InsertOneString { .. } => "insert_one_string", + Reducer::InsertOneIdentity { .. } => "insert_one_identity", Reducer::InsertOneConnectionId { .. } => "insert_one_connection_id", + Reducer::InsertOneUuid { .. } => "insert_one_uuid", + Reducer::InsertOneTimestamp { .. } => "insert_one_timestamp", + Reducer::InsertOneSimpleEnum { .. } => "insert_one_simple_enum", Reducer::InsertOneEnumWithPayload { .. } => "insert_one_enum_with_payload", + Reducer::InsertOneUnitStruct { .. } => "insert_one_unit_struct", + Reducer::InsertOneByteStruct { .. } => "insert_one_byte_struct", Reducer::InsertOneEveryPrimitiveStruct { .. } => "insert_one_every_primitive_struct", Reducer::InsertOneEveryVecStruct { .. } => "insert_one_every_vec_struct", - Reducer::InsertOneF32 { .. } => "insert_one_f32", - Reducer::InsertOneF64 { .. } => "insert_one_f64", - Reducer::InsertOneI128 { .. } => "insert_one_i128", - Reducer::InsertOneI16 { .. } => "insert_one_i16", - Reducer::InsertOneI256 { .. } => "insert_one_i256", - Reducer::InsertOneI32 { .. } => "insert_one_i32", - Reducer::InsertOneI64 { .. } => "insert_one_i64", - Reducer::InsertOneI8 { .. } => "insert_one_i8", - Reducer::InsertOneIdentity { .. } => "insert_one_identity", - Reducer::InsertOneSimpleEnum { .. } => "insert_one_simple_enum", - Reducer::InsertOneString { .. } => "insert_one_string", - Reducer::InsertOneTimestamp { .. } => "insert_one_timestamp", - Reducer::InsertOneU128 { .. } => "insert_one_u128", - Reducer::InsertOneU16 { .. } => "insert_one_u16", - Reducer::InsertOneU256 { .. } => "insert_one_u256", - Reducer::InsertOneU32 { .. } => "insert_one_u32", - Reducer::InsertOneU64 { .. } => "insert_one_u64", - Reducer::InsertOneU8 { .. } => "insert_one_u8", - Reducer::InsertOneUnitStruct { .. } => "insert_one_unit_struct", - Reducer::InsertOneUuid { .. } => "insert_one_uuid", - Reducer::InsertOptionEveryPrimitiveStruct { .. } => "insert_option_every_primitive_struct", - Reducer::InsertOptionI32 { .. } => "insert_option_i32", - Reducer::InsertOptionIdentity { .. } => "insert_option_identity", - Reducer::InsertOptionSimpleEnum { .. } => "insert_option_simple_enum", + Reducer::InsertVecU8 { .. } => "insert_vec_u_8", + Reducer::InsertVecU16 { .. } => "insert_vec_u_16", + Reducer::InsertVecU32 { .. } => "insert_vec_u_32", + Reducer::InsertVecU64 { .. } => "insert_vec_u_64", + Reducer::InsertVecU128 { .. } => "insert_vec_u_128", + Reducer::InsertVecU256 { .. } => "insert_vec_u_256", + Reducer::InsertVecI8 { .. } => "insert_vec_i_8", + Reducer::InsertVecI16 { .. } => "insert_vec_i_16", + Reducer::InsertVecI32 { .. } => "insert_vec_i_32", + Reducer::InsertVecI64 { .. } => "insert_vec_i_64", + Reducer::InsertVecI128 { .. } => "insert_vec_i_128", + Reducer::InsertVecI256 { .. } => "insert_vec_i_256", + Reducer::InsertVecBool { .. } => "insert_vec_bool", + Reducer::InsertVecF32 { .. } => "insert_vec_f_32", + Reducer::InsertVecF64 { .. } => "insert_vec_f_64", + Reducer::InsertVecString { .. } => "insert_vec_string", + Reducer::InsertVecIdentity { .. } => "insert_vec_identity", + Reducer::InsertVecConnectionId { .. } => "insert_vec_connection_id", + Reducer::InsertVecTimestamp { .. } => "insert_vec_timestamp", + Reducer::InsertVecUuid { .. } => "insert_vec_uuid", + Reducer::InsertVecSimpleEnum { .. } => "insert_vec_simple_enum", + Reducer::InsertVecEnumWithPayload { .. } => "insert_vec_enum_with_payload", + Reducer::InsertVecUnitStruct { .. } => "insert_vec_unit_struct", + Reducer::InsertVecByteStruct { .. } => "insert_vec_byte_struct", + Reducer::InsertVecEveryPrimitiveStruct { .. } => "insert_vec_every_primitive_struct", + Reducer::InsertVecEveryVecStruct { .. } => "insert_vec_every_vec_struct", + Reducer::InsertOptionI32 { .. } => "insert_option_i_32", Reducer::InsertOptionString { .. } => "insert_option_string", + Reducer::InsertOptionIdentity { .. } => "insert_option_identity", Reducer::InsertOptionUuid { .. } => "insert_option_uuid", - Reducer::InsertOptionVecOptionI32 { .. } => "insert_option_vec_option_i32", - Reducer::InsertPkBool { .. } => "insert_pk_bool", - Reducer::InsertPkConnectionId { .. } => "insert_pk_connection_id", - Reducer::InsertPkI128 { .. } => "insert_pk_i128", - Reducer::InsertPkI16 { .. } => "insert_pk_i16", - Reducer::InsertPkI256 { .. } => "insert_pk_i256", - Reducer::InsertPkI32 { .. } => "insert_pk_i32", - Reducer::InsertPkI64 { .. } => "insert_pk_i64", - Reducer::InsertPkI8 { .. } => "insert_pk_i8", - Reducer::InsertPkIdentity { .. } => "insert_pk_identity", - Reducer::InsertPkSimpleEnum { .. } => "insert_pk_simple_enum", - Reducer::InsertPkString { .. } => "insert_pk_string", - Reducer::InsertPkU128 { .. } => "insert_pk_u128", - Reducer::InsertPkU16 { .. } => "insert_pk_u16", - Reducer::InsertPkU256 { .. } => "insert_pk_u256", - Reducer::InsertPkU32 { .. } => "insert_pk_u32", - Reducer::InsertPkU32Two { .. } => "insert_pk_u32_two", - Reducer::InsertPkU64 { .. } => "insert_pk_u64", - Reducer::InsertPkU8 { .. } => "insert_pk_u8", - Reducer::InsertPkUuid { .. } => "insert_pk_uuid", - Reducer::InsertPrimitivesAsStrings { .. } => "insert_primitives_as_strings", - Reducer::InsertResultEveryPrimitiveStructString { .. } => "insert_result_every_primitive_struct_string", - Reducer::InsertResultI32String { .. } => "insert_result_i32_string", + Reducer::InsertOptionSimpleEnum { .. } => "insert_option_simple_enum", + Reducer::InsertOptionEveryPrimitiveStruct { .. } => "insert_option_every_primitive_struct", + Reducer::InsertOptionVecOptionI32 { .. } => "insert_option_vec_option_i_32", + Reducer::InsertResultI32String { .. } => "insert_result_i_32_string", + Reducer::InsertResultStringI32 { .. } => "insert_result_string_i_32", Reducer::InsertResultIdentityString { .. } => "insert_result_identity_string", - Reducer::InsertResultSimpleEnumI32 { .. } => "insert_result_simple_enum_i32", - Reducer::InsertResultStringI32 { .. } => "insert_result_string_i32", - Reducer::InsertResultVecI32String { .. } => "insert_result_vec_i32_string", - Reducer::InsertTableHoldsTable { .. } => "insert_table_holds_table", + Reducer::InsertResultSimpleEnumI32 { .. } => "insert_result_simple_enum_i_32", + Reducer::InsertResultEveryPrimitiveStructString { .. } => "insert_result_every_primitive_struct_string", + Reducer::InsertResultVecI32String { .. } => "insert_result_vec_i_32_string", + Reducer::InsertUniqueU8 { .. } => "insert_unique_u_8", + Reducer::UpdateUniqueU8 { .. } => "update_unique_u_8", + Reducer::DeleteUniqueU8 { .. } => "delete_unique_u_8", + Reducer::InsertUniqueU16 { .. } => "insert_unique_u_16", + Reducer::UpdateUniqueU16 { .. } => "update_unique_u_16", + Reducer::DeleteUniqueU16 { .. } => "delete_unique_u_16", + Reducer::InsertUniqueU32 { .. } => "insert_unique_u_32", + Reducer::UpdateUniqueU32 { .. } => "update_unique_u_32", + Reducer::DeleteUniqueU32 { .. } => "delete_unique_u_32", + Reducer::InsertUniqueU64 { .. } => "insert_unique_u_64", + Reducer::UpdateUniqueU64 { .. } => "update_unique_u_64", + Reducer::DeleteUniqueU64 { .. } => "delete_unique_u_64", + Reducer::InsertUniqueU128 { .. } => "insert_unique_u_128", + Reducer::UpdateUniqueU128 { .. } => "update_unique_u_128", + Reducer::DeleteUniqueU128 { .. } => "delete_unique_u_128", + Reducer::InsertUniqueU256 { .. } => "insert_unique_u_256", + Reducer::UpdateUniqueU256 { .. } => "update_unique_u_256", + Reducer::DeleteUniqueU256 { .. } => "delete_unique_u_256", + Reducer::InsertUniqueI8 { .. } => "insert_unique_i_8", + Reducer::UpdateUniqueI8 { .. } => "update_unique_i_8", + Reducer::DeleteUniqueI8 { .. } => "delete_unique_i_8", + Reducer::InsertUniqueI16 { .. } => "insert_unique_i_16", + Reducer::UpdateUniqueI16 { .. } => "update_unique_i_16", + Reducer::DeleteUniqueI16 { .. } => "delete_unique_i_16", + Reducer::InsertUniqueI32 { .. } => "insert_unique_i_32", + Reducer::UpdateUniqueI32 { .. } => "update_unique_i_32", + Reducer::DeleteUniqueI32 { .. } => "delete_unique_i_32", + Reducer::InsertUniqueI64 { .. } => "insert_unique_i_64", + Reducer::UpdateUniqueI64 { .. } => "update_unique_i_64", + Reducer::DeleteUniqueI64 { .. } => "delete_unique_i_64", + Reducer::InsertUniqueI128 { .. } => "insert_unique_i_128", + Reducer::UpdateUniqueI128 { .. } => "update_unique_i_128", + Reducer::DeleteUniqueI128 { .. } => "delete_unique_i_128", + Reducer::InsertUniqueI256 { .. } => "insert_unique_i_256", + Reducer::UpdateUniqueI256 { .. } => "update_unique_i_256", + Reducer::DeleteUniqueI256 { .. } => "delete_unique_i_256", Reducer::InsertUniqueBool { .. } => "insert_unique_bool", - Reducer::InsertUniqueConnectionId { .. } => "insert_unique_connection_id", - Reducer::InsertUniqueI128 { .. } => "insert_unique_i128", - Reducer::InsertUniqueI16 { .. } => "insert_unique_i16", - Reducer::InsertUniqueI256 { .. } => "insert_unique_i256", - Reducer::InsertUniqueI32 { .. } => "insert_unique_i32", - Reducer::InsertUniqueI64 { .. } => "insert_unique_i64", - Reducer::InsertUniqueI8 { .. } => "insert_unique_i8", - Reducer::InsertUniqueIdentity { .. } => "insert_unique_identity", + Reducer::UpdateUniqueBool { .. } => "update_unique_bool", + Reducer::DeleteUniqueBool { .. } => "delete_unique_bool", Reducer::InsertUniqueString { .. } => "insert_unique_string", - Reducer::InsertUniqueU128 { .. } => "insert_unique_u128", - Reducer::InsertUniqueU16 { .. } => "insert_unique_u16", - Reducer::InsertUniqueU256 { .. } => "insert_unique_u256", - Reducer::InsertUniqueU32 { .. } => "insert_unique_u32", - Reducer::InsertUniqueU32UpdatePkU32 { .. } => "insert_unique_u32_update_pk_u32", - Reducer::InsertUniqueU64 { .. } => "insert_unique_u64", - Reducer::InsertUniqueU8 { .. } => "insert_unique_u8", + Reducer::UpdateUniqueString { .. } => "update_unique_string", + Reducer::DeleteUniqueString { .. } => "delete_unique_string", + Reducer::InsertUniqueIdentity { .. } => "insert_unique_identity", + Reducer::UpdateUniqueIdentity { .. } => "update_unique_identity", + Reducer::DeleteUniqueIdentity { .. } => "delete_unique_identity", + Reducer::InsertUniqueConnectionId { .. } => "insert_unique_connection_id", + Reducer::UpdateUniqueConnectionId { .. } => "update_unique_connection_id", + Reducer::DeleteUniqueConnectionId { .. } => "delete_unique_connection_id", Reducer::InsertUniqueUuid { .. } => "insert_unique_uuid", - Reducer::InsertUser { .. } => "insert_user", - Reducer::InsertVecBool { .. } => "insert_vec_bool", - Reducer::InsertVecByteStruct { .. } => "insert_vec_byte_struct", - Reducer::InsertVecConnectionId { .. } => "insert_vec_connection_id", - Reducer::InsertVecEnumWithPayload { .. } => "insert_vec_enum_with_payload", - Reducer::InsertVecEveryPrimitiveStruct { .. } => "insert_vec_every_primitive_struct", - Reducer::InsertVecEveryVecStruct { .. } => "insert_vec_every_vec_struct", - Reducer::InsertVecF32 { .. } => "insert_vec_f32", - Reducer::InsertVecF64 { .. } => "insert_vec_f64", - Reducer::InsertVecI128 { .. } => "insert_vec_i128", - Reducer::InsertVecI16 { .. } => "insert_vec_i16", - Reducer::InsertVecI256 { .. } => "insert_vec_i256", - Reducer::InsertVecI32 { .. } => "insert_vec_i32", - Reducer::InsertVecI64 { .. } => "insert_vec_i64", - Reducer::InsertVecI8 { .. } => "insert_vec_i8", - Reducer::InsertVecIdentity { .. } => "insert_vec_identity", - Reducer::InsertVecSimpleEnum { .. } => "insert_vec_simple_enum", - Reducer::InsertVecString { .. } => "insert_vec_string", - Reducer::InsertVecTimestamp { .. } => "insert_vec_timestamp", - Reducer::InsertVecU128 { .. } => "insert_vec_u128", - Reducer::InsertVecU16 { .. } => "insert_vec_u16", - Reducer::InsertVecU256 { .. } => "insert_vec_u256", - Reducer::InsertVecU32 { .. } => "insert_vec_u32", - Reducer::InsertVecU64 { .. } => "insert_vec_u64", - Reducer::InsertVecU8 { .. } => "insert_vec_u8", - Reducer::InsertVecUnitStruct { .. } => "insert_vec_unit_struct", - Reducer::InsertVecUuid { .. } => "insert_vec_uuid", - Reducer::NoOpSucceeds => "no_op_succeeds", + Reducer::UpdateUniqueUuid { .. } => "update_unique_uuid", + Reducer::DeleteUniqueUuid { .. } => "delete_unique_uuid", + Reducer::InsertPkU8 { .. } => "insert_pk_u_8", + Reducer::UpdatePkU8 { .. } => "update_pk_u_8", + Reducer::DeletePkU8 { .. } => "delete_pk_u_8", + Reducer::InsertPkU16 { .. } => "insert_pk_u_16", + Reducer::UpdatePkU16 { .. } => "update_pk_u_16", + Reducer::DeletePkU16 { .. } => "delete_pk_u_16", + Reducer::InsertPkU32 { .. } => "insert_pk_u_32", + Reducer::UpdatePkU32 { .. } => "update_pk_u_32", + Reducer::DeletePkU32 { .. } => "delete_pk_u_32", + Reducer::InsertPkU32Two { .. } => "insert_pk_u_32_two", + Reducer::UpdatePkU32Two { .. } => "update_pk_u_32_two", + Reducer::DeletePkU32Two { .. } => "delete_pk_u_32_two", + Reducer::InsertPkU64 { .. } => "insert_pk_u_64", + Reducer::UpdatePkU64 { .. } => "update_pk_u_64", + Reducer::DeletePkU64 { .. } => "delete_pk_u_64", + Reducer::InsertPkU128 { .. } => "insert_pk_u_128", + Reducer::UpdatePkU128 { .. } => "update_pk_u_128", + Reducer::DeletePkU128 { .. } => "delete_pk_u_128", + Reducer::InsertPkU256 { .. } => "insert_pk_u_256", + Reducer::UpdatePkU256 { .. } => "update_pk_u_256", + Reducer::DeletePkU256 { .. } => "delete_pk_u_256", + Reducer::InsertPkI8 { .. } => "insert_pk_i_8", + Reducer::UpdatePkI8 { .. } => "update_pk_i_8", + Reducer::DeletePkI8 { .. } => "delete_pk_i_8", + Reducer::InsertPkI16 { .. } => "insert_pk_i_16", + Reducer::UpdatePkI16 { .. } => "update_pk_i_16", + Reducer::DeletePkI16 { .. } => "delete_pk_i_16", + Reducer::InsertPkI32 { .. } => "insert_pk_i_32", + Reducer::UpdatePkI32 { .. } => "update_pk_i_32", + Reducer::DeletePkI32 { .. } => "delete_pk_i_32", + Reducer::InsertPkI64 { .. } => "insert_pk_i_64", + Reducer::UpdatePkI64 { .. } => "update_pk_i_64", + Reducer::DeletePkI64 { .. } => "delete_pk_i_64", + Reducer::InsertPkI128 { .. } => "insert_pk_i_128", + Reducer::UpdatePkI128 { .. } => "update_pk_i_128", + Reducer::DeletePkI128 { .. } => "delete_pk_i_128", + Reducer::InsertPkI256 { .. } => "insert_pk_i_256", + Reducer::UpdatePkI256 { .. } => "update_pk_i_256", + Reducer::DeletePkI256 { .. } => "delete_pk_i_256", + Reducer::InsertPkBool { .. } => "insert_pk_bool", + Reducer::UpdatePkBool { .. } => "update_pk_bool", + Reducer::DeletePkBool { .. } => "delete_pk_bool", + Reducer::InsertPkString { .. } => "insert_pk_string", + Reducer::UpdatePkString { .. } => "update_pk_string", + Reducer::DeletePkString { .. } => "delete_pk_string", + Reducer::InsertPkIdentity { .. } => "insert_pk_identity", + Reducer::UpdatePkIdentity { .. } => "update_pk_identity", + Reducer::DeletePkIdentity { .. } => "delete_pk_identity", + Reducer::InsertPkConnectionId { .. } => "insert_pk_connection_id", + Reducer::UpdatePkConnectionId { .. } => "update_pk_connection_id", + Reducer::DeletePkConnectionId { .. } => "delete_pk_connection_id", + Reducer::InsertPkUuid { .. } => "insert_pk_uuid", + Reducer::UpdatePkUuid { .. } => "update_pk_uuid", + Reducer::DeletePkUuid { .. } => "delete_pk_uuid", + Reducer::InsertPkSimpleEnum { .. } => "insert_pk_simple_enum", + Reducer::InsertLargeTable { .. } => "insert_large_table", + Reducer::DeleteLargeTable { .. } => "delete_large_table", + Reducer::InsertTableHoldsTable { .. } => "insert_table_holds_table", Reducer::SendScheduledMessage { .. } => "send_scheduled_message", Reducer::SortedUuidsInsert => "sorted_uuids_insert", Reducer::UpdateIndexedSimpleEnum { .. } => "update_indexed_simple_enum", - Reducer::UpdatePkBool { .. } => "update_pk_bool", - Reducer::UpdatePkConnectionId { .. } => "update_pk_connection_id", - Reducer::UpdatePkI128 { .. } => "update_pk_i128", - Reducer::UpdatePkI16 { .. } => "update_pk_i16", - Reducer::UpdatePkI256 { .. } => "update_pk_i256", - Reducer::UpdatePkI32 { .. } => "update_pk_i32", - Reducer::UpdatePkI64 { .. } => "update_pk_i64", - Reducer::UpdatePkI8 { .. } => "update_pk_i8", - Reducer::UpdatePkIdentity { .. } => "update_pk_identity", Reducer::UpdatePkSimpleEnum { .. } => "update_pk_simple_enum", - Reducer::UpdatePkString { .. } => "update_pk_string", - Reducer::UpdatePkU128 { .. } => "update_pk_u128", - Reducer::UpdatePkU16 { .. } => "update_pk_u16", - Reducer::UpdatePkU256 { .. } => "update_pk_u256", - Reducer::UpdatePkU32 { .. } => "update_pk_u32", - Reducer::UpdatePkU32Two { .. } => "update_pk_u32_two", - Reducer::UpdatePkU64 { .. } => "update_pk_u64", - Reducer::UpdatePkU8 { .. } => "update_pk_u8", - Reducer::UpdatePkUuid { .. } => "update_pk_uuid", - Reducer::UpdateUniqueBool { .. } => "update_unique_bool", - Reducer::UpdateUniqueConnectionId { .. } => "update_unique_connection_id", - Reducer::UpdateUniqueI128 { .. } => "update_unique_i128", - Reducer::UpdateUniqueI16 { .. } => "update_unique_i16", - Reducer::UpdateUniqueI256 { .. } => "update_unique_i256", - Reducer::UpdateUniqueI32 { .. } => "update_unique_i32", - Reducer::UpdateUniqueI64 { .. } => "update_unique_i64", - Reducer::UpdateUniqueI8 { .. } => "update_unique_i8", - Reducer::UpdateUniqueIdentity { .. } => "update_unique_identity", - Reducer::UpdateUniqueString { .. } => "update_unique_string", - Reducer::UpdateUniqueU128 { .. } => "update_unique_u128", - Reducer::UpdateUniqueU16 { .. } => "update_unique_u16", - Reducer::UpdateUniqueU256 { .. } => "update_unique_u256", - Reducer::UpdateUniqueU32 { .. } => "update_unique_u32", - Reducer::UpdateUniqueU64 { .. } => "update_unique_u64", - Reducer::UpdateUniqueU8 { .. } => "update_unique_u8", - Reducer::UpdateUniqueUuid { .. } => "update_unique_uuid", _ => unreachable!(), } } @@ -1773,583 +2169,527 @@ impl __sdk::Reducer for Reducer { Reducer::DeleteFromBtreeU32 { rows } => { __sats::bsatn::to_vec(&delete_from_btree_u_32_reducer::DeleteFromBtreeU32Args { rows: rows.clone() }) } - Reducer::DeleteLargeTable { - a, - b, - c, - d, - e, - f, - g, - h, - i, - j, - k, - l, - m, - n, - o, - p, - q, - r, - s, - t, - u, - v, - } => __sats::bsatn::to_vec(&delete_large_table_reducer::DeleteLargeTableArgs { - a: a.clone(), - b: b.clone(), - c: c.clone(), - d: d.clone(), - e: e.clone(), - f: f.clone(), - g: g.clone(), - h: h.clone(), - i: i.clone(), - j: j.clone(), - k: k.clone(), - l: l.clone(), - m: m.clone(), - n: n.clone(), - o: o.clone(), - p: p.clone(), - q: q.clone(), - r: r.clone(), - s: s.clone(), - t: t.clone(), - u: u.clone(), - v: v.clone(), + Reducer::DeletePkU32InsertPkU32Two { n, data } => __sats::bsatn::to_vec( + &delete_pk_u_32_insert_pk_u_32_two_reducer::DeletePkU32InsertPkU32TwoArgs { + n: n.clone(), + data: data.clone(), + }, + ), + Reducer::InsertCallTimestamp => { + __sats::bsatn::to_vec(&insert_call_timestamp_reducer::InsertCallTimestampArgs {}) + } + Reducer::InsertCallUuidV4 => __sats::bsatn::to_vec(&insert_call_uuid_v_4_reducer::InsertCallUuidV4Args {}), + Reducer::InsertCallUuidV7 => __sats::bsatn::to_vec(&insert_call_uuid_v_7_reducer::InsertCallUuidV7Args {}), + Reducer::InsertCallerOneConnectionId => { + __sats::bsatn::to_vec(&insert_caller_one_connection_id_reducer::InsertCallerOneConnectionIdArgs {}) + } + Reducer::InsertCallerOneIdentity => { + __sats::bsatn::to_vec(&insert_caller_one_identity_reducer::InsertCallerOneIdentityArgs {}) + } + Reducer::InsertCallerPkConnectionId { data } => __sats::bsatn::to_vec( + &insert_caller_pk_connection_id_reducer::InsertCallerPkConnectionIdArgs { data: data.clone() }, + ), + Reducer::InsertCallerPkIdentity { data } => { + __sats::bsatn::to_vec(&insert_caller_pk_identity_reducer::InsertCallerPkIdentityArgs { + data: data.clone(), + }) + } + Reducer::InsertCallerUniqueConnectionId { data } => __sats::bsatn::to_vec( + &insert_caller_unique_connection_id_reducer::InsertCallerUniqueConnectionIdArgs { data: data.clone() }, + ), + Reducer::InsertCallerUniqueIdentity { data } => { + __sats::bsatn::to_vec(&insert_caller_unique_identity_reducer::InsertCallerUniqueIdentityArgs { + data: data.clone(), + }) + } + Reducer::InsertCallerVecConnectionId => { + __sats::bsatn::to_vec(&insert_caller_vec_connection_id_reducer::InsertCallerVecConnectionIdArgs {}) + } + Reducer::InsertCallerVecIdentity => { + __sats::bsatn::to_vec(&insert_caller_vec_identity_reducer::InsertCallerVecIdentityArgs {}) + } + Reducer::InsertIntoBtreeU32 { rows } => { + __sats::bsatn::to_vec(&insert_into_btree_u_32_reducer::InsertIntoBtreeU32Args { rows: rows.clone() }) + } + Reducer::InsertIntoIndexedSimpleEnum { n } => __sats::bsatn::to_vec( + &insert_into_indexed_simple_enum_reducer::InsertIntoIndexedSimpleEnumArgs { n: n.clone() }, + ), + Reducer::InsertIntoPkBtreeU32 { pk_u_32, bt_u_32 } => { + __sats::bsatn::to_vec(&insert_into_pk_btree_u_32_reducer::InsertIntoPkBtreeU32Args { + pk_u_32: pk_u_32.clone(), + bt_u_32: bt_u_32.clone(), + }) + } + Reducer::InsertPrimitivesAsStrings { s } => { + __sats::bsatn::to_vec(&insert_primitives_as_strings_reducer::InsertPrimitivesAsStringsArgs { + s: s.clone(), + }) + } + Reducer::InsertUniqueU32UpdatePkU32 { n, d_unique, d_pk } => __sats::bsatn::to_vec( + &insert_unique_u_32_update_pk_u_32_reducer::InsertUniqueU32UpdatePkU32Args { + n: n.clone(), + d_unique: d_unique.clone(), + d_pk: d_pk.clone(), + }, + ), + Reducer::InsertUser { name, identity } => __sats::bsatn::to_vec(&insert_user_reducer::InsertUserArgs { + name: name.clone(), + identity: identity.clone(), }), - Reducer::DeletePkBool { b } => { - __sats::bsatn::to_vec(&delete_pk_bool_reducer::DeletePkBoolArgs { b: b.clone() }) + Reducer::NoOpSucceeds => __sats::bsatn::to_vec(&no_op_succeeds_reducer::NoOpSucceedsArgs {}), + Reducer::InsertOneU8 { n } => { + __sats::bsatn::to_vec(&insert_one_u_8_reducer::InsertOneU8Args { n: n.clone() }) } - Reducer::DeletePkConnectionId { a } => { - __sats::bsatn::to_vec(&delete_pk_connection_id_reducer::DeletePkConnectionIdArgs { a: a.clone() }) + Reducer::InsertOneU16 { n } => { + __sats::bsatn::to_vec(&insert_one_u_16_reducer::InsertOneU16Args { n: n.clone() }) } - Reducer::DeletePkI128 { n } => { - __sats::bsatn::to_vec(&delete_pk_i_128_reducer::DeletePkI128Args { n: n.clone() }) + Reducer::InsertOneU32 { n } => { + __sats::bsatn::to_vec(&insert_one_u_32_reducer::InsertOneU32Args { n: n.clone() }) } - Reducer::DeletePkI16 { n } => { - __sats::bsatn::to_vec(&delete_pk_i_16_reducer::DeletePkI16Args { n: n.clone() }) + Reducer::InsertOneU64 { n } => { + __sats::bsatn::to_vec(&insert_one_u_64_reducer::InsertOneU64Args { n: n.clone() }) } - Reducer::DeletePkI256 { n } => { - __sats::bsatn::to_vec(&delete_pk_i_256_reducer::DeletePkI256Args { n: n.clone() }) + Reducer::InsertOneU128 { n } => { + __sats::bsatn::to_vec(&insert_one_u_128_reducer::InsertOneU128Args { n: n.clone() }) } - Reducer::DeletePkI32 { n } => { - __sats::bsatn::to_vec(&delete_pk_i_32_reducer::DeletePkI32Args { n: n.clone() }) + Reducer::InsertOneU256 { n } => { + __sats::bsatn::to_vec(&insert_one_u_256_reducer::InsertOneU256Args { n: n.clone() }) } - Reducer::DeletePkI64 { n } => { - __sats::bsatn::to_vec(&delete_pk_i_64_reducer::DeletePkI64Args { n: n.clone() }) + Reducer::InsertOneI8 { n } => { + __sats::bsatn::to_vec(&insert_one_i_8_reducer::InsertOneI8Args { n: n.clone() }) } - Reducer::DeletePkI8 { n } => __sats::bsatn::to_vec(&delete_pk_i_8_reducer::DeletePkI8Args { n: n.clone() }), - Reducer::DeletePkIdentity { i } => { - __sats::bsatn::to_vec(&delete_pk_identity_reducer::DeletePkIdentityArgs { i: i.clone() }) + Reducer::InsertOneI16 { n } => { + __sats::bsatn::to_vec(&insert_one_i_16_reducer::InsertOneI16Args { n: n.clone() }) } - Reducer::DeletePkString { s } => { - __sats::bsatn::to_vec(&delete_pk_string_reducer::DeletePkStringArgs { s: s.clone() }) + Reducer::InsertOneI32 { n } => { + __sats::bsatn::to_vec(&insert_one_i_32_reducer::InsertOneI32Args { n: n.clone() }) } - Reducer::DeletePkU128 { n } => { - __sats::bsatn::to_vec(&delete_pk_u_128_reducer::DeletePkU128Args { n: n.clone() }) + Reducer::InsertOneI64 { n } => { + __sats::bsatn::to_vec(&insert_one_i_64_reducer::InsertOneI64Args { n: n.clone() }) } - Reducer::DeletePkU16 { n } => { - __sats::bsatn::to_vec(&delete_pk_u_16_reducer::DeletePkU16Args { n: n.clone() }) + Reducer::InsertOneI128 { n } => { + __sats::bsatn::to_vec(&insert_one_i_128_reducer::InsertOneI128Args { n: n.clone() }) } - Reducer::DeletePkU256 { n } => { - __sats::bsatn::to_vec(&delete_pk_u_256_reducer::DeletePkU256Args { n: n.clone() }) + Reducer::InsertOneI256 { n } => { + __sats::bsatn::to_vec(&insert_one_i_256_reducer::InsertOneI256Args { n: n.clone() }) } - Reducer::DeletePkU32 { n } => { - __sats::bsatn::to_vec(&delete_pk_u_32_reducer::DeletePkU32Args { n: n.clone() }) + Reducer::InsertOneBool { b } => { + __sats::bsatn::to_vec(&insert_one_bool_reducer::InsertOneBoolArgs { b: b.clone() }) } - Reducer::DeletePkU32InsertPkU32Two { n, data } => __sats::bsatn::to_vec( - &delete_pk_u_32_insert_pk_u_32_two_reducer::DeletePkU32InsertPkU32TwoArgs { - n: n.clone(), - data: data.clone(), - }, - ), - Reducer::DeletePkU32Two { n } => { - __sats::bsatn::to_vec(&delete_pk_u_32_two_reducer::DeletePkU32TwoArgs { n: n.clone() }) + Reducer::InsertOneF32 { f } => { + __sats::bsatn::to_vec(&insert_one_f_32_reducer::InsertOneF32Args { f: f.clone() }) } - Reducer::DeletePkU64 { n } => { - __sats::bsatn::to_vec(&delete_pk_u_64_reducer::DeletePkU64Args { n: n.clone() }) + Reducer::InsertOneF64 { f } => { + __sats::bsatn::to_vec(&insert_one_f_64_reducer::InsertOneF64Args { f: f.clone() }) } - Reducer::DeletePkU8 { n } => __sats::bsatn::to_vec(&delete_pk_u_8_reducer::DeletePkU8Args { n: n.clone() }), - Reducer::DeletePkUuid { u } => { - __sats::bsatn::to_vec(&delete_pk_uuid_reducer::DeletePkUuidArgs { u: u.clone() }) + Reducer::InsertOneString { s } => { + __sats::bsatn::to_vec(&insert_one_string_reducer::InsertOneStringArgs { s: s.clone() }) } - Reducer::DeleteUniqueBool { b } => { - __sats::bsatn::to_vec(&delete_unique_bool_reducer::DeleteUniqueBoolArgs { b: b.clone() }) + Reducer::InsertOneIdentity { i } => { + __sats::bsatn::to_vec(&insert_one_identity_reducer::InsertOneIdentityArgs { i: i.clone() }) } - Reducer::DeleteUniqueConnectionId { a } => { - __sats::bsatn::to_vec(&delete_unique_connection_id_reducer::DeleteUniqueConnectionIdArgs { - a: a.clone(), - }) + Reducer::InsertOneConnectionId { a } => { + __sats::bsatn::to_vec(&insert_one_connection_id_reducer::InsertOneConnectionIdArgs { a: a.clone() }) } - Reducer::DeleteUniqueI128 { n } => { - __sats::bsatn::to_vec(&delete_unique_i_128_reducer::DeleteUniqueI128Args { n: n.clone() }) + Reducer::InsertOneUuid { u } => { + __sats::bsatn::to_vec(&insert_one_uuid_reducer::InsertOneUuidArgs { u: u.clone() }) } - Reducer::DeleteUniqueI16 { n } => { - __sats::bsatn::to_vec(&delete_unique_i_16_reducer::DeleteUniqueI16Args { n: n.clone() }) + Reducer::InsertOneTimestamp { t } => { + __sats::bsatn::to_vec(&insert_one_timestamp_reducer::InsertOneTimestampArgs { t: t.clone() }) } - Reducer::DeleteUniqueI256 { n } => { - __sats::bsatn::to_vec(&delete_unique_i_256_reducer::DeleteUniqueI256Args { n: n.clone() }) + Reducer::InsertOneSimpleEnum { e } => { + __sats::bsatn::to_vec(&insert_one_simple_enum_reducer::InsertOneSimpleEnumArgs { e: e.clone() }) + } + Reducer::InsertOneEnumWithPayload { e } => { + __sats::bsatn::to_vec(&insert_one_enum_with_payload_reducer::InsertOneEnumWithPayloadArgs { + e: e.clone(), + }) } - Reducer::DeleteUniqueI32 { n } => { - __sats::bsatn::to_vec(&delete_unique_i_32_reducer::DeleteUniqueI32Args { n: n.clone() }) + Reducer::InsertOneUnitStruct { s } => { + __sats::bsatn::to_vec(&insert_one_unit_struct_reducer::InsertOneUnitStructArgs { s: s.clone() }) } - Reducer::DeleteUniqueI64 { n } => { - __sats::bsatn::to_vec(&delete_unique_i_64_reducer::DeleteUniqueI64Args { n: n.clone() }) + Reducer::InsertOneByteStruct { s } => { + __sats::bsatn::to_vec(&insert_one_byte_struct_reducer::InsertOneByteStructArgs { s: s.clone() }) } - Reducer::DeleteUniqueI8 { n } => { - __sats::bsatn::to_vec(&delete_unique_i_8_reducer::DeleteUniqueI8Args { n: n.clone() }) + Reducer::InsertOneEveryPrimitiveStruct { s } => __sats::bsatn::to_vec( + &insert_one_every_primitive_struct_reducer::InsertOneEveryPrimitiveStructArgs { s: s.clone() }, + ), + Reducer::InsertOneEveryVecStruct { s } => { + __sats::bsatn::to_vec(&insert_one_every_vec_struct_reducer::InsertOneEveryVecStructArgs { + s: s.clone(), + }) } - Reducer::DeleteUniqueIdentity { i } => { - __sats::bsatn::to_vec(&delete_unique_identity_reducer::DeleteUniqueIdentityArgs { i: i.clone() }) + Reducer::InsertVecU8 { n } => { + __sats::bsatn::to_vec(&insert_vec_u_8_reducer::InsertVecU8Args { n: n.clone() }) } - Reducer::DeleteUniqueString { s } => { - __sats::bsatn::to_vec(&delete_unique_string_reducer::DeleteUniqueStringArgs { s: s.clone() }) + Reducer::InsertVecU16 { n } => { + __sats::bsatn::to_vec(&insert_vec_u_16_reducer::InsertVecU16Args { n: n.clone() }) } - Reducer::DeleteUniqueU128 { n } => { - __sats::bsatn::to_vec(&delete_unique_u_128_reducer::DeleteUniqueU128Args { n: n.clone() }) + Reducer::InsertVecU32 { n } => { + __sats::bsatn::to_vec(&insert_vec_u_32_reducer::InsertVecU32Args { n: n.clone() }) } - Reducer::DeleteUniqueU16 { n } => { - __sats::bsatn::to_vec(&delete_unique_u_16_reducer::DeleteUniqueU16Args { n: n.clone() }) + Reducer::InsertVecU64 { n } => { + __sats::bsatn::to_vec(&insert_vec_u_64_reducer::InsertVecU64Args { n: n.clone() }) } - Reducer::DeleteUniqueU256 { n } => { - __sats::bsatn::to_vec(&delete_unique_u_256_reducer::DeleteUniqueU256Args { n: n.clone() }) + Reducer::InsertVecU128 { n } => { + __sats::bsatn::to_vec(&insert_vec_u_128_reducer::InsertVecU128Args { n: n.clone() }) } - Reducer::DeleteUniqueU32 { n } => { - __sats::bsatn::to_vec(&delete_unique_u_32_reducer::DeleteUniqueU32Args { n: n.clone() }) + Reducer::InsertVecU256 { n } => { + __sats::bsatn::to_vec(&insert_vec_u_256_reducer::InsertVecU256Args { n: n.clone() }) } - Reducer::DeleteUniqueU64 { n } => { - __sats::bsatn::to_vec(&delete_unique_u_64_reducer::DeleteUniqueU64Args { n: n.clone() }) + Reducer::InsertVecI8 { n } => { + __sats::bsatn::to_vec(&insert_vec_i_8_reducer::InsertVecI8Args { n: n.clone() }) } - Reducer::DeleteUniqueU8 { n } => { - __sats::bsatn::to_vec(&delete_unique_u_8_reducer::DeleteUniqueU8Args { n: n.clone() }) + Reducer::InsertVecI16 { n } => { + __sats::bsatn::to_vec(&insert_vec_i_16_reducer::InsertVecI16Args { n: n.clone() }) } - Reducer::DeleteUniqueUuid { u } => { - __sats::bsatn::to_vec(&delete_unique_uuid_reducer::DeleteUniqueUuidArgs { u: u.clone() }) + Reducer::InsertVecI32 { n } => { + __sats::bsatn::to_vec(&insert_vec_i_32_reducer::InsertVecI32Args { n: n.clone() }) } - Reducer::InsertCallTimestamp => { - __sats::bsatn::to_vec(&insert_call_timestamp_reducer::InsertCallTimestampArgs {}) + Reducer::InsertVecI64 { n } => { + __sats::bsatn::to_vec(&insert_vec_i_64_reducer::InsertVecI64Args { n: n.clone() }) } - Reducer::InsertCallUuidV4 => __sats::bsatn::to_vec(&insert_call_uuid_v_4_reducer::InsertCallUuidV4Args {}), - Reducer::InsertCallUuidV7 => __sats::bsatn::to_vec(&insert_call_uuid_v_7_reducer::InsertCallUuidV7Args {}), - Reducer::InsertCallerOneConnectionId => { - __sats::bsatn::to_vec(&insert_caller_one_connection_id_reducer::InsertCallerOneConnectionIdArgs {}) + Reducer::InsertVecI128 { n } => { + __sats::bsatn::to_vec(&insert_vec_i_128_reducer::InsertVecI128Args { n: n.clone() }) } - Reducer::InsertCallerOneIdentity => { - __sats::bsatn::to_vec(&insert_caller_one_identity_reducer::InsertCallerOneIdentityArgs {}) + Reducer::InsertVecI256 { n } => { + __sats::bsatn::to_vec(&insert_vec_i_256_reducer::InsertVecI256Args { n: n.clone() }) } - Reducer::InsertCallerPkConnectionId { data } => __sats::bsatn::to_vec( - &insert_caller_pk_connection_id_reducer::InsertCallerPkConnectionIdArgs { data: data.clone() }, - ), - Reducer::InsertCallerPkIdentity { data } => { - __sats::bsatn::to_vec(&insert_caller_pk_identity_reducer::InsertCallerPkIdentityArgs { - data: data.clone(), - }) + Reducer::InsertVecBool { b } => { + __sats::bsatn::to_vec(&insert_vec_bool_reducer::InsertVecBoolArgs { b: b.clone() }) } - Reducer::InsertCallerUniqueConnectionId { data } => __sats::bsatn::to_vec( - &insert_caller_unique_connection_id_reducer::InsertCallerUniqueConnectionIdArgs { data: data.clone() }, - ), - Reducer::InsertCallerUniqueIdentity { data } => { - __sats::bsatn::to_vec(&insert_caller_unique_identity_reducer::InsertCallerUniqueIdentityArgs { - data: data.clone(), - }) + Reducer::InsertVecF32 { f } => { + __sats::bsatn::to_vec(&insert_vec_f_32_reducer::InsertVecF32Args { f: f.clone() }) } - Reducer::InsertCallerVecConnectionId => { - __sats::bsatn::to_vec(&insert_caller_vec_connection_id_reducer::InsertCallerVecConnectionIdArgs {}) + Reducer::InsertVecF64 { f } => { + __sats::bsatn::to_vec(&insert_vec_f_64_reducer::InsertVecF64Args { f: f.clone() }) } - Reducer::InsertCallerVecIdentity => { - __sats::bsatn::to_vec(&insert_caller_vec_identity_reducer::InsertCallerVecIdentityArgs {}) + Reducer::InsertVecString { s } => { + __sats::bsatn::to_vec(&insert_vec_string_reducer::InsertVecStringArgs { s: s.clone() }) } - Reducer::InsertIntoBtreeU32 { rows } => { - __sats::bsatn::to_vec(&insert_into_btree_u_32_reducer::InsertIntoBtreeU32Args { rows: rows.clone() }) + Reducer::InsertVecIdentity { i } => { + __sats::bsatn::to_vec(&insert_vec_identity_reducer::InsertVecIdentityArgs { i: i.clone() }) } - Reducer::InsertIntoIndexedSimpleEnum { n } => __sats::bsatn::to_vec( - &insert_into_indexed_simple_enum_reducer::InsertIntoIndexedSimpleEnumArgs { n: n.clone() }, - ), - Reducer::InsertIntoPkBtreeU32 { pk_u_32, bt_u_32 } => { - __sats::bsatn::to_vec(&insert_into_pk_btree_u_32_reducer::InsertIntoPkBtreeU32Args { - pk_u_32: pk_u_32.clone(), - bt_u_32: bt_u_32.clone(), - }) + Reducer::InsertVecConnectionId { a } => { + __sats::bsatn::to_vec(&insert_vec_connection_id_reducer::InsertVecConnectionIdArgs { a: a.clone() }) } - Reducer::InsertLargeTable { - a, - b, - c, - d, - e, - f, - g, - h, - i, - j, - k, - l, - m, - n, - o, - p, - q, - r, - s, - t, - u, - v, - } => __sats::bsatn::to_vec(&insert_large_table_reducer::InsertLargeTableArgs { - a: a.clone(), - b: b.clone(), - c: c.clone(), - d: d.clone(), - e: e.clone(), - f: f.clone(), - g: g.clone(), - h: h.clone(), - i: i.clone(), - j: j.clone(), - k: k.clone(), - l: l.clone(), - m: m.clone(), - n: n.clone(), - o: o.clone(), - p: p.clone(), - q: q.clone(), - r: r.clone(), - s: s.clone(), - t: t.clone(), - u: u.clone(), - v: v.clone(), - }), - Reducer::InsertOneBool { b } => { - __sats::bsatn::to_vec(&insert_one_bool_reducer::InsertOneBoolArgs { b: b.clone() }) + Reducer::InsertVecTimestamp { t } => { + __sats::bsatn::to_vec(&insert_vec_timestamp_reducer::InsertVecTimestampArgs { t: t.clone() }) } - Reducer::InsertOneByteStruct { s } => { - __sats::bsatn::to_vec(&insert_one_byte_struct_reducer::InsertOneByteStructArgs { s: s.clone() }) + Reducer::InsertVecUuid { u } => { + __sats::bsatn::to_vec(&insert_vec_uuid_reducer::InsertVecUuidArgs { u: u.clone() }) } - Reducer::InsertOneConnectionId { a } => { - __sats::bsatn::to_vec(&insert_one_connection_id_reducer::InsertOneConnectionIdArgs { a: a.clone() }) + Reducer::InsertVecSimpleEnum { e } => { + __sats::bsatn::to_vec(&insert_vec_simple_enum_reducer::InsertVecSimpleEnumArgs { e: e.clone() }) } - Reducer::InsertOneEnumWithPayload { e } => { - __sats::bsatn::to_vec(&insert_one_enum_with_payload_reducer::InsertOneEnumWithPayloadArgs { + Reducer::InsertVecEnumWithPayload { e } => { + __sats::bsatn::to_vec(&insert_vec_enum_with_payload_reducer::InsertVecEnumWithPayloadArgs { e: e.clone(), }) } - Reducer::InsertOneEveryPrimitiveStruct { s } => __sats::bsatn::to_vec( - &insert_one_every_primitive_struct_reducer::InsertOneEveryPrimitiveStructArgs { s: s.clone() }, + Reducer::InsertVecUnitStruct { s } => { + __sats::bsatn::to_vec(&insert_vec_unit_struct_reducer::InsertVecUnitStructArgs { s: s.clone() }) + } + Reducer::InsertVecByteStruct { s } => { + __sats::bsatn::to_vec(&insert_vec_byte_struct_reducer::InsertVecByteStructArgs { s: s.clone() }) + } + Reducer::InsertVecEveryPrimitiveStruct { s } => __sats::bsatn::to_vec( + &insert_vec_every_primitive_struct_reducer::InsertVecEveryPrimitiveStructArgs { s: s.clone() }, ), - Reducer::InsertOneEveryVecStruct { s } => { - __sats::bsatn::to_vec(&insert_one_every_vec_struct_reducer::InsertOneEveryVecStructArgs { + Reducer::InsertVecEveryVecStruct { s } => { + __sats::bsatn::to_vec(&insert_vec_every_vec_struct_reducer::InsertVecEveryVecStructArgs { s: s.clone(), }) } - Reducer::InsertOneF32 { f } => { - __sats::bsatn::to_vec(&insert_one_f_32_reducer::InsertOneF32Args { f: f.clone() }) - } - Reducer::InsertOneF64 { f } => { - __sats::bsatn::to_vec(&insert_one_f_64_reducer::InsertOneF64Args { f: f.clone() }) - } - Reducer::InsertOneI128 { n } => { - __sats::bsatn::to_vec(&insert_one_i_128_reducer::InsertOneI128Args { n: n.clone() }) - } - Reducer::InsertOneI16 { n } => { - __sats::bsatn::to_vec(&insert_one_i_16_reducer::InsertOneI16Args { n: n.clone() }) - } - Reducer::InsertOneI256 { n } => { - __sats::bsatn::to_vec(&insert_one_i_256_reducer::InsertOneI256Args { n: n.clone() }) + Reducer::InsertOptionI32 { n } => { + __sats::bsatn::to_vec(&insert_option_i_32_reducer::InsertOptionI32Args { n: n.clone() }) } - Reducer::InsertOneI32 { n } => { - __sats::bsatn::to_vec(&insert_one_i_32_reducer::InsertOneI32Args { n: n.clone() }) + Reducer::InsertOptionString { s } => { + __sats::bsatn::to_vec(&insert_option_string_reducer::InsertOptionStringArgs { s: s.clone() }) } - Reducer::InsertOneI64 { n } => { - __sats::bsatn::to_vec(&insert_one_i_64_reducer::InsertOneI64Args { n: n.clone() }) + Reducer::InsertOptionIdentity { i } => { + __sats::bsatn::to_vec(&insert_option_identity_reducer::InsertOptionIdentityArgs { i: i.clone() }) } - Reducer::InsertOneI8 { n } => { - __sats::bsatn::to_vec(&insert_one_i_8_reducer::InsertOneI8Args { n: n.clone() }) + Reducer::InsertOptionUuid { u } => { + __sats::bsatn::to_vec(&insert_option_uuid_reducer::InsertOptionUuidArgs { u: u.clone() }) } - Reducer::InsertOneIdentity { i } => { - __sats::bsatn::to_vec(&insert_one_identity_reducer::InsertOneIdentityArgs { i: i.clone() }) + Reducer::InsertOptionSimpleEnum { e } => { + __sats::bsatn::to_vec(&insert_option_simple_enum_reducer::InsertOptionSimpleEnumArgs { e: e.clone() }) } - Reducer::InsertOneSimpleEnum { e } => { - __sats::bsatn::to_vec(&insert_one_simple_enum_reducer::InsertOneSimpleEnumArgs { e: e.clone() }) + Reducer::InsertOptionEveryPrimitiveStruct { s } => __sats::bsatn::to_vec( + &insert_option_every_primitive_struct_reducer::InsertOptionEveryPrimitiveStructArgs { s: s.clone() }, + ), + Reducer::InsertOptionVecOptionI32 { v } => { + __sats::bsatn::to_vec(&insert_option_vec_option_i_32_reducer::InsertOptionVecOptionI32Args { + v: v.clone(), + }) } - Reducer::InsertOneString { s } => { - __sats::bsatn::to_vec(&insert_one_string_reducer::InsertOneStringArgs { s: s.clone() }) + Reducer::InsertResultI32String { r } => { + __sats::bsatn::to_vec(&insert_result_i_32_string_reducer::InsertResultI32StringArgs { r: r.clone() }) } - Reducer::InsertOneTimestamp { t } => { - __sats::bsatn::to_vec(&insert_one_timestamp_reducer::InsertOneTimestampArgs { t: t.clone() }) + Reducer::InsertResultStringI32 { r } => { + __sats::bsatn::to_vec(&insert_result_string_i_32_reducer::InsertResultStringI32Args { r: r.clone() }) } - Reducer::InsertOneU128 { n } => { - __sats::bsatn::to_vec(&insert_one_u_128_reducer::InsertOneU128Args { n: n.clone() }) + Reducer::InsertResultIdentityString { r } => { + __sats::bsatn::to_vec(&insert_result_identity_string_reducer::InsertResultIdentityStringArgs { + r: r.clone(), + }) } - Reducer::InsertOneU16 { n } => { - __sats::bsatn::to_vec(&insert_one_u_16_reducer::InsertOneU16Args { n: n.clone() }) + Reducer::InsertResultSimpleEnumI32 { r } => { + __sats::bsatn::to_vec(&insert_result_simple_enum_i_32_reducer::InsertResultSimpleEnumI32Args { + r: r.clone(), + }) } - Reducer::InsertOneU256 { n } => { - __sats::bsatn::to_vec(&insert_one_u_256_reducer::InsertOneU256Args { n: n.clone() }) + Reducer::InsertResultEveryPrimitiveStructString { r } => __sats::bsatn::to_vec( + &insert_result_every_primitive_struct_string_reducer::InsertResultEveryPrimitiveStructStringArgs { + r: r.clone(), + }, + ), + Reducer::InsertResultVecI32String { r } => { + __sats::bsatn::to_vec(&insert_result_vec_i_32_string_reducer::InsertResultVecI32StringArgs { + r: r.clone(), + }) } - Reducer::InsertOneU32 { n } => { - __sats::bsatn::to_vec(&insert_one_u_32_reducer::InsertOneU32Args { n: n.clone() }) + Reducer::InsertUniqueU8 { n, data } => { + __sats::bsatn::to_vec(&insert_unique_u_8_reducer::InsertUniqueU8Args { + n: n.clone(), + data: data.clone(), + }) } - Reducer::InsertOneU64 { n } => { - __sats::bsatn::to_vec(&insert_one_u_64_reducer::InsertOneU64Args { n: n.clone() }) + Reducer::UpdateUniqueU8 { n, data } => { + __sats::bsatn::to_vec(&update_unique_u_8_reducer::UpdateUniqueU8Args { + n: n.clone(), + data: data.clone(), + }) } - Reducer::InsertOneU8 { n } => { - __sats::bsatn::to_vec(&insert_one_u_8_reducer::InsertOneU8Args { n: n.clone() }) + Reducer::DeleteUniqueU8 { n } => { + __sats::bsatn::to_vec(&delete_unique_u_8_reducer::DeleteUniqueU8Args { n: n.clone() }) } - Reducer::InsertOneUnitStruct { s } => { - __sats::bsatn::to_vec(&insert_one_unit_struct_reducer::InsertOneUnitStructArgs { s: s.clone() }) + Reducer::InsertUniqueU16 { n, data } => { + __sats::bsatn::to_vec(&insert_unique_u_16_reducer::InsertUniqueU16Args { + n: n.clone(), + data: data.clone(), + }) } - Reducer::InsertOneUuid { u } => { - __sats::bsatn::to_vec(&insert_one_uuid_reducer::InsertOneUuidArgs { u: u.clone() }) + Reducer::UpdateUniqueU16 { n, data } => { + __sats::bsatn::to_vec(&update_unique_u_16_reducer::UpdateUniqueU16Args { + n: n.clone(), + data: data.clone(), + }) } - Reducer::InsertOptionEveryPrimitiveStruct { s } => __sats::bsatn::to_vec( - &insert_option_every_primitive_struct_reducer::InsertOptionEveryPrimitiveStructArgs { s: s.clone() }, - ), - Reducer::InsertOptionI32 { n } => { - __sats::bsatn::to_vec(&insert_option_i_32_reducer::InsertOptionI32Args { n: n.clone() }) + Reducer::DeleteUniqueU16 { n } => { + __sats::bsatn::to_vec(&delete_unique_u_16_reducer::DeleteUniqueU16Args { n: n.clone() }) } - Reducer::InsertOptionIdentity { i } => { - __sats::bsatn::to_vec(&insert_option_identity_reducer::InsertOptionIdentityArgs { i: i.clone() }) + Reducer::InsertUniqueU32 { n, data } => { + __sats::bsatn::to_vec(&insert_unique_u_32_reducer::InsertUniqueU32Args { + n: n.clone(), + data: data.clone(), + }) } - Reducer::InsertOptionSimpleEnum { e } => { - __sats::bsatn::to_vec(&insert_option_simple_enum_reducer::InsertOptionSimpleEnumArgs { e: e.clone() }) + Reducer::UpdateUniqueU32 { n, data } => { + __sats::bsatn::to_vec(&update_unique_u_32_reducer::UpdateUniqueU32Args { + n: n.clone(), + data: data.clone(), + }) } - Reducer::InsertOptionString { s } => { - __sats::bsatn::to_vec(&insert_option_string_reducer::InsertOptionStringArgs { s: s.clone() }) + Reducer::DeleteUniqueU32 { n } => { + __sats::bsatn::to_vec(&delete_unique_u_32_reducer::DeleteUniqueU32Args { n: n.clone() }) } - Reducer::InsertOptionUuid { u } => { - __sats::bsatn::to_vec(&insert_option_uuid_reducer::InsertOptionUuidArgs { u: u.clone() }) + Reducer::InsertUniqueU64 { n, data } => { + __sats::bsatn::to_vec(&insert_unique_u_64_reducer::InsertUniqueU64Args { + n: n.clone(), + data: data.clone(), + }) } - Reducer::InsertOptionVecOptionI32 { v } => { - __sats::bsatn::to_vec(&insert_option_vec_option_i_32_reducer::InsertOptionVecOptionI32Args { - v: v.clone(), + Reducer::UpdateUniqueU64 { n, data } => { + __sats::bsatn::to_vec(&update_unique_u_64_reducer::UpdateUniqueU64Args { + n: n.clone(), + data: data.clone(), }) } - Reducer::InsertPkBool { b, data } => __sats::bsatn::to_vec(&insert_pk_bool_reducer::InsertPkBoolArgs { - b: b.clone(), - data: data.clone(), - }), - Reducer::InsertPkConnectionId { a, data } => { - __sats::bsatn::to_vec(&insert_pk_connection_id_reducer::InsertPkConnectionIdArgs { - a: a.clone(), + Reducer::DeleteUniqueU64 { n } => { + __sats::bsatn::to_vec(&delete_unique_u_64_reducer::DeleteUniqueU64Args { n: n.clone() }) + } + Reducer::InsertUniqueU128 { n, data } => { + __sats::bsatn::to_vec(&insert_unique_u_128_reducer::InsertUniqueU128Args { + n: n.clone(), data: data.clone(), }) } - Reducer::InsertPkI128 { n, data } => __sats::bsatn::to_vec(&insert_pk_i_128_reducer::InsertPkI128Args { - n: n.clone(), - data: data.clone(), - }), - Reducer::InsertPkI16 { n, data } => __sats::bsatn::to_vec(&insert_pk_i_16_reducer::InsertPkI16Args { - n: n.clone(), - data: data.clone(), - }), - Reducer::InsertPkI256 { n, data } => __sats::bsatn::to_vec(&insert_pk_i_256_reducer::InsertPkI256Args { - n: n.clone(), - data: data.clone(), - }), - Reducer::InsertPkI32 { n, data } => __sats::bsatn::to_vec(&insert_pk_i_32_reducer::InsertPkI32Args { - n: n.clone(), - data: data.clone(), - }), - Reducer::InsertPkI64 { n, data } => __sats::bsatn::to_vec(&insert_pk_i_64_reducer::InsertPkI64Args { - n: n.clone(), - data: data.clone(), - }), - Reducer::InsertPkI8 { n, data } => __sats::bsatn::to_vec(&insert_pk_i_8_reducer::InsertPkI8Args { - n: n.clone(), - data: data.clone(), - }), - Reducer::InsertPkIdentity { i, data } => { - __sats::bsatn::to_vec(&insert_pk_identity_reducer::InsertPkIdentityArgs { - i: i.clone(), + Reducer::UpdateUniqueU128 { n, data } => { + __sats::bsatn::to_vec(&update_unique_u_128_reducer::UpdateUniqueU128Args { + n: n.clone(), data: data.clone(), }) } - Reducer::InsertPkSimpleEnum { a, data } => { - __sats::bsatn::to_vec(&insert_pk_simple_enum_reducer::InsertPkSimpleEnumArgs { - a: a.clone(), + Reducer::DeleteUniqueU128 { n } => { + __sats::bsatn::to_vec(&delete_unique_u_128_reducer::DeleteUniqueU128Args { n: n.clone() }) + } + Reducer::InsertUniqueU256 { n, data } => { + __sats::bsatn::to_vec(&insert_unique_u_256_reducer::InsertUniqueU256Args { + n: n.clone(), data: data.clone(), }) } - Reducer::InsertPkString { s, data } => { - __sats::bsatn::to_vec(&insert_pk_string_reducer::InsertPkStringArgs { - s: s.clone(), + Reducer::UpdateUniqueU256 { n, data } => { + __sats::bsatn::to_vec(&update_unique_u_256_reducer::UpdateUniqueU256Args { + n: n.clone(), data: data.clone(), }) } - Reducer::InsertPkU128 { n, data } => __sats::bsatn::to_vec(&insert_pk_u_128_reducer::InsertPkU128Args { - n: n.clone(), - data: data.clone(), - }), - Reducer::InsertPkU16 { n, data } => __sats::bsatn::to_vec(&insert_pk_u_16_reducer::InsertPkU16Args { - n: n.clone(), - data: data.clone(), - }), - Reducer::InsertPkU256 { n, data } => __sats::bsatn::to_vec(&insert_pk_u_256_reducer::InsertPkU256Args { - n: n.clone(), - data: data.clone(), - }), - Reducer::InsertPkU32 { n, data } => __sats::bsatn::to_vec(&insert_pk_u_32_reducer::InsertPkU32Args { - n: n.clone(), - data: data.clone(), - }), - Reducer::InsertPkU32Two { n, data } => { - __sats::bsatn::to_vec(&insert_pk_u_32_two_reducer::InsertPkU32TwoArgs { + Reducer::DeleteUniqueU256 { n } => { + __sats::bsatn::to_vec(&delete_unique_u_256_reducer::DeleteUniqueU256Args { n: n.clone() }) + } + Reducer::InsertUniqueI8 { n, data } => { + __sats::bsatn::to_vec(&insert_unique_i_8_reducer::InsertUniqueI8Args { n: n.clone(), data: data.clone(), }) } - Reducer::InsertPkU64 { n, data } => __sats::bsatn::to_vec(&insert_pk_u_64_reducer::InsertPkU64Args { - n: n.clone(), - data: data.clone(), - }), - Reducer::InsertPkU8 { n, data } => __sats::bsatn::to_vec(&insert_pk_u_8_reducer::InsertPkU8Args { - n: n.clone(), - data: data.clone(), - }), - Reducer::InsertPkUuid { u, data } => __sats::bsatn::to_vec(&insert_pk_uuid_reducer::InsertPkUuidArgs { - u: u.clone(), - data: data.clone(), - }), - Reducer::InsertPrimitivesAsStrings { s } => { - __sats::bsatn::to_vec(&insert_primitives_as_strings_reducer::InsertPrimitivesAsStringsArgs { - s: s.clone(), + Reducer::UpdateUniqueI8 { n, data } => { + __sats::bsatn::to_vec(&update_unique_i_8_reducer::UpdateUniqueI8Args { + n: n.clone(), + data: data.clone(), }) } - Reducer::InsertResultEveryPrimitiveStructString { r } => __sats::bsatn::to_vec( - &insert_result_every_primitive_struct_string_reducer::InsertResultEveryPrimitiveStructStringArgs { - r: r.clone(), - }, - ), - Reducer::InsertResultI32String { r } => { - __sats::bsatn::to_vec(&insert_result_i_32_string_reducer::InsertResultI32StringArgs { r: r.clone() }) + Reducer::DeleteUniqueI8 { n } => { + __sats::bsatn::to_vec(&delete_unique_i_8_reducer::DeleteUniqueI8Args { n: n.clone() }) } - Reducer::InsertResultIdentityString { r } => { - __sats::bsatn::to_vec(&insert_result_identity_string_reducer::InsertResultIdentityStringArgs { - r: r.clone(), + Reducer::InsertUniqueI16 { n, data } => { + __sats::bsatn::to_vec(&insert_unique_i_16_reducer::InsertUniqueI16Args { + n: n.clone(), + data: data.clone(), }) } - Reducer::InsertResultSimpleEnumI32 { r } => { - __sats::bsatn::to_vec(&insert_result_simple_enum_i_32_reducer::InsertResultSimpleEnumI32Args { - r: r.clone(), + Reducer::UpdateUniqueI16 { n, data } => { + __sats::bsatn::to_vec(&update_unique_i_16_reducer::UpdateUniqueI16Args { + n: n.clone(), + data: data.clone(), }) } - Reducer::InsertResultStringI32 { r } => { - __sats::bsatn::to_vec(&insert_result_string_i_32_reducer::InsertResultStringI32Args { r: r.clone() }) + Reducer::DeleteUniqueI16 { n } => { + __sats::bsatn::to_vec(&delete_unique_i_16_reducer::DeleteUniqueI16Args { n: n.clone() }) } - Reducer::InsertResultVecI32String { r } => { - __sats::bsatn::to_vec(&insert_result_vec_i_32_string_reducer::InsertResultVecI32StringArgs { - r: r.clone(), + Reducer::InsertUniqueI32 { n, data } => { + __sats::bsatn::to_vec(&insert_unique_i_32_reducer::InsertUniqueI32Args { + n: n.clone(), + data: data.clone(), }) } - Reducer::InsertTableHoldsTable { a, b } => { - __sats::bsatn::to_vec(&insert_table_holds_table_reducer::InsertTableHoldsTableArgs { - a: a.clone(), - b: b.clone(), + Reducer::UpdateUniqueI32 { n, data } => { + __sats::bsatn::to_vec(&update_unique_i_32_reducer::UpdateUniqueI32Args { + n: n.clone(), + data: data.clone(), }) } - Reducer::InsertUniqueBool { b, data } => { - __sats::bsatn::to_vec(&insert_unique_bool_reducer::InsertUniqueBoolArgs { - b: b.clone(), + Reducer::DeleteUniqueI32 { n } => { + __sats::bsatn::to_vec(&delete_unique_i_32_reducer::DeleteUniqueI32Args { n: n.clone() }) + } + Reducer::InsertUniqueI64 { n, data } => { + __sats::bsatn::to_vec(&insert_unique_i_64_reducer::InsertUniqueI64Args { + n: n.clone(), data: data.clone(), }) } - Reducer::InsertUniqueConnectionId { a, data } => { - __sats::bsatn::to_vec(&insert_unique_connection_id_reducer::InsertUniqueConnectionIdArgs { - a: a.clone(), + Reducer::UpdateUniqueI64 { n, data } => { + __sats::bsatn::to_vec(&update_unique_i_64_reducer::UpdateUniqueI64Args { + n: n.clone(), data: data.clone(), }) } + Reducer::DeleteUniqueI64 { n } => { + __sats::bsatn::to_vec(&delete_unique_i_64_reducer::DeleteUniqueI64Args { n: n.clone() }) + } Reducer::InsertUniqueI128 { n, data } => { __sats::bsatn::to_vec(&insert_unique_i_128_reducer::InsertUniqueI128Args { n: n.clone(), data: data.clone(), }) } - Reducer::InsertUniqueI16 { n, data } => { - __sats::bsatn::to_vec(&insert_unique_i_16_reducer::InsertUniqueI16Args { + Reducer::UpdateUniqueI128 { n, data } => { + __sats::bsatn::to_vec(&update_unique_i_128_reducer::UpdateUniqueI128Args { n: n.clone(), data: data.clone(), }) } + Reducer::DeleteUniqueI128 { n } => { + __sats::bsatn::to_vec(&delete_unique_i_128_reducer::DeleteUniqueI128Args { n: n.clone() }) + } Reducer::InsertUniqueI256 { n, data } => { __sats::bsatn::to_vec(&insert_unique_i_256_reducer::InsertUniqueI256Args { n: n.clone(), data: data.clone(), }) } - Reducer::InsertUniqueI32 { n, data } => { - __sats::bsatn::to_vec(&insert_unique_i_32_reducer::InsertUniqueI32Args { + Reducer::UpdateUniqueI256 { n, data } => { + __sats::bsatn::to_vec(&update_unique_i_256_reducer::UpdateUniqueI256Args { n: n.clone(), data: data.clone(), }) } - Reducer::InsertUniqueI64 { n, data } => { - __sats::bsatn::to_vec(&insert_unique_i_64_reducer::InsertUniqueI64Args { - n: n.clone(), - data: data.clone(), - }) + Reducer::DeleteUniqueI256 { n } => { + __sats::bsatn::to_vec(&delete_unique_i_256_reducer::DeleteUniqueI256Args { n: n.clone() }) } - Reducer::InsertUniqueI8 { n, data } => { - __sats::bsatn::to_vec(&insert_unique_i_8_reducer::InsertUniqueI8Args { - n: n.clone(), + Reducer::InsertUniqueBool { b, data } => { + __sats::bsatn::to_vec(&insert_unique_bool_reducer::InsertUniqueBoolArgs { + b: b.clone(), data: data.clone(), }) } - Reducer::InsertUniqueIdentity { i, data } => { - __sats::bsatn::to_vec(&insert_unique_identity_reducer::InsertUniqueIdentityArgs { - i: i.clone(), + Reducer::UpdateUniqueBool { b, data } => { + __sats::bsatn::to_vec(&update_unique_bool_reducer::UpdateUniqueBoolArgs { + b: b.clone(), data: data.clone(), }) } + Reducer::DeleteUniqueBool { b } => { + __sats::bsatn::to_vec(&delete_unique_bool_reducer::DeleteUniqueBoolArgs { b: b.clone() }) + } Reducer::InsertUniqueString { s, data } => { __sats::bsatn::to_vec(&insert_unique_string_reducer::InsertUniqueStringArgs { s: s.clone(), data: data.clone(), }) } - Reducer::InsertUniqueU128 { n, data } => { - __sats::bsatn::to_vec(&insert_unique_u_128_reducer::InsertUniqueU128Args { - n: n.clone(), + Reducer::UpdateUniqueString { s, data } => { + __sats::bsatn::to_vec(&update_unique_string_reducer::UpdateUniqueStringArgs { + s: s.clone(), data: data.clone(), }) } - Reducer::InsertUniqueU16 { n, data } => { - __sats::bsatn::to_vec(&insert_unique_u_16_reducer::InsertUniqueU16Args { - n: n.clone(), + Reducer::DeleteUniqueString { s } => { + __sats::bsatn::to_vec(&delete_unique_string_reducer::DeleteUniqueStringArgs { s: s.clone() }) + } + Reducer::InsertUniqueIdentity { i, data } => { + __sats::bsatn::to_vec(&insert_unique_identity_reducer::InsertUniqueIdentityArgs { + i: i.clone(), data: data.clone(), }) } - Reducer::InsertUniqueU256 { n, data } => { - __sats::bsatn::to_vec(&insert_unique_u_256_reducer::InsertUniqueU256Args { - n: n.clone(), + Reducer::UpdateUniqueIdentity { i, data } => { + __sats::bsatn::to_vec(&update_unique_identity_reducer::UpdateUniqueIdentityArgs { + i: i.clone(), data: data.clone(), }) } - Reducer::InsertUniqueU32 { n, data } => { - __sats::bsatn::to_vec(&insert_unique_u_32_reducer::InsertUniqueU32Args { - n: n.clone(), + Reducer::DeleteUniqueIdentity { i } => { + __sats::bsatn::to_vec(&delete_unique_identity_reducer::DeleteUniqueIdentityArgs { i: i.clone() }) + } + Reducer::InsertUniqueConnectionId { a, data } => { + __sats::bsatn::to_vec(&insert_unique_connection_id_reducer::InsertUniqueConnectionIdArgs { + a: a.clone(), data: data.clone(), }) } - Reducer::InsertUniqueU32UpdatePkU32 { n, d_unique, d_pk } => __sats::bsatn::to_vec( - &insert_unique_u_32_update_pk_u_32_reducer::InsertUniqueU32UpdatePkU32Args { - n: n.clone(), - d_unique: d_unique.clone(), - d_pk: d_pk.clone(), - }, - ), - Reducer::InsertUniqueU64 { n, data } => { - __sats::bsatn::to_vec(&insert_unique_u_64_reducer::InsertUniqueU64Args { - n: n.clone(), + Reducer::UpdateUniqueConnectionId { a, data } => { + __sats::bsatn::to_vec(&update_unique_connection_id_reducer::UpdateUniqueConnectionIdArgs { + a: a.clone(), data: data.clone(), }) } - Reducer::InsertUniqueU8 { n, data } => { - __sats::bsatn::to_vec(&insert_unique_u_8_reducer::InsertUniqueU8Args { - n: n.clone(), - data: data.clone(), + Reducer::DeleteUniqueConnectionId { a } => { + __sats::bsatn::to_vec(&delete_unique_connection_id_reducer::DeleteUniqueConnectionIdArgs { + a: a.clone(), }) } Reducer::InsertUniqueUuid { u, data } => { @@ -2358,130 +2698,95 @@ impl __sdk::Reducer for Reducer { data: data.clone(), }) } - Reducer::InsertUser { name, identity } => __sats::bsatn::to_vec(&insert_user_reducer::InsertUserArgs { - name: name.clone(), - identity: identity.clone(), - }), - Reducer::InsertVecBool { b } => { - __sats::bsatn::to_vec(&insert_vec_bool_reducer::InsertVecBoolArgs { b: b.clone() }) - } - Reducer::InsertVecByteStruct { s } => { - __sats::bsatn::to_vec(&insert_vec_byte_struct_reducer::InsertVecByteStructArgs { s: s.clone() }) - } - Reducer::InsertVecConnectionId { a } => { - __sats::bsatn::to_vec(&insert_vec_connection_id_reducer::InsertVecConnectionIdArgs { a: a.clone() }) - } - Reducer::InsertVecEnumWithPayload { e } => { - __sats::bsatn::to_vec(&insert_vec_enum_with_payload_reducer::InsertVecEnumWithPayloadArgs { - e: e.clone(), - }) - } - Reducer::InsertVecEveryPrimitiveStruct { s } => __sats::bsatn::to_vec( - &insert_vec_every_primitive_struct_reducer::InsertVecEveryPrimitiveStructArgs { s: s.clone() }, - ), - Reducer::InsertVecEveryVecStruct { s } => { - __sats::bsatn::to_vec(&insert_vec_every_vec_struct_reducer::InsertVecEveryVecStructArgs { - s: s.clone(), + Reducer::UpdateUniqueUuid { u, data } => { + __sats::bsatn::to_vec(&update_unique_uuid_reducer::UpdateUniqueUuidArgs { + u: u.clone(), + data: data.clone(), }) } - Reducer::InsertVecF32 { f } => { - __sats::bsatn::to_vec(&insert_vec_f_32_reducer::InsertVecF32Args { f: f.clone() }) - } - Reducer::InsertVecF64 { f } => { - __sats::bsatn::to_vec(&insert_vec_f_64_reducer::InsertVecF64Args { f: f.clone() }) - } - Reducer::InsertVecI128 { n } => { - __sats::bsatn::to_vec(&insert_vec_i_128_reducer::InsertVecI128Args { n: n.clone() }) - } - Reducer::InsertVecI16 { n } => { - __sats::bsatn::to_vec(&insert_vec_i_16_reducer::InsertVecI16Args { n: n.clone() }) - } - Reducer::InsertVecI256 { n } => { - __sats::bsatn::to_vec(&insert_vec_i_256_reducer::InsertVecI256Args { n: n.clone() }) - } - Reducer::InsertVecI32 { n } => { - __sats::bsatn::to_vec(&insert_vec_i_32_reducer::InsertVecI32Args { n: n.clone() }) - } - Reducer::InsertVecI64 { n } => { - __sats::bsatn::to_vec(&insert_vec_i_64_reducer::InsertVecI64Args { n: n.clone() }) - } - Reducer::InsertVecI8 { n } => { - __sats::bsatn::to_vec(&insert_vec_i_8_reducer::InsertVecI8Args { n: n.clone() }) - } - Reducer::InsertVecIdentity { i } => { - __sats::bsatn::to_vec(&insert_vec_identity_reducer::InsertVecIdentityArgs { i: i.clone() }) - } - Reducer::InsertVecSimpleEnum { e } => { - __sats::bsatn::to_vec(&insert_vec_simple_enum_reducer::InsertVecSimpleEnumArgs { e: e.clone() }) - } - Reducer::InsertVecString { s } => { - __sats::bsatn::to_vec(&insert_vec_string_reducer::InsertVecStringArgs { s: s.clone() }) - } - Reducer::InsertVecTimestamp { t } => { - __sats::bsatn::to_vec(&insert_vec_timestamp_reducer::InsertVecTimestampArgs { t: t.clone() }) - } - Reducer::InsertVecU128 { n } => { - __sats::bsatn::to_vec(&insert_vec_u_128_reducer::InsertVecU128Args { n: n.clone() }) - } - Reducer::InsertVecU16 { n } => { - __sats::bsatn::to_vec(&insert_vec_u_16_reducer::InsertVecU16Args { n: n.clone() }) - } - Reducer::InsertVecU256 { n } => { - __sats::bsatn::to_vec(&insert_vec_u_256_reducer::InsertVecU256Args { n: n.clone() }) - } - Reducer::InsertVecU32 { n } => { - __sats::bsatn::to_vec(&insert_vec_u_32_reducer::InsertVecU32Args { n: n.clone() }) - } - Reducer::InsertVecU64 { n } => { - __sats::bsatn::to_vec(&insert_vec_u_64_reducer::InsertVecU64Args { n: n.clone() }) - } - Reducer::InsertVecU8 { n } => { - __sats::bsatn::to_vec(&insert_vec_u_8_reducer::InsertVecU8Args { n: n.clone() }) + Reducer::DeleteUniqueUuid { u } => { + __sats::bsatn::to_vec(&delete_unique_uuid_reducer::DeleteUniqueUuidArgs { u: u.clone() }) } - Reducer::InsertVecUnitStruct { s } => { - __sats::bsatn::to_vec(&insert_vec_unit_struct_reducer::InsertVecUnitStructArgs { s: s.clone() }) + Reducer::InsertPkU8 { n, data } => __sats::bsatn::to_vec(&insert_pk_u_8_reducer::InsertPkU8Args { + n: n.clone(), + data: data.clone(), + }), + Reducer::UpdatePkU8 { n, data } => __sats::bsatn::to_vec(&update_pk_u_8_reducer::UpdatePkU8Args { + n: n.clone(), + data: data.clone(), + }), + Reducer::DeletePkU8 { n } => __sats::bsatn::to_vec(&delete_pk_u_8_reducer::DeletePkU8Args { n: n.clone() }), + Reducer::InsertPkU16 { n, data } => __sats::bsatn::to_vec(&insert_pk_u_16_reducer::InsertPkU16Args { + n: n.clone(), + data: data.clone(), + }), + Reducer::UpdatePkU16 { n, data } => __sats::bsatn::to_vec(&update_pk_u_16_reducer::UpdatePkU16Args { + n: n.clone(), + data: data.clone(), + }), + Reducer::DeletePkU16 { n } => { + __sats::bsatn::to_vec(&delete_pk_u_16_reducer::DeletePkU16Args { n: n.clone() }) } - Reducer::InsertVecUuid { u } => { - __sats::bsatn::to_vec(&insert_vec_uuid_reducer::InsertVecUuidArgs { u: u.clone() }) + Reducer::InsertPkU32 { n, data } => __sats::bsatn::to_vec(&insert_pk_u_32_reducer::InsertPkU32Args { + n: n.clone(), + data: data.clone(), + }), + Reducer::UpdatePkU32 { n, data } => __sats::bsatn::to_vec(&update_pk_u_32_reducer::UpdatePkU32Args { + n: n.clone(), + data: data.clone(), + }), + Reducer::DeletePkU32 { n } => { + __sats::bsatn::to_vec(&delete_pk_u_32_reducer::DeletePkU32Args { n: n.clone() }) } - Reducer::NoOpSucceeds => __sats::bsatn::to_vec(&no_op_succeeds_reducer::NoOpSucceedsArgs {}), - Reducer::SendScheduledMessage { arg } => { - __sats::bsatn::to_vec(&send_scheduled_message_reducer::SendScheduledMessageArgs { arg: arg.clone() }) + Reducer::InsertPkU32Two { n, data } => { + __sats::bsatn::to_vec(&insert_pk_u_32_two_reducer::InsertPkU32TwoArgs { + n: n.clone(), + data: data.clone(), + }) } - Reducer::SortedUuidsInsert => __sats::bsatn::to_vec(&sorted_uuids_insert_reducer::SortedUuidsInsertArgs {}), - Reducer::UpdateIndexedSimpleEnum { a, b } => { - __sats::bsatn::to_vec(&update_indexed_simple_enum_reducer::UpdateIndexedSimpleEnumArgs { - a: a.clone(), - b: b.clone(), + Reducer::UpdatePkU32Two { n, data } => { + __sats::bsatn::to_vec(&update_pk_u_32_two_reducer::UpdatePkU32TwoArgs { + n: n.clone(), + data: data.clone(), }) } - Reducer::UpdatePkBool { b, data } => __sats::bsatn::to_vec(&update_pk_bool_reducer::UpdatePkBoolArgs { - b: b.clone(), + Reducer::DeletePkU32Two { n } => { + __sats::bsatn::to_vec(&delete_pk_u_32_two_reducer::DeletePkU32TwoArgs { n: n.clone() }) + } + Reducer::InsertPkU64 { n, data } => __sats::bsatn::to_vec(&insert_pk_u_64_reducer::InsertPkU64Args { + n: n.clone(), data: data.clone(), }), - Reducer::UpdatePkConnectionId { a, data } => { - __sats::bsatn::to_vec(&update_pk_connection_id_reducer::UpdatePkConnectionIdArgs { - a: a.clone(), - data: data.clone(), - }) + Reducer::UpdatePkU64 { n, data } => __sats::bsatn::to_vec(&update_pk_u_64_reducer::UpdatePkU64Args { + n: n.clone(), + data: data.clone(), + }), + Reducer::DeletePkU64 { n } => { + __sats::bsatn::to_vec(&delete_pk_u_64_reducer::DeletePkU64Args { n: n.clone() }) } - Reducer::UpdatePkI128 { n, data } => __sats::bsatn::to_vec(&update_pk_i_128_reducer::UpdatePkI128Args { + Reducer::InsertPkU128 { n, data } => __sats::bsatn::to_vec(&insert_pk_u_128_reducer::InsertPkU128Args { n: n.clone(), data: data.clone(), }), - Reducer::UpdatePkI16 { n, data } => __sats::bsatn::to_vec(&update_pk_i_16_reducer::UpdatePkI16Args { + Reducer::UpdatePkU128 { n, data } => __sats::bsatn::to_vec(&update_pk_u_128_reducer::UpdatePkU128Args { n: n.clone(), data: data.clone(), }), - Reducer::UpdatePkI256 { n, data } => __sats::bsatn::to_vec(&update_pk_i_256_reducer::UpdatePkI256Args { + Reducer::DeletePkU128 { n } => { + __sats::bsatn::to_vec(&delete_pk_u_128_reducer::DeletePkU128Args { n: n.clone() }) + } + Reducer::InsertPkU256 { n, data } => __sats::bsatn::to_vec(&insert_pk_u_256_reducer::InsertPkU256Args { n: n.clone(), data: data.clone(), }), - Reducer::UpdatePkI32 { n, data } => __sats::bsatn::to_vec(&update_pk_i_32_reducer::UpdatePkI32Args { + Reducer::UpdatePkU256 { n, data } => __sats::bsatn::to_vec(&update_pk_u_256_reducer::UpdatePkU256Args { n: n.clone(), data: data.clone(), }), - Reducer::UpdatePkI64 { n, data } => __sats::bsatn::to_vec(&update_pk_i_64_reducer::UpdatePkI64Args { + Reducer::DeletePkU256 { n } => { + __sats::bsatn::to_vec(&delete_pk_u_256_reducer::DeletePkU256Args { n: n.clone() }) + } + Reducer::InsertPkI8 { n, data } => __sats::bsatn::to_vec(&insert_pk_i_8_reducer::InsertPkI8Args { n: n.clone(), data: data.clone(), }), @@ -2489,157 +2794,248 @@ impl __sdk::Reducer for Reducer { n: n.clone(), data: data.clone(), }), - Reducer::UpdatePkIdentity { i, data } => { - __sats::bsatn::to_vec(&update_pk_identity_reducer::UpdatePkIdentityArgs { - i: i.clone(), - data: data.clone(), - }) - } - Reducer::UpdatePkSimpleEnum { a, data } => { - __sats::bsatn::to_vec(&update_pk_simple_enum_reducer::UpdatePkSimpleEnumArgs { - a: a.clone(), - data: data.clone(), - }) - } - Reducer::UpdatePkString { s, data } => { - __sats::bsatn::to_vec(&update_pk_string_reducer::UpdatePkStringArgs { - s: s.clone(), - data: data.clone(), - }) + Reducer::DeletePkI8 { n } => __sats::bsatn::to_vec(&delete_pk_i_8_reducer::DeletePkI8Args { n: n.clone() }), + Reducer::InsertPkI16 { n, data } => __sats::bsatn::to_vec(&insert_pk_i_16_reducer::InsertPkI16Args { + n: n.clone(), + data: data.clone(), + }), + Reducer::UpdatePkI16 { n, data } => __sats::bsatn::to_vec(&update_pk_i_16_reducer::UpdatePkI16Args { + n: n.clone(), + data: data.clone(), + }), + Reducer::DeletePkI16 { n } => { + __sats::bsatn::to_vec(&delete_pk_i_16_reducer::DeletePkI16Args { n: n.clone() }) } - Reducer::UpdatePkU128 { n, data } => __sats::bsatn::to_vec(&update_pk_u_128_reducer::UpdatePkU128Args { + Reducer::InsertPkI32 { n, data } => __sats::bsatn::to_vec(&insert_pk_i_32_reducer::InsertPkI32Args { n: n.clone(), data: data.clone(), }), - Reducer::UpdatePkU16 { n, data } => __sats::bsatn::to_vec(&update_pk_u_16_reducer::UpdatePkU16Args { + Reducer::UpdatePkI32 { n, data } => __sats::bsatn::to_vec(&update_pk_i_32_reducer::UpdatePkI32Args { n: n.clone(), data: data.clone(), }), - Reducer::UpdatePkU256 { n, data } => __sats::bsatn::to_vec(&update_pk_u_256_reducer::UpdatePkU256Args { + Reducer::DeletePkI32 { n } => { + __sats::bsatn::to_vec(&delete_pk_i_32_reducer::DeletePkI32Args { n: n.clone() }) + } + Reducer::InsertPkI64 { n, data } => __sats::bsatn::to_vec(&insert_pk_i_64_reducer::InsertPkI64Args { n: n.clone(), data: data.clone(), }), - Reducer::UpdatePkU32 { n, data } => __sats::bsatn::to_vec(&update_pk_u_32_reducer::UpdatePkU32Args { + Reducer::UpdatePkI64 { n, data } => __sats::bsatn::to_vec(&update_pk_i_64_reducer::UpdatePkI64Args { n: n.clone(), data: data.clone(), }), - Reducer::UpdatePkU32Two { n, data } => { - __sats::bsatn::to_vec(&update_pk_u_32_two_reducer::UpdatePkU32TwoArgs { - n: n.clone(), - data: data.clone(), - }) + Reducer::DeletePkI64 { n } => { + __sats::bsatn::to_vec(&delete_pk_i_64_reducer::DeletePkI64Args { n: n.clone() }) } - Reducer::UpdatePkU64 { n, data } => __sats::bsatn::to_vec(&update_pk_u_64_reducer::UpdatePkU64Args { + Reducer::InsertPkI128 { n, data } => __sats::bsatn::to_vec(&insert_pk_i_128_reducer::InsertPkI128Args { n: n.clone(), data: data.clone(), }), - Reducer::UpdatePkU8 { n, data } => __sats::bsatn::to_vec(&update_pk_u_8_reducer::UpdatePkU8Args { + Reducer::UpdatePkI128 { n, data } => __sats::bsatn::to_vec(&update_pk_i_128_reducer::UpdatePkI128Args { n: n.clone(), data: data.clone(), }), - Reducer::UpdatePkUuid { u, data } => __sats::bsatn::to_vec(&update_pk_uuid_reducer::UpdatePkUuidArgs { - u: u.clone(), + Reducer::DeletePkI128 { n } => { + __sats::bsatn::to_vec(&delete_pk_i_128_reducer::DeletePkI128Args { n: n.clone() }) + } + Reducer::InsertPkI256 { n, data } => __sats::bsatn::to_vec(&insert_pk_i_256_reducer::InsertPkI256Args { + n: n.clone(), data: data.clone(), }), - Reducer::UpdateUniqueBool { b, data } => { - __sats::bsatn::to_vec(&update_unique_bool_reducer::UpdateUniqueBoolArgs { - b: b.clone(), - data: data.clone(), - }) + Reducer::UpdatePkI256 { n, data } => __sats::bsatn::to_vec(&update_pk_i_256_reducer::UpdatePkI256Args { + n: n.clone(), + data: data.clone(), + }), + Reducer::DeletePkI256 { n } => { + __sats::bsatn::to_vec(&delete_pk_i_256_reducer::DeletePkI256Args { n: n.clone() }) } - Reducer::UpdateUniqueConnectionId { a, data } => { - __sats::bsatn::to_vec(&update_unique_connection_id_reducer::UpdateUniqueConnectionIdArgs { - a: a.clone(), - data: data.clone(), - }) + Reducer::InsertPkBool { b, data } => __sats::bsatn::to_vec(&insert_pk_bool_reducer::InsertPkBoolArgs { + b: b.clone(), + data: data.clone(), + }), + Reducer::UpdatePkBool { b, data } => __sats::bsatn::to_vec(&update_pk_bool_reducer::UpdatePkBoolArgs { + b: b.clone(), + data: data.clone(), + }), + Reducer::DeletePkBool { b } => { + __sats::bsatn::to_vec(&delete_pk_bool_reducer::DeletePkBoolArgs { b: b.clone() }) } - Reducer::UpdateUniqueI128 { n, data } => { - __sats::bsatn::to_vec(&update_unique_i_128_reducer::UpdateUniqueI128Args { - n: n.clone(), + Reducer::InsertPkString { s, data } => { + __sats::bsatn::to_vec(&insert_pk_string_reducer::InsertPkStringArgs { + s: s.clone(), data: data.clone(), }) } - Reducer::UpdateUniqueI16 { n, data } => { - __sats::bsatn::to_vec(&update_unique_i_16_reducer::UpdateUniqueI16Args { - n: n.clone(), + Reducer::UpdatePkString { s, data } => { + __sats::bsatn::to_vec(&update_pk_string_reducer::UpdatePkStringArgs { + s: s.clone(), data: data.clone(), }) } - Reducer::UpdateUniqueI256 { n, data } => { - __sats::bsatn::to_vec(&update_unique_i_256_reducer::UpdateUniqueI256Args { - n: n.clone(), - data: data.clone(), - }) + Reducer::DeletePkString { s } => { + __sats::bsatn::to_vec(&delete_pk_string_reducer::DeletePkStringArgs { s: s.clone() }) } - Reducer::UpdateUniqueI32 { n, data } => { - __sats::bsatn::to_vec(&update_unique_i_32_reducer::UpdateUniqueI32Args { - n: n.clone(), + Reducer::InsertPkIdentity { i, data } => { + __sats::bsatn::to_vec(&insert_pk_identity_reducer::InsertPkIdentityArgs { + i: i.clone(), data: data.clone(), }) } - Reducer::UpdateUniqueI64 { n, data } => { - __sats::bsatn::to_vec(&update_unique_i_64_reducer::UpdateUniqueI64Args { - n: n.clone(), + Reducer::UpdatePkIdentity { i, data } => { + __sats::bsatn::to_vec(&update_pk_identity_reducer::UpdatePkIdentityArgs { + i: i.clone(), data: data.clone(), }) } - Reducer::UpdateUniqueI8 { n, data } => { - __sats::bsatn::to_vec(&update_unique_i_8_reducer::UpdateUniqueI8Args { - n: n.clone(), - data: data.clone(), - }) + Reducer::DeletePkIdentity { i } => { + __sats::bsatn::to_vec(&delete_pk_identity_reducer::DeletePkIdentityArgs { i: i.clone() }) } - Reducer::UpdateUniqueIdentity { i, data } => { - __sats::bsatn::to_vec(&update_unique_identity_reducer::UpdateUniqueIdentityArgs { - i: i.clone(), + Reducer::InsertPkConnectionId { a, data } => { + __sats::bsatn::to_vec(&insert_pk_connection_id_reducer::InsertPkConnectionIdArgs { + a: a.clone(), data: data.clone(), }) } - Reducer::UpdateUniqueString { s, data } => { - __sats::bsatn::to_vec(&update_unique_string_reducer::UpdateUniqueStringArgs { - s: s.clone(), + Reducer::UpdatePkConnectionId { a, data } => { + __sats::bsatn::to_vec(&update_pk_connection_id_reducer::UpdatePkConnectionIdArgs { + a: a.clone(), data: data.clone(), }) } - Reducer::UpdateUniqueU128 { n, data } => { - __sats::bsatn::to_vec(&update_unique_u_128_reducer::UpdateUniqueU128Args { - n: n.clone(), - data: data.clone(), - }) + Reducer::DeletePkConnectionId { a } => { + __sats::bsatn::to_vec(&delete_pk_connection_id_reducer::DeletePkConnectionIdArgs { a: a.clone() }) } - Reducer::UpdateUniqueU16 { n, data } => { - __sats::bsatn::to_vec(&update_unique_u_16_reducer::UpdateUniqueU16Args { - n: n.clone(), - data: data.clone(), - }) + Reducer::InsertPkUuid { u, data } => __sats::bsatn::to_vec(&insert_pk_uuid_reducer::InsertPkUuidArgs { + u: u.clone(), + data: data.clone(), + }), + Reducer::UpdatePkUuid { u, data } => __sats::bsatn::to_vec(&update_pk_uuid_reducer::UpdatePkUuidArgs { + u: u.clone(), + data: data.clone(), + }), + Reducer::DeletePkUuid { u } => { + __sats::bsatn::to_vec(&delete_pk_uuid_reducer::DeletePkUuidArgs { u: u.clone() }) } - Reducer::UpdateUniqueU256 { n, data } => { - __sats::bsatn::to_vec(&update_unique_u_256_reducer::UpdateUniqueU256Args { - n: n.clone(), + Reducer::InsertPkSimpleEnum { a, data } => { + __sats::bsatn::to_vec(&insert_pk_simple_enum_reducer::InsertPkSimpleEnumArgs { + a: a.clone(), data: data.clone(), }) } - Reducer::UpdateUniqueU32 { n, data } => { - __sats::bsatn::to_vec(&update_unique_u_32_reducer::UpdateUniqueU32Args { - n: n.clone(), - data: data.clone(), + Reducer::InsertLargeTable { + a, + b, + c, + d, + e, + f, + g, + h, + i, + j, + k, + l, + m, + n, + o, + p, + q, + r, + s, + t, + u, + v, + } => __sats::bsatn::to_vec(&insert_large_table_reducer::InsertLargeTableArgs { + a: a.clone(), + b: b.clone(), + c: c.clone(), + d: d.clone(), + e: e.clone(), + f: f.clone(), + g: g.clone(), + h: h.clone(), + i: i.clone(), + j: j.clone(), + k: k.clone(), + l: l.clone(), + m: m.clone(), + n: n.clone(), + o: o.clone(), + p: p.clone(), + q: q.clone(), + r: r.clone(), + s: s.clone(), + t: t.clone(), + u: u.clone(), + v: v.clone(), + }), + Reducer::DeleteLargeTable { + a, + b, + c, + d, + e, + f, + g, + h, + i, + j, + k, + l, + m, + n, + o, + p, + q, + r, + s, + t, + u, + v, + } => __sats::bsatn::to_vec(&delete_large_table_reducer::DeleteLargeTableArgs { + a: a.clone(), + b: b.clone(), + c: c.clone(), + d: d.clone(), + e: e.clone(), + f: f.clone(), + g: g.clone(), + h: h.clone(), + i: i.clone(), + j: j.clone(), + k: k.clone(), + l: l.clone(), + m: m.clone(), + n: n.clone(), + o: o.clone(), + p: p.clone(), + q: q.clone(), + r: r.clone(), + s: s.clone(), + t: t.clone(), + u: u.clone(), + v: v.clone(), + }), + Reducer::InsertTableHoldsTable { a, b } => { + __sats::bsatn::to_vec(&insert_table_holds_table_reducer::InsertTableHoldsTableArgs { + a: a.clone(), + b: b.clone(), }) } - Reducer::UpdateUniqueU64 { n, data } => { - __sats::bsatn::to_vec(&update_unique_u_64_reducer::UpdateUniqueU64Args { - n: n.clone(), - data: data.clone(), - }) + Reducer::SendScheduledMessage { arg } => { + __sats::bsatn::to_vec(&send_scheduled_message_reducer::SendScheduledMessageArgs { arg: arg.clone() }) } - Reducer::UpdateUniqueU8 { n, data } => { - __sats::bsatn::to_vec(&update_unique_u_8_reducer::UpdateUniqueU8Args { - n: n.clone(), - data: data.clone(), + Reducer::SortedUuidsInsert => __sats::bsatn::to_vec(&sorted_uuids_insert_reducer::SortedUuidsInsertArgs {}), + Reducer::UpdateIndexedSimpleEnum { a, b } => { + __sats::bsatn::to_vec(&update_indexed_simple_enum_reducer::UpdateIndexedSimpleEnumArgs { + a: a.clone(), + b: b.clone(), }) } - Reducer::UpdateUniqueUuid { u, data } => { - __sats::bsatn::to_vec(&update_unique_uuid_reducer::UpdateUniqueUuidArgs { - u: u.clone(), + Reducer::UpdatePkSimpleEnum { a, data } => { + __sats::bsatn::to_vec(&update_pk_simple_enum_reducer::UpdatePkSimpleEnumArgs { + a: a.clone(), data: data.clone(), }) } @@ -2769,7 +3165,7 @@ impl TryFrom<__ws::v2::TransactionUpdate> for DbUpdate { let mut db_update = DbUpdate::default(); for table_update in __sdk::transaction_update_iter_table_updates(raw) { match &table_update.table_name[..] { - "btree_u32" => db_update + "btree_u_32" => db_update .btree_u_32 .append(btree_u_32_table::parse_table_update(table_update)?), "indexed_simple_enum" => db_update @@ -2802,28 +3198,28 @@ impl TryFrom<__ws::v2::TransactionUpdate> for DbUpdate { "one_every_vec_struct" => db_update .one_every_vec_struct .append(one_every_vec_struct_table::parse_table_update(table_update)?), - "one_f32" => db_update + "one_f_32" => db_update .one_f_32 .append(one_f_32_table::parse_table_update(table_update)?), - "one_f64" => db_update + "one_f_64" => db_update .one_f_64 .append(one_f_64_table::parse_table_update(table_update)?), - "one_i128" => db_update + "one_i_128" => db_update .one_i_128 .append(one_i_128_table::parse_table_update(table_update)?), - "one_i16" => db_update + "one_i_16" => db_update .one_i_16 .append(one_i_16_table::parse_table_update(table_update)?), - "one_i256" => db_update + "one_i_256" => db_update .one_i_256 .append(one_i_256_table::parse_table_update(table_update)?), - "one_i32" => db_update + "one_i_32" => db_update .one_i_32 .append(one_i_32_table::parse_table_update(table_update)?), - "one_i64" => db_update + "one_i_64" => db_update .one_i_64 .append(one_i_64_table::parse_table_update(table_update)?), - "one_i8" => db_update + "one_i_8" => db_update .one_i_8 .append(one_i_8_table::parse_table_update(table_update)?), "one_identity" => db_update @@ -2838,22 +3234,22 @@ impl TryFrom<__ws::v2::TransactionUpdate> for DbUpdate { "one_timestamp" => db_update .one_timestamp .append(one_timestamp_table::parse_table_update(table_update)?), - "one_u128" => db_update + "one_u_128" => db_update .one_u_128 .append(one_u_128_table::parse_table_update(table_update)?), - "one_u16" => db_update + "one_u_16" => db_update .one_u_16 .append(one_u_16_table::parse_table_update(table_update)?), - "one_u256" => db_update + "one_u_256" => db_update .one_u_256 .append(one_u_256_table::parse_table_update(table_update)?), - "one_u32" => db_update + "one_u_32" => db_update .one_u_32 .append(one_u_32_table::parse_table_update(table_update)?), - "one_u64" => db_update + "one_u_64" => db_update .one_u_64 .append(one_u_64_table::parse_table_update(table_update)?), - "one_u8" => db_update + "one_u_8" => db_update .one_u_8 .append(one_u_8_table::parse_table_update(table_update)?), "one_unit_struct" => db_update @@ -2865,7 +3261,7 @@ impl TryFrom<__ws::v2::TransactionUpdate> for DbUpdate { "option_every_primitive_struct" => db_update .option_every_primitive_struct .append(option_every_primitive_struct_table::parse_table_update(table_update)?), - "option_i32" => db_update + "option_i_32" => db_update .option_i_32 .append(option_i_32_table::parse_table_update(table_update)?), "option_identity" => db_update @@ -2880,7 +3276,7 @@ impl TryFrom<__ws::v2::TransactionUpdate> for DbUpdate { "option_uuid" => db_update .option_uuid .append(option_uuid_table::parse_table_update(table_update)?), - "option_vec_option_i32" => db_update + "option_vec_option_i_32" => db_update .option_vec_option_i_32 .append(option_vec_option_i_32_table::parse_table_update(table_update)?), "pk_bool" => db_update @@ -2889,22 +3285,22 @@ impl TryFrom<__ws::v2::TransactionUpdate> for DbUpdate { "pk_connection_id" => db_update .pk_connection_id .append(pk_connection_id_table::parse_table_update(table_update)?), - "pk_i128" => db_update + "pk_i_128" => db_update .pk_i_128 .append(pk_i_128_table::parse_table_update(table_update)?), - "pk_i16" => db_update + "pk_i_16" => db_update .pk_i_16 .append(pk_i_16_table::parse_table_update(table_update)?), - "pk_i256" => db_update + "pk_i_256" => db_update .pk_i_256 .append(pk_i_256_table::parse_table_update(table_update)?), - "pk_i32" => db_update + "pk_i_32" => db_update .pk_i_32 .append(pk_i_32_table::parse_table_update(table_update)?), - "pk_i64" => db_update + "pk_i_64" => db_update .pk_i_64 .append(pk_i_64_table::parse_table_update(table_update)?), - "pk_i8" => db_update.pk_i_8.append(pk_i_8_table::parse_table_update(table_update)?), + "pk_i_8" => db_update.pk_i_8.append(pk_i_8_table::parse_table_update(table_update)?), "pk_identity" => db_update .pk_identity .append(pk_identity_table::parse_table_update(table_update)?), @@ -2914,44 +3310,44 @@ impl TryFrom<__ws::v2::TransactionUpdate> for DbUpdate { "pk_string" => db_update .pk_string .append(pk_string_table::parse_table_update(table_update)?), - "pk_u128" => db_update + "pk_u_128" => db_update .pk_u_128 .append(pk_u_128_table::parse_table_update(table_update)?), - "pk_u16" => db_update + "pk_u_16" => db_update .pk_u_16 .append(pk_u_16_table::parse_table_update(table_update)?), - "pk_u256" => db_update + "pk_u_256" => db_update .pk_u_256 .append(pk_u_256_table::parse_table_update(table_update)?), - "pk_u32" => db_update + "pk_u_32" => db_update .pk_u_32 .append(pk_u_32_table::parse_table_update(table_update)?), - "pk_u32_two" => db_update + "pk_u_32_two" => db_update .pk_u_32_two .append(pk_u_32_two_table::parse_table_update(table_update)?), - "pk_u64" => db_update + "pk_u_64" => db_update .pk_u_64 .append(pk_u_64_table::parse_table_update(table_update)?), - "pk_u8" => db_update.pk_u_8.append(pk_u_8_table::parse_table_update(table_update)?), + "pk_u_8" => db_update.pk_u_8.append(pk_u_8_table::parse_table_update(table_update)?), "pk_uuid" => db_update .pk_uuid .append(pk_uuid_table::parse_table_update(table_update)?), "result_every_primitive_struct_string" => db_update.result_every_primitive_struct_string.append( result_every_primitive_struct_string_table::parse_table_update(table_update)?, ), - "result_i32_string" => db_update + "result_i_32_string" => db_update .result_i_32_string .append(result_i_32_string_table::parse_table_update(table_update)?), "result_identity_string" => db_update .result_identity_string .append(result_identity_string_table::parse_table_update(table_update)?), - "result_simple_enum_i32" => db_update + "result_simple_enum_i_32" => db_update .result_simple_enum_i_32 .append(result_simple_enum_i_32_table::parse_table_update(table_update)?), - "result_string_i32" => db_update + "result_string_i_32" => db_update .result_string_i_32 .append(result_string_i_32_table::parse_table_update(table_update)?), - "result_vec_i32_string" => db_update + "result_vec_i_32_string" => db_update .result_vec_i_32_string .append(result_vec_i_32_string_table::parse_table_update(table_update)?), "scheduled_table" => db_update @@ -2966,22 +3362,22 @@ impl TryFrom<__ws::v2::TransactionUpdate> for DbUpdate { "unique_connection_id" => db_update .unique_connection_id .append(unique_connection_id_table::parse_table_update(table_update)?), - "unique_i128" => db_update + "unique_i_128" => db_update .unique_i_128 .append(unique_i_128_table::parse_table_update(table_update)?), - "unique_i16" => db_update + "unique_i_16" => db_update .unique_i_16 .append(unique_i_16_table::parse_table_update(table_update)?), - "unique_i256" => db_update + "unique_i_256" => db_update .unique_i_256 .append(unique_i_256_table::parse_table_update(table_update)?), - "unique_i32" => db_update + "unique_i_32" => db_update .unique_i_32 .append(unique_i_32_table::parse_table_update(table_update)?), - "unique_i64" => db_update + "unique_i_64" => db_update .unique_i_64 .append(unique_i_64_table::parse_table_update(table_update)?), - "unique_i8" => db_update + "unique_i_8" => db_update .unique_i_8 .append(unique_i_8_table::parse_table_update(table_update)?), "unique_identity" => db_update @@ -2990,22 +3386,22 @@ impl TryFrom<__ws::v2::TransactionUpdate> for DbUpdate { "unique_string" => db_update .unique_string .append(unique_string_table::parse_table_update(table_update)?), - "unique_u128" => db_update + "unique_u_128" => db_update .unique_u_128 .append(unique_u_128_table::parse_table_update(table_update)?), - "unique_u16" => db_update + "unique_u_16" => db_update .unique_u_16 .append(unique_u_16_table::parse_table_update(table_update)?), - "unique_u256" => db_update + "unique_u_256" => db_update .unique_u_256 .append(unique_u_256_table::parse_table_update(table_update)?), - "unique_u32" => db_update + "unique_u_32" => db_update .unique_u_32 .append(unique_u_32_table::parse_table_update(table_update)?), - "unique_u64" => db_update + "unique_u_64" => db_update .unique_u_64 .append(unique_u_64_table::parse_table_update(table_update)?), - "unique_u8" => db_update + "unique_u_8" => db_update .unique_u_8 .append(unique_u_8_table::parse_table_update(table_update)?), "unique_uuid" => db_update @@ -3030,28 +3426,28 @@ impl TryFrom<__ws::v2::TransactionUpdate> for DbUpdate { "vec_every_vec_struct" => db_update .vec_every_vec_struct .append(vec_every_vec_struct_table::parse_table_update(table_update)?), - "vec_f32" => db_update + "vec_f_32" => db_update .vec_f_32 .append(vec_f_32_table::parse_table_update(table_update)?), - "vec_f64" => db_update + "vec_f_64" => db_update .vec_f_64 .append(vec_f_64_table::parse_table_update(table_update)?), - "vec_i128" => db_update + "vec_i_128" => db_update .vec_i_128 .append(vec_i_128_table::parse_table_update(table_update)?), - "vec_i16" => db_update + "vec_i_16" => db_update .vec_i_16 .append(vec_i_16_table::parse_table_update(table_update)?), - "vec_i256" => db_update + "vec_i_256" => db_update .vec_i_256 .append(vec_i_256_table::parse_table_update(table_update)?), - "vec_i32" => db_update + "vec_i_32" => db_update .vec_i_32 .append(vec_i_32_table::parse_table_update(table_update)?), - "vec_i64" => db_update + "vec_i_64" => db_update .vec_i_64 .append(vec_i_64_table::parse_table_update(table_update)?), - "vec_i8" => db_update + "vec_i_8" => db_update .vec_i_8 .append(vec_i_8_table::parse_table_update(table_update)?), "vec_identity" => db_update @@ -3066,22 +3462,22 @@ impl TryFrom<__ws::v2::TransactionUpdate> for DbUpdate { "vec_timestamp" => db_update .vec_timestamp .append(vec_timestamp_table::parse_table_update(table_update)?), - "vec_u128" => db_update + "vec_u_128" => db_update .vec_u_128 .append(vec_u_128_table::parse_table_update(table_update)?), - "vec_u16" => db_update + "vec_u_16" => db_update .vec_u_16 .append(vec_u_16_table::parse_table_update(table_update)?), - "vec_u256" => db_update + "vec_u_256" => db_update .vec_u_256 .append(vec_u_256_table::parse_table_update(table_update)?), - "vec_u32" => db_update + "vec_u_32" => db_update .vec_u_32 .append(vec_u_32_table::parse_table_update(table_update)?), - "vec_u64" => db_update + "vec_u_64" => db_update .vec_u_64 .append(vec_u_64_table::parse_table_update(table_update)?), - "vec_u8" => db_update + "vec_u_8" => db_update .vec_u_8 .append(vec_u_8_table::parse_table_update(table_update)?), "vec_unit_struct" => db_update @@ -3108,7 +3504,7 @@ impl __sdk::DbUpdate for DbUpdate { fn apply_to_client_cache(&self, cache: &mut __sdk::ClientCache) -> AppliedDiff<'_> { let mut diff = AppliedDiff::default(); - diff.btree_u_32 = cache.apply_diff_to_table::("btree_u32", &self.btree_u_32); + diff.btree_u_32 = cache.apply_diff_to_table::("btree_u_32", &self.btree_u_32); diff.indexed_simple_enum = cache.apply_diff_to_table::("indexed_simple_enum", &self.indexed_simple_enum); diff.indexed_table = cache.apply_diff_to_table::("indexed_table", &self.indexed_table); @@ -3126,38 +3522,38 @@ impl __sdk::DbUpdate for DbUpdate { ); diff.one_every_vec_struct = cache.apply_diff_to_table::("one_every_vec_struct", &self.one_every_vec_struct); - diff.one_f_32 = cache.apply_diff_to_table::("one_f32", &self.one_f_32); - diff.one_f_64 = cache.apply_diff_to_table::("one_f64", &self.one_f_64); - diff.one_i_128 = cache.apply_diff_to_table::("one_i128", &self.one_i_128); - diff.one_i_16 = cache.apply_diff_to_table::("one_i16", &self.one_i_16); - diff.one_i_256 = cache.apply_diff_to_table::("one_i256", &self.one_i_256); - diff.one_i_32 = cache.apply_diff_to_table::("one_i32", &self.one_i_32); - diff.one_i_64 = cache.apply_diff_to_table::("one_i64", &self.one_i_64); - diff.one_i_8 = cache.apply_diff_to_table::("one_i8", &self.one_i_8); + diff.one_f_32 = cache.apply_diff_to_table::("one_f_32", &self.one_f_32); + diff.one_f_64 = cache.apply_diff_to_table::("one_f_64", &self.one_f_64); + diff.one_i_128 = cache.apply_diff_to_table::("one_i_128", &self.one_i_128); + diff.one_i_16 = cache.apply_diff_to_table::("one_i_16", &self.one_i_16); + diff.one_i_256 = cache.apply_diff_to_table::("one_i_256", &self.one_i_256); + diff.one_i_32 = cache.apply_diff_to_table::("one_i_32", &self.one_i_32); + diff.one_i_64 = cache.apply_diff_to_table::("one_i_64", &self.one_i_64); + diff.one_i_8 = cache.apply_diff_to_table::("one_i_8", &self.one_i_8); diff.one_identity = cache.apply_diff_to_table::("one_identity", &self.one_identity); diff.one_simple_enum = cache.apply_diff_to_table::("one_simple_enum", &self.one_simple_enum); diff.one_string = cache.apply_diff_to_table::("one_string", &self.one_string); diff.one_timestamp = cache.apply_diff_to_table::("one_timestamp", &self.one_timestamp); - diff.one_u_128 = cache.apply_diff_to_table::("one_u128", &self.one_u_128); - diff.one_u_16 = cache.apply_diff_to_table::("one_u16", &self.one_u_16); - diff.one_u_256 = cache.apply_diff_to_table::("one_u256", &self.one_u_256); - diff.one_u_32 = cache.apply_diff_to_table::("one_u32", &self.one_u_32); - diff.one_u_64 = cache.apply_diff_to_table::("one_u64", &self.one_u_64); - diff.one_u_8 = cache.apply_diff_to_table::("one_u8", &self.one_u_8); + diff.one_u_128 = cache.apply_diff_to_table::("one_u_128", &self.one_u_128); + diff.one_u_16 = cache.apply_diff_to_table::("one_u_16", &self.one_u_16); + diff.one_u_256 = cache.apply_diff_to_table::("one_u_256", &self.one_u_256); + diff.one_u_32 = cache.apply_diff_to_table::("one_u_32", &self.one_u_32); + diff.one_u_64 = cache.apply_diff_to_table::("one_u_64", &self.one_u_64); + diff.one_u_8 = cache.apply_diff_to_table::("one_u_8", &self.one_u_8); diff.one_unit_struct = cache.apply_diff_to_table::("one_unit_struct", &self.one_unit_struct); diff.one_uuid = cache.apply_diff_to_table::("one_uuid", &self.one_uuid); diff.option_every_primitive_struct = cache.apply_diff_to_table::( "option_every_primitive_struct", &self.option_every_primitive_struct, ); - diff.option_i_32 = cache.apply_diff_to_table::("option_i32", &self.option_i_32); + diff.option_i_32 = cache.apply_diff_to_table::("option_i_32", &self.option_i_32); diff.option_identity = cache.apply_diff_to_table::("option_identity", &self.option_identity); diff.option_simple_enum = cache.apply_diff_to_table::("option_simple_enum", &self.option_simple_enum); diff.option_string = cache.apply_diff_to_table::("option_string", &self.option_string); diff.option_uuid = cache.apply_diff_to_table::("option_uuid", &self.option_uuid); diff.option_vec_option_i_32 = - cache.apply_diff_to_table::("option_vec_option_i32", &self.option_vec_option_i_32); + cache.apply_diff_to_table::("option_vec_option_i_32", &self.option_vec_option_i_32); diff.pk_bool = cache .apply_diff_to_table::("pk_bool", &self.pk_bool) .with_updates_by_pk(|row| &row.b); @@ -3165,22 +3561,22 @@ impl __sdk::DbUpdate for DbUpdate { .apply_diff_to_table::("pk_connection_id", &self.pk_connection_id) .with_updates_by_pk(|row| &row.a); diff.pk_i_128 = cache - .apply_diff_to_table::("pk_i128", &self.pk_i_128) + .apply_diff_to_table::("pk_i_128", &self.pk_i_128) .with_updates_by_pk(|row| &row.n); diff.pk_i_16 = cache - .apply_diff_to_table::("pk_i16", &self.pk_i_16) + .apply_diff_to_table::("pk_i_16", &self.pk_i_16) .with_updates_by_pk(|row| &row.n); diff.pk_i_256 = cache - .apply_diff_to_table::("pk_i256", &self.pk_i_256) + .apply_diff_to_table::("pk_i_256", &self.pk_i_256) .with_updates_by_pk(|row| &row.n); diff.pk_i_32 = cache - .apply_diff_to_table::("pk_i32", &self.pk_i_32) + .apply_diff_to_table::("pk_i_32", &self.pk_i_32) .with_updates_by_pk(|row| &row.n); diff.pk_i_64 = cache - .apply_diff_to_table::("pk_i64", &self.pk_i_64) + .apply_diff_to_table::("pk_i_64", &self.pk_i_64) .with_updates_by_pk(|row| &row.n); diff.pk_i_8 = cache - .apply_diff_to_table::("pk_i8", &self.pk_i_8) + .apply_diff_to_table::("pk_i_8", &self.pk_i_8) .with_updates_by_pk(|row| &row.n); diff.pk_identity = cache .apply_diff_to_table::("pk_identity", &self.pk_identity) @@ -3192,25 +3588,25 @@ impl __sdk::DbUpdate for DbUpdate { .apply_diff_to_table::("pk_string", &self.pk_string) .with_updates_by_pk(|row| &row.s); diff.pk_u_128 = cache - .apply_diff_to_table::("pk_u128", &self.pk_u_128) + .apply_diff_to_table::("pk_u_128", &self.pk_u_128) .with_updates_by_pk(|row| &row.n); diff.pk_u_16 = cache - .apply_diff_to_table::("pk_u16", &self.pk_u_16) + .apply_diff_to_table::("pk_u_16", &self.pk_u_16) .with_updates_by_pk(|row| &row.n); diff.pk_u_256 = cache - .apply_diff_to_table::("pk_u256", &self.pk_u_256) + .apply_diff_to_table::("pk_u_256", &self.pk_u_256) .with_updates_by_pk(|row| &row.n); diff.pk_u_32 = cache - .apply_diff_to_table::("pk_u32", &self.pk_u_32) + .apply_diff_to_table::("pk_u_32", &self.pk_u_32) .with_updates_by_pk(|row| &row.n); diff.pk_u_32_two = cache - .apply_diff_to_table::("pk_u32_two", &self.pk_u_32_two) + .apply_diff_to_table::("pk_u_32_two", &self.pk_u_32_two) .with_updates_by_pk(|row| &row.n); diff.pk_u_64 = cache - .apply_diff_to_table::("pk_u64", &self.pk_u_64) + .apply_diff_to_table::("pk_u_64", &self.pk_u_64) .with_updates_by_pk(|row| &row.n); diff.pk_u_8 = cache - .apply_diff_to_table::("pk_u8", &self.pk_u_8) + .apply_diff_to_table::("pk_u_8", &self.pk_u_8) .with_updates_by_pk(|row| &row.n); diff.pk_uuid = cache .apply_diff_to_table::("pk_uuid", &self.pk_uuid) @@ -3220,15 +3616,15 @@ impl __sdk::DbUpdate for DbUpdate { &self.result_every_primitive_struct_string, ); diff.result_i_32_string = - cache.apply_diff_to_table::("result_i32_string", &self.result_i_32_string); + cache.apply_diff_to_table::("result_i_32_string", &self.result_i_32_string); diff.result_identity_string = cache.apply_diff_to_table::("result_identity_string", &self.result_identity_string); diff.result_simple_enum_i_32 = - cache.apply_diff_to_table::("result_simple_enum_i32", &self.result_simple_enum_i_32); + cache.apply_diff_to_table::("result_simple_enum_i_32", &self.result_simple_enum_i_32); diff.result_string_i_32 = - cache.apply_diff_to_table::("result_string_i32", &self.result_string_i_32); + cache.apply_diff_to_table::("result_string_i_32", &self.result_string_i_32); diff.result_vec_i_32_string = - cache.apply_diff_to_table::("result_vec_i32_string", &self.result_vec_i_32_string); + cache.apply_diff_to_table::("result_vec_i_32_string", &self.result_vec_i_32_string); diff.scheduled_table = cache .apply_diff_to_table::("scheduled_table", &self.scheduled_table) .with_updates_by_pk(|row| &row.scheduled_id); @@ -3237,20 +3633,20 @@ impl __sdk::DbUpdate for DbUpdate { diff.unique_bool = cache.apply_diff_to_table::("unique_bool", &self.unique_bool); diff.unique_connection_id = cache.apply_diff_to_table::("unique_connection_id", &self.unique_connection_id); - diff.unique_i_128 = cache.apply_diff_to_table::("unique_i128", &self.unique_i_128); - diff.unique_i_16 = cache.apply_diff_to_table::("unique_i16", &self.unique_i_16); - diff.unique_i_256 = cache.apply_diff_to_table::("unique_i256", &self.unique_i_256); - diff.unique_i_32 = cache.apply_diff_to_table::("unique_i32", &self.unique_i_32); - diff.unique_i_64 = cache.apply_diff_to_table::("unique_i64", &self.unique_i_64); - diff.unique_i_8 = cache.apply_diff_to_table::("unique_i8", &self.unique_i_8); + diff.unique_i_128 = cache.apply_diff_to_table::("unique_i_128", &self.unique_i_128); + diff.unique_i_16 = cache.apply_diff_to_table::("unique_i_16", &self.unique_i_16); + diff.unique_i_256 = cache.apply_diff_to_table::("unique_i_256", &self.unique_i_256); + diff.unique_i_32 = cache.apply_diff_to_table::("unique_i_32", &self.unique_i_32); + diff.unique_i_64 = cache.apply_diff_to_table::("unique_i_64", &self.unique_i_64); + diff.unique_i_8 = cache.apply_diff_to_table::("unique_i_8", &self.unique_i_8); diff.unique_identity = cache.apply_diff_to_table::("unique_identity", &self.unique_identity); diff.unique_string = cache.apply_diff_to_table::("unique_string", &self.unique_string); - diff.unique_u_128 = cache.apply_diff_to_table::("unique_u128", &self.unique_u_128); - diff.unique_u_16 = cache.apply_diff_to_table::("unique_u16", &self.unique_u_16); - diff.unique_u_256 = cache.apply_diff_to_table::("unique_u256", &self.unique_u_256); - diff.unique_u_32 = cache.apply_diff_to_table::("unique_u32", &self.unique_u_32); - diff.unique_u_64 = cache.apply_diff_to_table::("unique_u64", &self.unique_u_64); - diff.unique_u_8 = cache.apply_diff_to_table::("unique_u8", &self.unique_u_8); + diff.unique_u_128 = cache.apply_diff_to_table::("unique_u_128", &self.unique_u_128); + diff.unique_u_16 = cache.apply_diff_to_table::("unique_u_16", &self.unique_u_16); + diff.unique_u_256 = cache.apply_diff_to_table::("unique_u_256", &self.unique_u_256); + diff.unique_u_32 = cache.apply_diff_to_table::("unique_u_32", &self.unique_u_32); + diff.unique_u_64 = cache.apply_diff_to_table::("unique_u_64", &self.unique_u_64); + diff.unique_u_8 = cache.apply_diff_to_table::("unique_u_8", &self.unique_u_8); diff.unique_uuid = cache.apply_diff_to_table::("unique_uuid", &self.unique_uuid); diff.users = cache .apply_diff_to_table::("users", &self.users) @@ -3267,24 +3663,24 @@ impl __sdk::DbUpdate for DbUpdate { ); diff.vec_every_vec_struct = cache.apply_diff_to_table::("vec_every_vec_struct", &self.vec_every_vec_struct); - diff.vec_f_32 = cache.apply_diff_to_table::("vec_f32", &self.vec_f_32); - diff.vec_f_64 = cache.apply_diff_to_table::("vec_f64", &self.vec_f_64); - diff.vec_i_128 = cache.apply_diff_to_table::("vec_i128", &self.vec_i_128); - diff.vec_i_16 = cache.apply_diff_to_table::("vec_i16", &self.vec_i_16); - diff.vec_i_256 = cache.apply_diff_to_table::("vec_i256", &self.vec_i_256); - diff.vec_i_32 = cache.apply_diff_to_table::("vec_i32", &self.vec_i_32); - diff.vec_i_64 = cache.apply_diff_to_table::("vec_i64", &self.vec_i_64); - diff.vec_i_8 = cache.apply_diff_to_table::("vec_i8", &self.vec_i_8); + diff.vec_f_32 = cache.apply_diff_to_table::("vec_f_32", &self.vec_f_32); + diff.vec_f_64 = cache.apply_diff_to_table::("vec_f_64", &self.vec_f_64); + diff.vec_i_128 = cache.apply_diff_to_table::("vec_i_128", &self.vec_i_128); + diff.vec_i_16 = cache.apply_diff_to_table::("vec_i_16", &self.vec_i_16); + diff.vec_i_256 = cache.apply_diff_to_table::("vec_i_256", &self.vec_i_256); + diff.vec_i_32 = cache.apply_diff_to_table::("vec_i_32", &self.vec_i_32); + diff.vec_i_64 = cache.apply_diff_to_table::("vec_i_64", &self.vec_i_64); + diff.vec_i_8 = cache.apply_diff_to_table::("vec_i_8", &self.vec_i_8); diff.vec_identity = cache.apply_diff_to_table::("vec_identity", &self.vec_identity); diff.vec_simple_enum = cache.apply_diff_to_table::("vec_simple_enum", &self.vec_simple_enum); diff.vec_string = cache.apply_diff_to_table::("vec_string", &self.vec_string); diff.vec_timestamp = cache.apply_diff_to_table::("vec_timestamp", &self.vec_timestamp); - diff.vec_u_128 = cache.apply_diff_to_table::("vec_u128", &self.vec_u_128); - diff.vec_u_16 = cache.apply_diff_to_table::("vec_u16", &self.vec_u_16); - diff.vec_u_256 = cache.apply_diff_to_table::("vec_u256", &self.vec_u_256); - diff.vec_u_32 = cache.apply_diff_to_table::("vec_u32", &self.vec_u_32); - diff.vec_u_64 = cache.apply_diff_to_table::("vec_u64", &self.vec_u_64); - diff.vec_u_8 = cache.apply_diff_to_table::("vec_u8", &self.vec_u_8); + diff.vec_u_128 = cache.apply_diff_to_table::("vec_u_128", &self.vec_u_128); + diff.vec_u_16 = cache.apply_diff_to_table::("vec_u_16", &self.vec_u_16); + diff.vec_u_256 = cache.apply_diff_to_table::("vec_u_256", &self.vec_u_256); + diff.vec_u_32 = cache.apply_diff_to_table::("vec_u_32", &self.vec_u_32); + diff.vec_u_64 = cache.apply_diff_to_table::("vec_u_64", &self.vec_u_64); + diff.vec_u_8 = cache.apply_diff_to_table::("vec_u_8", &self.vec_u_8); diff.vec_unit_struct = cache.apply_diff_to_table::("vec_unit_struct", &self.vec_unit_struct); diff.vec_uuid = cache.apply_diff_to_table::("vec_uuid", &self.vec_uuid); @@ -3294,7 +3690,7 @@ impl __sdk::DbUpdate for DbUpdate { let mut db_update = DbUpdate::default(); for table_rows in raw.tables { match &table_rows.table[..] { - "btree_u32" => db_update + "btree_u_32" => db_update .btree_u_32 .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), "indexed_simple_enum" => db_update @@ -3327,28 +3723,28 @@ impl __sdk::DbUpdate for DbUpdate { "one_every_vec_struct" => db_update .one_every_vec_struct .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "one_f32" => db_update + "one_f_32" => db_update .one_f_32 .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "one_f64" => db_update + "one_f_64" => db_update .one_f_64 .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "one_i128" => db_update + "one_i_128" => db_update .one_i_128 .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "one_i16" => db_update + "one_i_16" => db_update .one_i_16 .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "one_i256" => db_update + "one_i_256" => db_update .one_i_256 .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "one_i32" => db_update + "one_i_32" => db_update .one_i_32 .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "one_i64" => db_update + "one_i_64" => db_update .one_i_64 .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "one_i8" => db_update + "one_i_8" => db_update .one_i_8 .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), "one_identity" => db_update @@ -3363,22 +3759,22 @@ impl __sdk::DbUpdate for DbUpdate { "one_timestamp" => db_update .one_timestamp .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "one_u128" => db_update + "one_u_128" => db_update .one_u_128 .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "one_u16" => db_update + "one_u_16" => db_update .one_u_16 .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "one_u256" => db_update + "one_u_256" => db_update .one_u_256 .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "one_u32" => db_update + "one_u_32" => db_update .one_u_32 .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "one_u64" => db_update + "one_u_64" => db_update .one_u_64 .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "one_u8" => db_update + "one_u_8" => db_update .one_u_8 .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), "one_unit_struct" => db_update @@ -3390,7 +3786,7 @@ impl __sdk::DbUpdate for DbUpdate { "option_every_primitive_struct" => db_update .option_every_primitive_struct .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "option_i32" => db_update + "option_i_32" => db_update .option_i_32 .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), "option_identity" => db_update @@ -3405,7 +3801,7 @@ impl __sdk::DbUpdate for DbUpdate { "option_uuid" => db_update .option_uuid .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "option_vec_option_i32" => db_update + "option_vec_option_i_32" => db_update .option_vec_option_i_32 .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), "pk_bool" => db_update @@ -3414,22 +3810,22 @@ impl __sdk::DbUpdate for DbUpdate { "pk_connection_id" => db_update .pk_connection_id .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "pk_i128" => db_update + "pk_i_128" => db_update .pk_i_128 .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "pk_i16" => db_update + "pk_i_16" => db_update .pk_i_16 .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "pk_i256" => db_update + "pk_i_256" => db_update .pk_i_256 .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "pk_i32" => db_update + "pk_i_32" => db_update .pk_i_32 .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "pk_i64" => db_update + "pk_i_64" => db_update .pk_i_64 .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "pk_i8" => db_update + "pk_i_8" => db_update .pk_i_8 .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), "pk_identity" => db_update @@ -3441,25 +3837,25 @@ impl __sdk::DbUpdate for DbUpdate { "pk_string" => db_update .pk_string .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "pk_u128" => db_update + "pk_u_128" => db_update .pk_u_128 .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "pk_u16" => db_update + "pk_u_16" => db_update .pk_u_16 .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "pk_u256" => db_update + "pk_u_256" => db_update .pk_u_256 .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "pk_u32" => db_update + "pk_u_32" => db_update .pk_u_32 .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "pk_u32_two" => db_update + "pk_u_32_two" => db_update .pk_u_32_two .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "pk_u64" => db_update + "pk_u_64" => db_update .pk_u_64 .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "pk_u8" => db_update + "pk_u_8" => db_update .pk_u_8 .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), "pk_uuid" => db_update @@ -3468,19 +3864,19 @@ impl __sdk::DbUpdate for DbUpdate { "result_every_primitive_struct_string" => db_update .result_every_primitive_struct_string .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "result_i32_string" => db_update + "result_i_32_string" => db_update .result_i_32_string .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), "result_identity_string" => db_update .result_identity_string .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "result_simple_enum_i32" => db_update + "result_simple_enum_i_32" => db_update .result_simple_enum_i_32 .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "result_string_i32" => db_update + "result_string_i_32" => db_update .result_string_i_32 .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "result_vec_i32_string" => db_update + "result_vec_i_32_string" => db_update .result_vec_i_32_string .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), "scheduled_table" => db_update @@ -3495,22 +3891,22 @@ impl __sdk::DbUpdate for DbUpdate { "unique_connection_id" => db_update .unique_connection_id .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "unique_i128" => db_update + "unique_i_128" => db_update .unique_i_128 .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "unique_i16" => db_update + "unique_i_16" => db_update .unique_i_16 .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "unique_i256" => db_update + "unique_i_256" => db_update .unique_i_256 .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "unique_i32" => db_update + "unique_i_32" => db_update .unique_i_32 .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "unique_i64" => db_update + "unique_i_64" => db_update .unique_i_64 .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "unique_i8" => db_update + "unique_i_8" => db_update .unique_i_8 .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), "unique_identity" => db_update @@ -3519,22 +3915,22 @@ impl __sdk::DbUpdate for DbUpdate { "unique_string" => db_update .unique_string .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "unique_u128" => db_update + "unique_u_128" => db_update .unique_u_128 .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "unique_u16" => db_update + "unique_u_16" => db_update .unique_u_16 .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "unique_u256" => db_update + "unique_u_256" => db_update .unique_u_256 .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "unique_u32" => db_update + "unique_u_32" => db_update .unique_u_32 .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "unique_u64" => db_update + "unique_u_64" => db_update .unique_u_64 .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "unique_u8" => db_update + "unique_u_8" => db_update .unique_u_8 .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), "unique_uuid" => db_update @@ -3561,28 +3957,28 @@ impl __sdk::DbUpdate for DbUpdate { "vec_every_vec_struct" => db_update .vec_every_vec_struct .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "vec_f32" => db_update + "vec_f_32" => db_update .vec_f_32 .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "vec_f64" => db_update + "vec_f_64" => db_update .vec_f_64 .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "vec_i128" => db_update + "vec_i_128" => db_update .vec_i_128 .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "vec_i16" => db_update + "vec_i_16" => db_update .vec_i_16 .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "vec_i256" => db_update + "vec_i_256" => db_update .vec_i_256 .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "vec_i32" => db_update + "vec_i_32" => db_update .vec_i_32 .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "vec_i64" => db_update + "vec_i_64" => db_update .vec_i_64 .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "vec_i8" => db_update + "vec_i_8" => db_update .vec_i_8 .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), "vec_identity" => db_update @@ -3597,22 +3993,22 @@ impl __sdk::DbUpdate for DbUpdate { "vec_timestamp" => db_update .vec_timestamp .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "vec_u128" => db_update + "vec_u_128" => db_update .vec_u_128 .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "vec_u16" => db_update + "vec_u_16" => db_update .vec_u_16 .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "vec_u256" => db_update + "vec_u_256" => db_update .vec_u_256 .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "vec_u32" => db_update + "vec_u_32" => db_update .vec_u_32 .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "vec_u64" => db_update + "vec_u_64" => db_update .vec_u_64 .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "vec_u8" => db_update + "vec_u_8" => db_update .vec_u_8 .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), "vec_unit_struct" => db_update @@ -3632,7 +4028,7 @@ impl __sdk::DbUpdate for DbUpdate { let mut db_update = DbUpdate::default(); for table_rows in raw.tables { match &table_rows.table[..] { - "btree_u32" => db_update + "btree_u_32" => db_update .btree_u_32 .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), "indexed_simple_enum" => db_update @@ -3665,28 +4061,28 @@ impl __sdk::DbUpdate for DbUpdate { "one_every_vec_struct" => db_update .one_every_vec_struct .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "one_f32" => db_update + "one_f_32" => db_update .one_f_32 .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "one_f64" => db_update + "one_f_64" => db_update .one_f_64 .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "one_i128" => db_update + "one_i_128" => db_update .one_i_128 .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "one_i16" => db_update + "one_i_16" => db_update .one_i_16 .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "one_i256" => db_update + "one_i_256" => db_update .one_i_256 .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "one_i32" => db_update + "one_i_32" => db_update .one_i_32 .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "one_i64" => db_update + "one_i_64" => db_update .one_i_64 .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "one_i8" => db_update + "one_i_8" => db_update .one_i_8 .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), "one_identity" => db_update @@ -3701,22 +4097,22 @@ impl __sdk::DbUpdate for DbUpdate { "one_timestamp" => db_update .one_timestamp .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "one_u128" => db_update + "one_u_128" => db_update .one_u_128 .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "one_u16" => db_update + "one_u_16" => db_update .one_u_16 .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "one_u256" => db_update + "one_u_256" => db_update .one_u_256 .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "one_u32" => db_update + "one_u_32" => db_update .one_u_32 .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "one_u64" => db_update + "one_u_64" => db_update .one_u_64 .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "one_u8" => db_update + "one_u_8" => db_update .one_u_8 .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), "one_unit_struct" => db_update @@ -3728,7 +4124,7 @@ impl __sdk::DbUpdate for DbUpdate { "option_every_primitive_struct" => db_update .option_every_primitive_struct .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "option_i32" => db_update + "option_i_32" => db_update .option_i_32 .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), "option_identity" => db_update @@ -3743,7 +4139,7 @@ impl __sdk::DbUpdate for DbUpdate { "option_uuid" => db_update .option_uuid .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "option_vec_option_i32" => db_update + "option_vec_option_i_32" => db_update .option_vec_option_i_32 .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), "pk_bool" => db_update @@ -3752,22 +4148,22 @@ impl __sdk::DbUpdate for DbUpdate { "pk_connection_id" => db_update .pk_connection_id .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "pk_i128" => db_update + "pk_i_128" => db_update .pk_i_128 .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "pk_i16" => db_update + "pk_i_16" => db_update .pk_i_16 .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "pk_i256" => db_update + "pk_i_256" => db_update .pk_i_256 .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "pk_i32" => db_update + "pk_i_32" => db_update .pk_i_32 .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "pk_i64" => db_update + "pk_i_64" => db_update .pk_i_64 .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "pk_i8" => db_update + "pk_i_8" => db_update .pk_i_8 .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), "pk_identity" => db_update @@ -3779,25 +4175,25 @@ impl __sdk::DbUpdate for DbUpdate { "pk_string" => db_update .pk_string .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "pk_u128" => db_update + "pk_u_128" => db_update .pk_u_128 .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "pk_u16" => db_update + "pk_u_16" => db_update .pk_u_16 .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "pk_u256" => db_update + "pk_u_256" => db_update .pk_u_256 .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "pk_u32" => db_update + "pk_u_32" => db_update .pk_u_32 .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "pk_u32_two" => db_update + "pk_u_32_two" => db_update .pk_u_32_two .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "pk_u64" => db_update + "pk_u_64" => db_update .pk_u_64 .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "pk_u8" => db_update + "pk_u_8" => db_update .pk_u_8 .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), "pk_uuid" => db_update @@ -3806,19 +4202,19 @@ impl __sdk::DbUpdate for DbUpdate { "result_every_primitive_struct_string" => db_update .result_every_primitive_struct_string .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "result_i32_string" => db_update + "result_i_32_string" => db_update .result_i_32_string .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), "result_identity_string" => db_update .result_identity_string .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "result_simple_enum_i32" => db_update + "result_simple_enum_i_32" => db_update .result_simple_enum_i_32 .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "result_string_i32" => db_update + "result_string_i_32" => db_update .result_string_i_32 .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "result_vec_i32_string" => db_update + "result_vec_i_32_string" => db_update .result_vec_i_32_string .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), "scheduled_table" => db_update @@ -3833,22 +4229,22 @@ impl __sdk::DbUpdate for DbUpdate { "unique_connection_id" => db_update .unique_connection_id .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "unique_i128" => db_update + "unique_i_128" => db_update .unique_i_128 .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "unique_i16" => db_update + "unique_i_16" => db_update .unique_i_16 .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "unique_i256" => db_update + "unique_i_256" => db_update .unique_i_256 .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "unique_i32" => db_update + "unique_i_32" => db_update .unique_i_32 .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "unique_i64" => db_update + "unique_i_64" => db_update .unique_i_64 .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "unique_i8" => db_update + "unique_i_8" => db_update .unique_i_8 .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), "unique_identity" => db_update @@ -3857,22 +4253,22 @@ impl __sdk::DbUpdate for DbUpdate { "unique_string" => db_update .unique_string .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "unique_u128" => db_update + "unique_u_128" => db_update .unique_u_128 .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "unique_u16" => db_update + "unique_u_16" => db_update .unique_u_16 .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "unique_u256" => db_update + "unique_u_256" => db_update .unique_u_256 .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "unique_u32" => db_update + "unique_u_32" => db_update .unique_u_32 .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "unique_u64" => db_update + "unique_u_64" => db_update .unique_u_64 .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "unique_u8" => db_update + "unique_u_8" => db_update .unique_u_8 .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), "unique_uuid" => db_update @@ -3899,28 +4295,28 @@ impl __sdk::DbUpdate for DbUpdate { "vec_every_vec_struct" => db_update .vec_every_vec_struct .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "vec_f32" => db_update + "vec_f_32" => db_update .vec_f_32 .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "vec_f64" => db_update + "vec_f_64" => db_update .vec_f_64 .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "vec_i128" => db_update + "vec_i_128" => db_update .vec_i_128 .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "vec_i16" => db_update + "vec_i_16" => db_update .vec_i_16 .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "vec_i256" => db_update + "vec_i_256" => db_update .vec_i_256 .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "vec_i32" => db_update + "vec_i_32" => db_update .vec_i_32 .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "vec_i64" => db_update + "vec_i_64" => db_update .vec_i_64 .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "vec_i8" => db_update + "vec_i_8" => db_update .vec_i_8 .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), "vec_identity" => db_update @@ -3935,22 +4331,22 @@ impl __sdk::DbUpdate for DbUpdate { "vec_timestamp" => db_update .vec_timestamp .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "vec_u128" => db_update + "vec_u_128" => db_update .vec_u_128 .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "vec_u16" => db_update + "vec_u_16" => db_update .vec_u_16 .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "vec_u256" => db_update + "vec_u_256" => db_update .vec_u_256 .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "vec_u32" => db_update + "vec_u_32" => db_update .vec_u_32 .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "vec_u64" => db_update + "vec_u_64" => db_update .vec_u_64 .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "vec_u8" => db_update + "vec_u_8" => db_update .vec_u_8 .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), "vec_unit_struct" => db_update @@ -4090,7 +4486,7 @@ impl __sdk::InModule for AppliedDiff<'_> { impl<'r> __sdk::AppliedDiff<'r> for AppliedDiff<'r> { fn invoke_row_callbacks(&self, event: &EventContext, callbacks: &mut __sdk::DbCallbacks) { - callbacks.invoke_table_row_callbacks::("btree_u32", &self.btree_u_32, event); + callbacks.invoke_table_row_callbacks::("btree_u_32", &self.btree_u_32, event); callbacks.invoke_table_row_callbacks::( "indexed_simple_enum", &self.indexed_simple_enum, @@ -4117,24 +4513,24 @@ impl<'r> __sdk::AppliedDiff<'r> for AppliedDiff<'r> { &self.one_every_vec_struct, event, ); - callbacks.invoke_table_row_callbacks::("one_f32", &self.one_f_32, event); - callbacks.invoke_table_row_callbacks::("one_f64", &self.one_f_64, event); - callbacks.invoke_table_row_callbacks::("one_i128", &self.one_i_128, event); - callbacks.invoke_table_row_callbacks::("one_i16", &self.one_i_16, event); - callbacks.invoke_table_row_callbacks::("one_i256", &self.one_i_256, event); - callbacks.invoke_table_row_callbacks::("one_i32", &self.one_i_32, event); - callbacks.invoke_table_row_callbacks::("one_i64", &self.one_i_64, event); - callbacks.invoke_table_row_callbacks::("one_i8", &self.one_i_8, event); + callbacks.invoke_table_row_callbacks::("one_f_32", &self.one_f_32, event); + callbacks.invoke_table_row_callbacks::("one_f_64", &self.one_f_64, event); + callbacks.invoke_table_row_callbacks::("one_i_128", &self.one_i_128, event); + callbacks.invoke_table_row_callbacks::("one_i_16", &self.one_i_16, event); + callbacks.invoke_table_row_callbacks::("one_i_256", &self.one_i_256, event); + callbacks.invoke_table_row_callbacks::("one_i_32", &self.one_i_32, event); + callbacks.invoke_table_row_callbacks::("one_i_64", &self.one_i_64, event); + callbacks.invoke_table_row_callbacks::("one_i_8", &self.one_i_8, event); callbacks.invoke_table_row_callbacks::("one_identity", &self.one_identity, event); callbacks.invoke_table_row_callbacks::("one_simple_enum", &self.one_simple_enum, event); callbacks.invoke_table_row_callbacks::("one_string", &self.one_string, event); callbacks.invoke_table_row_callbacks::("one_timestamp", &self.one_timestamp, event); - callbacks.invoke_table_row_callbacks::("one_u128", &self.one_u_128, event); - callbacks.invoke_table_row_callbacks::("one_u16", &self.one_u_16, event); - callbacks.invoke_table_row_callbacks::("one_u256", &self.one_u_256, event); - callbacks.invoke_table_row_callbacks::("one_u32", &self.one_u_32, event); - callbacks.invoke_table_row_callbacks::("one_u64", &self.one_u_64, event); - callbacks.invoke_table_row_callbacks::("one_u8", &self.one_u_8, event); + callbacks.invoke_table_row_callbacks::("one_u_128", &self.one_u_128, event); + callbacks.invoke_table_row_callbacks::("one_u_16", &self.one_u_16, event); + callbacks.invoke_table_row_callbacks::("one_u_256", &self.one_u_256, event); + callbacks.invoke_table_row_callbacks::("one_u_32", &self.one_u_32, event); + callbacks.invoke_table_row_callbacks::("one_u_64", &self.one_u_64, event); + callbacks.invoke_table_row_callbacks::("one_u_8", &self.one_u_8, event); callbacks.invoke_table_row_callbacks::("one_unit_struct", &self.one_unit_struct, event); callbacks.invoke_table_row_callbacks::("one_uuid", &self.one_uuid, event); callbacks.invoke_table_row_callbacks::( @@ -4142,54 +4538,54 @@ impl<'r> __sdk::AppliedDiff<'r> for AppliedDiff<'r> { &self.option_every_primitive_struct, event, ); - callbacks.invoke_table_row_callbacks::("option_i32", &self.option_i_32, event); + callbacks.invoke_table_row_callbacks::("option_i_32", &self.option_i_32, event); callbacks.invoke_table_row_callbacks::("option_identity", &self.option_identity, event); callbacks.invoke_table_row_callbacks::("option_simple_enum", &self.option_simple_enum, event); callbacks.invoke_table_row_callbacks::("option_string", &self.option_string, event); callbacks.invoke_table_row_callbacks::("option_uuid", &self.option_uuid, event); callbacks.invoke_table_row_callbacks::( - "option_vec_option_i32", + "option_vec_option_i_32", &self.option_vec_option_i_32, event, ); callbacks.invoke_table_row_callbacks::("pk_bool", &self.pk_bool, event); callbacks.invoke_table_row_callbacks::("pk_connection_id", &self.pk_connection_id, event); - callbacks.invoke_table_row_callbacks::("pk_i128", &self.pk_i_128, event); - callbacks.invoke_table_row_callbacks::("pk_i16", &self.pk_i_16, event); - callbacks.invoke_table_row_callbacks::("pk_i256", &self.pk_i_256, event); - callbacks.invoke_table_row_callbacks::("pk_i32", &self.pk_i_32, event); - callbacks.invoke_table_row_callbacks::("pk_i64", &self.pk_i_64, event); - callbacks.invoke_table_row_callbacks::("pk_i8", &self.pk_i_8, event); + callbacks.invoke_table_row_callbacks::("pk_i_128", &self.pk_i_128, event); + callbacks.invoke_table_row_callbacks::("pk_i_16", &self.pk_i_16, event); + callbacks.invoke_table_row_callbacks::("pk_i_256", &self.pk_i_256, event); + callbacks.invoke_table_row_callbacks::("pk_i_32", &self.pk_i_32, event); + callbacks.invoke_table_row_callbacks::("pk_i_64", &self.pk_i_64, event); + callbacks.invoke_table_row_callbacks::("pk_i_8", &self.pk_i_8, event); callbacks.invoke_table_row_callbacks::("pk_identity", &self.pk_identity, event); callbacks.invoke_table_row_callbacks::("pk_simple_enum", &self.pk_simple_enum, event); callbacks.invoke_table_row_callbacks::("pk_string", &self.pk_string, event); - callbacks.invoke_table_row_callbacks::("pk_u128", &self.pk_u_128, event); - callbacks.invoke_table_row_callbacks::("pk_u16", &self.pk_u_16, event); - callbacks.invoke_table_row_callbacks::("pk_u256", &self.pk_u_256, event); - callbacks.invoke_table_row_callbacks::("pk_u32", &self.pk_u_32, event); - callbacks.invoke_table_row_callbacks::("pk_u32_two", &self.pk_u_32_two, event); - callbacks.invoke_table_row_callbacks::("pk_u64", &self.pk_u_64, event); - callbacks.invoke_table_row_callbacks::("pk_u8", &self.pk_u_8, event); + callbacks.invoke_table_row_callbacks::("pk_u_128", &self.pk_u_128, event); + callbacks.invoke_table_row_callbacks::("pk_u_16", &self.pk_u_16, event); + callbacks.invoke_table_row_callbacks::("pk_u_256", &self.pk_u_256, event); + callbacks.invoke_table_row_callbacks::("pk_u_32", &self.pk_u_32, event); + callbacks.invoke_table_row_callbacks::("pk_u_32_two", &self.pk_u_32_two, event); + callbacks.invoke_table_row_callbacks::("pk_u_64", &self.pk_u_64, event); + callbacks.invoke_table_row_callbacks::("pk_u_8", &self.pk_u_8, event); callbacks.invoke_table_row_callbacks::("pk_uuid", &self.pk_uuid, event); callbacks.invoke_table_row_callbacks::( "result_every_primitive_struct_string", &self.result_every_primitive_struct_string, event, ); - callbacks.invoke_table_row_callbacks::("result_i32_string", &self.result_i_32_string, event); + callbacks.invoke_table_row_callbacks::("result_i_32_string", &self.result_i_32_string, event); callbacks.invoke_table_row_callbacks::( "result_identity_string", &self.result_identity_string, event, ); callbacks.invoke_table_row_callbacks::( - "result_simple_enum_i32", + "result_simple_enum_i_32", &self.result_simple_enum_i_32, event, ); - callbacks.invoke_table_row_callbacks::("result_string_i32", &self.result_string_i_32, event); + callbacks.invoke_table_row_callbacks::("result_string_i_32", &self.result_string_i_32, event); callbacks.invoke_table_row_callbacks::( - "result_vec_i32_string", + "result_vec_i_32_string", &self.result_vec_i_32_string, event, ); @@ -4201,20 +4597,20 @@ impl<'r> __sdk::AppliedDiff<'r> for AppliedDiff<'r> { &self.unique_connection_id, event, ); - callbacks.invoke_table_row_callbacks::("unique_i128", &self.unique_i_128, event); - callbacks.invoke_table_row_callbacks::("unique_i16", &self.unique_i_16, event); - callbacks.invoke_table_row_callbacks::("unique_i256", &self.unique_i_256, event); - callbacks.invoke_table_row_callbacks::("unique_i32", &self.unique_i_32, event); - callbacks.invoke_table_row_callbacks::("unique_i64", &self.unique_i_64, event); - callbacks.invoke_table_row_callbacks::("unique_i8", &self.unique_i_8, event); + callbacks.invoke_table_row_callbacks::("unique_i_128", &self.unique_i_128, event); + callbacks.invoke_table_row_callbacks::("unique_i_16", &self.unique_i_16, event); + callbacks.invoke_table_row_callbacks::("unique_i_256", &self.unique_i_256, event); + callbacks.invoke_table_row_callbacks::("unique_i_32", &self.unique_i_32, event); + callbacks.invoke_table_row_callbacks::("unique_i_64", &self.unique_i_64, event); + callbacks.invoke_table_row_callbacks::("unique_i_8", &self.unique_i_8, event); callbacks.invoke_table_row_callbacks::("unique_identity", &self.unique_identity, event); callbacks.invoke_table_row_callbacks::("unique_string", &self.unique_string, event); - callbacks.invoke_table_row_callbacks::("unique_u128", &self.unique_u_128, event); - callbacks.invoke_table_row_callbacks::("unique_u16", &self.unique_u_16, event); - callbacks.invoke_table_row_callbacks::("unique_u256", &self.unique_u_256, event); - callbacks.invoke_table_row_callbacks::("unique_u32", &self.unique_u_32, event); - callbacks.invoke_table_row_callbacks::("unique_u64", &self.unique_u_64, event); - callbacks.invoke_table_row_callbacks::("unique_u8", &self.unique_u_8, event); + callbacks.invoke_table_row_callbacks::("unique_u_128", &self.unique_u_128, event); + callbacks.invoke_table_row_callbacks::("unique_u_16", &self.unique_u_16, event); + callbacks.invoke_table_row_callbacks::("unique_u_256", &self.unique_u_256, event); + callbacks.invoke_table_row_callbacks::("unique_u_32", &self.unique_u_32, event); + callbacks.invoke_table_row_callbacks::("unique_u_64", &self.unique_u_64, event); + callbacks.invoke_table_row_callbacks::("unique_u_8", &self.unique_u_8, event); callbacks.invoke_table_row_callbacks::("unique_uuid", &self.unique_uuid, event); callbacks.invoke_table_row_callbacks::("users", &self.users, event); callbacks.invoke_table_row_callbacks::("vec_bool", &self.vec_bool, event); @@ -4235,24 +4631,24 @@ impl<'r> __sdk::AppliedDiff<'r> for AppliedDiff<'r> { &self.vec_every_vec_struct, event, ); - callbacks.invoke_table_row_callbacks::("vec_f32", &self.vec_f_32, event); - callbacks.invoke_table_row_callbacks::("vec_f64", &self.vec_f_64, event); - callbacks.invoke_table_row_callbacks::("vec_i128", &self.vec_i_128, event); - callbacks.invoke_table_row_callbacks::("vec_i16", &self.vec_i_16, event); - callbacks.invoke_table_row_callbacks::("vec_i256", &self.vec_i_256, event); - callbacks.invoke_table_row_callbacks::("vec_i32", &self.vec_i_32, event); - callbacks.invoke_table_row_callbacks::("vec_i64", &self.vec_i_64, event); - callbacks.invoke_table_row_callbacks::("vec_i8", &self.vec_i_8, event); + callbacks.invoke_table_row_callbacks::("vec_f_32", &self.vec_f_32, event); + callbacks.invoke_table_row_callbacks::("vec_f_64", &self.vec_f_64, event); + callbacks.invoke_table_row_callbacks::("vec_i_128", &self.vec_i_128, event); + callbacks.invoke_table_row_callbacks::("vec_i_16", &self.vec_i_16, event); + callbacks.invoke_table_row_callbacks::("vec_i_256", &self.vec_i_256, event); + callbacks.invoke_table_row_callbacks::("vec_i_32", &self.vec_i_32, event); + callbacks.invoke_table_row_callbacks::("vec_i_64", &self.vec_i_64, event); + callbacks.invoke_table_row_callbacks::("vec_i_8", &self.vec_i_8, event); callbacks.invoke_table_row_callbacks::("vec_identity", &self.vec_identity, event); callbacks.invoke_table_row_callbacks::("vec_simple_enum", &self.vec_simple_enum, event); callbacks.invoke_table_row_callbacks::("vec_string", &self.vec_string, event); callbacks.invoke_table_row_callbacks::("vec_timestamp", &self.vec_timestamp, event); - callbacks.invoke_table_row_callbacks::("vec_u128", &self.vec_u_128, event); - callbacks.invoke_table_row_callbacks::("vec_u16", &self.vec_u_16, event); - callbacks.invoke_table_row_callbacks::("vec_u256", &self.vec_u_256, event); - callbacks.invoke_table_row_callbacks::("vec_u32", &self.vec_u_32, event); - callbacks.invoke_table_row_callbacks::("vec_u64", &self.vec_u_64, event); - callbacks.invoke_table_row_callbacks::("vec_u8", &self.vec_u_8, event); + callbacks.invoke_table_row_callbacks::("vec_u_128", &self.vec_u_128, event); + callbacks.invoke_table_row_callbacks::("vec_u_16", &self.vec_u_16, event); + callbacks.invoke_table_row_callbacks::("vec_u_256", &self.vec_u_256, event); + callbacks.invoke_table_row_callbacks::("vec_u_32", &self.vec_u_32, event); + callbacks.invoke_table_row_callbacks::("vec_u_64", &self.vec_u_64, event); + callbacks.invoke_table_row_callbacks::("vec_u_8", &self.vec_u_8, event); callbacks.invoke_table_row_callbacks::("vec_unit_struct", &self.vec_unit_struct, event); callbacks.invoke_table_row_callbacks::("vec_uuid", &self.vec_uuid, event); } @@ -5010,7 +5406,7 @@ impl __sdk::SpacetimeModule for RemoteModule { vec_uuid_table::register_table(client_cache); } const ALL_TABLE_NAMES: &'static [&'static str] = &[ - "btree_u32", + "btree_u_32", "indexed_simple_enum", "indexed_table", "indexed_table_2", @@ -5021,76 +5417,76 @@ impl __sdk::SpacetimeModule for RemoteModule { "one_enum_with_payload", "one_every_primitive_struct", "one_every_vec_struct", - "one_f32", - "one_f64", - "one_i128", - "one_i16", - "one_i256", - "one_i32", - "one_i64", - "one_i8", + "one_f_32", + "one_f_64", + "one_i_128", + "one_i_16", + "one_i_256", + "one_i_32", + "one_i_64", + "one_i_8", "one_identity", "one_simple_enum", "one_string", "one_timestamp", - "one_u128", - "one_u16", - "one_u256", - "one_u32", - "one_u64", - "one_u8", + "one_u_128", + "one_u_16", + "one_u_256", + "one_u_32", + "one_u_64", + "one_u_8", "one_unit_struct", "one_uuid", "option_every_primitive_struct", - "option_i32", + "option_i_32", "option_identity", "option_simple_enum", "option_string", "option_uuid", - "option_vec_option_i32", + "option_vec_option_i_32", "pk_bool", "pk_connection_id", - "pk_i128", - "pk_i16", - "pk_i256", - "pk_i32", - "pk_i64", - "pk_i8", + "pk_i_128", + "pk_i_16", + "pk_i_256", + "pk_i_32", + "pk_i_64", + "pk_i_8", "pk_identity", "pk_simple_enum", "pk_string", - "pk_u128", - "pk_u16", - "pk_u256", - "pk_u32", - "pk_u32_two", - "pk_u64", - "pk_u8", + "pk_u_128", + "pk_u_16", + "pk_u_256", + "pk_u_32", + "pk_u_32_two", + "pk_u_64", + "pk_u_8", "pk_uuid", "result_every_primitive_struct_string", - "result_i32_string", + "result_i_32_string", "result_identity_string", - "result_simple_enum_i32", - "result_string_i32", - "result_vec_i32_string", + "result_simple_enum_i_32", + "result_string_i_32", + "result_vec_i_32_string", "scheduled_table", "table_holds_table", "unique_bool", "unique_connection_id", - "unique_i128", - "unique_i16", - "unique_i256", - "unique_i32", - "unique_i64", - "unique_i8", + "unique_i_128", + "unique_i_16", + "unique_i_256", + "unique_i_32", + "unique_i_64", + "unique_i_8", "unique_identity", "unique_string", - "unique_u128", - "unique_u16", - "unique_u256", - "unique_u32", - "unique_u64", - "unique_u8", + "unique_u_128", + "unique_u_16", + "unique_u_256", + "unique_u_32", + "unique_u_64", + "unique_u_8", "unique_uuid", "users", "vec_bool", @@ -5099,24 +5495,24 @@ impl __sdk::SpacetimeModule for RemoteModule { "vec_enum_with_payload", "vec_every_primitive_struct", "vec_every_vec_struct", - "vec_f32", - "vec_f64", - "vec_i128", - "vec_i16", - "vec_i256", - "vec_i32", - "vec_i64", - "vec_i8", + "vec_f_32", + "vec_f_64", + "vec_i_128", + "vec_i_16", + "vec_i_256", + "vec_i_32", + "vec_i_64", + "vec_i_8", "vec_identity", "vec_simple_enum", "vec_string", "vec_timestamp", - "vec_u128", - "vec_u16", - "vec_u256", - "vec_u32", - "vec_u64", - "vec_u8", + "vec_u_128", + "vec_u_16", + "vec_u_256", + "vec_u_32", + "vec_u_64", + "vec_u_8", "vec_unit_struct", "vec_uuid", ]; diff --git a/sdks/rust/tests/test-client/src/module_bindings/no_op_succeeds_type.rs b/sdks/rust/tests/test-client/src/module_bindings/no_op_succeeds_type.rs new file mode 100644 index 00000000000..4e9aed45e8c --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/no_op_succeeds_type.rs @@ -0,0 +1,13 @@ +// 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, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct NoOpSucceeds {} + +impl __sdk::InModule for NoOpSucceeds { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/one_f_32_table.rs b/sdks/rust/tests/test-client/src/module_bindings/one_f_32_table.rs index f1ee03c7de1..732f8dfa303 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/one_f_32_table.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/one_f_32_table.rs @@ -5,7 +5,7 @@ use super::one_f_32_type::OneF32; use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; -/// Table handle for the table `one_f32`. +/// Table handle for the table `one_f_32`. /// /// Obtain a handle from the [`OneF32TableAccess::one_f_32`] method on [`super::RemoteTables`], /// like `ctx.db.one_f_32()`. @@ -19,19 +19,19 @@ pub struct OneF32TableHandle<'ctx> { } #[allow(non_camel_case_types)] -/// Extension trait for access to the table `one_f32`. +/// Extension trait for access to the table `one_f_32`. /// /// Implemented for [`super::RemoteTables`]. pub trait OneF32TableAccess { #[allow(non_snake_case)] - /// Obtain a [`OneF32TableHandle`], which mediates access to the table `one_f32`. + /// Obtain a [`OneF32TableHandle`], which mediates access to the table `one_f_32`. fn one_f_32(&self) -> OneF32TableHandle<'_>; } impl OneF32TableAccess for super::RemoteTables { fn one_f_32(&self) -> OneF32TableHandle<'_> { OneF32TableHandle { - imp: self.imp.get_table::("one_f32"), + imp: self.imp.get_table::("one_f_32"), ctx: std::marker::PhantomData, } } @@ -80,7 +80,7 @@ impl<'ctx> __sdk::Table for OneF32TableHandle<'ctx> { #[doc(hidden)] pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { - let _table = client_cache.get_or_make_table::("one_f32"); + let _table = client_cache.get_or_make_table::("one_f_32"); } #[doc(hidden)] diff --git a/sdks/rust/tests/test-client/src/module_bindings/one_f_64_table.rs b/sdks/rust/tests/test-client/src/module_bindings/one_f_64_table.rs index 8602398eb9e..b1af350ac5a 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/one_f_64_table.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/one_f_64_table.rs @@ -5,7 +5,7 @@ use super::one_f_64_type::OneF64; use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; -/// Table handle for the table `one_f64`. +/// Table handle for the table `one_f_64`. /// /// Obtain a handle from the [`OneF64TableAccess::one_f_64`] method on [`super::RemoteTables`], /// like `ctx.db.one_f_64()`. @@ -19,19 +19,19 @@ pub struct OneF64TableHandle<'ctx> { } #[allow(non_camel_case_types)] -/// Extension trait for access to the table `one_f64`. +/// Extension trait for access to the table `one_f_64`. /// /// Implemented for [`super::RemoteTables`]. pub trait OneF64TableAccess { #[allow(non_snake_case)] - /// Obtain a [`OneF64TableHandle`], which mediates access to the table `one_f64`. + /// Obtain a [`OneF64TableHandle`], which mediates access to the table `one_f_64`. fn one_f_64(&self) -> OneF64TableHandle<'_>; } impl OneF64TableAccess for super::RemoteTables { fn one_f_64(&self) -> OneF64TableHandle<'_> { OneF64TableHandle { - imp: self.imp.get_table::("one_f64"), + imp: self.imp.get_table::("one_f_64"), ctx: std::marker::PhantomData, } } @@ -80,7 +80,7 @@ impl<'ctx> __sdk::Table for OneF64TableHandle<'ctx> { #[doc(hidden)] pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { - let _table = client_cache.get_or_make_table::("one_f64"); + let _table = client_cache.get_or_make_table::("one_f_64"); } #[doc(hidden)] diff --git a/sdks/rust/tests/test-client/src/module_bindings/one_i_128_table.rs b/sdks/rust/tests/test-client/src/module_bindings/one_i_128_table.rs index 17fff5b9e48..827ae0d29eb 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/one_i_128_table.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/one_i_128_table.rs @@ -5,7 +5,7 @@ use super::one_i_128_type::OneI128; use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; -/// Table handle for the table `one_i128`. +/// Table handle for the table `one_i_128`. /// /// Obtain a handle from the [`OneI128TableAccess::one_i_128`] method on [`super::RemoteTables`], /// like `ctx.db.one_i_128()`. @@ -19,19 +19,19 @@ pub struct OneI128TableHandle<'ctx> { } #[allow(non_camel_case_types)] -/// Extension trait for access to the table `one_i128`. +/// Extension trait for access to the table `one_i_128`. /// /// Implemented for [`super::RemoteTables`]. pub trait OneI128TableAccess { #[allow(non_snake_case)] - /// Obtain a [`OneI128TableHandle`], which mediates access to the table `one_i128`. + /// Obtain a [`OneI128TableHandle`], which mediates access to the table `one_i_128`. fn one_i_128(&self) -> OneI128TableHandle<'_>; } impl OneI128TableAccess for super::RemoteTables { fn one_i_128(&self) -> OneI128TableHandle<'_> { OneI128TableHandle { - imp: self.imp.get_table::("one_i128"), + imp: self.imp.get_table::("one_i_128"), ctx: std::marker::PhantomData, } } @@ -80,7 +80,7 @@ impl<'ctx> __sdk::Table for OneI128TableHandle<'ctx> { #[doc(hidden)] pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { - let _table = client_cache.get_or_make_table::("one_i128"); + let _table = client_cache.get_or_make_table::("one_i_128"); } #[doc(hidden)] diff --git a/sdks/rust/tests/test-client/src/module_bindings/one_i_16_table.rs b/sdks/rust/tests/test-client/src/module_bindings/one_i_16_table.rs index a7c5ea3743e..3179260529e 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/one_i_16_table.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/one_i_16_table.rs @@ -5,7 +5,7 @@ use super::one_i_16_type::OneI16; use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; -/// Table handle for the table `one_i16`. +/// Table handle for the table `one_i_16`. /// /// Obtain a handle from the [`OneI16TableAccess::one_i_16`] method on [`super::RemoteTables`], /// like `ctx.db.one_i_16()`. @@ -19,19 +19,19 @@ pub struct OneI16TableHandle<'ctx> { } #[allow(non_camel_case_types)] -/// Extension trait for access to the table `one_i16`. +/// Extension trait for access to the table `one_i_16`. /// /// Implemented for [`super::RemoteTables`]. pub trait OneI16TableAccess { #[allow(non_snake_case)] - /// Obtain a [`OneI16TableHandle`], which mediates access to the table `one_i16`. + /// Obtain a [`OneI16TableHandle`], which mediates access to the table `one_i_16`. fn one_i_16(&self) -> OneI16TableHandle<'_>; } impl OneI16TableAccess for super::RemoteTables { fn one_i_16(&self) -> OneI16TableHandle<'_> { OneI16TableHandle { - imp: self.imp.get_table::("one_i16"), + imp: self.imp.get_table::("one_i_16"), ctx: std::marker::PhantomData, } } @@ -80,7 +80,7 @@ impl<'ctx> __sdk::Table for OneI16TableHandle<'ctx> { #[doc(hidden)] pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { - let _table = client_cache.get_or_make_table::("one_i16"); + let _table = client_cache.get_or_make_table::("one_i_16"); } #[doc(hidden)] diff --git a/sdks/rust/tests/test-client/src/module_bindings/one_i_256_table.rs b/sdks/rust/tests/test-client/src/module_bindings/one_i_256_table.rs index 05fd61c6c3a..eb67148af64 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/one_i_256_table.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/one_i_256_table.rs @@ -5,7 +5,7 @@ use super::one_i_256_type::OneI256; use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; -/// Table handle for the table `one_i256`. +/// Table handle for the table `one_i_256`. /// /// Obtain a handle from the [`OneI256TableAccess::one_i_256`] method on [`super::RemoteTables`], /// like `ctx.db.one_i_256()`. @@ -19,19 +19,19 @@ pub struct OneI256TableHandle<'ctx> { } #[allow(non_camel_case_types)] -/// Extension trait for access to the table `one_i256`. +/// Extension trait for access to the table `one_i_256`. /// /// Implemented for [`super::RemoteTables`]. pub trait OneI256TableAccess { #[allow(non_snake_case)] - /// Obtain a [`OneI256TableHandle`], which mediates access to the table `one_i256`. + /// Obtain a [`OneI256TableHandle`], which mediates access to the table `one_i_256`. fn one_i_256(&self) -> OneI256TableHandle<'_>; } impl OneI256TableAccess for super::RemoteTables { fn one_i_256(&self) -> OneI256TableHandle<'_> { OneI256TableHandle { - imp: self.imp.get_table::("one_i256"), + imp: self.imp.get_table::("one_i_256"), ctx: std::marker::PhantomData, } } @@ -80,7 +80,7 @@ impl<'ctx> __sdk::Table for OneI256TableHandle<'ctx> { #[doc(hidden)] pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { - let _table = client_cache.get_or_make_table::("one_i256"); + let _table = client_cache.get_or_make_table::("one_i_256"); } #[doc(hidden)] diff --git a/sdks/rust/tests/test-client/src/module_bindings/one_i_32_table.rs b/sdks/rust/tests/test-client/src/module_bindings/one_i_32_table.rs index d95d6dc5f7d..c39ff0b3d4b 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/one_i_32_table.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/one_i_32_table.rs @@ -5,7 +5,7 @@ use super::one_i_32_type::OneI32; use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; -/// Table handle for the table `one_i32`. +/// Table handle for the table `one_i_32`. /// /// Obtain a handle from the [`OneI32TableAccess::one_i_32`] method on [`super::RemoteTables`], /// like `ctx.db.one_i_32()`. @@ -19,19 +19,19 @@ pub struct OneI32TableHandle<'ctx> { } #[allow(non_camel_case_types)] -/// Extension trait for access to the table `one_i32`. +/// Extension trait for access to the table `one_i_32`. /// /// Implemented for [`super::RemoteTables`]. pub trait OneI32TableAccess { #[allow(non_snake_case)] - /// Obtain a [`OneI32TableHandle`], which mediates access to the table `one_i32`. + /// Obtain a [`OneI32TableHandle`], which mediates access to the table `one_i_32`. fn one_i_32(&self) -> OneI32TableHandle<'_>; } impl OneI32TableAccess for super::RemoteTables { fn one_i_32(&self) -> OneI32TableHandle<'_> { OneI32TableHandle { - imp: self.imp.get_table::("one_i32"), + imp: self.imp.get_table::("one_i_32"), ctx: std::marker::PhantomData, } } @@ -80,7 +80,7 @@ impl<'ctx> __sdk::Table for OneI32TableHandle<'ctx> { #[doc(hidden)] pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { - let _table = client_cache.get_or_make_table::("one_i32"); + let _table = client_cache.get_or_make_table::("one_i_32"); } #[doc(hidden)] diff --git a/sdks/rust/tests/test-client/src/module_bindings/one_i_64_table.rs b/sdks/rust/tests/test-client/src/module_bindings/one_i_64_table.rs index 371f393836a..8aa83bcc852 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/one_i_64_table.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/one_i_64_table.rs @@ -5,7 +5,7 @@ use super::one_i_64_type::OneI64; use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; -/// Table handle for the table `one_i64`. +/// Table handle for the table `one_i_64`. /// /// Obtain a handle from the [`OneI64TableAccess::one_i_64`] method on [`super::RemoteTables`], /// like `ctx.db.one_i_64()`. @@ -19,19 +19,19 @@ pub struct OneI64TableHandle<'ctx> { } #[allow(non_camel_case_types)] -/// Extension trait for access to the table `one_i64`. +/// Extension trait for access to the table `one_i_64`. /// /// Implemented for [`super::RemoteTables`]. pub trait OneI64TableAccess { #[allow(non_snake_case)] - /// Obtain a [`OneI64TableHandle`], which mediates access to the table `one_i64`. + /// Obtain a [`OneI64TableHandle`], which mediates access to the table `one_i_64`. fn one_i_64(&self) -> OneI64TableHandle<'_>; } impl OneI64TableAccess for super::RemoteTables { fn one_i_64(&self) -> OneI64TableHandle<'_> { OneI64TableHandle { - imp: self.imp.get_table::("one_i64"), + imp: self.imp.get_table::("one_i_64"), ctx: std::marker::PhantomData, } } @@ -80,7 +80,7 @@ impl<'ctx> __sdk::Table for OneI64TableHandle<'ctx> { #[doc(hidden)] pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { - let _table = client_cache.get_or_make_table::("one_i64"); + let _table = client_cache.get_or_make_table::("one_i_64"); } #[doc(hidden)] diff --git a/sdks/rust/tests/test-client/src/module_bindings/one_i_8_table.rs b/sdks/rust/tests/test-client/src/module_bindings/one_i_8_table.rs index 04cb43c57e0..2be21340101 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/one_i_8_table.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/one_i_8_table.rs @@ -5,7 +5,7 @@ use super::one_i_8_type::OneI8; use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; -/// Table handle for the table `one_i8`. +/// Table handle for the table `one_i_8`. /// /// Obtain a handle from the [`OneI8TableAccess::one_i_8`] method on [`super::RemoteTables`], /// like `ctx.db.one_i_8()`. @@ -19,19 +19,19 @@ pub struct OneI8TableHandle<'ctx> { } #[allow(non_camel_case_types)] -/// Extension trait for access to the table `one_i8`. +/// Extension trait for access to the table `one_i_8`. /// /// Implemented for [`super::RemoteTables`]. pub trait OneI8TableAccess { #[allow(non_snake_case)] - /// Obtain a [`OneI8TableHandle`], which mediates access to the table `one_i8`. + /// Obtain a [`OneI8TableHandle`], which mediates access to the table `one_i_8`. fn one_i_8(&self) -> OneI8TableHandle<'_>; } impl OneI8TableAccess for super::RemoteTables { fn one_i_8(&self) -> OneI8TableHandle<'_> { OneI8TableHandle { - imp: self.imp.get_table::("one_i8"), + imp: self.imp.get_table::("one_i_8"), ctx: std::marker::PhantomData, } } @@ -80,7 +80,7 @@ impl<'ctx> __sdk::Table for OneI8TableHandle<'ctx> { #[doc(hidden)] pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { - let _table = client_cache.get_or_make_table::("one_i8"); + let _table = client_cache.get_or_make_table::("one_i_8"); } #[doc(hidden)] diff --git a/sdks/rust/tests/test-client/src/module_bindings/one_u_128_table.rs b/sdks/rust/tests/test-client/src/module_bindings/one_u_128_table.rs index 40e6ccb5f6a..f283b5c9abb 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/one_u_128_table.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/one_u_128_table.rs @@ -5,7 +5,7 @@ use super::one_u_128_type::OneU128; use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; -/// Table handle for the table `one_u128`. +/// Table handle for the table `one_u_128`. /// /// Obtain a handle from the [`OneU128TableAccess::one_u_128`] method on [`super::RemoteTables`], /// like `ctx.db.one_u_128()`. @@ -19,19 +19,19 @@ pub struct OneU128TableHandle<'ctx> { } #[allow(non_camel_case_types)] -/// Extension trait for access to the table `one_u128`. +/// Extension trait for access to the table `one_u_128`. /// /// Implemented for [`super::RemoteTables`]. pub trait OneU128TableAccess { #[allow(non_snake_case)] - /// Obtain a [`OneU128TableHandle`], which mediates access to the table `one_u128`. + /// Obtain a [`OneU128TableHandle`], which mediates access to the table `one_u_128`. fn one_u_128(&self) -> OneU128TableHandle<'_>; } impl OneU128TableAccess for super::RemoteTables { fn one_u_128(&self) -> OneU128TableHandle<'_> { OneU128TableHandle { - imp: self.imp.get_table::("one_u128"), + imp: self.imp.get_table::("one_u_128"), ctx: std::marker::PhantomData, } } @@ -80,7 +80,7 @@ impl<'ctx> __sdk::Table for OneU128TableHandle<'ctx> { #[doc(hidden)] pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { - let _table = client_cache.get_or_make_table::("one_u128"); + let _table = client_cache.get_or_make_table::("one_u_128"); } #[doc(hidden)] diff --git a/sdks/rust/tests/test-client/src/module_bindings/one_u_16_table.rs b/sdks/rust/tests/test-client/src/module_bindings/one_u_16_table.rs index d61d67f0844..9b648e25374 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/one_u_16_table.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/one_u_16_table.rs @@ -5,7 +5,7 @@ use super::one_u_16_type::OneU16; use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; -/// Table handle for the table `one_u16`. +/// Table handle for the table `one_u_16`. /// /// Obtain a handle from the [`OneU16TableAccess::one_u_16`] method on [`super::RemoteTables`], /// like `ctx.db.one_u_16()`. @@ -19,19 +19,19 @@ pub struct OneU16TableHandle<'ctx> { } #[allow(non_camel_case_types)] -/// Extension trait for access to the table `one_u16`. +/// Extension trait for access to the table `one_u_16`. /// /// Implemented for [`super::RemoteTables`]. pub trait OneU16TableAccess { #[allow(non_snake_case)] - /// Obtain a [`OneU16TableHandle`], which mediates access to the table `one_u16`. + /// Obtain a [`OneU16TableHandle`], which mediates access to the table `one_u_16`. fn one_u_16(&self) -> OneU16TableHandle<'_>; } impl OneU16TableAccess for super::RemoteTables { fn one_u_16(&self) -> OneU16TableHandle<'_> { OneU16TableHandle { - imp: self.imp.get_table::("one_u16"), + imp: self.imp.get_table::("one_u_16"), ctx: std::marker::PhantomData, } } @@ -80,7 +80,7 @@ impl<'ctx> __sdk::Table for OneU16TableHandle<'ctx> { #[doc(hidden)] pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { - let _table = client_cache.get_or_make_table::("one_u16"); + let _table = client_cache.get_or_make_table::("one_u_16"); } #[doc(hidden)] diff --git a/sdks/rust/tests/test-client/src/module_bindings/one_u_256_table.rs b/sdks/rust/tests/test-client/src/module_bindings/one_u_256_table.rs index 7c4767fe193..b348be864a9 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/one_u_256_table.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/one_u_256_table.rs @@ -5,7 +5,7 @@ use super::one_u_256_type::OneU256; use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; -/// Table handle for the table `one_u256`. +/// Table handle for the table `one_u_256`. /// /// Obtain a handle from the [`OneU256TableAccess::one_u_256`] method on [`super::RemoteTables`], /// like `ctx.db.one_u_256()`. @@ -19,19 +19,19 @@ pub struct OneU256TableHandle<'ctx> { } #[allow(non_camel_case_types)] -/// Extension trait for access to the table `one_u256`. +/// Extension trait for access to the table `one_u_256`. /// /// Implemented for [`super::RemoteTables`]. pub trait OneU256TableAccess { #[allow(non_snake_case)] - /// Obtain a [`OneU256TableHandle`], which mediates access to the table `one_u256`. + /// Obtain a [`OneU256TableHandle`], which mediates access to the table `one_u_256`. fn one_u_256(&self) -> OneU256TableHandle<'_>; } impl OneU256TableAccess for super::RemoteTables { fn one_u_256(&self) -> OneU256TableHandle<'_> { OneU256TableHandle { - imp: self.imp.get_table::("one_u256"), + imp: self.imp.get_table::("one_u_256"), ctx: std::marker::PhantomData, } } @@ -80,7 +80,7 @@ impl<'ctx> __sdk::Table for OneU256TableHandle<'ctx> { #[doc(hidden)] pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { - let _table = client_cache.get_or_make_table::("one_u256"); + let _table = client_cache.get_or_make_table::("one_u_256"); } #[doc(hidden)] diff --git a/sdks/rust/tests/test-client/src/module_bindings/one_u_32_table.rs b/sdks/rust/tests/test-client/src/module_bindings/one_u_32_table.rs index 50b5818329e..348cefd8b6f 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/one_u_32_table.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/one_u_32_table.rs @@ -5,7 +5,7 @@ use super::one_u_32_type::OneU32; use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; -/// Table handle for the table `one_u32`. +/// Table handle for the table `one_u_32`. /// /// Obtain a handle from the [`OneU32TableAccess::one_u_32`] method on [`super::RemoteTables`], /// like `ctx.db.one_u_32()`. @@ -19,19 +19,19 @@ pub struct OneU32TableHandle<'ctx> { } #[allow(non_camel_case_types)] -/// Extension trait for access to the table `one_u32`. +/// Extension trait for access to the table `one_u_32`. /// /// Implemented for [`super::RemoteTables`]. pub trait OneU32TableAccess { #[allow(non_snake_case)] - /// Obtain a [`OneU32TableHandle`], which mediates access to the table `one_u32`. + /// Obtain a [`OneU32TableHandle`], which mediates access to the table `one_u_32`. fn one_u_32(&self) -> OneU32TableHandle<'_>; } impl OneU32TableAccess for super::RemoteTables { fn one_u_32(&self) -> OneU32TableHandle<'_> { OneU32TableHandle { - imp: self.imp.get_table::("one_u32"), + imp: self.imp.get_table::("one_u_32"), ctx: std::marker::PhantomData, } } @@ -80,7 +80,7 @@ impl<'ctx> __sdk::Table for OneU32TableHandle<'ctx> { #[doc(hidden)] pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { - let _table = client_cache.get_or_make_table::("one_u32"); + let _table = client_cache.get_or_make_table::("one_u_32"); } #[doc(hidden)] diff --git a/sdks/rust/tests/test-client/src/module_bindings/one_u_64_table.rs b/sdks/rust/tests/test-client/src/module_bindings/one_u_64_table.rs index b9c20b2beff..4b3cb387e2c 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/one_u_64_table.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/one_u_64_table.rs @@ -5,7 +5,7 @@ use super::one_u_64_type::OneU64; use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; -/// Table handle for the table `one_u64`. +/// Table handle for the table `one_u_64`. /// /// Obtain a handle from the [`OneU64TableAccess::one_u_64`] method on [`super::RemoteTables`], /// like `ctx.db.one_u_64()`. @@ -19,19 +19,19 @@ pub struct OneU64TableHandle<'ctx> { } #[allow(non_camel_case_types)] -/// Extension trait for access to the table `one_u64`. +/// Extension trait for access to the table `one_u_64`. /// /// Implemented for [`super::RemoteTables`]. pub trait OneU64TableAccess { #[allow(non_snake_case)] - /// Obtain a [`OneU64TableHandle`], which mediates access to the table `one_u64`. + /// Obtain a [`OneU64TableHandle`], which mediates access to the table `one_u_64`. fn one_u_64(&self) -> OneU64TableHandle<'_>; } impl OneU64TableAccess for super::RemoteTables { fn one_u_64(&self) -> OneU64TableHandle<'_> { OneU64TableHandle { - imp: self.imp.get_table::("one_u64"), + imp: self.imp.get_table::("one_u_64"), ctx: std::marker::PhantomData, } } @@ -80,7 +80,7 @@ impl<'ctx> __sdk::Table for OneU64TableHandle<'ctx> { #[doc(hidden)] pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { - let _table = client_cache.get_or_make_table::("one_u64"); + let _table = client_cache.get_or_make_table::("one_u_64"); } #[doc(hidden)] diff --git a/sdks/rust/tests/test-client/src/module_bindings/one_u_8_table.rs b/sdks/rust/tests/test-client/src/module_bindings/one_u_8_table.rs index a7c92f8022f..7b2f28f8d15 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/one_u_8_table.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/one_u_8_table.rs @@ -5,7 +5,7 @@ use super::one_u_8_type::OneU8; use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; -/// Table handle for the table `one_u8`. +/// Table handle for the table `one_u_8`. /// /// Obtain a handle from the [`OneU8TableAccess::one_u_8`] method on [`super::RemoteTables`], /// like `ctx.db.one_u_8()`. @@ -19,19 +19,19 @@ pub struct OneU8TableHandle<'ctx> { } #[allow(non_camel_case_types)] -/// Extension trait for access to the table `one_u8`. +/// Extension trait for access to the table `one_u_8`. /// /// Implemented for [`super::RemoteTables`]. pub trait OneU8TableAccess { #[allow(non_snake_case)] - /// Obtain a [`OneU8TableHandle`], which mediates access to the table `one_u8`. + /// Obtain a [`OneU8TableHandle`], which mediates access to the table `one_u_8`. fn one_u_8(&self) -> OneU8TableHandle<'_>; } impl OneU8TableAccess for super::RemoteTables { fn one_u_8(&self) -> OneU8TableHandle<'_> { OneU8TableHandle { - imp: self.imp.get_table::("one_u8"), + imp: self.imp.get_table::("one_u_8"), ctx: std::marker::PhantomData, } } @@ -80,7 +80,7 @@ impl<'ctx> __sdk::Table for OneU8TableHandle<'ctx> { #[doc(hidden)] pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { - let _table = client_cache.get_or_make_table::("one_u8"); + let _table = client_cache.get_or_make_table::("one_u_8"); } #[doc(hidden)] diff --git a/sdks/rust/tests/test-client/src/module_bindings/option_i_32_table.rs b/sdks/rust/tests/test-client/src/module_bindings/option_i_32_table.rs index e97e3199b9a..671fc75205e 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/option_i_32_table.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/option_i_32_table.rs @@ -5,7 +5,7 @@ use super::option_i_32_type::OptionI32; use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; -/// Table handle for the table `option_i32`. +/// Table handle for the table `option_i_32`. /// /// Obtain a handle from the [`OptionI32TableAccess::option_i_32`] method on [`super::RemoteTables`], /// like `ctx.db.option_i_32()`. @@ -19,19 +19,19 @@ pub struct OptionI32TableHandle<'ctx> { } #[allow(non_camel_case_types)] -/// Extension trait for access to the table `option_i32`. +/// Extension trait for access to the table `option_i_32`. /// /// Implemented for [`super::RemoteTables`]. pub trait OptionI32TableAccess { #[allow(non_snake_case)] - /// Obtain a [`OptionI32TableHandle`], which mediates access to the table `option_i32`. + /// Obtain a [`OptionI32TableHandle`], which mediates access to the table `option_i_32`. fn option_i_32(&self) -> OptionI32TableHandle<'_>; } impl OptionI32TableAccess for super::RemoteTables { fn option_i_32(&self) -> OptionI32TableHandle<'_> { OptionI32TableHandle { - imp: self.imp.get_table::("option_i32"), + imp: self.imp.get_table::("option_i_32"), ctx: std::marker::PhantomData, } } @@ -80,7 +80,7 @@ impl<'ctx> __sdk::Table for OptionI32TableHandle<'ctx> { #[doc(hidden)] pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { - let _table = client_cache.get_or_make_table::("option_i32"); + let _table = client_cache.get_or_make_table::("option_i_32"); } #[doc(hidden)] diff --git a/sdks/rust/tests/test-client/src/module_bindings/option_vec_option_i_32_table.rs b/sdks/rust/tests/test-client/src/module_bindings/option_vec_option_i_32_table.rs index cc62250a69a..c55d48271f6 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/option_vec_option_i_32_table.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/option_vec_option_i_32_table.rs @@ -5,7 +5,7 @@ use super::option_vec_option_i_32_type::OptionVecOptionI32; use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; -/// Table handle for the table `option_vec_option_i32`. +/// Table handle for the table `option_vec_option_i_32`. /// /// Obtain a handle from the [`OptionVecOptionI32TableAccess::option_vec_option_i_32`] method on [`super::RemoteTables`], /// like `ctx.db.option_vec_option_i_32()`. @@ -19,19 +19,19 @@ pub struct OptionVecOptionI32TableHandle<'ctx> { } #[allow(non_camel_case_types)] -/// Extension trait for access to the table `option_vec_option_i32`. +/// Extension trait for access to the table `option_vec_option_i_32`. /// /// Implemented for [`super::RemoteTables`]. pub trait OptionVecOptionI32TableAccess { #[allow(non_snake_case)] - /// Obtain a [`OptionVecOptionI32TableHandle`], which mediates access to the table `option_vec_option_i32`. + /// Obtain a [`OptionVecOptionI32TableHandle`], which mediates access to the table `option_vec_option_i_32`. fn option_vec_option_i_32(&self) -> OptionVecOptionI32TableHandle<'_>; } impl OptionVecOptionI32TableAccess for super::RemoteTables { fn option_vec_option_i_32(&self) -> OptionVecOptionI32TableHandle<'_> { OptionVecOptionI32TableHandle { - imp: self.imp.get_table::("option_vec_option_i32"), + imp: self.imp.get_table::("option_vec_option_i_32"), ctx: std::marker::PhantomData, } } @@ -80,7 +80,7 @@ impl<'ctx> __sdk::Table for OptionVecOptionI32TableHandle<'ctx> { #[doc(hidden)] pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { - let _table = client_cache.get_or_make_table::("option_vec_option_i32"); + let _table = client_cache.get_or_make_table::("option_vec_option_i_32"); } #[doc(hidden)] diff --git a/sdks/rust/tests/test-client/src/module_bindings/pk_i_128_table.rs b/sdks/rust/tests/test-client/src/module_bindings/pk_i_128_table.rs index 5025af971c3..0d1696e7795 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/pk_i_128_table.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/pk_i_128_table.rs @@ -5,7 +5,7 @@ use super::pk_i_128_type::PkI128; use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; -/// Table handle for the table `pk_i128`. +/// Table handle for the table `pk_i_128`. /// /// Obtain a handle from the [`PkI128TableAccess::pk_i_128`] method on [`super::RemoteTables`], /// like `ctx.db.pk_i_128()`. @@ -19,19 +19,19 @@ pub struct PkI128TableHandle<'ctx> { } #[allow(non_camel_case_types)] -/// Extension trait for access to the table `pk_i128`. +/// Extension trait for access to the table `pk_i_128`. /// /// Implemented for [`super::RemoteTables`]. pub trait PkI128TableAccess { #[allow(non_snake_case)] - /// Obtain a [`PkI128TableHandle`], which mediates access to the table `pk_i128`. + /// Obtain a [`PkI128TableHandle`], which mediates access to the table `pk_i_128`. fn pk_i_128(&self) -> PkI128TableHandle<'_>; } impl PkI128TableAccess for super::RemoteTables { fn pk_i_128(&self) -> PkI128TableHandle<'_> { PkI128TableHandle { - imp: self.imp.get_table::("pk_i128"), + imp: self.imp.get_table::("pk_i_128"), ctx: std::marker::PhantomData, } } @@ -95,7 +95,7 @@ impl<'ctx> __sdk::TableWithPrimaryKey for PkI128TableHandle<'ctx> { } } -/// Access to the `n` unique index on the table `pk_i128`, +/// Access to the `n` unique index on the table `pk_i_128`, /// which allows point queries on the field of the same name /// via the [`PkI128NUnique::find`] method. /// @@ -108,7 +108,7 @@ pub struct PkI128NUnique<'ctx> { } impl<'ctx> PkI128TableHandle<'ctx> { - /// Get a handle on the `n` unique index on the table `pk_i128`. + /// Get a handle on the `n` unique index on the table `pk_i_128`. pub fn n(&self) -> PkI128NUnique<'ctx> { PkI128NUnique { imp: self.imp.get_unique_constraint::("n"), @@ -127,7 +127,7 @@ impl<'ctx> PkI128NUnique<'ctx> { #[doc(hidden)] pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { - let _table = client_cache.get_or_make_table::("pk_i128"); + let _table = client_cache.get_or_make_table::("pk_i_128"); _table.add_unique_constraint::("n", |row| &row.n); } diff --git a/sdks/rust/tests/test-client/src/module_bindings/pk_i_16_table.rs b/sdks/rust/tests/test-client/src/module_bindings/pk_i_16_table.rs index b507d0ff7b3..682feb51714 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/pk_i_16_table.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/pk_i_16_table.rs @@ -5,7 +5,7 @@ use super::pk_i_16_type::PkI16; use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; -/// Table handle for the table `pk_i16`. +/// Table handle for the table `pk_i_16`. /// /// Obtain a handle from the [`PkI16TableAccess::pk_i_16`] method on [`super::RemoteTables`], /// like `ctx.db.pk_i_16()`. @@ -19,19 +19,19 @@ pub struct PkI16TableHandle<'ctx> { } #[allow(non_camel_case_types)] -/// Extension trait for access to the table `pk_i16`. +/// Extension trait for access to the table `pk_i_16`. /// /// Implemented for [`super::RemoteTables`]. pub trait PkI16TableAccess { #[allow(non_snake_case)] - /// Obtain a [`PkI16TableHandle`], which mediates access to the table `pk_i16`. + /// Obtain a [`PkI16TableHandle`], which mediates access to the table `pk_i_16`. fn pk_i_16(&self) -> PkI16TableHandle<'_>; } impl PkI16TableAccess for super::RemoteTables { fn pk_i_16(&self) -> PkI16TableHandle<'_> { PkI16TableHandle { - imp: self.imp.get_table::("pk_i16"), + imp: self.imp.get_table::("pk_i_16"), ctx: std::marker::PhantomData, } } @@ -95,7 +95,7 @@ impl<'ctx> __sdk::TableWithPrimaryKey for PkI16TableHandle<'ctx> { } } -/// Access to the `n` unique index on the table `pk_i16`, +/// Access to the `n` unique index on the table `pk_i_16`, /// which allows point queries on the field of the same name /// via the [`PkI16NUnique::find`] method. /// @@ -108,7 +108,7 @@ pub struct PkI16NUnique<'ctx> { } impl<'ctx> PkI16TableHandle<'ctx> { - /// Get a handle on the `n` unique index on the table `pk_i16`. + /// Get a handle on the `n` unique index on the table `pk_i_16`. pub fn n(&self) -> PkI16NUnique<'ctx> { PkI16NUnique { imp: self.imp.get_unique_constraint::("n"), @@ -127,7 +127,7 @@ impl<'ctx> PkI16NUnique<'ctx> { #[doc(hidden)] pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { - let _table = client_cache.get_or_make_table::("pk_i16"); + let _table = client_cache.get_or_make_table::("pk_i_16"); _table.add_unique_constraint::("n", |row| &row.n); } diff --git a/sdks/rust/tests/test-client/src/module_bindings/pk_i_256_table.rs b/sdks/rust/tests/test-client/src/module_bindings/pk_i_256_table.rs index 4e0d7ec4824..b6bac6e1e2a 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/pk_i_256_table.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/pk_i_256_table.rs @@ -5,7 +5,7 @@ use super::pk_i_256_type::PkI256; use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; -/// Table handle for the table `pk_i256`. +/// Table handle for the table `pk_i_256`. /// /// Obtain a handle from the [`PkI256TableAccess::pk_i_256`] method on [`super::RemoteTables`], /// like `ctx.db.pk_i_256()`. @@ -19,19 +19,19 @@ pub struct PkI256TableHandle<'ctx> { } #[allow(non_camel_case_types)] -/// Extension trait for access to the table `pk_i256`. +/// Extension trait for access to the table `pk_i_256`. /// /// Implemented for [`super::RemoteTables`]. pub trait PkI256TableAccess { #[allow(non_snake_case)] - /// Obtain a [`PkI256TableHandle`], which mediates access to the table `pk_i256`. + /// Obtain a [`PkI256TableHandle`], which mediates access to the table `pk_i_256`. fn pk_i_256(&self) -> PkI256TableHandle<'_>; } impl PkI256TableAccess for super::RemoteTables { fn pk_i_256(&self) -> PkI256TableHandle<'_> { PkI256TableHandle { - imp: self.imp.get_table::("pk_i256"), + imp: self.imp.get_table::("pk_i_256"), ctx: std::marker::PhantomData, } } @@ -95,7 +95,7 @@ impl<'ctx> __sdk::TableWithPrimaryKey for PkI256TableHandle<'ctx> { } } -/// Access to the `n` unique index on the table `pk_i256`, +/// Access to the `n` unique index on the table `pk_i_256`, /// which allows point queries on the field of the same name /// via the [`PkI256NUnique::find`] method. /// @@ -108,7 +108,7 @@ pub struct PkI256NUnique<'ctx> { } impl<'ctx> PkI256TableHandle<'ctx> { - /// Get a handle on the `n` unique index on the table `pk_i256`. + /// Get a handle on the `n` unique index on the table `pk_i_256`. pub fn n(&self) -> PkI256NUnique<'ctx> { PkI256NUnique { imp: self.imp.get_unique_constraint::<__sats::i256>("n"), @@ -127,7 +127,7 @@ impl<'ctx> PkI256NUnique<'ctx> { #[doc(hidden)] pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { - let _table = client_cache.get_or_make_table::("pk_i256"); + let _table = client_cache.get_or_make_table::("pk_i_256"); _table.add_unique_constraint::<__sats::i256>("n", |row| &row.n); } diff --git a/sdks/rust/tests/test-client/src/module_bindings/pk_i_32_table.rs b/sdks/rust/tests/test-client/src/module_bindings/pk_i_32_table.rs index 27306fc04f9..13096ebb7be 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/pk_i_32_table.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/pk_i_32_table.rs @@ -5,7 +5,7 @@ use super::pk_i_32_type::PkI32; use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; -/// Table handle for the table `pk_i32`. +/// Table handle for the table `pk_i_32`. /// /// Obtain a handle from the [`PkI32TableAccess::pk_i_32`] method on [`super::RemoteTables`], /// like `ctx.db.pk_i_32()`. @@ -19,19 +19,19 @@ pub struct PkI32TableHandle<'ctx> { } #[allow(non_camel_case_types)] -/// Extension trait for access to the table `pk_i32`. +/// Extension trait for access to the table `pk_i_32`. /// /// Implemented for [`super::RemoteTables`]. pub trait PkI32TableAccess { #[allow(non_snake_case)] - /// Obtain a [`PkI32TableHandle`], which mediates access to the table `pk_i32`. + /// Obtain a [`PkI32TableHandle`], which mediates access to the table `pk_i_32`. fn pk_i_32(&self) -> PkI32TableHandle<'_>; } impl PkI32TableAccess for super::RemoteTables { fn pk_i_32(&self) -> PkI32TableHandle<'_> { PkI32TableHandle { - imp: self.imp.get_table::("pk_i32"), + imp: self.imp.get_table::("pk_i_32"), ctx: std::marker::PhantomData, } } @@ -95,7 +95,7 @@ impl<'ctx> __sdk::TableWithPrimaryKey for PkI32TableHandle<'ctx> { } } -/// Access to the `n` unique index on the table `pk_i32`, +/// Access to the `n` unique index on the table `pk_i_32`, /// which allows point queries on the field of the same name /// via the [`PkI32NUnique::find`] method. /// @@ -108,7 +108,7 @@ pub struct PkI32NUnique<'ctx> { } impl<'ctx> PkI32TableHandle<'ctx> { - /// Get a handle on the `n` unique index on the table `pk_i32`. + /// Get a handle on the `n` unique index on the table `pk_i_32`. pub fn n(&self) -> PkI32NUnique<'ctx> { PkI32NUnique { imp: self.imp.get_unique_constraint::("n"), @@ -127,7 +127,7 @@ impl<'ctx> PkI32NUnique<'ctx> { #[doc(hidden)] pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { - let _table = client_cache.get_or_make_table::("pk_i32"); + let _table = client_cache.get_or_make_table::("pk_i_32"); _table.add_unique_constraint::("n", |row| &row.n); } diff --git a/sdks/rust/tests/test-client/src/module_bindings/pk_i_64_table.rs b/sdks/rust/tests/test-client/src/module_bindings/pk_i_64_table.rs index 9a674e8bb88..971a66c4301 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/pk_i_64_table.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/pk_i_64_table.rs @@ -5,7 +5,7 @@ use super::pk_i_64_type::PkI64; use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; -/// Table handle for the table `pk_i64`. +/// Table handle for the table `pk_i_64`. /// /// Obtain a handle from the [`PkI64TableAccess::pk_i_64`] method on [`super::RemoteTables`], /// like `ctx.db.pk_i_64()`. @@ -19,19 +19,19 @@ pub struct PkI64TableHandle<'ctx> { } #[allow(non_camel_case_types)] -/// Extension trait for access to the table `pk_i64`. +/// Extension trait for access to the table `pk_i_64`. /// /// Implemented for [`super::RemoteTables`]. pub trait PkI64TableAccess { #[allow(non_snake_case)] - /// Obtain a [`PkI64TableHandle`], which mediates access to the table `pk_i64`. + /// Obtain a [`PkI64TableHandle`], which mediates access to the table `pk_i_64`. fn pk_i_64(&self) -> PkI64TableHandle<'_>; } impl PkI64TableAccess for super::RemoteTables { fn pk_i_64(&self) -> PkI64TableHandle<'_> { PkI64TableHandle { - imp: self.imp.get_table::("pk_i64"), + imp: self.imp.get_table::("pk_i_64"), ctx: std::marker::PhantomData, } } @@ -95,7 +95,7 @@ impl<'ctx> __sdk::TableWithPrimaryKey for PkI64TableHandle<'ctx> { } } -/// Access to the `n` unique index on the table `pk_i64`, +/// Access to the `n` unique index on the table `pk_i_64`, /// which allows point queries on the field of the same name /// via the [`PkI64NUnique::find`] method. /// @@ -108,7 +108,7 @@ pub struct PkI64NUnique<'ctx> { } impl<'ctx> PkI64TableHandle<'ctx> { - /// Get a handle on the `n` unique index on the table `pk_i64`. + /// Get a handle on the `n` unique index on the table `pk_i_64`. pub fn n(&self) -> PkI64NUnique<'ctx> { PkI64NUnique { imp: self.imp.get_unique_constraint::("n"), @@ -127,7 +127,7 @@ impl<'ctx> PkI64NUnique<'ctx> { #[doc(hidden)] pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { - let _table = client_cache.get_or_make_table::("pk_i64"); + let _table = client_cache.get_or_make_table::("pk_i_64"); _table.add_unique_constraint::("n", |row| &row.n); } diff --git a/sdks/rust/tests/test-client/src/module_bindings/pk_i_8_table.rs b/sdks/rust/tests/test-client/src/module_bindings/pk_i_8_table.rs index 4579f0bc8fd..e00daec88d8 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/pk_i_8_table.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/pk_i_8_table.rs @@ -5,7 +5,7 @@ use super::pk_i_8_type::PkI8; use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; -/// Table handle for the table `pk_i8`. +/// Table handle for the table `pk_i_8`. /// /// Obtain a handle from the [`PkI8TableAccess::pk_i_8`] method on [`super::RemoteTables`], /// like `ctx.db.pk_i_8()`. @@ -19,19 +19,19 @@ pub struct PkI8TableHandle<'ctx> { } #[allow(non_camel_case_types)] -/// Extension trait for access to the table `pk_i8`. +/// Extension trait for access to the table `pk_i_8`. /// /// Implemented for [`super::RemoteTables`]. pub trait PkI8TableAccess { #[allow(non_snake_case)] - /// Obtain a [`PkI8TableHandle`], which mediates access to the table `pk_i8`. + /// Obtain a [`PkI8TableHandle`], which mediates access to the table `pk_i_8`. fn pk_i_8(&self) -> PkI8TableHandle<'_>; } impl PkI8TableAccess for super::RemoteTables { fn pk_i_8(&self) -> PkI8TableHandle<'_> { PkI8TableHandle { - imp: self.imp.get_table::("pk_i8"), + imp: self.imp.get_table::("pk_i_8"), ctx: std::marker::PhantomData, } } @@ -95,7 +95,7 @@ impl<'ctx> __sdk::TableWithPrimaryKey for PkI8TableHandle<'ctx> { } } -/// Access to the `n` unique index on the table `pk_i8`, +/// Access to the `n` unique index on the table `pk_i_8`, /// which allows point queries on the field of the same name /// via the [`PkI8NUnique::find`] method. /// @@ -108,7 +108,7 @@ pub struct PkI8NUnique<'ctx> { } impl<'ctx> PkI8TableHandle<'ctx> { - /// Get a handle on the `n` unique index on the table `pk_i8`. + /// Get a handle on the `n` unique index on the table `pk_i_8`. pub fn n(&self) -> PkI8NUnique<'ctx> { PkI8NUnique { imp: self.imp.get_unique_constraint::("n"), @@ -127,7 +127,7 @@ impl<'ctx> PkI8NUnique<'ctx> { #[doc(hidden)] pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { - let _table = client_cache.get_or_make_table::("pk_i8"); + let _table = client_cache.get_or_make_table::("pk_i_8"); _table.add_unique_constraint::("n", |row| &row.n); } diff --git a/sdks/rust/tests/test-client/src/module_bindings/pk_u_128_table.rs b/sdks/rust/tests/test-client/src/module_bindings/pk_u_128_table.rs index c7766e76617..129e74ffad0 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/pk_u_128_table.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/pk_u_128_table.rs @@ -5,7 +5,7 @@ use super::pk_u_128_type::PkU128; use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; -/// Table handle for the table `pk_u128`. +/// Table handle for the table `pk_u_128`. /// /// Obtain a handle from the [`PkU128TableAccess::pk_u_128`] method on [`super::RemoteTables`], /// like `ctx.db.pk_u_128()`. @@ -19,19 +19,19 @@ pub struct PkU128TableHandle<'ctx> { } #[allow(non_camel_case_types)] -/// Extension trait for access to the table `pk_u128`. +/// Extension trait for access to the table `pk_u_128`. /// /// Implemented for [`super::RemoteTables`]. pub trait PkU128TableAccess { #[allow(non_snake_case)] - /// Obtain a [`PkU128TableHandle`], which mediates access to the table `pk_u128`. + /// Obtain a [`PkU128TableHandle`], which mediates access to the table `pk_u_128`. fn pk_u_128(&self) -> PkU128TableHandle<'_>; } impl PkU128TableAccess for super::RemoteTables { fn pk_u_128(&self) -> PkU128TableHandle<'_> { PkU128TableHandle { - imp: self.imp.get_table::("pk_u128"), + imp: self.imp.get_table::("pk_u_128"), ctx: std::marker::PhantomData, } } @@ -95,7 +95,7 @@ impl<'ctx> __sdk::TableWithPrimaryKey for PkU128TableHandle<'ctx> { } } -/// Access to the `n` unique index on the table `pk_u128`, +/// Access to the `n` unique index on the table `pk_u_128`, /// which allows point queries on the field of the same name /// via the [`PkU128NUnique::find`] method. /// @@ -108,7 +108,7 @@ pub struct PkU128NUnique<'ctx> { } impl<'ctx> PkU128TableHandle<'ctx> { - /// Get a handle on the `n` unique index on the table `pk_u128`. + /// Get a handle on the `n` unique index on the table `pk_u_128`. pub fn n(&self) -> PkU128NUnique<'ctx> { PkU128NUnique { imp: self.imp.get_unique_constraint::("n"), @@ -127,7 +127,7 @@ impl<'ctx> PkU128NUnique<'ctx> { #[doc(hidden)] pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { - let _table = client_cache.get_or_make_table::("pk_u128"); + let _table = client_cache.get_or_make_table::("pk_u_128"); _table.add_unique_constraint::("n", |row| &row.n); } diff --git a/sdks/rust/tests/test-client/src/module_bindings/pk_u_16_table.rs b/sdks/rust/tests/test-client/src/module_bindings/pk_u_16_table.rs index 7763dbbb916..03181f582db 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/pk_u_16_table.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/pk_u_16_table.rs @@ -5,7 +5,7 @@ use super::pk_u_16_type::PkU16; use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; -/// Table handle for the table `pk_u16`. +/// Table handle for the table `pk_u_16`. /// /// Obtain a handle from the [`PkU16TableAccess::pk_u_16`] method on [`super::RemoteTables`], /// like `ctx.db.pk_u_16()`. @@ -19,19 +19,19 @@ pub struct PkU16TableHandle<'ctx> { } #[allow(non_camel_case_types)] -/// Extension trait for access to the table `pk_u16`. +/// Extension trait for access to the table `pk_u_16`. /// /// Implemented for [`super::RemoteTables`]. pub trait PkU16TableAccess { #[allow(non_snake_case)] - /// Obtain a [`PkU16TableHandle`], which mediates access to the table `pk_u16`. + /// Obtain a [`PkU16TableHandle`], which mediates access to the table `pk_u_16`. fn pk_u_16(&self) -> PkU16TableHandle<'_>; } impl PkU16TableAccess for super::RemoteTables { fn pk_u_16(&self) -> PkU16TableHandle<'_> { PkU16TableHandle { - imp: self.imp.get_table::("pk_u16"), + imp: self.imp.get_table::("pk_u_16"), ctx: std::marker::PhantomData, } } @@ -95,7 +95,7 @@ impl<'ctx> __sdk::TableWithPrimaryKey for PkU16TableHandle<'ctx> { } } -/// Access to the `n` unique index on the table `pk_u16`, +/// Access to the `n` unique index on the table `pk_u_16`, /// which allows point queries on the field of the same name /// via the [`PkU16NUnique::find`] method. /// @@ -108,7 +108,7 @@ pub struct PkU16NUnique<'ctx> { } impl<'ctx> PkU16TableHandle<'ctx> { - /// Get a handle on the `n` unique index on the table `pk_u16`. + /// Get a handle on the `n` unique index on the table `pk_u_16`. pub fn n(&self) -> PkU16NUnique<'ctx> { PkU16NUnique { imp: self.imp.get_unique_constraint::("n"), @@ -127,7 +127,7 @@ impl<'ctx> PkU16NUnique<'ctx> { #[doc(hidden)] pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { - let _table = client_cache.get_or_make_table::("pk_u16"); + let _table = client_cache.get_or_make_table::("pk_u_16"); _table.add_unique_constraint::("n", |row| &row.n); } diff --git a/sdks/rust/tests/test-client/src/module_bindings/pk_u_256_table.rs b/sdks/rust/tests/test-client/src/module_bindings/pk_u_256_table.rs index a32aea3b472..659bb9a62ba 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/pk_u_256_table.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/pk_u_256_table.rs @@ -5,7 +5,7 @@ use super::pk_u_256_type::PkU256; use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; -/// Table handle for the table `pk_u256`. +/// Table handle for the table `pk_u_256`. /// /// Obtain a handle from the [`PkU256TableAccess::pk_u_256`] method on [`super::RemoteTables`], /// like `ctx.db.pk_u_256()`. @@ -19,19 +19,19 @@ pub struct PkU256TableHandle<'ctx> { } #[allow(non_camel_case_types)] -/// Extension trait for access to the table `pk_u256`. +/// Extension trait for access to the table `pk_u_256`. /// /// Implemented for [`super::RemoteTables`]. pub trait PkU256TableAccess { #[allow(non_snake_case)] - /// Obtain a [`PkU256TableHandle`], which mediates access to the table `pk_u256`. + /// Obtain a [`PkU256TableHandle`], which mediates access to the table `pk_u_256`. fn pk_u_256(&self) -> PkU256TableHandle<'_>; } impl PkU256TableAccess for super::RemoteTables { fn pk_u_256(&self) -> PkU256TableHandle<'_> { PkU256TableHandle { - imp: self.imp.get_table::("pk_u256"), + imp: self.imp.get_table::("pk_u_256"), ctx: std::marker::PhantomData, } } @@ -95,7 +95,7 @@ impl<'ctx> __sdk::TableWithPrimaryKey for PkU256TableHandle<'ctx> { } } -/// Access to the `n` unique index on the table `pk_u256`, +/// Access to the `n` unique index on the table `pk_u_256`, /// which allows point queries on the field of the same name /// via the [`PkU256NUnique::find`] method. /// @@ -108,7 +108,7 @@ pub struct PkU256NUnique<'ctx> { } impl<'ctx> PkU256TableHandle<'ctx> { - /// Get a handle on the `n` unique index on the table `pk_u256`. + /// Get a handle on the `n` unique index on the table `pk_u_256`. pub fn n(&self) -> PkU256NUnique<'ctx> { PkU256NUnique { imp: self.imp.get_unique_constraint::<__sats::u256>("n"), @@ -127,7 +127,7 @@ impl<'ctx> PkU256NUnique<'ctx> { #[doc(hidden)] pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { - let _table = client_cache.get_or_make_table::("pk_u256"); + let _table = client_cache.get_or_make_table::("pk_u_256"); _table.add_unique_constraint::<__sats::u256>("n", |row| &row.n); } diff --git a/sdks/rust/tests/test-client/src/module_bindings/pk_u_32_table.rs b/sdks/rust/tests/test-client/src/module_bindings/pk_u_32_table.rs index aa50934a320..fd9b28b8211 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/pk_u_32_table.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/pk_u_32_table.rs @@ -5,7 +5,7 @@ use super::pk_u_32_type::PkU32; use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; -/// Table handle for the table `pk_u32`. +/// Table handle for the table `pk_u_32`. /// /// Obtain a handle from the [`PkU32TableAccess::pk_u_32`] method on [`super::RemoteTables`], /// like `ctx.db.pk_u_32()`. @@ -19,19 +19,19 @@ pub struct PkU32TableHandle<'ctx> { } #[allow(non_camel_case_types)] -/// Extension trait for access to the table `pk_u32`. +/// Extension trait for access to the table `pk_u_32`. /// /// Implemented for [`super::RemoteTables`]. pub trait PkU32TableAccess { #[allow(non_snake_case)] - /// Obtain a [`PkU32TableHandle`], which mediates access to the table `pk_u32`. + /// Obtain a [`PkU32TableHandle`], which mediates access to the table `pk_u_32`. fn pk_u_32(&self) -> PkU32TableHandle<'_>; } impl PkU32TableAccess for super::RemoteTables { fn pk_u_32(&self) -> PkU32TableHandle<'_> { PkU32TableHandle { - imp: self.imp.get_table::("pk_u32"), + imp: self.imp.get_table::("pk_u_32"), ctx: std::marker::PhantomData, } } @@ -95,7 +95,7 @@ impl<'ctx> __sdk::TableWithPrimaryKey for PkU32TableHandle<'ctx> { } } -/// Access to the `n` unique index on the table `pk_u32`, +/// Access to the `n` unique index on the table `pk_u_32`, /// which allows point queries on the field of the same name /// via the [`PkU32NUnique::find`] method. /// @@ -108,7 +108,7 @@ pub struct PkU32NUnique<'ctx> { } impl<'ctx> PkU32TableHandle<'ctx> { - /// Get a handle on the `n` unique index on the table `pk_u32`. + /// Get a handle on the `n` unique index on the table `pk_u_32`. pub fn n(&self) -> PkU32NUnique<'ctx> { PkU32NUnique { imp: self.imp.get_unique_constraint::("n"), @@ -127,7 +127,7 @@ impl<'ctx> PkU32NUnique<'ctx> { #[doc(hidden)] pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { - let _table = client_cache.get_or_make_table::("pk_u32"); + let _table = client_cache.get_or_make_table::("pk_u_32"); _table.add_unique_constraint::("n", |row| &row.n); } diff --git a/sdks/rust/tests/test-client/src/module_bindings/pk_u_32_two_table.rs b/sdks/rust/tests/test-client/src/module_bindings/pk_u_32_two_table.rs index b44e33cd400..17582367575 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/pk_u_32_two_table.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/pk_u_32_two_table.rs @@ -5,7 +5,7 @@ use super::pk_u_32_two_type::PkU32Two; use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; -/// Table handle for the table `pk_u32_two`. +/// Table handle for the table `pk_u_32_two`. /// /// Obtain a handle from the [`PkU32TwoTableAccess::pk_u_32_two`] method on [`super::RemoteTables`], /// like `ctx.db.pk_u_32_two()`. @@ -19,19 +19,19 @@ pub struct PkU32TwoTableHandle<'ctx> { } #[allow(non_camel_case_types)] -/// Extension trait for access to the table `pk_u32_two`. +/// Extension trait for access to the table `pk_u_32_two`. /// /// Implemented for [`super::RemoteTables`]. pub trait PkU32TwoTableAccess { #[allow(non_snake_case)] - /// Obtain a [`PkU32TwoTableHandle`], which mediates access to the table `pk_u32_two`. + /// Obtain a [`PkU32TwoTableHandle`], which mediates access to the table `pk_u_32_two`. fn pk_u_32_two(&self) -> PkU32TwoTableHandle<'_>; } impl PkU32TwoTableAccess for super::RemoteTables { fn pk_u_32_two(&self) -> PkU32TwoTableHandle<'_> { PkU32TwoTableHandle { - imp: self.imp.get_table::("pk_u32_two"), + imp: self.imp.get_table::("pk_u_32_two"), ctx: std::marker::PhantomData, } } @@ -95,7 +95,7 @@ impl<'ctx> __sdk::TableWithPrimaryKey for PkU32TwoTableHandle<'ctx> { } } -/// Access to the `n` unique index on the table `pk_u32_two`, +/// Access to the `n` unique index on the table `pk_u_32_two`, /// which allows point queries on the field of the same name /// via the [`PkU32TwoNUnique::find`] method. /// @@ -108,7 +108,7 @@ pub struct PkU32TwoNUnique<'ctx> { } impl<'ctx> PkU32TwoTableHandle<'ctx> { - /// Get a handle on the `n` unique index on the table `pk_u32_two`. + /// Get a handle on the `n` unique index on the table `pk_u_32_two`. pub fn n(&self) -> PkU32TwoNUnique<'ctx> { PkU32TwoNUnique { imp: self.imp.get_unique_constraint::("n"), @@ -127,7 +127,7 @@ impl<'ctx> PkU32TwoNUnique<'ctx> { #[doc(hidden)] pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { - let _table = client_cache.get_or_make_table::("pk_u32_two"); + let _table = client_cache.get_or_make_table::("pk_u_32_two"); _table.add_unique_constraint::("n", |row| &row.n); } diff --git a/sdks/rust/tests/test-client/src/module_bindings/pk_u_64_table.rs b/sdks/rust/tests/test-client/src/module_bindings/pk_u_64_table.rs index cd00b4d151e..808d837bd1a 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/pk_u_64_table.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/pk_u_64_table.rs @@ -5,7 +5,7 @@ use super::pk_u_64_type::PkU64; use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; -/// Table handle for the table `pk_u64`. +/// Table handle for the table `pk_u_64`. /// /// Obtain a handle from the [`PkU64TableAccess::pk_u_64`] method on [`super::RemoteTables`], /// like `ctx.db.pk_u_64()`. @@ -19,19 +19,19 @@ pub struct PkU64TableHandle<'ctx> { } #[allow(non_camel_case_types)] -/// Extension trait for access to the table `pk_u64`. +/// Extension trait for access to the table `pk_u_64`. /// /// Implemented for [`super::RemoteTables`]. pub trait PkU64TableAccess { #[allow(non_snake_case)] - /// Obtain a [`PkU64TableHandle`], which mediates access to the table `pk_u64`. + /// Obtain a [`PkU64TableHandle`], which mediates access to the table `pk_u_64`. fn pk_u_64(&self) -> PkU64TableHandle<'_>; } impl PkU64TableAccess for super::RemoteTables { fn pk_u_64(&self) -> PkU64TableHandle<'_> { PkU64TableHandle { - imp: self.imp.get_table::("pk_u64"), + imp: self.imp.get_table::("pk_u_64"), ctx: std::marker::PhantomData, } } @@ -95,7 +95,7 @@ impl<'ctx> __sdk::TableWithPrimaryKey for PkU64TableHandle<'ctx> { } } -/// Access to the `n` unique index on the table `pk_u64`, +/// Access to the `n` unique index on the table `pk_u_64`, /// which allows point queries on the field of the same name /// via the [`PkU64NUnique::find`] method. /// @@ -108,7 +108,7 @@ pub struct PkU64NUnique<'ctx> { } impl<'ctx> PkU64TableHandle<'ctx> { - /// Get a handle on the `n` unique index on the table `pk_u64`. + /// Get a handle on the `n` unique index on the table `pk_u_64`. pub fn n(&self) -> PkU64NUnique<'ctx> { PkU64NUnique { imp: self.imp.get_unique_constraint::("n"), @@ -127,7 +127,7 @@ impl<'ctx> PkU64NUnique<'ctx> { #[doc(hidden)] pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { - let _table = client_cache.get_or_make_table::("pk_u64"); + let _table = client_cache.get_or_make_table::("pk_u_64"); _table.add_unique_constraint::("n", |row| &row.n); } diff --git a/sdks/rust/tests/test-client/src/module_bindings/pk_u_8_table.rs b/sdks/rust/tests/test-client/src/module_bindings/pk_u_8_table.rs index 183685f62c9..76ef082f845 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/pk_u_8_table.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/pk_u_8_table.rs @@ -5,7 +5,7 @@ use super::pk_u_8_type::PkU8; use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; -/// Table handle for the table `pk_u8`. +/// Table handle for the table `pk_u_8`. /// /// Obtain a handle from the [`PkU8TableAccess::pk_u_8`] method on [`super::RemoteTables`], /// like `ctx.db.pk_u_8()`. @@ -19,19 +19,19 @@ pub struct PkU8TableHandle<'ctx> { } #[allow(non_camel_case_types)] -/// Extension trait for access to the table `pk_u8`. +/// Extension trait for access to the table `pk_u_8`. /// /// Implemented for [`super::RemoteTables`]. pub trait PkU8TableAccess { #[allow(non_snake_case)] - /// Obtain a [`PkU8TableHandle`], which mediates access to the table `pk_u8`. + /// Obtain a [`PkU8TableHandle`], which mediates access to the table `pk_u_8`. fn pk_u_8(&self) -> PkU8TableHandle<'_>; } impl PkU8TableAccess for super::RemoteTables { fn pk_u_8(&self) -> PkU8TableHandle<'_> { PkU8TableHandle { - imp: self.imp.get_table::("pk_u8"), + imp: self.imp.get_table::("pk_u_8"), ctx: std::marker::PhantomData, } } @@ -95,7 +95,7 @@ impl<'ctx> __sdk::TableWithPrimaryKey for PkU8TableHandle<'ctx> { } } -/// Access to the `n` unique index on the table `pk_u8`, +/// Access to the `n` unique index on the table `pk_u_8`, /// which allows point queries on the field of the same name /// via the [`PkU8NUnique::find`] method. /// @@ -108,7 +108,7 @@ pub struct PkU8NUnique<'ctx> { } impl<'ctx> PkU8TableHandle<'ctx> { - /// Get a handle on the `n` unique index on the table `pk_u8`. + /// Get a handle on the `n` unique index on the table `pk_u_8`. pub fn n(&self) -> PkU8NUnique<'ctx> { PkU8NUnique { imp: self.imp.get_unique_constraint::("n"), @@ -127,7 +127,7 @@ impl<'ctx> PkU8NUnique<'ctx> { #[doc(hidden)] pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { - let _table = client_cache.get_or_make_table::("pk_u8"); + let _table = client_cache.get_or_make_table::("pk_u_8"); _table.add_unique_constraint::("n", |row| &row.n); } diff --git a/sdks/rust/tests/test-client/src/module_bindings/result_i_32_string_table.rs b/sdks/rust/tests/test-client/src/module_bindings/result_i_32_string_table.rs index 41980e3867f..1d0af8074a5 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/result_i_32_string_table.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/result_i_32_string_table.rs @@ -5,7 +5,7 @@ use super::result_i_32_string_type::ResultI32String; use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; -/// Table handle for the table `result_i32_string`. +/// Table handle for the table `result_i_32_string`. /// /// Obtain a handle from the [`ResultI32StringTableAccess::result_i_32_string`] method on [`super::RemoteTables`], /// like `ctx.db.result_i_32_string()`. @@ -19,19 +19,19 @@ pub struct ResultI32StringTableHandle<'ctx> { } #[allow(non_camel_case_types)] -/// Extension trait for access to the table `result_i32_string`. +/// Extension trait for access to the table `result_i_32_string`. /// /// Implemented for [`super::RemoteTables`]. pub trait ResultI32StringTableAccess { #[allow(non_snake_case)] - /// Obtain a [`ResultI32StringTableHandle`], which mediates access to the table `result_i32_string`. + /// Obtain a [`ResultI32StringTableHandle`], which mediates access to the table `result_i_32_string`. fn result_i_32_string(&self) -> ResultI32StringTableHandle<'_>; } impl ResultI32StringTableAccess for super::RemoteTables { fn result_i_32_string(&self) -> ResultI32StringTableHandle<'_> { ResultI32StringTableHandle { - imp: self.imp.get_table::("result_i32_string"), + imp: self.imp.get_table::("result_i_32_string"), ctx: std::marker::PhantomData, } } @@ -80,7 +80,7 @@ impl<'ctx> __sdk::Table for ResultI32StringTableHandle<'ctx> { #[doc(hidden)] pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { - let _table = client_cache.get_or_make_table::("result_i32_string"); + let _table = client_cache.get_or_make_table::("result_i_32_string"); } #[doc(hidden)] diff --git a/sdks/rust/tests/test-client/src/module_bindings/result_simple_enum_i_32_table.rs b/sdks/rust/tests/test-client/src/module_bindings/result_simple_enum_i_32_table.rs index cacf4b956b7..539ecbc1143 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/result_simple_enum_i_32_table.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/result_simple_enum_i_32_table.rs @@ -6,7 +6,7 @@ use super::result_simple_enum_i_32_type::ResultSimpleEnumI32; use super::simple_enum_type::SimpleEnum; use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; -/// Table handle for the table `result_simple_enum_i32`. +/// Table handle for the table `result_simple_enum_i_32`. /// /// Obtain a handle from the [`ResultSimpleEnumI32TableAccess::result_simple_enum_i_32`] method on [`super::RemoteTables`], /// like `ctx.db.result_simple_enum_i_32()`. @@ -20,19 +20,19 @@ pub struct ResultSimpleEnumI32TableHandle<'ctx> { } #[allow(non_camel_case_types)] -/// Extension trait for access to the table `result_simple_enum_i32`. +/// Extension trait for access to the table `result_simple_enum_i_32`. /// /// Implemented for [`super::RemoteTables`]. pub trait ResultSimpleEnumI32TableAccess { #[allow(non_snake_case)] - /// Obtain a [`ResultSimpleEnumI32TableHandle`], which mediates access to the table `result_simple_enum_i32`. + /// Obtain a [`ResultSimpleEnumI32TableHandle`], which mediates access to the table `result_simple_enum_i_32`. fn result_simple_enum_i_32(&self) -> ResultSimpleEnumI32TableHandle<'_>; } impl ResultSimpleEnumI32TableAccess for super::RemoteTables { fn result_simple_enum_i_32(&self) -> ResultSimpleEnumI32TableHandle<'_> { ResultSimpleEnumI32TableHandle { - imp: self.imp.get_table::("result_simple_enum_i32"), + imp: self.imp.get_table::("result_simple_enum_i_32"), ctx: std::marker::PhantomData, } } @@ -81,7 +81,7 @@ impl<'ctx> __sdk::Table for ResultSimpleEnumI32TableHandle<'ctx> { #[doc(hidden)] pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { - let _table = client_cache.get_or_make_table::("result_simple_enum_i32"); + let _table = client_cache.get_or_make_table::("result_simple_enum_i_32"); } #[doc(hidden)] diff --git a/sdks/rust/tests/test-client/src/module_bindings/result_string_i_32_table.rs b/sdks/rust/tests/test-client/src/module_bindings/result_string_i_32_table.rs index 91a61a7cba8..a89a5748c67 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/result_string_i_32_table.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/result_string_i_32_table.rs @@ -5,7 +5,7 @@ use super::result_string_i_32_type::ResultStringI32; use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; -/// Table handle for the table `result_string_i32`. +/// Table handle for the table `result_string_i_32`. /// /// Obtain a handle from the [`ResultStringI32TableAccess::result_string_i_32`] method on [`super::RemoteTables`], /// like `ctx.db.result_string_i_32()`. @@ -19,19 +19,19 @@ pub struct ResultStringI32TableHandle<'ctx> { } #[allow(non_camel_case_types)] -/// Extension trait for access to the table `result_string_i32`. +/// Extension trait for access to the table `result_string_i_32`. /// /// Implemented for [`super::RemoteTables`]. pub trait ResultStringI32TableAccess { #[allow(non_snake_case)] - /// Obtain a [`ResultStringI32TableHandle`], which mediates access to the table `result_string_i32`. + /// Obtain a [`ResultStringI32TableHandle`], which mediates access to the table `result_string_i_32`. fn result_string_i_32(&self) -> ResultStringI32TableHandle<'_>; } impl ResultStringI32TableAccess for super::RemoteTables { fn result_string_i_32(&self) -> ResultStringI32TableHandle<'_> { ResultStringI32TableHandle { - imp: self.imp.get_table::("result_string_i32"), + imp: self.imp.get_table::("result_string_i_32"), ctx: std::marker::PhantomData, } } @@ -80,7 +80,7 @@ impl<'ctx> __sdk::Table for ResultStringI32TableHandle<'ctx> { #[doc(hidden)] pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { - let _table = client_cache.get_or_make_table::("result_string_i32"); + let _table = client_cache.get_or_make_table::("result_string_i_32"); } #[doc(hidden)] diff --git a/sdks/rust/tests/test-client/src/module_bindings/result_vec_i_32_string_table.rs b/sdks/rust/tests/test-client/src/module_bindings/result_vec_i_32_string_table.rs index b30878dbf64..947a9959da4 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/result_vec_i_32_string_table.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/result_vec_i_32_string_table.rs @@ -5,7 +5,7 @@ use super::result_vec_i_32_string_type::ResultVecI32String; use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; -/// Table handle for the table `result_vec_i32_string`. +/// Table handle for the table `result_vec_i_32_string`. /// /// Obtain a handle from the [`ResultVecI32StringTableAccess::result_vec_i_32_string`] method on [`super::RemoteTables`], /// like `ctx.db.result_vec_i_32_string()`. @@ -19,19 +19,19 @@ pub struct ResultVecI32StringTableHandle<'ctx> { } #[allow(non_camel_case_types)] -/// Extension trait for access to the table `result_vec_i32_string`. +/// Extension trait for access to the table `result_vec_i_32_string`. /// /// Implemented for [`super::RemoteTables`]. pub trait ResultVecI32StringTableAccess { #[allow(non_snake_case)] - /// Obtain a [`ResultVecI32StringTableHandle`], which mediates access to the table `result_vec_i32_string`. + /// Obtain a [`ResultVecI32StringTableHandle`], which mediates access to the table `result_vec_i_32_string`. fn result_vec_i_32_string(&self) -> ResultVecI32StringTableHandle<'_>; } impl ResultVecI32StringTableAccess for super::RemoteTables { fn result_vec_i_32_string(&self) -> ResultVecI32StringTableHandle<'_> { ResultVecI32StringTableHandle { - imp: self.imp.get_table::("result_vec_i32_string"), + imp: self.imp.get_table::("result_vec_i_32_string"), ctx: std::marker::PhantomData, } } @@ -80,7 +80,7 @@ impl<'ctx> __sdk::Table for ResultVecI32StringTableHandle<'ctx> { #[doc(hidden)] pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { - let _table = client_cache.get_or_make_table::("result_vec_i32_string"); + let _table = client_cache.get_or_make_table::("result_vec_i_32_string"); } #[doc(hidden)] diff --git a/sdks/rust/tests/test-client/src/module_bindings/scheduled_table_table.rs b/sdks/rust/tests/test-client/src/module_bindings/scheduled_table_table.rs index 873aed85c1c..931e106b2b4 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/scheduled_table_table.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/scheduled_table_table.rs @@ -146,14 +146,14 @@ pub(super) fn parse_table_update( /// Extension trait for query builder access to the table `ScheduledTable`. /// /// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait scheduled_tableQueryTableAccess { +pub trait scheduledTableQueryTableAccess { #[allow(non_snake_case)] /// Get a query builder for the table `ScheduledTable`. - fn scheduled_table(&self) -> __sdk::__query_builder::Table; + fn scheduledTable(&self) -> __sdk::__query_builder::Table; } -impl scheduled_tableQueryTableAccess for __sdk::QueryTableAccessor { - fn scheduled_table(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("scheduled_table") +impl scheduledTableQueryTableAccess for __sdk::QueryTableAccessor { + fn scheduledTable(&self) -> __sdk::__query_builder::Table { + __sdk::__query_builder::Table::new("scheduledTable") } } diff --git a/sdks/rust/tests/test-client/src/module_bindings/send_scheduled_message_type.rs b/sdks/rust/tests/test-client/src/module_bindings/send_scheduled_message_type.rs new file mode 100644 index 00000000000..9a9b584f980 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/send_scheduled_message_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +use super::scheduled_table_type::ScheduledTable; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct SendScheduledMessage { + pub arg: ScheduledTable, +} + +impl __sdk::InModule for SendScheduledMessage { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/sorted_uuids_insert_type.rs b/sdks/rust/tests/test-client/src/module_bindings/sorted_uuids_insert_type.rs new file mode 100644 index 00000000000..f0fb06ace58 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/sorted_uuids_insert_type.rs @@ -0,0 +1,13 @@ +// 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, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct SortedUuidsInsert {} + +impl __sdk::InModule for SortedUuidsInsert { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/unique_i_128_table.rs b/sdks/rust/tests/test-client/src/module_bindings/unique_i_128_table.rs index 7ad9e27176f..d522e7ca130 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/unique_i_128_table.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/unique_i_128_table.rs @@ -5,7 +5,7 @@ use super::unique_i_128_type::UniqueI128; use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; -/// Table handle for the table `unique_i128`. +/// Table handle for the table `unique_i_128`. /// /// Obtain a handle from the [`UniqueI128TableAccess::unique_i_128`] method on [`super::RemoteTables`], /// like `ctx.db.unique_i_128()`. @@ -19,19 +19,19 @@ pub struct UniqueI128TableHandle<'ctx> { } #[allow(non_camel_case_types)] -/// Extension trait for access to the table `unique_i128`. +/// Extension trait for access to the table `unique_i_128`. /// /// Implemented for [`super::RemoteTables`]. pub trait UniqueI128TableAccess { #[allow(non_snake_case)] - /// Obtain a [`UniqueI128TableHandle`], which mediates access to the table `unique_i128`. + /// Obtain a [`UniqueI128TableHandle`], which mediates access to the table `unique_i_128`. fn unique_i_128(&self) -> UniqueI128TableHandle<'_>; } impl UniqueI128TableAccess for super::RemoteTables { fn unique_i_128(&self) -> UniqueI128TableHandle<'_> { UniqueI128TableHandle { - imp: self.imp.get_table::("unique_i128"), + imp: self.imp.get_table::("unique_i_128"), ctx: std::marker::PhantomData, } } @@ -78,7 +78,7 @@ impl<'ctx> __sdk::Table for UniqueI128TableHandle<'ctx> { } } -/// Access to the `n` unique index on the table `unique_i128`, +/// Access to the `n` unique index on the table `unique_i_128`, /// which allows point queries on the field of the same name /// via the [`UniqueI128NUnique::find`] method. /// @@ -91,7 +91,7 @@ pub struct UniqueI128NUnique<'ctx> { } impl<'ctx> UniqueI128TableHandle<'ctx> { - /// Get a handle on the `n` unique index on the table `unique_i128`. + /// Get a handle on the `n` unique index on the table `unique_i_128`. pub fn n(&self) -> UniqueI128NUnique<'ctx> { UniqueI128NUnique { imp: self.imp.get_unique_constraint::("n"), @@ -110,7 +110,7 @@ impl<'ctx> UniqueI128NUnique<'ctx> { #[doc(hidden)] pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { - let _table = client_cache.get_or_make_table::("unique_i128"); + let _table = client_cache.get_or_make_table::("unique_i_128"); _table.add_unique_constraint::("n", |row| &row.n); } diff --git a/sdks/rust/tests/test-client/src/module_bindings/unique_i_16_table.rs b/sdks/rust/tests/test-client/src/module_bindings/unique_i_16_table.rs index a7245d954f3..dfe5bd98dfd 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/unique_i_16_table.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/unique_i_16_table.rs @@ -5,7 +5,7 @@ use super::unique_i_16_type::UniqueI16; use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; -/// Table handle for the table `unique_i16`. +/// Table handle for the table `unique_i_16`. /// /// Obtain a handle from the [`UniqueI16TableAccess::unique_i_16`] method on [`super::RemoteTables`], /// like `ctx.db.unique_i_16()`. @@ -19,19 +19,19 @@ pub struct UniqueI16TableHandle<'ctx> { } #[allow(non_camel_case_types)] -/// Extension trait for access to the table `unique_i16`. +/// Extension trait for access to the table `unique_i_16`. /// /// Implemented for [`super::RemoteTables`]. pub trait UniqueI16TableAccess { #[allow(non_snake_case)] - /// Obtain a [`UniqueI16TableHandle`], which mediates access to the table `unique_i16`. + /// Obtain a [`UniqueI16TableHandle`], which mediates access to the table `unique_i_16`. fn unique_i_16(&self) -> UniqueI16TableHandle<'_>; } impl UniqueI16TableAccess for super::RemoteTables { fn unique_i_16(&self) -> UniqueI16TableHandle<'_> { UniqueI16TableHandle { - imp: self.imp.get_table::("unique_i16"), + imp: self.imp.get_table::("unique_i_16"), ctx: std::marker::PhantomData, } } @@ -78,7 +78,7 @@ impl<'ctx> __sdk::Table for UniqueI16TableHandle<'ctx> { } } -/// Access to the `n` unique index on the table `unique_i16`, +/// Access to the `n` unique index on the table `unique_i_16`, /// which allows point queries on the field of the same name /// via the [`UniqueI16NUnique::find`] method. /// @@ -91,7 +91,7 @@ pub struct UniqueI16NUnique<'ctx> { } impl<'ctx> UniqueI16TableHandle<'ctx> { - /// Get a handle on the `n` unique index on the table `unique_i16`. + /// Get a handle on the `n` unique index on the table `unique_i_16`. pub fn n(&self) -> UniqueI16NUnique<'ctx> { UniqueI16NUnique { imp: self.imp.get_unique_constraint::("n"), @@ -110,7 +110,7 @@ impl<'ctx> UniqueI16NUnique<'ctx> { #[doc(hidden)] pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { - let _table = client_cache.get_or_make_table::("unique_i16"); + let _table = client_cache.get_or_make_table::("unique_i_16"); _table.add_unique_constraint::("n", |row| &row.n); } diff --git a/sdks/rust/tests/test-client/src/module_bindings/unique_i_256_table.rs b/sdks/rust/tests/test-client/src/module_bindings/unique_i_256_table.rs index 03cb0811a6e..086f7dcc815 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/unique_i_256_table.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/unique_i_256_table.rs @@ -5,7 +5,7 @@ use super::unique_i_256_type::UniqueI256; use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; -/// Table handle for the table `unique_i256`. +/// Table handle for the table `unique_i_256`. /// /// Obtain a handle from the [`UniqueI256TableAccess::unique_i_256`] method on [`super::RemoteTables`], /// like `ctx.db.unique_i_256()`. @@ -19,19 +19,19 @@ pub struct UniqueI256TableHandle<'ctx> { } #[allow(non_camel_case_types)] -/// Extension trait for access to the table `unique_i256`. +/// Extension trait for access to the table `unique_i_256`. /// /// Implemented for [`super::RemoteTables`]. pub trait UniqueI256TableAccess { #[allow(non_snake_case)] - /// Obtain a [`UniqueI256TableHandle`], which mediates access to the table `unique_i256`. + /// Obtain a [`UniqueI256TableHandle`], which mediates access to the table `unique_i_256`. fn unique_i_256(&self) -> UniqueI256TableHandle<'_>; } impl UniqueI256TableAccess for super::RemoteTables { fn unique_i_256(&self) -> UniqueI256TableHandle<'_> { UniqueI256TableHandle { - imp: self.imp.get_table::("unique_i256"), + imp: self.imp.get_table::("unique_i_256"), ctx: std::marker::PhantomData, } } @@ -78,7 +78,7 @@ impl<'ctx> __sdk::Table for UniqueI256TableHandle<'ctx> { } } -/// Access to the `n` unique index on the table `unique_i256`, +/// Access to the `n` unique index on the table `unique_i_256`, /// which allows point queries on the field of the same name /// via the [`UniqueI256NUnique::find`] method. /// @@ -91,7 +91,7 @@ pub struct UniqueI256NUnique<'ctx> { } impl<'ctx> UniqueI256TableHandle<'ctx> { - /// Get a handle on the `n` unique index on the table `unique_i256`. + /// Get a handle on the `n` unique index on the table `unique_i_256`. pub fn n(&self) -> UniqueI256NUnique<'ctx> { UniqueI256NUnique { imp: self.imp.get_unique_constraint::<__sats::i256>("n"), @@ -110,7 +110,7 @@ impl<'ctx> UniqueI256NUnique<'ctx> { #[doc(hidden)] pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { - let _table = client_cache.get_or_make_table::("unique_i256"); + let _table = client_cache.get_or_make_table::("unique_i_256"); _table.add_unique_constraint::<__sats::i256>("n", |row| &row.n); } diff --git a/sdks/rust/tests/test-client/src/module_bindings/unique_i_32_table.rs b/sdks/rust/tests/test-client/src/module_bindings/unique_i_32_table.rs index d292344a203..55f12c1d2ff 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/unique_i_32_table.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/unique_i_32_table.rs @@ -5,7 +5,7 @@ use super::unique_i_32_type::UniqueI32; use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; -/// Table handle for the table `unique_i32`. +/// Table handle for the table `unique_i_32`. /// /// Obtain a handle from the [`UniqueI32TableAccess::unique_i_32`] method on [`super::RemoteTables`], /// like `ctx.db.unique_i_32()`. @@ -19,19 +19,19 @@ pub struct UniqueI32TableHandle<'ctx> { } #[allow(non_camel_case_types)] -/// Extension trait for access to the table `unique_i32`. +/// Extension trait for access to the table `unique_i_32`. /// /// Implemented for [`super::RemoteTables`]. pub trait UniqueI32TableAccess { #[allow(non_snake_case)] - /// Obtain a [`UniqueI32TableHandle`], which mediates access to the table `unique_i32`. + /// Obtain a [`UniqueI32TableHandle`], which mediates access to the table `unique_i_32`. fn unique_i_32(&self) -> UniqueI32TableHandle<'_>; } impl UniqueI32TableAccess for super::RemoteTables { fn unique_i_32(&self) -> UniqueI32TableHandle<'_> { UniqueI32TableHandle { - imp: self.imp.get_table::("unique_i32"), + imp: self.imp.get_table::("unique_i_32"), ctx: std::marker::PhantomData, } } @@ -78,7 +78,7 @@ impl<'ctx> __sdk::Table for UniqueI32TableHandle<'ctx> { } } -/// Access to the `n` unique index on the table `unique_i32`, +/// Access to the `n` unique index on the table `unique_i_32`, /// which allows point queries on the field of the same name /// via the [`UniqueI32NUnique::find`] method. /// @@ -91,7 +91,7 @@ pub struct UniqueI32NUnique<'ctx> { } impl<'ctx> UniqueI32TableHandle<'ctx> { - /// Get a handle on the `n` unique index on the table `unique_i32`. + /// Get a handle on the `n` unique index on the table `unique_i_32`. pub fn n(&self) -> UniqueI32NUnique<'ctx> { UniqueI32NUnique { imp: self.imp.get_unique_constraint::("n"), @@ -110,7 +110,7 @@ impl<'ctx> UniqueI32NUnique<'ctx> { #[doc(hidden)] pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { - let _table = client_cache.get_or_make_table::("unique_i32"); + let _table = client_cache.get_or_make_table::("unique_i_32"); _table.add_unique_constraint::("n", |row| &row.n); } diff --git a/sdks/rust/tests/test-client/src/module_bindings/unique_i_64_table.rs b/sdks/rust/tests/test-client/src/module_bindings/unique_i_64_table.rs index 226d6f023c8..b1155223281 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/unique_i_64_table.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/unique_i_64_table.rs @@ -5,7 +5,7 @@ use super::unique_i_64_type::UniqueI64; use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; -/// Table handle for the table `unique_i64`. +/// Table handle for the table `unique_i_64`. /// /// Obtain a handle from the [`UniqueI64TableAccess::unique_i_64`] method on [`super::RemoteTables`], /// like `ctx.db.unique_i_64()`. @@ -19,19 +19,19 @@ pub struct UniqueI64TableHandle<'ctx> { } #[allow(non_camel_case_types)] -/// Extension trait for access to the table `unique_i64`. +/// Extension trait for access to the table `unique_i_64`. /// /// Implemented for [`super::RemoteTables`]. pub trait UniqueI64TableAccess { #[allow(non_snake_case)] - /// Obtain a [`UniqueI64TableHandle`], which mediates access to the table `unique_i64`. + /// Obtain a [`UniqueI64TableHandle`], which mediates access to the table `unique_i_64`. fn unique_i_64(&self) -> UniqueI64TableHandle<'_>; } impl UniqueI64TableAccess for super::RemoteTables { fn unique_i_64(&self) -> UniqueI64TableHandle<'_> { UniqueI64TableHandle { - imp: self.imp.get_table::("unique_i64"), + imp: self.imp.get_table::("unique_i_64"), ctx: std::marker::PhantomData, } } @@ -78,7 +78,7 @@ impl<'ctx> __sdk::Table for UniqueI64TableHandle<'ctx> { } } -/// Access to the `n` unique index on the table `unique_i64`, +/// Access to the `n` unique index on the table `unique_i_64`, /// which allows point queries on the field of the same name /// via the [`UniqueI64NUnique::find`] method. /// @@ -91,7 +91,7 @@ pub struct UniqueI64NUnique<'ctx> { } impl<'ctx> UniqueI64TableHandle<'ctx> { - /// Get a handle on the `n` unique index on the table `unique_i64`. + /// Get a handle on the `n` unique index on the table `unique_i_64`. pub fn n(&self) -> UniqueI64NUnique<'ctx> { UniqueI64NUnique { imp: self.imp.get_unique_constraint::("n"), @@ -110,7 +110,7 @@ impl<'ctx> UniqueI64NUnique<'ctx> { #[doc(hidden)] pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { - let _table = client_cache.get_or_make_table::("unique_i64"); + let _table = client_cache.get_or_make_table::("unique_i_64"); _table.add_unique_constraint::("n", |row| &row.n); } diff --git a/sdks/rust/tests/test-client/src/module_bindings/unique_i_8_table.rs b/sdks/rust/tests/test-client/src/module_bindings/unique_i_8_table.rs index ed6ba07f2fe..5926d98b43f 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/unique_i_8_table.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/unique_i_8_table.rs @@ -5,7 +5,7 @@ use super::unique_i_8_type::UniqueI8; use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; -/// Table handle for the table `unique_i8`. +/// Table handle for the table `unique_i_8`. /// /// Obtain a handle from the [`UniqueI8TableAccess::unique_i_8`] method on [`super::RemoteTables`], /// like `ctx.db.unique_i_8()`. @@ -19,19 +19,19 @@ pub struct UniqueI8TableHandle<'ctx> { } #[allow(non_camel_case_types)] -/// Extension trait for access to the table `unique_i8`. +/// Extension trait for access to the table `unique_i_8`. /// /// Implemented for [`super::RemoteTables`]. pub trait UniqueI8TableAccess { #[allow(non_snake_case)] - /// Obtain a [`UniqueI8TableHandle`], which mediates access to the table `unique_i8`. + /// Obtain a [`UniqueI8TableHandle`], which mediates access to the table `unique_i_8`. fn unique_i_8(&self) -> UniqueI8TableHandle<'_>; } impl UniqueI8TableAccess for super::RemoteTables { fn unique_i_8(&self) -> UniqueI8TableHandle<'_> { UniqueI8TableHandle { - imp: self.imp.get_table::("unique_i8"), + imp: self.imp.get_table::("unique_i_8"), ctx: std::marker::PhantomData, } } @@ -78,7 +78,7 @@ impl<'ctx> __sdk::Table for UniqueI8TableHandle<'ctx> { } } -/// Access to the `n` unique index on the table `unique_i8`, +/// Access to the `n` unique index on the table `unique_i_8`, /// which allows point queries on the field of the same name /// via the [`UniqueI8NUnique::find`] method. /// @@ -91,7 +91,7 @@ pub struct UniqueI8NUnique<'ctx> { } impl<'ctx> UniqueI8TableHandle<'ctx> { - /// Get a handle on the `n` unique index on the table `unique_i8`. + /// Get a handle on the `n` unique index on the table `unique_i_8`. pub fn n(&self) -> UniqueI8NUnique<'ctx> { UniqueI8NUnique { imp: self.imp.get_unique_constraint::("n"), @@ -110,7 +110,7 @@ impl<'ctx> UniqueI8NUnique<'ctx> { #[doc(hidden)] pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { - let _table = client_cache.get_or_make_table::("unique_i8"); + let _table = client_cache.get_or_make_table::("unique_i_8"); _table.add_unique_constraint::("n", |row| &row.n); } diff --git a/sdks/rust/tests/test-client/src/module_bindings/unique_u_128_table.rs b/sdks/rust/tests/test-client/src/module_bindings/unique_u_128_table.rs index 8a75ea28f5d..0233fb5c676 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/unique_u_128_table.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/unique_u_128_table.rs @@ -5,7 +5,7 @@ use super::unique_u_128_type::UniqueU128; use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; -/// Table handle for the table `unique_u128`. +/// Table handle for the table `unique_u_128`. /// /// Obtain a handle from the [`UniqueU128TableAccess::unique_u_128`] method on [`super::RemoteTables`], /// like `ctx.db.unique_u_128()`. @@ -19,19 +19,19 @@ pub struct UniqueU128TableHandle<'ctx> { } #[allow(non_camel_case_types)] -/// Extension trait for access to the table `unique_u128`. +/// Extension trait for access to the table `unique_u_128`. /// /// Implemented for [`super::RemoteTables`]. pub trait UniqueU128TableAccess { #[allow(non_snake_case)] - /// Obtain a [`UniqueU128TableHandle`], which mediates access to the table `unique_u128`. + /// Obtain a [`UniqueU128TableHandle`], which mediates access to the table `unique_u_128`. fn unique_u_128(&self) -> UniqueU128TableHandle<'_>; } impl UniqueU128TableAccess for super::RemoteTables { fn unique_u_128(&self) -> UniqueU128TableHandle<'_> { UniqueU128TableHandle { - imp: self.imp.get_table::("unique_u128"), + imp: self.imp.get_table::("unique_u_128"), ctx: std::marker::PhantomData, } } @@ -78,7 +78,7 @@ impl<'ctx> __sdk::Table for UniqueU128TableHandle<'ctx> { } } -/// Access to the `n` unique index on the table `unique_u128`, +/// Access to the `n` unique index on the table `unique_u_128`, /// which allows point queries on the field of the same name /// via the [`UniqueU128NUnique::find`] method. /// @@ -91,7 +91,7 @@ pub struct UniqueU128NUnique<'ctx> { } impl<'ctx> UniqueU128TableHandle<'ctx> { - /// Get a handle on the `n` unique index on the table `unique_u128`. + /// Get a handle on the `n` unique index on the table `unique_u_128`. pub fn n(&self) -> UniqueU128NUnique<'ctx> { UniqueU128NUnique { imp: self.imp.get_unique_constraint::("n"), @@ -110,7 +110,7 @@ impl<'ctx> UniqueU128NUnique<'ctx> { #[doc(hidden)] pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { - let _table = client_cache.get_or_make_table::("unique_u128"); + let _table = client_cache.get_or_make_table::("unique_u_128"); _table.add_unique_constraint::("n", |row| &row.n); } diff --git a/sdks/rust/tests/test-client/src/module_bindings/unique_u_16_table.rs b/sdks/rust/tests/test-client/src/module_bindings/unique_u_16_table.rs index 9cfa0a347ba..3315bca8a0a 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/unique_u_16_table.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/unique_u_16_table.rs @@ -5,7 +5,7 @@ use super::unique_u_16_type::UniqueU16; use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; -/// Table handle for the table `unique_u16`. +/// Table handle for the table `unique_u_16`. /// /// Obtain a handle from the [`UniqueU16TableAccess::unique_u_16`] method on [`super::RemoteTables`], /// like `ctx.db.unique_u_16()`. @@ -19,19 +19,19 @@ pub struct UniqueU16TableHandle<'ctx> { } #[allow(non_camel_case_types)] -/// Extension trait for access to the table `unique_u16`. +/// Extension trait for access to the table `unique_u_16`. /// /// Implemented for [`super::RemoteTables`]. pub trait UniqueU16TableAccess { #[allow(non_snake_case)] - /// Obtain a [`UniqueU16TableHandle`], which mediates access to the table `unique_u16`. + /// Obtain a [`UniqueU16TableHandle`], which mediates access to the table `unique_u_16`. fn unique_u_16(&self) -> UniqueU16TableHandle<'_>; } impl UniqueU16TableAccess for super::RemoteTables { fn unique_u_16(&self) -> UniqueU16TableHandle<'_> { UniqueU16TableHandle { - imp: self.imp.get_table::("unique_u16"), + imp: self.imp.get_table::("unique_u_16"), ctx: std::marker::PhantomData, } } @@ -78,7 +78,7 @@ impl<'ctx> __sdk::Table for UniqueU16TableHandle<'ctx> { } } -/// Access to the `n` unique index on the table `unique_u16`, +/// Access to the `n` unique index on the table `unique_u_16`, /// which allows point queries on the field of the same name /// via the [`UniqueU16NUnique::find`] method. /// @@ -91,7 +91,7 @@ pub struct UniqueU16NUnique<'ctx> { } impl<'ctx> UniqueU16TableHandle<'ctx> { - /// Get a handle on the `n` unique index on the table `unique_u16`. + /// Get a handle on the `n` unique index on the table `unique_u_16`. pub fn n(&self) -> UniqueU16NUnique<'ctx> { UniqueU16NUnique { imp: self.imp.get_unique_constraint::("n"), @@ -110,7 +110,7 @@ impl<'ctx> UniqueU16NUnique<'ctx> { #[doc(hidden)] pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { - let _table = client_cache.get_or_make_table::("unique_u16"); + let _table = client_cache.get_or_make_table::("unique_u_16"); _table.add_unique_constraint::("n", |row| &row.n); } diff --git a/sdks/rust/tests/test-client/src/module_bindings/unique_u_256_table.rs b/sdks/rust/tests/test-client/src/module_bindings/unique_u_256_table.rs index 788e561b021..d2766488117 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/unique_u_256_table.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/unique_u_256_table.rs @@ -5,7 +5,7 @@ use super::unique_u_256_type::UniqueU256; use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; -/// Table handle for the table `unique_u256`. +/// Table handle for the table `unique_u_256`. /// /// Obtain a handle from the [`UniqueU256TableAccess::unique_u_256`] method on [`super::RemoteTables`], /// like `ctx.db.unique_u_256()`. @@ -19,19 +19,19 @@ pub struct UniqueU256TableHandle<'ctx> { } #[allow(non_camel_case_types)] -/// Extension trait for access to the table `unique_u256`. +/// Extension trait for access to the table `unique_u_256`. /// /// Implemented for [`super::RemoteTables`]. pub trait UniqueU256TableAccess { #[allow(non_snake_case)] - /// Obtain a [`UniqueU256TableHandle`], which mediates access to the table `unique_u256`. + /// Obtain a [`UniqueU256TableHandle`], which mediates access to the table `unique_u_256`. fn unique_u_256(&self) -> UniqueU256TableHandle<'_>; } impl UniqueU256TableAccess for super::RemoteTables { fn unique_u_256(&self) -> UniqueU256TableHandle<'_> { UniqueU256TableHandle { - imp: self.imp.get_table::("unique_u256"), + imp: self.imp.get_table::("unique_u_256"), ctx: std::marker::PhantomData, } } @@ -78,7 +78,7 @@ impl<'ctx> __sdk::Table for UniqueU256TableHandle<'ctx> { } } -/// Access to the `n` unique index on the table `unique_u256`, +/// Access to the `n` unique index on the table `unique_u_256`, /// which allows point queries on the field of the same name /// via the [`UniqueU256NUnique::find`] method. /// @@ -91,7 +91,7 @@ pub struct UniqueU256NUnique<'ctx> { } impl<'ctx> UniqueU256TableHandle<'ctx> { - /// Get a handle on the `n` unique index on the table `unique_u256`. + /// Get a handle on the `n` unique index on the table `unique_u_256`. pub fn n(&self) -> UniqueU256NUnique<'ctx> { UniqueU256NUnique { imp: self.imp.get_unique_constraint::<__sats::u256>("n"), @@ -110,7 +110,7 @@ impl<'ctx> UniqueU256NUnique<'ctx> { #[doc(hidden)] pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { - let _table = client_cache.get_or_make_table::("unique_u256"); + let _table = client_cache.get_or_make_table::("unique_u_256"); _table.add_unique_constraint::<__sats::u256>("n", |row| &row.n); } diff --git a/sdks/rust/tests/test-client/src/module_bindings/unique_u_32_table.rs b/sdks/rust/tests/test-client/src/module_bindings/unique_u_32_table.rs index 07c0825cd16..2dbc525bb06 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/unique_u_32_table.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/unique_u_32_table.rs @@ -5,7 +5,7 @@ use super::unique_u_32_type::UniqueU32; use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; -/// Table handle for the table `unique_u32`. +/// Table handle for the table `unique_u_32`. /// /// Obtain a handle from the [`UniqueU32TableAccess::unique_u_32`] method on [`super::RemoteTables`], /// like `ctx.db.unique_u_32()`. @@ -19,19 +19,19 @@ pub struct UniqueU32TableHandle<'ctx> { } #[allow(non_camel_case_types)] -/// Extension trait for access to the table `unique_u32`. +/// Extension trait for access to the table `unique_u_32`. /// /// Implemented for [`super::RemoteTables`]. pub trait UniqueU32TableAccess { #[allow(non_snake_case)] - /// Obtain a [`UniqueU32TableHandle`], which mediates access to the table `unique_u32`. + /// Obtain a [`UniqueU32TableHandle`], which mediates access to the table `unique_u_32`. fn unique_u_32(&self) -> UniqueU32TableHandle<'_>; } impl UniqueU32TableAccess for super::RemoteTables { fn unique_u_32(&self) -> UniqueU32TableHandle<'_> { UniqueU32TableHandle { - imp: self.imp.get_table::("unique_u32"), + imp: self.imp.get_table::("unique_u_32"), ctx: std::marker::PhantomData, } } @@ -78,7 +78,7 @@ impl<'ctx> __sdk::Table for UniqueU32TableHandle<'ctx> { } } -/// Access to the `n` unique index on the table `unique_u32`, +/// Access to the `n` unique index on the table `unique_u_32`, /// which allows point queries on the field of the same name /// via the [`UniqueU32NUnique::find`] method. /// @@ -91,7 +91,7 @@ pub struct UniqueU32NUnique<'ctx> { } impl<'ctx> UniqueU32TableHandle<'ctx> { - /// Get a handle on the `n` unique index on the table `unique_u32`. + /// Get a handle on the `n` unique index on the table `unique_u_32`. pub fn n(&self) -> UniqueU32NUnique<'ctx> { UniqueU32NUnique { imp: self.imp.get_unique_constraint::("n"), @@ -110,7 +110,7 @@ impl<'ctx> UniqueU32NUnique<'ctx> { #[doc(hidden)] pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { - let _table = client_cache.get_or_make_table::("unique_u32"); + let _table = client_cache.get_or_make_table::("unique_u_32"); _table.add_unique_constraint::("n", |row| &row.n); } diff --git a/sdks/rust/tests/test-client/src/module_bindings/unique_u_64_table.rs b/sdks/rust/tests/test-client/src/module_bindings/unique_u_64_table.rs index 754067c8f72..e80779e7378 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/unique_u_64_table.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/unique_u_64_table.rs @@ -5,7 +5,7 @@ use super::unique_u_64_type::UniqueU64; use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; -/// Table handle for the table `unique_u64`. +/// Table handle for the table `unique_u_64`. /// /// Obtain a handle from the [`UniqueU64TableAccess::unique_u_64`] method on [`super::RemoteTables`], /// like `ctx.db.unique_u_64()`. @@ -19,19 +19,19 @@ pub struct UniqueU64TableHandle<'ctx> { } #[allow(non_camel_case_types)] -/// Extension trait for access to the table `unique_u64`. +/// Extension trait for access to the table `unique_u_64`. /// /// Implemented for [`super::RemoteTables`]. pub trait UniqueU64TableAccess { #[allow(non_snake_case)] - /// Obtain a [`UniqueU64TableHandle`], which mediates access to the table `unique_u64`. + /// Obtain a [`UniqueU64TableHandle`], which mediates access to the table `unique_u_64`. fn unique_u_64(&self) -> UniqueU64TableHandle<'_>; } impl UniqueU64TableAccess for super::RemoteTables { fn unique_u_64(&self) -> UniqueU64TableHandle<'_> { UniqueU64TableHandle { - imp: self.imp.get_table::("unique_u64"), + imp: self.imp.get_table::("unique_u_64"), ctx: std::marker::PhantomData, } } @@ -78,7 +78,7 @@ impl<'ctx> __sdk::Table for UniqueU64TableHandle<'ctx> { } } -/// Access to the `n` unique index on the table `unique_u64`, +/// Access to the `n` unique index on the table `unique_u_64`, /// which allows point queries on the field of the same name /// via the [`UniqueU64NUnique::find`] method. /// @@ -91,7 +91,7 @@ pub struct UniqueU64NUnique<'ctx> { } impl<'ctx> UniqueU64TableHandle<'ctx> { - /// Get a handle on the `n` unique index on the table `unique_u64`. + /// Get a handle on the `n` unique index on the table `unique_u_64`. pub fn n(&self) -> UniqueU64NUnique<'ctx> { UniqueU64NUnique { imp: self.imp.get_unique_constraint::("n"), @@ -110,7 +110,7 @@ impl<'ctx> UniqueU64NUnique<'ctx> { #[doc(hidden)] pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { - let _table = client_cache.get_or_make_table::("unique_u64"); + let _table = client_cache.get_or_make_table::("unique_u_64"); _table.add_unique_constraint::("n", |row| &row.n); } diff --git a/sdks/rust/tests/test-client/src/module_bindings/unique_u_8_table.rs b/sdks/rust/tests/test-client/src/module_bindings/unique_u_8_table.rs index 7581ffab840..c4bbacdd291 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/unique_u_8_table.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/unique_u_8_table.rs @@ -5,7 +5,7 @@ use super::unique_u_8_type::UniqueU8; use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; -/// Table handle for the table `unique_u8`. +/// Table handle for the table `unique_u_8`. /// /// Obtain a handle from the [`UniqueU8TableAccess::unique_u_8`] method on [`super::RemoteTables`], /// like `ctx.db.unique_u_8()`. @@ -19,19 +19,19 @@ pub struct UniqueU8TableHandle<'ctx> { } #[allow(non_camel_case_types)] -/// Extension trait for access to the table `unique_u8`. +/// Extension trait for access to the table `unique_u_8`. /// /// Implemented for [`super::RemoteTables`]. pub trait UniqueU8TableAccess { #[allow(non_snake_case)] - /// Obtain a [`UniqueU8TableHandle`], which mediates access to the table `unique_u8`. + /// Obtain a [`UniqueU8TableHandle`], which mediates access to the table `unique_u_8`. fn unique_u_8(&self) -> UniqueU8TableHandle<'_>; } impl UniqueU8TableAccess for super::RemoteTables { fn unique_u_8(&self) -> UniqueU8TableHandle<'_> { UniqueU8TableHandle { - imp: self.imp.get_table::("unique_u8"), + imp: self.imp.get_table::("unique_u_8"), ctx: std::marker::PhantomData, } } @@ -78,7 +78,7 @@ impl<'ctx> __sdk::Table for UniqueU8TableHandle<'ctx> { } } -/// Access to the `n` unique index on the table `unique_u8`, +/// Access to the `n` unique index on the table `unique_u_8`, /// which allows point queries on the field of the same name /// via the [`UniqueU8NUnique::find`] method. /// @@ -91,7 +91,7 @@ pub struct UniqueU8NUnique<'ctx> { } impl<'ctx> UniqueU8TableHandle<'ctx> { - /// Get a handle on the `n` unique index on the table `unique_u8`. + /// Get a handle on the `n` unique index on the table `unique_u_8`. pub fn n(&self) -> UniqueU8NUnique<'ctx> { UniqueU8NUnique { imp: self.imp.get_unique_constraint::("n"), @@ -110,7 +110,7 @@ impl<'ctx> UniqueU8NUnique<'ctx> { #[doc(hidden)] pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { - let _table = client_cache.get_or_make_table::("unique_u8"); + let _table = client_cache.get_or_make_table::("unique_u_8"); _table.add_unique_constraint::("n", |row| &row.n); } diff --git a/sdks/rust/tests/test-client/src/module_bindings/update_indexed_simple_enum_type.rs b/sdks/rust/tests/test-client/src/module_bindings/update_indexed_simple_enum_type.rs new file mode 100644 index 00000000000..09280ad4e15 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/update_indexed_simple_enum_type.rs @@ -0,0 +1,18 @@ +// 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, __lib, __sats, __ws}; + +use super::simple_enum_type::SimpleEnum; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct UpdateIndexedSimpleEnum { + pub a: SimpleEnum, + pub b: SimpleEnum, +} + +impl __sdk::InModule for UpdateIndexedSimpleEnum { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/update_pk_bool_type.rs b/sdks/rust/tests/test-client/src/module_bindings/update_pk_bool_type.rs new file mode 100644 index 00000000000..f23eab930e6 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/update_pk_bool_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct UpdatePkBool { + pub b: bool, + pub data: i32, +} + +impl __sdk::InModule for UpdatePkBool { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/update_pk_connection_id_type.rs b/sdks/rust/tests/test-client/src/module_bindings/update_pk_connection_id_type.rs new file mode 100644 index 00000000000..52439b2833a --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/update_pk_connection_id_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct UpdatePkConnectionId { + pub a: __sdk::ConnectionId, + pub data: i32, +} + +impl __sdk::InModule for UpdatePkConnectionId { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/update_pk_i_128_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/update_pk_i_128_reducer.rs index 28fe8b0835e..1e8e2535e90 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/update_pk_i_128_reducer.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/update_pk_i_128_reducer.rs @@ -25,11 +25,11 @@ impl __sdk::InModule for UpdatePkI128Args { } #[allow(non_camel_case_types)] -/// Extension trait for access to the reducer `update_pk_i128`. +/// Extension trait for access to the reducer `update_pk_i_128`. /// /// Implemented for [`super::RemoteReducers`]. pub trait update_pk_i_128 { - /// Request that the remote module invoke the reducer `update_pk_i128` to run as soon as possible. + /// Request that the remote module invoke the reducer `update_pk_i_128` 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, @@ -39,7 +39,7 @@ pub trait update_pk_i_128 { self.update_pk_i_128_then(n, data, |_, _| {}) } - /// Request that the remote module invoke the reducer `update_pk_i128` to run as soon as possible, + /// Request that the remote module invoke the reducer `update_pk_i_128` to run as soon as possible, /// registering `callback` to run when we are notified that the reducer completed. /// /// This method returns immediately, and errors only if we are unable to send the request. diff --git a/sdks/rust/tests/test-client/src/module_bindings/update_pk_i_128_type.rs b/sdks/rust/tests/test-client/src/module_bindings/update_pk_i_128_type.rs new file mode 100644 index 00000000000..a8f51ccda0c --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/update_pk_i_128_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct UpdatePkI128 { + pub n: i128, + pub data: i32, +} + +impl __sdk::InModule for UpdatePkI128 { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/update_pk_i_16_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/update_pk_i_16_reducer.rs index 0e76980fa47..ae461fb747e 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/update_pk_i_16_reducer.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/update_pk_i_16_reducer.rs @@ -25,11 +25,11 @@ impl __sdk::InModule for UpdatePkI16Args { } #[allow(non_camel_case_types)] -/// Extension trait for access to the reducer `update_pk_i16`. +/// Extension trait for access to the reducer `update_pk_i_16`. /// /// Implemented for [`super::RemoteReducers`]. pub trait update_pk_i_16 { - /// Request that the remote module invoke the reducer `update_pk_i16` to run as soon as possible. + /// Request that the remote module invoke the reducer `update_pk_i_16` 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, @@ -39,7 +39,7 @@ pub trait update_pk_i_16 { self.update_pk_i_16_then(n, data, |_, _| {}) } - /// Request that the remote module invoke the reducer `update_pk_i16` to run as soon as possible, + /// Request that the remote module invoke the reducer `update_pk_i_16` to run as soon as possible, /// registering `callback` to run when we are notified that the reducer completed. /// /// This method returns immediately, and errors only if we are unable to send the request. diff --git a/sdks/rust/tests/test-client/src/module_bindings/update_pk_i_16_type.rs b/sdks/rust/tests/test-client/src/module_bindings/update_pk_i_16_type.rs new file mode 100644 index 00000000000..7bf7a38505b --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/update_pk_i_16_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct UpdatePkI16 { + pub n: i16, + pub data: i32, +} + +impl __sdk::InModule for UpdatePkI16 { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/update_pk_i_256_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/update_pk_i_256_reducer.rs index a16314435c7..ef356225f9a 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/update_pk_i_256_reducer.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/update_pk_i_256_reducer.rs @@ -25,11 +25,11 @@ impl __sdk::InModule for UpdatePkI256Args { } #[allow(non_camel_case_types)] -/// Extension trait for access to the reducer `update_pk_i256`. +/// Extension trait for access to the reducer `update_pk_i_256`. /// /// Implemented for [`super::RemoteReducers`]. pub trait update_pk_i_256 { - /// Request that the remote module invoke the reducer `update_pk_i256` to run as soon as possible. + /// Request that the remote module invoke the reducer `update_pk_i_256` 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, @@ -39,7 +39,7 @@ pub trait update_pk_i_256 { self.update_pk_i_256_then(n, data, |_, _| {}) } - /// Request that the remote module invoke the reducer `update_pk_i256` to run as soon as possible, + /// Request that the remote module invoke the reducer `update_pk_i_256` to run as soon as possible, /// registering `callback` to run when we are notified that the reducer completed. /// /// This method returns immediately, and errors only if we are unable to send the request. diff --git a/sdks/rust/tests/test-client/src/module_bindings/update_pk_i_256_type.rs b/sdks/rust/tests/test-client/src/module_bindings/update_pk_i_256_type.rs new file mode 100644 index 00000000000..b493cbf3f23 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/update_pk_i_256_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct UpdatePkI256 { + pub n: __sats::i256, + pub data: i32, +} + +impl __sdk::InModule for UpdatePkI256 { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/update_pk_i_32_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/update_pk_i_32_reducer.rs index 82799d8aa43..1066832f11b 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/update_pk_i_32_reducer.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/update_pk_i_32_reducer.rs @@ -25,11 +25,11 @@ impl __sdk::InModule for UpdatePkI32Args { } #[allow(non_camel_case_types)] -/// Extension trait for access to the reducer `update_pk_i32`. +/// Extension trait for access to the reducer `update_pk_i_32`. /// /// Implemented for [`super::RemoteReducers`]. pub trait update_pk_i_32 { - /// Request that the remote module invoke the reducer `update_pk_i32` to run as soon as possible. + /// Request that the remote module invoke the reducer `update_pk_i_32` 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, @@ -39,7 +39,7 @@ pub trait update_pk_i_32 { self.update_pk_i_32_then(n, data, |_, _| {}) } - /// Request that the remote module invoke the reducer `update_pk_i32` to run as soon as possible, + /// Request that the remote module invoke the reducer `update_pk_i_32` to run as soon as possible, /// registering `callback` to run when we are notified that the reducer completed. /// /// This method returns immediately, and errors only if we are unable to send the request. diff --git a/sdks/rust/tests/test-client/src/module_bindings/update_pk_i_32_type.rs b/sdks/rust/tests/test-client/src/module_bindings/update_pk_i_32_type.rs new file mode 100644 index 00000000000..ac70ad1a629 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/update_pk_i_32_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct UpdatePkI32 { + pub n: i32, + pub data: i32, +} + +impl __sdk::InModule for UpdatePkI32 { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/update_pk_i_64_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/update_pk_i_64_reducer.rs index e15674e99f6..660cd6e11b7 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/update_pk_i_64_reducer.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/update_pk_i_64_reducer.rs @@ -25,11 +25,11 @@ impl __sdk::InModule for UpdatePkI64Args { } #[allow(non_camel_case_types)] -/// Extension trait for access to the reducer `update_pk_i64`. +/// Extension trait for access to the reducer `update_pk_i_64`. /// /// Implemented for [`super::RemoteReducers`]. pub trait update_pk_i_64 { - /// Request that the remote module invoke the reducer `update_pk_i64` to run as soon as possible. + /// Request that the remote module invoke the reducer `update_pk_i_64` 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, @@ -39,7 +39,7 @@ pub trait update_pk_i_64 { self.update_pk_i_64_then(n, data, |_, _| {}) } - /// Request that the remote module invoke the reducer `update_pk_i64` to run as soon as possible, + /// Request that the remote module invoke the reducer `update_pk_i_64` to run as soon as possible, /// registering `callback` to run when we are notified that the reducer completed. /// /// This method returns immediately, and errors only if we are unable to send the request. diff --git a/sdks/rust/tests/test-client/src/module_bindings/update_pk_i_64_type.rs b/sdks/rust/tests/test-client/src/module_bindings/update_pk_i_64_type.rs new file mode 100644 index 00000000000..066a890ab25 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/update_pk_i_64_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct UpdatePkI64 { + pub n: i64, + pub data: i32, +} + +impl __sdk::InModule for UpdatePkI64 { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/update_pk_i_8_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/update_pk_i_8_reducer.rs index 8ae0bd69ab7..b5337123863 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/update_pk_i_8_reducer.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/update_pk_i_8_reducer.rs @@ -25,11 +25,11 @@ impl __sdk::InModule for UpdatePkI8Args { } #[allow(non_camel_case_types)] -/// Extension trait for access to the reducer `update_pk_i8`. +/// Extension trait for access to the reducer `update_pk_i_8`. /// /// Implemented for [`super::RemoteReducers`]. pub trait update_pk_i_8 { - /// Request that the remote module invoke the reducer `update_pk_i8` to run as soon as possible. + /// Request that the remote module invoke the reducer `update_pk_i_8` 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, @@ -39,7 +39,7 @@ pub trait update_pk_i_8 { self.update_pk_i_8_then(n, data, |_, _| {}) } - /// Request that the remote module invoke the reducer `update_pk_i8` to run as soon as possible, + /// Request that the remote module invoke the reducer `update_pk_i_8` to run as soon as possible, /// registering `callback` to run when we are notified that the reducer completed. /// /// This method returns immediately, and errors only if we are unable to send the request. diff --git a/sdks/rust/tests/test-client/src/module_bindings/update_pk_i_8_type.rs b/sdks/rust/tests/test-client/src/module_bindings/update_pk_i_8_type.rs new file mode 100644 index 00000000000..c4c58734cd2 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/update_pk_i_8_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct UpdatePkI8 { + pub n: i8, + pub data: i32, +} + +impl __sdk::InModule for UpdatePkI8 { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/update_pk_identity_type.rs b/sdks/rust/tests/test-client/src/module_bindings/update_pk_identity_type.rs new file mode 100644 index 00000000000..7fdb0ba0084 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/update_pk_identity_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct UpdatePkIdentity { + pub i: __sdk::Identity, + pub data: i32, +} + +impl __sdk::InModule for UpdatePkIdentity { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/update_pk_simple_enum_type.rs b/sdks/rust/tests/test-client/src/module_bindings/update_pk_simple_enum_type.rs new file mode 100644 index 00000000000..57a08d3d47d --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/update_pk_simple_enum_type.rs @@ -0,0 +1,18 @@ +// 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, __lib, __sats, __ws}; + +use super::simple_enum_type::SimpleEnum; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct UpdatePkSimpleEnum { + pub a: SimpleEnum, + pub data: i32, +} + +impl __sdk::InModule for UpdatePkSimpleEnum { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/update_pk_string_type.rs b/sdks/rust/tests/test-client/src/module_bindings/update_pk_string_type.rs new file mode 100644 index 00000000000..083f4b80391 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/update_pk_string_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct UpdatePkString { + pub s: String, + pub data: i32, +} + +impl __sdk::InModule for UpdatePkString { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/update_pk_u_128_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/update_pk_u_128_reducer.rs index 806de32d2ba..c8a740af000 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/update_pk_u_128_reducer.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/update_pk_u_128_reducer.rs @@ -25,11 +25,11 @@ impl __sdk::InModule for UpdatePkU128Args { } #[allow(non_camel_case_types)] -/// Extension trait for access to the reducer `update_pk_u128`. +/// Extension trait for access to the reducer `update_pk_u_128`. /// /// Implemented for [`super::RemoteReducers`]. pub trait update_pk_u_128 { - /// Request that the remote module invoke the reducer `update_pk_u128` to run as soon as possible. + /// Request that the remote module invoke the reducer `update_pk_u_128` 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, @@ -39,7 +39,7 @@ pub trait update_pk_u_128 { self.update_pk_u_128_then(n, data, |_, _| {}) } - /// Request that the remote module invoke the reducer `update_pk_u128` to run as soon as possible, + /// Request that the remote module invoke the reducer `update_pk_u_128` to run as soon as possible, /// registering `callback` to run when we are notified that the reducer completed. /// /// This method returns immediately, and errors only if we are unable to send the request. diff --git a/sdks/rust/tests/test-client/src/module_bindings/update_pk_u_128_type.rs b/sdks/rust/tests/test-client/src/module_bindings/update_pk_u_128_type.rs new file mode 100644 index 00000000000..2dfdf873f25 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/update_pk_u_128_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct UpdatePkU128 { + pub n: u128, + pub data: i32, +} + +impl __sdk::InModule for UpdatePkU128 { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/update_pk_u_16_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/update_pk_u_16_reducer.rs index bde9d958c1c..cac9ebcd8b7 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/update_pk_u_16_reducer.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/update_pk_u_16_reducer.rs @@ -25,11 +25,11 @@ impl __sdk::InModule for UpdatePkU16Args { } #[allow(non_camel_case_types)] -/// Extension trait for access to the reducer `update_pk_u16`. +/// Extension trait for access to the reducer `update_pk_u_16`. /// /// Implemented for [`super::RemoteReducers`]. pub trait update_pk_u_16 { - /// Request that the remote module invoke the reducer `update_pk_u16` to run as soon as possible. + /// Request that the remote module invoke the reducer `update_pk_u_16` 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, @@ -39,7 +39,7 @@ pub trait update_pk_u_16 { self.update_pk_u_16_then(n, data, |_, _| {}) } - /// Request that the remote module invoke the reducer `update_pk_u16` to run as soon as possible, + /// Request that the remote module invoke the reducer `update_pk_u_16` to run as soon as possible, /// registering `callback` to run when we are notified that the reducer completed. /// /// This method returns immediately, and errors only if we are unable to send the request. diff --git a/sdks/rust/tests/test-client/src/module_bindings/update_pk_u_16_type.rs b/sdks/rust/tests/test-client/src/module_bindings/update_pk_u_16_type.rs new file mode 100644 index 00000000000..5709d7b8ea2 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/update_pk_u_16_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct UpdatePkU16 { + pub n: u16, + pub data: i32, +} + +impl __sdk::InModule for UpdatePkU16 { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/update_pk_u_256_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/update_pk_u_256_reducer.rs index e791d6840e4..194132c02a6 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/update_pk_u_256_reducer.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/update_pk_u_256_reducer.rs @@ -25,11 +25,11 @@ impl __sdk::InModule for UpdatePkU256Args { } #[allow(non_camel_case_types)] -/// Extension trait for access to the reducer `update_pk_u256`. +/// Extension trait for access to the reducer `update_pk_u_256`. /// /// Implemented for [`super::RemoteReducers`]. pub trait update_pk_u_256 { - /// Request that the remote module invoke the reducer `update_pk_u256` to run as soon as possible. + /// Request that the remote module invoke the reducer `update_pk_u_256` 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, @@ -39,7 +39,7 @@ pub trait update_pk_u_256 { self.update_pk_u_256_then(n, data, |_, _| {}) } - /// Request that the remote module invoke the reducer `update_pk_u256` to run as soon as possible, + /// Request that the remote module invoke the reducer `update_pk_u_256` to run as soon as possible, /// registering `callback` to run when we are notified that the reducer completed. /// /// This method returns immediately, and errors only if we are unable to send the request. diff --git a/sdks/rust/tests/test-client/src/module_bindings/update_pk_u_256_type.rs b/sdks/rust/tests/test-client/src/module_bindings/update_pk_u_256_type.rs new file mode 100644 index 00000000000..e164802a24b --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/update_pk_u_256_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct UpdatePkU256 { + pub n: __sats::u256, + pub data: i32, +} + +impl __sdk::InModule for UpdatePkU256 { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/update_pk_u_32_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/update_pk_u_32_reducer.rs index 134e93f2612..6f29d4e1b7f 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/update_pk_u_32_reducer.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/update_pk_u_32_reducer.rs @@ -25,11 +25,11 @@ impl __sdk::InModule for UpdatePkU32Args { } #[allow(non_camel_case_types)] -/// Extension trait for access to the reducer `update_pk_u32`. +/// Extension trait for access to the reducer `update_pk_u_32`. /// /// Implemented for [`super::RemoteReducers`]. pub trait update_pk_u_32 { - /// Request that the remote module invoke the reducer `update_pk_u32` to run as soon as possible. + /// Request that the remote module invoke the reducer `update_pk_u_32` 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, @@ -39,7 +39,7 @@ pub trait update_pk_u_32 { self.update_pk_u_32_then(n, data, |_, _| {}) } - /// Request that the remote module invoke the reducer `update_pk_u32` to run as soon as possible, + /// Request that the remote module invoke the reducer `update_pk_u_32` to run as soon as possible, /// registering `callback` to run when we are notified that the reducer completed. /// /// This method returns immediately, and errors only if we are unable to send the request. diff --git a/sdks/rust/tests/test-client/src/module_bindings/update_pk_u_32_two_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/update_pk_u_32_two_reducer.rs index 0ff26c64949..f7d2a868892 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/update_pk_u_32_two_reducer.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/update_pk_u_32_two_reducer.rs @@ -25,11 +25,11 @@ impl __sdk::InModule for UpdatePkU32TwoArgs { } #[allow(non_camel_case_types)] -/// Extension trait for access to the reducer `update_pk_u32_two`. +/// Extension trait for access to the reducer `update_pk_u_32_two`. /// /// Implemented for [`super::RemoteReducers`]. pub trait update_pk_u_32_two { - /// Request that the remote module invoke the reducer `update_pk_u32_two` to run as soon as possible. + /// Request that the remote module invoke the reducer `update_pk_u_32_two` 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, @@ -39,7 +39,7 @@ pub trait update_pk_u_32_two { self.update_pk_u_32_two_then(n, data, |_, _| {}) } - /// Request that the remote module invoke the reducer `update_pk_u32_two` to run as soon as possible, + /// Request that the remote module invoke the reducer `update_pk_u_32_two` to run as soon as possible, /// registering `callback` to run when we are notified that the reducer completed. /// /// This method returns immediately, and errors only if we are unable to send the request. diff --git a/sdks/rust/tests/test-client/src/module_bindings/update_pk_u_32_two_type.rs b/sdks/rust/tests/test-client/src/module_bindings/update_pk_u_32_two_type.rs new file mode 100644 index 00000000000..e1f7652d7ec --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/update_pk_u_32_two_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct UpdatePkU32Two { + pub n: u32, + pub data: i32, +} + +impl __sdk::InModule for UpdatePkU32Two { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/update_pk_u_32_type.rs b/sdks/rust/tests/test-client/src/module_bindings/update_pk_u_32_type.rs new file mode 100644 index 00000000000..a8ef313b64e --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/update_pk_u_32_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct UpdatePkU32 { + pub n: u32, + pub data: i32, +} + +impl __sdk::InModule for UpdatePkU32 { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/update_pk_u_64_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/update_pk_u_64_reducer.rs index 70c0db34a7e..f0765b6ba76 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/update_pk_u_64_reducer.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/update_pk_u_64_reducer.rs @@ -25,11 +25,11 @@ impl __sdk::InModule for UpdatePkU64Args { } #[allow(non_camel_case_types)] -/// Extension trait for access to the reducer `update_pk_u64`. +/// Extension trait for access to the reducer `update_pk_u_64`. /// /// Implemented for [`super::RemoteReducers`]. pub trait update_pk_u_64 { - /// Request that the remote module invoke the reducer `update_pk_u64` to run as soon as possible. + /// Request that the remote module invoke the reducer `update_pk_u_64` 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, @@ -39,7 +39,7 @@ pub trait update_pk_u_64 { self.update_pk_u_64_then(n, data, |_, _| {}) } - /// Request that the remote module invoke the reducer `update_pk_u64` to run as soon as possible, + /// Request that the remote module invoke the reducer `update_pk_u_64` to run as soon as possible, /// registering `callback` to run when we are notified that the reducer completed. /// /// This method returns immediately, and errors only if we are unable to send the request. diff --git a/sdks/rust/tests/test-client/src/module_bindings/update_pk_u_64_type.rs b/sdks/rust/tests/test-client/src/module_bindings/update_pk_u_64_type.rs new file mode 100644 index 00000000000..79feee08c63 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/update_pk_u_64_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct UpdatePkU64 { + pub n: u64, + pub data: i32, +} + +impl __sdk::InModule for UpdatePkU64 { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/update_pk_u_8_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/update_pk_u_8_reducer.rs index cf3ca211296..5f878f520ec 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/update_pk_u_8_reducer.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/update_pk_u_8_reducer.rs @@ -25,11 +25,11 @@ impl __sdk::InModule for UpdatePkU8Args { } #[allow(non_camel_case_types)] -/// Extension trait for access to the reducer `update_pk_u8`. +/// Extension trait for access to the reducer `update_pk_u_8`. /// /// Implemented for [`super::RemoteReducers`]. pub trait update_pk_u_8 { - /// Request that the remote module invoke the reducer `update_pk_u8` to run as soon as possible. + /// Request that the remote module invoke the reducer `update_pk_u_8` 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, @@ -39,7 +39,7 @@ pub trait update_pk_u_8 { self.update_pk_u_8_then(n, data, |_, _| {}) } - /// Request that the remote module invoke the reducer `update_pk_u8` to run as soon as possible, + /// Request that the remote module invoke the reducer `update_pk_u_8` to run as soon as possible, /// registering `callback` to run when we are notified that the reducer completed. /// /// This method returns immediately, and errors only if we are unable to send the request. diff --git a/sdks/rust/tests/test-client/src/module_bindings/update_pk_u_8_type.rs b/sdks/rust/tests/test-client/src/module_bindings/update_pk_u_8_type.rs new file mode 100644 index 00000000000..cd516e72155 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/update_pk_u_8_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct UpdatePkU8 { + pub n: u8, + pub data: i32, +} + +impl __sdk::InModule for UpdatePkU8 { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/update_pk_uuid_type.rs b/sdks/rust/tests/test-client/src/module_bindings/update_pk_uuid_type.rs new file mode 100644 index 00000000000..3d48cb8204c --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/update_pk_uuid_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct UpdatePkUuid { + pub u: __sdk::Uuid, + pub data: i32, +} + +impl __sdk::InModule for UpdatePkUuid { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/update_unique_bool_type.rs b/sdks/rust/tests/test-client/src/module_bindings/update_unique_bool_type.rs new file mode 100644 index 00000000000..cb3352e1c5e --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/update_unique_bool_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct UpdateUniqueBool { + pub b: bool, + pub data: i32, +} + +impl __sdk::InModule for UpdateUniqueBool { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/update_unique_connection_id_type.rs b/sdks/rust/tests/test-client/src/module_bindings/update_unique_connection_id_type.rs new file mode 100644 index 00000000000..5de41211b21 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/update_unique_connection_id_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct UpdateUniqueConnectionId { + pub a: __sdk::ConnectionId, + pub data: i32, +} + +impl __sdk::InModule for UpdateUniqueConnectionId { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/update_unique_i_128_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/update_unique_i_128_reducer.rs index eb4c150ab1f..9d5e0a18022 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/update_unique_i_128_reducer.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/update_unique_i_128_reducer.rs @@ -25,11 +25,11 @@ impl __sdk::InModule for UpdateUniqueI128Args { } #[allow(non_camel_case_types)] -/// Extension trait for access to the reducer `update_unique_i128`. +/// Extension trait for access to the reducer `update_unique_i_128`. /// /// Implemented for [`super::RemoteReducers`]. pub trait update_unique_i_128 { - /// Request that the remote module invoke the reducer `update_unique_i128` to run as soon as possible. + /// Request that the remote module invoke the reducer `update_unique_i_128` 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, @@ -39,7 +39,7 @@ pub trait update_unique_i_128 { self.update_unique_i_128_then(n, data, |_, _| {}) } - /// Request that the remote module invoke the reducer `update_unique_i128` to run as soon as possible, + /// Request that the remote module invoke the reducer `update_unique_i_128` to run as soon as possible, /// registering `callback` to run when we are notified that the reducer completed. /// /// This method returns immediately, and errors only if we are unable to send the request. diff --git a/sdks/rust/tests/test-client/src/module_bindings/update_unique_i_128_type.rs b/sdks/rust/tests/test-client/src/module_bindings/update_unique_i_128_type.rs new file mode 100644 index 00000000000..9fe84d12041 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/update_unique_i_128_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct UpdateUniqueI128 { + pub n: i128, + pub data: i32, +} + +impl __sdk::InModule for UpdateUniqueI128 { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/update_unique_i_16_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/update_unique_i_16_reducer.rs index 4db8228a4e9..efa868e5e81 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/update_unique_i_16_reducer.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/update_unique_i_16_reducer.rs @@ -25,11 +25,11 @@ impl __sdk::InModule for UpdateUniqueI16Args { } #[allow(non_camel_case_types)] -/// Extension trait for access to the reducer `update_unique_i16`. +/// Extension trait for access to the reducer `update_unique_i_16`. /// /// Implemented for [`super::RemoteReducers`]. pub trait update_unique_i_16 { - /// Request that the remote module invoke the reducer `update_unique_i16` to run as soon as possible. + /// Request that the remote module invoke the reducer `update_unique_i_16` 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, @@ -39,7 +39,7 @@ pub trait update_unique_i_16 { self.update_unique_i_16_then(n, data, |_, _| {}) } - /// Request that the remote module invoke the reducer `update_unique_i16` to run as soon as possible, + /// Request that the remote module invoke the reducer `update_unique_i_16` to run as soon as possible, /// registering `callback` to run when we are notified that the reducer completed. /// /// This method returns immediately, and errors only if we are unable to send the request. diff --git a/sdks/rust/tests/test-client/src/module_bindings/update_unique_i_16_type.rs b/sdks/rust/tests/test-client/src/module_bindings/update_unique_i_16_type.rs new file mode 100644 index 00000000000..bd59c33d859 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/update_unique_i_16_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct UpdateUniqueI16 { + pub n: i16, + pub data: i32, +} + +impl __sdk::InModule for UpdateUniqueI16 { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/update_unique_i_256_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/update_unique_i_256_reducer.rs index de9478449c0..3cb6e0a84bf 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/update_unique_i_256_reducer.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/update_unique_i_256_reducer.rs @@ -25,11 +25,11 @@ impl __sdk::InModule for UpdateUniqueI256Args { } #[allow(non_camel_case_types)] -/// Extension trait for access to the reducer `update_unique_i256`. +/// Extension trait for access to the reducer `update_unique_i_256`. /// /// Implemented for [`super::RemoteReducers`]. pub trait update_unique_i_256 { - /// Request that the remote module invoke the reducer `update_unique_i256` to run as soon as possible. + /// Request that the remote module invoke the reducer `update_unique_i_256` 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, @@ -39,7 +39,7 @@ pub trait update_unique_i_256 { self.update_unique_i_256_then(n, data, |_, _| {}) } - /// Request that the remote module invoke the reducer `update_unique_i256` to run as soon as possible, + /// Request that the remote module invoke the reducer `update_unique_i_256` to run as soon as possible, /// registering `callback` to run when we are notified that the reducer completed. /// /// This method returns immediately, and errors only if we are unable to send the request. diff --git a/sdks/rust/tests/test-client/src/module_bindings/update_unique_i_256_type.rs b/sdks/rust/tests/test-client/src/module_bindings/update_unique_i_256_type.rs new file mode 100644 index 00000000000..e370ddd2894 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/update_unique_i_256_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct UpdateUniqueI256 { + pub n: __sats::i256, + pub data: i32, +} + +impl __sdk::InModule for UpdateUniqueI256 { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/update_unique_i_32_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/update_unique_i_32_reducer.rs index ae59bc4626a..dd026538797 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/update_unique_i_32_reducer.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/update_unique_i_32_reducer.rs @@ -25,11 +25,11 @@ impl __sdk::InModule for UpdateUniqueI32Args { } #[allow(non_camel_case_types)] -/// Extension trait for access to the reducer `update_unique_i32`. +/// Extension trait for access to the reducer `update_unique_i_32`. /// /// Implemented for [`super::RemoteReducers`]. pub trait update_unique_i_32 { - /// Request that the remote module invoke the reducer `update_unique_i32` to run as soon as possible. + /// Request that the remote module invoke the reducer `update_unique_i_32` 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, @@ -39,7 +39,7 @@ pub trait update_unique_i_32 { self.update_unique_i_32_then(n, data, |_, _| {}) } - /// Request that the remote module invoke the reducer `update_unique_i32` to run as soon as possible, + /// Request that the remote module invoke the reducer `update_unique_i_32` to run as soon as possible, /// registering `callback` to run when we are notified that the reducer completed. /// /// This method returns immediately, and errors only if we are unable to send the request. diff --git a/sdks/rust/tests/test-client/src/module_bindings/update_unique_i_32_type.rs b/sdks/rust/tests/test-client/src/module_bindings/update_unique_i_32_type.rs new file mode 100644 index 00000000000..27e2077a054 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/update_unique_i_32_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct UpdateUniqueI32 { + pub n: i32, + pub data: i32, +} + +impl __sdk::InModule for UpdateUniqueI32 { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/update_unique_i_64_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/update_unique_i_64_reducer.rs index c42db8e2538..5c76ec62b89 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/update_unique_i_64_reducer.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/update_unique_i_64_reducer.rs @@ -25,11 +25,11 @@ impl __sdk::InModule for UpdateUniqueI64Args { } #[allow(non_camel_case_types)] -/// Extension trait for access to the reducer `update_unique_i64`. +/// Extension trait for access to the reducer `update_unique_i_64`. /// /// Implemented for [`super::RemoteReducers`]. pub trait update_unique_i_64 { - /// Request that the remote module invoke the reducer `update_unique_i64` to run as soon as possible. + /// Request that the remote module invoke the reducer `update_unique_i_64` 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, @@ -39,7 +39,7 @@ pub trait update_unique_i_64 { self.update_unique_i_64_then(n, data, |_, _| {}) } - /// Request that the remote module invoke the reducer `update_unique_i64` to run as soon as possible, + /// Request that the remote module invoke the reducer `update_unique_i_64` to run as soon as possible, /// registering `callback` to run when we are notified that the reducer completed. /// /// This method returns immediately, and errors only if we are unable to send the request. diff --git a/sdks/rust/tests/test-client/src/module_bindings/update_unique_i_64_type.rs b/sdks/rust/tests/test-client/src/module_bindings/update_unique_i_64_type.rs new file mode 100644 index 00000000000..9b06b8fbd2a --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/update_unique_i_64_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct UpdateUniqueI64 { + pub n: i64, + pub data: i32, +} + +impl __sdk::InModule for UpdateUniqueI64 { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/update_unique_i_8_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/update_unique_i_8_reducer.rs index db0c34e020d..83b9ca8ef7f 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/update_unique_i_8_reducer.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/update_unique_i_8_reducer.rs @@ -25,11 +25,11 @@ impl __sdk::InModule for UpdateUniqueI8Args { } #[allow(non_camel_case_types)] -/// Extension trait for access to the reducer `update_unique_i8`. +/// Extension trait for access to the reducer `update_unique_i_8`. /// /// Implemented for [`super::RemoteReducers`]. pub trait update_unique_i_8 { - /// Request that the remote module invoke the reducer `update_unique_i8` to run as soon as possible. + /// Request that the remote module invoke the reducer `update_unique_i_8` 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, @@ -39,7 +39,7 @@ pub trait update_unique_i_8 { self.update_unique_i_8_then(n, data, |_, _| {}) } - /// Request that the remote module invoke the reducer `update_unique_i8` to run as soon as possible, + /// Request that the remote module invoke the reducer `update_unique_i_8` to run as soon as possible, /// registering `callback` to run when we are notified that the reducer completed. /// /// This method returns immediately, and errors only if we are unable to send the request. diff --git a/sdks/rust/tests/test-client/src/module_bindings/update_unique_i_8_type.rs b/sdks/rust/tests/test-client/src/module_bindings/update_unique_i_8_type.rs new file mode 100644 index 00000000000..6f43099818a --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/update_unique_i_8_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct UpdateUniqueI8 { + pub n: i8, + pub data: i32, +} + +impl __sdk::InModule for UpdateUniqueI8 { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/update_unique_identity_type.rs b/sdks/rust/tests/test-client/src/module_bindings/update_unique_identity_type.rs new file mode 100644 index 00000000000..70fc235e054 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/update_unique_identity_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct UpdateUniqueIdentity { + pub i: __sdk::Identity, + pub data: i32, +} + +impl __sdk::InModule for UpdateUniqueIdentity { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/update_unique_string_type.rs b/sdks/rust/tests/test-client/src/module_bindings/update_unique_string_type.rs new file mode 100644 index 00000000000..15c2e24272a --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/update_unique_string_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct UpdateUniqueString { + pub s: String, + pub data: i32, +} + +impl __sdk::InModule for UpdateUniqueString { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/update_unique_u_128_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/update_unique_u_128_reducer.rs index 03b2d2fb75d..a43c5fc1cca 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/update_unique_u_128_reducer.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/update_unique_u_128_reducer.rs @@ -25,11 +25,11 @@ impl __sdk::InModule for UpdateUniqueU128Args { } #[allow(non_camel_case_types)] -/// Extension trait for access to the reducer `update_unique_u128`. +/// Extension trait for access to the reducer `update_unique_u_128`. /// /// Implemented for [`super::RemoteReducers`]. pub trait update_unique_u_128 { - /// Request that the remote module invoke the reducer `update_unique_u128` to run as soon as possible. + /// Request that the remote module invoke the reducer `update_unique_u_128` 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, @@ -39,7 +39,7 @@ pub trait update_unique_u_128 { self.update_unique_u_128_then(n, data, |_, _| {}) } - /// Request that the remote module invoke the reducer `update_unique_u128` to run as soon as possible, + /// Request that the remote module invoke the reducer `update_unique_u_128` to run as soon as possible, /// registering `callback` to run when we are notified that the reducer completed. /// /// This method returns immediately, and errors only if we are unable to send the request. diff --git a/sdks/rust/tests/test-client/src/module_bindings/update_unique_u_128_type.rs b/sdks/rust/tests/test-client/src/module_bindings/update_unique_u_128_type.rs new file mode 100644 index 00000000000..83422f4264a --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/update_unique_u_128_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct UpdateUniqueU128 { + pub n: u128, + pub data: i32, +} + +impl __sdk::InModule for UpdateUniqueU128 { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/update_unique_u_16_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/update_unique_u_16_reducer.rs index 454836ca6d5..ebaa1954361 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/update_unique_u_16_reducer.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/update_unique_u_16_reducer.rs @@ -25,11 +25,11 @@ impl __sdk::InModule for UpdateUniqueU16Args { } #[allow(non_camel_case_types)] -/// Extension trait for access to the reducer `update_unique_u16`. +/// Extension trait for access to the reducer `update_unique_u_16`. /// /// Implemented for [`super::RemoteReducers`]. pub trait update_unique_u_16 { - /// Request that the remote module invoke the reducer `update_unique_u16` to run as soon as possible. + /// Request that the remote module invoke the reducer `update_unique_u_16` 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, @@ -39,7 +39,7 @@ pub trait update_unique_u_16 { self.update_unique_u_16_then(n, data, |_, _| {}) } - /// Request that the remote module invoke the reducer `update_unique_u16` to run as soon as possible, + /// Request that the remote module invoke the reducer `update_unique_u_16` to run as soon as possible, /// registering `callback` to run when we are notified that the reducer completed. /// /// This method returns immediately, and errors only if we are unable to send the request. diff --git a/sdks/rust/tests/test-client/src/module_bindings/update_unique_u_16_type.rs b/sdks/rust/tests/test-client/src/module_bindings/update_unique_u_16_type.rs new file mode 100644 index 00000000000..03caa3b6118 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/update_unique_u_16_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct UpdateUniqueU16 { + pub n: u16, + pub data: i32, +} + +impl __sdk::InModule for UpdateUniqueU16 { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/update_unique_u_256_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/update_unique_u_256_reducer.rs index 4e0bd4dbfac..5dcea25d29a 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/update_unique_u_256_reducer.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/update_unique_u_256_reducer.rs @@ -25,11 +25,11 @@ impl __sdk::InModule for UpdateUniqueU256Args { } #[allow(non_camel_case_types)] -/// Extension trait for access to the reducer `update_unique_u256`. +/// Extension trait for access to the reducer `update_unique_u_256`. /// /// Implemented for [`super::RemoteReducers`]. pub trait update_unique_u_256 { - /// Request that the remote module invoke the reducer `update_unique_u256` to run as soon as possible. + /// Request that the remote module invoke the reducer `update_unique_u_256` 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, @@ -39,7 +39,7 @@ pub trait update_unique_u_256 { self.update_unique_u_256_then(n, data, |_, _| {}) } - /// Request that the remote module invoke the reducer `update_unique_u256` to run as soon as possible, + /// Request that the remote module invoke the reducer `update_unique_u_256` to run as soon as possible, /// registering `callback` to run when we are notified that the reducer completed. /// /// This method returns immediately, and errors only if we are unable to send the request. diff --git a/sdks/rust/tests/test-client/src/module_bindings/update_unique_u_256_type.rs b/sdks/rust/tests/test-client/src/module_bindings/update_unique_u_256_type.rs new file mode 100644 index 00000000000..0e12323a778 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/update_unique_u_256_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct UpdateUniqueU256 { + pub n: __sats::u256, + pub data: i32, +} + +impl __sdk::InModule for UpdateUniqueU256 { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/update_unique_u_32_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/update_unique_u_32_reducer.rs index dd21c16b274..0c18ef1fcb5 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/update_unique_u_32_reducer.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/update_unique_u_32_reducer.rs @@ -25,11 +25,11 @@ impl __sdk::InModule for UpdateUniqueU32Args { } #[allow(non_camel_case_types)] -/// Extension trait for access to the reducer `update_unique_u32`. +/// Extension trait for access to the reducer `update_unique_u_32`. /// /// Implemented for [`super::RemoteReducers`]. pub trait update_unique_u_32 { - /// Request that the remote module invoke the reducer `update_unique_u32` to run as soon as possible. + /// Request that the remote module invoke the reducer `update_unique_u_32` 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, @@ -39,7 +39,7 @@ pub trait update_unique_u_32 { self.update_unique_u_32_then(n, data, |_, _| {}) } - /// Request that the remote module invoke the reducer `update_unique_u32` to run as soon as possible, + /// Request that the remote module invoke the reducer `update_unique_u_32` to run as soon as possible, /// registering `callback` to run when we are notified that the reducer completed. /// /// This method returns immediately, and errors only if we are unable to send the request. diff --git a/sdks/rust/tests/test-client/src/module_bindings/update_unique_u_32_type.rs b/sdks/rust/tests/test-client/src/module_bindings/update_unique_u_32_type.rs new file mode 100644 index 00000000000..b7c5a50f198 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/update_unique_u_32_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct UpdateUniqueU32 { + pub n: u32, + pub data: i32, +} + +impl __sdk::InModule for UpdateUniqueU32 { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/update_unique_u_64_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/update_unique_u_64_reducer.rs index 28638874e3d..65ba07be372 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/update_unique_u_64_reducer.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/update_unique_u_64_reducer.rs @@ -25,11 +25,11 @@ impl __sdk::InModule for UpdateUniqueU64Args { } #[allow(non_camel_case_types)] -/// Extension trait for access to the reducer `update_unique_u64`. +/// Extension trait for access to the reducer `update_unique_u_64`. /// /// Implemented for [`super::RemoteReducers`]. pub trait update_unique_u_64 { - /// Request that the remote module invoke the reducer `update_unique_u64` to run as soon as possible. + /// Request that the remote module invoke the reducer `update_unique_u_64` 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, @@ -39,7 +39,7 @@ pub trait update_unique_u_64 { self.update_unique_u_64_then(n, data, |_, _| {}) } - /// Request that the remote module invoke the reducer `update_unique_u64` to run as soon as possible, + /// Request that the remote module invoke the reducer `update_unique_u_64` to run as soon as possible, /// registering `callback` to run when we are notified that the reducer completed. /// /// This method returns immediately, and errors only if we are unable to send the request. diff --git a/sdks/rust/tests/test-client/src/module_bindings/update_unique_u_64_type.rs b/sdks/rust/tests/test-client/src/module_bindings/update_unique_u_64_type.rs new file mode 100644 index 00000000000..f35d555bd3e --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/update_unique_u_64_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct UpdateUniqueU64 { + pub n: u64, + pub data: i32, +} + +impl __sdk::InModule for UpdateUniqueU64 { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/update_unique_u_8_reducer.rs b/sdks/rust/tests/test-client/src/module_bindings/update_unique_u_8_reducer.rs index f599906959c..fde01c71114 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/update_unique_u_8_reducer.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/update_unique_u_8_reducer.rs @@ -25,11 +25,11 @@ impl __sdk::InModule for UpdateUniqueU8Args { } #[allow(non_camel_case_types)] -/// Extension trait for access to the reducer `update_unique_u8`. +/// Extension trait for access to the reducer `update_unique_u_8`. /// /// Implemented for [`super::RemoteReducers`]. pub trait update_unique_u_8 { - /// Request that the remote module invoke the reducer `update_unique_u8` to run as soon as possible. + /// Request that the remote module invoke the reducer `update_unique_u_8` 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, @@ -39,7 +39,7 @@ pub trait update_unique_u_8 { self.update_unique_u_8_then(n, data, |_, _| {}) } - /// Request that the remote module invoke the reducer `update_unique_u8` to run as soon as possible, + /// Request that the remote module invoke the reducer `update_unique_u_8` to run as soon as possible, /// registering `callback` to run when we are notified that the reducer completed. /// /// This method returns immediately, and errors only if we are unable to send the request. diff --git a/sdks/rust/tests/test-client/src/module_bindings/update_unique_u_8_type.rs b/sdks/rust/tests/test-client/src/module_bindings/update_unique_u_8_type.rs new file mode 100644 index 00000000000..23684555c91 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/update_unique_u_8_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct UpdateUniqueU8 { + pub n: u8, + pub data: i32, +} + +impl __sdk::InModule for UpdateUniqueU8 { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/update_unique_uuid_type.rs b/sdks/rust/tests/test-client/src/module_bindings/update_unique_uuid_type.rs new file mode 100644 index 00000000000..e51520863f4 --- /dev/null +++ b/sdks/rust/tests/test-client/src/module_bindings/update_unique_uuid_type.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct UpdateUniqueUuid { + pub u: __sdk::Uuid, + pub data: i32, +} + +impl __sdk::InModule for UpdateUniqueUuid { + type Module = super::RemoteModule; +} diff --git a/sdks/rust/tests/test-client/src/module_bindings/vec_f_32_table.rs b/sdks/rust/tests/test-client/src/module_bindings/vec_f_32_table.rs index 32d2e642365..231d8e59727 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/vec_f_32_table.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/vec_f_32_table.rs @@ -5,7 +5,7 @@ use super::vec_f_32_type::VecF32; use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; -/// Table handle for the table `vec_f32`. +/// Table handle for the table `vec_f_32`. /// /// Obtain a handle from the [`VecF32TableAccess::vec_f_32`] method on [`super::RemoteTables`], /// like `ctx.db.vec_f_32()`. @@ -19,19 +19,19 @@ pub struct VecF32TableHandle<'ctx> { } #[allow(non_camel_case_types)] -/// Extension trait for access to the table `vec_f32`. +/// Extension trait for access to the table `vec_f_32`. /// /// Implemented for [`super::RemoteTables`]. pub trait VecF32TableAccess { #[allow(non_snake_case)] - /// Obtain a [`VecF32TableHandle`], which mediates access to the table `vec_f32`. + /// Obtain a [`VecF32TableHandle`], which mediates access to the table `vec_f_32`. fn vec_f_32(&self) -> VecF32TableHandle<'_>; } impl VecF32TableAccess for super::RemoteTables { fn vec_f_32(&self) -> VecF32TableHandle<'_> { VecF32TableHandle { - imp: self.imp.get_table::("vec_f32"), + imp: self.imp.get_table::("vec_f_32"), ctx: std::marker::PhantomData, } } @@ -80,7 +80,7 @@ impl<'ctx> __sdk::Table for VecF32TableHandle<'ctx> { #[doc(hidden)] pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { - let _table = client_cache.get_or_make_table::("vec_f32"); + let _table = client_cache.get_or_make_table::("vec_f_32"); } #[doc(hidden)] diff --git a/sdks/rust/tests/test-client/src/module_bindings/vec_f_64_table.rs b/sdks/rust/tests/test-client/src/module_bindings/vec_f_64_table.rs index ac573fa2551..5143308578f 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/vec_f_64_table.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/vec_f_64_table.rs @@ -5,7 +5,7 @@ use super::vec_f_64_type::VecF64; use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; -/// Table handle for the table `vec_f64`. +/// Table handle for the table `vec_f_64`. /// /// Obtain a handle from the [`VecF64TableAccess::vec_f_64`] method on [`super::RemoteTables`], /// like `ctx.db.vec_f_64()`. @@ -19,19 +19,19 @@ pub struct VecF64TableHandle<'ctx> { } #[allow(non_camel_case_types)] -/// Extension trait for access to the table `vec_f64`. +/// Extension trait for access to the table `vec_f_64`. /// /// Implemented for [`super::RemoteTables`]. pub trait VecF64TableAccess { #[allow(non_snake_case)] - /// Obtain a [`VecF64TableHandle`], which mediates access to the table `vec_f64`. + /// Obtain a [`VecF64TableHandle`], which mediates access to the table `vec_f_64`. fn vec_f_64(&self) -> VecF64TableHandle<'_>; } impl VecF64TableAccess for super::RemoteTables { fn vec_f_64(&self) -> VecF64TableHandle<'_> { VecF64TableHandle { - imp: self.imp.get_table::("vec_f64"), + imp: self.imp.get_table::("vec_f_64"), ctx: std::marker::PhantomData, } } @@ -80,7 +80,7 @@ impl<'ctx> __sdk::Table for VecF64TableHandle<'ctx> { #[doc(hidden)] pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { - let _table = client_cache.get_or_make_table::("vec_f64"); + let _table = client_cache.get_or_make_table::("vec_f_64"); } #[doc(hidden)] diff --git a/sdks/rust/tests/test-client/src/module_bindings/vec_i_128_table.rs b/sdks/rust/tests/test-client/src/module_bindings/vec_i_128_table.rs index c6c6c645354..f98334f6ca1 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/vec_i_128_table.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/vec_i_128_table.rs @@ -5,7 +5,7 @@ use super::vec_i_128_type::VecI128; use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; -/// Table handle for the table `vec_i128`. +/// Table handle for the table `vec_i_128`. /// /// Obtain a handle from the [`VecI128TableAccess::vec_i_128`] method on [`super::RemoteTables`], /// like `ctx.db.vec_i_128()`. @@ -19,19 +19,19 @@ pub struct VecI128TableHandle<'ctx> { } #[allow(non_camel_case_types)] -/// Extension trait for access to the table `vec_i128`. +/// Extension trait for access to the table `vec_i_128`. /// /// Implemented for [`super::RemoteTables`]. pub trait VecI128TableAccess { #[allow(non_snake_case)] - /// Obtain a [`VecI128TableHandle`], which mediates access to the table `vec_i128`. + /// Obtain a [`VecI128TableHandle`], which mediates access to the table `vec_i_128`. fn vec_i_128(&self) -> VecI128TableHandle<'_>; } impl VecI128TableAccess for super::RemoteTables { fn vec_i_128(&self) -> VecI128TableHandle<'_> { VecI128TableHandle { - imp: self.imp.get_table::("vec_i128"), + imp: self.imp.get_table::("vec_i_128"), ctx: std::marker::PhantomData, } } @@ -80,7 +80,7 @@ impl<'ctx> __sdk::Table for VecI128TableHandle<'ctx> { #[doc(hidden)] pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { - let _table = client_cache.get_or_make_table::("vec_i128"); + let _table = client_cache.get_or_make_table::("vec_i_128"); } #[doc(hidden)] diff --git a/sdks/rust/tests/test-client/src/module_bindings/vec_i_16_table.rs b/sdks/rust/tests/test-client/src/module_bindings/vec_i_16_table.rs index 7d95a345423..85733567367 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/vec_i_16_table.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/vec_i_16_table.rs @@ -5,7 +5,7 @@ use super::vec_i_16_type::VecI16; use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; -/// Table handle for the table `vec_i16`. +/// Table handle for the table `vec_i_16`. /// /// Obtain a handle from the [`VecI16TableAccess::vec_i_16`] method on [`super::RemoteTables`], /// like `ctx.db.vec_i_16()`. @@ -19,19 +19,19 @@ pub struct VecI16TableHandle<'ctx> { } #[allow(non_camel_case_types)] -/// Extension trait for access to the table `vec_i16`. +/// Extension trait for access to the table `vec_i_16`. /// /// Implemented for [`super::RemoteTables`]. pub trait VecI16TableAccess { #[allow(non_snake_case)] - /// Obtain a [`VecI16TableHandle`], which mediates access to the table `vec_i16`. + /// Obtain a [`VecI16TableHandle`], which mediates access to the table `vec_i_16`. fn vec_i_16(&self) -> VecI16TableHandle<'_>; } impl VecI16TableAccess for super::RemoteTables { fn vec_i_16(&self) -> VecI16TableHandle<'_> { VecI16TableHandle { - imp: self.imp.get_table::("vec_i16"), + imp: self.imp.get_table::("vec_i_16"), ctx: std::marker::PhantomData, } } @@ -80,7 +80,7 @@ impl<'ctx> __sdk::Table for VecI16TableHandle<'ctx> { #[doc(hidden)] pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { - let _table = client_cache.get_or_make_table::("vec_i16"); + let _table = client_cache.get_or_make_table::("vec_i_16"); } #[doc(hidden)] diff --git a/sdks/rust/tests/test-client/src/module_bindings/vec_i_256_table.rs b/sdks/rust/tests/test-client/src/module_bindings/vec_i_256_table.rs index 48bd2e7ffc4..7b4bd12563b 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/vec_i_256_table.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/vec_i_256_table.rs @@ -5,7 +5,7 @@ use super::vec_i_256_type::VecI256; use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; -/// Table handle for the table `vec_i256`. +/// Table handle for the table `vec_i_256`. /// /// Obtain a handle from the [`VecI256TableAccess::vec_i_256`] method on [`super::RemoteTables`], /// like `ctx.db.vec_i_256()`. @@ -19,19 +19,19 @@ pub struct VecI256TableHandle<'ctx> { } #[allow(non_camel_case_types)] -/// Extension trait for access to the table `vec_i256`. +/// Extension trait for access to the table `vec_i_256`. /// /// Implemented for [`super::RemoteTables`]. pub trait VecI256TableAccess { #[allow(non_snake_case)] - /// Obtain a [`VecI256TableHandle`], which mediates access to the table `vec_i256`. + /// Obtain a [`VecI256TableHandle`], which mediates access to the table `vec_i_256`. fn vec_i_256(&self) -> VecI256TableHandle<'_>; } impl VecI256TableAccess for super::RemoteTables { fn vec_i_256(&self) -> VecI256TableHandle<'_> { VecI256TableHandle { - imp: self.imp.get_table::("vec_i256"), + imp: self.imp.get_table::("vec_i_256"), ctx: std::marker::PhantomData, } } @@ -80,7 +80,7 @@ impl<'ctx> __sdk::Table for VecI256TableHandle<'ctx> { #[doc(hidden)] pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { - let _table = client_cache.get_or_make_table::("vec_i256"); + let _table = client_cache.get_or_make_table::("vec_i_256"); } #[doc(hidden)] diff --git a/sdks/rust/tests/test-client/src/module_bindings/vec_i_32_table.rs b/sdks/rust/tests/test-client/src/module_bindings/vec_i_32_table.rs index da6b9a4b1ce..f59958fb24c 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/vec_i_32_table.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/vec_i_32_table.rs @@ -5,7 +5,7 @@ use super::vec_i_32_type::VecI32; use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; -/// Table handle for the table `vec_i32`. +/// Table handle for the table `vec_i_32`. /// /// Obtain a handle from the [`VecI32TableAccess::vec_i_32`] method on [`super::RemoteTables`], /// like `ctx.db.vec_i_32()`. @@ -19,19 +19,19 @@ pub struct VecI32TableHandle<'ctx> { } #[allow(non_camel_case_types)] -/// Extension trait for access to the table `vec_i32`. +/// Extension trait for access to the table `vec_i_32`. /// /// Implemented for [`super::RemoteTables`]. pub trait VecI32TableAccess { #[allow(non_snake_case)] - /// Obtain a [`VecI32TableHandle`], which mediates access to the table `vec_i32`. + /// Obtain a [`VecI32TableHandle`], which mediates access to the table `vec_i_32`. fn vec_i_32(&self) -> VecI32TableHandle<'_>; } impl VecI32TableAccess for super::RemoteTables { fn vec_i_32(&self) -> VecI32TableHandle<'_> { VecI32TableHandle { - imp: self.imp.get_table::("vec_i32"), + imp: self.imp.get_table::("vec_i_32"), ctx: std::marker::PhantomData, } } @@ -80,7 +80,7 @@ impl<'ctx> __sdk::Table for VecI32TableHandle<'ctx> { #[doc(hidden)] pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { - let _table = client_cache.get_or_make_table::("vec_i32"); + let _table = client_cache.get_or_make_table::("vec_i_32"); } #[doc(hidden)] diff --git a/sdks/rust/tests/test-client/src/module_bindings/vec_i_64_table.rs b/sdks/rust/tests/test-client/src/module_bindings/vec_i_64_table.rs index c3215593093..05cc967e07a 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/vec_i_64_table.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/vec_i_64_table.rs @@ -5,7 +5,7 @@ use super::vec_i_64_type::VecI64; use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; -/// Table handle for the table `vec_i64`. +/// Table handle for the table `vec_i_64`. /// /// Obtain a handle from the [`VecI64TableAccess::vec_i_64`] method on [`super::RemoteTables`], /// like `ctx.db.vec_i_64()`. @@ -19,19 +19,19 @@ pub struct VecI64TableHandle<'ctx> { } #[allow(non_camel_case_types)] -/// Extension trait for access to the table `vec_i64`. +/// Extension trait for access to the table `vec_i_64`. /// /// Implemented for [`super::RemoteTables`]. pub trait VecI64TableAccess { #[allow(non_snake_case)] - /// Obtain a [`VecI64TableHandle`], which mediates access to the table `vec_i64`. + /// Obtain a [`VecI64TableHandle`], which mediates access to the table `vec_i_64`. fn vec_i_64(&self) -> VecI64TableHandle<'_>; } impl VecI64TableAccess for super::RemoteTables { fn vec_i_64(&self) -> VecI64TableHandle<'_> { VecI64TableHandle { - imp: self.imp.get_table::("vec_i64"), + imp: self.imp.get_table::("vec_i_64"), ctx: std::marker::PhantomData, } } @@ -80,7 +80,7 @@ impl<'ctx> __sdk::Table for VecI64TableHandle<'ctx> { #[doc(hidden)] pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { - let _table = client_cache.get_or_make_table::("vec_i64"); + let _table = client_cache.get_or_make_table::("vec_i_64"); } #[doc(hidden)] diff --git a/sdks/rust/tests/test-client/src/module_bindings/vec_i_8_table.rs b/sdks/rust/tests/test-client/src/module_bindings/vec_i_8_table.rs index fc82b4f26d7..b64def2b8c3 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/vec_i_8_table.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/vec_i_8_table.rs @@ -5,7 +5,7 @@ use super::vec_i_8_type::VecI8; use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; -/// Table handle for the table `vec_i8`. +/// Table handle for the table `vec_i_8`. /// /// Obtain a handle from the [`VecI8TableAccess::vec_i_8`] method on [`super::RemoteTables`], /// like `ctx.db.vec_i_8()`. @@ -19,19 +19,19 @@ pub struct VecI8TableHandle<'ctx> { } #[allow(non_camel_case_types)] -/// Extension trait for access to the table `vec_i8`. +/// Extension trait for access to the table `vec_i_8`. /// /// Implemented for [`super::RemoteTables`]. pub trait VecI8TableAccess { #[allow(non_snake_case)] - /// Obtain a [`VecI8TableHandle`], which mediates access to the table `vec_i8`. + /// Obtain a [`VecI8TableHandle`], which mediates access to the table `vec_i_8`. fn vec_i_8(&self) -> VecI8TableHandle<'_>; } impl VecI8TableAccess for super::RemoteTables { fn vec_i_8(&self) -> VecI8TableHandle<'_> { VecI8TableHandle { - imp: self.imp.get_table::("vec_i8"), + imp: self.imp.get_table::("vec_i_8"), ctx: std::marker::PhantomData, } } @@ -80,7 +80,7 @@ impl<'ctx> __sdk::Table for VecI8TableHandle<'ctx> { #[doc(hidden)] pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { - let _table = client_cache.get_or_make_table::("vec_i8"); + let _table = client_cache.get_or_make_table::("vec_i_8"); } #[doc(hidden)] diff --git a/sdks/rust/tests/test-client/src/module_bindings/vec_u_128_table.rs b/sdks/rust/tests/test-client/src/module_bindings/vec_u_128_table.rs index 68c23c82a57..36853f5c24d 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/vec_u_128_table.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/vec_u_128_table.rs @@ -5,7 +5,7 @@ use super::vec_u_128_type::VecU128; use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; -/// Table handle for the table `vec_u128`. +/// Table handle for the table `vec_u_128`. /// /// Obtain a handle from the [`VecU128TableAccess::vec_u_128`] method on [`super::RemoteTables`], /// like `ctx.db.vec_u_128()`. @@ -19,19 +19,19 @@ pub struct VecU128TableHandle<'ctx> { } #[allow(non_camel_case_types)] -/// Extension trait for access to the table `vec_u128`. +/// Extension trait for access to the table `vec_u_128`. /// /// Implemented for [`super::RemoteTables`]. pub trait VecU128TableAccess { #[allow(non_snake_case)] - /// Obtain a [`VecU128TableHandle`], which mediates access to the table `vec_u128`. + /// Obtain a [`VecU128TableHandle`], which mediates access to the table `vec_u_128`. fn vec_u_128(&self) -> VecU128TableHandle<'_>; } impl VecU128TableAccess for super::RemoteTables { fn vec_u_128(&self) -> VecU128TableHandle<'_> { VecU128TableHandle { - imp: self.imp.get_table::("vec_u128"), + imp: self.imp.get_table::("vec_u_128"), ctx: std::marker::PhantomData, } } @@ -80,7 +80,7 @@ impl<'ctx> __sdk::Table for VecU128TableHandle<'ctx> { #[doc(hidden)] pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { - let _table = client_cache.get_or_make_table::("vec_u128"); + let _table = client_cache.get_or_make_table::("vec_u_128"); } #[doc(hidden)] diff --git a/sdks/rust/tests/test-client/src/module_bindings/vec_u_16_table.rs b/sdks/rust/tests/test-client/src/module_bindings/vec_u_16_table.rs index 23aeb6fffc8..f7ecd19403d 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/vec_u_16_table.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/vec_u_16_table.rs @@ -5,7 +5,7 @@ use super::vec_u_16_type::VecU16; use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; -/// Table handle for the table `vec_u16`. +/// Table handle for the table `vec_u_16`. /// /// Obtain a handle from the [`VecU16TableAccess::vec_u_16`] method on [`super::RemoteTables`], /// like `ctx.db.vec_u_16()`. @@ -19,19 +19,19 @@ pub struct VecU16TableHandle<'ctx> { } #[allow(non_camel_case_types)] -/// Extension trait for access to the table `vec_u16`. +/// Extension trait for access to the table `vec_u_16`. /// /// Implemented for [`super::RemoteTables`]. pub trait VecU16TableAccess { #[allow(non_snake_case)] - /// Obtain a [`VecU16TableHandle`], which mediates access to the table `vec_u16`. + /// Obtain a [`VecU16TableHandle`], which mediates access to the table `vec_u_16`. fn vec_u_16(&self) -> VecU16TableHandle<'_>; } impl VecU16TableAccess for super::RemoteTables { fn vec_u_16(&self) -> VecU16TableHandle<'_> { VecU16TableHandle { - imp: self.imp.get_table::("vec_u16"), + imp: self.imp.get_table::("vec_u_16"), ctx: std::marker::PhantomData, } } @@ -80,7 +80,7 @@ impl<'ctx> __sdk::Table for VecU16TableHandle<'ctx> { #[doc(hidden)] pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { - let _table = client_cache.get_or_make_table::("vec_u16"); + let _table = client_cache.get_or_make_table::("vec_u_16"); } #[doc(hidden)] diff --git a/sdks/rust/tests/test-client/src/module_bindings/vec_u_256_table.rs b/sdks/rust/tests/test-client/src/module_bindings/vec_u_256_table.rs index 4b1ddc07853..f50f8663c1a 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/vec_u_256_table.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/vec_u_256_table.rs @@ -5,7 +5,7 @@ use super::vec_u_256_type::VecU256; use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; -/// Table handle for the table `vec_u256`. +/// Table handle for the table `vec_u_256`. /// /// Obtain a handle from the [`VecU256TableAccess::vec_u_256`] method on [`super::RemoteTables`], /// like `ctx.db.vec_u_256()`. @@ -19,19 +19,19 @@ pub struct VecU256TableHandle<'ctx> { } #[allow(non_camel_case_types)] -/// Extension trait for access to the table `vec_u256`. +/// Extension trait for access to the table `vec_u_256`. /// /// Implemented for [`super::RemoteTables`]. pub trait VecU256TableAccess { #[allow(non_snake_case)] - /// Obtain a [`VecU256TableHandle`], which mediates access to the table `vec_u256`. + /// Obtain a [`VecU256TableHandle`], which mediates access to the table `vec_u_256`. fn vec_u_256(&self) -> VecU256TableHandle<'_>; } impl VecU256TableAccess for super::RemoteTables { fn vec_u_256(&self) -> VecU256TableHandle<'_> { VecU256TableHandle { - imp: self.imp.get_table::("vec_u256"), + imp: self.imp.get_table::("vec_u_256"), ctx: std::marker::PhantomData, } } @@ -80,7 +80,7 @@ impl<'ctx> __sdk::Table for VecU256TableHandle<'ctx> { #[doc(hidden)] pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { - let _table = client_cache.get_or_make_table::("vec_u256"); + let _table = client_cache.get_or_make_table::("vec_u_256"); } #[doc(hidden)] diff --git a/sdks/rust/tests/test-client/src/module_bindings/vec_u_32_table.rs b/sdks/rust/tests/test-client/src/module_bindings/vec_u_32_table.rs index 47f8aa32c4c..18f87cfd296 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/vec_u_32_table.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/vec_u_32_table.rs @@ -5,7 +5,7 @@ use super::vec_u_32_type::VecU32; use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; -/// Table handle for the table `vec_u32`. +/// Table handle for the table `vec_u_32`. /// /// Obtain a handle from the [`VecU32TableAccess::vec_u_32`] method on [`super::RemoteTables`], /// like `ctx.db.vec_u_32()`. @@ -19,19 +19,19 @@ pub struct VecU32TableHandle<'ctx> { } #[allow(non_camel_case_types)] -/// Extension trait for access to the table `vec_u32`. +/// Extension trait for access to the table `vec_u_32`. /// /// Implemented for [`super::RemoteTables`]. pub trait VecU32TableAccess { #[allow(non_snake_case)] - /// Obtain a [`VecU32TableHandle`], which mediates access to the table `vec_u32`. + /// Obtain a [`VecU32TableHandle`], which mediates access to the table `vec_u_32`. fn vec_u_32(&self) -> VecU32TableHandle<'_>; } impl VecU32TableAccess for super::RemoteTables { fn vec_u_32(&self) -> VecU32TableHandle<'_> { VecU32TableHandle { - imp: self.imp.get_table::("vec_u32"), + imp: self.imp.get_table::("vec_u_32"), ctx: std::marker::PhantomData, } } @@ -80,7 +80,7 @@ impl<'ctx> __sdk::Table for VecU32TableHandle<'ctx> { #[doc(hidden)] pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { - let _table = client_cache.get_or_make_table::("vec_u32"); + let _table = client_cache.get_or_make_table::("vec_u_32"); } #[doc(hidden)] diff --git a/sdks/rust/tests/test-client/src/module_bindings/vec_u_64_table.rs b/sdks/rust/tests/test-client/src/module_bindings/vec_u_64_table.rs index 83bf117b4a4..ab9bd053a05 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/vec_u_64_table.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/vec_u_64_table.rs @@ -5,7 +5,7 @@ use super::vec_u_64_type::VecU64; use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; -/// Table handle for the table `vec_u64`. +/// Table handle for the table `vec_u_64`. /// /// Obtain a handle from the [`VecU64TableAccess::vec_u_64`] method on [`super::RemoteTables`], /// like `ctx.db.vec_u_64()`. @@ -19,19 +19,19 @@ pub struct VecU64TableHandle<'ctx> { } #[allow(non_camel_case_types)] -/// Extension trait for access to the table `vec_u64`. +/// Extension trait for access to the table `vec_u_64`. /// /// Implemented for [`super::RemoteTables`]. pub trait VecU64TableAccess { #[allow(non_snake_case)] - /// Obtain a [`VecU64TableHandle`], which mediates access to the table `vec_u64`. + /// Obtain a [`VecU64TableHandle`], which mediates access to the table `vec_u_64`. fn vec_u_64(&self) -> VecU64TableHandle<'_>; } impl VecU64TableAccess for super::RemoteTables { fn vec_u_64(&self) -> VecU64TableHandle<'_> { VecU64TableHandle { - imp: self.imp.get_table::("vec_u64"), + imp: self.imp.get_table::("vec_u_64"), ctx: std::marker::PhantomData, } } @@ -80,7 +80,7 @@ impl<'ctx> __sdk::Table for VecU64TableHandle<'ctx> { #[doc(hidden)] pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { - let _table = client_cache.get_or_make_table::("vec_u64"); + let _table = client_cache.get_or_make_table::("vec_u_64"); } #[doc(hidden)] diff --git a/sdks/rust/tests/test-client/src/module_bindings/vec_u_8_table.rs b/sdks/rust/tests/test-client/src/module_bindings/vec_u_8_table.rs index 3e6de574b4d..54184da6ba5 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/vec_u_8_table.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/vec_u_8_table.rs @@ -5,7 +5,7 @@ use super::vec_u_8_type::VecU8; use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; -/// Table handle for the table `vec_u8`. +/// Table handle for the table `vec_u_8`. /// /// Obtain a handle from the [`VecU8TableAccess::vec_u_8`] method on [`super::RemoteTables`], /// like `ctx.db.vec_u_8()`. @@ -19,19 +19,19 @@ pub struct VecU8TableHandle<'ctx> { } #[allow(non_camel_case_types)] -/// Extension trait for access to the table `vec_u8`. +/// Extension trait for access to the table `vec_u_8`. /// /// Implemented for [`super::RemoteTables`]. pub trait VecU8TableAccess { #[allow(non_snake_case)] - /// Obtain a [`VecU8TableHandle`], which mediates access to the table `vec_u8`. + /// Obtain a [`VecU8TableHandle`], which mediates access to the table `vec_u_8`. fn vec_u_8(&self) -> VecU8TableHandle<'_>; } impl VecU8TableAccess for super::RemoteTables { fn vec_u_8(&self) -> VecU8TableHandle<'_> { VecU8TableHandle { - imp: self.imp.get_table::("vec_u8"), + imp: self.imp.get_table::("vec_u_8"), ctx: std::marker::PhantomData, } } @@ -80,7 +80,7 @@ impl<'ctx> __sdk::Table for VecU8TableHandle<'ctx> { #[doc(hidden)] pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { - let _table = client_cache.get_or_make_table::("vec_u8"); + let _table = client_cache.get_or_make_table::("vec_u_8"); } #[doc(hidden)] diff --git a/sdks/rust/tests/view-client/src/module_bindings/mod.rs b/sdks/rust/tests/view-client/src/module_bindings/mod.rs index 3af09da01cb..522428b9c06 100644 --- a/sdks/rust/tests/view-client/src/module_bindings/mod.rs +++ b/sdks/rust/tests/view-client/src/module_bindings/mod.rs @@ -1,7 +1,7 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE // WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. -// This was generated using spacetimedb cli version 2.0.0 (commit 9e0e81a6aaec6bf3619cfb9f7916743d86ab7ffc). +// This was generated using spacetimedb cli version 2.0.0 (commit 9ff95757316cdd120699ca8fcabecbd13eb24157). #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; From e528393902d8cc982769e3b1a0f250d7d53edfa1 Mon Sep 17 00:00:00 2001 From: Shubham Mishra Date: Thu, 19 Feb 2026 11:40:20 +0530 Subject: [PATCH 104/133] ts-regen --- .../src/sdk/client_api/index.ts | 4 ++-- .../test-app/src/module_bindings/index.ts | 24 +++++-------------- .../src/module_bindings/index.ts | 2 +- .../src/module_bindings/types/index.ts | 13 ++++++++++ .../src/module_bindings/types/procedures.ts | 8 +++++++ .../src/module_bindings/types/reducers.ts | 13 ++++++++++ 6 files changed, 43 insertions(+), 21 deletions(-) create mode 100644 crates/bindings-typescript/test-react-router-app/src/module_bindings/types/index.ts create mode 100644 crates/bindings-typescript/test-react-router-app/src/module_bindings/types/procedures.ts create mode 100644 crates/bindings-typescript/test-react-router-app/src/module_bindings/types/reducers.ts diff --git a/crates/bindings-typescript/src/sdk/client_api/index.ts b/crates/bindings-typescript/src/sdk/client_api/index.ts index a27520b5b07..c640197427d 100644 --- a/crates/bindings-typescript/src/sdk/client_api/index.ts +++ b/crates/bindings-typescript/src/sdk/client_api/index.ts @@ -91,10 +91,10 @@ export type SubscriptionHandle = __SubscriptionHandleImpl; /** Builder class to configure a new subscription to the remote SpacetimeDB instance. */ export class SubscriptionBuilder extends __SubscriptionBuilderImpl< typeof REMOTE_MODULE -> { } +> {} /** Builder class to configure a new database connection to the remote SpacetimeDB instance. */ -export class DbConnectionBuilder extends __DbConnectionBuilder { } +export class DbConnectionBuilder extends __DbConnectionBuilder {} /** The typed database connection to manage connections to the remote SpacetimeDB instance. This class has type information specific to the generated module. */ export class DbConnection extends __DbConnectionImpl { diff --git a/crates/bindings-typescript/test-app/src/module_bindings/index.ts b/crates/bindings-typescript/test-app/src/module_bindings/index.ts index 2ef30cf13eb..7aea5a85586 100644 --- a/crates/bindings-typescript/test-app/src/module_bindings/index.ts +++ b/crates/bindings-typescript/test-app/src/module_bindings/index.ts @@ -1,7 +1,7 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE // WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. -// This was generated using spacetimedb cli version 2.0.0 (commit 98cb84ff20f3d37dc683c3d3c13ad2cb2bb34fc2). +// This was generated using spacetimedb cli version 2.0.0 (commit ed2408b3d1fb8b634b143fcc289b8bfda5d385ee). /* eslint-disable */ /* tslint:disable */ @@ -50,9 +50,7 @@ const tablesSchema = __schema({ player: __table( { name: 'player', - indexes: [ - { name: 'player_id_idx_btree', algorithm: 'btree', columns: ['id'] }, - ], + indexes: [{ name: 'id', algorithm: 'btree', columns: ['id'] }], constraints: [ { name: 'player_id_key', constraint: 'unique', columns: ['id'] }, ], @@ -62,13 +60,7 @@ const tablesSchema = __schema({ unindexed_player: __table( { name: 'unindexed_player', - indexes: [ - { - name: 'unindexed_player_id_idx_btree', - algorithm: 'btree', - columns: ['id'], - }, - ], + indexes: [{ name: 'id', algorithm: 'btree', columns: ['id'] }], constraints: [ { name: 'unindexed_player_id_key', @@ -83,11 +75,7 @@ const tablesSchema = __schema({ { name: 'user', indexes: [ - { - name: 'user_identity_idx_btree', - algorithm: 'btree', - columns: ['identity'], - }, + { name: 'identity', algorithm: 'btree', columns: ['identity'] }, ], constraints: [ { @@ -150,10 +138,10 @@ export type SubscriptionHandle = __SubscriptionHandleImpl; /** Builder class to configure a new subscription to the remote SpacetimeDB instance. */ export class SubscriptionBuilder extends __SubscriptionBuilderImpl< typeof REMOTE_MODULE -> { } +> {} /** Builder class to configure a new database connection to the remote SpacetimeDB instance. */ -export class DbConnectionBuilder extends __DbConnectionBuilder { } +export class DbConnectionBuilder extends __DbConnectionBuilder {} /** The typed database connection to manage connections to the remote SpacetimeDB instance. This class has type information specific to the generated module. */ export class DbConnection extends __DbConnectionImpl { diff --git a/crates/bindings-typescript/test-react-router-app/src/module_bindings/index.ts b/crates/bindings-typescript/test-react-router-app/src/module_bindings/index.ts index dce7e5eee76..780ae5dfb34 100644 --- a/crates/bindings-typescript/test-react-router-app/src/module_bindings/index.ts +++ b/crates/bindings-typescript/test-react-router-app/src/module_bindings/index.ts @@ -1,7 +1,7 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE // WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. -// This was generated using spacetimedb cli version 2.0.0 (commit 9e0e81a6aaec6bf3619cfb9f7916743d86ab7ffc). +// This was generated using spacetimedb cli version 2.0.0 (commit ed2408b3d1fb8b634b143fcc289b8bfda5d385ee). /* eslint-disable */ /* tslint:disable */ diff --git a/crates/bindings-typescript/test-react-router-app/src/module_bindings/types/index.ts b/crates/bindings-typescript/test-react-router-app/src/module_bindings/types/index.ts new file mode 100644 index 00000000000..971fd23a7e8 --- /dev/null +++ b/crates/bindings-typescript/test-react-router-app/src/module_bindings/types/index.ts @@ -0,0 +1,13 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +/* eslint-disable */ +/* tslint:disable */ +import { type Infer as __Infer } from '../../../../src/index'; + +// Import all non-reducer types +import Counter from '../counter_type'; +import User from '../user_type'; + +export type Counter = __Infer; +export type User = __Infer; diff --git a/crates/bindings-typescript/test-react-router-app/src/module_bindings/types/procedures.ts b/crates/bindings-typescript/test-react-router-app/src/module_bindings/types/procedures.ts new file mode 100644 index 00000000000..a39363a990e --- /dev/null +++ b/crates/bindings-typescript/test-react-router-app/src/module_bindings/types/procedures.ts @@ -0,0 +1,8 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +/* eslint-disable */ +/* tslint:disable */ +import { type Infer as __Infer } from '../../../../src/index'; + +// Import all procedure arg schemas diff --git a/crates/bindings-typescript/test-react-router-app/src/module_bindings/types/reducers.ts b/crates/bindings-typescript/test-react-router-app/src/module_bindings/types/reducers.ts new file mode 100644 index 00000000000..636548e076f --- /dev/null +++ b/crates/bindings-typescript/test-react-router-app/src/module_bindings/types/reducers.ts @@ -0,0 +1,13 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +/* eslint-disable */ +/* tslint:disable */ +import { type Infer as __Infer } from '../../../../src/index'; + +// Import all reducer arg schemas +import ClearCounterReducer from '../clear_counter_reducer'; +import IncrementCounterReducer from '../increment_counter_reducer'; + +export type ClearCounterParams = __Infer; +export type IncrementCounterParams = __Infer; From 39e960d9282dc475c68e3ca87c1372c4209bb315 Mon Sep 17 00:00:00 2001 From: Shubham Mishra Date: Thu, 19 Feb 2026 15:10:39 +0530 Subject: [PATCH 105/133] fix rust query builder --- crates/codegen/src/rust.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/crates/codegen/src/rust.rs b/crates/codegen/src/rust.rs index 46f872f0a68..f122eef6ca3 100644 --- a/crates/codegen/src/rust.rs +++ b/crates/codegen/src/rust.rs @@ -792,7 +792,8 @@ impl __sdk::__query_builder::HasIxCols for {struct_name} {{ pub fn implement_query_table_accessor(table: &TableDef, out: &mut impl Write, struct_name: &String) -> fmt::Result { // NEW: Generate query table accessor trait and implementation - let accessor_method = table.accessor_name.clone(); + let accessor_method = table_method_name(&table.accessor_name); + let table_name = table.name.deref(); let query_accessor_trait = accessor_method.to_string() + "QueryTableAccess"; writeln!( @@ -810,7 +811,7 @@ pub fn implement_query_table_accessor(table: &TableDef, out: &mut impl Write, st impl {query_accessor_trait} for __sdk::QueryTableAccessor {{ fn {accessor_method}(&self) -> __sdk::__query_builder::Table<{struct_name}> {{ - __sdk::__query_builder::Table::new({accessor_method:?}) + __sdk::__query_builder::Table::new({table_name:?}) }} }} " From ebf50ed0dbe1342aaf26559212092c0e1c8d52e3 Mon Sep 17 00:00:00 2001 From: Shubham Mishra Date: Thu, 19 Feb 2026 15:31:58 +0530 Subject: [PATCH 106/133] Apply suggestion from @Shubham8287 Signed-off-by: Shubham Mishra --- crates/codegen/src/typescript.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/codegen/src/typescript.rs b/crates/codegen/src/typescript.rs index 6bc9670c8f8..7b342914053 100644 --- a/crates/codegen/src/typescript.rs +++ b/crates/codegen/src/typescript.rs @@ -864,7 +864,7 @@ fn define_body_for_sum( (Identifier::for_test(pascal), ty.clone()) }) .collect(); - out.with_indent(|out| write_object_type_builder_fields(module, out, &pascal_variants,, None, false, false).unwrap()); + out.with_indent(|out| write_object_type_builder_fields(module, out, &pascal_variants, None, false, false).unwrap()); writeln!(out, "}});"); writeln!(out, "export type {name} = __Infer;"); out.newline(); From e96952a5afba30076d5e75570b6920591ec62327 Mon Sep 17 00:00:00 2001 From: Shubham Mishra Date: Thu, 19 Feb 2026 15:49:47 +0530 Subject: [PATCH 107/133] fmt --- crates/codegen/src/typescript.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/codegen/src/typescript.rs b/crates/codegen/src/typescript.rs index 7b342914053..9c239af8950 100644 --- a/crates/codegen/src/typescript.rs +++ b/crates/codegen/src/typescript.rs @@ -856,7 +856,7 @@ fn define_body_for_sum( write!(out, ": __TypeBuilder<__AlgebraicTypeType, __AlgebraicTypeType>"); } writeln!(out, " = __t.enum(\"{name}\", {{"); - // Convert variant names to PascalCase + // Convert variant names to PascalCase let pascal_variants: Vec<(Identifier, AlgebraicTypeUse)> = variants .iter() .map(|(ident, ty)| { From 89d60dcc5084b3ed371295fdedb4aa705d219a19 Mon Sep 17 00:00:00 2001 From: Shubham Mishra Date: Thu, 19 Feb 2026 15:51:15 +0530 Subject: [PATCH 108/133] pnpm format --- crates/bindings-typescript/test-app/src/module_bindings/index.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/crates/bindings-typescript/test-app/src/module_bindings/index.ts b/crates/bindings-typescript/test-app/src/module_bindings/index.ts index 1d888e59302..39780b21739 100644 --- a/crates/bindings-typescript/test-app/src/module_bindings/index.ts +++ b/crates/bindings-typescript/test-app/src/module_bindings/index.ts @@ -3,7 +3,6 @@ // This was generated using spacetimedb cli version 2.0.0 (commit de2b65fb8d8d765048bc19553332eeb0b8e75853). - /* eslint-disable */ /* tslint:disable */ import { From 297d833e8a8cb30a59ed31aa927ef129b6ff38c9 Mon Sep 17 00:00:00 2001 From: Shubham Mishra Date: Thu, 19 Feb 2026 16:08:20 +0530 Subject: [PATCH 109/133] merge fixes --- crates/bindings-typescript/src/lib/table.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crates/bindings-typescript/src/lib/table.ts b/crates/bindings-typescript/src/lib/table.ts index 0f70559e7f3..f51763e5211 100644 --- a/crates/bindings-typescript/src/lib/table.ts +++ b/crates/bindings-typescript/src/lib/table.ts @@ -1,6 +1,7 @@ import type { ProcedureExport, ReducerExport, t } from '../server'; import type { errors } from '../server/errors'; import { + ExplicitNameEntry, RawColumnDefaultValueV10, RawConstraintDefV10, RawIndexAlgorithm, @@ -322,7 +323,7 @@ export function table>( // gather primary keys, per‑column indexes, uniques, sequences const pk: ColList = []; - const indexes: RawIndexDefV10[] = []; + const indexes: (RawIndexDefV10 & { canonicalName?: string })[] = []; const constraints: RawConstraintDefV10[] = []; const sequences: RawSequenceDefV10[] = []; From 6c16feff61e2eb12a0041e06f237b4461bb62f4d Mon Sep 17 00:00:00 2001 From: Shubham Mishra Date: Thu, 19 Feb 2026 16:57:42 +0530 Subject: [PATCH 110/133] csharp update --- .../PlayModeTests/PlayModeExampleTest.cs | 20 +++++++++---------- .../Assets/Scripts/EntityController.cs | 2 +- .../Assets/Scripts/GameManager.cs | 8 ++++---- .../Assets/Scripts/PlayerController.cs | 6 +++--- .../regression-tests/client/Program.cs | 4 ++-- .../src/module_bindings/index.ts | 2 +- .../react-ts/src/module_bindings/pop_table.ts | 15 ++++++++++++++ .../react-ts/src/module_bindings/pop_type.ts | 15 ++++++++++++++ 8 files changed, 51 insertions(+), 21 deletions(-) create mode 100644 templates/react-ts/src/module_bindings/pop_table.ts create mode 100644 templates/react-ts/src/module_bindings/pop_type.ts diff --git a/demo/Blackholio/client-unity/Assets/PlayModeTests/PlayModeExampleTest.cs b/demo/Blackholio/client-unity/Assets/PlayModeTests/PlayModeExampleTest.cs index a558f06c523..ea1216acfb1 100644 --- a/demo/Blackholio/client-unity/Assets/PlayModeTests/PlayModeExampleTest.cs +++ b/demo/Blackholio/client-unity/Assets/PlayModeTests/PlayModeExampleTest.cs @@ -71,7 +71,7 @@ public IEnumerator CreatePlayerAndTestDecay() while (!playerCreated) yield return null; Debug.Assert(GameManager.LocalIdentity != default, "GameManager.localIdentity != default"); - var player = GameManager.Conn.Db.Player.PlayerIdentityIdxBtree.Find(GameManager.LocalIdentity); + var player = GameManager.Conn.Db.Player.Identity.Find(GameManager.LocalIdentity); Debug.Assert(player != null, nameof(player) + " != null"); var circle = GameManager.Conn.Db.Circle.Iter().FirstOrDefault(a => a.PlayerId == player.PlayerId); @@ -87,13 +87,13 @@ public IEnumerator CreatePlayerAndTestDecay() while (foodEaten < 50) { Debug.Assert(circle != null, nameof(circle) + " != null"); - var ourEntity = GameManager.Conn.Db.Entity.EntityEntityIdIdxBtree.Find(circle.EntityId); + var ourEntity = GameManager.Conn.Db.Entity.EntityId.Find(circle.EntityId); var toChosenFood = new UnityEngine.Vector2(1000, 0); int chosenFoodId = 0; foreach (var food in GameManager.Conn.Db.Food.Iter()) { var thisFoodId = food.EntityId; - var foodEntity = GameManager.Conn.Db.Entity.EntityEntityIdIdxBtree.Find(thisFoodId); + var foodEntity = GameManager.Conn.Db.Entity.EntityId.Find(thisFoodId); Debug.Assert(foodEntity != null, nameof(foodEntity) + " != null"); Debug.Assert(ourEntity != null, nameof(ourEntity) + " != null"); var foodEntityPosition = foodEntity.Position; @@ -109,10 +109,10 @@ public IEnumerator CreatePlayerAndTestDecay() } } - if (GameManager.Conn.Db.Entity.EntityEntityIdIdxBtree.Find(chosenFoodId) != null) + if (GameManager.Conn.Db.Entity.EntityId.Find(chosenFoodId) != null) { - var ourNewEntity = GameManager.Conn.Db.Entity.EntityEntityIdIdxBtree.Find(circle.EntityId); - var foodEntity = GameManager.Conn.Db.Entity.EntityEntityIdIdxBtree.Find(chosenFoodId); + var ourNewEntity = GameManager.Conn.Db.Entity.EntityId.Find(circle.EntityId); + var foodEntity = GameManager.Conn.Db.Entity.EntityId.Find(chosenFoodId); Debug.Assert(foodEntity != null, nameof(foodEntity) + " != null"); Debug.Assert(ourNewEntity != null, nameof(ourNewEntity) + " != null"); var toThisFood = (Vector2)foodEntity.Position - (Vector2)ourNewEntity.Position; @@ -130,9 +130,9 @@ public IEnumerator CreatePlayerAndTestDecay() PlayerController.Local.SetTestInput(UnityEngine.Vector2.zero); Debug.Assert(circle != null, nameof(circle) + " != null"); - var massStart = GameManager.Conn.Db.Entity.EntityEntityIdIdxBtree.Find(circle.EntityId)!.Mass; + var massStart = GameManager.Conn.Db.Entity.EntityId.Find(circle.EntityId)!.Mass; yield return new WaitForSeconds(10); - var massEnd = GameManager.Conn.Db.Entity.EntityEntityIdIdxBtree.Find(circle.EntityId)!.Mass; + var massEnd = GameManager.Conn.Db.Entity.EntityId.Find(circle.EntityId)!.Mass; Debug.Assert(massEnd < massStart, "Mass should have decayed"); } @@ -260,7 +260,7 @@ public IEnumerator ReconnectionViaReloadingScene() while (!playerCreated) yield return null; Debug.Assert(GameManager.LocalIdentity != default, "GameManager.localIdentity != default"); - var player = GameManager.Conn.Db.Player.PlayerIdentityIdxBtree.Find(GameManager.LocalIdentity); + var player = GameManager.Conn.Db.Player.Identity.Find(GameManager.LocalIdentity); Debug.Assert(player != null, nameof(player) + " != null"); var circle = GameManager.Conn.Db.Circle.Iter().FirstOrDefault(a => a.PlayerId == player.PlayerId); @@ -273,7 +273,7 @@ public IEnumerator ReconnectionViaReloadingScene() SceneManager.LoadScene("Scenes/Main"); while (!connected || !subscribed) yield return null; - var newPlayer = GameManager.Conn.Db.Player.PlayerIdentityIdxBtree.Find(GameManager.LocalIdentity); + var newPlayer = GameManager.Conn.Db.Player.Identity.Find(GameManager.LocalIdentity); Debug.Assert(player.PlayerId == newPlayer.PlayerId, "PlayerIds should match!"); var newCircle = GameManager.Conn.Db.Circle.Iter().FirstOrDefault(a => a.PlayerId == newPlayer.PlayerId); Debug.Assert(circle.EntityId == newCircle.EntityId, "Circle EntityIds should match!"); diff --git a/demo/Blackholio/client-unity/Assets/Scripts/EntityController.cs b/demo/Blackholio/client-unity/Assets/Scripts/EntityController.cs index 302cd44d639..cc960cb3a8b 100644 --- a/demo/Blackholio/client-unity/Assets/Scripts/EntityController.cs +++ b/demo/Blackholio/client-unity/Assets/Scripts/EntityController.cs @@ -23,7 +23,7 @@ protected virtual void Spawn(int entityId) { EntityId = entityId; - var entity = GameManager.Conn.Db.Entity.EntityEntityIdIdxBtree.Find(entityId); + var entity = GameManager.Conn.Db.Entity.EntityId.Find(entityId); LerpStartPosition = LerpTargetPosition = transform.position = (Vector2)entity.Position; transform.localScale = Vector3.one; TargetScale = MassToScale(entity.Mass); diff --git a/demo/Blackholio/client-unity/Assets/Scripts/GameManager.cs b/demo/Blackholio/client-unity/Assets/Scripts/GameManager.cs index 90eef78b76a..76f32372602 100644 --- a/demo/Blackholio/client-unity/Assets/Scripts/GameManager.cs +++ b/demo/Blackholio/client-unity/Assets/Scripts/GameManager.cs @@ -109,11 +109,11 @@ private void HandleSubscriptionApplied(SubscriptionEventContext ctx) // Once we have the initial subscription sync'd to the client cache // Get the world size from the config table and set up the arena - var worldSize = Conn.Db.Config.ConfigIdIdxBtree.Find(0).WorldSize; + var worldSize = Conn.Db.Config.Id.Find(0).WorldSize; SetupArena(worldSize); // Check to see if we already have a player, if we don't we'll need to create one - var player = ctx.Db.Player.PlayerIdentityIdxBtree.Find(LocalIdentity); + var player = ctx.Db.Player.Identity.Find(LocalIdentity); if (string.IsNullOrEmpty(player.Name)) { // The player has to choose a username @@ -131,7 +131,7 @@ private void HandleSubscriptionApplied(SubscriptionEventContext ctx) else { // We already have a player - if (ctx.Db.Circle.CirclePlayerIdIdxBtree.Filter(player.PlayerId).Any()) + if (ctx.Db.Circle.PlayerId.Filter(player.PlayerId).Any()) { // We already have at least one circle, we should just be able to start // playing immediately. @@ -236,7 +236,7 @@ private static PlayerController GetOrCreatePlayer(int playerId) { if (!Players.TryGetValue(playerId, out var playerController)) { - var player = Conn.Db.Player.PlayerPlayerIdIdxBtree.Find(playerId); + var player = Conn.Db.Player.PlayerId.Find(playerId); playerController = PrefabManager.SpawnPlayer(player); Players.Add(playerId, playerController); } diff --git a/demo/Blackholio/client-unity/Assets/Scripts/PlayerController.cs b/demo/Blackholio/client-unity/Assets/Scripts/PlayerController.cs index 23b1403308d..be37719fefb 100644 --- a/demo/Blackholio/client-unity/Assets/Scripts/PlayerController.cs +++ b/demo/Blackholio/client-unity/Assets/Scripts/PlayerController.cs @@ -16,7 +16,7 @@ public class PlayerController : MonoBehaviour private Vector2? LockInputPosition; private List OwnedCircles = new List(); - public string Username => GameManager.Conn.Db.Player.PlayerIdentityIdxBtree.Find(PlayerIdentity).Name; + public string Username => GameManager.Conn.Db.Player.Identity.Find(PlayerIdentity).Name; public int NumberOfOwnedCircles => OwnedCircles.Count; public bool IsLocalPlayer => this == Local; @@ -59,7 +59,7 @@ public void OnCircleDeleted(CircleController deletedCircle) public int TotalMass() { return (int)OwnedCircles - .Select(circle => GameManager.Conn.Db.Entity.EntityEntityIdIdxBtree.Find(circle.EntityId)) + .Select(circle => GameManager.Conn.Db.Entity.EntityId.Find(circle.EntityId)) .Sum(e => e?.Mass ?? 0); //If this entity is being deleted on the same frame that we're moving, we can have a null entity here. } @@ -74,7 +74,7 @@ public int TotalMass() float totalMass = 0; foreach (var circle in OwnedCircles) { - var entity = GameManager.Conn.Db.Entity.EntityEntityIdIdxBtree.Find(circle.EntityId); + var entity = GameManager.Conn.Db.Entity.EntityId.Find(circle.EntityId); var position = circle.transform.position; totalPos += (Vector2)position * entity.Mass; totalMass += entity.Mass; diff --git a/sdks/csharp/examples~/regression-tests/client/Program.cs b/sdks/csharp/examples~/regression-tests/client/Program.cs index 02c25398269..4c07b232d23 100644 --- a/sdks/csharp/examples~/regression-tests/client/Program.cs +++ b/sdks/csharp/examples~/regression-tests/client/Program.cs @@ -299,14 +299,14 @@ void ValidateBTreeIndexes(IRemoteDbContext conn) foreach (var data in conn.Db.ExampleData.Iter()) { Debug.Assert( - conn.Db.ExampleData.ExampleDataIndexedIdxBtree.Filter(data.Id).Contains(data) + conn.Db.ExampleData.Indexed.Filter(data.Id).Contains(data) ); } var outOfIndex = conn.Db.ExampleData.Iter().ToHashSet(); for (uint i = 0; i < MAX_ID; i++) { - foreach (var data in conn.Db.ExampleData.ExampleDataIndexedIdxBtree.Filter(i)) + foreach (var data in conn.Db.ExampleData.Indexed.Filter(i)) { Debug.Assert(outOfIndex.Contains(data)); } diff --git a/templates/chat-react-ts/src/module_bindings/index.ts b/templates/chat-react-ts/src/module_bindings/index.ts index 686ed8247df..43cce990e59 100644 --- a/templates/chat-react-ts/src/module_bindings/index.ts +++ b/templates/chat-react-ts/src/module_bindings/index.ts @@ -60,7 +60,7 @@ const tablesSchema = __schema({ name: 'user', indexes: [ { - name: 'user_identity_idx_btree', + name: 'identity', algorithm: 'btree', columns: ['identity'], }, diff --git a/templates/react-ts/src/module_bindings/pop_table.ts b/templates/react-ts/src/module_bindings/pop_table.ts new file mode 100644 index 00000000000..0f70f74f617 --- /dev/null +++ b/templates/react-ts/src/module_bindings/pop_table.ts @@ -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. + +/* eslint-disable */ +/* tslint:disable */ +import { + TypeBuilder as __TypeBuilder, + t as __t, + type AlgebraicTypeType as __AlgebraicTypeType, + type Infer as __Infer, +} from 'spacetimedb'; + +export default __t.row({ + name: __t.string(), +}); diff --git a/templates/react-ts/src/module_bindings/pop_type.ts b/templates/react-ts/src/module_bindings/pop_type.ts new file mode 100644 index 00000000000..9c823aeb42b --- /dev/null +++ b/templates/react-ts/src/module_bindings/pop_type.ts @@ -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. + +/* eslint-disable */ +/* tslint:disable */ +import { + TypeBuilder as __TypeBuilder, + t as __t, + type AlgebraicTypeType as __AlgebraicTypeType, + type Infer as __Infer, +} from 'spacetimedb'; + +export default __t.object('Pop', { + name: __t.string(), +}); From 2e1d299020cfa96ce23c743fcd9dcc635b0ccb90 Mon Sep 17 00:00:00 2001 From: Shubham Mishra Date: Thu, 19 Feb 2026 19:24:45 +0530 Subject: [PATCH 111/133] regen bindings --- .../src/index.ts | 2 +- sdks/rust/tests/test-client/src/main.rs | 138 +- .../src/module_bindings/btree_u_32_table.rs | 10 +- .../delete_from_btree_u_32_type.rs | 17 - .../delete_large_table_type.rs | 43 - .../module_bindings/delete_pk_bool_type.rs | 15 - .../delete_pk_connection_id_type.rs | 15 - .../module_bindings/delete_pk_i_128_type.rs | 15 - .../module_bindings/delete_pk_i_16_type.rs | 15 - .../module_bindings/delete_pk_i_256_type.rs | 15 - .../module_bindings/delete_pk_i_32_type.rs | 15 - .../module_bindings/delete_pk_i_64_type.rs | 15 - .../src/module_bindings/delete_pk_i_8_type.rs | 15 - .../delete_pk_identity_type.rs | 15 - .../module_bindings/delete_pk_string_type.rs | 15 - .../module_bindings/delete_pk_u_128_type.rs | 15 - .../module_bindings/delete_pk_u_16_type.rs | 15 - .../module_bindings/delete_pk_u_256_type.rs | 15 - .../delete_pk_u_32_insert_pk_u_32_two_type.rs | 16 - .../delete_pk_u_32_two_type.rs | 15 - .../module_bindings/delete_pk_u_32_type.rs | 15 - .../module_bindings/delete_pk_u_64_type.rs | 15 - .../src/module_bindings/delete_pk_u_8_type.rs | 15 - .../module_bindings/delete_pk_uuid_type.rs | 15 - .../delete_unique_bool_type.rs | 15 - .../delete_unique_connection_id_type.rs | 15 - .../delete_unique_i_128_type.rs | 15 - .../delete_unique_i_16_type.rs | 15 - .../delete_unique_i_256_type.rs | 15 - .../delete_unique_i_32_type.rs | 15 - .../delete_unique_i_64_type.rs | 15 - .../module_bindings/delete_unique_i_8_type.rs | 15 - .../delete_unique_identity_type.rs | 15 - .../delete_unique_string_type.rs | 15 - .../delete_unique_u_128_type.rs | 15 - .../delete_unique_u_16_type.rs | 15 - .../delete_unique_u_256_type.rs | 15 - .../delete_unique_u_32_type.rs | 15 - .../delete_unique_u_64_type.rs | 15 - .../module_bindings/delete_unique_u_8_type.rs | 15 - .../delete_unique_uuid_type.rs | 15 - .../indexed_simple_enum_table.rs | 10 +- .../module_bindings/indexed_table_2_table.rs | 10 +- .../module_bindings/indexed_table_table.rs | 10 +- .../insert_call_timestamp_type.rs | 13 - .../insert_call_uuid_v_4_type.rs | 13 - .../insert_call_uuid_v_7_type.rs | 13 - .../insert_caller_one_connection_id_type.rs | 13 - .../insert_caller_one_identity_type.rs | 13 - .../insert_caller_pk_connection_id_type.rs | 15 - .../insert_caller_pk_identity_type.rs | 15 - ...insert_caller_unique_connection_id_type.rs | 15 - .../insert_caller_unique_identity_type.rs | 15 - .../insert_caller_vec_connection_id_type.rs | 13 - .../insert_caller_vec_identity_type.rs | 13 - .../insert_into_btree_u_32_type.rs | 17 - .../insert_into_indexed_simple_enum_type.rs | 17 - .../insert_into_pk_btree_u_32_type.rs | 19 - .../insert_large_table_type.rs | 43 - .../module_bindings/insert_one_bool_type.rs | 15 - .../insert_one_byte_struct_type.rs | 17 - .../insert_one_connection_id_type.rs | 15 - .../insert_one_enum_with_payload_type.rs | 17 - .../insert_one_every_primitive_struct_type.rs | 17 - .../insert_one_every_vec_struct_type.rs | 17 - .../module_bindings/insert_one_f_32_type.rs | 15 - .../module_bindings/insert_one_f_64_type.rs | 15 - .../module_bindings/insert_one_i_128_type.rs | 15 - .../module_bindings/insert_one_i_16_type.rs | 15 - .../module_bindings/insert_one_i_256_type.rs | 15 - .../module_bindings/insert_one_i_32_type.rs | 15 - .../module_bindings/insert_one_i_64_type.rs | 15 - .../module_bindings/insert_one_i_8_type.rs | 15 - .../insert_one_identity_type.rs | 15 - .../insert_one_simple_enum_type.rs | 17 - .../module_bindings/insert_one_string_type.rs | 15 - .../insert_one_timestamp_type.rs | 15 - .../module_bindings/insert_one_u_128_type.rs | 15 - .../module_bindings/insert_one_u_16_type.rs | 15 - .../module_bindings/insert_one_u_256_type.rs | 15 - .../module_bindings/insert_one_u_32_type.rs | 15 - .../module_bindings/insert_one_u_64_type.rs | 15 - .../module_bindings/insert_one_u_8_type.rs | 15 - .../insert_one_unit_struct_type.rs | 17 - .../module_bindings/insert_one_uuid_type.rs | 15 - ...sert_option_every_primitive_struct_type.rs | 17 - .../insert_option_i_32_type.rs | 15 - .../insert_option_identity_type.rs | 15 - .../insert_option_simple_enum_type.rs | 17 - .../insert_option_string_type.rs | 15 - .../insert_option_uuid_type.rs | 15 - .../insert_option_vec_option_i_32_type.rs | 15 - .../module_bindings/insert_pk_bool_type.rs | 16 - .../insert_pk_connection_id_type.rs | 16 - .../module_bindings/insert_pk_i_128_type.rs | 16 - .../module_bindings/insert_pk_i_16_type.rs | 16 - .../module_bindings/insert_pk_i_256_type.rs | 16 - .../module_bindings/insert_pk_i_32_type.rs | 16 - .../module_bindings/insert_pk_i_64_type.rs | 16 - .../src/module_bindings/insert_pk_i_8_type.rs | 16 - .../insert_pk_identity_type.rs | 16 - .../insert_pk_simple_enum_type.rs | 18 - .../module_bindings/insert_pk_string_type.rs | 16 - .../module_bindings/insert_pk_u_128_type.rs | 16 - .../module_bindings/insert_pk_u_16_type.rs | 16 - .../module_bindings/insert_pk_u_256_type.rs | 16 - .../insert_pk_u_32_two_type.rs | 16 - .../module_bindings/insert_pk_u_32_type.rs | 16 - .../module_bindings/insert_pk_u_64_type.rs | 16 - .../src/module_bindings/insert_pk_u_8_type.rs | 16 - .../module_bindings/insert_pk_uuid_type.rs | 16 - .../insert_primitives_as_strings_type.rs | 17 - ...sult_every_primitive_struct_string_type.rs | 17 - .../insert_result_i_32_string_type.rs | 15 - .../insert_result_identity_string_type.rs | 15 - .../insert_result_simple_enum_i_32_type.rs | 17 - .../insert_result_string_i_32_type.rs | 15 - .../insert_result_vec_i_32_string_type.rs | 15 - .../insert_table_holds_table_type.rs | 19 - .../insert_unique_bool_type.rs | 16 - .../insert_unique_connection_id_type.rs | 16 - .../insert_unique_i_128_type.rs | 16 - .../insert_unique_i_16_type.rs | 16 - .../insert_unique_i_256_type.rs | 16 - .../insert_unique_i_32_type.rs | 16 - .../insert_unique_i_64_type.rs | 16 - .../module_bindings/insert_unique_i_8_type.rs | 16 - .../insert_unique_identity_type.rs | 16 - .../insert_unique_string_type.rs | 16 - .../insert_unique_u_128_type.rs | 16 - .../insert_unique_u_16_type.rs | 16 - .../insert_unique_u_256_type.rs | 16 - .../insert_unique_u_32_type.rs | 16 - .../insert_unique_u_32_update_pk_u_32_type.rs | 17 - .../insert_unique_u_64_type.rs | 16 - .../module_bindings/insert_unique_u_8_type.rs | 16 - .../insert_unique_uuid_type.rs | 16 - .../src/module_bindings/insert_user_type.rs | 16 - .../module_bindings/insert_vec_bool_type.rs | 15 - .../insert_vec_byte_struct_type.rs | 17 - .../insert_vec_connection_id_type.rs | 15 - .../insert_vec_enum_with_payload_type.rs | 17 - .../insert_vec_every_primitive_struct_type.rs | 17 - .../insert_vec_every_vec_struct_type.rs | 17 - .../module_bindings/insert_vec_f_32_type.rs | 15 - .../module_bindings/insert_vec_f_64_type.rs | 15 - .../module_bindings/insert_vec_i_128_type.rs | 15 - .../module_bindings/insert_vec_i_16_type.rs | 15 - .../module_bindings/insert_vec_i_256_type.rs | 15 - .../module_bindings/insert_vec_i_32_type.rs | 15 - .../module_bindings/insert_vec_i_64_type.rs | 15 - .../module_bindings/insert_vec_i_8_type.rs | 15 - .../insert_vec_identity_type.rs | 15 - .../insert_vec_simple_enum_type.rs | 17 - .../module_bindings/insert_vec_string_type.rs | 15 - .../insert_vec_timestamp_type.rs | 15 - .../module_bindings/insert_vec_u_128_type.rs | 15 - .../module_bindings/insert_vec_u_16_type.rs | 15 - .../module_bindings/insert_vec_u_256_type.rs | 15 - .../module_bindings/insert_vec_u_32_type.rs | 15 - .../module_bindings/insert_vec_u_64_type.rs | 15 - .../module_bindings/insert_vec_u_8_type.rs | 15 - .../insert_vec_unit_struct_type.rs | 17 - .../module_bindings/insert_vec_uuid_type.rs | 15 - .../test-client/src/module_bindings/mod.rs | 2866 +++++++---------- .../module_bindings/no_op_succeeds_type.rs | 13 - .../src/module_bindings/one_f_32_table.rs | 10 +- .../src/module_bindings/one_f_64_table.rs | 10 +- .../src/module_bindings/one_i_128_table.rs | 10 +- .../src/module_bindings/one_i_16_table.rs | 10 +- .../src/module_bindings/one_i_256_table.rs | 10 +- .../src/module_bindings/one_i_32_table.rs | 10 +- .../src/module_bindings/one_i_64_table.rs | 10 +- .../src/module_bindings/one_i_8_table.rs | 10 +- .../src/module_bindings/one_u_128_table.rs | 10 +- .../src/module_bindings/one_u_16_table.rs | 10 +- .../src/module_bindings/one_u_256_table.rs | 10 +- .../src/module_bindings/one_u_32_table.rs | 10 +- .../src/module_bindings/one_u_64_table.rs | 10 +- .../src/module_bindings/one_u_8_table.rs | 10 +- .../src/module_bindings/option_i_32_table.rs | 10 +- .../option_vec_option_i_32_table.rs | 10 +- .../src/module_bindings/pk_i_128_table.rs | 10 +- .../src/module_bindings/pk_i_16_table.rs | 10 +- .../src/module_bindings/pk_i_256_table.rs | 10 +- .../src/module_bindings/pk_i_32_table.rs | 10 +- .../src/module_bindings/pk_i_64_table.rs | 10 +- .../src/module_bindings/pk_i_8_table.rs | 10 +- .../src/module_bindings/pk_u_128_table.rs | 10 +- .../src/module_bindings/pk_u_16_table.rs | 10 +- .../src/module_bindings/pk_u_256_table.rs | 10 +- .../src/module_bindings/pk_u_32_table.rs | 10 +- .../src/module_bindings/pk_u_32_two_table.rs | 10 +- .../src/module_bindings/pk_u_64_table.rs | 10 +- .../src/module_bindings/pk_u_8_table.rs | 10 +- .../result_i_32_string_table.rs | 10 +- .../result_simple_enum_i_32_table.rs | 10 +- .../result_string_i_32_table.rs | 10 +- .../result_vec_i_32_string_table.rs | 10 +- .../module_bindings/scheduled_table_table.rs | 10 +- .../send_scheduled_message_type.rs | 17 - .../sorted_uuids_insert_type.rs | 13 - .../src/module_bindings/unique_i_128_table.rs | 10 +- .../src/module_bindings/unique_i_16_table.rs | 10 +- .../src/module_bindings/unique_i_256_table.rs | 10 +- .../src/module_bindings/unique_i_32_table.rs | 10 +- .../src/module_bindings/unique_i_64_table.rs | 10 +- .../src/module_bindings/unique_i_8_table.rs | 10 +- .../src/module_bindings/unique_u_128_table.rs | 10 +- .../src/module_bindings/unique_u_16_table.rs | 10 +- .../src/module_bindings/unique_u_256_table.rs | 10 +- .../src/module_bindings/unique_u_32_table.rs | 10 +- .../src/module_bindings/unique_u_64_table.rs | 10 +- .../src/module_bindings/unique_u_8_table.rs | 10 +- .../update_indexed_simple_enum_type.rs | 18 - .../module_bindings/update_pk_bool_type.rs | 16 - .../update_pk_connection_id_type.rs | 16 - .../module_bindings/update_pk_i_128_type.rs | 16 - .../module_bindings/update_pk_i_16_type.rs | 16 - .../module_bindings/update_pk_i_256_type.rs | 16 - .../module_bindings/update_pk_i_32_type.rs | 16 - .../module_bindings/update_pk_i_64_type.rs | 16 - .../src/module_bindings/update_pk_i_8_type.rs | 16 - .../update_pk_identity_type.rs | 16 - .../update_pk_simple_enum_type.rs | 18 - .../module_bindings/update_pk_string_type.rs | 16 - .../module_bindings/update_pk_u_128_type.rs | 16 - .../module_bindings/update_pk_u_16_type.rs | 16 - .../module_bindings/update_pk_u_256_type.rs | 16 - .../update_pk_u_32_two_type.rs | 16 - .../module_bindings/update_pk_u_32_type.rs | 16 - .../module_bindings/update_pk_u_64_type.rs | 16 - .../src/module_bindings/update_pk_u_8_type.rs | 16 - .../module_bindings/update_pk_uuid_type.rs | 16 - .../update_unique_bool_type.rs | 16 - .../update_unique_connection_id_type.rs | 16 - .../update_unique_i_128_type.rs | 16 - .../update_unique_i_16_type.rs | 16 - .../update_unique_i_256_type.rs | 16 - .../update_unique_i_32_type.rs | 16 - .../update_unique_i_64_type.rs | 16 - .../module_bindings/update_unique_i_8_type.rs | 16 - .../update_unique_identity_type.rs | 16 - .../update_unique_string_type.rs | 16 - .../update_unique_u_128_type.rs | 16 - .../update_unique_u_16_type.rs | 16 - .../update_unique_u_256_type.rs | 16 - .../update_unique_u_32_type.rs | 16 - .../update_unique_u_64_type.rs | 16 - .../module_bindings/update_unique_u_8_type.rs | 16 - .../update_unique_uuid_type.rs | 16 - .../src/module_bindings/vec_f_32_table.rs | 10 +- .../src/module_bindings/vec_f_64_table.rs | 10 +- .../src/module_bindings/vec_i_128_table.rs | 10 +- .../src/module_bindings/vec_i_16_table.rs | 10 +- .../src/module_bindings/vec_i_256_table.rs | 10 +- .../src/module_bindings/vec_i_32_table.rs | 10 +- .../src/module_bindings/vec_i_64_table.rs | 10 +- .../src/module_bindings/vec_i_8_table.rs | 10 +- .../src/module_bindings/vec_u_128_table.rs | 10 +- .../src/module_bindings/vec_u_16_table.rs | 10 +- .../src/module_bindings/vec_u_256_table.rs | 10 +- .../src/module_bindings/vec_u_32_table.rs | 10 +- .../src/module_bindings/vec_u_64_table.rs | 10 +- .../src/module_bindings/vec_u_8_table.rs | 10 +- sdks/rust/tests/test.rs | 448 +-- 266 files changed, 1849 insertions(+), 5386 deletions(-) delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/delete_from_btree_u_32_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/delete_large_table_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/delete_pk_bool_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/delete_pk_connection_id_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/delete_pk_i_128_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/delete_pk_i_16_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/delete_pk_i_256_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/delete_pk_i_32_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/delete_pk_i_64_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/delete_pk_i_8_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/delete_pk_identity_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/delete_pk_string_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/delete_pk_u_128_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/delete_pk_u_16_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/delete_pk_u_256_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/delete_pk_u_32_insert_pk_u_32_two_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/delete_pk_u_32_two_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/delete_pk_u_32_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/delete_pk_u_64_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/delete_pk_u_8_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/delete_pk_uuid_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/delete_unique_bool_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/delete_unique_connection_id_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/delete_unique_i_128_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/delete_unique_i_16_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/delete_unique_i_256_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/delete_unique_i_32_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/delete_unique_i_64_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/delete_unique_i_8_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/delete_unique_identity_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/delete_unique_string_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/delete_unique_u_128_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/delete_unique_u_16_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/delete_unique_u_256_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/delete_unique_u_32_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/delete_unique_u_64_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/delete_unique_u_8_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/delete_unique_uuid_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_call_timestamp_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_call_uuid_v_4_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_call_uuid_v_7_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_caller_one_connection_id_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_caller_one_identity_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_caller_pk_connection_id_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_caller_pk_identity_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_caller_unique_connection_id_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_caller_unique_identity_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_caller_vec_connection_id_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_caller_vec_identity_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_into_btree_u_32_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_into_indexed_simple_enum_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_into_pk_btree_u_32_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_large_table_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_one_bool_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_one_byte_struct_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_one_connection_id_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_one_enum_with_payload_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_one_every_primitive_struct_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_one_every_vec_struct_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_one_f_32_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_one_f_64_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_one_i_128_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_one_i_16_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_one_i_256_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_one_i_32_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_one_i_64_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_one_i_8_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_one_identity_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_one_simple_enum_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_one_string_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_one_timestamp_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_one_u_128_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_one_u_16_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_one_u_256_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_one_u_32_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_one_u_64_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_one_u_8_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_one_unit_struct_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_one_uuid_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_option_every_primitive_struct_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_option_i_32_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_option_identity_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_option_simple_enum_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_option_string_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_option_uuid_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_option_vec_option_i_32_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_pk_bool_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_pk_connection_id_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_pk_i_128_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_pk_i_16_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_pk_i_256_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_pk_i_32_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_pk_i_64_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_pk_i_8_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_pk_identity_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_pk_simple_enum_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_pk_string_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_pk_u_128_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_pk_u_16_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_pk_u_256_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_pk_u_32_two_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_pk_u_32_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_pk_u_64_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_pk_u_8_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_pk_uuid_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_primitives_as_strings_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_result_every_primitive_struct_string_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_result_i_32_string_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_result_identity_string_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_result_simple_enum_i_32_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_result_string_i_32_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_result_vec_i_32_string_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_table_holds_table_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_unique_bool_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_unique_connection_id_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_unique_i_128_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_unique_i_16_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_unique_i_256_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_unique_i_32_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_unique_i_64_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_unique_i_8_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_unique_identity_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_unique_string_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_unique_u_128_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_unique_u_16_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_unique_u_256_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_unique_u_32_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_unique_u_32_update_pk_u_32_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_unique_u_64_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_unique_u_8_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_unique_uuid_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_user_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_vec_bool_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_vec_byte_struct_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_vec_connection_id_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_vec_enum_with_payload_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_vec_every_primitive_struct_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_vec_every_vec_struct_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_vec_f_32_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_vec_f_64_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_vec_i_128_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_vec_i_16_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_vec_i_256_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_vec_i_32_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_vec_i_64_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_vec_i_8_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_vec_identity_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_vec_simple_enum_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_vec_string_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_vec_timestamp_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_vec_u_128_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_vec_u_16_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_vec_u_256_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_vec_u_32_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_vec_u_64_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_vec_u_8_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_vec_unit_struct_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/insert_vec_uuid_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/no_op_succeeds_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/send_scheduled_message_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/sorted_uuids_insert_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/update_indexed_simple_enum_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/update_pk_bool_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/update_pk_connection_id_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/update_pk_i_128_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/update_pk_i_16_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/update_pk_i_256_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/update_pk_i_32_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/update_pk_i_64_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/update_pk_i_8_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/update_pk_identity_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/update_pk_simple_enum_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/update_pk_string_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/update_pk_u_128_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/update_pk_u_16_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/update_pk_u_256_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/update_pk_u_32_two_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/update_pk_u_32_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/update_pk_u_64_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/update_pk_u_8_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/update_pk_uuid_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/update_unique_bool_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/update_unique_connection_id_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/update_unique_i_128_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/update_unique_i_16_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/update_unique_i_256_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/update_unique_i_32_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/update_unique_i_64_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/update_unique_i_8_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/update_unique_identity_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/update_unique_string_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/update_unique_u_128_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/update_unique_u_16_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/update_unique_u_256_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/update_unique_u_32_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/update_unique_u_64_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/update_unique_u_8_type.rs delete mode 100644 sdks/rust/tests/test-client/src/module_bindings/update_unique_uuid_type.rs diff --git a/modules/sdk-test-connect-disconnect-ts/src/index.ts b/modules/sdk-test-connect-disconnect-ts/src/index.ts index 85c6b0c17eb..d57f9549740 100644 --- a/modules/sdk-test-connect-disconnect-ts/src/index.ts +++ b/modules/sdk-test-connect-disconnect-ts/src/index.ts @@ -1,4 +1,4 @@ -// ───────────────────────────────────────────────────────────────────────────── +a// ───────────────────────────────────────────────────────────────────────────── // IMPORTS // ───────────────────────────────────────────────────────────────────────────── import { schema, t, table } from 'spacetimedb/server'; diff --git a/sdks/rust/tests/test-client/src/main.rs b/sdks/rust/tests/test-client/src/main.rs index 53b9c5e5606..4bde4d14a42 100644 --- a/sdks/rust/tests/test-client/src/main.rs +++ b/sdks/rust/tests/test-client/src/main.rs @@ -72,75 +72,75 @@ fn main() { .expect("Pass a test name as a command-line argument to the test client"); match &*test { - "insert-primitive" => exec_insert_primitive(), - "subscribe-and-cancel" => exec_subscribe_and_cancel(), - "subscribe-and-unsubscribe" => exec_subscribe_and_unsubscribe(), - "subscription-error-smoke-test" => exec_subscription_error_smoke_test(), - "delete-primitive" => exec_delete_primitive(), - "update-primitive" => exec_update_primitive(), - - "insert-identity" => exec_insert_identity(), - "insert-caller-identity" => exec_insert_caller_identity(), - "delete-identity" => exec_delete_identity(), - "update-identity" => exec_update_identity(), - - "insert-connection-id" => exec_insert_connection_id(), - "insert-caller-connection-id" => exec_insert_caller_connection_id(), - "delete-connection-id" => exec_delete_connection_id(), - "update-connection-id" => exec_update_connection_id(), - - "insert-timestamp" => exec_insert_timestamp(), - "insert-call-timestamp" => exec_insert_call_timestamp(), - - "insert-uuid" => exec_insert_uuid(), - "insert-call-uuid-v4" => exec_insert_caller_uuid_v4(), - "insert-call-uuid-v7" => exec_insert_caller_uuid_v7(), - "delete-uuid" => exec_delete_uuid(), - "update-uuid" => exec_update_uuid(), - - "on-reducer" => exec_on_reducer(), - "fail-reducer" => exec_fail_reducer(), - - "insert-vec" => exec_insert_vec(), - "insert-option-some" => exec_insert_option_some(), - "insert-option-none" => exec_insert_option_none(), - "insert-struct" => exec_insert_struct(), - "insert-simple-enum" => exec_insert_simple_enum(), - "insert-enum-with-payload" => exec_insert_enum_with_payload(), - - "insert-delete-large-table" => exec_insert_delete_large_table(), - - "insert-primitives-as-strings" => exec_insert_primitives_as_strings(), - - // "resubscribe" => exec_resubscribe(), - // - "reauth-part-1" => exec_reauth_part_1(), - "reauth-part-2" => exec_reauth_part_2(), - - "should-fail" => exec_should_fail(), - - "reconnect-different-connection-id" => exec_reconnect_different_connection_id(), - "caller-always-notified" => exec_caller_always_notified(), - - "subscribe-all-select-star" => exec_subscribe_all_select_star(), - "caller-alice-receives-reducer-callback-but-not-bob" => { - exec_caller_alice_receives_reducer_callback_but_not_bob() - } - "row-deduplication" => exec_row_deduplication(), - "row-deduplication-join-r-and-s" => exec_row_deduplication_join_r_and_s(), - "row-deduplication-r-join-s-and-r-joint" => exec_row_deduplication_r_join_s_and_r_join_t(), - "test-lhs-join-update" => test_lhs_join_update(), - "test-lhs-join-update-disjoint-queries" => test_lhs_join_update_disjoint_queries(), - "test-intra-query-bag-semantics-for-join" => test_intra_query_bag_semantics_for_join(), - "two-different-compression-algos" => exec_two_different_compression_algos(), - "test-parameterized-subscription" => test_parameterized_subscription(), - "test-rls-subscription" => test_rls_subscription(), - "pk-simple-enum" => exec_pk_simple_enum(), - "indexed-simple-enum" => exec_indexed_simple_enum(), - - "overlapping-subscriptions" => exec_overlapping_subscriptions(), - - "sorted-uuids-insert" => exec_sorted_uuids_insert(), + // "insert-primitive" => exec_insert_primitive(), + // "subscribe-and-cancel" => exec_subscribe_and_cancel(), + // "subscribe-and-unsubscribe" => exec_subscribe_and_unsubscribe(), + // "subscription-error-smoke-test" => exec_subscription_error_smoke_test(), + // "delete-primitive" => exec_delete_primitive(), + // "update-primitive" => exec_update_primitive(), + + // "insert-identity" => exec_insert_identity(), + // "insert-caller-identity" => exec_insert_caller_identity(), + // "delete-identity" => exec_delete_identity(), + // "update-identity" => exec_update_identity(), + + // "insert-connection-id" => exec_insert_connection_id(), + // "insert-caller-connection-id" => exec_insert_caller_connection_id(), + // "delete-connection-id" => exec_delete_connection_id(), + // "update-connection-id" => exec_update_connection_id(), + + // "insert-timestamp" => exec_insert_timestamp(), + // "insert-call-timestamp" => exec_insert_call_timestamp(), + + // "insert-uuid" => exec_insert_uuid(), + // "insert-call-uuid-v4" => exec_insert_caller_uuid_v4(), + // "insert-call-uuid-v7" => exec_insert_caller_uuid_v7(), + // "delete-uuid" => exec_delete_uuid(), + // "update-uuid" => exec_update_uuid(), + + // "on-reducer" => exec_on_reducer(), + "fail-reducer" => exec_fail_reducer(), + + // "insert-vec" => exec_insert_vec(), + "insert-option-some" => exec_insert_option_some(), + // "insert-option-none" => exec_insert_option_none(), + // "insert-struct" => exec_insert_struct(), + // "insert-simple-enum" => exec_insert_simple_enum(), + // "insert-enum-with-payload" => exec_insert_enum_with_payload(), + + // "insert-delete-large-table" => exec_insert_delete_large_table(), + + // "insert-primitives-as-strings" => exec_insert_primitives_as_strings(), + + // // "resubscribe" => exec_resubscribe(), + // // + // "reauth-part-1" => exec_reauth_part_1(), + // "reauth-part-2" => exec_reauth_part_2(), + + // "should-fail" => exec_should_fail(), + + // "reconnect-different-connection-id" => exec_reconnect_different_connection_id(), + // "caller-always-notified" => exec_caller_always_notified(), + + // "subscribe-all-select-star" => exec_subscribe_all_select_star(), + // "caller-alice-receives-reducer-callback-but-not-bob" => { + // exec_caller_alice_receives_reducer_callback_but_not_bob() + // } + // "row-deduplication" => exec_row_deduplication(), + // "row-deduplication-join-r-and-s" => exec_row_deduplication_join_r_and_s(), + // "row-deduplication-r-join-s-and-r-joint" => exec_row_deduplication_r_join_s_and_r_join_t(), + // "test-lhs-join-update" => test_lhs_join_update(), + // "test-lhs-join-update-disjoint-queries" => test_lhs_join_update_disjoint_queries(), + // "test-intra-query-bag-semantics-for-join" => test_intra_query_bag_semantics_for_join(), + // "two-different-compression-algos" => exec_two_different_compression_algos(), + // "test-parameterized-subscription" => test_parameterized_subscription(), + // "test-rls-subscription" => test_rls_subscription(), + // "pk-simple-enum" => exec_pk_simple_enum(), + // "indexed-simple-enum" => exec_indexed_simple_enum(), + + // "overlapping-subscriptions" => exec_overlapping_subscriptions(), + + // "sorted-uuids-insert" => exec_sorted_uuids_insert(), _ => panic!("Unknown test: {test}"), } diff --git a/sdks/rust/tests/test-client/src/module_bindings/btree_u_32_table.rs b/sdks/rust/tests/test-client/src/module_bindings/btree_u_32_table.rs index c73e0bc4943..f5f7216ef84 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/btree_u_32_table.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/btree_u_32_table.rs @@ -96,14 +96,14 @@ pub(super) fn parse_table_update(raw_updates: __ws::v2::TableUpdate) -> __sdk::R /// Extension trait for query builder access to the table `BTreeU32`. /// /// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait btreeU32QueryTableAccess { +pub trait btree_u_32QueryTableAccess { #[allow(non_snake_case)] /// Get a query builder for the table `BTreeU32`. - fn btreeU32(&self) -> __sdk::__query_builder::Table; + fn btree_u_32(&self) -> __sdk::__query_builder::Table; } -impl btreeU32QueryTableAccess for __sdk::QueryTableAccessor { - fn btreeU32(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("btreeU32") +impl btree_u_32QueryTableAccess for __sdk::QueryTableAccessor { + fn btree_u_32(&self) -> __sdk::__query_builder::Table { + __sdk::__query_builder::Table::new("btree_u_32") } } diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_from_btree_u_32_type.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_from_btree_u_32_type.rs deleted file mode 100644 index 2809e778fc4..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/delete_from_btree_u_32_type.rs +++ /dev/null @@ -1,17 +0,0 @@ -// 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, __lib, __sats, __ws}; - -use super::b_tree_u_32_type::BTreeU32; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct DeleteFromBtreeU32 { - pub rows: Vec, -} - -impl __sdk::InModule for DeleteFromBtreeU32 { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_large_table_type.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_large_table_type.rs deleted file mode 100644 index 9fa69270ddd..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/delete_large_table_type.rs +++ /dev/null @@ -1,43 +0,0 @@ -// 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, __lib, __sats, __ws}; - -use super::byte_struct_type::ByteStruct; -use super::enum_with_payload_type::EnumWithPayload; -use super::every_primitive_struct_type::EveryPrimitiveStruct; -use super::every_vec_struct_type::EveryVecStruct; -use super::simple_enum_type::SimpleEnum; -use super::unit_struct_type::UnitStruct; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct DeleteLargeTable { - pub a: u8, - pub b: u16, - pub c: u32, - pub d: u64, - pub e: u128, - pub f: __sats::u256, - pub g: i8, - pub h: i16, - pub i: i32, - pub j: i64, - pub k: i128, - pub l: __sats::i256, - pub m: bool, - pub n: f32, - pub o: f64, - pub p: String, - pub q: SimpleEnum, - pub r: EnumWithPayload, - pub s: UnitStruct, - pub t: ByteStruct, - pub u: EveryPrimitiveStruct, - pub v: EveryVecStruct, -} - -impl __sdk::InModule for DeleteLargeTable { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_pk_bool_type.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_pk_bool_type.rs deleted file mode 100644 index f8db06a3074..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/delete_pk_bool_type.rs +++ /dev/null @@ -1,15 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct DeletePkBool { - pub b: bool, -} - -impl __sdk::InModule for DeletePkBool { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_pk_connection_id_type.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_pk_connection_id_type.rs deleted file mode 100644 index d8ce7a28583..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/delete_pk_connection_id_type.rs +++ /dev/null @@ -1,15 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct DeletePkConnectionId { - pub a: __sdk::ConnectionId, -} - -impl __sdk::InModule for DeletePkConnectionId { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_pk_i_128_type.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_pk_i_128_type.rs deleted file mode 100644 index e831af49f9b..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/delete_pk_i_128_type.rs +++ /dev/null @@ -1,15 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct DeletePkI128 { - pub n: i128, -} - -impl __sdk::InModule for DeletePkI128 { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_pk_i_16_type.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_pk_i_16_type.rs deleted file mode 100644 index 1886d7649cb..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/delete_pk_i_16_type.rs +++ /dev/null @@ -1,15 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct DeletePkI16 { - pub n: i16, -} - -impl __sdk::InModule for DeletePkI16 { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_pk_i_256_type.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_pk_i_256_type.rs deleted file mode 100644 index 802150383cd..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/delete_pk_i_256_type.rs +++ /dev/null @@ -1,15 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct DeletePkI256 { - pub n: __sats::i256, -} - -impl __sdk::InModule for DeletePkI256 { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_pk_i_32_type.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_pk_i_32_type.rs deleted file mode 100644 index 98f74de8af4..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/delete_pk_i_32_type.rs +++ /dev/null @@ -1,15 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct DeletePkI32 { - pub n: i32, -} - -impl __sdk::InModule for DeletePkI32 { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_pk_i_64_type.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_pk_i_64_type.rs deleted file mode 100644 index 719720b2fe8..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/delete_pk_i_64_type.rs +++ /dev/null @@ -1,15 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct DeletePkI64 { - pub n: i64, -} - -impl __sdk::InModule for DeletePkI64 { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_pk_i_8_type.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_pk_i_8_type.rs deleted file mode 100644 index 669a3db6e04..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/delete_pk_i_8_type.rs +++ /dev/null @@ -1,15 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct DeletePkI8 { - pub n: i8, -} - -impl __sdk::InModule for DeletePkI8 { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_pk_identity_type.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_pk_identity_type.rs deleted file mode 100644 index c316485006c..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/delete_pk_identity_type.rs +++ /dev/null @@ -1,15 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct DeletePkIdentity { - pub i: __sdk::Identity, -} - -impl __sdk::InModule for DeletePkIdentity { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_pk_string_type.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_pk_string_type.rs deleted file mode 100644 index c4b9dce4fe9..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/delete_pk_string_type.rs +++ /dev/null @@ -1,15 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct DeletePkString { - pub s: String, -} - -impl __sdk::InModule for DeletePkString { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_pk_u_128_type.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_pk_u_128_type.rs deleted file mode 100644 index d8f39b4741a..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/delete_pk_u_128_type.rs +++ /dev/null @@ -1,15 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct DeletePkU128 { - pub n: u128, -} - -impl __sdk::InModule for DeletePkU128 { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_pk_u_16_type.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_pk_u_16_type.rs deleted file mode 100644 index 71d9c864a06..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/delete_pk_u_16_type.rs +++ /dev/null @@ -1,15 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct DeletePkU16 { - pub n: u16, -} - -impl __sdk::InModule for DeletePkU16 { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_pk_u_256_type.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_pk_u_256_type.rs deleted file mode 100644 index 9785cbc856c..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/delete_pk_u_256_type.rs +++ /dev/null @@ -1,15 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct DeletePkU256 { - pub n: __sats::u256, -} - -impl __sdk::InModule for DeletePkU256 { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_pk_u_32_insert_pk_u_32_two_type.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_pk_u_32_insert_pk_u_32_two_type.rs deleted file mode 100644 index 0b0555ced5b..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/delete_pk_u_32_insert_pk_u_32_two_type.rs +++ /dev/null @@ -1,16 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct DeletePkU32InsertPkU32Two { - pub n: u32, - pub data: i32, -} - -impl __sdk::InModule for DeletePkU32InsertPkU32Two { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_pk_u_32_two_type.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_pk_u_32_two_type.rs deleted file mode 100644 index 8bd3824fb85..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/delete_pk_u_32_two_type.rs +++ /dev/null @@ -1,15 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct DeletePkU32Two { - pub n: u32, -} - -impl __sdk::InModule for DeletePkU32Two { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_pk_u_32_type.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_pk_u_32_type.rs deleted file mode 100644 index 79e5cb770ef..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/delete_pk_u_32_type.rs +++ /dev/null @@ -1,15 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct DeletePkU32 { - pub n: u32, -} - -impl __sdk::InModule for DeletePkU32 { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_pk_u_64_type.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_pk_u_64_type.rs deleted file mode 100644 index 664cc95359d..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/delete_pk_u_64_type.rs +++ /dev/null @@ -1,15 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct DeletePkU64 { - pub n: u64, -} - -impl __sdk::InModule for DeletePkU64 { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_pk_u_8_type.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_pk_u_8_type.rs deleted file mode 100644 index 535b697c869..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/delete_pk_u_8_type.rs +++ /dev/null @@ -1,15 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct DeletePkU8 { - pub n: u8, -} - -impl __sdk::InModule for DeletePkU8 { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_pk_uuid_type.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_pk_uuid_type.rs deleted file mode 100644 index d98043fa991..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/delete_pk_uuid_type.rs +++ /dev/null @@ -1,15 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct DeletePkUuid { - pub u: __sdk::Uuid, -} - -impl __sdk::InModule for DeletePkUuid { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_unique_bool_type.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_unique_bool_type.rs deleted file mode 100644 index 2ba10b297a1..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/delete_unique_bool_type.rs +++ /dev/null @@ -1,15 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct DeleteUniqueBool { - pub b: bool, -} - -impl __sdk::InModule for DeleteUniqueBool { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_unique_connection_id_type.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_unique_connection_id_type.rs deleted file mode 100644 index aab09c995db..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/delete_unique_connection_id_type.rs +++ /dev/null @@ -1,15 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct DeleteUniqueConnectionId { - pub a: __sdk::ConnectionId, -} - -impl __sdk::InModule for DeleteUniqueConnectionId { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_unique_i_128_type.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_unique_i_128_type.rs deleted file mode 100644 index c24d746d6f8..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/delete_unique_i_128_type.rs +++ /dev/null @@ -1,15 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct DeleteUniqueI128 { - pub n: i128, -} - -impl __sdk::InModule for DeleteUniqueI128 { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_unique_i_16_type.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_unique_i_16_type.rs deleted file mode 100644 index 5b35bdbb794..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/delete_unique_i_16_type.rs +++ /dev/null @@ -1,15 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct DeleteUniqueI16 { - pub n: i16, -} - -impl __sdk::InModule for DeleteUniqueI16 { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_unique_i_256_type.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_unique_i_256_type.rs deleted file mode 100644 index dd116febf68..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/delete_unique_i_256_type.rs +++ /dev/null @@ -1,15 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct DeleteUniqueI256 { - pub n: __sats::i256, -} - -impl __sdk::InModule for DeleteUniqueI256 { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_unique_i_32_type.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_unique_i_32_type.rs deleted file mode 100644 index a757fbbe66b..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/delete_unique_i_32_type.rs +++ /dev/null @@ -1,15 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct DeleteUniqueI32 { - pub n: i32, -} - -impl __sdk::InModule for DeleteUniqueI32 { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_unique_i_64_type.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_unique_i_64_type.rs deleted file mode 100644 index cb9abd18953..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/delete_unique_i_64_type.rs +++ /dev/null @@ -1,15 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct DeleteUniqueI64 { - pub n: i64, -} - -impl __sdk::InModule for DeleteUniqueI64 { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_unique_i_8_type.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_unique_i_8_type.rs deleted file mode 100644 index 953656284f6..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/delete_unique_i_8_type.rs +++ /dev/null @@ -1,15 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct DeleteUniqueI8 { - pub n: i8, -} - -impl __sdk::InModule for DeleteUniqueI8 { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_unique_identity_type.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_unique_identity_type.rs deleted file mode 100644 index b3ae08a7ec3..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/delete_unique_identity_type.rs +++ /dev/null @@ -1,15 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct DeleteUniqueIdentity { - pub i: __sdk::Identity, -} - -impl __sdk::InModule for DeleteUniqueIdentity { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_unique_string_type.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_unique_string_type.rs deleted file mode 100644 index 9aaa86c8a37..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/delete_unique_string_type.rs +++ /dev/null @@ -1,15 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct DeleteUniqueString { - pub s: String, -} - -impl __sdk::InModule for DeleteUniqueString { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_unique_u_128_type.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_unique_u_128_type.rs deleted file mode 100644 index caed2d59e91..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/delete_unique_u_128_type.rs +++ /dev/null @@ -1,15 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct DeleteUniqueU128 { - pub n: u128, -} - -impl __sdk::InModule for DeleteUniqueU128 { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_unique_u_16_type.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_unique_u_16_type.rs deleted file mode 100644 index df0c9d6d7e6..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/delete_unique_u_16_type.rs +++ /dev/null @@ -1,15 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct DeleteUniqueU16 { - pub n: u16, -} - -impl __sdk::InModule for DeleteUniqueU16 { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_unique_u_256_type.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_unique_u_256_type.rs deleted file mode 100644 index decc4ab6bfd..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/delete_unique_u_256_type.rs +++ /dev/null @@ -1,15 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct DeleteUniqueU256 { - pub n: __sats::u256, -} - -impl __sdk::InModule for DeleteUniqueU256 { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_unique_u_32_type.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_unique_u_32_type.rs deleted file mode 100644 index c2863d85f1a..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/delete_unique_u_32_type.rs +++ /dev/null @@ -1,15 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct DeleteUniqueU32 { - pub n: u32, -} - -impl __sdk::InModule for DeleteUniqueU32 { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_unique_u_64_type.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_unique_u_64_type.rs deleted file mode 100644 index 5d9ab44601d..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/delete_unique_u_64_type.rs +++ /dev/null @@ -1,15 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct DeleteUniqueU64 { - pub n: u64, -} - -impl __sdk::InModule for DeleteUniqueU64 { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_unique_u_8_type.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_unique_u_8_type.rs deleted file mode 100644 index 61173fc754c..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/delete_unique_u_8_type.rs +++ /dev/null @@ -1,15 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct DeleteUniqueU8 { - pub n: u8, -} - -impl __sdk::InModule for DeleteUniqueU8 { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/delete_unique_uuid_type.rs b/sdks/rust/tests/test-client/src/module_bindings/delete_unique_uuid_type.rs deleted file mode 100644 index 666a0dd4cbc..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/delete_unique_uuid_type.rs +++ /dev/null @@ -1,15 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct DeleteUniqueUuid { - pub u: __sdk::Uuid, -} - -impl __sdk::InModule for DeleteUniqueUuid { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/indexed_simple_enum_table.rs b/sdks/rust/tests/test-client/src/module_bindings/indexed_simple_enum_table.rs index 1b9eec4eb4a..02b40f1302e 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/indexed_simple_enum_table.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/indexed_simple_enum_table.rs @@ -99,14 +99,14 @@ pub(super) fn parse_table_update( /// Extension trait for query builder access to the table `IndexedSimpleEnum`. /// /// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait indexedSimpleEnumQueryTableAccess { +pub trait indexed_simple_enumQueryTableAccess { #[allow(non_snake_case)] /// Get a query builder for the table `IndexedSimpleEnum`. - fn indexedSimpleEnum(&self) -> __sdk::__query_builder::Table; + fn indexed_simple_enum(&self) -> __sdk::__query_builder::Table; } -impl indexedSimpleEnumQueryTableAccess for __sdk::QueryTableAccessor { - fn indexedSimpleEnum(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("indexedSimpleEnum") +impl indexed_simple_enumQueryTableAccess for __sdk::QueryTableAccessor { + fn indexed_simple_enum(&self) -> __sdk::__query_builder::Table { + __sdk::__query_builder::Table::new("indexed_simple_enum") } } diff --git a/sdks/rust/tests/test-client/src/module_bindings/indexed_table_2_table.rs b/sdks/rust/tests/test-client/src/module_bindings/indexed_table_2_table.rs index 91b354259c3..63eaf2e6ff3 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/indexed_table_2_table.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/indexed_table_2_table.rs @@ -98,14 +98,14 @@ pub(super) fn parse_table_update( /// Extension trait for query builder access to the table `IndexedTable2`. /// /// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait indexedTable2QueryTableAccess { +pub trait indexed_table_2QueryTableAccess { #[allow(non_snake_case)] /// Get a query builder for the table `IndexedTable2`. - fn indexedTable2(&self) -> __sdk::__query_builder::Table; + fn indexed_table_2(&self) -> __sdk::__query_builder::Table; } -impl indexedTable2QueryTableAccess for __sdk::QueryTableAccessor { - fn indexedTable2(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("indexedTable2") +impl indexed_table_2QueryTableAccess for __sdk::QueryTableAccessor { + fn indexed_table_2(&self) -> __sdk::__query_builder::Table { + __sdk::__query_builder::Table::new("indexed_table_2") } } diff --git a/sdks/rust/tests/test-client/src/module_bindings/indexed_table_table.rs b/sdks/rust/tests/test-client/src/module_bindings/indexed_table_table.rs index 569aaa7118d..73b03043ace 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/indexed_table_table.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/indexed_table_table.rs @@ -98,14 +98,14 @@ pub(super) fn parse_table_update( /// Extension trait for query builder access to the table `IndexedTable`. /// /// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait indexedTableQueryTableAccess { +pub trait indexed_tableQueryTableAccess { #[allow(non_snake_case)] /// Get a query builder for the table `IndexedTable`. - fn indexedTable(&self) -> __sdk::__query_builder::Table; + fn indexed_table(&self) -> __sdk::__query_builder::Table; } -impl indexedTableQueryTableAccess for __sdk::QueryTableAccessor { - fn indexedTable(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("indexedTable") +impl indexed_tableQueryTableAccess for __sdk::QueryTableAccessor { + fn indexed_table(&self) -> __sdk::__query_builder::Table { + __sdk::__query_builder::Table::new("indexed_table") } } diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_call_timestamp_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_call_timestamp_type.rs deleted file mode 100644 index 98f4f9cd4aa..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_call_timestamp_type.rs +++ /dev/null @@ -1,13 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct InsertCallTimestamp {} - -impl __sdk::InModule for InsertCallTimestamp { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_call_uuid_v_4_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_call_uuid_v_4_type.rs deleted file mode 100644 index 090ee924be3..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_call_uuid_v_4_type.rs +++ /dev/null @@ -1,13 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct InsertCallUuidV4 {} - -impl __sdk::InModule for InsertCallUuidV4 { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_call_uuid_v_7_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_call_uuid_v_7_type.rs deleted file mode 100644 index d90e27c899d..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_call_uuid_v_7_type.rs +++ /dev/null @@ -1,13 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct InsertCallUuidV7 {} - -impl __sdk::InModule for InsertCallUuidV7 { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_caller_one_connection_id_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_caller_one_connection_id_type.rs deleted file mode 100644 index 26df719f77c..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_caller_one_connection_id_type.rs +++ /dev/null @@ -1,13 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct InsertCallerOneConnectionId {} - -impl __sdk::InModule for InsertCallerOneConnectionId { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_caller_one_identity_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_caller_one_identity_type.rs deleted file mode 100644 index e0a093cb781..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_caller_one_identity_type.rs +++ /dev/null @@ -1,13 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct InsertCallerOneIdentity {} - -impl __sdk::InModule for InsertCallerOneIdentity { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_caller_pk_connection_id_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_caller_pk_connection_id_type.rs deleted file mode 100644 index 04d74a90935..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_caller_pk_connection_id_type.rs +++ /dev/null @@ -1,15 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct InsertCallerPkConnectionId { - pub data: i32, -} - -impl __sdk::InModule for InsertCallerPkConnectionId { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_caller_pk_identity_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_caller_pk_identity_type.rs deleted file mode 100644 index f59abd53fb9..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_caller_pk_identity_type.rs +++ /dev/null @@ -1,15 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct InsertCallerPkIdentity { - pub data: i32, -} - -impl __sdk::InModule for InsertCallerPkIdentity { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_caller_unique_connection_id_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_caller_unique_connection_id_type.rs deleted file mode 100644 index 33d5bd96cf1..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_caller_unique_connection_id_type.rs +++ /dev/null @@ -1,15 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct InsertCallerUniqueConnectionId { - pub data: i32, -} - -impl __sdk::InModule for InsertCallerUniqueConnectionId { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_caller_unique_identity_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_caller_unique_identity_type.rs deleted file mode 100644 index c0563c122a2..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_caller_unique_identity_type.rs +++ /dev/null @@ -1,15 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct InsertCallerUniqueIdentity { - pub data: i32, -} - -impl __sdk::InModule for InsertCallerUniqueIdentity { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_caller_vec_connection_id_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_caller_vec_connection_id_type.rs deleted file mode 100644 index d7debecc414..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_caller_vec_connection_id_type.rs +++ /dev/null @@ -1,13 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct InsertCallerVecConnectionId {} - -impl __sdk::InModule for InsertCallerVecConnectionId { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_caller_vec_identity_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_caller_vec_identity_type.rs deleted file mode 100644 index 489c9fb800e..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_caller_vec_identity_type.rs +++ /dev/null @@ -1,13 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct InsertCallerVecIdentity {} - -impl __sdk::InModule for InsertCallerVecIdentity { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_into_btree_u_32_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_into_btree_u_32_type.rs deleted file mode 100644 index 6681b6f5fb2..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_into_btree_u_32_type.rs +++ /dev/null @@ -1,17 +0,0 @@ -// 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, __lib, __sats, __ws}; - -use super::b_tree_u_32_type::BTreeU32; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct InsertIntoBtreeU32 { - pub rows: Vec, -} - -impl __sdk::InModule for InsertIntoBtreeU32 { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_into_indexed_simple_enum_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_into_indexed_simple_enum_type.rs deleted file mode 100644 index c7d443b0844..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_into_indexed_simple_enum_type.rs +++ /dev/null @@ -1,17 +0,0 @@ -// 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, __lib, __sats, __ws}; - -use super::simple_enum_type::SimpleEnum; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct InsertIntoIndexedSimpleEnum { - pub n: SimpleEnum, -} - -impl __sdk::InModule for InsertIntoIndexedSimpleEnum { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_into_pk_btree_u_32_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_into_pk_btree_u_32_type.rs deleted file mode 100644 index 47ef5b16bdb..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_into_pk_btree_u_32_type.rs +++ /dev/null @@ -1,19 +0,0 @@ -// 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, __lib, __sats, __ws}; - -use super::b_tree_u_32_type::BTreeU32; -use super::pk_u_32_type::PkU32; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct InsertIntoPkBtreeU32 { - pub pk_u_32: Vec, - pub bt_u_32: Vec, -} - -impl __sdk::InModule for InsertIntoPkBtreeU32 { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_large_table_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_large_table_type.rs deleted file mode 100644 index c02784cc303..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_large_table_type.rs +++ /dev/null @@ -1,43 +0,0 @@ -// 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, __lib, __sats, __ws}; - -use super::byte_struct_type::ByteStruct; -use super::enum_with_payload_type::EnumWithPayload; -use super::every_primitive_struct_type::EveryPrimitiveStruct; -use super::every_vec_struct_type::EveryVecStruct; -use super::simple_enum_type::SimpleEnum; -use super::unit_struct_type::UnitStruct; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct InsertLargeTable { - pub a: u8, - pub b: u16, - pub c: u32, - pub d: u64, - pub e: u128, - pub f: __sats::u256, - pub g: i8, - pub h: i16, - pub i: i32, - pub j: i64, - pub k: i128, - pub l: __sats::i256, - pub m: bool, - pub n: f32, - pub o: f64, - pub p: String, - pub q: SimpleEnum, - pub r: EnumWithPayload, - pub s: UnitStruct, - pub t: ByteStruct, - pub u: EveryPrimitiveStruct, - pub v: EveryVecStruct, -} - -impl __sdk::InModule for InsertLargeTable { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_one_bool_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_one_bool_type.rs deleted file mode 100644 index 1a3afcc5a04..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_one_bool_type.rs +++ /dev/null @@ -1,15 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct InsertOneBool { - pub b: bool, -} - -impl __sdk::InModule for InsertOneBool { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_one_byte_struct_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_one_byte_struct_type.rs deleted file mode 100644 index e371ec6301d..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_one_byte_struct_type.rs +++ /dev/null @@ -1,17 +0,0 @@ -// 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, __lib, __sats, __ws}; - -use super::byte_struct_type::ByteStruct; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct InsertOneByteStruct { - pub s: ByteStruct, -} - -impl __sdk::InModule for InsertOneByteStruct { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_one_connection_id_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_one_connection_id_type.rs deleted file mode 100644 index a38c4fde5a5..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_one_connection_id_type.rs +++ /dev/null @@ -1,15 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct InsertOneConnectionId { - pub a: __sdk::ConnectionId, -} - -impl __sdk::InModule for InsertOneConnectionId { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_one_enum_with_payload_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_one_enum_with_payload_type.rs deleted file mode 100644 index 443e9ebd7b2..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_one_enum_with_payload_type.rs +++ /dev/null @@ -1,17 +0,0 @@ -// 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, __lib, __sats, __ws}; - -use super::enum_with_payload_type::EnumWithPayload; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct InsertOneEnumWithPayload { - pub e: EnumWithPayload, -} - -impl __sdk::InModule for InsertOneEnumWithPayload { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_one_every_primitive_struct_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_one_every_primitive_struct_type.rs deleted file mode 100644 index 6b57c17c6fa..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_one_every_primitive_struct_type.rs +++ /dev/null @@ -1,17 +0,0 @@ -// 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, __lib, __sats, __ws}; - -use super::every_primitive_struct_type::EveryPrimitiveStruct; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct InsertOneEveryPrimitiveStruct { - pub s: EveryPrimitiveStruct, -} - -impl __sdk::InModule for InsertOneEveryPrimitiveStruct { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_one_every_vec_struct_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_one_every_vec_struct_type.rs deleted file mode 100644 index 407166daa95..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_one_every_vec_struct_type.rs +++ /dev/null @@ -1,17 +0,0 @@ -// 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, __lib, __sats, __ws}; - -use super::every_vec_struct_type::EveryVecStruct; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct InsertOneEveryVecStruct { - pub s: EveryVecStruct, -} - -impl __sdk::InModule for InsertOneEveryVecStruct { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_one_f_32_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_one_f_32_type.rs deleted file mode 100644 index 15ddaa7f65d..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_one_f_32_type.rs +++ /dev/null @@ -1,15 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct InsertOneF32 { - pub f: f32, -} - -impl __sdk::InModule for InsertOneF32 { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_one_f_64_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_one_f_64_type.rs deleted file mode 100644 index c5ec4e4967d..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_one_f_64_type.rs +++ /dev/null @@ -1,15 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct InsertOneF64 { - pub f: f64, -} - -impl __sdk::InModule for InsertOneF64 { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_one_i_128_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_one_i_128_type.rs deleted file mode 100644 index b0097b008b9..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_one_i_128_type.rs +++ /dev/null @@ -1,15 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct InsertOneI128 { - pub n: i128, -} - -impl __sdk::InModule for InsertOneI128 { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_one_i_16_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_one_i_16_type.rs deleted file mode 100644 index 3f237155011..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_one_i_16_type.rs +++ /dev/null @@ -1,15 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct InsertOneI16 { - pub n: i16, -} - -impl __sdk::InModule for InsertOneI16 { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_one_i_256_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_one_i_256_type.rs deleted file mode 100644 index b80e4bfa571..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_one_i_256_type.rs +++ /dev/null @@ -1,15 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct InsertOneI256 { - pub n: __sats::i256, -} - -impl __sdk::InModule for InsertOneI256 { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_one_i_32_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_one_i_32_type.rs deleted file mode 100644 index 2fc8816959f..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_one_i_32_type.rs +++ /dev/null @@ -1,15 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct InsertOneI32 { - pub n: i32, -} - -impl __sdk::InModule for InsertOneI32 { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_one_i_64_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_one_i_64_type.rs deleted file mode 100644 index 89b4108c8c7..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_one_i_64_type.rs +++ /dev/null @@ -1,15 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct InsertOneI64 { - pub n: i64, -} - -impl __sdk::InModule for InsertOneI64 { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_one_i_8_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_one_i_8_type.rs deleted file mode 100644 index 7ef8f5e0ce0..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_one_i_8_type.rs +++ /dev/null @@ -1,15 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct InsertOneI8 { - pub n: i8, -} - -impl __sdk::InModule for InsertOneI8 { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_one_identity_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_one_identity_type.rs deleted file mode 100644 index d0a6bf3b47f..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_one_identity_type.rs +++ /dev/null @@ -1,15 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct InsertOneIdentity { - pub i: __sdk::Identity, -} - -impl __sdk::InModule for InsertOneIdentity { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_one_simple_enum_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_one_simple_enum_type.rs deleted file mode 100644 index 2445985e977..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_one_simple_enum_type.rs +++ /dev/null @@ -1,17 +0,0 @@ -// 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, __lib, __sats, __ws}; - -use super::simple_enum_type::SimpleEnum; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct InsertOneSimpleEnum { - pub e: SimpleEnum, -} - -impl __sdk::InModule for InsertOneSimpleEnum { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_one_string_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_one_string_type.rs deleted file mode 100644 index 1bfe7f42517..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_one_string_type.rs +++ /dev/null @@ -1,15 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct InsertOneString { - pub s: String, -} - -impl __sdk::InModule for InsertOneString { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_one_timestamp_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_one_timestamp_type.rs deleted file mode 100644 index 6e5430e89b8..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_one_timestamp_type.rs +++ /dev/null @@ -1,15 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct InsertOneTimestamp { - pub t: __sdk::Timestamp, -} - -impl __sdk::InModule for InsertOneTimestamp { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_one_u_128_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_one_u_128_type.rs deleted file mode 100644 index 28f7eced79e..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_one_u_128_type.rs +++ /dev/null @@ -1,15 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct InsertOneU128 { - pub n: u128, -} - -impl __sdk::InModule for InsertOneU128 { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_one_u_16_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_one_u_16_type.rs deleted file mode 100644 index 759fd392731..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_one_u_16_type.rs +++ /dev/null @@ -1,15 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct InsertOneU16 { - pub n: u16, -} - -impl __sdk::InModule for InsertOneU16 { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_one_u_256_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_one_u_256_type.rs deleted file mode 100644 index 0c9c54c122e..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_one_u_256_type.rs +++ /dev/null @@ -1,15 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct InsertOneU256 { - pub n: __sats::u256, -} - -impl __sdk::InModule for InsertOneU256 { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_one_u_32_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_one_u_32_type.rs deleted file mode 100644 index f2657007940..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_one_u_32_type.rs +++ /dev/null @@ -1,15 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct InsertOneU32 { - pub n: u32, -} - -impl __sdk::InModule for InsertOneU32 { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_one_u_64_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_one_u_64_type.rs deleted file mode 100644 index a1f29796fc4..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_one_u_64_type.rs +++ /dev/null @@ -1,15 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct InsertOneU64 { - pub n: u64, -} - -impl __sdk::InModule for InsertOneU64 { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_one_u_8_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_one_u_8_type.rs deleted file mode 100644 index 5bbdc292c7b..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_one_u_8_type.rs +++ /dev/null @@ -1,15 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct InsertOneU8 { - pub n: u8, -} - -impl __sdk::InModule for InsertOneU8 { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_one_unit_struct_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_one_unit_struct_type.rs deleted file mode 100644 index 974dfa5365c..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_one_unit_struct_type.rs +++ /dev/null @@ -1,17 +0,0 @@ -// 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, __lib, __sats, __ws}; - -use super::unit_struct_type::UnitStruct; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct InsertOneUnitStruct { - pub s: UnitStruct, -} - -impl __sdk::InModule for InsertOneUnitStruct { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_one_uuid_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_one_uuid_type.rs deleted file mode 100644 index 731261b1d32..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_one_uuid_type.rs +++ /dev/null @@ -1,15 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct InsertOneUuid { - pub u: __sdk::Uuid, -} - -impl __sdk::InModule for InsertOneUuid { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_option_every_primitive_struct_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_option_every_primitive_struct_type.rs deleted file mode 100644 index f60217340f0..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_option_every_primitive_struct_type.rs +++ /dev/null @@ -1,17 +0,0 @@ -// 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, __lib, __sats, __ws}; - -use super::every_primitive_struct_type::EveryPrimitiveStruct; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct InsertOptionEveryPrimitiveStruct { - pub s: Option, -} - -impl __sdk::InModule for InsertOptionEveryPrimitiveStruct { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_option_i_32_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_option_i_32_type.rs deleted file mode 100644 index 3f9bc081304..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_option_i_32_type.rs +++ /dev/null @@ -1,15 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct InsertOptionI32 { - pub n: Option, -} - -impl __sdk::InModule for InsertOptionI32 { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_option_identity_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_option_identity_type.rs deleted file mode 100644 index e1905a198e5..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_option_identity_type.rs +++ /dev/null @@ -1,15 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct InsertOptionIdentity { - pub i: Option<__sdk::Identity>, -} - -impl __sdk::InModule for InsertOptionIdentity { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_option_simple_enum_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_option_simple_enum_type.rs deleted file mode 100644 index c56962d238d..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_option_simple_enum_type.rs +++ /dev/null @@ -1,17 +0,0 @@ -// 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, __lib, __sats, __ws}; - -use super::simple_enum_type::SimpleEnum; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct InsertOptionSimpleEnum { - pub e: Option, -} - -impl __sdk::InModule for InsertOptionSimpleEnum { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_option_string_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_option_string_type.rs deleted file mode 100644 index 83bf2589b25..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_option_string_type.rs +++ /dev/null @@ -1,15 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct InsertOptionString { - pub s: Option, -} - -impl __sdk::InModule for InsertOptionString { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_option_uuid_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_option_uuid_type.rs deleted file mode 100644 index a5384c296d9..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_option_uuid_type.rs +++ /dev/null @@ -1,15 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct InsertOptionUuid { - pub u: Option<__sdk::Uuid>, -} - -impl __sdk::InModule for InsertOptionUuid { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_option_vec_option_i_32_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_option_vec_option_i_32_type.rs deleted file mode 100644 index 6dbefbc60f9..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_option_vec_option_i_32_type.rs +++ /dev/null @@ -1,15 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct InsertOptionVecOptionI32 { - pub v: Option>>, -} - -impl __sdk::InModule for InsertOptionVecOptionI32 { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_pk_bool_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_pk_bool_type.rs deleted file mode 100644 index 24f11832cbd..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_pk_bool_type.rs +++ /dev/null @@ -1,16 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct InsertPkBool { - pub b: bool, - pub data: i32, -} - -impl __sdk::InModule for InsertPkBool { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_pk_connection_id_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_pk_connection_id_type.rs deleted file mode 100644 index 05e36b85eb2..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_pk_connection_id_type.rs +++ /dev/null @@ -1,16 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct InsertPkConnectionId { - pub a: __sdk::ConnectionId, - pub data: i32, -} - -impl __sdk::InModule for InsertPkConnectionId { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_pk_i_128_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_pk_i_128_type.rs deleted file mode 100644 index 72835f5051f..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_pk_i_128_type.rs +++ /dev/null @@ -1,16 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct InsertPkI128 { - pub n: i128, - pub data: i32, -} - -impl __sdk::InModule for InsertPkI128 { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_pk_i_16_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_pk_i_16_type.rs deleted file mode 100644 index fbd68331f95..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_pk_i_16_type.rs +++ /dev/null @@ -1,16 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct InsertPkI16 { - pub n: i16, - pub data: i32, -} - -impl __sdk::InModule for InsertPkI16 { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_pk_i_256_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_pk_i_256_type.rs deleted file mode 100644 index dacb918ad47..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_pk_i_256_type.rs +++ /dev/null @@ -1,16 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct InsertPkI256 { - pub n: __sats::i256, - pub data: i32, -} - -impl __sdk::InModule for InsertPkI256 { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_pk_i_32_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_pk_i_32_type.rs deleted file mode 100644 index c2a05f196fc..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_pk_i_32_type.rs +++ /dev/null @@ -1,16 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct InsertPkI32 { - pub n: i32, - pub data: i32, -} - -impl __sdk::InModule for InsertPkI32 { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_pk_i_64_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_pk_i_64_type.rs deleted file mode 100644 index 43a41c37afb..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_pk_i_64_type.rs +++ /dev/null @@ -1,16 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct InsertPkI64 { - pub n: i64, - pub data: i32, -} - -impl __sdk::InModule for InsertPkI64 { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_pk_i_8_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_pk_i_8_type.rs deleted file mode 100644 index 4368e4d415f..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_pk_i_8_type.rs +++ /dev/null @@ -1,16 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct InsertPkI8 { - pub n: i8, - pub data: i32, -} - -impl __sdk::InModule for InsertPkI8 { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_pk_identity_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_pk_identity_type.rs deleted file mode 100644 index 6c0ea63c0a4..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_pk_identity_type.rs +++ /dev/null @@ -1,16 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct InsertPkIdentity { - pub i: __sdk::Identity, - pub data: i32, -} - -impl __sdk::InModule for InsertPkIdentity { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_pk_simple_enum_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_pk_simple_enum_type.rs deleted file mode 100644 index b05b80fbd5d..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_pk_simple_enum_type.rs +++ /dev/null @@ -1,18 +0,0 @@ -// 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, __lib, __sats, __ws}; - -use super::simple_enum_type::SimpleEnum; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct InsertPkSimpleEnum { - pub a: SimpleEnum, - pub data: i32, -} - -impl __sdk::InModule for InsertPkSimpleEnum { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_pk_string_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_pk_string_type.rs deleted file mode 100644 index e844b460bb4..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_pk_string_type.rs +++ /dev/null @@ -1,16 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct InsertPkString { - pub s: String, - pub data: i32, -} - -impl __sdk::InModule for InsertPkString { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_pk_u_128_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_pk_u_128_type.rs deleted file mode 100644 index 0638d755b1e..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_pk_u_128_type.rs +++ /dev/null @@ -1,16 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct InsertPkU128 { - pub n: u128, - pub data: i32, -} - -impl __sdk::InModule for InsertPkU128 { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_pk_u_16_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_pk_u_16_type.rs deleted file mode 100644 index b3165e7e9b1..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_pk_u_16_type.rs +++ /dev/null @@ -1,16 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct InsertPkU16 { - pub n: u16, - pub data: i32, -} - -impl __sdk::InModule for InsertPkU16 { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_pk_u_256_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_pk_u_256_type.rs deleted file mode 100644 index 998fecf517a..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_pk_u_256_type.rs +++ /dev/null @@ -1,16 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct InsertPkU256 { - pub n: __sats::u256, - pub data: i32, -} - -impl __sdk::InModule for InsertPkU256 { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_pk_u_32_two_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_pk_u_32_two_type.rs deleted file mode 100644 index 5e950641ae1..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_pk_u_32_two_type.rs +++ /dev/null @@ -1,16 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct InsertPkU32Two { - pub n: u32, - pub data: i32, -} - -impl __sdk::InModule for InsertPkU32Two { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_pk_u_32_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_pk_u_32_type.rs deleted file mode 100644 index 2fc788f30e0..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_pk_u_32_type.rs +++ /dev/null @@ -1,16 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct InsertPkU32 { - pub n: u32, - pub data: i32, -} - -impl __sdk::InModule for InsertPkU32 { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_pk_u_64_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_pk_u_64_type.rs deleted file mode 100644 index c8ed6b75bbb..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_pk_u_64_type.rs +++ /dev/null @@ -1,16 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct InsertPkU64 { - pub n: u64, - pub data: i32, -} - -impl __sdk::InModule for InsertPkU64 { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_pk_u_8_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_pk_u_8_type.rs deleted file mode 100644 index 0ce48480107..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_pk_u_8_type.rs +++ /dev/null @@ -1,16 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct InsertPkU8 { - pub n: u8, - pub data: i32, -} - -impl __sdk::InModule for InsertPkU8 { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_pk_uuid_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_pk_uuid_type.rs deleted file mode 100644 index bde38558655..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_pk_uuid_type.rs +++ /dev/null @@ -1,16 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct InsertPkUuid { - pub u: __sdk::Uuid, - pub data: i32, -} - -impl __sdk::InModule for InsertPkUuid { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_primitives_as_strings_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_primitives_as_strings_type.rs deleted file mode 100644 index 6b83afd82b2..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_primitives_as_strings_type.rs +++ /dev/null @@ -1,17 +0,0 @@ -// 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, __lib, __sats, __ws}; - -use super::every_primitive_struct_type::EveryPrimitiveStruct; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct InsertPrimitivesAsStrings { - pub s: EveryPrimitiveStruct, -} - -impl __sdk::InModule for InsertPrimitivesAsStrings { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_result_every_primitive_struct_string_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_result_every_primitive_struct_string_type.rs deleted file mode 100644 index 262c055df73..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_result_every_primitive_struct_string_type.rs +++ /dev/null @@ -1,17 +0,0 @@ -// 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, __lib, __sats, __ws}; - -use super::every_primitive_struct_type::EveryPrimitiveStruct; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct InsertResultEveryPrimitiveStructString { - pub r: Result, -} - -impl __sdk::InModule for InsertResultEveryPrimitiveStructString { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_result_i_32_string_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_result_i_32_string_type.rs deleted file mode 100644 index 613a248bb1c..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_result_i_32_string_type.rs +++ /dev/null @@ -1,15 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct InsertResultI32String { - pub r: Result, -} - -impl __sdk::InModule for InsertResultI32String { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_result_identity_string_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_result_identity_string_type.rs deleted file mode 100644 index 3d773cee112..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_result_identity_string_type.rs +++ /dev/null @@ -1,15 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct InsertResultIdentityString { - pub r: Result<__sdk::Identity, String>, -} - -impl __sdk::InModule for InsertResultIdentityString { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_result_simple_enum_i_32_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_result_simple_enum_i_32_type.rs deleted file mode 100644 index 086b4750354..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_result_simple_enum_i_32_type.rs +++ /dev/null @@ -1,17 +0,0 @@ -// 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, __lib, __sats, __ws}; - -use super::simple_enum_type::SimpleEnum; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct InsertResultSimpleEnumI32 { - pub r: Result, -} - -impl __sdk::InModule for InsertResultSimpleEnumI32 { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_result_string_i_32_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_result_string_i_32_type.rs deleted file mode 100644 index e06c8a25e72..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_result_string_i_32_type.rs +++ /dev/null @@ -1,15 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct InsertResultStringI32 { - pub r: Result, -} - -impl __sdk::InModule for InsertResultStringI32 { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_result_vec_i_32_string_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_result_vec_i_32_string_type.rs deleted file mode 100644 index 992a55f5713..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_result_vec_i_32_string_type.rs +++ /dev/null @@ -1,15 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct InsertResultVecI32String { - pub r: Result, String>, -} - -impl __sdk::InModule for InsertResultVecI32String { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_table_holds_table_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_table_holds_table_type.rs deleted file mode 100644 index b02283cab2e..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_table_holds_table_type.rs +++ /dev/null @@ -1,19 +0,0 @@ -// 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, __lib, __sats, __ws}; - -use super::one_u_8_type::OneU8; -use super::vec_u_8_type::VecU8; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct InsertTableHoldsTable { - pub a: OneU8, - pub b: VecU8, -} - -impl __sdk::InModule for InsertTableHoldsTable { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_unique_bool_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_unique_bool_type.rs deleted file mode 100644 index 3a94ec3f352..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_unique_bool_type.rs +++ /dev/null @@ -1,16 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct InsertUniqueBool { - pub b: bool, - pub data: i32, -} - -impl __sdk::InModule for InsertUniqueBool { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_unique_connection_id_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_unique_connection_id_type.rs deleted file mode 100644 index c3939b84ab2..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_unique_connection_id_type.rs +++ /dev/null @@ -1,16 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct InsertUniqueConnectionId { - pub a: __sdk::ConnectionId, - pub data: i32, -} - -impl __sdk::InModule for InsertUniqueConnectionId { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_unique_i_128_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_unique_i_128_type.rs deleted file mode 100644 index 70452570fb2..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_unique_i_128_type.rs +++ /dev/null @@ -1,16 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct InsertUniqueI128 { - pub n: i128, - pub data: i32, -} - -impl __sdk::InModule for InsertUniqueI128 { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_unique_i_16_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_unique_i_16_type.rs deleted file mode 100644 index f451f1da503..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_unique_i_16_type.rs +++ /dev/null @@ -1,16 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct InsertUniqueI16 { - pub n: i16, - pub data: i32, -} - -impl __sdk::InModule for InsertUniqueI16 { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_unique_i_256_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_unique_i_256_type.rs deleted file mode 100644 index 8780cc26066..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_unique_i_256_type.rs +++ /dev/null @@ -1,16 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct InsertUniqueI256 { - pub n: __sats::i256, - pub data: i32, -} - -impl __sdk::InModule for InsertUniqueI256 { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_unique_i_32_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_unique_i_32_type.rs deleted file mode 100644 index 1563efdc189..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_unique_i_32_type.rs +++ /dev/null @@ -1,16 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct InsertUniqueI32 { - pub n: i32, - pub data: i32, -} - -impl __sdk::InModule for InsertUniqueI32 { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_unique_i_64_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_unique_i_64_type.rs deleted file mode 100644 index 683240fad70..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_unique_i_64_type.rs +++ /dev/null @@ -1,16 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct InsertUniqueI64 { - pub n: i64, - pub data: i32, -} - -impl __sdk::InModule for InsertUniqueI64 { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_unique_i_8_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_unique_i_8_type.rs deleted file mode 100644 index 7c44e1980bd..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_unique_i_8_type.rs +++ /dev/null @@ -1,16 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct InsertUniqueI8 { - pub n: i8, - pub data: i32, -} - -impl __sdk::InModule for InsertUniqueI8 { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_unique_identity_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_unique_identity_type.rs deleted file mode 100644 index 89237b2888b..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_unique_identity_type.rs +++ /dev/null @@ -1,16 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct InsertUniqueIdentity { - pub i: __sdk::Identity, - pub data: i32, -} - -impl __sdk::InModule for InsertUniqueIdentity { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_unique_string_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_unique_string_type.rs deleted file mode 100644 index 41671764fcd..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_unique_string_type.rs +++ /dev/null @@ -1,16 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct InsertUniqueString { - pub s: String, - pub data: i32, -} - -impl __sdk::InModule for InsertUniqueString { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_unique_u_128_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_unique_u_128_type.rs deleted file mode 100644 index f1608ea45fd..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_unique_u_128_type.rs +++ /dev/null @@ -1,16 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct InsertUniqueU128 { - pub n: u128, - pub data: i32, -} - -impl __sdk::InModule for InsertUniqueU128 { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_unique_u_16_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_unique_u_16_type.rs deleted file mode 100644 index 5b2da1679fb..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_unique_u_16_type.rs +++ /dev/null @@ -1,16 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct InsertUniqueU16 { - pub n: u16, - pub data: i32, -} - -impl __sdk::InModule for InsertUniqueU16 { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_unique_u_256_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_unique_u_256_type.rs deleted file mode 100644 index 868ebb4ba7e..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_unique_u_256_type.rs +++ /dev/null @@ -1,16 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct InsertUniqueU256 { - pub n: __sats::u256, - pub data: i32, -} - -impl __sdk::InModule for InsertUniqueU256 { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_unique_u_32_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_unique_u_32_type.rs deleted file mode 100644 index db4d9e5ea0d..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_unique_u_32_type.rs +++ /dev/null @@ -1,16 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct InsertUniqueU32 { - pub n: u32, - pub data: i32, -} - -impl __sdk::InModule for InsertUniqueU32 { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_unique_u_32_update_pk_u_32_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_unique_u_32_update_pk_u_32_type.rs deleted file mode 100644 index a67e8944a5d..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_unique_u_32_update_pk_u_32_type.rs +++ /dev/null @@ -1,17 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct InsertUniqueU32UpdatePkU32 { - pub n: u32, - pub d_unique: i32, - pub d_pk: i32, -} - -impl __sdk::InModule for InsertUniqueU32UpdatePkU32 { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_unique_u_64_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_unique_u_64_type.rs deleted file mode 100644 index 78460fc636b..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_unique_u_64_type.rs +++ /dev/null @@ -1,16 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct InsertUniqueU64 { - pub n: u64, - pub data: i32, -} - -impl __sdk::InModule for InsertUniqueU64 { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_unique_u_8_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_unique_u_8_type.rs deleted file mode 100644 index bc1fe8b381d..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_unique_u_8_type.rs +++ /dev/null @@ -1,16 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct InsertUniqueU8 { - pub n: u8, - pub data: i32, -} - -impl __sdk::InModule for InsertUniqueU8 { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_unique_uuid_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_unique_uuid_type.rs deleted file mode 100644 index 91191328633..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_unique_uuid_type.rs +++ /dev/null @@ -1,16 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct InsertUniqueUuid { - pub u: __sdk::Uuid, - pub data: i32, -} - -impl __sdk::InModule for InsertUniqueUuid { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_user_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_user_type.rs deleted file mode 100644 index 76253a7f46b..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_user_type.rs +++ /dev/null @@ -1,16 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct InsertUser { - pub name: String, - pub identity: __sdk::Identity, -} - -impl __sdk::InModule for InsertUser { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_vec_bool_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_vec_bool_type.rs deleted file mode 100644 index 34930007455..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_vec_bool_type.rs +++ /dev/null @@ -1,15 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct InsertVecBool { - pub b: Vec, -} - -impl __sdk::InModule for InsertVecBool { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_vec_byte_struct_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_vec_byte_struct_type.rs deleted file mode 100644 index b5ab4fc1170..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_vec_byte_struct_type.rs +++ /dev/null @@ -1,17 +0,0 @@ -// 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, __lib, __sats, __ws}; - -use super::byte_struct_type::ByteStruct; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct InsertVecByteStruct { - pub s: Vec, -} - -impl __sdk::InModule for InsertVecByteStruct { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_vec_connection_id_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_vec_connection_id_type.rs deleted file mode 100644 index 25f7274fa3a..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_vec_connection_id_type.rs +++ /dev/null @@ -1,15 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct InsertVecConnectionId { - pub a: Vec<__sdk::ConnectionId>, -} - -impl __sdk::InModule for InsertVecConnectionId { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_vec_enum_with_payload_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_vec_enum_with_payload_type.rs deleted file mode 100644 index e72ce9ee3fb..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_vec_enum_with_payload_type.rs +++ /dev/null @@ -1,17 +0,0 @@ -// 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, __lib, __sats, __ws}; - -use super::enum_with_payload_type::EnumWithPayload; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct InsertVecEnumWithPayload { - pub e: Vec, -} - -impl __sdk::InModule for InsertVecEnumWithPayload { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_vec_every_primitive_struct_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_vec_every_primitive_struct_type.rs deleted file mode 100644 index b1bc72e37ec..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_vec_every_primitive_struct_type.rs +++ /dev/null @@ -1,17 +0,0 @@ -// 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, __lib, __sats, __ws}; - -use super::every_primitive_struct_type::EveryPrimitiveStruct; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct InsertVecEveryPrimitiveStruct { - pub s: Vec, -} - -impl __sdk::InModule for InsertVecEveryPrimitiveStruct { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_vec_every_vec_struct_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_vec_every_vec_struct_type.rs deleted file mode 100644 index 89b65f164ee..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_vec_every_vec_struct_type.rs +++ /dev/null @@ -1,17 +0,0 @@ -// 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, __lib, __sats, __ws}; - -use super::every_vec_struct_type::EveryVecStruct; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct InsertVecEveryVecStruct { - pub s: Vec, -} - -impl __sdk::InModule for InsertVecEveryVecStruct { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_vec_f_32_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_vec_f_32_type.rs deleted file mode 100644 index e66d6258bf2..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_vec_f_32_type.rs +++ /dev/null @@ -1,15 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct InsertVecF32 { - pub f: Vec, -} - -impl __sdk::InModule for InsertVecF32 { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_vec_f_64_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_vec_f_64_type.rs deleted file mode 100644 index 96183c0d8c1..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_vec_f_64_type.rs +++ /dev/null @@ -1,15 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct InsertVecF64 { - pub f: Vec, -} - -impl __sdk::InModule for InsertVecF64 { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_vec_i_128_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_vec_i_128_type.rs deleted file mode 100644 index 7274d969f60..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_vec_i_128_type.rs +++ /dev/null @@ -1,15 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct InsertVecI128 { - pub n: Vec, -} - -impl __sdk::InModule for InsertVecI128 { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_vec_i_16_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_vec_i_16_type.rs deleted file mode 100644 index 1397b241d66..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_vec_i_16_type.rs +++ /dev/null @@ -1,15 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct InsertVecI16 { - pub n: Vec, -} - -impl __sdk::InModule for InsertVecI16 { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_vec_i_256_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_vec_i_256_type.rs deleted file mode 100644 index 4c5ced1c13e..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_vec_i_256_type.rs +++ /dev/null @@ -1,15 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct InsertVecI256 { - pub n: Vec<__sats::i256>, -} - -impl __sdk::InModule for InsertVecI256 { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_vec_i_32_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_vec_i_32_type.rs deleted file mode 100644 index 1e5c042d8c2..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_vec_i_32_type.rs +++ /dev/null @@ -1,15 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct InsertVecI32 { - pub n: Vec, -} - -impl __sdk::InModule for InsertVecI32 { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_vec_i_64_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_vec_i_64_type.rs deleted file mode 100644 index 87215a92c81..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_vec_i_64_type.rs +++ /dev/null @@ -1,15 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct InsertVecI64 { - pub n: Vec, -} - -impl __sdk::InModule for InsertVecI64 { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_vec_i_8_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_vec_i_8_type.rs deleted file mode 100644 index 33db9b47257..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_vec_i_8_type.rs +++ /dev/null @@ -1,15 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct InsertVecI8 { - pub n: Vec, -} - -impl __sdk::InModule for InsertVecI8 { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_vec_identity_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_vec_identity_type.rs deleted file mode 100644 index fd493e98f78..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_vec_identity_type.rs +++ /dev/null @@ -1,15 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct InsertVecIdentity { - pub i: Vec<__sdk::Identity>, -} - -impl __sdk::InModule for InsertVecIdentity { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_vec_simple_enum_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_vec_simple_enum_type.rs deleted file mode 100644 index ec3863a1579..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_vec_simple_enum_type.rs +++ /dev/null @@ -1,17 +0,0 @@ -// 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, __lib, __sats, __ws}; - -use super::simple_enum_type::SimpleEnum; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct InsertVecSimpleEnum { - pub e: Vec, -} - -impl __sdk::InModule for InsertVecSimpleEnum { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_vec_string_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_vec_string_type.rs deleted file mode 100644 index fb672fcd3e1..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_vec_string_type.rs +++ /dev/null @@ -1,15 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct InsertVecString { - pub s: Vec, -} - -impl __sdk::InModule for InsertVecString { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_vec_timestamp_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_vec_timestamp_type.rs deleted file mode 100644 index 84ecaaa879f..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_vec_timestamp_type.rs +++ /dev/null @@ -1,15 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct InsertVecTimestamp { - pub t: Vec<__sdk::Timestamp>, -} - -impl __sdk::InModule for InsertVecTimestamp { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_vec_u_128_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_vec_u_128_type.rs deleted file mode 100644 index 1d52b49b6f3..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_vec_u_128_type.rs +++ /dev/null @@ -1,15 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct InsertVecU128 { - pub n: Vec, -} - -impl __sdk::InModule for InsertVecU128 { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_vec_u_16_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_vec_u_16_type.rs deleted file mode 100644 index 4de1bb55a83..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_vec_u_16_type.rs +++ /dev/null @@ -1,15 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct InsertVecU16 { - pub n: Vec, -} - -impl __sdk::InModule for InsertVecU16 { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_vec_u_256_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_vec_u_256_type.rs deleted file mode 100644 index 788ba855503..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_vec_u_256_type.rs +++ /dev/null @@ -1,15 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct InsertVecU256 { - pub n: Vec<__sats::u256>, -} - -impl __sdk::InModule for InsertVecU256 { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_vec_u_32_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_vec_u_32_type.rs deleted file mode 100644 index 10aff3bf785..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_vec_u_32_type.rs +++ /dev/null @@ -1,15 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct InsertVecU32 { - pub n: Vec, -} - -impl __sdk::InModule for InsertVecU32 { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_vec_u_64_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_vec_u_64_type.rs deleted file mode 100644 index a1b7de56458..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_vec_u_64_type.rs +++ /dev/null @@ -1,15 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct InsertVecU64 { - pub n: Vec, -} - -impl __sdk::InModule for InsertVecU64 { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_vec_u_8_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_vec_u_8_type.rs deleted file mode 100644 index c418a6efba7..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_vec_u_8_type.rs +++ /dev/null @@ -1,15 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct InsertVecU8 { - pub n: Vec, -} - -impl __sdk::InModule for InsertVecU8 { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_vec_unit_struct_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_vec_unit_struct_type.rs deleted file mode 100644 index cd486e7b1fc..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_vec_unit_struct_type.rs +++ /dev/null @@ -1,17 +0,0 @@ -// 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, __lib, __sats, __ws}; - -use super::unit_struct_type::UnitStruct; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct InsertVecUnitStruct { - pub s: Vec, -} - -impl __sdk::InModule for InsertVecUnitStruct { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/insert_vec_uuid_type.rs b/sdks/rust/tests/test-client/src/module_bindings/insert_vec_uuid_type.rs deleted file mode 100644 index cc804552bab..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/insert_vec_uuid_type.rs +++ /dev/null @@ -1,15 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct InsertVecUuid { - pub u: Vec<__sdk::Uuid>, -} - -impl __sdk::InModule for InsertVecUuid { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/mod.rs b/sdks/rust/tests/test-client/src/module_bindings/mod.rs index 3d18e82919f..de9afc6155f 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/mod.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/mod.rs @@ -1,7 +1,7 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE // WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. -// This was generated using spacetimedb cli version 2.0.0 (commit 9ff95757316cdd120699ca8fcabecbd13eb24157). +// This was generated using spacetimedb cli version 2.0.0 (commit e528393902d8cc982769e3b1a0f250d7d53edfa1). #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; @@ -10,81 +10,43 @@ pub mod b_tree_u_32_type; pub mod btree_u_32_table; pub mod byte_struct_type; pub mod delete_from_btree_u_32_reducer; -pub mod delete_from_btree_u_32_type; pub mod delete_large_table_reducer; -pub mod delete_large_table_type; pub mod delete_pk_bool_reducer; -pub mod delete_pk_bool_type; pub mod delete_pk_connection_id_reducer; -pub mod delete_pk_connection_id_type; pub mod delete_pk_i_128_reducer; -pub mod delete_pk_i_128_type; pub mod delete_pk_i_16_reducer; -pub mod delete_pk_i_16_type; pub mod delete_pk_i_256_reducer; -pub mod delete_pk_i_256_type; pub mod delete_pk_i_32_reducer; -pub mod delete_pk_i_32_type; pub mod delete_pk_i_64_reducer; -pub mod delete_pk_i_64_type; pub mod delete_pk_i_8_reducer; -pub mod delete_pk_i_8_type; pub mod delete_pk_identity_reducer; -pub mod delete_pk_identity_type; pub mod delete_pk_string_reducer; -pub mod delete_pk_string_type; pub mod delete_pk_u_128_reducer; -pub mod delete_pk_u_128_type; pub mod delete_pk_u_16_reducer; -pub mod delete_pk_u_16_type; pub mod delete_pk_u_256_reducer; -pub mod delete_pk_u_256_type; pub mod delete_pk_u_32_insert_pk_u_32_two_reducer; -pub mod delete_pk_u_32_insert_pk_u_32_two_type; pub mod delete_pk_u_32_reducer; pub mod delete_pk_u_32_two_reducer; -pub mod delete_pk_u_32_two_type; -pub mod delete_pk_u_32_type; pub mod delete_pk_u_64_reducer; -pub mod delete_pk_u_64_type; pub mod delete_pk_u_8_reducer; -pub mod delete_pk_u_8_type; pub mod delete_pk_uuid_reducer; -pub mod delete_pk_uuid_type; pub mod delete_unique_bool_reducer; -pub mod delete_unique_bool_type; pub mod delete_unique_connection_id_reducer; -pub mod delete_unique_connection_id_type; pub mod delete_unique_i_128_reducer; -pub mod delete_unique_i_128_type; pub mod delete_unique_i_16_reducer; -pub mod delete_unique_i_16_type; pub mod delete_unique_i_256_reducer; -pub mod delete_unique_i_256_type; pub mod delete_unique_i_32_reducer; -pub mod delete_unique_i_32_type; pub mod delete_unique_i_64_reducer; -pub mod delete_unique_i_64_type; pub mod delete_unique_i_8_reducer; -pub mod delete_unique_i_8_type; pub mod delete_unique_identity_reducer; -pub mod delete_unique_identity_type; pub mod delete_unique_string_reducer; -pub mod delete_unique_string_type; pub mod delete_unique_u_128_reducer; -pub mod delete_unique_u_128_type; pub mod delete_unique_u_16_reducer; -pub mod delete_unique_u_16_type; pub mod delete_unique_u_256_reducer; -pub mod delete_unique_u_256_type; pub mod delete_unique_u_32_reducer; -pub mod delete_unique_u_32_type; pub mod delete_unique_u_64_reducer; -pub mod delete_unique_u_64_type; pub mod delete_unique_u_8_reducer; -pub mod delete_unique_u_8_type; pub mod delete_unique_uuid_reducer; -pub mod delete_unique_uuid_type; pub mod enum_with_payload_type; pub mod every_primitive_struct_type; pub mod every_vec_struct_type; @@ -95,249 +57,128 @@ pub mod indexed_table_2_type; pub mod indexed_table_table; pub mod indexed_table_type; pub mod insert_call_timestamp_reducer; -pub mod insert_call_timestamp_type; pub mod insert_call_uuid_v_4_reducer; -pub mod insert_call_uuid_v_4_type; pub mod insert_call_uuid_v_7_reducer; -pub mod insert_call_uuid_v_7_type; pub mod insert_caller_one_connection_id_reducer; -pub mod insert_caller_one_connection_id_type; pub mod insert_caller_one_identity_reducer; -pub mod insert_caller_one_identity_type; pub mod insert_caller_pk_connection_id_reducer; -pub mod insert_caller_pk_connection_id_type; pub mod insert_caller_pk_identity_reducer; -pub mod insert_caller_pk_identity_type; pub mod insert_caller_unique_connection_id_reducer; -pub mod insert_caller_unique_connection_id_type; pub mod insert_caller_unique_identity_reducer; -pub mod insert_caller_unique_identity_type; pub mod insert_caller_vec_connection_id_reducer; -pub mod insert_caller_vec_connection_id_type; pub mod insert_caller_vec_identity_reducer; -pub mod insert_caller_vec_identity_type; pub mod insert_into_btree_u_32_reducer; -pub mod insert_into_btree_u_32_type; pub mod insert_into_indexed_simple_enum_reducer; -pub mod insert_into_indexed_simple_enum_type; pub mod insert_into_pk_btree_u_32_reducer; -pub mod insert_into_pk_btree_u_32_type; pub mod insert_large_table_reducer; -pub mod insert_large_table_type; pub mod insert_one_bool_reducer; -pub mod insert_one_bool_type; pub mod insert_one_byte_struct_reducer; -pub mod insert_one_byte_struct_type; pub mod insert_one_connection_id_reducer; -pub mod insert_one_connection_id_type; pub mod insert_one_enum_with_payload_reducer; -pub mod insert_one_enum_with_payload_type; pub mod insert_one_every_primitive_struct_reducer; -pub mod insert_one_every_primitive_struct_type; pub mod insert_one_every_vec_struct_reducer; -pub mod insert_one_every_vec_struct_type; pub mod insert_one_f_32_reducer; -pub mod insert_one_f_32_type; pub mod insert_one_f_64_reducer; -pub mod insert_one_f_64_type; pub mod insert_one_i_128_reducer; -pub mod insert_one_i_128_type; pub mod insert_one_i_16_reducer; -pub mod insert_one_i_16_type; pub mod insert_one_i_256_reducer; -pub mod insert_one_i_256_type; pub mod insert_one_i_32_reducer; -pub mod insert_one_i_32_type; pub mod insert_one_i_64_reducer; -pub mod insert_one_i_64_type; pub mod insert_one_i_8_reducer; -pub mod insert_one_i_8_type; pub mod insert_one_identity_reducer; -pub mod insert_one_identity_type; pub mod insert_one_simple_enum_reducer; -pub mod insert_one_simple_enum_type; pub mod insert_one_string_reducer; -pub mod insert_one_string_type; pub mod insert_one_timestamp_reducer; -pub mod insert_one_timestamp_type; pub mod insert_one_u_128_reducer; -pub mod insert_one_u_128_type; pub mod insert_one_u_16_reducer; -pub mod insert_one_u_16_type; pub mod insert_one_u_256_reducer; -pub mod insert_one_u_256_type; pub mod insert_one_u_32_reducer; -pub mod insert_one_u_32_type; pub mod insert_one_u_64_reducer; -pub mod insert_one_u_64_type; pub mod insert_one_u_8_reducer; -pub mod insert_one_u_8_type; pub mod insert_one_unit_struct_reducer; -pub mod insert_one_unit_struct_type; pub mod insert_one_uuid_reducer; -pub mod insert_one_uuid_type; pub mod insert_option_every_primitive_struct_reducer; -pub mod insert_option_every_primitive_struct_type; pub mod insert_option_i_32_reducer; -pub mod insert_option_i_32_type; pub mod insert_option_identity_reducer; -pub mod insert_option_identity_type; pub mod insert_option_simple_enum_reducer; -pub mod insert_option_simple_enum_type; pub mod insert_option_string_reducer; -pub mod insert_option_string_type; pub mod insert_option_uuid_reducer; -pub mod insert_option_uuid_type; pub mod insert_option_vec_option_i_32_reducer; -pub mod insert_option_vec_option_i_32_type; pub mod insert_pk_bool_reducer; -pub mod insert_pk_bool_type; pub mod insert_pk_connection_id_reducer; -pub mod insert_pk_connection_id_type; pub mod insert_pk_i_128_reducer; -pub mod insert_pk_i_128_type; pub mod insert_pk_i_16_reducer; -pub mod insert_pk_i_16_type; pub mod insert_pk_i_256_reducer; -pub mod insert_pk_i_256_type; pub mod insert_pk_i_32_reducer; -pub mod insert_pk_i_32_type; pub mod insert_pk_i_64_reducer; -pub mod insert_pk_i_64_type; pub mod insert_pk_i_8_reducer; -pub mod insert_pk_i_8_type; pub mod insert_pk_identity_reducer; -pub mod insert_pk_identity_type; pub mod insert_pk_simple_enum_reducer; -pub mod insert_pk_simple_enum_type; pub mod insert_pk_string_reducer; -pub mod insert_pk_string_type; pub mod insert_pk_u_128_reducer; -pub mod insert_pk_u_128_type; pub mod insert_pk_u_16_reducer; -pub mod insert_pk_u_16_type; pub mod insert_pk_u_256_reducer; -pub mod insert_pk_u_256_type; pub mod insert_pk_u_32_reducer; pub mod insert_pk_u_32_two_reducer; -pub mod insert_pk_u_32_two_type; -pub mod insert_pk_u_32_type; pub mod insert_pk_u_64_reducer; -pub mod insert_pk_u_64_type; pub mod insert_pk_u_8_reducer; -pub mod insert_pk_u_8_type; pub mod insert_pk_uuid_reducer; -pub mod insert_pk_uuid_type; pub mod insert_primitives_as_strings_reducer; -pub mod insert_primitives_as_strings_type; pub mod insert_result_every_primitive_struct_string_reducer; -pub mod insert_result_every_primitive_struct_string_type; pub mod insert_result_i_32_string_reducer; -pub mod insert_result_i_32_string_type; pub mod insert_result_identity_string_reducer; -pub mod insert_result_identity_string_type; pub mod insert_result_simple_enum_i_32_reducer; -pub mod insert_result_simple_enum_i_32_type; pub mod insert_result_string_i_32_reducer; -pub mod insert_result_string_i_32_type; pub mod insert_result_vec_i_32_string_reducer; -pub mod insert_result_vec_i_32_string_type; pub mod insert_table_holds_table_reducer; -pub mod insert_table_holds_table_type; pub mod insert_unique_bool_reducer; -pub mod insert_unique_bool_type; pub mod insert_unique_connection_id_reducer; -pub mod insert_unique_connection_id_type; pub mod insert_unique_i_128_reducer; -pub mod insert_unique_i_128_type; pub mod insert_unique_i_16_reducer; -pub mod insert_unique_i_16_type; pub mod insert_unique_i_256_reducer; -pub mod insert_unique_i_256_type; pub mod insert_unique_i_32_reducer; -pub mod insert_unique_i_32_type; pub mod insert_unique_i_64_reducer; -pub mod insert_unique_i_64_type; pub mod insert_unique_i_8_reducer; -pub mod insert_unique_i_8_type; pub mod insert_unique_identity_reducer; -pub mod insert_unique_identity_type; pub mod insert_unique_string_reducer; -pub mod insert_unique_string_type; pub mod insert_unique_u_128_reducer; -pub mod insert_unique_u_128_type; pub mod insert_unique_u_16_reducer; -pub mod insert_unique_u_16_type; pub mod insert_unique_u_256_reducer; -pub mod insert_unique_u_256_type; pub mod insert_unique_u_32_reducer; -pub mod insert_unique_u_32_type; pub mod insert_unique_u_32_update_pk_u_32_reducer; -pub mod insert_unique_u_32_update_pk_u_32_type; pub mod insert_unique_u_64_reducer; -pub mod insert_unique_u_64_type; pub mod insert_unique_u_8_reducer; -pub mod insert_unique_u_8_type; pub mod insert_unique_uuid_reducer; -pub mod insert_unique_uuid_type; pub mod insert_user_reducer; -pub mod insert_user_type; pub mod insert_vec_bool_reducer; -pub mod insert_vec_bool_type; pub mod insert_vec_byte_struct_reducer; -pub mod insert_vec_byte_struct_type; pub mod insert_vec_connection_id_reducer; -pub mod insert_vec_connection_id_type; pub mod insert_vec_enum_with_payload_reducer; -pub mod insert_vec_enum_with_payload_type; pub mod insert_vec_every_primitive_struct_reducer; -pub mod insert_vec_every_primitive_struct_type; pub mod insert_vec_every_vec_struct_reducer; -pub mod insert_vec_every_vec_struct_type; pub mod insert_vec_f_32_reducer; -pub mod insert_vec_f_32_type; pub mod insert_vec_f_64_reducer; -pub mod insert_vec_f_64_type; pub mod insert_vec_i_128_reducer; -pub mod insert_vec_i_128_type; pub mod insert_vec_i_16_reducer; -pub mod insert_vec_i_16_type; pub mod insert_vec_i_256_reducer; -pub mod insert_vec_i_256_type; pub mod insert_vec_i_32_reducer; -pub mod insert_vec_i_32_type; pub mod insert_vec_i_64_reducer; -pub mod insert_vec_i_64_type; pub mod insert_vec_i_8_reducer; -pub mod insert_vec_i_8_type; pub mod insert_vec_identity_reducer; -pub mod insert_vec_identity_type; pub mod insert_vec_simple_enum_reducer; -pub mod insert_vec_simple_enum_type; pub mod insert_vec_string_reducer; -pub mod insert_vec_string_type; pub mod insert_vec_timestamp_reducer; -pub mod insert_vec_timestamp_type; pub mod insert_vec_u_128_reducer; -pub mod insert_vec_u_128_type; pub mod insert_vec_u_16_reducer; -pub mod insert_vec_u_16_type; pub mod insert_vec_u_256_reducer; -pub mod insert_vec_u_256_type; pub mod insert_vec_u_32_reducer; -pub mod insert_vec_u_32_type; pub mod insert_vec_u_64_reducer; -pub mod insert_vec_u_64_type; pub mod insert_vec_u_8_reducer; -pub mod insert_vec_u_8_type; pub mod insert_vec_unit_struct_reducer; -pub mod insert_vec_unit_struct_type; pub mod insert_vec_uuid_reducer; -pub mod insert_vec_uuid_type; pub mod large_table_table; pub mod large_table_type; pub mod no_op_succeeds_reducer; -pub mod no_op_succeeds_type; pub mod one_bool_table; pub mod one_bool_type; pub mod one_byte_struct_table; @@ -457,10 +298,8 @@ pub mod result_vec_i_32_string_type; pub mod scheduled_table_table; pub mod scheduled_table_type; pub mod send_scheduled_message_reducer; -pub mod send_scheduled_message_type; pub mod simple_enum_type; pub mod sorted_uuids_insert_reducer; -pub mod sorted_uuids_insert_type; pub mod table_holds_table_table; pub mod table_holds_table_type; pub mod unique_bool_table; @@ -499,79 +338,42 @@ pub mod unique_uuid_table; pub mod unique_uuid_type; pub mod unit_struct_type; pub mod update_indexed_simple_enum_reducer; -pub mod update_indexed_simple_enum_type; pub mod update_pk_bool_reducer; -pub mod update_pk_bool_type; pub mod update_pk_connection_id_reducer; -pub mod update_pk_connection_id_type; pub mod update_pk_i_128_reducer; -pub mod update_pk_i_128_type; pub mod update_pk_i_16_reducer; -pub mod update_pk_i_16_type; pub mod update_pk_i_256_reducer; -pub mod update_pk_i_256_type; pub mod update_pk_i_32_reducer; -pub mod update_pk_i_32_type; pub mod update_pk_i_64_reducer; -pub mod update_pk_i_64_type; pub mod update_pk_i_8_reducer; -pub mod update_pk_i_8_type; pub mod update_pk_identity_reducer; -pub mod update_pk_identity_type; pub mod update_pk_simple_enum_reducer; -pub mod update_pk_simple_enum_type; pub mod update_pk_string_reducer; -pub mod update_pk_string_type; pub mod update_pk_u_128_reducer; -pub mod update_pk_u_128_type; pub mod update_pk_u_16_reducer; -pub mod update_pk_u_16_type; pub mod update_pk_u_256_reducer; -pub mod update_pk_u_256_type; pub mod update_pk_u_32_reducer; pub mod update_pk_u_32_two_reducer; -pub mod update_pk_u_32_two_type; -pub mod update_pk_u_32_type; pub mod update_pk_u_64_reducer; -pub mod update_pk_u_64_type; pub mod update_pk_u_8_reducer; -pub mod update_pk_u_8_type; pub mod update_pk_uuid_reducer; -pub mod update_pk_uuid_type; pub mod update_unique_bool_reducer; -pub mod update_unique_bool_type; pub mod update_unique_connection_id_reducer; -pub mod update_unique_connection_id_type; pub mod update_unique_i_128_reducer; -pub mod update_unique_i_128_type; pub mod update_unique_i_16_reducer; -pub mod update_unique_i_16_type; pub mod update_unique_i_256_reducer; -pub mod update_unique_i_256_type; pub mod update_unique_i_32_reducer; -pub mod update_unique_i_32_type; pub mod update_unique_i_64_reducer; -pub mod update_unique_i_64_type; pub mod update_unique_i_8_reducer; -pub mod update_unique_i_8_type; pub mod update_unique_identity_reducer; -pub mod update_unique_identity_type; pub mod update_unique_string_reducer; -pub mod update_unique_string_type; pub mod update_unique_u_128_reducer; -pub mod update_unique_u_128_type; pub mod update_unique_u_16_reducer; -pub mod update_unique_u_16_type; pub mod update_unique_u_256_reducer; -pub mod update_unique_u_256_type; pub mod update_unique_u_32_reducer; -pub mod update_unique_u_32_type; pub mod update_unique_u_64_reducer; -pub mod update_unique_u_64_type; pub mod update_unique_u_8_reducer; -pub mod update_unique_u_8_type; pub mod update_unique_uuid_reducer; -pub mod update_unique_uuid_type; pub mod users_table; pub mod users_type; pub mod vec_bool_table; @@ -631,81 +433,43 @@ pub use b_tree_u_32_type::BTreeU32; pub use btree_u_32_table::*; pub use byte_struct_type::ByteStruct; pub use delete_from_btree_u_32_reducer::delete_from_btree_u_32; -pub use delete_from_btree_u_32_type::DeleteFromBtreeU32; pub use delete_large_table_reducer::delete_large_table; -pub use delete_large_table_type::DeleteLargeTable; pub use delete_pk_bool_reducer::delete_pk_bool; -pub use delete_pk_bool_type::DeletePkBool; pub use delete_pk_connection_id_reducer::delete_pk_connection_id; -pub use delete_pk_connection_id_type::DeletePkConnectionId; pub use delete_pk_i_128_reducer::delete_pk_i_128; -pub use delete_pk_i_128_type::DeletePkI128; pub use delete_pk_i_16_reducer::delete_pk_i_16; -pub use delete_pk_i_16_type::DeletePkI16; pub use delete_pk_i_256_reducer::delete_pk_i_256; -pub use delete_pk_i_256_type::DeletePkI256; pub use delete_pk_i_32_reducer::delete_pk_i_32; -pub use delete_pk_i_32_type::DeletePkI32; pub use delete_pk_i_64_reducer::delete_pk_i_64; -pub use delete_pk_i_64_type::DeletePkI64; pub use delete_pk_i_8_reducer::delete_pk_i_8; -pub use delete_pk_i_8_type::DeletePkI8; pub use delete_pk_identity_reducer::delete_pk_identity; -pub use delete_pk_identity_type::DeletePkIdentity; pub use delete_pk_string_reducer::delete_pk_string; -pub use delete_pk_string_type::DeletePkString; pub use delete_pk_u_128_reducer::delete_pk_u_128; -pub use delete_pk_u_128_type::DeletePkU128; pub use delete_pk_u_16_reducer::delete_pk_u_16; -pub use delete_pk_u_16_type::DeletePkU16; pub use delete_pk_u_256_reducer::delete_pk_u_256; -pub use delete_pk_u_256_type::DeletePkU256; pub use delete_pk_u_32_insert_pk_u_32_two_reducer::delete_pk_u_32_insert_pk_u_32_two; -pub use delete_pk_u_32_insert_pk_u_32_two_type::DeletePkU32InsertPkU32Two; pub use delete_pk_u_32_reducer::delete_pk_u_32; pub use delete_pk_u_32_two_reducer::delete_pk_u_32_two; -pub use delete_pk_u_32_two_type::DeletePkU32Two; -pub use delete_pk_u_32_type::DeletePkU32; pub use delete_pk_u_64_reducer::delete_pk_u_64; -pub use delete_pk_u_64_type::DeletePkU64; pub use delete_pk_u_8_reducer::delete_pk_u_8; -pub use delete_pk_u_8_type::DeletePkU8; pub use delete_pk_uuid_reducer::delete_pk_uuid; -pub use delete_pk_uuid_type::DeletePkUuid; pub use delete_unique_bool_reducer::delete_unique_bool; -pub use delete_unique_bool_type::DeleteUniqueBool; pub use delete_unique_connection_id_reducer::delete_unique_connection_id; -pub use delete_unique_connection_id_type::DeleteUniqueConnectionId; pub use delete_unique_i_128_reducer::delete_unique_i_128; -pub use delete_unique_i_128_type::DeleteUniqueI128; pub use delete_unique_i_16_reducer::delete_unique_i_16; -pub use delete_unique_i_16_type::DeleteUniqueI16; pub use delete_unique_i_256_reducer::delete_unique_i_256; -pub use delete_unique_i_256_type::DeleteUniqueI256; pub use delete_unique_i_32_reducer::delete_unique_i_32; -pub use delete_unique_i_32_type::DeleteUniqueI32; pub use delete_unique_i_64_reducer::delete_unique_i_64; -pub use delete_unique_i_64_type::DeleteUniqueI64; pub use delete_unique_i_8_reducer::delete_unique_i_8; -pub use delete_unique_i_8_type::DeleteUniqueI8; pub use delete_unique_identity_reducer::delete_unique_identity; -pub use delete_unique_identity_type::DeleteUniqueIdentity; pub use delete_unique_string_reducer::delete_unique_string; -pub use delete_unique_string_type::DeleteUniqueString; pub use delete_unique_u_128_reducer::delete_unique_u_128; -pub use delete_unique_u_128_type::DeleteUniqueU128; pub use delete_unique_u_16_reducer::delete_unique_u_16; -pub use delete_unique_u_16_type::DeleteUniqueU16; pub use delete_unique_u_256_reducer::delete_unique_u_256; -pub use delete_unique_u_256_type::DeleteUniqueU256; pub use delete_unique_u_32_reducer::delete_unique_u_32; -pub use delete_unique_u_32_type::DeleteUniqueU32; pub use delete_unique_u_64_reducer::delete_unique_u_64; -pub use delete_unique_u_64_type::DeleteUniqueU64; pub use delete_unique_u_8_reducer::delete_unique_u_8; -pub use delete_unique_u_8_type::DeleteUniqueU8; pub use delete_unique_uuid_reducer::delete_unique_uuid; -pub use delete_unique_uuid_type::DeleteUniqueUuid; pub use enum_with_payload_type::EnumWithPayload; pub use every_primitive_struct_type::EveryPrimitiveStruct; pub use every_vec_struct_type::EveryVecStruct; @@ -716,249 +480,128 @@ pub use indexed_table_2_type::IndexedTable2; pub use indexed_table_table::*; pub use indexed_table_type::IndexedTable; pub use insert_call_timestamp_reducer::insert_call_timestamp; -pub use insert_call_timestamp_type::InsertCallTimestamp; pub use insert_call_uuid_v_4_reducer::insert_call_uuid_v_4; -pub use insert_call_uuid_v_4_type::InsertCallUuidV4; pub use insert_call_uuid_v_7_reducer::insert_call_uuid_v_7; -pub use insert_call_uuid_v_7_type::InsertCallUuidV7; pub use insert_caller_one_connection_id_reducer::insert_caller_one_connection_id; -pub use insert_caller_one_connection_id_type::InsertCallerOneConnectionId; pub use insert_caller_one_identity_reducer::insert_caller_one_identity; -pub use insert_caller_one_identity_type::InsertCallerOneIdentity; pub use insert_caller_pk_connection_id_reducer::insert_caller_pk_connection_id; -pub use insert_caller_pk_connection_id_type::InsertCallerPkConnectionId; pub use insert_caller_pk_identity_reducer::insert_caller_pk_identity; -pub use insert_caller_pk_identity_type::InsertCallerPkIdentity; pub use insert_caller_unique_connection_id_reducer::insert_caller_unique_connection_id; -pub use insert_caller_unique_connection_id_type::InsertCallerUniqueConnectionId; pub use insert_caller_unique_identity_reducer::insert_caller_unique_identity; -pub use insert_caller_unique_identity_type::InsertCallerUniqueIdentity; pub use insert_caller_vec_connection_id_reducer::insert_caller_vec_connection_id; -pub use insert_caller_vec_connection_id_type::InsertCallerVecConnectionId; pub use insert_caller_vec_identity_reducer::insert_caller_vec_identity; -pub use insert_caller_vec_identity_type::InsertCallerVecIdentity; pub use insert_into_btree_u_32_reducer::insert_into_btree_u_32; -pub use insert_into_btree_u_32_type::InsertIntoBtreeU32; pub use insert_into_indexed_simple_enum_reducer::insert_into_indexed_simple_enum; -pub use insert_into_indexed_simple_enum_type::InsertIntoIndexedSimpleEnum; pub use insert_into_pk_btree_u_32_reducer::insert_into_pk_btree_u_32; -pub use insert_into_pk_btree_u_32_type::InsertIntoPkBtreeU32; pub use insert_large_table_reducer::insert_large_table; -pub use insert_large_table_type::InsertLargeTable; pub use insert_one_bool_reducer::insert_one_bool; -pub use insert_one_bool_type::InsertOneBool; pub use insert_one_byte_struct_reducer::insert_one_byte_struct; -pub use insert_one_byte_struct_type::InsertOneByteStruct; pub use insert_one_connection_id_reducer::insert_one_connection_id; -pub use insert_one_connection_id_type::InsertOneConnectionId; pub use insert_one_enum_with_payload_reducer::insert_one_enum_with_payload; -pub use insert_one_enum_with_payload_type::InsertOneEnumWithPayload; pub use insert_one_every_primitive_struct_reducer::insert_one_every_primitive_struct; -pub use insert_one_every_primitive_struct_type::InsertOneEveryPrimitiveStruct; pub use insert_one_every_vec_struct_reducer::insert_one_every_vec_struct; -pub use insert_one_every_vec_struct_type::InsertOneEveryVecStruct; pub use insert_one_f_32_reducer::insert_one_f_32; -pub use insert_one_f_32_type::InsertOneF32; pub use insert_one_f_64_reducer::insert_one_f_64; -pub use insert_one_f_64_type::InsertOneF64; pub use insert_one_i_128_reducer::insert_one_i_128; -pub use insert_one_i_128_type::InsertOneI128; pub use insert_one_i_16_reducer::insert_one_i_16; -pub use insert_one_i_16_type::InsertOneI16; pub use insert_one_i_256_reducer::insert_one_i_256; -pub use insert_one_i_256_type::InsertOneI256; pub use insert_one_i_32_reducer::insert_one_i_32; -pub use insert_one_i_32_type::InsertOneI32; pub use insert_one_i_64_reducer::insert_one_i_64; -pub use insert_one_i_64_type::InsertOneI64; pub use insert_one_i_8_reducer::insert_one_i_8; -pub use insert_one_i_8_type::InsertOneI8; pub use insert_one_identity_reducer::insert_one_identity; -pub use insert_one_identity_type::InsertOneIdentity; pub use insert_one_simple_enum_reducer::insert_one_simple_enum; -pub use insert_one_simple_enum_type::InsertOneSimpleEnum; pub use insert_one_string_reducer::insert_one_string; -pub use insert_one_string_type::InsertOneString; pub use insert_one_timestamp_reducer::insert_one_timestamp; -pub use insert_one_timestamp_type::InsertOneTimestamp; pub use insert_one_u_128_reducer::insert_one_u_128; -pub use insert_one_u_128_type::InsertOneU128; pub use insert_one_u_16_reducer::insert_one_u_16; -pub use insert_one_u_16_type::InsertOneU16; pub use insert_one_u_256_reducer::insert_one_u_256; -pub use insert_one_u_256_type::InsertOneU256; pub use insert_one_u_32_reducer::insert_one_u_32; -pub use insert_one_u_32_type::InsertOneU32; pub use insert_one_u_64_reducer::insert_one_u_64; -pub use insert_one_u_64_type::InsertOneU64; pub use insert_one_u_8_reducer::insert_one_u_8; -pub use insert_one_u_8_type::InsertOneU8; pub use insert_one_unit_struct_reducer::insert_one_unit_struct; -pub use insert_one_unit_struct_type::InsertOneUnitStruct; pub use insert_one_uuid_reducer::insert_one_uuid; -pub use insert_one_uuid_type::InsertOneUuid; pub use insert_option_every_primitive_struct_reducer::insert_option_every_primitive_struct; -pub use insert_option_every_primitive_struct_type::InsertOptionEveryPrimitiveStruct; pub use insert_option_i_32_reducer::insert_option_i_32; -pub use insert_option_i_32_type::InsertOptionI32; pub use insert_option_identity_reducer::insert_option_identity; -pub use insert_option_identity_type::InsertOptionIdentity; pub use insert_option_simple_enum_reducer::insert_option_simple_enum; -pub use insert_option_simple_enum_type::InsertOptionSimpleEnum; pub use insert_option_string_reducer::insert_option_string; -pub use insert_option_string_type::InsertOptionString; pub use insert_option_uuid_reducer::insert_option_uuid; -pub use insert_option_uuid_type::InsertOptionUuid; pub use insert_option_vec_option_i_32_reducer::insert_option_vec_option_i_32; -pub use insert_option_vec_option_i_32_type::InsertOptionVecOptionI32; pub use insert_pk_bool_reducer::insert_pk_bool; -pub use insert_pk_bool_type::InsertPkBool; pub use insert_pk_connection_id_reducer::insert_pk_connection_id; -pub use insert_pk_connection_id_type::InsertPkConnectionId; pub use insert_pk_i_128_reducer::insert_pk_i_128; -pub use insert_pk_i_128_type::InsertPkI128; pub use insert_pk_i_16_reducer::insert_pk_i_16; -pub use insert_pk_i_16_type::InsertPkI16; pub use insert_pk_i_256_reducer::insert_pk_i_256; -pub use insert_pk_i_256_type::InsertPkI256; pub use insert_pk_i_32_reducer::insert_pk_i_32; -pub use insert_pk_i_32_type::InsertPkI32; pub use insert_pk_i_64_reducer::insert_pk_i_64; -pub use insert_pk_i_64_type::InsertPkI64; pub use insert_pk_i_8_reducer::insert_pk_i_8; -pub use insert_pk_i_8_type::InsertPkI8; pub use insert_pk_identity_reducer::insert_pk_identity; -pub use insert_pk_identity_type::InsertPkIdentity; pub use insert_pk_simple_enum_reducer::insert_pk_simple_enum; -pub use insert_pk_simple_enum_type::InsertPkSimpleEnum; pub use insert_pk_string_reducer::insert_pk_string; -pub use insert_pk_string_type::InsertPkString; pub use insert_pk_u_128_reducer::insert_pk_u_128; -pub use insert_pk_u_128_type::InsertPkU128; pub use insert_pk_u_16_reducer::insert_pk_u_16; -pub use insert_pk_u_16_type::InsertPkU16; pub use insert_pk_u_256_reducer::insert_pk_u_256; -pub use insert_pk_u_256_type::InsertPkU256; pub use insert_pk_u_32_reducer::insert_pk_u_32; pub use insert_pk_u_32_two_reducer::insert_pk_u_32_two; -pub use insert_pk_u_32_two_type::InsertPkU32Two; -pub use insert_pk_u_32_type::InsertPkU32; pub use insert_pk_u_64_reducer::insert_pk_u_64; -pub use insert_pk_u_64_type::InsertPkU64; pub use insert_pk_u_8_reducer::insert_pk_u_8; -pub use insert_pk_u_8_type::InsertPkU8; pub use insert_pk_uuid_reducer::insert_pk_uuid; -pub use insert_pk_uuid_type::InsertPkUuid; pub use insert_primitives_as_strings_reducer::insert_primitives_as_strings; -pub use insert_primitives_as_strings_type::InsertPrimitivesAsStrings; pub use insert_result_every_primitive_struct_string_reducer::insert_result_every_primitive_struct_string; -pub use insert_result_every_primitive_struct_string_type::InsertResultEveryPrimitiveStructString; pub use insert_result_i_32_string_reducer::insert_result_i_32_string; -pub use insert_result_i_32_string_type::InsertResultI32String; pub use insert_result_identity_string_reducer::insert_result_identity_string; -pub use insert_result_identity_string_type::InsertResultIdentityString; pub use insert_result_simple_enum_i_32_reducer::insert_result_simple_enum_i_32; -pub use insert_result_simple_enum_i_32_type::InsertResultSimpleEnumI32; pub use insert_result_string_i_32_reducer::insert_result_string_i_32; -pub use insert_result_string_i_32_type::InsertResultStringI32; pub use insert_result_vec_i_32_string_reducer::insert_result_vec_i_32_string; -pub use insert_result_vec_i_32_string_type::InsertResultVecI32String; pub use insert_table_holds_table_reducer::insert_table_holds_table; -pub use insert_table_holds_table_type::InsertTableHoldsTable; pub use insert_unique_bool_reducer::insert_unique_bool; -pub use insert_unique_bool_type::InsertUniqueBool; pub use insert_unique_connection_id_reducer::insert_unique_connection_id; -pub use insert_unique_connection_id_type::InsertUniqueConnectionId; pub use insert_unique_i_128_reducer::insert_unique_i_128; -pub use insert_unique_i_128_type::InsertUniqueI128; pub use insert_unique_i_16_reducer::insert_unique_i_16; -pub use insert_unique_i_16_type::InsertUniqueI16; pub use insert_unique_i_256_reducer::insert_unique_i_256; -pub use insert_unique_i_256_type::InsertUniqueI256; pub use insert_unique_i_32_reducer::insert_unique_i_32; -pub use insert_unique_i_32_type::InsertUniqueI32; pub use insert_unique_i_64_reducer::insert_unique_i_64; -pub use insert_unique_i_64_type::InsertUniqueI64; pub use insert_unique_i_8_reducer::insert_unique_i_8; -pub use insert_unique_i_8_type::InsertUniqueI8; pub use insert_unique_identity_reducer::insert_unique_identity; -pub use insert_unique_identity_type::InsertUniqueIdentity; pub use insert_unique_string_reducer::insert_unique_string; -pub use insert_unique_string_type::InsertUniqueString; pub use insert_unique_u_128_reducer::insert_unique_u_128; -pub use insert_unique_u_128_type::InsertUniqueU128; pub use insert_unique_u_16_reducer::insert_unique_u_16; -pub use insert_unique_u_16_type::InsertUniqueU16; pub use insert_unique_u_256_reducer::insert_unique_u_256; -pub use insert_unique_u_256_type::InsertUniqueU256; pub use insert_unique_u_32_reducer::insert_unique_u_32; -pub use insert_unique_u_32_type::InsertUniqueU32; pub use insert_unique_u_32_update_pk_u_32_reducer::insert_unique_u_32_update_pk_u_32; -pub use insert_unique_u_32_update_pk_u_32_type::InsertUniqueU32UpdatePkU32; pub use insert_unique_u_64_reducer::insert_unique_u_64; -pub use insert_unique_u_64_type::InsertUniqueU64; pub use insert_unique_u_8_reducer::insert_unique_u_8; -pub use insert_unique_u_8_type::InsertUniqueU8; pub use insert_unique_uuid_reducer::insert_unique_uuid; -pub use insert_unique_uuid_type::InsertUniqueUuid; pub use insert_user_reducer::insert_user; -pub use insert_user_type::InsertUser; pub use insert_vec_bool_reducer::insert_vec_bool; -pub use insert_vec_bool_type::InsertVecBool; pub use insert_vec_byte_struct_reducer::insert_vec_byte_struct; -pub use insert_vec_byte_struct_type::InsertVecByteStruct; pub use insert_vec_connection_id_reducer::insert_vec_connection_id; -pub use insert_vec_connection_id_type::InsertVecConnectionId; pub use insert_vec_enum_with_payload_reducer::insert_vec_enum_with_payload; -pub use insert_vec_enum_with_payload_type::InsertVecEnumWithPayload; pub use insert_vec_every_primitive_struct_reducer::insert_vec_every_primitive_struct; -pub use insert_vec_every_primitive_struct_type::InsertVecEveryPrimitiveStruct; pub use insert_vec_every_vec_struct_reducer::insert_vec_every_vec_struct; -pub use insert_vec_every_vec_struct_type::InsertVecEveryVecStruct; pub use insert_vec_f_32_reducer::insert_vec_f_32; -pub use insert_vec_f_32_type::InsertVecF32; pub use insert_vec_f_64_reducer::insert_vec_f_64; -pub use insert_vec_f_64_type::InsertVecF64; pub use insert_vec_i_128_reducer::insert_vec_i_128; -pub use insert_vec_i_128_type::InsertVecI128; pub use insert_vec_i_16_reducer::insert_vec_i_16; -pub use insert_vec_i_16_type::InsertVecI16; pub use insert_vec_i_256_reducer::insert_vec_i_256; -pub use insert_vec_i_256_type::InsertVecI256; pub use insert_vec_i_32_reducer::insert_vec_i_32; -pub use insert_vec_i_32_type::InsertVecI32; pub use insert_vec_i_64_reducer::insert_vec_i_64; -pub use insert_vec_i_64_type::InsertVecI64; pub use insert_vec_i_8_reducer::insert_vec_i_8; -pub use insert_vec_i_8_type::InsertVecI8; pub use insert_vec_identity_reducer::insert_vec_identity; -pub use insert_vec_identity_type::InsertVecIdentity; pub use insert_vec_simple_enum_reducer::insert_vec_simple_enum; -pub use insert_vec_simple_enum_type::InsertVecSimpleEnum; pub use insert_vec_string_reducer::insert_vec_string; -pub use insert_vec_string_type::InsertVecString; pub use insert_vec_timestamp_reducer::insert_vec_timestamp; -pub use insert_vec_timestamp_type::InsertVecTimestamp; pub use insert_vec_u_128_reducer::insert_vec_u_128; -pub use insert_vec_u_128_type::InsertVecU128; pub use insert_vec_u_16_reducer::insert_vec_u_16; -pub use insert_vec_u_16_type::InsertVecU16; pub use insert_vec_u_256_reducer::insert_vec_u_256; -pub use insert_vec_u_256_type::InsertVecU256; pub use insert_vec_u_32_reducer::insert_vec_u_32; -pub use insert_vec_u_32_type::InsertVecU32; pub use insert_vec_u_64_reducer::insert_vec_u_64; -pub use insert_vec_u_64_type::InsertVecU64; pub use insert_vec_u_8_reducer::insert_vec_u_8; -pub use insert_vec_u_8_type::InsertVecU8; pub use insert_vec_unit_struct_reducer::insert_vec_unit_struct; -pub use insert_vec_unit_struct_type::InsertVecUnitStruct; pub use insert_vec_uuid_reducer::insert_vec_uuid; -pub use insert_vec_uuid_type::InsertVecUuid; pub use large_table_table::*; pub use large_table_type::LargeTable; pub use no_op_succeeds_reducer::no_op_succeeds; -pub use no_op_succeeds_type::NoOpSucceeds; pub use one_bool_table::*; pub use one_bool_type::OneBool; pub use one_byte_struct_table::*; @@ -1078,10 +721,8 @@ pub use result_vec_i_32_string_type::ResultVecI32String; pub use scheduled_table_table::*; pub use scheduled_table_type::ScheduledTable; pub use send_scheduled_message_reducer::send_scheduled_message; -pub use send_scheduled_message_type::SendScheduledMessage; pub use simple_enum_type::SimpleEnum; pub use sorted_uuids_insert_reducer::sorted_uuids_insert; -pub use sorted_uuids_insert_type::SortedUuidsInsert; pub use table_holds_table_table::*; pub use table_holds_table_type::TableHoldsTable; pub use unique_bool_table::*; @@ -1120,79 +761,42 @@ pub use unique_uuid_table::*; pub use unique_uuid_type::UniqueUuid; pub use unit_struct_type::UnitStruct; pub use update_indexed_simple_enum_reducer::update_indexed_simple_enum; -pub use update_indexed_simple_enum_type::UpdateIndexedSimpleEnum; pub use update_pk_bool_reducer::update_pk_bool; -pub use update_pk_bool_type::UpdatePkBool; pub use update_pk_connection_id_reducer::update_pk_connection_id; -pub use update_pk_connection_id_type::UpdatePkConnectionId; pub use update_pk_i_128_reducer::update_pk_i_128; -pub use update_pk_i_128_type::UpdatePkI128; pub use update_pk_i_16_reducer::update_pk_i_16; -pub use update_pk_i_16_type::UpdatePkI16; pub use update_pk_i_256_reducer::update_pk_i_256; -pub use update_pk_i_256_type::UpdatePkI256; pub use update_pk_i_32_reducer::update_pk_i_32; -pub use update_pk_i_32_type::UpdatePkI32; pub use update_pk_i_64_reducer::update_pk_i_64; -pub use update_pk_i_64_type::UpdatePkI64; pub use update_pk_i_8_reducer::update_pk_i_8; -pub use update_pk_i_8_type::UpdatePkI8; pub use update_pk_identity_reducer::update_pk_identity; -pub use update_pk_identity_type::UpdatePkIdentity; pub use update_pk_simple_enum_reducer::update_pk_simple_enum; -pub use update_pk_simple_enum_type::UpdatePkSimpleEnum; pub use update_pk_string_reducer::update_pk_string; -pub use update_pk_string_type::UpdatePkString; pub use update_pk_u_128_reducer::update_pk_u_128; -pub use update_pk_u_128_type::UpdatePkU128; pub use update_pk_u_16_reducer::update_pk_u_16; -pub use update_pk_u_16_type::UpdatePkU16; pub use update_pk_u_256_reducer::update_pk_u_256; -pub use update_pk_u_256_type::UpdatePkU256; pub use update_pk_u_32_reducer::update_pk_u_32; pub use update_pk_u_32_two_reducer::update_pk_u_32_two; -pub use update_pk_u_32_two_type::UpdatePkU32Two; -pub use update_pk_u_32_type::UpdatePkU32; pub use update_pk_u_64_reducer::update_pk_u_64; -pub use update_pk_u_64_type::UpdatePkU64; pub use update_pk_u_8_reducer::update_pk_u_8; -pub use update_pk_u_8_type::UpdatePkU8; pub use update_pk_uuid_reducer::update_pk_uuid; -pub use update_pk_uuid_type::UpdatePkUuid; pub use update_unique_bool_reducer::update_unique_bool; -pub use update_unique_bool_type::UpdateUniqueBool; pub use update_unique_connection_id_reducer::update_unique_connection_id; -pub use update_unique_connection_id_type::UpdateUniqueConnectionId; pub use update_unique_i_128_reducer::update_unique_i_128; -pub use update_unique_i_128_type::UpdateUniqueI128; pub use update_unique_i_16_reducer::update_unique_i_16; -pub use update_unique_i_16_type::UpdateUniqueI16; pub use update_unique_i_256_reducer::update_unique_i_256; -pub use update_unique_i_256_type::UpdateUniqueI256; pub use update_unique_i_32_reducer::update_unique_i_32; -pub use update_unique_i_32_type::UpdateUniqueI32; pub use update_unique_i_64_reducer::update_unique_i_64; -pub use update_unique_i_64_type::UpdateUniqueI64; pub use update_unique_i_8_reducer::update_unique_i_8; -pub use update_unique_i_8_type::UpdateUniqueI8; pub use update_unique_identity_reducer::update_unique_identity; -pub use update_unique_identity_type::UpdateUniqueIdentity; pub use update_unique_string_reducer::update_unique_string; -pub use update_unique_string_type::UpdateUniqueString; pub use update_unique_u_128_reducer::update_unique_u_128; -pub use update_unique_u_128_type::UpdateUniqueU128; pub use update_unique_u_16_reducer::update_unique_u_16; -pub use update_unique_u_16_type::UpdateUniqueU16; pub use update_unique_u_256_reducer::update_unique_u_256; -pub use update_unique_u_256_type::UpdateUniqueU256; pub use update_unique_u_32_reducer::update_unique_u_32; -pub use update_unique_u_32_type::UpdateUniqueU32; pub use update_unique_u_64_reducer::update_unique_u_64; -pub use update_unique_u_64_type::UpdateUniqueU64; pub use update_unique_u_8_reducer::update_unique_u_8; -pub use update_unique_u_8_type::UpdateUniqueU8; pub use update_unique_uuid_reducer::update_unique_uuid; -pub use update_unique_uuid_type::UpdateUniqueUuid; pub use users_table::*; pub use users_type::Users; pub use vec_bool_table::*; @@ -1259,10 +863,139 @@ pub enum Reducer { DeleteFromBtreeU32 { rows: Vec, }, + DeleteLargeTable { + a: u8, + b: u16, + c: u32, + d: u64, + e: u128, + f: __sats::u256, + g: i8, + h: i16, + i: i32, + j: i64, + k: i128, + l: __sats::i256, + m: bool, + n: f32, + o: f64, + p: String, + q: SimpleEnum, + r: EnumWithPayload, + s: UnitStruct, + t: ByteStruct, + u: EveryPrimitiveStruct, + v: EveryVecStruct, + }, + DeletePkBool { + b: bool, + }, + DeletePkConnectionId { + a: __sdk::ConnectionId, + }, + DeletePkI128 { + n: i128, + }, + DeletePkI16 { + n: i16, + }, + DeletePkI256 { + n: __sats::i256, + }, + DeletePkI32 { + n: i32, + }, + DeletePkI64 { + n: i64, + }, + DeletePkI8 { + n: i8, + }, + DeletePkIdentity { + i: __sdk::Identity, + }, + DeletePkString { + s: String, + }, + DeletePkU128 { + n: u128, + }, + DeletePkU16 { + n: u16, + }, + DeletePkU256 { + n: __sats::u256, + }, + DeletePkU32 { + n: u32, + }, DeletePkU32InsertPkU32Two { n: u32, data: i32, }, + DeletePkU32Two { + n: u32, + }, + DeletePkU64 { + n: u64, + }, + DeletePkU8 { + n: u8, + }, + DeletePkUuid { + u: __sdk::Uuid, + }, + DeleteUniqueBool { + b: bool, + }, + DeleteUniqueConnectionId { + a: __sdk::ConnectionId, + }, + DeleteUniqueI128 { + n: i128, + }, + DeleteUniqueI16 { + n: i16, + }, + DeleteUniqueI256 { + n: __sats::i256, + }, + DeleteUniqueI32 { + n: i32, + }, + DeleteUniqueI64 { + n: i64, + }, + DeleteUniqueI8 { + n: i8, + }, + DeleteUniqueIdentity { + i: __sdk::Identity, + }, + DeleteUniqueString { + s: String, + }, + DeleteUniqueU128 { + n: u128, + }, + DeleteUniqueU16 { + n: u16, + }, + DeleteUniqueU256 { + n: __sats::u256, + }, + DeleteUniqueU32 { + n: u32, + }, + DeleteUniqueU64 { + n: u64, + }, + DeleteUniqueU8 { + n: u8, + }, + DeleteUniqueUuid { + u: __sdk::Uuid, + }, InsertCallTimestamp, InsertCallUuidV4, InsertCallUuidV7, @@ -1292,435 +1025,451 @@ pub enum Reducer { pk_u_32: Vec, bt_u_32: Vec, }, - InsertPrimitivesAsStrings { - s: EveryPrimitiveStruct, + InsertLargeTable { + a: u8, + b: u16, + c: u32, + d: u64, + e: u128, + f: __sats::u256, + g: i8, + h: i16, + i: i32, + j: i64, + k: i128, + l: __sats::i256, + m: bool, + n: f32, + o: f64, + p: String, + q: SimpleEnum, + r: EnumWithPayload, + s: UnitStruct, + t: ByteStruct, + u: EveryPrimitiveStruct, + v: EveryVecStruct, }, - InsertUniqueU32UpdatePkU32 { - n: u32, - d_unique: i32, - d_pk: i32, + InsertOneBool { + b: bool, }, - InsertUser { - name: String, - identity: __sdk::Identity, + InsertOneByteStruct { + s: ByteStruct, }, - NoOpSucceeds, - InsertOneU8 { - n: u8, + InsertOneConnectionId { + a: __sdk::ConnectionId, }, - InsertOneU16 { - n: u16, + InsertOneEnumWithPayload { + e: EnumWithPayload, }, - InsertOneU32 { - n: u32, + InsertOneEveryPrimitiveStruct { + s: EveryPrimitiveStruct, }, - InsertOneU64 { - n: u64, + InsertOneEveryVecStruct { + s: EveryVecStruct, }, - InsertOneU128 { - n: u128, + InsertOneF32 { + f: f32, }, - InsertOneU256 { - n: __sats::u256, + InsertOneF64 { + f: f64, }, - InsertOneI8 { - n: i8, + InsertOneI128 { + n: i128, }, InsertOneI16 { n: i16, }, + InsertOneI256 { + n: __sats::i256, + }, InsertOneI32 { n: i32, }, InsertOneI64 { n: i64, }, - InsertOneI128 { - n: i128, - }, - InsertOneI256 { - n: __sats::i256, - }, - InsertOneBool { - b: bool, + InsertOneI8 { + n: i8, }, - InsertOneF32 { - f: f32, + InsertOneIdentity { + i: __sdk::Identity, }, - InsertOneF64 { - f: f64, + InsertOneSimpleEnum { + e: SimpleEnum, }, InsertOneString { s: String, }, - InsertOneIdentity { - i: __sdk::Identity, + InsertOneTimestamp { + t: __sdk::Timestamp, }, - InsertOneConnectionId { - a: __sdk::ConnectionId, + InsertOneU128 { + n: u128, }, - InsertOneUuid { - u: __sdk::Uuid, + InsertOneU16 { + n: u16, }, - InsertOneTimestamp { - t: __sdk::Timestamp, + InsertOneU256 { + n: __sats::u256, }, - InsertOneSimpleEnum { - e: SimpleEnum, + InsertOneU32 { + n: u32, }, - InsertOneEnumWithPayload { - e: EnumWithPayload, + InsertOneU64 { + n: u64, + }, + InsertOneU8 { + n: u8, }, InsertOneUnitStruct { s: UnitStruct, }, - InsertOneByteStruct { - s: ByteStruct, + InsertOneUuid { + u: __sdk::Uuid, }, - InsertOneEveryPrimitiveStruct { - s: EveryPrimitiveStruct, + InsertOptionEveryPrimitiveStruct { + s: Option, }, - InsertOneEveryVecStruct { - s: EveryVecStruct, + InsertOptionI32 { + n: Option, }, - InsertVecU8 { - n: Vec, - }, - InsertVecU16 { - n: Vec, - }, - InsertVecU32 { - n: Vec, - }, - InsertVecU64 { - n: Vec, - }, - InsertVecU128 { - n: Vec, - }, - InsertVecU256 { - n: Vec<__sats::u256>, - }, - InsertVecI8 { - n: Vec, - }, - InsertVecI16 { - n: Vec, + InsertOptionIdentity { + i: Option<__sdk::Identity>, }, - InsertVecI32 { - n: Vec, + InsertOptionSimpleEnum { + e: Option, }, - InsertVecI64 { - n: Vec, + InsertOptionString { + s: Option, }, - InsertVecI128 { - n: Vec, + InsertOptionUuid { + u: Option<__sdk::Uuid>, }, - InsertVecI256 { - n: Vec<__sats::i256>, + InsertOptionVecOptionI32 { + v: Option>>, }, - InsertVecBool { - b: Vec, + InsertPkBool { + b: bool, + data: i32, }, - InsertVecF32 { - f: Vec, + InsertPkConnectionId { + a: __sdk::ConnectionId, + data: i32, }, - InsertVecF64 { - f: Vec, + InsertPkI128 { + n: i128, + data: i32, }, - InsertVecString { - s: Vec, + InsertPkI16 { + n: i16, + data: i32, }, - InsertVecIdentity { - i: Vec<__sdk::Identity>, + InsertPkI256 { + n: __sats::i256, + data: i32, }, - InsertVecConnectionId { - a: Vec<__sdk::ConnectionId>, + InsertPkI32 { + n: i32, + data: i32, }, - InsertVecTimestamp { - t: Vec<__sdk::Timestamp>, + InsertPkI64 { + n: i64, + data: i32, }, - InsertVecUuid { - u: Vec<__sdk::Uuid>, + InsertPkI8 { + n: i8, + data: i32, }, - InsertVecSimpleEnum { - e: Vec, + InsertPkIdentity { + i: __sdk::Identity, + data: i32, }, - InsertVecEnumWithPayload { - e: Vec, + InsertPkSimpleEnum { + a: SimpleEnum, + data: i32, }, - InsertVecUnitStruct { - s: Vec, + InsertPkString { + s: String, + data: i32, }, - InsertVecByteStruct { - s: Vec, + InsertPkU128 { + n: u128, + data: i32, }, - InsertVecEveryPrimitiveStruct { - s: Vec, + InsertPkU16 { + n: u16, + data: i32, }, - InsertVecEveryVecStruct { - s: Vec, + InsertPkU256 { + n: __sats::u256, + data: i32, }, - InsertOptionI32 { - n: Option, + InsertPkU32 { + n: u32, + data: i32, }, - InsertOptionString { - s: Option, + InsertPkU32Two { + n: u32, + data: i32, }, - InsertOptionIdentity { - i: Option<__sdk::Identity>, + InsertPkU64 { + n: u64, + data: i32, }, - InsertOptionUuid { - u: Option<__sdk::Uuid>, + InsertPkU8 { + n: u8, + data: i32, }, - InsertOptionSimpleEnum { - e: Option, + InsertPkUuid { + u: __sdk::Uuid, + data: i32, }, - InsertOptionEveryPrimitiveStruct { - s: Option, + InsertPrimitivesAsStrings { + s: EveryPrimitiveStruct, }, - InsertOptionVecOptionI32 { - v: Option>>, + InsertResultEveryPrimitiveStructString { + r: Result, }, InsertResultI32String { r: Result, }, - InsertResultStringI32 { - r: Result, - }, InsertResultIdentityString { r: Result<__sdk::Identity, String>, }, InsertResultSimpleEnumI32 { r: Result, }, - InsertResultEveryPrimitiveStructString { - r: Result, + InsertResultStringI32 { + r: Result, }, InsertResultVecI32String { r: Result, String>, }, - InsertUniqueU8 { - n: u8, - data: i32, + InsertTableHoldsTable { + a: OneU8, + b: VecU8, }, - UpdateUniqueU8 { - n: u8, + InsertUniqueBool { + b: bool, data: i32, }, - DeleteUniqueU8 { - n: u8, - }, - InsertUniqueU16 { - n: u16, + InsertUniqueConnectionId { + a: __sdk::ConnectionId, data: i32, }, - UpdateUniqueU16 { - n: u16, + InsertUniqueI128 { + n: i128, data: i32, }, - DeleteUniqueU16 { - n: u16, + InsertUniqueI16 { + n: i16, + data: i32, }, - InsertUniqueU32 { - n: u32, + InsertUniqueI256 { + n: __sats::i256, data: i32, }, - UpdateUniqueU32 { - n: u32, + InsertUniqueI32 { + n: i32, data: i32, }, - DeleteUniqueU32 { - n: u32, + InsertUniqueI64 { + n: i64, + data: i32, }, - InsertUniqueU64 { - n: u64, + InsertUniqueI8 { + n: i8, data: i32, }, - UpdateUniqueU64 { - n: u64, + InsertUniqueIdentity { + i: __sdk::Identity, data: i32, }, - DeleteUniqueU64 { - n: u64, + InsertUniqueString { + s: String, + data: i32, }, InsertUniqueU128 { n: u128, data: i32, }, - UpdateUniqueU128 { - n: u128, + InsertUniqueU16 { + n: u16, data: i32, }, - DeleteUniqueU128 { - n: u128, - }, InsertUniqueU256 { n: __sats::u256, data: i32, }, - UpdateUniqueU256 { - n: __sats::u256, + InsertUniqueU32 { + n: u32, data: i32, }, - DeleteUniqueU256 { - n: __sats::u256, - }, - InsertUniqueI8 { - n: i8, - data: i32, + InsertUniqueU32UpdatePkU32 { + n: u32, + d_unique: i32, + d_pk: i32, }, - UpdateUniqueI8 { - n: i8, + InsertUniqueU64 { + n: u64, data: i32, }, - DeleteUniqueI8 { - n: i8, - }, - InsertUniqueI16 { - n: i16, + InsertUniqueU8 { + n: u8, data: i32, }, - UpdateUniqueI16 { - n: i16, + InsertUniqueUuid { + u: __sdk::Uuid, data: i32, }, - DeleteUniqueI16 { - n: i16, + InsertUser { + name: String, + identity: __sdk::Identity, }, - InsertUniqueI32 { - n: i32, - data: i32, + InsertVecBool { + b: Vec, }, - UpdateUniqueI32 { - n: i32, - data: i32, + InsertVecByteStruct { + s: Vec, }, - DeleteUniqueI32 { - n: i32, + InsertVecConnectionId { + a: Vec<__sdk::ConnectionId>, }, - InsertUniqueI64 { - n: i64, - data: i32, + InsertVecEnumWithPayload { + e: Vec, }, - UpdateUniqueI64 { - n: i64, - data: i32, + InsertVecEveryPrimitiveStruct { + s: Vec, }, - DeleteUniqueI64 { - n: i64, + InsertVecEveryVecStruct { + s: Vec, }, - InsertUniqueI128 { - n: i128, - data: i32, + InsertVecF32 { + f: Vec, }, - UpdateUniqueI128 { - n: i128, - data: i32, + InsertVecF64 { + f: Vec, }, - DeleteUniqueI128 { - n: i128, + InsertVecI128 { + n: Vec, }, - InsertUniqueI256 { - n: __sats::i256, - data: i32, + InsertVecI16 { + n: Vec, }, - UpdateUniqueI256 { - n: __sats::i256, - data: i32, + InsertVecI256 { + n: Vec<__sats::i256>, }, - DeleteUniqueI256 { - n: __sats::i256, + InsertVecI32 { + n: Vec, }, - InsertUniqueBool { - b: bool, - data: i32, + InsertVecI64 { + n: Vec, }, - UpdateUniqueBool { - b: bool, - data: i32, + InsertVecI8 { + n: Vec, }, - DeleteUniqueBool { - b: bool, + InsertVecIdentity { + i: Vec<__sdk::Identity>, }, - InsertUniqueString { - s: String, - data: i32, + InsertVecSimpleEnum { + e: Vec, }, - UpdateUniqueString { - s: String, - data: i32, + InsertVecString { + s: Vec, }, - DeleteUniqueString { - s: String, + InsertVecTimestamp { + t: Vec<__sdk::Timestamp>, }, - InsertUniqueIdentity { - i: __sdk::Identity, - data: i32, + InsertVecU128 { + n: Vec, }, - UpdateUniqueIdentity { - i: __sdk::Identity, - data: i32, + InsertVecU16 { + n: Vec, }, - DeleteUniqueIdentity { - i: __sdk::Identity, + InsertVecU256 { + n: Vec<__sats::u256>, }, - InsertUniqueConnectionId { - a: __sdk::ConnectionId, - data: i32, + InsertVecU32 { + n: Vec, }, - UpdateUniqueConnectionId { - a: __sdk::ConnectionId, + InsertVecU64 { + n: Vec, + }, + InsertVecU8 { + n: Vec, + }, + InsertVecUnitStruct { + s: Vec, + }, + InsertVecUuid { + u: Vec<__sdk::Uuid>, + }, + NoOpSucceeds, + SendScheduledMessage { + arg: ScheduledTable, + }, + SortedUuidsInsert, + UpdateIndexedSimpleEnum { + a: SimpleEnum, + b: SimpleEnum, + }, + UpdatePkBool { + b: bool, data: i32, }, - DeleteUniqueConnectionId { + UpdatePkConnectionId { a: __sdk::ConnectionId, + data: i32, }, - InsertUniqueUuid { - u: __sdk::Uuid, + UpdatePkI128 { + n: i128, data: i32, }, - UpdateUniqueUuid { - u: __sdk::Uuid, + UpdatePkI16 { + n: i16, data: i32, }, - DeleteUniqueUuid { - u: __sdk::Uuid, + UpdatePkI256 { + n: __sats::i256, + data: i32, }, - InsertPkU8 { - n: u8, + UpdatePkI32 { + n: i32, data: i32, }, - UpdatePkU8 { - n: u8, + UpdatePkI64 { + n: i64, data: i32, }, - DeletePkU8 { - n: u8, + UpdatePkI8 { + n: i8, + data: i32, }, - InsertPkU16 { - n: u16, + UpdatePkIdentity { + i: __sdk::Identity, data: i32, }, - UpdatePkU16 { - n: u16, + UpdatePkSimpleEnum { + a: SimpleEnum, data: i32, }, - DeletePkU16 { - n: u16, + UpdatePkString { + s: String, + data: i32, }, - InsertPkU32 { - n: u32, + UpdatePkU128 { + n: u128, data: i32, }, - UpdatePkU32 { - n: u32, + UpdatePkU16 { + n: u16, data: i32, }, - DeletePkU32 { - n: u32, + UpdatePkU256 { + n: __sats::u256, + data: i32, }, - InsertPkU32Two { + UpdatePkU32 { n: u32, data: i32, }, @@ -1728,229 +1477,84 @@ pub enum Reducer { n: u32, data: i32, }, - DeletePkU32Two { - n: u32, - }, - InsertPkU64 { + UpdatePkU64 { n: u64, data: i32, }, - UpdatePkU64 { - n: u64, + UpdatePkU8 { + n: u8, data: i32, }, - DeletePkU64 { - n: u64, + UpdatePkUuid { + u: __sdk::Uuid, + data: i32, }, - InsertPkU128 { - n: u128, + UpdateUniqueBool { + b: bool, data: i32, }, - UpdatePkU128 { - n: u128, + UpdateUniqueConnectionId { + a: __sdk::ConnectionId, data: i32, }, - DeletePkU128 { - n: u128, + UpdateUniqueI128 { + n: i128, + data: i32, }, - InsertPkU256 { - n: __sats::u256, + UpdateUniqueI16 { + n: i16, data: i32, }, - UpdatePkU256 { - n: __sats::u256, + UpdateUniqueI256 { + n: __sats::i256, data: i32, }, - DeletePkU256 { - n: __sats::u256, + UpdateUniqueI32 { + n: i32, + data: i32, }, - InsertPkI8 { - n: i8, + UpdateUniqueI64 { + n: i64, data: i32, }, - UpdatePkI8 { + UpdateUniqueI8 { n: i8, data: i32, }, - DeletePkI8 { - n: i8, + UpdateUniqueIdentity { + i: __sdk::Identity, + data: i32, }, - InsertPkI16 { - n: i16, + UpdateUniqueString { + s: String, data: i32, }, - UpdatePkI16 { - n: i16, + UpdateUniqueU128 { + n: u128, data: i32, }, - DeletePkI16 { - n: i16, + UpdateUniqueU16 { + n: u16, + data: i32, }, - InsertPkI32 { - n: i32, + UpdateUniqueU256 { + n: __sats::u256, data: i32, }, - UpdatePkI32 { - n: i32, + UpdateUniqueU32 { + n: u32, data: i32, }, - DeletePkI32 { - n: i32, + UpdateUniqueU64 { + n: u64, + data: i32, }, - InsertPkI64 { - n: i64, + UpdateUniqueU8 { + n: u8, data: i32, }, - UpdatePkI64 { - n: i64, - data: i32, - }, - DeletePkI64 { - n: i64, - }, - InsertPkI128 { - n: i128, - data: i32, - }, - UpdatePkI128 { - n: i128, - data: i32, - }, - DeletePkI128 { - n: i128, - }, - InsertPkI256 { - n: __sats::i256, - data: i32, - }, - UpdatePkI256 { - n: __sats::i256, - data: i32, - }, - DeletePkI256 { - n: __sats::i256, - }, - InsertPkBool { - b: bool, - data: i32, - }, - UpdatePkBool { - b: bool, - data: i32, - }, - DeletePkBool { - b: bool, - }, - InsertPkString { - s: String, - data: i32, - }, - UpdatePkString { - s: String, - data: i32, - }, - DeletePkString { - s: String, - }, - InsertPkIdentity { - i: __sdk::Identity, - data: i32, - }, - UpdatePkIdentity { - i: __sdk::Identity, - data: i32, - }, - DeletePkIdentity { - i: __sdk::Identity, - }, - InsertPkConnectionId { - a: __sdk::ConnectionId, - data: i32, - }, - UpdatePkConnectionId { - a: __sdk::ConnectionId, - data: i32, - }, - DeletePkConnectionId { - a: __sdk::ConnectionId, - }, - InsertPkUuid { - u: __sdk::Uuid, - data: i32, - }, - UpdatePkUuid { - u: __sdk::Uuid, - data: i32, - }, - DeletePkUuid { - u: __sdk::Uuid, - }, - InsertPkSimpleEnum { - a: SimpleEnum, - data: i32, - }, - InsertLargeTable { - a: u8, - b: u16, - c: u32, - d: u64, - e: u128, - f: __sats::u256, - g: i8, - h: i16, - i: i32, - j: i64, - k: i128, - l: __sats::i256, - m: bool, - n: f32, - o: f64, - p: String, - q: SimpleEnum, - r: EnumWithPayload, - s: UnitStruct, - t: ByteStruct, - u: EveryPrimitiveStruct, - v: EveryVecStruct, - }, - DeleteLargeTable { - a: u8, - b: u16, - c: u32, - d: u64, - e: u128, - f: __sats::u256, - g: i8, - h: i16, - i: i32, - j: i64, - k: i128, - l: __sats::i256, - m: bool, - n: f32, - o: f64, - p: String, - q: SimpleEnum, - r: EnumWithPayload, - s: UnitStruct, - t: ByteStruct, - u: EveryPrimitiveStruct, - v: EveryVecStruct, - }, - InsertTableHoldsTable { - a: OneU8, - b: VecU8, - }, - SendScheduledMessage { - arg: ScheduledTable, - }, - SortedUuidsInsert, - UpdateIndexedSimpleEnum { - a: SimpleEnum, - b: SimpleEnum, - }, - UpdatePkSimpleEnum { - a: SimpleEnum, + UpdateUniqueUuid { + u: __sdk::Uuid, data: i32, }, } @@ -1963,7 +1567,43 @@ impl __sdk::Reducer for Reducer { fn reducer_name(&self) -> &'static str { match self { Reducer::DeleteFromBtreeU32 { .. } => "delete_from_btree_u_32", + Reducer::DeleteLargeTable { .. } => "delete_large_table", + Reducer::DeletePkBool { .. } => "delete_pk_bool", + Reducer::DeletePkConnectionId { .. } => "delete_pk_connection_id", + Reducer::DeletePkI128 { .. } => "delete_pk_i_128", + Reducer::DeletePkI16 { .. } => "delete_pk_i_16", + Reducer::DeletePkI256 { .. } => "delete_pk_i_256", + Reducer::DeletePkI32 { .. } => "delete_pk_i_32", + Reducer::DeletePkI64 { .. } => "delete_pk_i_64", + Reducer::DeletePkI8 { .. } => "delete_pk_i_8", + Reducer::DeletePkIdentity { .. } => "delete_pk_identity", + Reducer::DeletePkString { .. } => "delete_pk_string", + Reducer::DeletePkU128 { .. } => "delete_pk_u_128", + Reducer::DeletePkU16 { .. } => "delete_pk_u_16", + Reducer::DeletePkU256 { .. } => "delete_pk_u_256", + Reducer::DeletePkU32 { .. } => "delete_pk_u_32", Reducer::DeletePkU32InsertPkU32Two { .. } => "delete_pk_u_32_insert_pk_u_32_two", + Reducer::DeletePkU32Two { .. } => "delete_pk_u_32_two", + Reducer::DeletePkU64 { .. } => "delete_pk_u_64", + Reducer::DeletePkU8 { .. } => "delete_pk_u_8", + Reducer::DeletePkUuid { .. } => "delete_pk_uuid", + Reducer::DeleteUniqueBool { .. } => "delete_unique_bool", + Reducer::DeleteUniqueConnectionId { .. } => "delete_unique_connection_id", + Reducer::DeleteUniqueI128 { .. } => "delete_unique_i_128", + Reducer::DeleteUniqueI16 { .. } => "delete_unique_i_16", + Reducer::DeleteUniqueI256 { .. } => "delete_unique_i_256", + Reducer::DeleteUniqueI32 { .. } => "delete_unique_i_32", + Reducer::DeleteUniqueI64 { .. } => "delete_unique_i_64", + Reducer::DeleteUniqueI8 { .. } => "delete_unique_i_8", + Reducer::DeleteUniqueIdentity { .. } => "delete_unique_identity", + Reducer::DeleteUniqueString { .. } => "delete_unique_string", + Reducer::DeleteUniqueU128 { .. } => "delete_unique_u_128", + Reducer::DeleteUniqueU16 { .. } => "delete_unique_u_16", + Reducer::DeleteUniqueU256 { .. } => "delete_unique_u_256", + Reducer::DeleteUniqueU32 { .. } => "delete_unique_u_32", + Reducer::DeleteUniqueU64 { .. } => "delete_unique_u_64", + Reducer::DeleteUniqueU8 { .. } => "delete_unique_u_8", + Reducer::DeleteUniqueUuid { .. } => "delete_unique_uuid", Reducer::InsertCallTimestamp => "insert_call_timestamp", Reducer::InsertCallUuidV4 => "insert_call_uuid_v_4", Reducer::InsertCallUuidV7 => "insert_call_uuid_v_7", @@ -1978,188 +1618,152 @@ impl __sdk::Reducer for Reducer { Reducer::InsertIntoBtreeU32 { .. } => "insert_into_btree_u_32", Reducer::InsertIntoIndexedSimpleEnum { .. } => "insert_into_indexed_simple_enum", Reducer::InsertIntoPkBtreeU32 { .. } => "insert_into_pk_btree_u_32", - Reducer::InsertPrimitivesAsStrings { .. } => "insert_primitives_as_strings", - Reducer::InsertUniqueU32UpdatePkU32 { .. } => "insert_unique_u_32_update_pk_u_32", - Reducer::InsertUser { .. } => "insert_user", - Reducer::NoOpSucceeds => "no_op_succeeds", - Reducer::InsertOneU8 { .. } => "insert_one_u_8", - Reducer::InsertOneU16 { .. } => "insert_one_u_16", - Reducer::InsertOneU32 { .. } => "insert_one_u_32", - Reducer::InsertOneU64 { .. } => "insert_one_u_64", - Reducer::InsertOneU128 { .. } => "insert_one_u_128", - Reducer::InsertOneU256 { .. } => "insert_one_u_256", - Reducer::InsertOneI8 { .. } => "insert_one_i_8", - Reducer::InsertOneI16 { .. } => "insert_one_i_16", - Reducer::InsertOneI32 { .. } => "insert_one_i_32", - Reducer::InsertOneI64 { .. } => "insert_one_i_64", - Reducer::InsertOneI128 { .. } => "insert_one_i_128", - Reducer::InsertOneI256 { .. } => "insert_one_i_256", + Reducer::InsertLargeTable { .. } => "insert_large_table", Reducer::InsertOneBool { .. } => "insert_one_bool", + Reducer::InsertOneByteStruct { .. } => "insert_one_byte_struct", + Reducer::InsertOneConnectionId { .. } => "insert_one_connection_id", + Reducer::InsertOneEnumWithPayload { .. } => "insert_one_enum_with_payload", + Reducer::InsertOneEveryPrimitiveStruct { .. } => "insert_one_every_primitive_struct", + Reducer::InsertOneEveryVecStruct { .. } => "insert_one_every_vec_struct", Reducer::InsertOneF32 { .. } => "insert_one_f_32", Reducer::InsertOneF64 { .. } => "insert_one_f_64", - Reducer::InsertOneString { .. } => "insert_one_string", + Reducer::InsertOneI128 { .. } => "insert_one_i_128", + Reducer::InsertOneI16 { .. } => "insert_one_i_16", + Reducer::InsertOneI256 { .. } => "insert_one_i_256", + Reducer::InsertOneI32 { .. } => "insert_one_i_32", + Reducer::InsertOneI64 { .. } => "insert_one_i_64", + Reducer::InsertOneI8 { .. } => "insert_one_i_8", Reducer::InsertOneIdentity { .. } => "insert_one_identity", - Reducer::InsertOneConnectionId { .. } => "insert_one_connection_id", - Reducer::InsertOneUuid { .. } => "insert_one_uuid", - Reducer::InsertOneTimestamp { .. } => "insert_one_timestamp", Reducer::InsertOneSimpleEnum { .. } => "insert_one_simple_enum", - Reducer::InsertOneEnumWithPayload { .. } => "insert_one_enum_with_payload", + Reducer::InsertOneString { .. } => "insert_one_string", + Reducer::InsertOneTimestamp { .. } => "insert_one_timestamp", + Reducer::InsertOneU128 { .. } => "insert_one_u_128", + Reducer::InsertOneU16 { .. } => "insert_one_u_16", + Reducer::InsertOneU256 { .. } => "insert_one_u_256", + Reducer::InsertOneU32 { .. } => "insert_one_u_32", + Reducer::InsertOneU64 { .. } => "insert_one_u_64", + Reducer::InsertOneU8 { .. } => "insert_one_u_8", Reducer::InsertOneUnitStruct { .. } => "insert_one_unit_struct", - Reducer::InsertOneByteStruct { .. } => "insert_one_byte_struct", - Reducer::InsertOneEveryPrimitiveStruct { .. } => "insert_one_every_primitive_struct", - Reducer::InsertOneEveryVecStruct { .. } => "insert_one_every_vec_struct", - Reducer::InsertVecU8 { .. } => "insert_vec_u_8", - Reducer::InsertVecU16 { .. } => "insert_vec_u_16", - Reducer::InsertVecU32 { .. } => "insert_vec_u_32", - Reducer::InsertVecU64 { .. } => "insert_vec_u_64", - Reducer::InsertVecU128 { .. } => "insert_vec_u_128", - Reducer::InsertVecU256 { .. } => "insert_vec_u_256", - Reducer::InsertVecI8 { .. } => "insert_vec_i_8", - Reducer::InsertVecI16 { .. } => "insert_vec_i_16", - Reducer::InsertVecI32 { .. } => "insert_vec_i_32", - Reducer::InsertVecI64 { .. } => "insert_vec_i_64", - Reducer::InsertVecI128 { .. } => "insert_vec_i_128", - Reducer::InsertVecI256 { .. } => "insert_vec_i_256", - Reducer::InsertVecBool { .. } => "insert_vec_bool", - Reducer::InsertVecF32 { .. } => "insert_vec_f_32", - Reducer::InsertVecF64 { .. } => "insert_vec_f_64", - Reducer::InsertVecString { .. } => "insert_vec_string", - Reducer::InsertVecIdentity { .. } => "insert_vec_identity", - Reducer::InsertVecConnectionId { .. } => "insert_vec_connection_id", - Reducer::InsertVecTimestamp { .. } => "insert_vec_timestamp", - Reducer::InsertVecUuid { .. } => "insert_vec_uuid", - Reducer::InsertVecSimpleEnum { .. } => "insert_vec_simple_enum", - Reducer::InsertVecEnumWithPayload { .. } => "insert_vec_enum_with_payload", - Reducer::InsertVecUnitStruct { .. } => "insert_vec_unit_struct", - Reducer::InsertVecByteStruct { .. } => "insert_vec_byte_struct", - Reducer::InsertVecEveryPrimitiveStruct { .. } => "insert_vec_every_primitive_struct", - Reducer::InsertVecEveryVecStruct { .. } => "insert_vec_every_vec_struct", + Reducer::InsertOneUuid { .. } => "insert_one_uuid", + Reducer::InsertOptionEveryPrimitiveStruct { .. } => "insert_option_every_primitive_struct", Reducer::InsertOptionI32 { .. } => "insert_option_i_32", - Reducer::InsertOptionString { .. } => "insert_option_string", Reducer::InsertOptionIdentity { .. } => "insert_option_identity", - Reducer::InsertOptionUuid { .. } => "insert_option_uuid", Reducer::InsertOptionSimpleEnum { .. } => "insert_option_simple_enum", - Reducer::InsertOptionEveryPrimitiveStruct { .. } => "insert_option_every_primitive_struct", + Reducer::InsertOptionString { .. } => "insert_option_string", + Reducer::InsertOptionUuid { .. } => "insert_option_uuid", Reducer::InsertOptionVecOptionI32 { .. } => "insert_option_vec_option_i_32", + Reducer::InsertPkBool { .. } => "insert_pk_bool", + Reducer::InsertPkConnectionId { .. } => "insert_pk_connection_id", + Reducer::InsertPkI128 { .. } => "insert_pk_i_128", + Reducer::InsertPkI16 { .. } => "insert_pk_i_16", + Reducer::InsertPkI256 { .. } => "insert_pk_i_256", + Reducer::InsertPkI32 { .. } => "insert_pk_i_32", + Reducer::InsertPkI64 { .. } => "insert_pk_i_64", + Reducer::InsertPkI8 { .. } => "insert_pk_i_8", + Reducer::InsertPkIdentity { .. } => "insert_pk_identity", + Reducer::InsertPkSimpleEnum { .. } => "insert_pk_simple_enum", + Reducer::InsertPkString { .. } => "insert_pk_string", + Reducer::InsertPkU128 { .. } => "insert_pk_u_128", + Reducer::InsertPkU16 { .. } => "insert_pk_u_16", + Reducer::InsertPkU256 { .. } => "insert_pk_u_256", + Reducer::InsertPkU32 { .. } => "insert_pk_u_32", + Reducer::InsertPkU32Two { .. } => "insert_pk_u_32_two", + Reducer::InsertPkU64 { .. } => "insert_pk_u_64", + Reducer::InsertPkU8 { .. } => "insert_pk_u_8", + Reducer::InsertPkUuid { .. } => "insert_pk_uuid", + Reducer::InsertPrimitivesAsStrings { .. } => "insert_primitives_as_strings", + Reducer::InsertResultEveryPrimitiveStructString { .. } => "insert_result_every_primitive_struct_string", Reducer::InsertResultI32String { .. } => "insert_result_i_32_string", - Reducer::InsertResultStringI32 { .. } => "insert_result_string_i_32", Reducer::InsertResultIdentityString { .. } => "insert_result_identity_string", Reducer::InsertResultSimpleEnumI32 { .. } => "insert_result_simple_enum_i_32", - Reducer::InsertResultEveryPrimitiveStructString { .. } => "insert_result_every_primitive_struct_string", + Reducer::InsertResultStringI32 { .. } => "insert_result_string_i_32", Reducer::InsertResultVecI32String { .. } => "insert_result_vec_i_32_string", - Reducer::InsertUniqueU8 { .. } => "insert_unique_u_8", - Reducer::UpdateUniqueU8 { .. } => "update_unique_u_8", - Reducer::DeleteUniqueU8 { .. } => "delete_unique_u_8", - Reducer::InsertUniqueU16 { .. } => "insert_unique_u_16", - Reducer::UpdateUniqueU16 { .. } => "update_unique_u_16", - Reducer::DeleteUniqueU16 { .. } => "delete_unique_u_16", - Reducer::InsertUniqueU32 { .. } => "insert_unique_u_32", - Reducer::UpdateUniqueU32 { .. } => "update_unique_u_32", - Reducer::DeleteUniqueU32 { .. } => "delete_unique_u_32", - Reducer::InsertUniqueU64 { .. } => "insert_unique_u_64", - Reducer::UpdateUniqueU64 { .. } => "update_unique_u_64", - Reducer::DeleteUniqueU64 { .. } => "delete_unique_u_64", - Reducer::InsertUniqueU128 { .. } => "insert_unique_u_128", - Reducer::UpdateUniqueU128 { .. } => "update_unique_u_128", - Reducer::DeleteUniqueU128 { .. } => "delete_unique_u_128", - Reducer::InsertUniqueU256 { .. } => "insert_unique_u_256", - Reducer::UpdateUniqueU256 { .. } => "update_unique_u_256", - Reducer::DeleteUniqueU256 { .. } => "delete_unique_u_256", - Reducer::InsertUniqueI8 { .. } => "insert_unique_i_8", - Reducer::UpdateUniqueI8 { .. } => "update_unique_i_8", - Reducer::DeleteUniqueI8 { .. } => "delete_unique_i_8", + Reducer::InsertTableHoldsTable { .. } => "insert_table_holds_table", + Reducer::InsertUniqueBool { .. } => "insert_unique_bool", + Reducer::InsertUniqueConnectionId { .. } => "insert_unique_connection_id", + Reducer::InsertUniqueI128 { .. } => "insert_unique_i_128", Reducer::InsertUniqueI16 { .. } => "insert_unique_i_16", - Reducer::UpdateUniqueI16 { .. } => "update_unique_i_16", - Reducer::DeleteUniqueI16 { .. } => "delete_unique_i_16", + Reducer::InsertUniqueI256 { .. } => "insert_unique_i_256", Reducer::InsertUniqueI32 { .. } => "insert_unique_i_32", - Reducer::UpdateUniqueI32 { .. } => "update_unique_i_32", - Reducer::DeleteUniqueI32 { .. } => "delete_unique_i_32", Reducer::InsertUniqueI64 { .. } => "insert_unique_i_64", - Reducer::UpdateUniqueI64 { .. } => "update_unique_i_64", - Reducer::DeleteUniqueI64 { .. } => "delete_unique_i_64", - Reducer::InsertUniqueI128 { .. } => "insert_unique_i_128", - Reducer::UpdateUniqueI128 { .. } => "update_unique_i_128", - Reducer::DeleteUniqueI128 { .. } => "delete_unique_i_128", - Reducer::InsertUniqueI256 { .. } => "insert_unique_i_256", - Reducer::UpdateUniqueI256 { .. } => "update_unique_i_256", - Reducer::DeleteUniqueI256 { .. } => "delete_unique_i_256", - Reducer::InsertUniqueBool { .. } => "insert_unique_bool", - Reducer::UpdateUniqueBool { .. } => "update_unique_bool", - Reducer::DeleteUniqueBool { .. } => "delete_unique_bool", - Reducer::InsertUniqueString { .. } => "insert_unique_string", - Reducer::UpdateUniqueString { .. } => "update_unique_string", - Reducer::DeleteUniqueString { .. } => "delete_unique_string", + Reducer::InsertUniqueI8 { .. } => "insert_unique_i_8", Reducer::InsertUniqueIdentity { .. } => "insert_unique_identity", - Reducer::UpdateUniqueIdentity { .. } => "update_unique_identity", - Reducer::DeleteUniqueIdentity { .. } => "delete_unique_identity", - Reducer::InsertUniqueConnectionId { .. } => "insert_unique_connection_id", - Reducer::UpdateUniqueConnectionId { .. } => "update_unique_connection_id", - Reducer::DeleteUniqueConnectionId { .. } => "delete_unique_connection_id", + Reducer::InsertUniqueString { .. } => "insert_unique_string", + Reducer::InsertUniqueU128 { .. } => "insert_unique_u_128", + Reducer::InsertUniqueU16 { .. } => "insert_unique_u_16", + Reducer::InsertUniqueU256 { .. } => "insert_unique_u_256", + Reducer::InsertUniqueU32 { .. } => "insert_unique_u_32", + Reducer::InsertUniqueU32UpdatePkU32 { .. } => "insert_unique_u_32_update_pk_u_32", + Reducer::InsertUniqueU64 { .. } => "insert_unique_u_64", + Reducer::InsertUniqueU8 { .. } => "insert_unique_u_8", Reducer::InsertUniqueUuid { .. } => "insert_unique_uuid", - Reducer::UpdateUniqueUuid { .. } => "update_unique_uuid", - Reducer::DeleteUniqueUuid { .. } => "delete_unique_uuid", - Reducer::InsertPkU8 { .. } => "insert_pk_u_8", - Reducer::UpdatePkU8 { .. } => "update_pk_u_8", - Reducer::DeletePkU8 { .. } => "delete_pk_u_8", - Reducer::InsertPkU16 { .. } => "insert_pk_u_16", - Reducer::UpdatePkU16 { .. } => "update_pk_u_16", - Reducer::DeletePkU16 { .. } => "delete_pk_u_16", - Reducer::InsertPkU32 { .. } => "insert_pk_u_32", - Reducer::UpdatePkU32 { .. } => "update_pk_u_32", - Reducer::DeletePkU32 { .. } => "delete_pk_u_32", - Reducer::InsertPkU32Two { .. } => "insert_pk_u_32_two", - Reducer::UpdatePkU32Two { .. } => "update_pk_u_32_two", - Reducer::DeletePkU32Two { .. } => "delete_pk_u_32_two", - Reducer::InsertPkU64 { .. } => "insert_pk_u_64", - Reducer::UpdatePkU64 { .. } => "update_pk_u_64", - Reducer::DeletePkU64 { .. } => "delete_pk_u_64", - Reducer::InsertPkU128 { .. } => "insert_pk_u_128", - Reducer::UpdatePkU128 { .. } => "update_pk_u_128", - Reducer::DeletePkU128 { .. } => "delete_pk_u_128", - Reducer::InsertPkU256 { .. } => "insert_pk_u_256", - Reducer::UpdatePkU256 { .. } => "update_pk_u_256", - Reducer::DeletePkU256 { .. } => "delete_pk_u_256", - Reducer::InsertPkI8 { .. } => "insert_pk_i_8", - Reducer::UpdatePkI8 { .. } => "update_pk_i_8", - Reducer::DeletePkI8 { .. } => "delete_pk_i_8", - Reducer::InsertPkI16 { .. } => "insert_pk_i_16", - Reducer::UpdatePkI16 { .. } => "update_pk_i_16", - Reducer::DeletePkI16 { .. } => "delete_pk_i_16", - Reducer::InsertPkI32 { .. } => "insert_pk_i_32", - Reducer::UpdatePkI32 { .. } => "update_pk_i_32", - Reducer::DeletePkI32 { .. } => "delete_pk_i_32", - Reducer::InsertPkI64 { .. } => "insert_pk_i_64", - Reducer::UpdatePkI64 { .. } => "update_pk_i_64", - Reducer::DeletePkI64 { .. } => "delete_pk_i_64", - Reducer::InsertPkI128 { .. } => "insert_pk_i_128", - Reducer::UpdatePkI128 { .. } => "update_pk_i_128", - Reducer::DeletePkI128 { .. } => "delete_pk_i_128", - Reducer::InsertPkI256 { .. } => "insert_pk_i_256", - Reducer::UpdatePkI256 { .. } => "update_pk_i_256", - Reducer::DeletePkI256 { .. } => "delete_pk_i_256", - Reducer::InsertPkBool { .. } => "insert_pk_bool", - Reducer::UpdatePkBool { .. } => "update_pk_bool", - Reducer::DeletePkBool { .. } => "delete_pk_bool", - Reducer::InsertPkString { .. } => "insert_pk_string", - Reducer::UpdatePkString { .. } => "update_pk_string", - Reducer::DeletePkString { .. } => "delete_pk_string", - Reducer::InsertPkIdentity { .. } => "insert_pk_identity", - Reducer::UpdatePkIdentity { .. } => "update_pk_identity", - Reducer::DeletePkIdentity { .. } => "delete_pk_identity", - Reducer::InsertPkConnectionId { .. } => "insert_pk_connection_id", - Reducer::UpdatePkConnectionId { .. } => "update_pk_connection_id", - Reducer::DeletePkConnectionId { .. } => "delete_pk_connection_id", - Reducer::InsertPkUuid { .. } => "insert_pk_uuid", - Reducer::UpdatePkUuid { .. } => "update_pk_uuid", - Reducer::DeletePkUuid { .. } => "delete_pk_uuid", - Reducer::InsertPkSimpleEnum { .. } => "insert_pk_simple_enum", - Reducer::InsertLargeTable { .. } => "insert_large_table", - Reducer::DeleteLargeTable { .. } => "delete_large_table", - Reducer::InsertTableHoldsTable { .. } => "insert_table_holds_table", + Reducer::InsertUser { .. } => "insert_user", + Reducer::InsertVecBool { .. } => "insert_vec_bool", + Reducer::InsertVecByteStruct { .. } => "insert_vec_byte_struct", + Reducer::InsertVecConnectionId { .. } => "insert_vec_connection_id", + Reducer::InsertVecEnumWithPayload { .. } => "insert_vec_enum_with_payload", + Reducer::InsertVecEveryPrimitiveStruct { .. } => "insert_vec_every_primitive_struct", + Reducer::InsertVecEveryVecStruct { .. } => "insert_vec_every_vec_struct", + Reducer::InsertVecF32 { .. } => "insert_vec_f_32", + Reducer::InsertVecF64 { .. } => "insert_vec_f_64", + Reducer::InsertVecI128 { .. } => "insert_vec_i_128", + Reducer::InsertVecI16 { .. } => "insert_vec_i_16", + Reducer::InsertVecI256 { .. } => "insert_vec_i_256", + Reducer::InsertVecI32 { .. } => "insert_vec_i_32", + Reducer::InsertVecI64 { .. } => "insert_vec_i_64", + Reducer::InsertVecI8 { .. } => "insert_vec_i_8", + Reducer::InsertVecIdentity { .. } => "insert_vec_identity", + Reducer::InsertVecSimpleEnum { .. } => "insert_vec_simple_enum", + Reducer::InsertVecString { .. } => "insert_vec_string", + Reducer::InsertVecTimestamp { .. } => "insert_vec_timestamp", + Reducer::InsertVecU128 { .. } => "insert_vec_u_128", + Reducer::InsertVecU16 { .. } => "insert_vec_u_16", + Reducer::InsertVecU256 { .. } => "insert_vec_u_256", + Reducer::InsertVecU32 { .. } => "insert_vec_u_32", + Reducer::InsertVecU64 { .. } => "insert_vec_u_64", + Reducer::InsertVecU8 { .. } => "insert_vec_u_8", + Reducer::InsertVecUnitStruct { .. } => "insert_vec_unit_struct", + Reducer::InsertVecUuid { .. } => "insert_vec_uuid", + Reducer::NoOpSucceeds => "no_op_succeeds", Reducer::SendScheduledMessage { .. } => "send_scheduled_message", Reducer::SortedUuidsInsert => "sorted_uuids_insert", Reducer::UpdateIndexedSimpleEnum { .. } => "update_indexed_simple_enum", + Reducer::UpdatePkBool { .. } => "update_pk_bool", + Reducer::UpdatePkConnectionId { .. } => "update_pk_connection_id", + Reducer::UpdatePkI128 { .. } => "update_pk_i_128", + Reducer::UpdatePkI16 { .. } => "update_pk_i_16", + Reducer::UpdatePkI256 { .. } => "update_pk_i_256", + Reducer::UpdatePkI32 { .. } => "update_pk_i_32", + Reducer::UpdatePkI64 { .. } => "update_pk_i_64", + Reducer::UpdatePkI8 { .. } => "update_pk_i_8", + Reducer::UpdatePkIdentity { .. } => "update_pk_identity", Reducer::UpdatePkSimpleEnum { .. } => "update_pk_simple_enum", + Reducer::UpdatePkString { .. } => "update_pk_string", + Reducer::UpdatePkU128 { .. } => "update_pk_u_128", + Reducer::UpdatePkU16 { .. } => "update_pk_u_16", + Reducer::UpdatePkU256 { .. } => "update_pk_u_256", + Reducer::UpdatePkU32 { .. } => "update_pk_u_32", + Reducer::UpdatePkU32Two { .. } => "update_pk_u_32_two", + Reducer::UpdatePkU64 { .. } => "update_pk_u_64", + Reducer::UpdatePkU8 { .. } => "update_pk_u_8", + Reducer::UpdatePkUuid { .. } => "update_pk_uuid", + Reducer::UpdateUniqueBool { .. } => "update_unique_bool", + Reducer::UpdateUniqueConnectionId { .. } => "update_unique_connection_id", + Reducer::UpdateUniqueI128 { .. } => "update_unique_i_128", + Reducer::UpdateUniqueI16 { .. } => "update_unique_i_16", + Reducer::UpdateUniqueI256 { .. } => "update_unique_i_256", + Reducer::UpdateUniqueI32 { .. } => "update_unique_i_32", + Reducer::UpdateUniqueI64 { .. } => "update_unique_i_64", + Reducer::UpdateUniqueI8 { .. } => "update_unique_i_8", + Reducer::UpdateUniqueIdentity { .. } => "update_unique_identity", + Reducer::UpdateUniqueString { .. } => "update_unique_string", + Reducer::UpdateUniqueU128 { .. } => "update_unique_u_128", + Reducer::UpdateUniqueU16 { .. } => "update_unique_u_16", + Reducer::UpdateUniqueU256 { .. } => "update_unique_u_256", + Reducer::UpdateUniqueU32 { .. } => "update_unique_u_32", + Reducer::UpdateUniqueU64 { .. } => "update_unique_u_64", + Reducer::UpdateUniqueU8 { .. } => "update_unique_u_8", + Reducer::UpdateUniqueUuid { .. } => "update_unique_uuid", _ => unreachable!(), } } @@ -2169,527 +1773,583 @@ impl __sdk::Reducer for Reducer { Reducer::DeleteFromBtreeU32 { rows } => { __sats::bsatn::to_vec(&delete_from_btree_u_32_reducer::DeleteFromBtreeU32Args { rows: rows.clone() }) } - Reducer::DeletePkU32InsertPkU32Two { n, data } => __sats::bsatn::to_vec( - &delete_pk_u_32_insert_pk_u_32_two_reducer::DeletePkU32InsertPkU32TwoArgs { - n: n.clone(), - data: data.clone(), - }, - ), - Reducer::InsertCallTimestamp => { - __sats::bsatn::to_vec(&insert_call_timestamp_reducer::InsertCallTimestampArgs {}) - } - Reducer::InsertCallUuidV4 => __sats::bsatn::to_vec(&insert_call_uuid_v_4_reducer::InsertCallUuidV4Args {}), - Reducer::InsertCallUuidV7 => __sats::bsatn::to_vec(&insert_call_uuid_v_7_reducer::InsertCallUuidV7Args {}), - Reducer::InsertCallerOneConnectionId => { - __sats::bsatn::to_vec(&insert_caller_one_connection_id_reducer::InsertCallerOneConnectionIdArgs {}) - } - Reducer::InsertCallerOneIdentity => { - __sats::bsatn::to_vec(&insert_caller_one_identity_reducer::InsertCallerOneIdentityArgs {}) - } - Reducer::InsertCallerPkConnectionId { data } => __sats::bsatn::to_vec( - &insert_caller_pk_connection_id_reducer::InsertCallerPkConnectionIdArgs { data: data.clone() }, - ), - Reducer::InsertCallerPkIdentity { data } => { - __sats::bsatn::to_vec(&insert_caller_pk_identity_reducer::InsertCallerPkIdentityArgs { - data: data.clone(), - }) - } - Reducer::InsertCallerUniqueConnectionId { data } => __sats::bsatn::to_vec( - &insert_caller_unique_connection_id_reducer::InsertCallerUniqueConnectionIdArgs { data: data.clone() }, - ), - Reducer::InsertCallerUniqueIdentity { data } => { - __sats::bsatn::to_vec(&insert_caller_unique_identity_reducer::InsertCallerUniqueIdentityArgs { - data: data.clone(), - }) - } - Reducer::InsertCallerVecConnectionId => { - __sats::bsatn::to_vec(&insert_caller_vec_connection_id_reducer::InsertCallerVecConnectionIdArgs {}) - } - Reducer::InsertCallerVecIdentity => { - __sats::bsatn::to_vec(&insert_caller_vec_identity_reducer::InsertCallerVecIdentityArgs {}) - } - Reducer::InsertIntoBtreeU32 { rows } => { - __sats::bsatn::to_vec(&insert_into_btree_u_32_reducer::InsertIntoBtreeU32Args { rows: rows.clone() }) - } - Reducer::InsertIntoIndexedSimpleEnum { n } => __sats::bsatn::to_vec( - &insert_into_indexed_simple_enum_reducer::InsertIntoIndexedSimpleEnumArgs { n: n.clone() }, - ), - Reducer::InsertIntoPkBtreeU32 { pk_u_32, bt_u_32 } => { - __sats::bsatn::to_vec(&insert_into_pk_btree_u_32_reducer::InsertIntoPkBtreeU32Args { - pk_u_32: pk_u_32.clone(), - bt_u_32: bt_u_32.clone(), - }) - } - Reducer::InsertPrimitivesAsStrings { s } => { - __sats::bsatn::to_vec(&insert_primitives_as_strings_reducer::InsertPrimitivesAsStringsArgs { - s: s.clone(), - }) - } - Reducer::InsertUniqueU32UpdatePkU32 { n, d_unique, d_pk } => __sats::bsatn::to_vec( - &insert_unique_u_32_update_pk_u_32_reducer::InsertUniqueU32UpdatePkU32Args { - n: n.clone(), - d_unique: d_unique.clone(), - d_pk: d_pk.clone(), - }, - ), - Reducer::InsertUser { name, identity } => __sats::bsatn::to_vec(&insert_user_reducer::InsertUserArgs { - name: name.clone(), - identity: identity.clone(), + Reducer::DeleteLargeTable { + a, + b, + c, + d, + e, + f, + g, + h, + i, + j, + k, + l, + m, + n, + o, + p, + q, + r, + s, + t, + u, + v, + } => __sats::bsatn::to_vec(&delete_large_table_reducer::DeleteLargeTableArgs { + a: a.clone(), + b: b.clone(), + c: c.clone(), + d: d.clone(), + e: e.clone(), + f: f.clone(), + g: g.clone(), + h: h.clone(), + i: i.clone(), + j: j.clone(), + k: k.clone(), + l: l.clone(), + m: m.clone(), + n: n.clone(), + o: o.clone(), + p: p.clone(), + q: q.clone(), + r: r.clone(), + s: s.clone(), + t: t.clone(), + u: u.clone(), + v: v.clone(), }), - Reducer::NoOpSucceeds => __sats::bsatn::to_vec(&no_op_succeeds_reducer::NoOpSucceedsArgs {}), - Reducer::InsertOneU8 { n } => { - __sats::bsatn::to_vec(&insert_one_u_8_reducer::InsertOneU8Args { n: n.clone() }) - } - Reducer::InsertOneU16 { n } => { - __sats::bsatn::to_vec(&insert_one_u_16_reducer::InsertOneU16Args { n: n.clone() }) + Reducer::DeletePkBool { b } => { + __sats::bsatn::to_vec(&delete_pk_bool_reducer::DeletePkBoolArgs { b: b.clone() }) } - Reducer::InsertOneU32 { n } => { - __sats::bsatn::to_vec(&insert_one_u_32_reducer::InsertOneU32Args { n: n.clone() }) + Reducer::DeletePkConnectionId { a } => { + __sats::bsatn::to_vec(&delete_pk_connection_id_reducer::DeletePkConnectionIdArgs { a: a.clone() }) } - Reducer::InsertOneU64 { n } => { - __sats::bsatn::to_vec(&insert_one_u_64_reducer::InsertOneU64Args { n: n.clone() }) + Reducer::DeletePkI128 { n } => { + __sats::bsatn::to_vec(&delete_pk_i_128_reducer::DeletePkI128Args { n: n.clone() }) } - Reducer::InsertOneU128 { n } => { - __sats::bsatn::to_vec(&insert_one_u_128_reducer::InsertOneU128Args { n: n.clone() }) + Reducer::DeletePkI16 { n } => { + __sats::bsatn::to_vec(&delete_pk_i_16_reducer::DeletePkI16Args { n: n.clone() }) } - Reducer::InsertOneU256 { n } => { - __sats::bsatn::to_vec(&insert_one_u_256_reducer::InsertOneU256Args { n: n.clone() }) + Reducer::DeletePkI256 { n } => { + __sats::bsatn::to_vec(&delete_pk_i_256_reducer::DeletePkI256Args { n: n.clone() }) } - Reducer::InsertOneI8 { n } => { - __sats::bsatn::to_vec(&insert_one_i_8_reducer::InsertOneI8Args { n: n.clone() }) + Reducer::DeletePkI32 { n } => { + __sats::bsatn::to_vec(&delete_pk_i_32_reducer::DeletePkI32Args { n: n.clone() }) } - Reducer::InsertOneI16 { n } => { - __sats::bsatn::to_vec(&insert_one_i_16_reducer::InsertOneI16Args { n: n.clone() }) + Reducer::DeletePkI64 { n } => { + __sats::bsatn::to_vec(&delete_pk_i_64_reducer::DeletePkI64Args { n: n.clone() }) } - Reducer::InsertOneI32 { n } => { - __sats::bsatn::to_vec(&insert_one_i_32_reducer::InsertOneI32Args { n: n.clone() }) + Reducer::DeletePkI8 { n } => __sats::bsatn::to_vec(&delete_pk_i_8_reducer::DeletePkI8Args { n: n.clone() }), + Reducer::DeletePkIdentity { i } => { + __sats::bsatn::to_vec(&delete_pk_identity_reducer::DeletePkIdentityArgs { i: i.clone() }) } - Reducer::InsertOneI64 { n } => { - __sats::bsatn::to_vec(&insert_one_i_64_reducer::InsertOneI64Args { n: n.clone() }) + Reducer::DeletePkString { s } => { + __sats::bsatn::to_vec(&delete_pk_string_reducer::DeletePkStringArgs { s: s.clone() }) } - Reducer::InsertOneI128 { n } => { - __sats::bsatn::to_vec(&insert_one_i_128_reducer::InsertOneI128Args { n: n.clone() }) + Reducer::DeletePkU128 { n } => { + __sats::bsatn::to_vec(&delete_pk_u_128_reducer::DeletePkU128Args { n: n.clone() }) } - Reducer::InsertOneI256 { n } => { - __sats::bsatn::to_vec(&insert_one_i_256_reducer::InsertOneI256Args { n: n.clone() }) + Reducer::DeletePkU16 { n } => { + __sats::bsatn::to_vec(&delete_pk_u_16_reducer::DeletePkU16Args { n: n.clone() }) } - Reducer::InsertOneBool { b } => { - __sats::bsatn::to_vec(&insert_one_bool_reducer::InsertOneBoolArgs { b: b.clone() }) + Reducer::DeletePkU256 { n } => { + __sats::bsatn::to_vec(&delete_pk_u_256_reducer::DeletePkU256Args { n: n.clone() }) } - Reducer::InsertOneF32 { f } => { - __sats::bsatn::to_vec(&insert_one_f_32_reducer::InsertOneF32Args { f: f.clone() }) + Reducer::DeletePkU32 { n } => { + __sats::bsatn::to_vec(&delete_pk_u_32_reducer::DeletePkU32Args { n: n.clone() }) } - Reducer::InsertOneF64 { f } => { - __sats::bsatn::to_vec(&insert_one_f_64_reducer::InsertOneF64Args { f: f.clone() }) + Reducer::DeletePkU32InsertPkU32Two { n, data } => __sats::bsatn::to_vec( + &delete_pk_u_32_insert_pk_u_32_two_reducer::DeletePkU32InsertPkU32TwoArgs { + n: n.clone(), + data: data.clone(), + }, + ), + Reducer::DeletePkU32Two { n } => { + __sats::bsatn::to_vec(&delete_pk_u_32_two_reducer::DeletePkU32TwoArgs { n: n.clone() }) } - Reducer::InsertOneString { s } => { - __sats::bsatn::to_vec(&insert_one_string_reducer::InsertOneStringArgs { s: s.clone() }) + Reducer::DeletePkU64 { n } => { + __sats::bsatn::to_vec(&delete_pk_u_64_reducer::DeletePkU64Args { n: n.clone() }) } - Reducer::InsertOneIdentity { i } => { - __sats::bsatn::to_vec(&insert_one_identity_reducer::InsertOneIdentityArgs { i: i.clone() }) + Reducer::DeletePkU8 { n } => __sats::bsatn::to_vec(&delete_pk_u_8_reducer::DeletePkU8Args { n: n.clone() }), + Reducer::DeletePkUuid { u } => { + __sats::bsatn::to_vec(&delete_pk_uuid_reducer::DeletePkUuidArgs { u: u.clone() }) } - Reducer::InsertOneConnectionId { a } => { - __sats::bsatn::to_vec(&insert_one_connection_id_reducer::InsertOneConnectionIdArgs { a: a.clone() }) + Reducer::DeleteUniqueBool { b } => { + __sats::bsatn::to_vec(&delete_unique_bool_reducer::DeleteUniqueBoolArgs { b: b.clone() }) } - Reducer::InsertOneUuid { u } => { - __sats::bsatn::to_vec(&insert_one_uuid_reducer::InsertOneUuidArgs { u: u.clone() }) + Reducer::DeleteUniqueConnectionId { a } => { + __sats::bsatn::to_vec(&delete_unique_connection_id_reducer::DeleteUniqueConnectionIdArgs { + a: a.clone(), + }) } - Reducer::InsertOneTimestamp { t } => { - __sats::bsatn::to_vec(&insert_one_timestamp_reducer::InsertOneTimestampArgs { t: t.clone() }) + Reducer::DeleteUniqueI128 { n } => { + __sats::bsatn::to_vec(&delete_unique_i_128_reducer::DeleteUniqueI128Args { n: n.clone() }) } - Reducer::InsertOneSimpleEnum { e } => { - __sats::bsatn::to_vec(&insert_one_simple_enum_reducer::InsertOneSimpleEnumArgs { e: e.clone() }) + Reducer::DeleteUniqueI16 { n } => { + __sats::bsatn::to_vec(&delete_unique_i_16_reducer::DeleteUniqueI16Args { n: n.clone() }) } - Reducer::InsertOneEnumWithPayload { e } => { - __sats::bsatn::to_vec(&insert_one_enum_with_payload_reducer::InsertOneEnumWithPayloadArgs { - e: e.clone(), - }) + Reducer::DeleteUniqueI256 { n } => { + __sats::bsatn::to_vec(&delete_unique_i_256_reducer::DeleteUniqueI256Args { n: n.clone() }) } - Reducer::InsertOneUnitStruct { s } => { - __sats::bsatn::to_vec(&insert_one_unit_struct_reducer::InsertOneUnitStructArgs { s: s.clone() }) + Reducer::DeleteUniqueI32 { n } => { + __sats::bsatn::to_vec(&delete_unique_i_32_reducer::DeleteUniqueI32Args { n: n.clone() }) } - Reducer::InsertOneByteStruct { s } => { - __sats::bsatn::to_vec(&insert_one_byte_struct_reducer::InsertOneByteStructArgs { s: s.clone() }) + Reducer::DeleteUniqueI64 { n } => { + __sats::bsatn::to_vec(&delete_unique_i_64_reducer::DeleteUniqueI64Args { n: n.clone() }) } - Reducer::InsertOneEveryPrimitiveStruct { s } => __sats::bsatn::to_vec( - &insert_one_every_primitive_struct_reducer::InsertOneEveryPrimitiveStructArgs { s: s.clone() }, - ), - Reducer::InsertOneEveryVecStruct { s } => { - __sats::bsatn::to_vec(&insert_one_every_vec_struct_reducer::InsertOneEveryVecStructArgs { - s: s.clone(), - }) + Reducer::DeleteUniqueI8 { n } => { + __sats::bsatn::to_vec(&delete_unique_i_8_reducer::DeleteUniqueI8Args { n: n.clone() }) } - Reducer::InsertVecU8 { n } => { - __sats::bsatn::to_vec(&insert_vec_u_8_reducer::InsertVecU8Args { n: n.clone() }) + Reducer::DeleteUniqueIdentity { i } => { + __sats::bsatn::to_vec(&delete_unique_identity_reducer::DeleteUniqueIdentityArgs { i: i.clone() }) } - Reducer::InsertVecU16 { n } => { - __sats::bsatn::to_vec(&insert_vec_u_16_reducer::InsertVecU16Args { n: n.clone() }) + Reducer::DeleteUniqueString { s } => { + __sats::bsatn::to_vec(&delete_unique_string_reducer::DeleteUniqueStringArgs { s: s.clone() }) } - Reducer::InsertVecU32 { n } => { - __sats::bsatn::to_vec(&insert_vec_u_32_reducer::InsertVecU32Args { n: n.clone() }) + Reducer::DeleteUniqueU128 { n } => { + __sats::bsatn::to_vec(&delete_unique_u_128_reducer::DeleteUniqueU128Args { n: n.clone() }) } - Reducer::InsertVecU64 { n } => { - __sats::bsatn::to_vec(&insert_vec_u_64_reducer::InsertVecU64Args { n: n.clone() }) + Reducer::DeleteUniqueU16 { n } => { + __sats::bsatn::to_vec(&delete_unique_u_16_reducer::DeleteUniqueU16Args { n: n.clone() }) } - Reducer::InsertVecU128 { n } => { - __sats::bsatn::to_vec(&insert_vec_u_128_reducer::InsertVecU128Args { n: n.clone() }) + Reducer::DeleteUniqueU256 { n } => { + __sats::bsatn::to_vec(&delete_unique_u_256_reducer::DeleteUniqueU256Args { n: n.clone() }) } - Reducer::InsertVecU256 { n } => { - __sats::bsatn::to_vec(&insert_vec_u_256_reducer::InsertVecU256Args { n: n.clone() }) + Reducer::DeleteUniqueU32 { n } => { + __sats::bsatn::to_vec(&delete_unique_u_32_reducer::DeleteUniqueU32Args { n: n.clone() }) } - Reducer::InsertVecI8 { n } => { - __sats::bsatn::to_vec(&insert_vec_i_8_reducer::InsertVecI8Args { n: n.clone() }) + Reducer::DeleteUniqueU64 { n } => { + __sats::bsatn::to_vec(&delete_unique_u_64_reducer::DeleteUniqueU64Args { n: n.clone() }) } - Reducer::InsertVecI16 { n } => { - __sats::bsatn::to_vec(&insert_vec_i_16_reducer::InsertVecI16Args { n: n.clone() }) + Reducer::DeleteUniqueU8 { n } => { + __sats::bsatn::to_vec(&delete_unique_u_8_reducer::DeleteUniqueU8Args { n: n.clone() }) } - Reducer::InsertVecI32 { n } => { - __sats::bsatn::to_vec(&insert_vec_i_32_reducer::InsertVecI32Args { n: n.clone() }) + Reducer::DeleteUniqueUuid { u } => { + __sats::bsatn::to_vec(&delete_unique_uuid_reducer::DeleteUniqueUuidArgs { u: u.clone() }) } - Reducer::InsertVecI64 { n } => { - __sats::bsatn::to_vec(&insert_vec_i_64_reducer::InsertVecI64Args { n: n.clone() }) + Reducer::InsertCallTimestamp => { + __sats::bsatn::to_vec(&insert_call_timestamp_reducer::InsertCallTimestampArgs {}) } - Reducer::InsertVecI128 { n } => { - __sats::bsatn::to_vec(&insert_vec_i_128_reducer::InsertVecI128Args { n: n.clone() }) + Reducer::InsertCallUuidV4 => __sats::bsatn::to_vec(&insert_call_uuid_v_4_reducer::InsertCallUuidV4Args {}), + Reducer::InsertCallUuidV7 => __sats::bsatn::to_vec(&insert_call_uuid_v_7_reducer::InsertCallUuidV7Args {}), + Reducer::InsertCallerOneConnectionId => { + __sats::bsatn::to_vec(&insert_caller_one_connection_id_reducer::InsertCallerOneConnectionIdArgs {}) } - Reducer::InsertVecI256 { n } => { - __sats::bsatn::to_vec(&insert_vec_i_256_reducer::InsertVecI256Args { n: n.clone() }) + Reducer::InsertCallerOneIdentity => { + __sats::bsatn::to_vec(&insert_caller_one_identity_reducer::InsertCallerOneIdentityArgs {}) } - Reducer::InsertVecBool { b } => { - __sats::bsatn::to_vec(&insert_vec_bool_reducer::InsertVecBoolArgs { b: b.clone() }) + Reducer::InsertCallerPkConnectionId { data } => __sats::bsatn::to_vec( + &insert_caller_pk_connection_id_reducer::InsertCallerPkConnectionIdArgs { data: data.clone() }, + ), + Reducer::InsertCallerPkIdentity { data } => { + __sats::bsatn::to_vec(&insert_caller_pk_identity_reducer::InsertCallerPkIdentityArgs { + data: data.clone(), + }) } - Reducer::InsertVecF32 { f } => { - __sats::bsatn::to_vec(&insert_vec_f_32_reducer::InsertVecF32Args { f: f.clone() }) + Reducer::InsertCallerUniqueConnectionId { data } => __sats::bsatn::to_vec( + &insert_caller_unique_connection_id_reducer::InsertCallerUniqueConnectionIdArgs { data: data.clone() }, + ), + Reducer::InsertCallerUniqueIdentity { data } => { + __sats::bsatn::to_vec(&insert_caller_unique_identity_reducer::InsertCallerUniqueIdentityArgs { + data: data.clone(), + }) } - Reducer::InsertVecF64 { f } => { - __sats::bsatn::to_vec(&insert_vec_f_64_reducer::InsertVecF64Args { f: f.clone() }) + Reducer::InsertCallerVecConnectionId => { + __sats::bsatn::to_vec(&insert_caller_vec_connection_id_reducer::InsertCallerVecConnectionIdArgs {}) } - Reducer::InsertVecString { s } => { - __sats::bsatn::to_vec(&insert_vec_string_reducer::InsertVecStringArgs { s: s.clone() }) + Reducer::InsertCallerVecIdentity => { + __sats::bsatn::to_vec(&insert_caller_vec_identity_reducer::InsertCallerVecIdentityArgs {}) } - Reducer::InsertVecIdentity { i } => { - __sats::bsatn::to_vec(&insert_vec_identity_reducer::InsertVecIdentityArgs { i: i.clone() }) + Reducer::InsertIntoBtreeU32 { rows } => { + __sats::bsatn::to_vec(&insert_into_btree_u_32_reducer::InsertIntoBtreeU32Args { rows: rows.clone() }) } - Reducer::InsertVecConnectionId { a } => { - __sats::bsatn::to_vec(&insert_vec_connection_id_reducer::InsertVecConnectionIdArgs { a: a.clone() }) + Reducer::InsertIntoIndexedSimpleEnum { n } => __sats::bsatn::to_vec( + &insert_into_indexed_simple_enum_reducer::InsertIntoIndexedSimpleEnumArgs { n: n.clone() }, + ), + Reducer::InsertIntoPkBtreeU32 { pk_u_32, bt_u_32 } => { + __sats::bsatn::to_vec(&insert_into_pk_btree_u_32_reducer::InsertIntoPkBtreeU32Args { + pk_u_32: pk_u_32.clone(), + bt_u_32: bt_u_32.clone(), + }) } - Reducer::InsertVecTimestamp { t } => { - __sats::bsatn::to_vec(&insert_vec_timestamp_reducer::InsertVecTimestampArgs { t: t.clone() }) + Reducer::InsertLargeTable { + a, + b, + c, + d, + e, + f, + g, + h, + i, + j, + k, + l, + m, + n, + o, + p, + q, + r, + s, + t, + u, + v, + } => __sats::bsatn::to_vec(&insert_large_table_reducer::InsertLargeTableArgs { + a: a.clone(), + b: b.clone(), + c: c.clone(), + d: d.clone(), + e: e.clone(), + f: f.clone(), + g: g.clone(), + h: h.clone(), + i: i.clone(), + j: j.clone(), + k: k.clone(), + l: l.clone(), + m: m.clone(), + n: n.clone(), + o: o.clone(), + p: p.clone(), + q: q.clone(), + r: r.clone(), + s: s.clone(), + t: t.clone(), + u: u.clone(), + v: v.clone(), + }), + Reducer::InsertOneBool { b } => { + __sats::bsatn::to_vec(&insert_one_bool_reducer::InsertOneBoolArgs { b: b.clone() }) } - Reducer::InsertVecUuid { u } => { - __sats::bsatn::to_vec(&insert_vec_uuid_reducer::InsertVecUuidArgs { u: u.clone() }) + Reducer::InsertOneByteStruct { s } => { + __sats::bsatn::to_vec(&insert_one_byte_struct_reducer::InsertOneByteStructArgs { s: s.clone() }) } - Reducer::InsertVecSimpleEnum { e } => { - __sats::bsatn::to_vec(&insert_vec_simple_enum_reducer::InsertVecSimpleEnumArgs { e: e.clone() }) + Reducer::InsertOneConnectionId { a } => { + __sats::bsatn::to_vec(&insert_one_connection_id_reducer::InsertOneConnectionIdArgs { a: a.clone() }) } - Reducer::InsertVecEnumWithPayload { e } => { - __sats::bsatn::to_vec(&insert_vec_enum_with_payload_reducer::InsertVecEnumWithPayloadArgs { + Reducer::InsertOneEnumWithPayload { e } => { + __sats::bsatn::to_vec(&insert_one_enum_with_payload_reducer::InsertOneEnumWithPayloadArgs { e: e.clone(), }) } - Reducer::InsertVecUnitStruct { s } => { - __sats::bsatn::to_vec(&insert_vec_unit_struct_reducer::InsertVecUnitStructArgs { s: s.clone() }) - } - Reducer::InsertVecByteStruct { s } => { - __sats::bsatn::to_vec(&insert_vec_byte_struct_reducer::InsertVecByteStructArgs { s: s.clone() }) - } - Reducer::InsertVecEveryPrimitiveStruct { s } => __sats::bsatn::to_vec( - &insert_vec_every_primitive_struct_reducer::InsertVecEveryPrimitiveStructArgs { s: s.clone() }, + Reducer::InsertOneEveryPrimitiveStruct { s } => __sats::bsatn::to_vec( + &insert_one_every_primitive_struct_reducer::InsertOneEveryPrimitiveStructArgs { s: s.clone() }, ), - Reducer::InsertVecEveryVecStruct { s } => { - __sats::bsatn::to_vec(&insert_vec_every_vec_struct_reducer::InsertVecEveryVecStructArgs { + Reducer::InsertOneEveryVecStruct { s } => { + __sats::bsatn::to_vec(&insert_one_every_vec_struct_reducer::InsertOneEveryVecStructArgs { s: s.clone(), }) } - Reducer::InsertOptionI32 { n } => { - __sats::bsatn::to_vec(&insert_option_i_32_reducer::InsertOptionI32Args { n: n.clone() }) + Reducer::InsertOneF32 { f } => { + __sats::bsatn::to_vec(&insert_one_f_32_reducer::InsertOneF32Args { f: f.clone() }) } - Reducer::InsertOptionString { s } => { - __sats::bsatn::to_vec(&insert_option_string_reducer::InsertOptionStringArgs { s: s.clone() }) + Reducer::InsertOneF64 { f } => { + __sats::bsatn::to_vec(&insert_one_f_64_reducer::InsertOneF64Args { f: f.clone() }) } - Reducer::InsertOptionIdentity { i } => { - __sats::bsatn::to_vec(&insert_option_identity_reducer::InsertOptionIdentityArgs { i: i.clone() }) + Reducer::InsertOneI128 { n } => { + __sats::bsatn::to_vec(&insert_one_i_128_reducer::InsertOneI128Args { n: n.clone() }) } - Reducer::InsertOptionUuid { u } => { - __sats::bsatn::to_vec(&insert_option_uuid_reducer::InsertOptionUuidArgs { u: u.clone() }) + Reducer::InsertOneI16 { n } => { + __sats::bsatn::to_vec(&insert_one_i_16_reducer::InsertOneI16Args { n: n.clone() }) } - Reducer::InsertOptionSimpleEnum { e } => { - __sats::bsatn::to_vec(&insert_option_simple_enum_reducer::InsertOptionSimpleEnumArgs { e: e.clone() }) + Reducer::InsertOneI256 { n } => { + __sats::bsatn::to_vec(&insert_one_i_256_reducer::InsertOneI256Args { n: n.clone() }) } - Reducer::InsertOptionEveryPrimitiveStruct { s } => __sats::bsatn::to_vec( - &insert_option_every_primitive_struct_reducer::InsertOptionEveryPrimitiveStructArgs { s: s.clone() }, - ), - Reducer::InsertOptionVecOptionI32 { v } => { - __sats::bsatn::to_vec(&insert_option_vec_option_i_32_reducer::InsertOptionVecOptionI32Args { - v: v.clone(), - }) + Reducer::InsertOneI32 { n } => { + __sats::bsatn::to_vec(&insert_one_i_32_reducer::InsertOneI32Args { n: n.clone() }) } - Reducer::InsertResultI32String { r } => { - __sats::bsatn::to_vec(&insert_result_i_32_string_reducer::InsertResultI32StringArgs { r: r.clone() }) + Reducer::InsertOneI64 { n } => { + __sats::bsatn::to_vec(&insert_one_i_64_reducer::InsertOneI64Args { n: n.clone() }) } - Reducer::InsertResultStringI32 { r } => { - __sats::bsatn::to_vec(&insert_result_string_i_32_reducer::InsertResultStringI32Args { r: r.clone() }) + Reducer::InsertOneI8 { n } => { + __sats::bsatn::to_vec(&insert_one_i_8_reducer::InsertOneI8Args { n: n.clone() }) } - Reducer::InsertResultIdentityString { r } => { - __sats::bsatn::to_vec(&insert_result_identity_string_reducer::InsertResultIdentityStringArgs { - r: r.clone(), - }) + Reducer::InsertOneIdentity { i } => { + __sats::bsatn::to_vec(&insert_one_identity_reducer::InsertOneIdentityArgs { i: i.clone() }) } - Reducer::InsertResultSimpleEnumI32 { r } => { - __sats::bsatn::to_vec(&insert_result_simple_enum_i_32_reducer::InsertResultSimpleEnumI32Args { - r: r.clone(), - }) + Reducer::InsertOneSimpleEnum { e } => { + __sats::bsatn::to_vec(&insert_one_simple_enum_reducer::InsertOneSimpleEnumArgs { e: e.clone() }) } - Reducer::InsertResultEveryPrimitiveStructString { r } => __sats::bsatn::to_vec( - &insert_result_every_primitive_struct_string_reducer::InsertResultEveryPrimitiveStructStringArgs { - r: r.clone(), - }, - ), - Reducer::InsertResultVecI32String { r } => { - __sats::bsatn::to_vec(&insert_result_vec_i_32_string_reducer::InsertResultVecI32StringArgs { - r: r.clone(), - }) + Reducer::InsertOneString { s } => { + __sats::bsatn::to_vec(&insert_one_string_reducer::InsertOneStringArgs { s: s.clone() }) + } + Reducer::InsertOneTimestamp { t } => { + __sats::bsatn::to_vec(&insert_one_timestamp_reducer::InsertOneTimestampArgs { t: t.clone() }) + } + Reducer::InsertOneU128 { n } => { + __sats::bsatn::to_vec(&insert_one_u_128_reducer::InsertOneU128Args { n: n.clone() }) + } + Reducer::InsertOneU16 { n } => { + __sats::bsatn::to_vec(&insert_one_u_16_reducer::InsertOneU16Args { n: n.clone() }) + } + Reducer::InsertOneU256 { n } => { + __sats::bsatn::to_vec(&insert_one_u_256_reducer::InsertOneU256Args { n: n.clone() }) } - Reducer::InsertUniqueU8 { n, data } => { - __sats::bsatn::to_vec(&insert_unique_u_8_reducer::InsertUniqueU8Args { - n: n.clone(), - data: data.clone(), - }) + Reducer::InsertOneU32 { n } => { + __sats::bsatn::to_vec(&insert_one_u_32_reducer::InsertOneU32Args { n: n.clone() }) } - Reducer::UpdateUniqueU8 { n, data } => { - __sats::bsatn::to_vec(&update_unique_u_8_reducer::UpdateUniqueU8Args { - n: n.clone(), - data: data.clone(), - }) + Reducer::InsertOneU64 { n } => { + __sats::bsatn::to_vec(&insert_one_u_64_reducer::InsertOneU64Args { n: n.clone() }) } - Reducer::DeleteUniqueU8 { n } => { - __sats::bsatn::to_vec(&delete_unique_u_8_reducer::DeleteUniqueU8Args { n: n.clone() }) + Reducer::InsertOneU8 { n } => { + __sats::bsatn::to_vec(&insert_one_u_8_reducer::InsertOneU8Args { n: n.clone() }) } - Reducer::InsertUniqueU16 { n, data } => { - __sats::bsatn::to_vec(&insert_unique_u_16_reducer::InsertUniqueU16Args { - n: n.clone(), - data: data.clone(), - }) + Reducer::InsertOneUnitStruct { s } => { + __sats::bsatn::to_vec(&insert_one_unit_struct_reducer::InsertOneUnitStructArgs { s: s.clone() }) } - Reducer::UpdateUniqueU16 { n, data } => { - __sats::bsatn::to_vec(&update_unique_u_16_reducer::UpdateUniqueU16Args { - n: n.clone(), - data: data.clone(), - }) + Reducer::InsertOneUuid { u } => { + __sats::bsatn::to_vec(&insert_one_uuid_reducer::InsertOneUuidArgs { u: u.clone() }) } - Reducer::DeleteUniqueU16 { n } => { - __sats::bsatn::to_vec(&delete_unique_u_16_reducer::DeleteUniqueU16Args { n: n.clone() }) + Reducer::InsertOptionEveryPrimitiveStruct { s } => __sats::bsatn::to_vec( + &insert_option_every_primitive_struct_reducer::InsertOptionEveryPrimitiveStructArgs { s: s.clone() }, + ), + Reducer::InsertOptionI32 { n } => { + __sats::bsatn::to_vec(&insert_option_i_32_reducer::InsertOptionI32Args { n: n.clone() }) } - Reducer::InsertUniqueU32 { n, data } => { - __sats::bsatn::to_vec(&insert_unique_u_32_reducer::InsertUniqueU32Args { - n: n.clone(), - data: data.clone(), - }) + Reducer::InsertOptionIdentity { i } => { + __sats::bsatn::to_vec(&insert_option_identity_reducer::InsertOptionIdentityArgs { i: i.clone() }) } - Reducer::UpdateUniqueU32 { n, data } => { - __sats::bsatn::to_vec(&update_unique_u_32_reducer::UpdateUniqueU32Args { - n: n.clone(), - data: data.clone(), - }) + Reducer::InsertOptionSimpleEnum { e } => { + __sats::bsatn::to_vec(&insert_option_simple_enum_reducer::InsertOptionSimpleEnumArgs { e: e.clone() }) } - Reducer::DeleteUniqueU32 { n } => { - __sats::bsatn::to_vec(&delete_unique_u_32_reducer::DeleteUniqueU32Args { n: n.clone() }) + Reducer::InsertOptionString { s } => { + __sats::bsatn::to_vec(&insert_option_string_reducer::InsertOptionStringArgs { s: s.clone() }) } - Reducer::InsertUniqueU64 { n, data } => { - __sats::bsatn::to_vec(&insert_unique_u_64_reducer::InsertUniqueU64Args { - n: n.clone(), - data: data.clone(), - }) + Reducer::InsertOptionUuid { u } => { + __sats::bsatn::to_vec(&insert_option_uuid_reducer::InsertOptionUuidArgs { u: u.clone() }) } - Reducer::UpdateUniqueU64 { n, data } => { - __sats::bsatn::to_vec(&update_unique_u_64_reducer::UpdateUniqueU64Args { - n: n.clone(), - data: data.clone(), + Reducer::InsertOptionVecOptionI32 { v } => { + __sats::bsatn::to_vec(&insert_option_vec_option_i_32_reducer::InsertOptionVecOptionI32Args { + v: v.clone(), }) } - Reducer::DeleteUniqueU64 { n } => { - __sats::bsatn::to_vec(&delete_unique_u_64_reducer::DeleteUniqueU64Args { n: n.clone() }) - } - Reducer::InsertUniqueU128 { n, data } => { - __sats::bsatn::to_vec(&insert_unique_u_128_reducer::InsertUniqueU128Args { - n: n.clone(), + Reducer::InsertPkBool { b, data } => __sats::bsatn::to_vec(&insert_pk_bool_reducer::InsertPkBoolArgs { + b: b.clone(), + data: data.clone(), + }), + Reducer::InsertPkConnectionId { a, data } => { + __sats::bsatn::to_vec(&insert_pk_connection_id_reducer::InsertPkConnectionIdArgs { + a: a.clone(), data: data.clone(), }) } - Reducer::UpdateUniqueU128 { n, data } => { - __sats::bsatn::to_vec(&update_unique_u_128_reducer::UpdateUniqueU128Args { - n: n.clone(), + Reducer::InsertPkI128 { n, data } => __sats::bsatn::to_vec(&insert_pk_i_128_reducer::InsertPkI128Args { + n: n.clone(), + data: data.clone(), + }), + Reducer::InsertPkI16 { n, data } => __sats::bsatn::to_vec(&insert_pk_i_16_reducer::InsertPkI16Args { + n: n.clone(), + data: data.clone(), + }), + Reducer::InsertPkI256 { n, data } => __sats::bsatn::to_vec(&insert_pk_i_256_reducer::InsertPkI256Args { + n: n.clone(), + data: data.clone(), + }), + Reducer::InsertPkI32 { n, data } => __sats::bsatn::to_vec(&insert_pk_i_32_reducer::InsertPkI32Args { + n: n.clone(), + data: data.clone(), + }), + Reducer::InsertPkI64 { n, data } => __sats::bsatn::to_vec(&insert_pk_i_64_reducer::InsertPkI64Args { + n: n.clone(), + data: data.clone(), + }), + Reducer::InsertPkI8 { n, data } => __sats::bsatn::to_vec(&insert_pk_i_8_reducer::InsertPkI8Args { + n: n.clone(), + data: data.clone(), + }), + Reducer::InsertPkIdentity { i, data } => { + __sats::bsatn::to_vec(&insert_pk_identity_reducer::InsertPkIdentityArgs { + i: i.clone(), data: data.clone(), }) } - Reducer::DeleteUniqueU128 { n } => { - __sats::bsatn::to_vec(&delete_unique_u_128_reducer::DeleteUniqueU128Args { n: n.clone() }) - } - Reducer::InsertUniqueU256 { n, data } => { - __sats::bsatn::to_vec(&insert_unique_u_256_reducer::InsertUniqueU256Args { - n: n.clone(), + Reducer::InsertPkSimpleEnum { a, data } => { + __sats::bsatn::to_vec(&insert_pk_simple_enum_reducer::InsertPkSimpleEnumArgs { + a: a.clone(), data: data.clone(), }) } - Reducer::UpdateUniqueU256 { n, data } => { - __sats::bsatn::to_vec(&update_unique_u_256_reducer::UpdateUniqueU256Args { - n: n.clone(), + Reducer::InsertPkString { s, data } => { + __sats::bsatn::to_vec(&insert_pk_string_reducer::InsertPkStringArgs { + s: s.clone(), data: data.clone(), }) } - Reducer::DeleteUniqueU256 { n } => { - __sats::bsatn::to_vec(&delete_unique_u_256_reducer::DeleteUniqueU256Args { n: n.clone() }) - } - Reducer::InsertUniqueI8 { n, data } => { - __sats::bsatn::to_vec(&insert_unique_i_8_reducer::InsertUniqueI8Args { + Reducer::InsertPkU128 { n, data } => __sats::bsatn::to_vec(&insert_pk_u_128_reducer::InsertPkU128Args { + n: n.clone(), + data: data.clone(), + }), + Reducer::InsertPkU16 { n, data } => __sats::bsatn::to_vec(&insert_pk_u_16_reducer::InsertPkU16Args { + n: n.clone(), + data: data.clone(), + }), + Reducer::InsertPkU256 { n, data } => __sats::bsatn::to_vec(&insert_pk_u_256_reducer::InsertPkU256Args { + n: n.clone(), + data: data.clone(), + }), + Reducer::InsertPkU32 { n, data } => __sats::bsatn::to_vec(&insert_pk_u_32_reducer::InsertPkU32Args { + n: n.clone(), + data: data.clone(), + }), + Reducer::InsertPkU32Two { n, data } => { + __sats::bsatn::to_vec(&insert_pk_u_32_two_reducer::InsertPkU32TwoArgs { n: n.clone(), data: data.clone(), }) } - Reducer::UpdateUniqueI8 { n, data } => { - __sats::bsatn::to_vec(&update_unique_i_8_reducer::UpdateUniqueI8Args { - n: n.clone(), - data: data.clone(), + Reducer::InsertPkU64 { n, data } => __sats::bsatn::to_vec(&insert_pk_u_64_reducer::InsertPkU64Args { + n: n.clone(), + data: data.clone(), + }), + Reducer::InsertPkU8 { n, data } => __sats::bsatn::to_vec(&insert_pk_u_8_reducer::InsertPkU8Args { + n: n.clone(), + data: data.clone(), + }), + Reducer::InsertPkUuid { u, data } => __sats::bsatn::to_vec(&insert_pk_uuid_reducer::InsertPkUuidArgs { + u: u.clone(), + data: data.clone(), + }), + Reducer::InsertPrimitivesAsStrings { s } => { + __sats::bsatn::to_vec(&insert_primitives_as_strings_reducer::InsertPrimitivesAsStringsArgs { + s: s.clone(), }) } - Reducer::DeleteUniqueI8 { n } => { - __sats::bsatn::to_vec(&delete_unique_i_8_reducer::DeleteUniqueI8Args { n: n.clone() }) + Reducer::InsertResultEveryPrimitiveStructString { r } => __sats::bsatn::to_vec( + &insert_result_every_primitive_struct_string_reducer::InsertResultEveryPrimitiveStructStringArgs { + r: r.clone(), + }, + ), + Reducer::InsertResultI32String { r } => { + __sats::bsatn::to_vec(&insert_result_i_32_string_reducer::InsertResultI32StringArgs { r: r.clone() }) } - Reducer::InsertUniqueI16 { n, data } => { - __sats::bsatn::to_vec(&insert_unique_i_16_reducer::InsertUniqueI16Args { - n: n.clone(), - data: data.clone(), + Reducer::InsertResultIdentityString { r } => { + __sats::bsatn::to_vec(&insert_result_identity_string_reducer::InsertResultIdentityStringArgs { + r: r.clone(), }) } - Reducer::UpdateUniqueI16 { n, data } => { - __sats::bsatn::to_vec(&update_unique_i_16_reducer::UpdateUniqueI16Args { - n: n.clone(), - data: data.clone(), + Reducer::InsertResultSimpleEnumI32 { r } => { + __sats::bsatn::to_vec(&insert_result_simple_enum_i_32_reducer::InsertResultSimpleEnumI32Args { + r: r.clone(), }) } - Reducer::DeleteUniqueI16 { n } => { - __sats::bsatn::to_vec(&delete_unique_i_16_reducer::DeleteUniqueI16Args { n: n.clone() }) + Reducer::InsertResultStringI32 { r } => { + __sats::bsatn::to_vec(&insert_result_string_i_32_reducer::InsertResultStringI32Args { r: r.clone() }) } - Reducer::InsertUniqueI32 { n, data } => { - __sats::bsatn::to_vec(&insert_unique_i_32_reducer::InsertUniqueI32Args { - n: n.clone(), - data: data.clone(), + Reducer::InsertResultVecI32String { r } => { + __sats::bsatn::to_vec(&insert_result_vec_i_32_string_reducer::InsertResultVecI32StringArgs { + r: r.clone(), }) } - Reducer::UpdateUniqueI32 { n, data } => { - __sats::bsatn::to_vec(&update_unique_i_32_reducer::UpdateUniqueI32Args { - n: n.clone(), - data: data.clone(), + Reducer::InsertTableHoldsTable { a, b } => { + __sats::bsatn::to_vec(&insert_table_holds_table_reducer::InsertTableHoldsTableArgs { + a: a.clone(), + b: b.clone(), }) } - Reducer::DeleteUniqueI32 { n } => { - __sats::bsatn::to_vec(&delete_unique_i_32_reducer::DeleteUniqueI32Args { n: n.clone() }) - } - Reducer::InsertUniqueI64 { n, data } => { - __sats::bsatn::to_vec(&insert_unique_i_64_reducer::InsertUniqueI64Args { - n: n.clone(), + Reducer::InsertUniqueBool { b, data } => { + __sats::bsatn::to_vec(&insert_unique_bool_reducer::InsertUniqueBoolArgs { + b: b.clone(), data: data.clone(), }) } - Reducer::UpdateUniqueI64 { n, data } => { - __sats::bsatn::to_vec(&update_unique_i_64_reducer::UpdateUniqueI64Args { - n: n.clone(), + Reducer::InsertUniqueConnectionId { a, data } => { + __sats::bsatn::to_vec(&insert_unique_connection_id_reducer::InsertUniqueConnectionIdArgs { + a: a.clone(), data: data.clone(), }) } - Reducer::DeleteUniqueI64 { n } => { - __sats::bsatn::to_vec(&delete_unique_i_64_reducer::DeleteUniqueI64Args { n: n.clone() }) - } Reducer::InsertUniqueI128 { n, data } => { __sats::bsatn::to_vec(&insert_unique_i_128_reducer::InsertUniqueI128Args { n: n.clone(), data: data.clone(), }) } - Reducer::UpdateUniqueI128 { n, data } => { - __sats::bsatn::to_vec(&update_unique_i_128_reducer::UpdateUniqueI128Args { + Reducer::InsertUniqueI16 { n, data } => { + __sats::bsatn::to_vec(&insert_unique_i_16_reducer::InsertUniqueI16Args { n: n.clone(), data: data.clone(), }) } - Reducer::DeleteUniqueI128 { n } => { - __sats::bsatn::to_vec(&delete_unique_i_128_reducer::DeleteUniqueI128Args { n: n.clone() }) - } Reducer::InsertUniqueI256 { n, data } => { __sats::bsatn::to_vec(&insert_unique_i_256_reducer::InsertUniqueI256Args { n: n.clone(), data: data.clone(), }) } - Reducer::UpdateUniqueI256 { n, data } => { - __sats::bsatn::to_vec(&update_unique_i_256_reducer::UpdateUniqueI256Args { + Reducer::InsertUniqueI32 { n, data } => { + __sats::bsatn::to_vec(&insert_unique_i_32_reducer::InsertUniqueI32Args { n: n.clone(), data: data.clone(), }) } - Reducer::DeleteUniqueI256 { n } => { - __sats::bsatn::to_vec(&delete_unique_i_256_reducer::DeleteUniqueI256Args { n: n.clone() }) + Reducer::InsertUniqueI64 { n, data } => { + __sats::bsatn::to_vec(&insert_unique_i_64_reducer::InsertUniqueI64Args { + n: n.clone(), + data: data.clone(), + }) } - Reducer::InsertUniqueBool { b, data } => { - __sats::bsatn::to_vec(&insert_unique_bool_reducer::InsertUniqueBoolArgs { - b: b.clone(), + Reducer::InsertUniqueI8 { n, data } => { + __sats::bsatn::to_vec(&insert_unique_i_8_reducer::InsertUniqueI8Args { + n: n.clone(), data: data.clone(), }) } - Reducer::UpdateUniqueBool { b, data } => { - __sats::bsatn::to_vec(&update_unique_bool_reducer::UpdateUniqueBoolArgs { - b: b.clone(), + Reducer::InsertUniqueIdentity { i, data } => { + __sats::bsatn::to_vec(&insert_unique_identity_reducer::InsertUniqueIdentityArgs { + i: i.clone(), data: data.clone(), }) } - Reducer::DeleteUniqueBool { b } => { - __sats::bsatn::to_vec(&delete_unique_bool_reducer::DeleteUniqueBoolArgs { b: b.clone() }) - } Reducer::InsertUniqueString { s, data } => { __sats::bsatn::to_vec(&insert_unique_string_reducer::InsertUniqueStringArgs { s: s.clone(), data: data.clone(), }) } - Reducer::UpdateUniqueString { s, data } => { - __sats::bsatn::to_vec(&update_unique_string_reducer::UpdateUniqueStringArgs { - s: s.clone(), + Reducer::InsertUniqueU128 { n, data } => { + __sats::bsatn::to_vec(&insert_unique_u_128_reducer::InsertUniqueU128Args { + n: n.clone(), data: data.clone(), }) } - Reducer::DeleteUniqueString { s } => { - __sats::bsatn::to_vec(&delete_unique_string_reducer::DeleteUniqueStringArgs { s: s.clone() }) - } - Reducer::InsertUniqueIdentity { i, data } => { - __sats::bsatn::to_vec(&insert_unique_identity_reducer::InsertUniqueIdentityArgs { - i: i.clone(), + Reducer::InsertUniqueU16 { n, data } => { + __sats::bsatn::to_vec(&insert_unique_u_16_reducer::InsertUniqueU16Args { + n: n.clone(), data: data.clone(), }) } - Reducer::UpdateUniqueIdentity { i, data } => { - __sats::bsatn::to_vec(&update_unique_identity_reducer::UpdateUniqueIdentityArgs { - i: i.clone(), + Reducer::InsertUniqueU256 { n, data } => { + __sats::bsatn::to_vec(&insert_unique_u_256_reducer::InsertUniqueU256Args { + n: n.clone(), data: data.clone(), }) } - Reducer::DeleteUniqueIdentity { i } => { - __sats::bsatn::to_vec(&delete_unique_identity_reducer::DeleteUniqueIdentityArgs { i: i.clone() }) - } - Reducer::InsertUniqueConnectionId { a, data } => { - __sats::bsatn::to_vec(&insert_unique_connection_id_reducer::InsertUniqueConnectionIdArgs { - a: a.clone(), + Reducer::InsertUniqueU32 { n, data } => { + __sats::bsatn::to_vec(&insert_unique_u_32_reducer::InsertUniqueU32Args { + n: n.clone(), data: data.clone(), }) } - Reducer::UpdateUniqueConnectionId { a, data } => { - __sats::bsatn::to_vec(&update_unique_connection_id_reducer::UpdateUniqueConnectionIdArgs { - a: a.clone(), + Reducer::InsertUniqueU32UpdatePkU32 { n, d_unique, d_pk } => __sats::bsatn::to_vec( + &insert_unique_u_32_update_pk_u_32_reducer::InsertUniqueU32UpdatePkU32Args { + n: n.clone(), + d_unique: d_unique.clone(), + d_pk: d_pk.clone(), + }, + ), + Reducer::InsertUniqueU64 { n, data } => { + __sats::bsatn::to_vec(&insert_unique_u_64_reducer::InsertUniqueU64Args { + n: n.clone(), data: data.clone(), }) } - Reducer::DeleteUniqueConnectionId { a } => { - __sats::bsatn::to_vec(&delete_unique_connection_id_reducer::DeleteUniqueConnectionIdArgs { - a: a.clone(), + Reducer::InsertUniqueU8 { n, data } => { + __sats::bsatn::to_vec(&insert_unique_u_8_reducer::InsertUniqueU8Args { + n: n.clone(), + data: data.clone(), }) } Reducer::InsertUniqueUuid { u, data } => { @@ -2698,344 +2358,288 @@ impl __sdk::Reducer for Reducer { data: data.clone(), }) } - Reducer::UpdateUniqueUuid { u, data } => { - __sats::bsatn::to_vec(&update_unique_uuid_reducer::UpdateUniqueUuidArgs { - u: u.clone(), - data: data.clone(), - }) - } - Reducer::DeleteUniqueUuid { u } => { - __sats::bsatn::to_vec(&delete_unique_uuid_reducer::DeleteUniqueUuidArgs { u: u.clone() }) - } - Reducer::InsertPkU8 { n, data } => __sats::bsatn::to_vec(&insert_pk_u_8_reducer::InsertPkU8Args { - n: n.clone(), - data: data.clone(), - }), - Reducer::UpdatePkU8 { n, data } => __sats::bsatn::to_vec(&update_pk_u_8_reducer::UpdatePkU8Args { - n: n.clone(), - data: data.clone(), - }), - Reducer::DeletePkU8 { n } => __sats::bsatn::to_vec(&delete_pk_u_8_reducer::DeletePkU8Args { n: n.clone() }), - Reducer::InsertPkU16 { n, data } => __sats::bsatn::to_vec(&insert_pk_u_16_reducer::InsertPkU16Args { - n: n.clone(), - data: data.clone(), - }), - Reducer::UpdatePkU16 { n, data } => __sats::bsatn::to_vec(&update_pk_u_16_reducer::UpdatePkU16Args { - n: n.clone(), - data: data.clone(), + Reducer::InsertUser { name, identity } => __sats::bsatn::to_vec(&insert_user_reducer::InsertUserArgs { + name: name.clone(), + identity: identity.clone(), }), - Reducer::DeletePkU16 { n } => { - __sats::bsatn::to_vec(&delete_pk_u_16_reducer::DeletePkU16Args { n: n.clone() }) + Reducer::InsertVecBool { b } => { + __sats::bsatn::to_vec(&insert_vec_bool_reducer::InsertVecBoolArgs { b: b.clone() }) } - Reducer::InsertPkU32 { n, data } => __sats::bsatn::to_vec(&insert_pk_u_32_reducer::InsertPkU32Args { - n: n.clone(), - data: data.clone(), - }), - Reducer::UpdatePkU32 { n, data } => __sats::bsatn::to_vec(&update_pk_u_32_reducer::UpdatePkU32Args { - n: n.clone(), - data: data.clone(), - }), - Reducer::DeletePkU32 { n } => { - __sats::bsatn::to_vec(&delete_pk_u_32_reducer::DeletePkU32Args { n: n.clone() }) + Reducer::InsertVecByteStruct { s } => { + __sats::bsatn::to_vec(&insert_vec_byte_struct_reducer::InsertVecByteStructArgs { s: s.clone() }) } - Reducer::InsertPkU32Two { n, data } => { - __sats::bsatn::to_vec(&insert_pk_u_32_two_reducer::InsertPkU32TwoArgs { - n: n.clone(), - data: data.clone(), + Reducer::InsertVecConnectionId { a } => { + __sats::bsatn::to_vec(&insert_vec_connection_id_reducer::InsertVecConnectionIdArgs { a: a.clone() }) + } + Reducer::InsertVecEnumWithPayload { e } => { + __sats::bsatn::to_vec(&insert_vec_enum_with_payload_reducer::InsertVecEnumWithPayloadArgs { + e: e.clone(), }) } - Reducer::UpdatePkU32Two { n, data } => { - __sats::bsatn::to_vec(&update_pk_u_32_two_reducer::UpdatePkU32TwoArgs { - n: n.clone(), - data: data.clone(), + Reducer::InsertVecEveryPrimitiveStruct { s } => __sats::bsatn::to_vec( + &insert_vec_every_primitive_struct_reducer::InsertVecEveryPrimitiveStructArgs { s: s.clone() }, + ), + Reducer::InsertVecEveryVecStruct { s } => { + __sats::bsatn::to_vec(&insert_vec_every_vec_struct_reducer::InsertVecEveryVecStructArgs { + s: s.clone(), }) } - Reducer::DeletePkU32Two { n } => { - __sats::bsatn::to_vec(&delete_pk_u_32_two_reducer::DeletePkU32TwoArgs { n: n.clone() }) + Reducer::InsertVecF32 { f } => { + __sats::bsatn::to_vec(&insert_vec_f_32_reducer::InsertVecF32Args { f: f.clone() }) } - Reducer::InsertPkU64 { n, data } => __sats::bsatn::to_vec(&insert_pk_u_64_reducer::InsertPkU64Args { - n: n.clone(), - data: data.clone(), - }), - Reducer::UpdatePkU64 { n, data } => __sats::bsatn::to_vec(&update_pk_u_64_reducer::UpdatePkU64Args { - n: n.clone(), - data: data.clone(), - }), - Reducer::DeletePkU64 { n } => { - __sats::bsatn::to_vec(&delete_pk_u_64_reducer::DeletePkU64Args { n: n.clone() }) + Reducer::InsertVecF64 { f } => { + __sats::bsatn::to_vec(&insert_vec_f_64_reducer::InsertVecF64Args { f: f.clone() }) } - Reducer::InsertPkU128 { n, data } => __sats::bsatn::to_vec(&insert_pk_u_128_reducer::InsertPkU128Args { - n: n.clone(), - data: data.clone(), - }), - Reducer::UpdatePkU128 { n, data } => __sats::bsatn::to_vec(&update_pk_u_128_reducer::UpdatePkU128Args { - n: n.clone(), - data: data.clone(), - }), - Reducer::DeletePkU128 { n } => { - __sats::bsatn::to_vec(&delete_pk_u_128_reducer::DeletePkU128Args { n: n.clone() }) + Reducer::InsertVecI128 { n } => { + __sats::bsatn::to_vec(&insert_vec_i_128_reducer::InsertVecI128Args { n: n.clone() }) } - Reducer::InsertPkU256 { n, data } => __sats::bsatn::to_vec(&insert_pk_u_256_reducer::InsertPkU256Args { - n: n.clone(), - data: data.clone(), - }), - Reducer::UpdatePkU256 { n, data } => __sats::bsatn::to_vec(&update_pk_u_256_reducer::UpdatePkU256Args { - n: n.clone(), + Reducer::InsertVecI16 { n } => { + __sats::bsatn::to_vec(&insert_vec_i_16_reducer::InsertVecI16Args { n: n.clone() }) + } + Reducer::InsertVecI256 { n } => { + __sats::bsatn::to_vec(&insert_vec_i_256_reducer::InsertVecI256Args { n: n.clone() }) + } + Reducer::InsertVecI32 { n } => { + __sats::bsatn::to_vec(&insert_vec_i_32_reducer::InsertVecI32Args { n: n.clone() }) + } + Reducer::InsertVecI64 { n } => { + __sats::bsatn::to_vec(&insert_vec_i_64_reducer::InsertVecI64Args { n: n.clone() }) + } + Reducer::InsertVecI8 { n } => { + __sats::bsatn::to_vec(&insert_vec_i_8_reducer::InsertVecI8Args { n: n.clone() }) + } + Reducer::InsertVecIdentity { i } => { + __sats::bsatn::to_vec(&insert_vec_identity_reducer::InsertVecIdentityArgs { i: i.clone() }) + } + Reducer::InsertVecSimpleEnum { e } => { + __sats::bsatn::to_vec(&insert_vec_simple_enum_reducer::InsertVecSimpleEnumArgs { e: e.clone() }) + } + Reducer::InsertVecString { s } => { + __sats::bsatn::to_vec(&insert_vec_string_reducer::InsertVecStringArgs { s: s.clone() }) + } + Reducer::InsertVecTimestamp { t } => { + __sats::bsatn::to_vec(&insert_vec_timestamp_reducer::InsertVecTimestampArgs { t: t.clone() }) + } + Reducer::InsertVecU128 { n } => { + __sats::bsatn::to_vec(&insert_vec_u_128_reducer::InsertVecU128Args { n: n.clone() }) + } + Reducer::InsertVecU16 { n } => { + __sats::bsatn::to_vec(&insert_vec_u_16_reducer::InsertVecU16Args { n: n.clone() }) + } + Reducer::InsertVecU256 { n } => { + __sats::bsatn::to_vec(&insert_vec_u_256_reducer::InsertVecU256Args { n: n.clone() }) + } + Reducer::InsertVecU32 { n } => { + __sats::bsatn::to_vec(&insert_vec_u_32_reducer::InsertVecU32Args { n: n.clone() }) + } + Reducer::InsertVecU64 { n } => { + __sats::bsatn::to_vec(&insert_vec_u_64_reducer::InsertVecU64Args { n: n.clone() }) + } + Reducer::InsertVecU8 { n } => { + __sats::bsatn::to_vec(&insert_vec_u_8_reducer::InsertVecU8Args { n: n.clone() }) + } + Reducer::InsertVecUnitStruct { s } => { + __sats::bsatn::to_vec(&insert_vec_unit_struct_reducer::InsertVecUnitStructArgs { s: s.clone() }) + } + Reducer::InsertVecUuid { u } => { + __sats::bsatn::to_vec(&insert_vec_uuid_reducer::InsertVecUuidArgs { u: u.clone() }) + } + Reducer::NoOpSucceeds => __sats::bsatn::to_vec(&no_op_succeeds_reducer::NoOpSucceedsArgs {}), + Reducer::SendScheduledMessage { arg } => { + __sats::bsatn::to_vec(&send_scheduled_message_reducer::SendScheduledMessageArgs { arg: arg.clone() }) + } + Reducer::SortedUuidsInsert => __sats::bsatn::to_vec(&sorted_uuids_insert_reducer::SortedUuidsInsertArgs {}), + Reducer::UpdateIndexedSimpleEnum { a, b } => { + __sats::bsatn::to_vec(&update_indexed_simple_enum_reducer::UpdateIndexedSimpleEnumArgs { + a: a.clone(), + b: b.clone(), + }) + } + Reducer::UpdatePkBool { b, data } => __sats::bsatn::to_vec(&update_pk_bool_reducer::UpdatePkBoolArgs { + b: b.clone(), data: data.clone(), }), - Reducer::DeletePkU256 { n } => { - __sats::bsatn::to_vec(&delete_pk_u_256_reducer::DeletePkU256Args { n: n.clone() }) + Reducer::UpdatePkConnectionId { a, data } => { + __sats::bsatn::to_vec(&update_pk_connection_id_reducer::UpdatePkConnectionIdArgs { + a: a.clone(), + data: data.clone(), + }) } - Reducer::InsertPkI8 { n, data } => __sats::bsatn::to_vec(&insert_pk_i_8_reducer::InsertPkI8Args { + Reducer::UpdatePkI128 { n, data } => __sats::bsatn::to_vec(&update_pk_i_128_reducer::UpdatePkI128Args { n: n.clone(), data: data.clone(), }), - Reducer::UpdatePkI8 { n, data } => __sats::bsatn::to_vec(&update_pk_i_8_reducer::UpdatePkI8Args { + Reducer::UpdatePkI16 { n, data } => __sats::bsatn::to_vec(&update_pk_i_16_reducer::UpdatePkI16Args { n: n.clone(), data: data.clone(), }), - Reducer::DeletePkI8 { n } => __sats::bsatn::to_vec(&delete_pk_i_8_reducer::DeletePkI8Args { n: n.clone() }), - Reducer::InsertPkI16 { n, data } => __sats::bsatn::to_vec(&insert_pk_i_16_reducer::InsertPkI16Args { + Reducer::UpdatePkI256 { n, data } => __sats::bsatn::to_vec(&update_pk_i_256_reducer::UpdatePkI256Args { n: n.clone(), data: data.clone(), }), - Reducer::UpdatePkI16 { n, data } => __sats::bsatn::to_vec(&update_pk_i_16_reducer::UpdatePkI16Args { + Reducer::UpdatePkI32 { n, data } => __sats::bsatn::to_vec(&update_pk_i_32_reducer::UpdatePkI32Args { n: n.clone(), data: data.clone(), }), - Reducer::DeletePkI16 { n } => { - __sats::bsatn::to_vec(&delete_pk_i_16_reducer::DeletePkI16Args { n: n.clone() }) - } - Reducer::InsertPkI32 { n, data } => __sats::bsatn::to_vec(&insert_pk_i_32_reducer::InsertPkI32Args { + Reducer::UpdatePkI64 { n, data } => __sats::bsatn::to_vec(&update_pk_i_64_reducer::UpdatePkI64Args { n: n.clone(), data: data.clone(), }), - Reducer::UpdatePkI32 { n, data } => __sats::bsatn::to_vec(&update_pk_i_32_reducer::UpdatePkI32Args { + Reducer::UpdatePkI8 { n, data } => __sats::bsatn::to_vec(&update_pk_i_8_reducer::UpdatePkI8Args { n: n.clone(), data: data.clone(), }), - Reducer::DeletePkI32 { n } => { - __sats::bsatn::to_vec(&delete_pk_i_32_reducer::DeletePkI32Args { n: n.clone() }) + Reducer::UpdatePkIdentity { i, data } => { + __sats::bsatn::to_vec(&update_pk_identity_reducer::UpdatePkIdentityArgs { + i: i.clone(), + data: data.clone(), + }) + } + Reducer::UpdatePkSimpleEnum { a, data } => { + __sats::bsatn::to_vec(&update_pk_simple_enum_reducer::UpdatePkSimpleEnumArgs { + a: a.clone(), + data: data.clone(), + }) } - Reducer::InsertPkI64 { n, data } => __sats::bsatn::to_vec(&insert_pk_i_64_reducer::InsertPkI64Args { + Reducer::UpdatePkString { s, data } => { + __sats::bsatn::to_vec(&update_pk_string_reducer::UpdatePkStringArgs { + s: s.clone(), + data: data.clone(), + }) + } + Reducer::UpdatePkU128 { n, data } => __sats::bsatn::to_vec(&update_pk_u_128_reducer::UpdatePkU128Args { n: n.clone(), data: data.clone(), }), - Reducer::UpdatePkI64 { n, data } => __sats::bsatn::to_vec(&update_pk_i_64_reducer::UpdatePkI64Args { + Reducer::UpdatePkU16 { n, data } => __sats::bsatn::to_vec(&update_pk_u_16_reducer::UpdatePkU16Args { n: n.clone(), data: data.clone(), }), - Reducer::DeletePkI64 { n } => { - __sats::bsatn::to_vec(&delete_pk_i_64_reducer::DeletePkI64Args { n: n.clone() }) - } - Reducer::InsertPkI128 { n, data } => __sats::bsatn::to_vec(&insert_pk_i_128_reducer::InsertPkI128Args { + Reducer::UpdatePkU256 { n, data } => __sats::bsatn::to_vec(&update_pk_u_256_reducer::UpdatePkU256Args { n: n.clone(), data: data.clone(), }), - Reducer::UpdatePkI128 { n, data } => __sats::bsatn::to_vec(&update_pk_i_128_reducer::UpdatePkI128Args { + Reducer::UpdatePkU32 { n, data } => __sats::bsatn::to_vec(&update_pk_u_32_reducer::UpdatePkU32Args { n: n.clone(), data: data.clone(), }), - Reducer::DeletePkI128 { n } => { - __sats::bsatn::to_vec(&delete_pk_i_128_reducer::DeletePkI128Args { n: n.clone() }) + Reducer::UpdatePkU32Two { n, data } => { + __sats::bsatn::to_vec(&update_pk_u_32_two_reducer::UpdatePkU32TwoArgs { + n: n.clone(), + data: data.clone(), + }) } - Reducer::InsertPkI256 { n, data } => __sats::bsatn::to_vec(&insert_pk_i_256_reducer::InsertPkI256Args { + Reducer::UpdatePkU64 { n, data } => __sats::bsatn::to_vec(&update_pk_u_64_reducer::UpdatePkU64Args { n: n.clone(), data: data.clone(), }), - Reducer::UpdatePkI256 { n, data } => __sats::bsatn::to_vec(&update_pk_i_256_reducer::UpdatePkI256Args { + Reducer::UpdatePkU8 { n, data } => __sats::bsatn::to_vec(&update_pk_u_8_reducer::UpdatePkU8Args { n: n.clone(), data: data.clone(), }), - Reducer::DeletePkI256 { n } => { - __sats::bsatn::to_vec(&delete_pk_i_256_reducer::DeletePkI256Args { n: n.clone() }) - } - Reducer::InsertPkBool { b, data } => __sats::bsatn::to_vec(&insert_pk_bool_reducer::InsertPkBoolArgs { - b: b.clone(), - data: data.clone(), - }), - Reducer::UpdatePkBool { b, data } => __sats::bsatn::to_vec(&update_pk_bool_reducer::UpdatePkBoolArgs { - b: b.clone(), + Reducer::UpdatePkUuid { u, data } => __sats::bsatn::to_vec(&update_pk_uuid_reducer::UpdatePkUuidArgs { + u: u.clone(), data: data.clone(), }), - Reducer::DeletePkBool { b } => { - __sats::bsatn::to_vec(&delete_pk_bool_reducer::DeletePkBoolArgs { b: b.clone() }) + Reducer::UpdateUniqueBool { b, data } => { + __sats::bsatn::to_vec(&update_unique_bool_reducer::UpdateUniqueBoolArgs { + b: b.clone(), + data: data.clone(), + }) } - Reducer::InsertPkString { s, data } => { - __sats::bsatn::to_vec(&insert_pk_string_reducer::InsertPkStringArgs { - s: s.clone(), + Reducer::UpdateUniqueConnectionId { a, data } => { + __sats::bsatn::to_vec(&update_unique_connection_id_reducer::UpdateUniqueConnectionIdArgs { + a: a.clone(), data: data.clone(), }) } - Reducer::UpdatePkString { s, data } => { - __sats::bsatn::to_vec(&update_pk_string_reducer::UpdatePkStringArgs { - s: s.clone(), + Reducer::UpdateUniqueI128 { n, data } => { + __sats::bsatn::to_vec(&update_unique_i_128_reducer::UpdateUniqueI128Args { + n: n.clone(), data: data.clone(), }) } - Reducer::DeletePkString { s } => { - __sats::bsatn::to_vec(&delete_pk_string_reducer::DeletePkStringArgs { s: s.clone() }) + Reducer::UpdateUniqueI16 { n, data } => { + __sats::bsatn::to_vec(&update_unique_i_16_reducer::UpdateUniqueI16Args { + n: n.clone(), + data: data.clone(), + }) } - Reducer::InsertPkIdentity { i, data } => { - __sats::bsatn::to_vec(&insert_pk_identity_reducer::InsertPkIdentityArgs { - i: i.clone(), + Reducer::UpdateUniqueI256 { n, data } => { + __sats::bsatn::to_vec(&update_unique_i_256_reducer::UpdateUniqueI256Args { + n: n.clone(), data: data.clone(), }) } - Reducer::UpdatePkIdentity { i, data } => { - __sats::bsatn::to_vec(&update_pk_identity_reducer::UpdatePkIdentityArgs { - i: i.clone(), + Reducer::UpdateUniqueI32 { n, data } => { + __sats::bsatn::to_vec(&update_unique_i_32_reducer::UpdateUniqueI32Args { + n: n.clone(), data: data.clone(), }) } - Reducer::DeletePkIdentity { i } => { - __sats::bsatn::to_vec(&delete_pk_identity_reducer::DeletePkIdentityArgs { i: i.clone() }) + Reducer::UpdateUniqueI64 { n, data } => { + __sats::bsatn::to_vec(&update_unique_i_64_reducer::UpdateUniqueI64Args { + n: n.clone(), + data: data.clone(), + }) } - Reducer::InsertPkConnectionId { a, data } => { - __sats::bsatn::to_vec(&insert_pk_connection_id_reducer::InsertPkConnectionIdArgs { - a: a.clone(), + Reducer::UpdateUniqueI8 { n, data } => { + __sats::bsatn::to_vec(&update_unique_i_8_reducer::UpdateUniqueI8Args { + n: n.clone(), data: data.clone(), }) } - Reducer::UpdatePkConnectionId { a, data } => { - __sats::bsatn::to_vec(&update_pk_connection_id_reducer::UpdatePkConnectionIdArgs { - a: a.clone(), + Reducer::UpdateUniqueIdentity { i, data } => { + __sats::bsatn::to_vec(&update_unique_identity_reducer::UpdateUniqueIdentityArgs { + i: i.clone(), data: data.clone(), }) } - Reducer::DeletePkConnectionId { a } => { - __sats::bsatn::to_vec(&delete_pk_connection_id_reducer::DeletePkConnectionIdArgs { a: a.clone() }) + Reducer::UpdateUniqueString { s, data } => { + __sats::bsatn::to_vec(&update_unique_string_reducer::UpdateUniqueStringArgs { + s: s.clone(), + data: data.clone(), + }) } - Reducer::InsertPkUuid { u, data } => __sats::bsatn::to_vec(&insert_pk_uuid_reducer::InsertPkUuidArgs { - u: u.clone(), - data: data.clone(), - }), - Reducer::UpdatePkUuid { u, data } => __sats::bsatn::to_vec(&update_pk_uuid_reducer::UpdatePkUuidArgs { - u: u.clone(), - data: data.clone(), - }), - Reducer::DeletePkUuid { u } => { - __sats::bsatn::to_vec(&delete_pk_uuid_reducer::DeletePkUuidArgs { u: u.clone() }) + Reducer::UpdateUniqueU128 { n, data } => { + __sats::bsatn::to_vec(&update_unique_u_128_reducer::UpdateUniqueU128Args { + n: n.clone(), + data: data.clone(), + }) } - Reducer::InsertPkSimpleEnum { a, data } => { - __sats::bsatn::to_vec(&insert_pk_simple_enum_reducer::InsertPkSimpleEnumArgs { - a: a.clone(), + Reducer::UpdateUniqueU16 { n, data } => { + __sats::bsatn::to_vec(&update_unique_u_16_reducer::UpdateUniqueU16Args { + n: n.clone(), data: data.clone(), }) } - Reducer::InsertLargeTable { - a, - b, - c, - d, - e, - f, - g, - h, - i, - j, - k, - l, - m, - n, - o, - p, - q, - r, - s, - t, - u, - v, - } => __sats::bsatn::to_vec(&insert_large_table_reducer::InsertLargeTableArgs { - a: a.clone(), - b: b.clone(), - c: c.clone(), - d: d.clone(), - e: e.clone(), - f: f.clone(), - g: g.clone(), - h: h.clone(), - i: i.clone(), - j: j.clone(), - k: k.clone(), - l: l.clone(), - m: m.clone(), - n: n.clone(), - o: o.clone(), - p: p.clone(), - q: q.clone(), - r: r.clone(), - s: s.clone(), - t: t.clone(), - u: u.clone(), - v: v.clone(), - }), - Reducer::DeleteLargeTable { - a, - b, - c, - d, - e, - f, - g, - h, - i, - j, - k, - l, - m, - n, - o, - p, - q, - r, - s, - t, - u, - v, - } => __sats::bsatn::to_vec(&delete_large_table_reducer::DeleteLargeTableArgs { - a: a.clone(), - b: b.clone(), - c: c.clone(), - d: d.clone(), - e: e.clone(), - f: f.clone(), - g: g.clone(), - h: h.clone(), - i: i.clone(), - j: j.clone(), - k: k.clone(), - l: l.clone(), - m: m.clone(), - n: n.clone(), - o: o.clone(), - p: p.clone(), - q: q.clone(), - r: r.clone(), - s: s.clone(), - t: t.clone(), - u: u.clone(), - v: v.clone(), - }), - Reducer::InsertTableHoldsTable { a, b } => { - __sats::bsatn::to_vec(&insert_table_holds_table_reducer::InsertTableHoldsTableArgs { - a: a.clone(), - b: b.clone(), + Reducer::UpdateUniqueU256 { n, data } => { + __sats::bsatn::to_vec(&update_unique_u_256_reducer::UpdateUniqueU256Args { + n: n.clone(), + data: data.clone(), }) } - Reducer::SendScheduledMessage { arg } => { - __sats::bsatn::to_vec(&send_scheduled_message_reducer::SendScheduledMessageArgs { arg: arg.clone() }) + Reducer::UpdateUniqueU32 { n, data } => { + __sats::bsatn::to_vec(&update_unique_u_32_reducer::UpdateUniqueU32Args { + n: n.clone(), + data: data.clone(), + }) } - Reducer::SortedUuidsInsert => __sats::bsatn::to_vec(&sorted_uuids_insert_reducer::SortedUuidsInsertArgs {}), - Reducer::UpdateIndexedSimpleEnum { a, b } => { - __sats::bsatn::to_vec(&update_indexed_simple_enum_reducer::UpdateIndexedSimpleEnumArgs { - a: a.clone(), - b: b.clone(), + Reducer::UpdateUniqueU64 { n, data } => { + __sats::bsatn::to_vec(&update_unique_u_64_reducer::UpdateUniqueU64Args { + n: n.clone(), + data: data.clone(), }) } - Reducer::UpdatePkSimpleEnum { a, data } => { - __sats::bsatn::to_vec(&update_pk_simple_enum_reducer::UpdatePkSimpleEnumArgs { - a: a.clone(), + Reducer::UpdateUniqueU8 { n, data } => { + __sats::bsatn::to_vec(&update_unique_u_8_reducer::UpdateUniqueU8Args { + n: n.clone(), + data: data.clone(), + }) + } + Reducer::UpdateUniqueUuid { u, data } => { + __sats::bsatn::to_vec(&update_unique_uuid_reducer::UpdateUniqueUuidArgs { + u: u.clone(), data: data.clone(), }) } diff --git a/sdks/rust/tests/test-client/src/module_bindings/no_op_succeeds_type.rs b/sdks/rust/tests/test-client/src/module_bindings/no_op_succeeds_type.rs deleted file mode 100644 index 4e9aed45e8c..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/no_op_succeeds_type.rs +++ /dev/null @@ -1,13 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct NoOpSucceeds {} - -impl __sdk::InModule for NoOpSucceeds { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/one_f_32_table.rs b/sdks/rust/tests/test-client/src/module_bindings/one_f_32_table.rs index 732f8dfa303..e083d39f730 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/one_f_32_table.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/one_f_32_table.rs @@ -96,14 +96,14 @@ pub(super) fn parse_table_update(raw_updates: __ws::v2::TableUpdate) -> __sdk::R /// Extension trait for query builder access to the table `OneF32`. /// /// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait one_f32QueryTableAccess { +pub trait one_f_32QueryTableAccess { #[allow(non_snake_case)] /// Get a query builder for the table `OneF32`. - fn one_f32(&self) -> __sdk::__query_builder::Table; + fn one_f_32(&self) -> __sdk::__query_builder::Table; } -impl one_f32QueryTableAccess for __sdk::QueryTableAccessor { - fn one_f32(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("one_f32") +impl one_f_32QueryTableAccess for __sdk::QueryTableAccessor { + fn one_f_32(&self) -> __sdk::__query_builder::Table { + __sdk::__query_builder::Table::new("one_f_32") } } diff --git a/sdks/rust/tests/test-client/src/module_bindings/one_f_64_table.rs b/sdks/rust/tests/test-client/src/module_bindings/one_f_64_table.rs index b1af350ac5a..7a3f5de637b 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/one_f_64_table.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/one_f_64_table.rs @@ -96,14 +96,14 @@ pub(super) fn parse_table_update(raw_updates: __ws::v2::TableUpdate) -> __sdk::R /// Extension trait for query builder access to the table `OneF64`. /// /// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait one_f64QueryTableAccess { +pub trait one_f_64QueryTableAccess { #[allow(non_snake_case)] /// Get a query builder for the table `OneF64`. - fn one_f64(&self) -> __sdk::__query_builder::Table; + fn one_f_64(&self) -> __sdk::__query_builder::Table; } -impl one_f64QueryTableAccess for __sdk::QueryTableAccessor { - fn one_f64(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("one_f64") +impl one_f_64QueryTableAccess for __sdk::QueryTableAccessor { + fn one_f_64(&self) -> __sdk::__query_builder::Table { + __sdk::__query_builder::Table::new("one_f_64") } } diff --git a/sdks/rust/tests/test-client/src/module_bindings/one_i_128_table.rs b/sdks/rust/tests/test-client/src/module_bindings/one_i_128_table.rs index 827ae0d29eb..ebff49e97a1 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/one_i_128_table.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/one_i_128_table.rs @@ -96,14 +96,14 @@ pub(super) fn parse_table_update(raw_updates: __ws::v2::TableUpdate) -> __sdk::R /// Extension trait for query builder access to the table `OneI128`. /// /// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait one_i128QueryTableAccess { +pub trait one_i_128QueryTableAccess { #[allow(non_snake_case)] /// Get a query builder for the table `OneI128`. - fn one_i128(&self) -> __sdk::__query_builder::Table; + fn one_i_128(&self) -> __sdk::__query_builder::Table; } -impl one_i128QueryTableAccess for __sdk::QueryTableAccessor { - fn one_i128(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("one_i128") +impl one_i_128QueryTableAccess for __sdk::QueryTableAccessor { + fn one_i_128(&self) -> __sdk::__query_builder::Table { + __sdk::__query_builder::Table::new("one_i_128") } } diff --git a/sdks/rust/tests/test-client/src/module_bindings/one_i_16_table.rs b/sdks/rust/tests/test-client/src/module_bindings/one_i_16_table.rs index 3179260529e..6a0ca13292b 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/one_i_16_table.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/one_i_16_table.rs @@ -96,14 +96,14 @@ pub(super) fn parse_table_update(raw_updates: __ws::v2::TableUpdate) -> __sdk::R /// Extension trait for query builder access to the table `OneI16`. /// /// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait one_i16QueryTableAccess { +pub trait one_i_16QueryTableAccess { #[allow(non_snake_case)] /// Get a query builder for the table `OneI16`. - fn one_i16(&self) -> __sdk::__query_builder::Table; + fn one_i_16(&self) -> __sdk::__query_builder::Table; } -impl one_i16QueryTableAccess for __sdk::QueryTableAccessor { - fn one_i16(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("one_i16") +impl one_i_16QueryTableAccess for __sdk::QueryTableAccessor { + fn one_i_16(&self) -> __sdk::__query_builder::Table { + __sdk::__query_builder::Table::new("one_i_16") } } diff --git a/sdks/rust/tests/test-client/src/module_bindings/one_i_256_table.rs b/sdks/rust/tests/test-client/src/module_bindings/one_i_256_table.rs index eb67148af64..1c8cf51fa96 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/one_i_256_table.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/one_i_256_table.rs @@ -96,14 +96,14 @@ pub(super) fn parse_table_update(raw_updates: __ws::v2::TableUpdate) -> __sdk::R /// Extension trait for query builder access to the table `OneI256`. /// /// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait one_i256QueryTableAccess { +pub trait one_i_256QueryTableAccess { #[allow(non_snake_case)] /// Get a query builder for the table `OneI256`. - fn one_i256(&self) -> __sdk::__query_builder::Table; + fn one_i_256(&self) -> __sdk::__query_builder::Table; } -impl one_i256QueryTableAccess for __sdk::QueryTableAccessor { - fn one_i256(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("one_i256") +impl one_i_256QueryTableAccess for __sdk::QueryTableAccessor { + fn one_i_256(&self) -> __sdk::__query_builder::Table { + __sdk::__query_builder::Table::new("one_i_256") } } diff --git a/sdks/rust/tests/test-client/src/module_bindings/one_i_32_table.rs b/sdks/rust/tests/test-client/src/module_bindings/one_i_32_table.rs index c39ff0b3d4b..22343727a10 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/one_i_32_table.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/one_i_32_table.rs @@ -96,14 +96,14 @@ pub(super) fn parse_table_update(raw_updates: __ws::v2::TableUpdate) -> __sdk::R /// Extension trait for query builder access to the table `OneI32`. /// /// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait one_i32QueryTableAccess { +pub trait one_i_32QueryTableAccess { #[allow(non_snake_case)] /// Get a query builder for the table `OneI32`. - fn one_i32(&self) -> __sdk::__query_builder::Table; + fn one_i_32(&self) -> __sdk::__query_builder::Table; } -impl one_i32QueryTableAccess for __sdk::QueryTableAccessor { - fn one_i32(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("one_i32") +impl one_i_32QueryTableAccess for __sdk::QueryTableAccessor { + fn one_i_32(&self) -> __sdk::__query_builder::Table { + __sdk::__query_builder::Table::new("one_i_32") } } diff --git a/sdks/rust/tests/test-client/src/module_bindings/one_i_64_table.rs b/sdks/rust/tests/test-client/src/module_bindings/one_i_64_table.rs index 8aa83bcc852..f9c64a63f43 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/one_i_64_table.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/one_i_64_table.rs @@ -96,14 +96,14 @@ pub(super) fn parse_table_update(raw_updates: __ws::v2::TableUpdate) -> __sdk::R /// Extension trait for query builder access to the table `OneI64`. /// /// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait one_i64QueryTableAccess { +pub trait one_i_64QueryTableAccess { #[allow(non_snake_case)] /// Get a query builder for the table `OneI64`. - fn one_i64(&self) -> __sdk::__query_builder::Table; + fn one_i_64(&self) -> __sdk::__query_builder::Table; } -impl one_i64QueryTableAccess for __sdk::QueryTableAccessor { - fn one_i64(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("one_i64") +impl one_i_64QueryTableAccess for __sdk::QueryTableAccessor { + fn one_i_64(&self) -> __sdk::__query_builder::Table { + __sdk::__query_builder::Table::new("one_i_64") } } diff --git a/sdks/rust/tests/test-client/src/module_bindings/one_i_8_table.rs b/sdks/rust/tests/test-client/src/module_bindings/one_i_8_table.rs index 2be21340101..1f982cf650d 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/one_i_8_table.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/one_i_8_table.rs @@ -96,14 +96,14 @@ pub(super) fn parse_table_update(raw_updates: __ws::v2::TableUpdate) -> __sdk::R /// Extension trait for query builder access to the table `OneI8`. /// /// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait one_i8QueryTableAccess { +pub trait one_i_8QueryTableAccess { #[allow(non_snake_case)] /// Get a query builder for the table `OneI8`. - fn one_i8(&self) -> __sdk::__query_builder::Table; + fn one_i_8(&self) -> __sdk::__query_builder::Table; } -impl one_i8QueryTableAccess for __sdk::QueryTableAccessor { - fn one_i8(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("one_i8") +impl one_i_8QueryTableAccess for __sdk::QueryTableAccessor { + fn one_i_8(&self) -> __sdk::__query_builder::Table { + __sdk::__query_builder::Table::new("one_i_8") } } diff --git a/sdks/rust/tests/test-client/src/module_bindings/one_u_128_table.rs b/sdks/rust/tests/test-client/src/module_bindings/one_u_128_table.rs index f283b5c9abb..c6c3b8405a4 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/one_u_128_table.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/one_u_128_table.rs @@ -96,14 +96,14 @@ pub(super) fn parse_table_update(raw_updates: __ws::v2::TableUpdate) -> __sdk::R /// Extension trait for query builder access to the table `OneU128`. /// /// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait one_u128QueryTableAccess { +pub trait one_u_128QueryTableAccess { #[allow(non_snake_case)] /// Get a query builder for the table `OneU128`. - fn one_u128(&self) -> __sdk::__query_builder::Table; + fn one_u_128(&self) -> __sdk::__query_builder::Table; } -impl one_u128QueryTableAccess for __sdk::QueryTableAccessor { - fn one_u128(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("one_u128") +impl one_u_128QueryTableAccess for __sdk::QueryTableAccessor { + fn one_u_128(&self) -> __sdk::__query_builder::Table { + __sdk::__query_builder::Table::new("one_u_128") } } diff --git a/sdks/rust/tests/test-client/src/module_bindings/one_u_16_table.rs b/sdks/rust/tests/test-client/src/module_bindings/one_u_16_table.rs index 9b648e25374..73a291c8cea 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/one_u_16_table.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/one_u_16_table.rs @@ -96,14 +96,14 @@ pub(super) fn parse_table_update(raw_updates: __ws::v2::TableUpdate) -> __sdk::R /// Extension trait for query builder access to the table `OneU16`. /// /// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait one_u16QueryTableAccess { +pub trait one_u_16QueryTableAccess { #[allow(non_snake_case)] /// Get a query builder for the table `OneU16`. - fn one_u16(&self) -> __sdk::__query_builder::Table; + fn one_u_16(&self) -> __sdk::__query_builder::Table; } -impl one_u16QueryTableAccess for __sdk::QueryTableAccessor { - fn one_u16(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("one_u16") +impl one_u_16QueryTableAccess for __sdk::QueryTableAccessor { + fn one_u_16(&self) -> __sdk::__query_builder::Table { + __sdk::__query_builder::Table::new("one_u_16") } } diff --git a/sdks/rust/tests/test-client/src/module_bindings/one_u_256_table.rs b/sdks/rust/tests/test-client/src/module_bindings/one_u_256_table.rs index b348be864a9..e5c07561c26 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/one_u_256_table.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/one_u_256_table.rs @@ -96,14 +96,14 @@ pub(super) fn parse_table_update(raw_updates: __ws::v2::TableUpdate) -> __sdk::R /// Extension trait for query builder access to the table `OneU256`. /// /// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait one_u256QueryTableAccess { +pub trait one_u_256QueryTableAccess { #[allow(non_snake_case)] /// Get a query builder for the table `OneU256`. - fn one_u256(&self) -> __sdk::__query_builder::Table; + fn one_u_256(&self) -> __sdk::__query_builder::Table; } -impl one_u256QueryTableAccess for __sdk::QueryTableAccessor { - fn one_u256(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("one_u256") +impl one_u_256QueryTableAccess for __sdk::QueryTableAccessor { + fn one_u_256(&self) -> __sdk::__query_builder::Table { + __sdk::__query_builder::Table::new("one_u_256") } } diff --git a/sdks/rust/tests/test-client/src/module_bindings/one_u_32_table.rs b/sdks/rust/tests/test-client/src/module_bindings/one_u_32_table.rs index 348cefd8b6f..c818a74eace 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/one_u_32_table.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/one_u_32_table.rs @@ -96,14 +96,14 @@ pub(super) fn parse_table_update(raw_updates: __ws::v2::TableUpdate) -> __sdk::R /// Extension trait for query builder access to the table `OneU32`. /// /// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait one_u32QueryTableAccess { +pub trait one_u_32QueryTableAccess { #[allow(non_snake_case)] /// Get a query builder for the table `OneU32`. - fn one_u32(&self) -> __sdk::__query_builder::Table; + fn one_u_32(&self) -> __sdk::__query_builder::Table; } -impl one_u32QueryTableAccess for __sdk::QueryTableAccessor { - fn one_u32(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("one_u32") +impl one_u_32QueryTableAccess for __sdk::QueryTableAccessor { + fn one_u_32(&self) -> __sdk::__query_builder::Table { + __sdk::__query_builder::Table::new("one_u_32") } } diff --git a/sdks/rust/tests/test-client/src/module_bindings/one_u_64_table.rs b/sdks/rust/tests/test-client/src/module_bindings/one_u_64_table.rs index 4b3cb387e2c..1addfb72311 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/one_u_64_table.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/one_u_64_table.rs @@ -96,14 +96,14 @@ pub(super) fn parse_table_update(raw_updates: __ws::v2::TableUpdate) -> __sdk::R /// Extension trait for query builder access to the table `OneU64`. /// /// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait one_u64QueryTableAccess { +pub trait one_u_64QueryTableAccess { #[allow(non_snake_case)] /// Get a query builder for the table `OneU64`. - fn one_u64(&self) -> __sdk::__query_builder::Table; + fn one_u_64(&self) -> __sdk::__query_builder::Table; } -impl one_u64QueryTableAccess for __sdk::QueryTableAccessor { - fn one_u64(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("one_u64") +impl one_u_64QueryTableAccess for __sdk::QueryTableAccessor { + fn one_u_64(&self) -> __sdk::__query_builder::Table { + __sdk::__query_builder::Table::new("one_u_64") } } diff --git a/sdks/rust/tests/test-client/src/module_bindings/one_u_8_table.rs b/sdks/rust/tests/test-client/src/module_bindings/one_u_8_table.rs index 7b2f28f8d15..4ea390ae321 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/one_u_8_table.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/one_u_8_table.rs @@ -96,14 +96,14 @@ pub(super) fn parse_table_update(raw_updates: __ws::v2::TableUpdate) -> __sdk::R /// Extension trait for query builder access to the table `OneU8`. /// /// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait one_u8QueryTableAccess { +pub trait one_u_8QueryTableAccess { #[allow(non_snake_case)] /// Get a query builder for the table `OneU8`. - fn one_u8(&self) -> __sdk::__query_builder::Table; + fn one_u_8(&self) -> __sdk::__query_builder::Table; } -impl one_u8QueryTableAccess for __sdk::QueryTableAccessor { - fn one_u8(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("one_u8") +impl one_u_8QueryTableAccess for __sdk::QueryTableAccessor { + fn one_u_8(&self) -> __sdk::__query_builder::Table { + __sdk::__query_builder::Table::new("one_u_8") } } diff --git a/sdks/rust/tests/test-client/src/module_bindings/option_i_32_table.rs b/sdks/rust/tests/test-client/src/module_bindings/option_i_32_table.rs index 671fc75205e..b23a358174f 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/option_i_32_table.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/option_i_32_table.rs @@ -96,14 +96,14 @@ pub(super) fn parse_table_update(raw_updates: __ws::v2::TableUpdate) -> __sdk::R /// Extension trait for query builder access to the table `OptionI32`. /// /// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait option_i32QueryTableAccess { +pub trait option_i_32QueryTableAccess { #[allow(non_snake_case)] /// Get a query builder for the table `OptionI32`. - fn option_i32(&self) -> __sdk::__query_builder::Table; + fn option_i_32(&self) -> __sdk::__query_builder::Table; } -impl option_i32QueryTableAccess for __sdk::QueryTableAccessor { - fn option_i32(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("option_i32") +impl option_i_32QueryTableAccess for __sdk::QueryTableAccessor { + fn option_i_32(&self) -> __sdk::__query_builder::Table { + __sdk::__query_builder::Table::new("option_i_32") } } diff --git a/sdks/rust/tests/test-client/src/module_bindings/option_vec_option_i_32_table.rs b/sdks/rust/tests/test-client/src/module_bindings/option_vec_option_i_32_table.rs index c55d48271f6..bb42948ded7 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/option_vec_option_i_32_table.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/option_vec_option_i_32_table.rs @@ -98,14 +98,14 @@ pub(super) fn parse_table_update( /// Extension trait for query builder access to the table `OptionVecOptionI32`. /// /// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait option_vec_option_i32QueryTableAccess { +pub trait option_vec_option_i_32QueryTableAccess { #[allow(non_snake_case)] /// Get a query builder for the table `OptionVecOptionI32`. - fn option_vec_option_i32(&self) -> __sdk::__query_builder::Table; + fn option_vec_option_i_32(&self) -> __sdk::__query_builder::Table; } -impl option_vec_option_i32QueryTableAccess for __sdk::QueryTableAccessor { - fn option_vec_option_i32(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("option_vec_option_i32") +impl option_vec_option_i_32QueryTableAccess for __sdk::QueryTableAccessor { + fn option_vec_option_i_32(&self) -> __sdk::__query_builder::Table { + __sdk::__query_builder::Table::new("option_vec_option_i_32") } } diff --git a/sdks/rust/tests/test-client/src/module_bindings/pk_i_128_table.rs b/sdks/rust/tests/test-client/src/module_bindings/pk_i_128_table.rs index 0d1696e7795..ed52b296500 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/pk_i_128_table.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/pk_i_128_table.rs @@ -144,14 +144,14 @@ pub(super) fn parse_table_update(raw_updates: __ws::v2::TableUpdate) -> __sdk::R /// Extension trait for query builder access to the table `PkI128`. /// /// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait pk_i128QueryTableAccess { +pub trait pk_i_128QueryTableAccess { #[allow(non_snake_case)] /// Get a query builder for the table `PkI128`. - fn pk_i128(&self) -> __sdk::__query_builder::Table; + fn pk_i_128(&self) -> __sdk::__query_builder::Table; } -impl pk_i128QueryTableAccess for __sdk::QueryTableAccessor { - fn pk_i128(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("pk_i128") +impl pk_i_128QueryTableAccess for __sdk::QueryTableAccessor { + fn pk_i_128(&self) -> __sdk::__query_builder::Table { + __sdk::__query_builder::Table::new("pk_i_128") } } diff --git a/sdks/rust/tests/test-client/src/module_bindings/pk_i_16_table.rs b/sdks/rust/tests/test-client/src/module_bindings/pk_i_16_table.rs index 682feb51714..acfc4d4d4cf 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/pk_i_16_table.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/pk_i_16_table.rs @@ -144,14 +144,14 @@ pub(super) fn parse_table_update(raw_updates: __ws::v2::TableUpdate) -> __sdk::R /// Extension trait for query builder access to the table `PkI16`. /// /// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait pk_i16QueryTableAccess { +pub trait pk_i_16QueryTableAccess { #[allow(non_snake_case)] /// Get a query builder for the table `PkI16`. - fn pk_i16(&self) -> __sdk::__query_builder::Table; + fn pk_i_16(&self) -> __sdk::__query_builder::Table; } -impl pk_i16QueryTableAccess for __sdk::QueryTableAccessor { - fn pk_i16(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("pk_i16") +impl pk_i_16QueryTableAccess for __sdk::QueryTableAccessor { + fn pk_i_16(&self) -> __sdk::__query_builder::Table { + __sdk::__query_builder::Table::new("pk_i_16") } } diff --git a/sdks/rust/tests/test-client/src/module_bindings/pk_i_256_table.rs b/sdks/rust/tests/test-client/src/module_bindings/pk_i_256_table.rs index b6bac6e1e2a..9cf4d71b655 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/pk_i_256_table.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/pk_i_256_table.rs @@ -144,14 +144,14 @@ pub(super) fn parse_table_update(raw_updates: __ws::v2::TableUpdate) -> __sdk::R /// Extension trait for query builder access to the table `PkI256`. /// /// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait pk_i256QueryTableAccess { +pub trait pk_i_256QueryTableAccess { #[allow(non_snake_case)] /// Get a query builder for the table `PkI256`. - fn pk_i256(&self) -> __sdk::__query_builder::Table; + fn pk_i_256(&self) -> __sdk::__query_builder::Table; } -impl pk_i256QueryTableAccess for __sdk::QueryTableAccessor { - fn pk_i256(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("pk_i256") +impl pk_i_256QueryTableAccess for __sdk::QueryTableAccessor { + fn pk_i_256(&self) -> __sdk::__query_builder::Table { + __sdk::__query_builder::Table::new("pk_i_256") } } diff --git a/sdks/rust/tests/test-client/src/module_bindings/pk_i_32_table.rs b/sdks/rust/tests/test-client/src/module_bindings/pk_i_32_table.rs index 13096ebb7be..01c7410cfb2 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/pk_i_32_table.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/pk_i_32_table.rs @@ -144,14 +144,14 @@ pub(super) fn parse_table_update(raw_updates: __ws::v2::TableUpdate) -> __sdk::R /// Extension trait for query builder access to the table `PkI32`. /// /// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait pk_i32QueryTableAccess { +pub trait pk_i_32QueryTableAccess { #[allow(non_snake_case)] /// Get a query builder for the table `PkI32`. - fn pk_i32(&self) -> __sdk::__query_builder::Table; + fn pk_i_32(&self) -> __sdk::__query_builder::Table; } -impl pk_i32QueryTableAccess for __sdk::QueryTableAccessor { - fn pk_i32(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("pk_i32") +impl pk_i_32QueryTableAccess for __sdk::QueryTableAccessor { + fn pk_i_32(&self) -> __sdk::__query_builder::Table { + __sdk::__query_builder::Table::new("pk_i_32") } } diff --git a/sdks/rust/tests/test-client/src/module_bindings/pk_i_64_table.rs b/sdks/rust/tests/test-client/src/module_bindings/pk_i_64_table.rs index 971a66c4301..b6c486ade37 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/pk_i_64_table.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/pk_i_64_table.rs @@ -144,14 +144,14 @@ pub(super) fn parse_table_update(raw_updates: __ws::v2::TableUpdate) -> __sdk::R /// Extension trait for query builder access to the table `PkI64`. /// /// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait pk_i64QueryTableAccess { +pub trait pk_i_64QueryTableAccess { #[allow(non_snake_case)] /// Get a query builder for the table `PkI64`. - fn pk_i64(&self) -> __sdk::__query_builder::Table; + fn pk_i_64(&self) -> __sdk::__query_builder::Table; } -impl pk_i64QueryTableAccess for __sdk::QueryTableAccessor { - fn pk_i64(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("pk_i64") +impl pk_i_64QueryTableAccess for __sdk::QueryTableAccessor { + fn pk_i_64(&self) -> __sdk::__query_builder::Table { + __sdk::__query_builder::Table::new("pk_i_64") } } diff --git a/sdks/rust/tests/test-client/src/module_bindings/pk_i_8_table.rs b/sdks/rust/tests/test-client/src/module_bindings/pk_i_8_table.rs index e00daec88d8..010b1b45793 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/pk_i_8_table.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/pk_i_8_table.rs @@ -144,14 +144,14 @@ pub(super) fn parse_table_update(raw_updates: __ws::v2::TableUpdate) -> __sdk::R /// Extension trait for query builder access to the table `PkI8`. /// /// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait pk_i8QueryTableAccess { +pub trait pk_i_8QueryTableAccess { #[allow(non_snake_case)] /// Get a query builder for the table `PkI8`. - fn pk_i8(&self) -> __sdk::__query_builder::Table; + fn pk_i_8(&self) -> __sdk::__query_builder::Table; } -impl pk_i8QueryTableAccess for __sdk::QueryTableAccessor { - fn pk_i8(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("pk_i8") +impl pk_i_8QueryTableAccess for __sdk::QueryTableAccessor { + fn pk_i_8(&self) -> __sdk::__query_builder::Table { + __sdk::__query_builder::Table::new("pk_i_8") } } diff --git a/sdks/rust/tests/test-client/src/module_bindings/pk_u_128_table.rs b/sdks/rust/tests/test-client/src/module_bindings/pk_u_128_table.rs index 129e74ffad0..4ef0969e695 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/pk_u_128_table.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/pk_u_128_table.rs @@ -144,14 +144,14 @@ pub(super) fn parse_table_update(raw_updates: __ws::v2::TableUpdate) -> __sdk::R /// Extension trait for query builder access to the table `PkU128`. /// /// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait pk_u128QueryTableAccess { +pub trait pk_u_128QueryTableAccess { #[allow(non_snake_case)] /// Get a query builder for the table `PkU128`. - fn pk_u128(&self) -> __sdk::__query_builder::Table; + fn pk_u_128(&self) -> __sdk::__query_builder::Table; } -impl pk_u128QueryTableAccess for __sdk::QueryTableAccessor { - fn pk_u128(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("pk_u128") +impl pk_u_128QueryTableAccess for __sdk::QueryTableAccessor { + fn pk_u_128(&self) -> __sdk::__query_builder::Table { + __sdk::__query_builder::Table::new("pk_u_128") } } diff --git a/sdks/rust/tests/test-client/src/module_bindings/pk_u_16_table.rs b/sdks/rust/tests/test-client/src/module_bindings/pk_u_16_table.rs index 03181f582db..136479f3749 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/pk_u_16_table.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/pk_u_16_table.rs @@ -144,14 +144,14 @@ pub(super) fn parse_table_update(raw_updates: __ws::v2::TableUpdate) -> __sdk::R /// Extension trait for query builder access to the table `PkU16`. /// /// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait pk_u16QueryTableAccess { +pub trait pk_u_16QueryTableAccess { #[allow(non_snake_case)] /// Get a query builder for the table `PkU16`. - fn pk_u16(&self) -> __sdk::__query_builder::Table; + fn pk_u_16(&self) -> __sdk::__query_builder::Table; } -impl pk_u16QueryTableAccess for __sdk::QueryTableAccessor { - fn pk_u16(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("pk_u16") +impl pk_u_16QueryTableAccess for __sdk::QueryTableAccessor { + fn pk_u_16(&self) -> __sdk::__query_builder::Table { + __sdk::__query_builder::Table::new("pk_u_16") } } diff --git a/sdks/rust/tests/test-client/src/module_bindings/pk_u_256_table.rs b/sdks/rust/tests/test-client/src/module_bindings/pk_u_256_table.rs index 659bb9a62ba..19b6f7c59ba 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/pk_u_256_table.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/pk_u_256_table.rs @@ -144,14 +144,14 @@ pub(super) fn parse_table_update(raw_updates: __ws::v2::TableUpdate) -> __sdk::R /// Extension trait for query builder access to the table `PkU256`. /// /// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait pk_u256QueryTableAccess { +pub trait pk_u_256QueryTableAccess { #[allow(non_snake_case)] /// Get a query builder for the table `PkU256`. - fn pk_u256(&self) -> __sdk::__query_builder::Table; + fn pk_u_256(&self) -> __sdk::__query_builder::Table; } -impl pk_u256QueryTableAccess for __sdk::QueryTableAccessor { - fn pk_u256(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("pk_u256") +impl pk_u_256QueryTableAccess for __sdk::QueryTableAccessor { + fn pk_u_256(&self) -> __sdk::__query_builder::Table { + __sdk::__query_builder::Table::new("pk_u_256") } } diff --git a/sdks/rust/tests/test-client/src/module_bindings/pk_u_32_table.rs b/sdks/rust/tests/test-client/src/module_bindings/pk_u_32_table.rs index fd9b28b8211..670ccd0ff52 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/pk_u_32_table.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/pk_u_32_table.rs @@ -144,14 +144,14 @@ pub(super) fn parse_table_update(raw_updates: __ws::v2::TableUpdate) -> __sdk::R /// Extension trait for query builder access to the table `PkU32`. /// /// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait pk_u32QueryTableAccess { +pub trait pk_u_32QueryTableAccess { #[allow(non_snake_case)] /// Get a query builder for the table `PkU32`. - fn pk_u32(&self) -> __sdk::__query_builder::Table; + fn pk_u_32(&self) -> __sdk::__query_builder::Table; } -impl pk_u32QueryTableAccess for __sdk::QueryTableAccessor { - fn pk_u32(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("pk_u32") +impl pk_u_32QueryTableAccess for __sdk::QueryTableAccessor { + fn pk_u_32(&self) -> __sdk::__query_builder::Table { + __sdk::__query_builder::Table::new("pk_u_32") } } diff --git a/sdks/rust/tests/test-client/src/module_bindings/pk_u_32_two_table.rs b/sdks/rust/tests/test-client/src/module_bindings/pk_u_32_two_table.rs index 17582367575..176afc27be4 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/pk_u_32_two_table.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/pk_u_32_two_table.rs @@ -144,14 +144,14 @@ pub(super) fn parse_table_update(raw_updates: __ws::v2::TableUpdate) -> __sdk::R /// Extension trait for query builder access to the table `PkU32Two`. /// /// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait pk_u32_twoQueryTableAccess { +pub trait pk_u_32_twoQueryTableAccess { #[allow(non_snake_case)] /// Get a query builder for the table `PkU32Two`. - fn pk_u32_two(&self) -> __sdk::__query_builder::Table; + fn pk_u_32_two(&self) -> __sdk::__query_builder::Table; } -impl pk_u32_twoQueryTableAccess for __sdk::QueryTableAccessor { - fn pk_u32_two(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("pk_u32_two") +impl pk_u_32_twoQueryTableAccess for __sdk::QueryTableAccessor { + fn pk_u_32_two(&self) -> __sdk::__query_builder::Table { + __sdk::__query_builder::Table::new("pk_u_32_two") } } diff --git a/sdks/rust/tests/test-client/src/module_bindings/pk_u_64_table.rs b/sdks/rust/tests/test-client/src/module_bindings/pk_u_64_table.rs index 808d837bd1a..7ebda9ee9b5 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/pk_u_64_table.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/pk_u_64_table.rs @@ -144,14 +144,14 @@ pub(super) fn parse_table_update(raw_updates: __ws::v2::TableUpdate) -> __sdk::R /// Extension trait for query builder access to the table `PkU64`. /// /// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait pk_u64QueryTableAccess { +pub trait pk_u_64QueryTableAccess { #[allow(non_snake_case)] /// Get a query builder for the table `PkU64`. - fn pk_u64(&self) -> __sdk::__query_builder::Table; + fn pk_u_64(&self) -> __sdk::__query_builder::Table; } -impl pk_u64QueryTableAccess for __sdk::QueryTableAccessor { - fn pk_u64(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("pk_u64") +impl pk_u_64QueryTableAccess for __sdk::QueryTableAccessor { + fn pk_u_64(&self) -> __sdk::__query_builder::Table { + __sdk::__query_builder::Table::new("pk_u_64") } } diff --git a/sdks/rust/tests/test-client/src/module_bindings/pk_u_8_table.rs b/sdks/rust/tests/test-client/src/module_bindings/pk_u_8_table.rs index 76ef082f845..4603dc0295b 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/pk_u_8_table.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/pk_u_8_table.rs @@ -144,14 +144,14 @@ pub(super) fn parse_table_update(raw_updates: __ws::v2::TableUpdate) -> __sdk::R /// Extension trait for query builder access to the table `PkU8`. /// /// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait pk_u8QueryTableAccess { +pub trait pk_u_8QueryTableAccess { #[allow(non_snake_case)] /// Get a query builder for the table `PkU8`. - fn pk_u8(&self) -> __sdk::__query_builder::Table; + fn pk_u_8(&self) -> __sdk::__query_builder::Table; } -impl pk_u8QueryTableAccess for __sdk::QueryTableAccessor { - fn pk_u8(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("pk_u8") +impl pk_u_8QueryTableAccess for __sdk::QueryTableAccessor { + fn pk_u_8(&self) -> __sdk::__query_builder::Table { + __sdk::__query_builder::Table::new("pk_u_8") } } diff --git a/sdks/rust/tests/test-client/src/module_bindings/result_i_32_string_table.rs b/sdks/rust/tests/test-client/src/module_bindings/result_i_32_string_table.rs index 1d0af8074a5..991122618d2 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/result_i_32_string_table.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/result_i_32_string_table.rs @@ -98,14 +98,14 @@ pub(super) fn parse_table_update( /// Extension trait for query builder access to the table `ResultI32String`. /// /// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait result_i32_stringQueryTableAccess { +pub trait result_i_32_stringQueryTableAccess { #[allow(non_snake_case)] /// Get a query builder for the table `ResultI32String`. - fn result_i32_string(&self) -> __sdk::__query_builder::Table; + fn result_i_32_string(&self) -> __sdk::__query_builder::Table; } -impl result_i32_stringQueryTableAccess for __sdk::QueryTableAccessor { - fn result_i32_string(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("result_i32_string") +impl result_i_32_stringQueryTableAccess for __sdk::QueryTableAccessor { + fn result_i_32_string(&self) -> __sdk::__query_builder::Table { + __sdk::__query_builder::Table::new("result_i_32_string") } } diff --git a/sdks/rust/tests/test-client/src/module_bindings/result_simple_enum_i_32_table.rs b/sdks/rust/tests/test-client/src/module_bindings/result_simple_enum_i_32_table.rs index 539ecbc1143..b35acf45ecc 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/result_simple_enum_i_32_table.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/result_simple_enum_i_32_table.rs @@ -99,14 +99,14 @@ pub(super) fn parse_table_update( /// Extension trait for query builder access to the table `ResultSimpleEnumI32`. /// /// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait result_simple_enum_i32QueryTableAccess { +pub trait result_simple_enum_i_32QueryTableAccess { #[allow(non_snake_case)] /// Get a query builder for the table `ResultSimpleEnumI32`. - fn result_simple_enum_i32(&self) -> __sdk::__query_builder::Table; + fn result_simple_enum_i_32(&self) -> __sdk::__query_builder::Table; } -impl result_simple_enum_i32QueryTableAccess for __sdk::QueryTableAccessor { - fn result_simple_enum_i32(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("result_simple_enum_i32") +impl result_simple_enum_i_32QueryTableAccess for __sdk::QueryTableAccessor { + fn result_simple_enum_i_32(&self) -> __sdk::__query_builder::Table { + __sdk::__query_builder::Table::new("result_simple_enum_i_32") } } diff --git a/sdks/rust/tests/test-client/src/module_bindings/result_string_i_32_table.rs b/sdks/rust/tests/test-client/src/module_bindings/result_string_i_32_table.rs index a89a5748c67..5d611cd1068 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/result_string_i_32_table.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/result_string_i_32_table.rs @@ -98,14 +98,14 @@ pub(super) fn parse_table_update( /// Extension trait for query builder access to the table `ResultStringI32`. /// /// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait result_string_i32QueryTableAccess { +pub trait result_string_i_32QueryTableAccess { #[allow(non_snake_case)] /// Get a query builder for the table `ResultStringI32`. - fn result_string_i32(&self) -> __sdk::__query_builder::Table; + fn result_string_i_32(&self) -> __sdk::__query_builder::Table; } -impl result_string_i32QueryTableAccess for __sdk::QueryTableAccessor { - fn result_string_i32(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("result_string_i32") +impl result_string_i_32QueryTableAccess for __sdk::QueryTableAccessor { + fn result_string_i_32(&self) -> __sdk::__query_builder::Table { + __sdk::__query_builder::Table::new("result_string_i_32") } } diff --git a/sdks/rust/tests/test-client/src/module_bindings/result_vec_i_32_string_table.rs b/sdks/rust/tests/test-client/src/module_bindings/result_vec_i_32_string_table.rs index 947a9959da4..afd2fea744b 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/result_vec_i_32_string_table.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/result_vec_i_32_string_table.rs @@ -98,14 +98,14 @@ pub(super) fn parse_table_update( /// Extension trait for query builder access to the table `ResultVecI32String`. /// /// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait result_vec_i32_stringQueryTableAccess { +pub trait result_vec_i_32_stringQueryTableAccess { #[allow(non_snake_case)] /// Get a query builder for the table `ResultVecI32String`. - fn result_vec_i32_string(&self) -> __sdk::__query_builder::Table; + fn result_vec_i_32_string(&self) -> __sdk::__query_builder::Table; } -impl result_vec_i32_stringQueryTableAccess for __sdk::QueryTableAccessor { - fn result_vec_i32_string(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("result_vec_i32_string") +impl result_vec_i_32_stringQueryTableAccess for __sdk::QueryTableAccessor { + fn result_vec_i_32_string(&self) -> __sdk::__query_builder::Table { + __sdk::__query_builder::Table::new("result_vec_i_32_string") } } diff --git a/sdks/rust/tests/test-client/src/module_bindings/scheduled_table_table.rs b/sdks/rust/tests/test-client/src/module_bindings/scheduled_table_table.rs index 931e106b2b4..873aed85c1c 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/scheduled_table_table.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/scheduled_table_table.rs @@ -146,14 +146,14 @@ pub(super) fn parse_table_update( /// Extension trait for query builder access to the table `ScheduledTable`. /// /// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait scheduledTableQueryTableAccess { +pub trait scheduled_tableQueryTableAccess { #[allow(non_snake_case)] /// Get a query builder for the table `ScheduledTable`. - fn scheduledTable(&self) -> __sdk::__query_builder::Table; + fn scheduled_table(&self) -> __sdk::__query_builder::Table; } -impl scheduledTableQueryTableAccess for __sdk::QueryTableAccessor { - fn scheduledTable(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("scheduledTable") +impl scheduled_tableQueryTableAccess for __sdk::QueryTableAccessor { + fn scheduled_table(&self) -> __sdk::__query_builder::Table { + __sdk::__query_builder::Table::new("scheduled_table") } } diff --git a/sdks/rust/tests/test-client/src/module_bindings/send_scheduled_message_type.rs b/sdks/rust/tests/test-client/src/module_bindings/send_scheduled_message_type.rs deleted file mode 100644 index 9a9b584f980..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/send_scheduled_message_type.rs +++ /dev/null @@ -1,17 +0,0 @@ -// 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, __lib, __sats, __ws}; - -use super::scheduled_table_type::ScheduledTable; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct SendScheduledMessage { - pub arg: ScheduledTable, -} - -impl __sdk::InModule for SendScheduledMessage { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/sorted_uuids_insert_type.rs b/sdks/rust/tests/test-client/src/module_bindings/sorted_uuids_insert_type.rs deleted file mode 100644 index f0fb06ace58..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/sorted_uuids_insert_type.rs +++ /dev/null @@ -1,13 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct SortedUuidsInsert {} - -impl __sdk::InModule for SortedUuidsInsert { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/unique_i_128_table.rs b/sdks/rust/tests/test-client/src/module_bindings/unique_i_128_table.rs index d522e7ca130..8282e5cbccd 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/unique_i_128_table.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/unique_i_128_table.rs @@ -127,14 +127,14 @@ pub(super) fn parse_table_update(raw_updates: __ws::v2::TableUpdate) -> __sdk::R /// Extension trait for query builder access to the table `UniqueI128`. /// /// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait unique_i128QueryTableAccess { +pub trait unique_i_128QueryTableAccess { #[allow(non_snake_case)] /// Get a query builder for the table `UniqueI128`. - fn unique_i128(&self) -> __sdk::__query_builder::Table; + fn unique_i_128(&self) -> __sdk::__query_builder::Table; } -impl unique_i128QueryTableAccess for __sdk::QueryTableAccessor { - fn unique_i128(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("unique_i128") +impl unique_i_128QueryTableAccess for __sdk::QueryTableAccessor { + fn unique_i_128(&self) -> __sdk::__query_builder::Table { + __sdk::__query_builder::Table::new("unique_i_128") } } diff --git a/sdks/rust/tests/test-client/src/module_bindings/unique_i_16_table.rs b/sdks/rust/tests/test-client/src/module_bindings/unique_i_16_table.rs index dfe5bd98dfd..b89c23ce1c5 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/unique_i_16_table.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/unique_i_16_table.rs @@ -127,14 +127,14 @@ pub(super) fn parse_table_update(raw_updates: __ws::v2::TableUpdate) -> __sdk::R /// Extension trait for query builder access to the table `UniqueI16`. /// /// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait unique_i16QueryTableAccess { +pub trait unique_i_16QueryTableAccess { #[allow(non_snake_case)] /// Get a query builder for the table `UniqueI16`. - fn unique_i16(&self) -> __sdk::__query_builder::Table; + fn unique_i_16(&self) -> __sdk::__query_builder::Table; } -impl unique_i16QueryTableAccess for __sdk::QueryTableAccessor { - fn unique_i16(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("unique_i16") +impl unique_i_16QueryTableAccess for __sdk::QueryTableAccessor { + fn unique_i_16(&self) -> __sdk::__query_builder::Table { + __sdk::__query_builder::Table::new("unique_i_16") } } diff --git a/sdks/rust/tests/test-client/src/module_bindings/unique_i_256_table.rs b/sdks/rust/tests/test-client/src/module_bindings/unique_i_256_table.rs index 086f7dcc815..33b9d3dfad2 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/unique_i_256_table.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/unique_i_256_table.rs @@ -127,14 +127,14 @@ pub(super) fn parse_table_update(raw_updates: __ws::v2::TableUpdate) -> __sdk::R /// Extension trait for query builder access to the table `UniqueI256`. /// /// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait unique_i256QueryTableAccess { +pub trait unique_i_256QueryTableAccess { #[allow(non_snake_case)] /// Get a query builder for the table `UniqueI256`. - fn unique_i256(&self) -> __sdk::__query_builder::Table; + fn unique_i_256(&self) -> __sdk::__query_builder::Table; } -impl unique_i256QueryTableAccess for __sdk::QueryTableAccessor { - fn unique_i256(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("unique_i256") +impl unique_i_256QueryTableAccess for __sdk::QueryTableAccessor { + fn unique_i_256(&self) -> __sdk::__query_builder::Table { + __sdk::__query_builder::Table::new("unique_i_256") } } diff --git a/sdks/rust/tests/test-client/src/module_bindings/unique_i_32_table.rs b/sdks/rust/tests/test-client/src/module_bindings/unique_i_32_table.rs index 55f12c1d2ff..cead866df5c 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/unique_i_32_table.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/unique_i_32_table.rs @@ -127,14 +127,14 @@ pub(super) fn parse_table_update(raw_updates: __ws::v2::TableUpdate) -> __sdk::R /// Extension trait for query builder access to the table `UniqueI32`. /// /// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait unique_i32QueryTableAccess { +pub trait unique_i_32QueryTableAccess { #[allow(non_snake_case)] /// Get a query builder for the table `UniqueI32`. - fn unique_i32(&self) -> __sdk::__query_builder::Table; + fn unique_i_32(&self) -> __sdk::__query_builder::Table; } -impl unique_i32QueryTableAccess for __sdk::QueryTableAccessor { - fn unique_i32(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("unique_i32") +impl unique_i_32QueryTableAccess for __sdk::QueryTableAccessor { + fn unique_i_32(&self) -> __sdk::__query_builder::Table { + __sdk::__query_builder::Table::new("unique_i_32") } } diff --git a/sdks/rust/tests/test-client/src/module_bindings/unique_i_64_table.rs b/sdks/rust/tests/test-client/src/module_bindings/unique_i_64_table.rs index b1155223281..514474aa4b1 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/unique_i_64_table.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/unique_i_64_table.rs @@ -127,14 +127,14 @@ pub(super) fn parse_table_update(raw_updates: __ws::v2::TableUpdate) -> __sdk::R /// Extension trait for query builder access to the table `UniqueI64`. /// /// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait unique_i64QueryTableAccess { +pub trait unique_i_64QueryTableAccess { #[allow(non_snake_case)] /// Get a query builder for the table `UniqueI64`. - fn unique_i64(&self) -> __sdk::__query_builder::Table; + fn unique_i_64(&self) -> __sdk::__query_builder::Table; } -impl unique_i64QueryTableAccess for __sdk::QueryTableAccessor { - fn unique_i64(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("unique_i64") +impl unique_i_64QueryTableAccess for __sdk::QueryTableAccessor { + fn unique_i_64(&self) -> __sdk::__query_builder::Table { + __sdk::__query_builder::Table::new("unique_i_64") } } diff --git a/sdks/rust/tests/test-client/src/module_bindings/unique_i_8_table.rs b/sdks/rust/tests/test-client/src/module_bindings/unique_i_8_table.rs index 5926d98b43f..a4a6bef6d5b 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/unique_i_8_table.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/unique_i_8_table.rs @@ -127,14 +127,14 @@ pub(super) fn parse_table_update(raw_updates: __ws::v2::TableUpdate) -> __sdk::R /// Extension trait for query builder access to the table `UniqueI8`. /// /// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait unique_i8QueryTableAccess { +pub trait unique_i_8QueryTableAccess { #[allow(non_snake_case)] /// Get a query builder for the table `UniqueI8`. - fn unique_i8(&self) -> __sdk::__query_builder::Table; + fn unique_i_8(&self) -> __sdk::__query_builder::Table; } -impl unique_i8QueryTableAccess for __sdk::QueryTableAccessor { - fn unique_i8(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("unique_i8") +impl unique_i_8QueryTableAccess for __sdk::QueryTableAccessor { + fn unique_i_8(&self) -> __sdk::__query_builder::Table { + __sdk::__query_builder::Table::new("unique_i_8") } } diff --git a/sdks/rust/tests/test-client/src/module_bindings/unique_u_128_table.rs b/sdks/rust/tests/test-client/src/module_bindings/unique_u_128_table.rs index 0233fb5c676..4780f357b8b 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/unique_u_128_table.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/unique_u_128_table.rs @@ -127,14 +127,14 @@ pub(super) fn parse_table_update(raw_updates: __ws::v2::TableUpdate) -> __sdk::R /// Extension trait for query builder access to the table `UniqueU128`. /// /// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait unique_u128QueryTableAccess { +pub trait unique_u_128QueryTableAccess { #[allow(non_snake_case)] /// Get a query builder for the table `UniqueU128`. - fn unique_u128(&self) -> __sdk::__query_builder::Table; + fn unique_u_128(&self) -> __sdk::__query_builder::Table; } -impl unique_u128QueryTableAccess for __sdk::QueryTableAccessor { - fn unique_u128(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("unique_u128") +impl unique_u_128QueryTableAccess for __sdk::QueryTableAccessor { + fn unique_u_128(&self) -> __sdk::__query_builder::Table { + __sdk::__query_builder::Table::new("unique_u_128") } } diff --git a/sdks/rust/tests/test-client/src/module_bindings/unique_u_16_table.rs b/sdks/rust/tests/test-client/src/module_bindings/unique_u_16_table.rs index 3315bca8a0a..f78ed798c9b 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/unique_u_16_table.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/unique_u_16_table.rs @@ -127,14 +127,14 @@ pub(super) fn parse_table_update(raw_updates: __ws::v2::TableUpdate) -> __sdk::R /// Extension trait for query builder access to the table `UniqueU16`. /// /// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait unique_u16QueryTableAccess { +pub trait unique_u_16QueryTableAccess { #[allow(non_snake_case)] /// Get a query builder for the table `UniqueU16`. - fn unique_u16(&self) -> __sdk::__query_builder::Table; + fn unique_u_16(&self) -> __sdk::__query_builder::Table; } -impl unique_u16QueryTableAccess for __sdk::QueryTableAccessor { - fn unique_u16(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("unique_u16") +impl unique_u_16QueryTableAccess for __sdk::QueryTableAccessor { + fn unique_u_16(&self) -> __sdk::__query_builder::Table { + __sdk::__query_builder::Table::new("unique_u_16") } } diff --git a/sdks/rust/tests/test-client/src/module_bindings/unique_u_256_table.rs b/sdks/rust/tests/test-client/src/module_bindings/unique_u_256_table.rs index d2766488117..289808a8c47 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/unique_u_256_table.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/unique_u_256_table.rs @@ -127,14 +127,14 @@ pub(super) fn parse_table_update(raw_updates: __ws::v2::TableUpdate) -> __sdk::R /// Extension trait for query builder access to the table `UniqueU256`. /// /// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait unique_u256QueryTableAccess { +pub trait unique_u_256QueryTableAccess { #[allow(non_snake_case)] /// Get a query builder for the table `UniqueU256`. - fn unique_u256(&self) -> __sdk::__query_builder::Table; + fn unique_u_256(&self) -> __sdk::__query_builder::Table; } -impl unique_u256QueryTableAccess for __sdk::QueryTableAccessor { - fn unique_u256(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("unique_u256") +impl unique_u_256QueryTableAccess for __sdk::QueryTableAccessor { + fn unique_u_256(&self) -> __sdk::__query_builder::Table { + __sdk::__query_builder::Table::new("unique_u_256") } } diff --git a/sdks/rust/tests/test-client/src/module_bindings/unique_u_32_table.rs b/sdks/rust/tests/test-client/src/module_bindings/unique_u_32_table.rs index 2dbc525bb06..a07fa51d146 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/unique_u_32_table.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/unique_u_32_table.rs @@ -127,14 +127,14 @@ pub(super) fn parse_table_update(raw_updates: __ws::v2::TableUpdate) -> __sdk::R /// Extension trait for query builder access to the table `UniqueU32`. /// /// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait unique_u32QueryTableAccess { +pub trait unique_u_32QueryTableAccess { #[allow(non_snake_case)] /// Get a query builder for the table `UniqueU32`. - fn unique_u32(&self) -> __sdk::__query_builder::Table; + fn unique_u_32(&self) -> __sdk::__query_builder::Table; } -impl unique_u32QueryTableAccess for __sdk::QueryTableAccessor { - fn unique_u32(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("unique_u32") +impl unique_u_32QueryTableAccess for __sdk::QueryTableAccessor { + fn unique_u_32(&self) -> __sdk::__query_builder::Table { + __sdk::__query_builder::Table::new("unique_u_32") } } diff --git a/sdks/rust/tests/test-client/src/module_bindings/unique_u_64_table.rs b/sdks/rust/tests/test-client/src/module_bindings/unique_u_64_table.rs index e80779e7378..032c1032ae9 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/unique_u_64_table.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/unique_u_64_table.rs @@ -127,14 +127,14 @@ pub(super) fn parse_table_update(raw_updates: __ws::v2::TableUpdate) -> __sdk::R /// Extension trait for query builder access to the table `UniqueU64`. /// /// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait unique_u64QueryTableAccess { +pub trait unique_u_64QueryTableAccess { #[allow(non_snake_case)] /// Get a query builder for the table `UniqueU64`. - fn unique_u64(&self) -> __sdk::__query_builder::Table; + fn unique_u_64(&self) -> __sdk::__query_builder::Table; } -impl unique_u64QueryTableAccess for __sdk::QueryTableAccessor { - fn unique_u64(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("unique_u64") +impl unique_u_64QueryTableAccess for __sdk::QueryTableAccessor { + fn unique_u_64(&self) -> __sdk::__query_builder::Table { + __sdk::__query_builder::Table::new("unique_u_64") } } diff --git a/sdks/rust/tests/test-client/src/module_bindings/unique_u_8_table.rs b/sdks/rust/tests/test-client/src/module_bindings/unique_u_8_table.rs index c4bbacdd291..1bceb392864 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/unique_u_8_table.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/unique_u_8_table.rs @@ -127,14 +127,14 @@ pub(super) fn parse_table_update(raw_updates: __ws::v2::TableUpdate) -> __sdk::R /// Extension trait for query builder access to the table `UniqueU8`. /// /// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait unique_u8QueryTableAccess { +pub trait unique_u_8QueryTableAccess { #[allow(non_snake_case)] /// Get a query builder for the table `UniqueU8`. - fn unique_u8(&self) -> __sdk::__query_builder::Table; + fn unique_u_8(&self) -> __sdk::__query_builder::Table; } -impl unique_u8QueryTableAccess for __sdk::QueryTableAccessor { - fn unique_u8(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("unique_u8") +impl unique_u_8QueryTableAccess for __sdk::QueryTableAccessor { + fn unique_u_8(&self) -> __sdk::__query_builder::Table { + __sdk::__query_builder::Table::new("unique_u_8") } } diff --git a/sdks/rust/tests/test-client/src/module_bindings/update_indexed_simple_enum_type.rs b/sdks/rust/tests/test-client/src/module_bindings/update_indexed_simple_enum_type.rs deleted file mode 100644 index 09280ad4e15..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/update_indexed_simple_enum_type.rs +++ /dev/null @@ -1,18 +0,0 @@ -// 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, __lib, __sats, __ws}; - -use super::simple_enum_type::SimpleEnum; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct UpdateIndexedSimpleEnum { - pub a: SimpleEnum, - pub b: SimpleEnum, -} - -impl __sdk::InModule for UpdateIndexedSimpleEnum { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/update_pk_bool_type.rs b/sdks/rust/tests/test-client/src/module_bindings/update_pk_bool_type.rs deleted file mode 100644 index f23eab930e6..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/update_pk_bool_type.rs +++ /dev/null @@ -1,16 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct UpdatePkBool { - pub b: bool, - pub data: i32, -} - -impl __sdk::InModule for UpdatePkBool { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/update_pk_connection_id_type.rs b/sdks/rust/tests/test-client/src/module_bindings/update_pk_connection_id_type.rs deleted file mode 100644 index 52439b2833a..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/update_pk_connection_id_type.rs +++ /dev/null @@ -1,16 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct UpdatePkConnectionId { - pub a: __sdk::ConnectionId, - pub data: i32, -} - -impl __sdk::InModule for UpdatePkConnectionId { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/update_pk_i_128_type.rs b/sdks/rust/tests/test-client/src/module_bindings/update_pk_i_128_type.rs deleted file mode 100644 index a8f51ccda0c..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/update_pk_i_128_type.rs +++ /dev/null @@ -1,16 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct UpdatePkI128 { - pub n: i128, - pub data: i32, -} - -impl __sdk::InModule for UpdatePkI128 { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/update_pk_i_16_type.rs b/sdks/rust/tests/test-client/src/module_bindings/update_pk_i_16_type.rs deleted file mode 100644 index 7bf7a38505b..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/update_pk_i_16_type.rs +++ /dev/null @@ -1,16 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct UpdatePkI16 { - pub n: i16, - pub data: i32, -} - -impl __sdk::InModule for UpdatePkI16 { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/update_pk_i_256_type.rs b/sdks/rust/tests/test-client/src/module_bindings/update_pk_i_256_type.rs deleted file mode 100644 index b493cbf3f23..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/update_pk_i_256_type.rs +++ /dev/null @@ -1,16 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct UpdatePkI256 { - pub n: __sats::i256, - pub data: i32, -} - -impl __sdk::InModule for UpdatePkI256 { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/update_pk_i_32_type.rs b/sdks/rust/tests/test-client/src/module_bindings/update_pk_i_32_type.rs deleted file mode 100644 index ac70ad1a629..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/update_pk_i_32_type.rs +++ /dev/null @@ -1,16 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct UpdatePkI32 { - pub n: i32, - pub data: i32, -} - -impl __sdk::InModule for UpdatePkI32 { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/update_pk_i_64_type.rs b/sdks/rust/tests/test-client/src/module_bindings/update_pk_i_64_type.rs deleted file mode 100644 index 066a890ab25..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/update_pk_i_64_type.rs +++ /dev/null @@ -1,16 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct UpdatePkI64 { - pub n: i64, - pub data: i32, -} - -impl __sdk::InModule for UpdatePkI64 { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/update_pk_i_8_type.rs b/sdks/rust/tests/test-client/src/module_bindings/update_pk_i_8_type.rs deleted file mode 100644 index c4c58734cd2..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/update_pk_i_8_type.rs +++ /dev/null @@ -1,16 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct UpdatePkI8 { - pub n: i8, - pub data: i32, -} - -impl __sdk::InModule for UpdatePkI8 { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/update_pk_identity_type.rs b/sdks/rust/tests/test-client/src/module_bindings/update_pk_identity_type.rs deleted file mode 100644 index 7fdb0ba0084..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/update_pk_identity_type.rs +++ /dev/null @@ -1,16 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct UpdatePkIdentity { - pub i: __sdk::Identity, - pub data: i32, -} - -impl __sdk::InModule for UpdatePkIdentity { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/update_pk_simple_enum_type.rs b/sdks/rust/tests/test-client/src/module_bindings/update_pk_simple_enum_type.rs deleted file mode 100644 index 57a08d3d47d..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/update_pk_simple_enum_type.rs +++ /dev/null @@ -1,18 +0,0 @@ -// 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, __lib, __sats, __ws}; - -use super::simple_enum_type::SimpleEnum; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct UpdatePkSimpleEnum { - pub a: SimpleEnum, - pub data: i32, -} - -impl __sdk::InModule for UpdatePkSimpleEnum { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/update_pk_string_type.rs b/sdks/rust/tests/test-client/src/module_bindings/update_pk_string_type.rs deleted file mode 100644 index 083f4b80391..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/update_pk_string_type.rs +++ /dev/null @@ -1,16 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct UpdatePkString { - pub s: String, - pub data: i32, -} - -impl __sdk::InModule for UpdatePkString { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/update_pk_u_128_type.rs b/sdks/rust/tests/test-client/src/module_bindings/update_pk_u_128_type.rs deleted file mode 100644 index 2dfdf873f25..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/update_pk_u_128_type.rs +++ /dev/null @@ -1,16 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct UpdatePkU128 { - pub n: u128, - pub data: i32, -} - -impl __sdk::InModule for UpdatePkU128 { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/update_pk_u_16_type.rs b/sdks/rust/tests/test-client/src/module_bindings/update_pk_u_16_type.rs deleted file mode 100644 index 5709d7b8ea2..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/update_pk_u_16_type.rs +++ /dev/null @@ -1,16 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct UpdatePkU16 { - pub n: u16, - pub data: i32, -} - -impl __sdk::InModule for UpdatePkU16 { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/update_pk_u_256_type.rs b/sdks/rust/tests/test-client/src/module_bindings/update_pk_u_256_type.rs deleted file mode 100644 index e164802a24b..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/update_pk_u_256_type.rs +++ /dev/null @@ -1,16 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct UpdatePkU256 { - pub n: __sats::u256, - pub data: i32, -} - -impl __sdk::InModule for UpdatePkU256 { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/update_pk_u_32_two_type.rs b/sdks/rust/tests/test-client/src/module_bindings/update_pk_u_32_two_type.rs deleted file mode 100644 index e1f7652d7ec..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/update_pk_u_32_two_type.rs +++ /dev/null @@ -1,16 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct UpdatePkU32Two { - pub n: u32, - pub data: i32, -} - -impl __sdk::InModule for UpdatePkU32Two { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/update_pk_u_32_type.rs b/sdks/rust/tests/test-client/src/module_bindings/update_pk_u_32_type.rs deleted file mode 100644 index a8ef313b64e..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/update_pk_u_32_type.rs +++ /dev/null @@ -1,16 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct UpdatePkU32 { - pub n: u32, - pub data: i32, -} - -impl __sdk::InModule for UpdatePkU32 { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/update_pk_u_64_type.rs b/sdks/rust/tests/test-client/src/module_bindings/update_pk_u_64_type.rs deleted file mode 100644 index 79feee08c63..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/update_pk_u_64_type.rs +++ /dev/null @@ -1,16 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct UpdatePkU64 { - pub n: u64, - pub data: i32, -} - -impl __sdk::InModule for UpdatePkU64 { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/update_pk_u_8_type.rs b/sdks/rust/tests/test-client/src/module_bindings/update_pk_u_8_type.rs deleted file mode 100644 index cd516e72155..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/update_pk_u_8_type.rs +++ /dev/null @@ -1,16 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct UpdatePkU8 { - pub n: u8, - pub data: i32, -} - -impl __sdk::InModule for UpdatePkU8 { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/update_pk_uuid_type.rs b/sdks/rust/tests/test-client/src/module_bindings/update_pk_uuid_type.rs deleted file mode 100644 index 3d48cb8204c..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/update_pk_uuid_type.rs +++ /dev/null @@ -1,16 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct UpdatePkUuid { - pub u: __sdk::Uuid, - pub data: i32, -} - -impl __sdk::InModule for UpdatePkUuid { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/update_unique_bool_type.rs b/sdks/rust/tests/test-client/src/module_bindings/update_unique_bool_type.rs deleted file mode 100644 index cb3352e1c5e..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/update_unique_bool_type.rs +++ /dev/null @@ -1,16 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct UpdateUniqueBool { - pub b: bool, - pub data: i32, -} - -impl __sdk::InModule for UpdateUniqueBool { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/update_unique_connection_id_type.rs b/sdks/rust/tests/test-client/src/module_bindings/update_unique_connection_id_type.rs deleted file mode 100644 index 5de41211b21..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/update_unique_connection_id_type.rs +++ /dev/null @@ -1,16 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct UpdateUniqueConnectionId { - pub a: __sdk::ConnectionId, - pub data: i32, -} - -impl __sdk::InModule for UpdateUniqueConnectionId { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/update_unique_i_128_type.rs b/sdks/rust/tests/test-client/src/module_bindings/update_unique_i_128_type.rs deleted file mode 100644 index 9fe84d12041..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/update_unique_i_128_type.rs +++ /dev/null @@ -1,16 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct UpdateUniqueI128 { - pub n: i128, - pub data: i32, -} - -impl __sdk::InModule for UpdateUniqueI128 { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/update_unique_i_16_type.rs b/sdks/rust/tests/test-client/src/module_bindings/update_unique_i_16_type.rs deleted file mode 100644 index bd59c33d859..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/update_unique_i_16_type.rs +++ /dev/null @@ -1,16 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct UpdateUniqueI16 { - pub n: i16, - pub data: i32, -} - -impl __sdk::InModule for UpdateUniqueI16 { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/update_unique_i_256_type.rs b/sdks/rust/tests/test-client/src/module_bindings/update_unique_i_256_type.rs deleted file mode 100644 index e370ddd2894..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/update_unique_i_256_type.rs +++ /dev/null @@ -1,16 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct UpdateUniqueI256 { - pub n: __sats::i256, - pub data: i32, -} - -impl __sdk::InModule for UpdateUniqueI256 { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/update_unique_i_32_type.rs b/sdks/rust/tests/test-client/src/module_bindings/update_unique_i_32_type.rs deleted file mode 100644 index 27e2077a054..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/update_unique_i_32_type.rs +++ /dev/null @@ -1,16 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct UpdateUniqueI32 { - pub n: i32, - pub data: i32, -} - -impl __sdk::InModule for UpdateUniqueI32 { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/update_unique_i_64_type.rs b/sdks/rust/tests/test-client/src/module_bindings/update_unique_i_64_type.rs deleted file mode 100644 index 9b06b8fbd2a..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/update_unique_i_64_type.rs +++ /dev/null @@ -1,16 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct UpdateUniqueI64 { - pub n: i64, - pub data: i32, -} - -impl __sdk::InModule for UpdateUniqueI64 { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/update_unique_i_8_type.rs b/sdks/rust/tests/test-client/src/module_bindings/update_unique_i_8_type.rs deleted file mode 100644 index 6f43099818a..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/update_unique_i_8_type.rs +++ /dev/null @@ -1,16 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct UpdateUniqueI8 { - pub n: i8, - pub data: i32, -} - -impl __sdk::InModule for UpdateUniqueI8 { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/update_unique_identity_type.rs b/sdks/rust/tests/test-client/src/module_bindings/update_unique_identity_type.rs deleted file mode 100644 index 70fc235e054..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/update_unique_identity_type.rs +++ /dev/null @@ -1,16 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct UpdateUniqueIdentity { - pub i: __sdk::Identity, - pub data: i32, -} - -impl __sdk::InModule for UpdateUniqueIdentity { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/update_unique_string_type.rs b/sdks/rust/tests/test-client/src/module_bindings/update_unique_string_type.rs deleted file mode 100644 index 15c2e24272a..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/update_unique_string_type.rs +++ /dev/null @@ -1,16 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct UpdateUniqueString { - pub s: String, - pub data: i32, -} - -impl __sdk::InModule for UpdateUniqueString { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/update_unique_u_128_type.rs b/sdks/rust/tests/test-client/src/module_bindings/update_unique_u_128_type.rs deleted file mode 100644 index 83422f4264a..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/update_unique_u_128_type.rs +++ /dev/null @@ -1,16 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct UpdateUniqueU128 { - pub n: u128, - pub data: i32, -} - -impl __sdk::InModule for UpdateUniqueU128 { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/update_unique_u_16_type.rs b/sdks/rust/tests/test-client/src/module_bindings/update_unique_u_16_type.rs deleted file mode 100644 index 03caa3b6118..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/update_unique_u_16_type.rs +++ /dev/null @@ -1,16 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct UpdateUniqueU16 { - pub n: u16, - pub data: i32, -} - -impl __sdk::InModule for UpdateUniqueU16 { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/update_unique_u_256_type.rs b/sdks/rust/tests/test-client/src/module_bindings/update_unique_u_256_type.rs deleted file mode 100644 index 0e12323a778..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/update_unique_u_256_type.rs +++ /dev/null @@ -1,16 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct UpdateUniqueU256 { - pub n: __sats::u256, - pub data: i32, -} - -impl __sdk::InModule for UpdateUniqueU256 { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/update_unique_u_32_type.rs b/sdks/rust/tests/test-client/src/module_bindings/update_unique_u_32_type.rs deleted file mode 100644 index b7c5a50f198..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/update_unique_u_32_type.rs +++ /dev/null @@ -1,16 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct UpdateUniqueU32 { - pub n: u32, - pub data: i32, -} - -impl __sdk::InModule for UpdateUniqueU32 { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/update_unique_u_64_type.rs b/sdks/rust/tests/test-client/src/module_bindings/update_unique_u_64_type.rs deleted file mode 100644 index f35d555bd3e..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/update_unique_u_64_type.rs +++ /dev/null @@ -1,16 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct UpdateUniqueU64 { - pub n: u64, - pub data: i32, -} - -impl __sdk::InModule for UpdateUniqueU64 { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/update_unique_u_8_type.rs b/sdks/rust/tests/test-client/src/module_bindings/update_unique_u_8_type.rs deleted file mode 100644 index 23684555c91..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/update_unique_u_8_type.rs +++ /dev/null @@ -1,16 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct UpdateUniqueU8 { - pub n: u8, - pub data: i32, -} - -impl __sdk::InModule for UpdateUniqueU8 { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/update_unique_uuid_type.rs b/sdks/rust/tests/test-client/src/module_bindings/update_unique_uuid_type.rs deleted file mode 100644 index e51520863f4..00000000000 --- a/sdks/rust/tests/test-client/src/module_bindings/update_unique_uuid_type.rs +++ /dev/null @@ -1,16 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct UpdateUniqueUuid { - pub u: __sdk::Uuid, - pub data: i32, -} - -impl __sdk::InModule for UpdateUniqueUuid { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/test-client/src/module_bindings/vec_f_32_table.rs b/sdks/rust/tests/test-client/src/module_bindings/vec_f_32_table.rs index 231d8e59727..470119b3a7f 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/vec_f_32_table.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/vec_f_32_table.rs @@ -96,14 +96,14 @@ pub(super) fn parse_table_update(raw_updates: __ws::v2::TableUpdate) -> __sdk::R /// Extension trait for query builder access to the table `VecF32`. /// /// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait vec_f32QueryTableAccess { +pub trait vec_f_32QueryTableAccess { #[allow(non_snake_case)] /// Get a query builder for the table `VecF32`. - fn vec_f32(&self) -> __sdk::__query_builder::Table; + fn vec_f_32(&self) -> __sdk::__query_builder::Table; } -impl vec_f32QueryTableAccess for __sdk::QueryTableAccessor { - fn vec_f32(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("vec_f32") +impl vec_f_32QueryTableAccess for __sdk::QueryTableAccessor { + fn vec_f_32(&self) -> __sdk::__query_builder::Table { + __sdk::__query_builder::Table::new("vec_f_32") } } diff --git a/sdks/rust/tests/test-client/src/module_bindings/vec_f_64_table.rs b/sdks/rust/tests/test-client/src/module_bindings/vec_f_64_table.rs index 5143308578f..f1d6ff21724 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/vec_f_64_table.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/vec_f_64_table.rs @@ -96,14 +96,14 @@ pub(super) fn parse_table_update(raw_updates: __ws::v2::TableUpdate) -> __sdk::R /// Extension trait for query builder access to the table `VecF64`. /// /// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait vec_f64QueryTableAccess { +pub trait vec_f_64QueryTableAccess { #[allow(non_snake_case)] /// Get a query builder for the table `VecF64`. - fn vec_f64(&self) -> __sdk::__query_builder::Table; + fn vec_f_64(&self) -> __sdk::__query_builder::Table; } -impl vec_f64QueryTableAccess for __sdk::QueryTableAccessor { - fn vec_f64(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("vec_f64") +impl vec_f_64QueryTableAccess for __sdk::QueryTableAccessor { + fn vec_f_64(&self) -> __sdk::__query_builder::Table { + __sdk::__query_builder::Table::new("vec_f_64") } } diff --git a/sdks/rust/tests/test-client/src/module_bindings/vec_i_128_table.rs b/sdks/rust/tests/test-client/src/module_bindings/vec_i_128_table.rs index f98334f6ca1..110c759278b 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/vec_i_128_table.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/vec_i_128_table.rs @@ -96,14 +96,14 @@ pub(super) fn parse_table_update(raw_updates: __ws::v2::TableUpdate) -> __sdk::R /// Extension trait for query builder access to the table `VecI128`. /// /// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait vec_i128QueryTableAccess { +pub trait vec_i_128QueryTableAccess { #[allow(non_snake_case)] /// Get a query builder for the table `VecI128`. - fn vec_i128(&self) -> __sdk::__query_builder::Table; + fn vec_i_128(&self) -> __sdk::__query_builder::Table; } -impl vec_i128QueryTableAccess for __sdk::QueryTableAccessor { - fn vec_i128(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("vec_i128") +impl vec_i_128QueryTableAccess for __sdk::QueryTableAccessor { + fn vec_i_128(&self) -> __sdk::__query_builder::Table { + __sdk::__query_builder::Table::new("vec_i_128") } } diff --git a/sdks/rust/tests/test-client/src/module_bindings/vec_i_16_table.rs b/sdks/rust/tests/test-client/src/module_bindings/vec_i_16_table.rs index 85733567367..76104d0df08 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/vec_i_16_table.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/vec_i_16_table.rs @@ -96,14 +96,14 @@ pub(super) fn parse_table_update(raw_updates: __ws::v2::TableUpdate) -> __sdk::R /// Extension trait for query builder access to the table `VecI16`. /// /// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait vec_i16QueryTableAccess { +pub trait vec_i_16QueryTableAccess { #[allow(non_snake_case)] /// Get a query builder for the table `VecI16`. - fn vec_i16(&self) -> __sdk::__query_builder::Table; + fn vec_i_16(&self) -> __sdk::__query_builder::Table; } -impl vec_i16QueryTableAccess for __sdk::QueryTableAccessor { - fn vec_i16(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("vec_i16") +impl vec_i_16QueryTableAccess for __sdk::QueryTableAccessor { + fn vec_i_16(&self) -> __sdk::__query_builder::Table { + __sdk::__query_builder::Table::new("vec_i_16") } } diff --git a/sdks/rust/tests/test-client/src/module_bindings/vec_i_256_table.rs b/sdks/rust/tests/test-client/src/module_bindings/vec_i_256_table.rs index 7b4bd12563b..93b66ec77e7 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/vec_i_256_table.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/vec_i_256_table.rs @@ -96,14 +96,14 @@ pub(super) fn parse_table_update(raw_updates: __ws::v2::TableUpdate) -> __sdk::R /// Extension trait for query builder access to the table `VecI256`. /// /// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait vec_i256QueryTableAccess { +pub trait vec_i_256QueryTableAccess { #[allow(non_snake_case)] /// Get a query builder for the table `VecI256`. - fn vec_i256(&self) -> __sdk::__query_builder::Table; + fn vec_i_256(&self) -> __sdk::__query_builder::Table; } -impl vec_i256QueryTableAccess for __sdk::QueryTableAccessor { - fn vec_i256(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("vec_i256") +impl vec_i_256QueryTableAccess for __sdk::QueryTableAccessor { + fn vec_i_256(&self) -> __sdk::__query_builder::Table { + __sdk::__query_builder::Table::new("vec_i_256") } } diff --git a/sdks/rust/tests/test-client/src/module_bindings/vec_i_32_table.rs b/sdks/rust/tests/test-client/src/module_bindings/vec_i_32_table.rs index f59958fb24c..7adc5dedcb6 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/vec_i_32_table.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/vec_i_32_table.rs @@ -96,14 +96,14 @@ pub(super) fn parse_table_update(raw_updates: __ws::v2::TableUpdate) -> __sdk::R /// Extension trait for query builder access to the table `VecI32`. /// /// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait vec_i32QueryTableAccess { +pub trait vec_i_32QueryTableAccess { #[allow(non_snake_case)] /// Get a query builder for the table `VecI32`. - fn vec_i32(&self) -> __sdk::__query_builder::Table; + fn vec_i_32(&self) -> __sdk::__query_builder::Table; } -impl vec_i32QueryTableAccess for __sdk::QueryTableAccessor { - fn vec_i32(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("vec_i32") +impl vec_i_32QueryTableAccess for __sdk::QueryTableAccessor { + fn vec_i_32(&self) -> __sdk::__query_builder::Table { + __sdk::__query_builder::Table::new("vec_i_32") } } diff --git a/sdks/rust/tests/test-client/src/module_bindings/vec_i_64_table.rs b/sdks/rust/tests/test-client/src/module_bindings/vec_i_64_table.rs index 05cc967e07a..c1c3d9fe6d4 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/vec_i_64_table.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/vec_i_64_table.rs @@ -96,14 +96,14 @@ pub(super) fn parse_table_update(raw_updates: __ws::v2::TableUpdate) -> __sdk::R /// Extension trait for query builder access to the table `VecI64`. /// /// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait vec_i64QueryTableAccess { +pub trait vec_i_64QueryTableAccess { #[allow(non_snake_case)] /// Get a query builder for the table `VecI64`. - fn vec_i64(&self) -> __sdk::__query_builder::Table; + fn vec_i_64(&self) -> __sdk::__query_builder::Table; } -impl vec_i64QueryTableAccess for __sdk::QueryTableAccessor { - fn vec_i64(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("vec_i64") +impl vec_i_64QueryTableAccess for __sdk::QueryTableAccessor { + fn vec_i_64(&self) -> __sdk::__query_builder::Table { + __sdk::__query_builder::Table::new("vec_i_64") } } diff --git a/sdks/rust/tests/test-client/src/module_bindings/vec_i_8_table.rs b/sdks/rust/tests/test-client/src/module_bindings/vec_i_8_table.rs index b64def2b8c3..4485c46b9bf 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/vec_i_8_table.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/vec_i_8_table.rs @@ -96,14 +96,14 @@ pub(super) fn parse_table_update(raw_updates: __ws::v2::TableUpdate) -> __sdk::R /// Extension trait for query builder access to the table `VecI8`. /// /// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait vec_i8QueryTableAccess { +pub trait vec_i_8QueryTableAccess { #[allow(non_snake_case)] /// Get a query builder for the table `VecI8`. - fn vec_i8(&self) -> __sdk::__query_builder::Table; + fn vec_i_8(&self) -> __sdk::__query_builder::Table; } -impl vec_i8QueryTableAccess for __sdk::QueryTableAccessor { - fn vec_i8(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("vec_i8") +impl vec_i_8QueryTableAccess for __sdk::QueryTableAccessor { + fn vec_i_8(&self) -> __sdk::__query_builder::Table { + __sdk::__query_builder::Table::new("vec_i_8") } } diff --git a/sdks/rust/tests/test-client/src/module_bindings/vec_u_128_table.rs b/sdks/rust/tests/test-client/src/module_bindings/vec_u_128_table.rs index 36853f5c24d..8f96d7434eb 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/vec_u_128_table.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/vec_u_128_table.rs @@ -96,14 +96,14 @@ pub(super) fn parse_table_update(raw_updates: __ws::v2::TableUpdate) -> __sdk::R /// Extension trait for query builder access to the table `VecU128`. /// /// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait vec_u128QueryTableAccess { +pub trait vec_u_128QueryTableAccess { #[allow(non_snake_case)] /// Get a query builder for the table `VecU128`. - fn vec_u128(&self) -> __sdk::__query_builder::Table; + fn vec_u_128(&self) -> __sdk::__query_builder::Table; } -impl vec_u128QueryTableAccess for __sdk::QueryTableAccessor { - fn vec_u128(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("vec_u128") +impl vec_u_128QueryTableAccess for __sdk::QueryTableAccessor { + fn vec_u_128(&self) -> __sdk::__query_builder::Table { + __sdk::__query_builder::Table::new("vec_u_128") } } diff --git a/sdks/rust/tests/test-client/src/module_bindings/vec_u_16_table.rs b/sdks/rust/tests/test-client/src/module_bindings/vec_u_16_table.rs index f7ecd19403d..2cf50b8b026 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/vec_u_16_table.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/vec_u_16_table.rs @@ -96,14 +96,14 @@ pub(super) fn parse_table_update(raw_updates: __ws::v2::TableUpdate) -> __sdk::R /// Extension trait for query builder access to the table `VecU16`. /// /// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait vec_u16QueryTableAccess { +pub trait vec_u_16QueryTableAccess { #[allow(non_snake_case)] /// Get a query builder for the table `VecU16`. - fn vec_u16(&self) -> __sdk::__query_builder::Table; + fn vec_u_16(&self) -> __sdk::__query_builder::Table; } -impl vec_u16QueryTableAccess for __sdk::QueryTableAccessor { - fn vec_u16(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("vec_u16") +impl vec_u_16QueryTableAccess for __sdk::QueryTableAccessor { + fn vec_u_16(&self) -> __sdk::__query_builder::Table { + __sdk::__query_builder::Table::new("vec_u_16") } } diff --git a/sdks/rust/tests/test-client/src/module_bindings/vec_u_256_table.rs b/sdks/rust/tests/test-client/src/module_bindings/vec_u_256_table.rs index f50f8663c1a..2f3c13a0450 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/vec_u_256_table.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/vec_u_256_table.rs @@ -96,14 +96,14 @@ pub(super) fn parse_table_update(raw_updates: __ws::v2::TableUpdate) -> __sdk::R /// Extension trait for query builder access to the table `VecU256`. /// /// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait vec_u256QueryTableAccess { +pub trait vec_u_256QueryTableAccess { #[allow(non_snake_case)] /// Get a query builder for the table `VecU256`. - fn vec_u256(&self) -> __sdk::__query_builder::Table; + fn vec_u_256(&self) -> __sdk::__query_builder::Table; } -impl vec_u256QueryTableAccess for __sdk::QueryTableAccessor { - fn vec_u256(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("vec_u256") +impl vec_u_256QueryTableAccess for __sdk::QueryTableAccessor { + fn vec_u_256(&self) -> __sdk::__query_builder::Table { + __sdk::__query_builder::Table::new("vec_u_256") } } diff --git a/sdks/rust/tests/test-client/src/module_bindings/vec_u_32_table.rs b/sdks/rust/tests/test-client/src/module_bindings/vec_u_32_table.rs index 18f87cfd296..04fc2d0925c 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/vec_u_32_table.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/vec_u_32_table.rs @@ -96,14 +96,14 @@ pub(super) fn parse_table_update(raw_updates: __ws::v2::TableUpdate) -> __sdk::R /// Extension trait for query builder access to the table `VecU32`. /// /// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait vec_u32QueryTableAccess { +pub trait vec_u_32QueryTableAccess { #[allow(non_snake_case)] /// Get a query builder for the table `VecU32`. - fn vec_u32(&self) -> __sdk::__query_builder::Table; + fn vec_u_32(&self) -> __sdk::__query_builder::Table; } -impl vec_u32QueryTableAccess for __sdk::QueryTableAccessor { - fn vec_u32(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("vec_u32") +impl vec_u_32QueryTableAccess for __sdk::QueryTableAccessor { + fn vec_u_32(&self) -> __sdk::__query_builder::Table { + __sdk::__query_builder::Table::new("vec_u_32") } } diff --git a/sdks/rust/tests/test-client/src/module_bindings/vec_u_64_table.rs b/sdks/rust/tests/test-client/src/module_bindings/vec_u_64_table.rs index ab9bd053a05..cfc64e363d5 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/vec_u_64_table.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/vec_u_64_table.rs @@ -96,14 +96,14 @@ pub(super) fn parse_table_update(raw_updates: __ws::v2::TableUpdate) -> __sdk::R /// Extension trait for query builder access to the table `VecU64`. /// /// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait vec_u64QueryTableAccess { +pub trait vec_u_64QueryTableAccess { #[allow(non_snake_case)] /// Get a query builder for the table `VecU64`. - fn vec_u64(&self) -> __sdk::__query_builder::Table; + fn vec_u_64(&self) -> __sdk::__query_builder::Table; } -impl vec_u64QueryTableAccess for __sdk::QueryTableAccessor { - fn vec_u64(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("vec_u64") +impl vec_u_64QueryTableAccess for __sdk::QueryTableAccessor { + fn vec_u_64(&self) -> __sdk::__query_builder::Table { + __sdk::__query_builder::Table::new("vec_u_64") } } diff --git a/sdks/rust/tests/test-client/src/module_bindings/vec_u_8_table.rs b/sdks/rust/tests/test-client/src/module_bindings/vec_u_8_table.rs index 54184da6ba5..140444f92ed 100644 --- a/sdks/rust/tests/test-client/src/module_bindings/vec_u_8_table.rs +++ b/sdks/rust/tests/test-client/src/module_bindings/vec_u_8_table.rs @@ -96,14 +96,14 @@ pub(super) fn parse_table_update(raw_updates: __ws::v2::TableUpdate) -> __sdk::R /// Extension trait for query builder access to the table `VecU8`. /// /// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait vec_u8QueryTableAccess { +pub trait vec_u_8QueryTableAccess { #[allow(non_snake_case)] /// Get a query builder for the table `VecU8`. - fn vec_u8(&self) -> __sdk::__query_builder::Table; + fn vec_u_8(&self) -> __sdk::__query_builder::Table; } -impl vec_u8QueryTableAccess for __sdk::QueryTableAccessor { - fn vec_u8(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("vec_u8") +impl vec_u_8QueryTableAccess for __sdk::QueryTableAccessor { + fn vec_u_8(&self) -> __sdk::__query_builder::Table { + __sdk::__query_builder::Table::new("vec_u_8") } } diff --git a/sdks/rust/tests/test.rs b/sdks/rust/tests/test.rs index d6c5cac38ae..2a09fa794f8 100644 --- a/sdks/rust/tests/test.rs +++ b/sdks/rust/tests/test.rs @@ -24,288 +24,288 @@ macro_rules! declare_tests_with_suffix { .build() } - #[test] - fn insert_primitive() { - make_test("insert-primitive").run(); - } + // #[test] + // fn insert_primitive() { + // make_test("insert-primitive").run(); + // } - #[test] - fn subscribe_and_cancel() { - make_test("subscribe-and-cancel").run(); - } + // #[test] + // fn subscribe_and_cancel() { + // make_test("subscribe-and-cancel").run(); + // } - #[test] - fn subscribe_and_unsubscribe() { - make_test("subscribe-and-unsubscribe").run(); - } + // #[test] + // fn subscribe_and_unsubscribe() { + // make_test("subscribe-and-unsubscribe").run(); + // } - #[test] - fn subscription_error_smoke_test() { - make_test("subscription-error-smoke-test").run(); - } - #[test] - fn delete_primitive() { - make_test("delete-primitive").run(); - } + // #[test] + // fn subscription_error_smoke_test() { + // make_test("subscription-error-smoke-test").run(); + // } + // #[test] + // fn delete_primitive() { + // make_test("delete-primitive").run(); + // } - #[test] - fn update_primitive() { - make_test("update-primitive").run(); - } + // #[test] + // fn update_primitive() { + // make_test("update-primitive").run(); + // } - #[test] - fn insert_identity() { - make_test("insert-identity").run(); - } + // #[test] + // fn insert_identity() { + // make_test("insert-identity").run(); + // } - #[test] - fn insert_caller_identity() { - make_test("insert-caller-identity").run(); - } + // #[test] + // fn insert_caller_identity() { + // make_test("insert-caller-identity").run(); + // } - #[test] - fn delete_identity() { - make_test("delete-identity").run(); - } + // #[test] + // fn delete_identity() { + // make_test("delete-identity").run(); + // } - #[test] - fn update_identity() { - make_test("delete-identity").run(); - } + // #[test] + // fn update_identity() { + // make_test("delete-identity").run(); + // } - #[test] - fn insert_connection_id() { - make_test("insert-connection-id").run(); - } + // #[test] + // fn insert_connection_id() { + // make_test("insert-connection-id").run(); + // } - #[test] - fn insert_caller_connection_id() { - make_test("insert-caller-connection-id").run(); - } + // #[test] + // fn insert_caller_connection_id() { + // make_test("insert-caller-connection-id").run(); + // } - #[test] - fn delete_connection_id() { - make_test("delete-connection-id").run(); - } + // #[test] + // fn delete_connection_id() { + // make_test("delete-connection-id").run(); + // } - #[test] - fn update_connection_id() { - make_test("delete-connection-id").run(); - } + // #[test] + // fn update_connection_id() { + // make_test("delete-connection-id").run(); + // } - #[test] - fn insert_timestamp() { - make_test("insert-timestamp").run(); - } + // #[test] + // fn insert_timestamp() { + // make_test("insert-timestamp").run(); + // } - #[test] - fn insert_call_uuid_v4() { - make_test("insert-call-uuid-v4").run(); - } + // #[test] + // fn insert_call_uuid_v4() { + // make_test("insert-call-uuid-v4").run(); + // } - #[test] - fn insert_call_uuid_v7() { - make_test("insert-call-uuid-v7").run(); - } + // #[test] + // fn insert_call_uuid_v7() { + // make_test("insert-call-uuid-v7").run(); + // } - #[test] - fn insert_uuid() { - make_test("insert-uuid").run(); - } + // #[test] + // fn insert_uuid() { + // make_test("insert-uuid").run(); + // } - #[test] - fn delete_uuid() { - make_test("delete-uuid").run(); - } + // #[test] + // fn delete_uuid() { + // make_test("delete-uuid").run(); + // } - #[test] - fn update_uuid() { - make_test("delete-uuid").run(); - } + // #[test] + // fn update_uuid() { + // make_test("delete-uuid").run(); + // } - #[test] - fn on_reducer() { - make_test("on-reducer").run(); - } + // #[test] + // fn on_reducer() { + // make_test("on-reducer").run(); + // } #[test] fn fail_reducer() { make_test("fail-reducer").run(); } - #[test] - fn insert_vec() { - make_test("insert-vec").run(); - } + // #[test] + // fn insert_vec() { + // make_test("insert-vec").run(); + // } #[test] fn insert_option_some() { make_test("insert-option-some").run(); } - #[test] - fn insert_option_none() { - make_test("insert-option-none").run(); - } - - #[test] - fn insert_struct() { - make_test("insert-struct").run(); - } + // #[test] + // fn insert_option_none() { + // make_test("insert-option-none").run(); + // } - #[test] - fn insert_simple_enum() { - make_test("insert-simple-enum").run(); - } + // #[test] + // fn insert_struct() { + // make_test("insert-struct").run(); + // } - #[test] - fn insert_enum_with_payload() { - make_test("insert-enum-with-payload").run(); - } + // #[test] + // fn insert_simple_enum() { + // make_test("insert-simple-enum").run(); + // } - #[test] - fn insert_delete_large_table() { - make_test("insert-delete-large-table").run(); - } + // #[test] + // fn insert_enum_with_payload() { + // make_test("insert-enum-with-payload").run(); + // } - #[test] - fn insert_primitives_as_strings() { - make_test("insert-primitives-as-strings").run(); - } + // #[test] + // fn insert_delete_large_table() { + // make_test("insert-delete-large-table").run(); + // } // #[test] - // fn resubscribe() { - // make_test("resubscribe").run(); + // fn insert_primitives_as_strings() { + // make_test("insert-primitives-as-strings").run(); // } - #[test] - #[should_panic] - fn should_fail() { - make_test("should-fail").run(); - } + // // #[test] + // // fn resubscribe() { + // // make_test("resubscribe").run(); + // // } - #[test] - fn reauth() { - make_test("reauth-part-1").run(); - make_test("reauth-part-2").run(); - } + // #[test] + // #[should_panic] + // fn should_fail() { + // make_test("should-fail").run(); + // } - #[test] - fn reconnect_different_connection_id() { - make_test("reconnect-different-connection-id").run(); - } + // #[test] + // fn reauth() { + // make_test("reauth-part-1").run(); + // make_test("reauth-part-2").run(); + // } - #[test] - fn connect_disconnect_callbacks() { - Test::builder() - .with_name(concat!("connect-disconnect-callback-", stringify!($lang))) - .with_module(concat!("sdk-test-connect-disconnect", $suffix)) - .with_client(concat!( - env!("CARGO_MANIFEST_DIR"), - "/tests/connect_disconnect_client" - )) - .with_language("rust") - // We test against multiple modules in different languages, - // and as of writing (pgoldman 2026-02-12), - // some of those languages have not yet been updated to make scheduled and lifecycle reducers - // private by default. As such, generating only public items results in different bindings - // depending on which module is the source. - .with_generate_private_items(true) - .with_bindings_dir("src/module_bindings") - .with_compile_command("cargo build") - .with_run_command("cargo run") - .build() - .run(); - } + // #[test] + // fn reconnect_different_connection_id() { + // make_test("reconnect-different-connection-id").run(); + // } - #[test] - fn caller_always_notified() { - make_test("caller-always-notified").run(); - } + // #[test] + // fn connect_disconnect_callbacks() { + // Test::builder() + // .with_name(concat!("connect-disconnect-callback-", stringify!($lang))) + // .with_module(concat!("sdk-test-connect-disconnect", $suffix)) + // .with_client(concat!( + // env!("CARGO_MANIFEST_DIR"), + // "/tests/connect_disconnect_client" + // )) + // .with_language("rust") + // // We test against multiple modules in different languages, + // // and as of writing (pgoldman 2026-02-12), + // // some of those languages have not yet been updated to make scheduled and lifecycle reducers + // // private by default. As such, generating only public items results in different bindings + // // depending on which module is the source. + // .with_generate_private_items(true) + // .with_bindings_dir("src/module_bindings") + // .with_compile_command("cargo build") + // .with_run_command("cargo run") + // .build() + // .run(); + // } - #[test] - // This test is currently broken due to our use of `with_generate_private_items(true)`. - // Codegen will include private tables in the list of all tables, - // meaning `subscribe_to_all_tables` will attempt to subscribe to private tables, - // which will fail due to the client not being privileged. - // TODO: once all modules are updated for `RawModuleDefV10`, disable generating private items in `make_test`, - // and re-enable this test. - // Alternatively, either split this test out into a separate module/client pair which runs only against V10 modules, - // or mark every table in the `sdk-test` family of modules `public`. - #[should_panic] - fn subscribe_all_select_star() { - make_test("subscribe-all-select-star").run(); - } + // #[test] + // fn caller_always_notified() { + // make_test("caller-always-notified").run(); + // } - #[test] - fn caller_alice_receives_reducer_callback_but_not_bob() { - make_test("caller-alice-receives-reducer-callback-but-not-bob").run(); - } + // #[test] + // // This test is currently broken due to our use of `with_generate_private_items(true)`. + // // Codegen will include private tables in the list of all tables, + // // meaning `subscribe_to_all_tables` will attempt to subscribe to private tables, + // // which will fail due to the client not being privileged. + // // TODO: once all modules are updated for `RawModuleDefV10`, disable generating private items in `make_test`, + // // and re-enable this test. + // // Alternatively, either split this test out into a separate module/client pair which runs only against V10 modules, + // // or mark every table in the `sdk-test` family of modules `public`. + // #[should_panic] + // fn subscribe_all_select_star() { + // make_test("subscribe-all-select-star").run(); + // } - #[test] - fn row_deduplication() { - make_test("row-deduplication").run(); - } + // #[test] + // fn caller_alice_receives_reducer_callback_but_not_bob() { + // make_test("caller-alice-receives-reducer-callback-but-not-bob").run(); + // } - #[test] - fn row_deduplication_join_r_and_s() { - make_test("row-deduplication-join-r-and-s").run(); - } + // #[test] + // fn row_deduplication() { + // make_test("row-deduplication").run(); + // } - #[test] - fn row_deduplication_r_join_s_and_r_join_t8() { - make_test("row-deduplication-r-join-s-and-r-joint").run(); - } + // #[test] + // fn row_deduplication_join_r_and_s() { + // make_test("row-deduplication-join-r-and-s").run(); + // } - #[test] - fn test_lhs_join_update() { - make_test("test-lhs-join-update").run() - } + // #[test] + // fn row_deduplication_r_join_s_and_r_join_t8() { + // make_test("row-deduplication-r-join-s-and-r-joint").run(); + // } - #[test] - fn test_lhs_join_update_disjoint_queries() { - make_test("test-lhs-join-update-disjoint-queries").run() - } + // #[test] + // fn test_lhs_join_update() { + // make_test("test-lhs-join-update").run() + // } - #[test] - fn test_intra_query_bag_semantics_for_join() { - make_test("test-intra-query-bag-semantics-for-join").run() - } + // #[test] + // fn test_lhs_join_update_disjoint_queries() { + // make_test("test-lhs-join-update-disjoint-queries").run() + // } - #[test] - fn two_different_compression_algos() { - make_test("two-different-compression-algos").run(); - } + // #[test] + // fn test_intra_query_bag_semantics_for_join() { + // make_test("test-intra-query-bag-semantics-for-join").run() + // } - #[test] - fn test_parameterized_subscription() { - make_test("test-parameterized-subscription").run(); - } + // #[test] + // fn two_different_compression_algos() { + // make_test("two-different-compression-algos").run(); + // } - #[test] - fn test_rls_subscription() { - make_test("test-rls-subscription").run() - } + // #[test] + // fn test_parameterized_subscription() { + // make_test("test-parameterized-subscription").run(); + // } - #[test] - fn pk_simple_enum() { - make_test("pk-simple-enum").run(); - } + // #[test] + // fn test_rls_subscription() { + // make_test("test-rls-subscription").run() + // } - #[test] - fn indexed_simple_enum() { - make_test("indexed-simple-enum").run(); - } + // #[test] + // fn pk_simple_enum() { + // make_test("pk-simple-enum").run(); + // } - #[test] - fn overlapping_subscriptions() { - make_test("overlapping-subscriptions").run(); - } + // #[test] + // fn indexed_simple_enum() { + // make_test("indexed-simple-enum").run(); + // } - #[test] - fn sorted_uuids_insert() { - make_test("sorted-uuids-insert").run(); - } + // #[test] + // fn overlapping_subscriptions() { + // make_test("overlapping-subscriptions").run(); + // } + + // #[test] + // fn sorted_uuids_insert() { + // make_test("sorted-uuids-insert").run(); + // } } }; } From 0b0c6d86720c56a097fda6c4f3725f6b2d0aaddc Mon Sep 17 00:00:00 2001 From: Shubham Mishra Date: Thu, 19 Feb 2026 19:40:14 +0530 Subject: [PATCH 112/133] uncomment tests --- sdks/rust/tests/test-client/src/main.rs | 138 ++++---- sdks/rust/tests/test.rs | 448 ++++++++++++------------ 2 files changed, 293 insertions(+), 293 deletions(-) diff --git a/sdks/rust/tests/test-client/src/main.rs b/sdks/rust/tests/test-client/src/main.rs index 4bde4d14a42..53b9c5e5606 100644 --- a/sdks/rust/tests/test-client/src/main.rs +++ b/sdks/rust/tests/test-client/src/main.rs @@ -72,75 +72,75 @@ fn main() { .expect("Pass a test name as a command-line argument to the test client"); match &*test { - // "insert-primitive" => exec_insert_primitive(), - // "subscribe-and-cancel" => exec_subscribe_and_cancel(), - // "subscribe-and-unsubscribe" => exec_subscribe_and_unsubscribe(), - // "subscription-error-smoke-test" => exec_subscription_error_smoke_test(), - // "delete-primitive" => exec_delete_primitive(), - // "update-primitive" => exec_update_primitive(), - - // "insert-identity" => exec_insert_identity(), - // "insert-caller-identity" => exec_insert_caller_identity(), - // "delete-identity" => exec_delete_identity(), - // "update-identity" => exec_update_identity(), - - // "insert-connection-id" => exec_insert_connection_id(), - // "insert-caller-connection-id" => exec_insert_caller_connection_id(), - // "delete-connection-id" => exec_delete_connection_id(), - // "update-connection-id" => exec_update_connection_id(), - - // "insert-timestamp" => exec_insert_timestamp(), - // "insert-call-timestamp" => exec_insert_call_timestamp(), - - // "insert-uuid" => exec_insert_uuid(), - // "insert-call-uuid-v4" => exec_insert_caller_uuid_v4(), - // "insert-call-uuid-v7" => exec_insert_caller_uuid_v7(), - // "delete-uuid" => exec_delete_uuid(), - // "update-uuid" => exec_update_uuid(), - - // "on-reducer" => exec_on_reducer(), - "fail-reducer" => exec_fail_reducer(), - - // "insert-vec" => exec_insert_vec(), - "insert-option-some" => exec_insert_option_some(), - // "insert-option-none" => exec_insert_option_none(), - // "insert-struct" => exec_insert_struct(), - // "insert-simple-enum" => exec_insert_simple_enum(), - // "insert-enum-with-payload" => exec_insert_enum_with_payload(), - - // "insert-delete-large-table" => exec_insert_delete_large_table(), - - // "insert-primitives-as-strings" => exec_insert_primitives_as_strings(), - - // // "resubscribe" => exec_resubscribe(), - // // - // "reauth-part-1" => exec_reauth_part_1(), - // "reauth-part-2" => exec_reauth_part_2(), - - // "should-fail" => exec_should_fail(), - - // "reconnect-different-connection-id" => exec_reconnect_different_connection_id(), - // "caller-always-notified" => exec_caller_always_notified(), - - // "subscribe-all-select-star" => exec_subscribe_all_select_star(), - // "caller-alice-receives-reducer-callback-but-not-bob" => { - // exec_caller_alice_receives_reducer_callback_but_not_bob() - // } - // "row-deduplication" => exec_row_deduplication(), - // "row-deduplication-join-r-and-s" => exec_row_deduplication_join_r_and_s(), - // "row-deduplication-r-join-s-and-r-joint" => exec_row_deduplication_r_join_s_and_r_join_t(), - // "test-lhs-join-update" => test_lhs_join_update(), - // "test-lhs-join-update-disjoint-queries" => test_lhs_join_update_disjoint_queries(), - // "test-intra-query-bag-semantics-for-join" => test_intra_query_bag_semantics_for_join(), - // "two-different-compression-algos" => exec_two_different_compression_algos(), - // "test-parameterized-subscription" => test_parameterized_subscription(), - // "test-rls-subscription" => test_rls_subscription(), - // "pk-simple-enum" => exec_pk_simple_enum(), - // "indexed-simple-enum" => exec_indexed_simple_enum(), - - // "overlapping-subscriptions" => exec_overlapping_subscriptions(), - - // "sorted-uuids-insert" => exec_sorted_uuids_insert(), + "insert-primitive" => exec_insert_primitive(), + "subscribe-and-cancel" => exec_subscribe_and_cancel(), + "subscribe-and-unsubscribe" => exec_subscribe_and_unsubscribe(), + "subscription-error-smoke-test" => exec_subscription_error_smoke_test(), + "delete-primitive" => exec_delete_primitive(), + "update-primitive" => exec_update_primitive(), + + "insert-identity" => exec_insert_identity(), + "insert-caller-identity" => exec_insert_caller_identity(), + "delete-identity" => exec_delete_identity(), + "update-identity" => exec_update_identity(), + + "insert-connection-id" => exec_insert_connection_id(), + "insert-caller-connection-id" => exec_insert_caller_connection_id(), + "delete-connection-id" => exec_delete_connection_id(), + "update-connection-id" => exec_update_connection_id(), + + "insert-timestamp" => exec_insert_timestamp(), + "insert-call-timestamp" => exec_insert_call_timestamp(), + + "insert-uuid" => exec_insert_uuid(), + "insert-call-uuid-v4" => exec_insert_caller_uuid_v4(), + "insert-call-uuid-v7" => exec_insert_caller_uuid_v7(), + "delete-uuid" => exec_delete_uuid(), + "update-uuid" => exec_update_uuid(), + + "on-reducer" => exec_on_reducer(), + "fail-reducer" => exec_fail_reducer(), + + "insert-vec" => exec_insert_vec(), + "insert-option-some" => exec_insert_option_some(), + "insert-option-none" => exec_insert_option_none(), + "insert-struct" => exec_insert_struct(), + "insert-simple-enum" => exec_insert_simple_enum(), + "insert-enum-with-payload" => exec_insert_enum_with_payload(), + + "insert-delete-large-table" => exec_insert_delete_large_table(), + + "insert-primitives-as-strings" => exec_insert_primitives_as_strings(), + + // "resubscribe" => exec_resubscribe(), + // + "reauth-part-1" => exec_reauth_part_1(), + "reauth-part-2" => exec_reauth_part_2(), + + "should-fail" => exec_should_fail(), + + "reconnect-different-connection-id" => exec_reconnect_different_connection_id(), + "caller-always-notified" => exec_caller_always_notified(), + + "subscribe-all-select-star" => exec_subscribe_all_select_star(), + "caller-alice-receives-reducer-callback-but-not-bob" => { + exec_caller_alice_receives_reducer_callback_but_not_bob() + } + "row-deduplication" => exec_row_deduplication(), + "row-deduplication-join-r-and-s" => exec_row_deduplication_join_r_and_s(), + "row-deduplication-r-join-s-and-r-joint" => exec_row_deduplication_r_join_s_and_r_join_t(), + "test-lhs-join-update" => test_lhs_join_update(), + "test-lhs-join-update-disjoint-queries" => test_lhs_join_update_disjoint_queries(), + "test-intra-query-bag-semantics-for-join" => test_intra_query_bag_semantics_for_join(), + "two-different-compression-algos" => exec_two_different_compression_algos(), + "test-parameterized-subscription" => test_parameterized_subscription(), + "test-rls-subscription" => test_rls_subscription(), + "pk-simple-enum" => exec_pk_simple_enum(), + "indexed-simple-enum" => exec_indexed_simple_enum(), + + "overlapping-subscriptions" => exec_overlapping_subscriptions(), + + "sorted-uuids-insert" => exec_sorted_uuids_insert(), _ => panic!("Unknown test: {test}"), } diff --git a/sdks/rust/tests/test.rs b/sdks/rust/tests/test.rs index 2a09fa794f8..d6c5cac38ae 100644 --- a/sdks/rust/tests/test.rs +++ b/sdks/rust/tests/test.rs @@ -24,288 +24,288 @@ macro_rules! declare_tests_with_suffix { .build() } - // #[test] - // fn insert_primitive() { - // make_test("insert-primitive").run(); - // } + #[test] + fn insert_primitive() { + make_test("insert-primitive").run(); + } - // #[test] - // fn subscribe_and_cancel() { - // make_test("subscribe-and-cancel").run(); - // } + #[test] + fn subscribe_and_cancel() { + make_test("subscribe-and-cancel").run(); + } - // #[test] - // fn subscribe_and_unsubscribe() { - // make_test("subscribe-and-unsubscribe").run(); - // } + #[test] + fn subscribe_and_unsubscribe() { + make_test("subscribe-and-unsubscribe").run(); + } - // #[test] - // fn subscription_error_smoke_test() { - // make_test("subscription-error-smoke-test").run(); - // } - // #[test] - // fn delete_primitive() { - // make_test("delete-primitive").run(); - // } + #[test] + fn subscription_error_smoke_test() { + make_test("subscription-error-smoke-test").run(); + } + #[test] + fn delete_primitive() { + make_test("delete-primitive").run(); + } - // #[test] - // fn update_primitive() { - // make_test("update-primitive").run(); - // } + #[test] + fn update_primitive() { + make_test("update-primitive").run(); + } - // #[test] - // fn insert_identity() { - // make_test("insert-identity").run(); - // } + #[test] + fn insert_identity() { + make_test("insert-identity").run(); + } - // #[test] - // fn insert_caller_identity() { - // make_test("insert-caller-identity").run(); - // } + #[test] + fn insert_caller_identity() { + make_test("insert-caller-identity").run(); + } - // #[test] - // fn delete_identity() { - // make_test("delete-identity").run(); - // } + #[test] + fn delete_identity() { + make_test("delete-identity").run(); + } - // #[test] - // fn update_identity() { - // make_test("delete-identity").run(); - // } + #[test] + fn update_identity() { + make_test("delete-identity").run(); + } - // #[test] - // fn insert_connection_id() { - // make_test("insert-connection-id").run(); - // } + #[test] + fn insert_connection_id() { + make_test("insert-connection-id").run(); + } - // #[test] - // fn insert_caller_connection_id() { - // make_test("insert-caller-connection-id").run(); - // } + #[test] + fn insert_caller_connection_id() { + make_test("insert-caller-connection-id").run(); + } - // #[test] - // fn delete_connection_id() { - // make_test("delete-connection-id").run(); - // } + #[test] + fn delete_connection_id() { + make_test("delete-connection-id").run(); + } - // #[test] - // fn update_connection_id() { - // make_test("delete-connection-id").run(); - // } + #[test] + fn update_connection_id() { + make_test("delete-connection-id").run(); + } - // #[test] - // fn insert_timestamp() { - // make_test("insert-timestamp").run(); - // } + #[test] + fn insert_timestamp() { + make_test("insert-timestamp").run(); + } - // #[test] - // fn insert_call_uuid_v4() { - // make_test("insert-call-uuid-v4").run(); - // } + #[test] + fn insert_call_uuid_v4() { + make_test("insert-call-uuid-v4").run(); + } - // #[test] - // fn insert_call_uuid_v7() { - // make_test("insert-call-uuid-v7").run(); - // } + #[test] + fn insert_call_uuid_v7() { + make_test("insert-call-uuid-v7").run(); + } - // #[test] - // fn insert_uuid() { - // make_test("insert-uuid").run(); - // } + #[test] + fn insert_uuid() { + make_test("insert-uuid").run(); + } - // #[test] - // fn delete_uuid() { - // make_test("delete-uuid").run(); - // } + #[test] + fn delete_uuid() { + make_test("delete-uuid").run(); + } - // #[test] - // fn update_uuid() { - // make_test("delete-uuid").run(); - // } + #[test] + fn update_uuid() { + make_test("delete-uuid").run(); + } - // #[test] - // fn on_reducer() { - // make_test("on-reducer").run(); - // } + #[test] + fn on_reducer() { + make_test("on-reducer").run(); + } #[test] fn fail_reducer() { make_test("fail-reducer").run(); } - // #[test] - // fn insert_vec() { - // make_test("insert-vec").run(); - // } + #[test] + fn insert_vec() { + make_test("insert-vec").run(); + } #[test] fn insert_option_some() { make_test("insert-option-some").run(); } - // #[test] - // fn insert_option_none() { - // make_test("insert-option-none").run(); - // } - - // #[test] - // fn insert_struct() { - // make_test("insert-struct").run(); - // } + #[test] + fn insert_option_none() { + make_test("insert-option-none").run(); + } - // #[test] - // fn insert_simple_enum() { - // make_test("insert-simple-enum").run(); - // } + #[test] + fn insert_struct() { + make_test("insert-struct").run(); + } - // #[test] - // fn insert_enum_with_payload() { - // make_test("insert-enum-with-payload").run(); - // } + #[test] + fn insert_simple_enum() { + make_test("insert-simple-enum").run(); + } - // #[test] - // fn insert_delete_large_table() { - // make_test("insert-delete-large-table").run(); - // } + #[test] + fn insert_enum_with_payload() { + make_test("insert-enum-with-payload").run(); + } - // #[test] - // fn insert_primitives_as_strings() { - // make_test("insert-primitives-as-strings").run(); - // } + #[test] + fn insert_delete_large_table() { + make_test("insert-delete-large-table").run(); + } - // // #[test] - // // fn resubscribe() { - // // make_test("resubscribe").run(); - // // } + #[test] + fn insert_primitives_as_strings() { + make_test("insert-primitives-as-strings").run(); + } // #[test] - // #[should_panic] - // fn should_fail() { - // make_test("should-fail").run(); + // fn resubscribe() { + // make_test("resubscribe").run(); // } - // #[test] - // fn reauth() { - // make_test("reauth-part-1").run(); - // make_test("reauth-part-2").run(); - // } + #[test] + #[should_panic] + fn should_fail() { + make_test("should-fail").run(); + } - // #[test] - // fn reconnect_different_connection_id() { - // make_test("reconnect-different-connection-id").run(); - // } + #[test] + fn reauth() { + make_test("reauth-part-1").run(); + make_test("reauth-part-2").run(); + } - // #[test] - // fn connect_disconnect_callbacks() { - // Test::builder() - // .with_name(concat!("connect-disconnect-callback-", stringify!($lang))) - // .with_module(concat!("sdk-test-connect-disconnect", $suffix)) - // .with_client(concat!( - // env!("CARGO_MANIFEST_DIR"), - // "/tests/connect_disconnect_client" - // )) - // .with_language("rust") - // // We test against multiple modules in different languages, - // // and as of writing (pgoldman 2026-02-12), - // // some of those languages have not yet been updated to make scheduled and lifecycle reducers - // // private by default. As such, generating only public items results in different bindings - // // depending on which module is the source. - // .with_generate_private_items(true) - // .with_bindings_dir("src/module_bindings") - // .with_compile_command("cargo build") - // .with_run_command("cargo run") - // .build() - // .run(); - // } + #[test] + fn reconnect_different_connection_id() { + make_test("reconnect-different-connection-id").run(); + } - // #[test] - // fn caller_always_notified() { - // make_test("caller-always-notified").run(); - // } + #[test] + fn connect_disconnect_callbacks() { + Test::builder() + .with_name(concat!("connect-disconnect-callback-", stringify!($lang))) + .with_module(concat!("sdk-test-connect-disconnect", $suffix)) + .with_client(concat!( + env!("CARGO_MANIFEST_DIR"), + "/tests/connect_disconnect_client" + )) + .with_language("rust") + // We test against multiple modules in different languages, + // and as of writing (pgoldman 2026-02-12), + // some of those languages have not yet been updated to make scheduled and lifecycle reducers + // private by default. As such, generating only public items results in different bindings + // depending on which module is the source. + .with_generate_private_items(true) + .with_bindings_dir("src/module_bindings") + .with_compile_command("cargo build") + .with_run_command("cargo run") + .build() + .run(); + } - // #[test] - // // This test is currently broken due to our use of `with_generate_private_items(true)`. - // // Codegen will include private tables in the list of all tables, - // // meaning `subscribe_to_all_tables` will attempt to subscribe to private tables, - // // which will fail due to the client not being privileged. - // // TODO: once all modules are updated for `RawModuleDefV10`, disable generating private items in `make_test`, - // // and re-enable this test. - // // Alternatively, either split this test out into a separate module/client pair which runs only against V10 modules, - // // or mark every table in the `sdk-test` family of modules `public`. - // #[should_panic] - // fn subscribe_all_select_star() { - // make_test("subscribe-all-select-star").run(); - // } + #[test] + fn caller_always_notified() { + make_test("caller-always-notified").run(); + } - // #[test] - // fn caller_alice_receives_reducer_callback_but_not_bob() { - // make_test("caller-alice-receives-reducer-callback-but-not-bob").run(); - // } + #[test] + // This test is currently broken due to our use of `with_generate_private_items(true)`. + // Codegen will include private tables in the list of all tables, + // meaning `subscribe_to_all_tables` will attempt to subscribe to private tables, + // which will fail due to the client not being privileged. + // TODO: once all modules are updated for `RawModuleDefV10`, disable generating private items in `make_test`, + // and re-enable this test. + // Alternatively, either split this test out into a separate module/client pair which runs only against V10 modules, + // or mark every table in the `sdk-test` family of modules `public`. + #[should_panic] + fn subscribe_all_select_star() { + make_test("subscribe-all-select-star").run(); + } - // #[test] - // fn row_deduplication() { - // make_test("row-deduplication").run(); - // } + #[test] + fn caller_alice_receives_reducer_callback_but_not_bob() { + make_test("caller-alice-receives-reducer-callback-but-not-bob").run(); + } - // #[test] - // fn row_deduplication_join_r_and_s() { - // make_test("row-deduplication-join-r-and-s").run(); - // } + #[test] + fn row_deduplication() { + make_test("row-deduplication").run(); + } - // #[test] - // fn row_deduplication_r_join_s_and_r_join_t8() { - // make_test("row-deduplication-r-join-s-and-r-joint").run(); - // } + #[test] + fn row_deduplication_join_r_and_s() { + make_test("row-deduplication-join-r-and-s").run(); + } - // #[test] - // fn test_lhs_join_update() { - // make_test("test-lhs-join-update").run() - // } + #[test] + fn row_deduplication_r_join_s_and_r_join_t8() { + make_test("row-deduplication-r-join-s-and-r-joint").run(); + } - // #[test] - // fn test_lhs_join_update_disjoint_queries() { - // make_test("test-lhs-join-update-disjoint-queries").run() - // } + #[test] + fn test_lhs_join_update() { + make_test("test-lhs-join-update").run() + } - // #[test] - // fn test_intra_query_bag_semantics_for_join() { - // make_test("test-intra-query-bag-semantics-for-join").run() - // } + #[test] + fn test_lhs_join_update_disjoint_queries() { + make_test("test-lhs-join-update-disjoint-queries").run() + } - // #[test] - // fn two_different_compression_algos() { - // make_test("two-different-compression-algos").run(); - // } + #[test] + fn test_intra_query_bag_semantics_for_join() { + make_test("test-intra-query-bag-semantics-for-join").run() + } - // #[test] - // fn test_parameterized_subscription() { - // make_test("test-parameterized-subscription").run(); - // } + #[test] + fn two_different_compression_algos() { + make_test("two-different-compression-algos").run(); + } - // #[test] - // fn test_rls_subscription() { - // make_test("test-rls-subscription").run() - // } + #[test] + fn test_parameterized_subscription() { + make_test("test-parameterized-subscription").run(); + } - // #[test] - // fn pk_simple_enum() { - // make_test("pk-simple-enum").run(); - // } + #[test] + fn test_rls_subscription() { + make_test("test-rls-subscription").run() + } - // #[test] - // fn indexed_simple_enum() { - // make_test("indexed-simple-enum").run(); - // } + #[test] + fn pk_simple_enum() { + make_test("pk-simple-enum").run(); + } - // #[test] - // fn overlapping_subscriptions() { - // make_test("overlapping-subscriptions").run(); - // } + #[test] + fn indexed_simple_enum() { + make_test("indexed-simple-enum").run(); + } - // #[test] - // fn sorted_uuids_insert() { - // make_test("sorted-uuids-insert").run(); - // } + #[test] + fn overlapping_subscriptions() { + make_test("overlapping-subscriptions").run(); + } + + #[test] + fn sorted_uuids_insert() { + make_test("sorted-uuids-insert").run(); + } } }; } From f675259a26d0d36375108cd7f19e9f5bda19b648 Mon Sep 17 00:00:00 2001 From: Shubham Mishra Date: Thu, 19 Feb 2026 19:58:45 +0530 Subject: [PATCH 113/133] undo test connect disocnnect --- modules/sdk-test-connect-disconnect-ts/src/index.ts | 2 +- templates/chat-react-ts/src/module_bindings/index.ts | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/modules/sdk-test-connect-disconnect-ts/src/index.ts b/modules/sdk-test-connect-disconnect-ts/src/index.ts index d57f9549740..85c6b0c17eb 100644 --- a/modules/sdk-test-connect-disconnect-ts/src/index.ts +++ b/modules/sdk-test-connect-disconnect-ts/src/index.ts @@ -1,4 +1,4 @@ -a// ───────────────────────────────────────────────────────────────────────────── +// ───────────────────────────────────────────────────────────────────────────── // IMPORTS // ───────────────────────────────────────────────────────────────────────────── import { schema, t, table } from 'spacetimedb/server'; diff --git a/templates/chat-react-ts/src/module_bindings/index.ts b/templates/chat-react-ts/src/module_bindings/index.ts index 43cce990e59..3c3447a0a1a 100644 --- a/templates/chat-react-ts/src/module_bindings/index.ts +++ b/templates/chat-react-ts/src/module_bindings/index.ts @@ -59,11 +59,7 @@ const tablesSchema = __schema({ { name: 'user', indexes: [ - { - name: 'identity', - algorithm: 'btree', - columns: ['identity'], - }, + { name: 'identity', algorithm: 'btree', columns: ['identity'] }, ], constraints: [ { From 4cce69765507c1815979d39572b4a52864f5c3d2 Mon Sep 17 00:00:00 2001 From: Shubham Mishra Date: Thu, 19 Feb 2026 21:02:43 +0530 Subject: [PATCH 114/133] fix smoketest to green --- crates/smoketests/tests/pg_wire.rs | 14 +++++++------- smoketests/tests/add_remove_index.py | 2 +- smoketests/tests/sql.py | 4 ++-- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/crates/smoketests/tests/pg_wire.rs b/crates/smoketests/tests/pg_wire.rs index 2ec2aafa518..376adbcc4be 100644 --- a/crates/smoketests/tests/pg_wire.rs +++ b/crates/smoketests/tests/pg_wire.rs @@ -20,7 +20,7 @@ fn test_sql_format() { test.assert_psql( "quickstart", "SELECT * FROM t_ints", - r#" i_8 | i_16 | i_32 | i_64 | i_128 | i_256 + r#"i_8 | i_16 | i_32 | i_64 | i_128 | i_256 -----+-------+--------+----------+---------------+--------------- -25 | -3224 | -23443 | -2344353 | -234434897853 | -234434897853 (1 row)"#, @@ -30,7 +30,7 @@ fn test_sql_format() { "quickstart", "SELECT * FROM t_ints_tuple", r#"tuple -------------------------------------------------------------------------------------------------------------- +--------------------------------------------------------------------------------------------------------------- {"i_8": -25, "i_16": -3224, "i_32": -23443, "i_64": -2344353, "i_128": -234434897853, "i_256": -234434897853} (1 row)"#, ); @@ -38,7 +38,7 @@ fn test_sql_format() { test.assert_psql( "quickstart", "SELECT * FROM t_uints", - r#"u_8 | u_16 | u_32 | u_64 | u_128 | u_256 + r#"u_8 | u_16 | u_32 | u_64 | u_128 | u_256 -----+------+-------+----------+---------------+--------------- 105 | 1050 | 83892 | 48937498 | 4378528978889 | 4378528978889 (1 row)"#, @@ -48,7 +48,7 @@ fn test_sql_format() { "quickstart", "SELECT * FROM t_uints_tuple", r#"tuple ------------------------------------------------------------------------------------------------------------ +------------------------------------------------------------------------------------------------------------- {"u_8": 105, "u_16": 1050, "u_32": 83892, "u_64": 48937498, "u_128": 4378528978889, "u_256": 4378528978889} (1 row)"#, ); @@ -58,8 +58,8 @@ fn test_sql_format() { "SELECT * FROM t_simple_enum", r#"id | action ----+---------- - 1 | Inactive - 2 | Active + 1 | inactive + 2 | active (2 rows)"#, ); @@ -68,7 +68,7 @@ fn test_sql_format() { "SELECT * FROM t_enum", r#"id | color ----+--------------- - 1 | {"Gray": 128} + 1 | {"gray": 128} (1 row)"#, ); } diff --git a/smoketests/tests/add_remove_index.py b/smoketests/tests/add_remove_index.py index 9d407c28261..6d06b8a2d54 100644 --- a/smoketests/tests/add_remove_index.py +++ b/smoketests/tests/add_remove_index.py @@ -45,7 +45,7 @@ class AddRemoveIndex(Smoketest): } """ - JOIN_QUERY = "select t1.* from t_1 join t_2 on t_1.id = t_2.id where t_2.id = 1001" + JOIN_QUERY = "select t_1.* from t_1 join t_2 on t_1.id = t_2.id where t_2.id = 1001" def between_publishes(self): """ diff --git a/smoketests/tests/sql.py b/smoketests/tests/sql.py index bd61fc9c248..97d3c6da488 100644 --- a/smoketests/tests/sql.py +++ b/smoketests/tests/sql.py @@ -165,10 +165,10 @@ def test_sql_format(self): self.assertSql("SELECT * FROM t_enums", """\ bool_opt | bool_result | action ---------------+--------------+--------------- - (some = true) | (ok = false) | (Active = ()) + (some = true) | (ok = false) | (active = ()) """) self.assertSql("SELECT * FROM t_enums_tuple", """\ tuple -------------------------------------------------------------------------------- - (bool_opt = (some = true), bool_result = (ok = false), action = (Active = ())) + (bool_opt = (some = true), bool_result = (ok = false), action = (active = ())) """) From faa1437b2394eb9a3a313647bccb943f423980f1 Mon Sep 17 00:00:00 2001 From: Shubham Mishra Date: Thu, 19 Feb 2026 21:45:59 +0530 Subject: [PATCH 115/133] increase counter --- sdks/rust/tests/test-counter/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdks/rust/tests/test-counter/src/lib.rs b/sdks/rust/tests/test-counter/src/lib.rs index 8f74323ef62..3eb8eb2f305 100644 --- a/sdks/rust/tests/test-counter/src/lib.rs +++ b/sdks/rust/tests/test-counter/src/lib.rs @@ -6,7 +6,7 @@ use std::{ time::Duration, }; -const TEST_TIMEOUT_SECS: u64 = 2 * 60; +const TEST_TIMEOUT_SECS: u64 = 5 * 60; #[derive(Default)] struct TestCounterInner { From 1896274596aba69f12bda998e0af31f7698ba9cf Mon Sep 17 00:00:00 2001 From: clockwork-labs-bot Date: Thu, 19 Feb 2026 12:27:36 -0500 Subject: [PATCH 116/133] Re-enable bench tests for case conversion PR (#4352) Branched from `shub/case-conversion` (#4263). Re-enables the four bench tests that were commented out during the case conversion work: - `test_basic_invariants_sqlite` - `test_basic_invariants_spacetime_raw` - `test_basic_invariants_spacetime_module_rust` - `test_basic_invariants_spacetime_module_csharp` Restores `serial_test` import and `#[serial]` attributes. Only changes `crates/bench/src/lib.rs`. Compiles clean locally (`cargo test -p spacetimedb-bench --no-run`). cc @Shubham8287 --------- Co-authored-by: clockwork-labs-bot --- Cargo.lock | 1 + crates/bench/Cargo.toml | 1 + crates/bench/src/lib.rs | 22 +++++++++++----------- crates/bench/src/spacetime_module.rs | 10 ++++++++-- 4 files changed, 21 insertions(+), 13 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index d0576a262f6..55a28869e85 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -7497,6 +7497,7 @@ dependencies = [ "anymap", "byte-unit", "clap 4.5.50", + "convert_case 0.6.0", "criterion", "foldhash 0.2.0", "futures", diff --git a/crates/bench/Cargo.toml b/crates/bench/Cargo.toml index 5a77113c435..115eb115022 100644 --- a/crates/bench/Cargo.toml +++ b/crates/bench/Cargo.toml @@ -55,6 +55,7 @@ spacetimedb-testing = { path = "../testing" } ahash.workspace = true anyhow.workspace = true +convert_case.workspace = true anymap.workspace = true byte-unit.workspace = true clap.workspace = true diff --git a/crates/bench/src/lib.rs b/crates/bench/src/lib.rs index 718a36a14a6..ce56b2e12e8 100644 --- a/crates/bench/src/lib.rs +++ b/crates/bench/src/lib.rs @@ -16,6 +16,7 @@ mod tests { sqlite::SQLite, ResultBench, }; + use serial_test::serial; use spacetimedb_testing::modules::{Csharp, Rust}; use std::{io, path::Path, sync::Once}; use tracing_subscriber::{layer::SubscriberExt, util::SubscriberInitExt}; @@ -102,7 +103,6 @@ mod tests { Ok(()) } - #[allow(dead_code)] fn test_basic_invariants() -> ResultBench<()> { basic_invariants::(IndexStrategy::Unique0, true)?; basic_invariants::(IndexStrategy::Unique0, true)?; @@ -111,13 +111,13 @@ mod tests { Ok(()) } - // #[test] - fn _test_basic_invariants_sqlite() -> ResultBench<()> { + #[test] + fn test_basic_invariants_sqlite() -> ResultBench<()> { test_basic_invariants::() } - // #[test] - fn _test_basic_invariants_spacetime_raw() -> ResultBench<()> { + #[test] + fn test_basic_invariants_spacetime_raw() -> ResultBench<()> { test_basic_invariants::() } @@ -125,15 +125,15 @@ mod tests { // #[test]s run concurrently and they fight over lockfiles. // so, run the sub-tests here in sequence. - // #[test] - // #[serial] - fn _test_basic_invariants_spacetime_module_rust() -> ResultBench<()> { + #[test] + #[serial] + fn test_basic_invariants_spacetime_module_rust() -> ResultBench<()> { test_basic_invariants::>() } - // #[test] - // #[serial] - fn _test_basic_invariants_spacetime_module_csharp() -> ResultBench<()> { + #[test] + #[serial] + fn test_basic_invariants_spacetime_module_csharp() -> ResultBench<()> { test_basic_invariants::>() } } diff --git a/crates/bench/src/spacetime_module.rs b/crates/bench/src/spacetime_module.rs index 3aefcbdc5d1..7775b58e8fd 100644 --- a/crates/bench/src/spacetime_module.rs +++ b/crates/bench/src/spacetime_module.rs @@ -1,5 +1,6 @@ use std::{marker::PhantomData, path::Path}; +use convert_case::{Case, Casing}; use spacetimedb::db::{Config, Storage}; use spacetimedb_lib::{ sats::{product, ArrayValue}, @@ -89,9 +90,14 @@ impl BenchDatabase for SpacetimeModule { table_style: crate::schemas::IndexStrategy, ) -> ResultBench { // Noop. All tables are built into the "benchmarks" module. + // The module's default CaseConversionPolicy is SnakeCase, which + // inserts underscores at letter-digit boundaries (e.g. u32 -> u_32). + // We must match that here so reducer/table lookups succeed. + let raw = table_name::(table_style); + let converted = raw.as_ref().to_case(Case::Snake); Ok(TableId { - pascal_case: table_name::(table_style), - snake_case: table_name::(table_style), + pascal_case: TableName::for_test(&converted), + snake_case: TableName::for_test(&converted), }) } From 0a5de36c660a6b627a5a36ca64c7039418b8d520 Mon Sep 17 00:00:00 2001 From: rekhoff Date: Thu, 19 Feb 2026 09:39:30 -0800 Subject: [PATCH 117/133] Blackholio Unity bindings update --- .../Assets/Scripts/autogen/Tables/Circle.g.cs | 20 +++++++++++++++++++ .../Assets/Scripts/autogen/Tables/Config.g.cs | 10 ++++++++++ .../Assets/Scripts/autogen/Tables/Entity.g.cs | 10 ++++++++++ .../Assets/Scripts/autogen/Tables/Food.g.cs | 10 ++++++++++ .../Assets/Scripts/autogen/Tables/Player.g.cs | 20 +++++++++++++++++++ 5 files changed, 70 insertions(+) diff --git a/demo/Blackholio/client-unity/Assets/Scripts/autogen/Tables/Circle.g.cs b/demo/Blackholio/client-unity/Assets/Scripts/autogen/Tables/Circle.g.cs index 03da268f2ae..8ae958b6c7a 100644 --- a/demo/Blackholio/client-unity/Assets/Scripts/autogen/Tables/Circle.g.cs +++ b/demo/Blackholio/client-unity/Assets/Scripts/autogen/Tables/Circle.g.cs @@ -17,8 +17,28 @@ public sealed class CircleHandle : RemoteTableHandle { protected override string RemoteTableName => "circle"; + public sealed class EntityIdUniqueIndex : UniqueIndexBase + { + protected override int GetKey(Circle row) => row.EntityId; + + public EntityIdUniqueIndex(CircleHandle table) : base(table) { } + } + + public readonly EntityIdUniqueIndex EntityId; + + public sealed class PlayerIdIndex : BTreeIndexBase + { + protected override int GetKey(Circle row) => row.PlayerId; + + public PlayerIdIndex(CircleHandle table) : base(table) { } + } + + public readonly PlayerIdIndex PlayerId; + internal CircleHandle(DbConnection conn) : base(conn) { + EntityId = new(this); + PlayerId = new(this); } protected override object GetPrimaryKey(Circle row) => row.EntityId; diff --git a/demo/Blackholio/client-unity/Assets/Scripts/autogen/Tables/Config.g.cs b/demo/Blackholio/client-unity/Assets/Scripts/autogen/Tables/Config.g.cs index 2fd3b1e9c63..d6340962dee 100644 --- a/demo/Blackholio/client-unity/Assets/Scripts/autogen/Tables/Config.g.cs +++ b/demo/Blackholio/client-unity/Assets/Scripts/autogen/Tables/Config.g.cs @@ -17,8 +17,18 @@ public sealed class ConfigHandle : RemoteTableHandle { protected override string RemoteTableName => "config"; + public sealed class IdUniqueIndex : UniqueIndexBase + { + protected override int GetKey(Config row) => row.Id; + + public IdUniqueIndex(ConfigHandle table) : base(table) { } + } + + public readonly IdUniqueIndex Id; + internal ConfigHandle(DbConnection conn) : base(conn) { + Id = new(this); } protected override object GetPrimaryKey(Config row) => row.Id; diff --git a/demo/Blackholio/client-unity/Assets/Scripts/autogen/Tables/Entity.g.cs b/demo/Blackholio/client-unity/Assets/Scripts/autogen/Tables/Entity.g.cs index 09d62088de0..e15bec6af06 100644 --- a/demo/Blackholio/client-unity/Assets/Scripts/autogen/Tables/Entity.g.cs +++ b/demo/Blackholio/client-unity/Assets/Scripts/autogen/Tables/Entity.g.cs @@ -17,8 +17,18 @@ public sealed class EntityHandle : RemoteTableHandle { protected override string RemoteTableName => "entity"; + public sealed class EntityIdUniqueIndex : UniqueIndexBase + { + protected override int GetKey(Entity row) => row.EntityId; + + public EntityIdUniqueIndex(EntityHandle table) : base(table) { } + } + + public readonly EntityIdUniqueIndex EntityId; + internal EntityHandle(DbConnection conn) : base(conn) { + EntityId = new(this); } protected override object GetPrimaryKey(Entity row) => row.EntityId; diff --git a/demo/Blackholio/client-unity/Assets/Scripts/autogen/Tables/Food.g.cs b/demo/Blackholio/client-unity/Assets/Scripts/autogen/Tables/Food.g.cs index dbd0848d69b..7b62f84d523 100644 --- a/demo/Blackholio/client-unity/Assets/Scripts/autogen/Tables/Food.g.cs +++ b/demo/Blackholio/client-unity/Assets/Scripts/autogen/Tables/Food.g.cs @@ -17,8 +17,18 @@ public sealed class FoodHandle : RemoteTableHandle { protected override string RemoteTableName => "food"; + public sealed class EntityIdUniqueIndex : UniqueIndexBase + { + protected override int GetKey(Food row) => row.EntityId; + + public EntityIdUniqueIndex(FoodHandle table) : base(table) { } + } + + public readonly EntityIdUniqueIndex EntityId; + internal FoodHandle(DbConnection conn) : base(conn) { + EntityId = new(this); } protected override object GetPrimaryKey(Food row) => row.EntityId; diff --git a/demo/Blackholio/client-unity/Assets/Scripts/autogen/Tables/Player.g.cs b/demo/Blackholio/client-unity/Assets/Scripts/autogen/Tables/Player.g.cs index 0b6d8bf6ae6..9250cf376e0 100644 --- a/demo/Blackholio/client-unity/Assets/Scripts/autogen/Tables/Player.g.cs +++ b/demo/Blackholio/client-unity/Assets/Scripts/autogen/Tables/Player.g.cs @@ -17,8 +17,28 @@ public sealed class PlayerHandle : RemoteTableHandle { protected override string RemoteTableName => "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 int GetKey(Player row) => row.PlayerId; + + public PlayerIdUniqueIndex(PlayerHandle table) : base(table) { } + } + + public readonly PlayerIdUniqueIndex PlayerId; + internal PlayerHandle(DbConnection conn) : base(conn) { + Identity = new(this); + PlayerId = new(this); } protected override object GetPrimaryKey(Player row) => row.Identity; From 13b66c9982f77943e9e84cd97a5b2a2da4899ed5 Mon Sep 17 00:00:00 2001 From: rekhoff Date: Thu, 19 Feb 2026 09:40:49 -0800 Subject: [PATCH 118/133] C# Regression Test client bindings update --- .../module_bindings/Reducers/Insert.g.cs | 2 +- .../module_bindings/SpacetimeDBClient.g.cs | 4 +- .../module_bindings/Tables/ExampleData.g.cs | 48 +++++++++---------- .../module_bindings/Types/ExampleData.g.cs | 36 +++++++------- 4 files changed, 45 insertions(+), 45 deletions(-) diff --git a/sdks/csharp/examples~/regression-tests/republishing/client/module_bindings/Reducers/Insert.g.cs b/sdks/csharp/examples~/regression-tests/republishing/client/module_bindings/Reducers/Insert.g.cs index c668f7c366a..88fc1a1163a 100644 --- a/sdks/csharp/examples~/regression-tests/republishing/client/module_bindings/Reducers/Insert.g.cs +++ b/sdks/csharp/examples~/regression-tests/republishing/client/module_bindings/Reducers/Insert.g.cs @@ -60,7 +60,7 @@ public Insert() { } - string IReducerArgs.ReducerName => "Insert"; + string IReducerArgs.ReducerName => "insert"; } } } diff --git a/sdks/csharp/examples~/regression-tests/republishing/client/module_bindings/SpacetimeDBClient.g.cs b/sdks/csharp/examples~/regression-tests/republishing/client/module_bindings/SpacetimeDBClient.g.cs index 2e01c9cce00..ba9311b5d45 100644 --- a/sdks/csharp/examples~/regression-tests/republishing/client/module_bindings/SpacetimeDBClient.g.cs +++ b/sdks/csharp/examples~/regression-tests/republishing/client/module_bindings/SpacetimeDBClient.g.cs @@ -1,7 +1,7 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE // WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. -// This was generated using spacetimedb cli version 2.0.0 (commit 9e0e81a6aaec6bf3619cfb9f7916743d86ab7ffc). +// This was generated using spacetimedb cli version 2.0.0 (commit 4cce69765507c1815979d39572b4a52864f5c3d2). #nullable enable @@ -531,7 +531,7 @@ public sealed class QueryBuilder public sealed class From { - public global::SpacetimeDB.Table ExampleData() => new("ExampleData", new ExampleDataCols("ExampleData"), new ExampleDataIxCols("ExampleData")); + public global::SpacetimeDB.Table ExampleData() => new("example_data", new ExampleDataCols("example_data"), new ExampleDataIxCols("example_data")); } public sealed class TypedSubscriptionBuilder diff --git a/sdks/csharp/examples~/regression-tests/republishing/client/module_bindings/Tables/ExampleData.g.cs b/sdks/csharp/examples~/regression-tests/republishing/client/module_bindings/Tables/ExampleData.g.cs index 44edae9bed6..35090f1ee6c 100644 --- a/sdks/csharp/examples~/regression-tests/republishing/client/module_bindings/Tables/ExampleData.g.cs +++ b/sdks/csharp/examples~/regression-tests/republishing/client/module_bindings/Tables/ExampleData.g.cs @@ -15,20 +15,20 @@ public sealed partial class RemoteTables { public sealed class ExampleDataHandle : RemoteTableHandle { - protected override string RemoteTableName => "ExampleData"; + protected override string RemoteTableName => "example_data"; - public sealed class ExampleDataPrimaryIdxBtreeUniqueIndex : UniqueIndexBase + public sealed class PrimaryUniqueIndex : UniqueIndexBase { protected override uint GetKey(ExampleData row) => row.Primary; - public ExampleDataPrimaryIdxBtreeUniqueIndex(ExampleDataHandle table) : base(table) { } + public PrimaryUniqueIndex(ExampleDataHandle table) : base(table) { } } - public readonly ExampleDataPrimaryIdxBtreeUniqueIndex ExampleDataPrimaryIdxBtree; + public readonly PrimaryUniqueIndex Primary; internal ExampleDataHandle(DbConnection conn) : base(conn) { - ExampleDataPrimaryIdxBtree = new(this); + Primary = new(this); } protected override object GetPrimaryKey(ExampleData row) => row.Primary; @@ -60,24 +60,24 @@ public sealed class ExampleDataCols public ExampleDataCols(string tableName) { - Primary = new global::SpacetimeDB.Col(tableName, "Primary"); - TestPass = new global::SpacetimeDB.Col(tableName, "TestPass"); - DefaultString = new global::SpacetimeDB.Col(tableName, "DefaultString"); - DefaultBool = new global::SpacetimeDB.Col(tableName, "DefaultBool"); - DefaultI8 = new global::SpacetimeDB.Col(tableName, "DefaultI8"); - DefaultU8 = new global::SpacetimeDB.Col(tableName, "DefaultU8"); - DefaultI16 = new global::SpacetimeDB.Col(tableName, "DefaultI16"); - DefaultU16 = new global::SpacetimeDB.Col(tableName, "DefaultU16"); - DefaultI32 = new global::SpacetimeDB.Col(tableName, "DefaultI32"); - DefaultU32 = new global::SpacetimeDB.Col(tableName, "DefaultU32"); - DefaultI64 = new global::SpacetimeDB.Col(tableName, "DefaultI64"); - DefaultU64 = new global::SpacetimeDB.Col(tableName, "DefaultU64"); - DefaultHex = new global::SpacetimeDB.Col(tableName, "DefaultHex"); - DefaultBin = new global::SpacetimeDB.Col(tableName, "DefaultBin"); - DefaultF32 = new global::SpacetimeDB.Col(tableName, "DefaultF32"); - DefaultF64 = new global::SpacetimeDB.Col(tableName, "DefaultF64"); - DefaultEnum = new global::SpacetimeDB.Col(tableName, "DefaultEnum"); - DefaultNull = new global::SpacetimeDB.NullableCol(tableName, "DefaultNull"); + Primary = new global::SpacetimeDB.Col(tableName, "primary"); + TestPass = new global::SpacetimeDB.Col(tableName, "test_pass"); + DefaultString = new global::SpacetimeDB.Col(tableName, "default_string"); + DefaultBool = new global::SpacetimeDB.Col(tableName, "default_bool"); + DefaultI8 = new global::SpacetimeDB.Col(tableName, "default_i_8"); + DefaultU8 = new global::SpacetimeDB.Col(tableName, "default_u_8"); + DefaultI16 = new global::SpacetimeDB.Col(tableName, "default_i_16"); + DefaultU16 = new global::SpacetimeDB.Col(tableName, "default_u_16"); + DefaultI32 = new global::SpacetimeDB.Col(tableName, "default_i_32"); + DefaultU32 = new global::SpacetimeDB.Col(tableName, "default_u_32"); + DefaultI64 = new global::SpacetimeDB.Col(tableName, "default_i_64"); + DefaultU64 = new global::SpacetimeDB.Col(tableName, "default_u_64"); + DefaultHex = new global::SpacetimeDB.Col(tableName, "default_hex"); + DefaultBin = new global::SpacetimeDB.Col(tableName, "default_bin"); + DefaultF32 = new global::SpacetimeDB.Col(tableName, "default_f_32"); + DefaultF64 = new global::SpacetimeDB.Col(tableName, "default_f_64"); + DefaultEnum = new global::SpacetimeDB.Col(tableName, "default_enum"); + DefaultNull = new global::SpacetimeDB.NullableCol(tableName, "default_null"); } } @@ -87,7 +87,7 @@ public sealed class ExampleDataIxCols public ExampleDataIxCols(string tableName) { - Primary = new global::SpacetimeDB.IxCol(tableName, "Primary"); + Primary = new global::SpacetimeDB.IxCol(tableName, "primary"); } } } diff --git a/sdks/csharp/examples~/regression-tests/republishing/client/module_bindings/Types/ExampleData.g.cs b/sdks/csharp/examples~/regression-tests/republishing/client/module_bindings/Types/ExampleData.g.cs index 2928c719a29..b0176e99300 100644 --- a/sdks/csharp/examples~/regression-tests/republishing/client/module_bindings/Types/ExampleData.g.cs +++ b/sdks/csharp/examples~/regression-tests/republishing/client/module_bindings/Types/ExampleData.g.cs @@ -13,41 +13,41 @@ namespace SpacetimeDB.Types [DataContract] public sealed partial class ExampleData { - [DataMember(Name = "Primary")] + [DataMember(Name = "primary")] public uint Primary; - [DataMember(Name = "TestPass")] + [DataMember(Name = "test_pass")] public uint TestPass; - [DataMember(Name = "DefaultString")] + [DataMember(Name = "default_string")] public string DefaultString; - [DataMember(Name = "DefaultBool")] + [DataMember(Name = "default_bool")] public bool DefaultBool; - [DataMember(Name = "DefaultI8")] + [DataMember(Name = "default_i_8")] public sbyte DefaultI8; - [DataMember(Name = "DefaultU8")] + [DataMember(Name = "default_u_8")] public byte DefaultU8; - [DataMember(Name = "DefaultI16")] + [DataMember(Name = "default_i_16")] public short DefaultI16; - [DataMember(Name = "DefaultU16")] + [DataMember(Name = "default_u_16")] public ushort DefaultU16; - [DataMember(Name = "DefaultI32")] + [DataMember(Name = "default_i_32")] public int DefaultI32; - [DataMember(Name = "DefaultU32")] + [DataMember(Name = "default_u_32")] public uint DefaultU32; - [DataMember(Name = "DefaultI64")] + [DataMember(Name = "default_i_64")] public long DefaultI64; - [DataMember(Name = "DefaultU64")] + [DataMember(Name = "default_u_64")] public ulong DefaultU64; - [DataMember(Name = "DefaultHex")] + [DataMember(Name = "default_hex")] public int DefaultHex; - [DataMember(Name = "DefaultBin")] + [DataMember(Name = "default_bin")] public int DefaultBin; - [DataMember(Name = "DefaultF32")] + [DataMember(Name = "default_f_32")] public float DefaultF32; - [DataMember(Name = "DefaultF64")] + [DataMember(Name = "default_f_64")] public double DefaultF64; - [DataMember(Name = "DefaultEnum")] + [DataMember(Name = "default_enum")] public MyEnum DefaultEnum; - [DataMember(Name = "DefaultNull")] + [DataMember(Name = "default_null")] public MyStruct? DefaultNull; public ExampleData( From 0549340633526433f3d7cefd4dd7959a84a782a4 Mon Sep 17 00:00:00 2001 From: clockwork-labs-bot Date: Thu, 19 Feb 2026 12:43:17 -0500 Subject: [PATCH 119/133] Fix hardcoded SQL table names in test-client for case conversion The case conversion (SnakeCase policy) converts table names like OneU8 to one_u_8 (inserting underscore at letter-digit boundary), but the hardcoded SQL subscription queries in SUBSCRIBE_ALL and throughout the test client still used the old names (one_u8, pk_u32, vec_u8, etc.). This caused all SDK tests to timeout: subscriptions silently matched nothing, so on_insert callbacks never fired. Updated all hardcoded SQL table names to match their post-conversion canonical forms. --- sdks/rust/tests/test-client/src/main.rs | 124 ++++++++++++------------ 1 file changed, 62 insertions(+), 62 deletions(-) diff --git a/sdks/rust/tests/test-client/src/main.rs b/sdks/rust/tests/test-client/src/main.rs index 53b9c5e5606..e9a3e0e92a5 100644 --- a/sdks/rust/tests/test-client/src/main.rs +++ b/sdks/rust/tests/test-client/src/main.rs @@ -289,21 +289,21 @@ fn assert_all_tables_empty(ctx: &impl RemoteDbContext) -> anyhow::Result<()> { /// A great big honking query that subscribes to all rows from all tables. const SUBSCRIBE_ALL: &[&str] = &[ - "SELECT * FROM one_u8;", - "SELECT * FROM one_u16;", - "SELECT * FROM one_u32;", - "SELECT * FROM one_u64;", - "SELECT * FROM one_u128;", - "SELECT * FROM one_u256;", - "SELECT * FROM one_i8;", - "SELECT * FROM one_i16;", - "SELECT * FROM one_i32;", - "SELECT * FROM one_i64;", - "SELECT * FROM one_i128;", - "SELECT * FROM one_i256;", + "SELECT * FROM one_u_8;", + "SELECT * FROM one_u_16;", + "SELECT * FROM one_u_32;", + "SELECT * FROM one_u_64;", + "SELECT * FROM one_u_128;", + "SELECT * FROM one_u_256;", + "SELECT * FROM one_i_8;", + "SELECT * FROM one_i_16;", + "SELECT * FROM one_i_32;", + "SELECT * FROM one_i_64;", + "SELECT * FROM one_i_128;", + "SELECT * FROM one_i_256;", "SELECT * FROM one_bool;", - "SELECT * FROM one_f32;", - "SELECT * FROM one_f64;", + "SELECT * FROM one_f_32;", + "SELECT * FROM one_f_64;", "SELECT * FROM one_string;", "SELECT * FROM one_identity;", "SELECT * FROM one_connection_id;", @@ -315,21 +315,21 @@ const SUBSCRIBE_ALL: &[&str] = &[ "SELECT * FROM one_byte_struct;", "SELECT * FROM one_every_primitive_struct;", "SELECT * FROM one_every_vec_struct;", - "SELECT * FROM vec_u8;", - "SELECT * FROM vec_u16;", - "SELECT * FROM vec_u32;", - "SELECT * FROM vec_u64;", - "SELECT * FROM vec_u128;", - "SELECT * FROM vec_u256;", - "SELECT * FROM vec_i8;", - "SELECT * FROM vec_i16;", - "SELECT * FROM vec_i32;", - "SELECT * FROM vec_i64;", - "SELECT * FROM vec_i128;", - "SELECT * FROM vec_i256;", + "SELECT * FROM vec_u_8;", + "SELECT * FROM vec_u_16;", + "SELECT * FROM vec_u_32;", + "SELECT * FROM vec_u_64;", + "SELECT * FROM vec_u_128;", + "SELECT * FROM vec_u_256;", + "SELECT * FROM vec_i_8;", + "SELECT * FROM vec_i_16;", + "SELECT * FROM vec_i_32;", + "SELECT * FROM vec_i_64;", + "SELECT * FROM vec_i_128;", + "SELECT * FROM vec_i_256;", "SELECT * FROM vec_bool;", - "SELECT * FROM vec_f32;", - "SELECT * FROM vec_f64;", + "SELECT * FROM vec_f_32;", + "SELECT * FROM vec_f_64;", "SELECT * FROM vec_string;", "SELECT * FROM vec_identity;", "SELECT * FROM vec_connection_id;", @@ -341,42 +341,42 @@ const SUBSCRIBE_ALL: &[&str] = &[ "SELECT * FROM vec_byte_struct;", "SELECT * FROM vec_every_primitive_struct;", "SELECT * FROM vec_every_vec_struct;", - "SELECT * FROM option_i32;", + "SELECT * FROM option_i_32;", "SELECT * FROM option_string;", "SELECT * FROM option_identity;", "SELECT * FROM option_uuid;", "SELECT * FROM option_simple_enum;", "SELECT * FROM option_every_primitive_struct;", - "SELECT * FROM option_vec_option_i32;", - "SELECT * FROM unique_u8;", - "SELECT * FROM unique_u16;", - "SELECT * FROM unique_u32;", - "SELECT * FROM unique_u64;", - "SELECT * FROM unique_u128;", - "SELECT * FROM unique_u256;", - "SELECT * FROM unique_i8;", - "SELECT * FROM unique_i16;", - "SELECT * FROM unique_i32;", - "SELECT * FROM unique_i64;", - "SELECT * FROM unique_i128;", - "SELECT * FROM unique_i256;", + "SELECT * FROM option_vec_option_i_32;", + "SELECT * FROM unique_u_8;", + "SELECT * FROM unique_u_16;", + "SELECT * FROM unique_u_32;", + "SELECT * FROM unique_u_64;", + "SELECT * FROM unique_u_128;", + "SELECT * FROM unique_u_256;", + "SELECT * FROM unique_i_8;", + "SELECT * FROM unique_i_16;", + "SELECT * FROM unique_i_32;", + "SELECT * FROM unique_i_64;", + "SELECT * FROM unique_i_128;", + "SELECT * FROM unique_i_256;", "SELECT * FROM unique_bool;", "SELECT * FROM unique_string;", "SELECT * FROM unique_identity;", "SELECT * FROM unique_connection_id;", "SELECT * FROM unique_uuid;", - "SELECT * FROM pk_u8;", - "SELECT * FROM pk_u16;", - "SELECT * FROM pk_u32;", - "SELECT * FROM pk_u64;", - "SELECT * FROM pk_u128;", - "SELECT * FROM pk_u256;", - "SELECT * FROM pk_i8;", - "SELECT * FROM pk_i16;", - "SELECT * FROM pk_i32;", - "SELECT * FROM pk_i64;", - "SELECT * FROM pk_i128;", - "SELECT * FROM pk_i256;", + "SELECT * FROM pk_u_8;", + "SELECT * FROM pk_u_16;", + "SELECT * FROM pk_u_32;", + "SELECT * FROM pk_u_64;", + "SELECT * FROM pk_u_128;", + "SELECT * FROM pk_u_256;", + "SELECT * FROM pk_i_8;", + "SELECT * FROM pk_i_16;", + "SELECT * FROM pk_i_32;", + "SELECT * FROM pk_i_64;", + "SELECT * FROM pk_i_128;", + "SELECT * FROM pk_i_256;", "SELECT * FROM pk_bool;", "SELECT * FROM pk_string;", "SELECT * FROM pk_identity;", @@ -444,7 +444,7 @@ fn exec_subscribe_and_cancel() { panic!("Subscription should never be applied"); }) .on_error(|_ctx, error| panic!("Subscription errored: {error:?}")) - .subscribe("SELECT * FROM one_u8;"); + .subscribe("SELECT * FROM one_u_8;"); assert!(!handle.is_active()); assert!(!handle.is_ended()); let handle_clone = handle.clone(); @@ -487,7 +487,7 @@ fn exec_subscribe_and_unsubscribe() { .unwrap(); }) .on_error(|_ctx, error| panic!("Subscription errored: {error:?}")) - .subscribe("SELECT * FROM one_u8;"); + .subscribe("SELECT * FROM one_u_8;"); handle_cell.lock().unwrap().replace(handle.clone()); assert!(!handle.is_active()); assert!(!handle.is_ended()); @@ -2013,8 +2013,8 @@ fn exec_row_deduplication() { let conn = connect_then(&test_counter, { move |ctx| { let queries = [ - "SELECT * FROM pk_u32 WHERE pk_u32.n < 100;", - "SELECT * FROM pk_u32 WHERE pk_u32.n < 200;", + "SELECT * FROM pk_u_32 WHERE pk_u_32.n < 100;", + "SELECT * FROM pk_u_32 WHERE pk_u_32.n < 200;", ]; // The general approach in this test is that @@ -2076,7 +2076,7 @@ fn exec_row_deduplication_join_r_and_s() { connect_then(&test_counter, { move |ctx| { let queries = [ - "SELECT * FROM pk_u32;", + "SELECT * FROM pk_u_32;", "SELECT unique_u32.* FROM unique_u32 JOIN pk_u32 ON unique_u32.n = pk_u32.n;", ]; @@ -2137,8 +2137,8 @@ fn exec_row_deduplication_r_join_s_and_r_join_t() { connect_then(&test_counter, { move |ctx| { let queries = [ - "SELECT * FROM pk_u32;", - "SELECT * FROM pk_u32_two;", + "SELECT * FROM pk_u_32;", + "SELECT * FROM pk_u_32_two;", "SELECT unique_u32.* FROM unique_u32 JOIN pk_u32 ON unique_u32.n = pk_u32.n;", "SELECT unique_u32.* FROM unique_u32 JOIN pk_u32_two ON unique_u32.n = pk_u32_two.n;", ]; @@ -2391,7 +2391,7 @@ fn exec_two_different_compression_algos() { compression_name, |b| b.with_compression(compression), move |ctx| { - subscribe_these_then(ctx, &["SELECT * FROM vec_u8"], move |ctx| { + subscribe_these_then(ctx, &["SELECT * FROM vec_u_8"], move |ctx| { VecU8::on_insert(ctx, move |_, actual| { let actual: &[u8] = actual.n.as_slice(); let res = if actual == &*expected1 { From 6c1a44547800cbc7a3dff96a674fda61ed572099 Mon Sep 17 00:00:00 2001 From: clockwork-labs-bot Date: Thu, 19 Feb 2026 13:32:59 -0500 Subject: [PATCH 120/133] Derive SQL table names from generated bindings instead of hardcoding The test-client is recompiled with fresh bindings for each module variant (Rust sdk-test, C# sdk-test-cs, TS sdk-test-ts). The C# and TS modules use explicit accessor names like 'one_u8', while the Rust module's 'OneU8' gets case-converted to 'one_u_8'. Hardcoded SQL can't work for all variants. Replace all hardcoded table names in SQL queries with lookups against RemoteModule::ALL_TABLE_NAMES (generated by codegen). A table_name() helper does underscore-insensitive matching so the same source code works regardless of case conversion policy. This fixes the Test Suite failures for csharp:: and typescript:: tests that were broken by the previous commit's hardcoded name change. --- sdks/rust/tests/test-client/src/main.rs | 214 +++++++++--------------- 1 file changed, 82 insertions(+), 132 deletions(-) diff --git a/sdks/rust/tests/test-client/src/main.rs b/sdks/rust/tests/test-client/src/main.rs index e9a3e0e92a5..7cc6363e639 100644 --- a/sdks/rust/tests/test-client/src/main.rs +++ b/sdks/rust/tests/test-client/src/main.rs @@ -287,104 +287,41 @@ fn assert_all_tables_empty(ctx: &impl RemoteDbContext) -> anyhow::Result<()> { Ok(()) } -/// A great big honking query that subscribes to all rows from all tables. -const SUBSCRIBE_ALL: &[&str] = &[ - "SELECT * FROM one_u_8;", - "SELECT * FROM one_u_16;", - "SELECT * FROM one_u_32;", - "SELECT * FROM one_u_64;", - "SELECT * FROM one_u_128;", - "SELECT * FROM one_u_256;", - "SELECT * FROM one_i_8;", - "SELECT * FROM one_i_16;", - "SELECT * FROM one_i_32;", - "SELECT * FROM one_i_64;", - "SELECT * FROM one_i_128;", - "SELECT * FROM one_i_256;", - "SELECT * FROM one_bool;", - "SELECT * FROM one_f_32;", - "SELECT * FROM one_f_64;", - "SELECT * FROM one_string;", - "SELECT * FROM one_identity;", - "SELECT * FROM one_connection_id;", - "SELECT * FROM one_timestamp;", - "SELECT * FROM one_uuid;", - "SELECT * FROM one_simple_enum;", - "SELECT * FROM one_enum_with_payload;", - "SELECT * FROM one_unit_struct;", - "SELECT * FROM one_byte_struct;", - "SELECT * FROM one_every_primitive_struct;", - "SELECT * FROM one_every_vec_struct;", - "SELECT * FROM vec_u_8;", - "SELECT * FROM vec_u_16;", - "SELECT * FROM vec_u_32;", - "SELECT * FROM vec_u_64;", - "SELECT * FROM vec_u_128;", - "SELECT * FROM vec_u_256;", - "SELECT * FROM vec_i_8;", - "SELECT * FROM vec_i_16;", - "SELECT * FROM vec_i_32;", - "SELECT * FROM vec_i_64;", - "SELECT * FROM vec_i_128;", - "SELECT * FROM vec_i_256;", - "SELECT * FROM vec_bool;", - "SELECT * FROM vec_f_32;", - "SELECT * FROM vec_f_64;", - "SELECT * FROM vec_string;", - "SELECT * FROM vec_identity;", - "SELECT * FROM vec_connection_id;", - "SELECT * FROM vec_timestamp;", - "SELECT * FROM vec_uuid;", - "SELECT * FROM vec_simple_enum;", - "SELECT * FROM vec_enum_with_payload;", - "SELECT * FROM vec_unit_struct;", - "SELECT * FROM vec_byte_struct;", - "SELECT * FROM vec_every_primitive_struct;", - "SELECT * FROM vec_every_vec_struct;", - "SELECT * FROM option_i_32;", - "SELECT * FROM option_string;", - "SELECT * FROM option_identity;", - "SELECT * FROM option_uuid;", - "SELECT * FROM option_simple_enum;", - "SELECT * FROM option_every_primitive_struct;", - "SELECT * FROM option_vec_option_i_32;", - "SELECT * FROM unique_u_8;", - "SELECT * FROM unique_u_16;", - "SELECT * FROM unique_u_32;", - "SELECT * FROM unique_u_64;", - "SELECT * FROM unique_u_128;", - "SELECT * FROM unique_u_256;", - "SELECT * FROM unique_i_8;", - "SELECT * FROM unique_i_16;", - "SELECT * FROM unique_i_32;", - "SELECT * FROM unique_i_64;", - "SELECT * FROM unique_i_128;", - "SELECT * FROM unique_i_256;", - "SELECT * FROM unique_bool;", - "SELECT * FROM unique_string;", - "SELECT * FROM unique_identity;", - "SELECT * FROM unique_connection_id;", - "SELECT * FROM unique_uuid;", - "SELECT * FROM pk_u_8;", - "SELECT * FROM pk_u_16;", - "SELECT * FROM pk_u_32;", - "SELECT * FROM pk_u_64;", - "SELECT * FROM pk_u_128;", - "SELECT * FROM pk_u_256;", - "SELECT * FROM pk_i_8;", - "SELECT * FROM pk_i_16;", - "SELECT * FROM pk_i_32;", - "SELECT * FROM pk_i_64;", - "SELECT * FROM pk_i_128;", - "SELECT * FROM pk_i_256;", - "SELECT * FROM pk_bool;", - "SELECT * FROM pk_string;", - "SELECT * FROM pk_identity;", - "SELECT * FROM pk_connection_id;", - "SELECT * FROM pk_uuid;", - "SELECT * FROM large_table;", - "SELECT * FROM table_holds_table;", -]; +/// Build subscription queries from the generated `ALL_TABLE_NAMES`, +/// so they always match the module's actual table names regardless of +/// case conversion policy or explicit accessor names. +fn subscribe_all_queries() -> Vec { + RemoteModule::ALL_TABLE_NAMES + .iter() + .map(|name| format!("SELECT * FROM {name};")) + .collect() +} + +/// Look up the canonical table name from the generated bindings. +/// +/// Finds the table whose name, after stripping underscores, matches `needle` +/// (also stripped of underscores). This accounts for case conversion differences +/// like `one_u8` vs `one_u_8`. +fn table_name(needle: &str) -> &'static str { + let needle_stripped: String = needle.chars().filter(|c| *c != '_').collect(); + RemoteModule::ALL_TABLE_NAMES + .iter() + .find(|name| { + let name_stripped: String = name.chars().filter(|c| *c != '_').collect(); + name_stripped == needle_stripped + }) + .unwrap_or_else(|| panic!("No table matching '{needle}' in ALL_TABLE_NAMES")) +} + +/// Build a `SELECT * FROM ;` query using the canonical table name. +fn select_star(table: &str) -> String { + format!("SELECT * FROM {};", table_name(table)) +} + +/// Build a `SELECT * FROM
WHERE ...;` query using the canonical table name. +fn select_where(table: &str, condition: &str) -> String { + format!("SELECT * FROM {} WHERE {};", table_name(table), condition) +} fn connect_with_then( test_counter: &std::sync::Arc, @@ -419,7 +356,9 @@ fn connect(test_counter: &std::sync::Arc) -> DbConnection { } fn subscribe_all_then(ctx: &impl RemoteDbContext, callback: impl FnOnce(&SubscriptionEventContext) + Send + 'static) { - subscribe_these_then(ctx, SUBSCRIBE_ALL, callback) + let queries = subscribe_all_queries(); + let query_refs: Vec<&str> = queries.iter().map(|s| s.as_str()).collect(); + subscribe_these_then(ctx, &query_refs, callback) } fn subscribe_these_then( @@ -444,7 +383,7 @@ fn exec_subscribe_and_cancel() { panic!("Subscription should never be applied"); }) .on_error(|_ctx, error| panic!("Subscription errored: {error:?}")) - .subscribe("SELECT * FROM one_u_8;"); + .subscribe(&select_star("one_u8")); assert!(!handle.is_active()); assert!(!handle.is_ended()); let handle_clone = handle.clone(); @@ -487,7 +426,7 @@ fn exec_subscribe_and_unsubscribe() { .unwrap(); }) .on_error(|_ctx, error| panic!("Subscription errored: {error:?}")) - .subscribe("SELECT * FROM one_u_8;"); + .subscribe(&select_star("one_u8")); handle_cell.lock().unwrap().replace(handle.clone()); assert!(!handle.is_active()); assert!(!handle.is_ended()); @@ -2012,10 +1951,10 @@ fn exec_row_deduplication() { let conn = connect_then(&test_counter, { move |ctx| { - let queries = [ - "SELECT * FROM pk_u_32 WHERE pk_u_32.n < 100;", - "SELECT * FROM pk_u_32 WHERE pk_u_32.n < 200;", - ]; + let pk_u32 = table_name("pk_u32"); + let q1 = format!("SELECT * FROM {pk_u32} WHERE {pk_u32}.n < 100;"); + let q2 = format!("SELECT * FROM {pk_u32} WHERE {pk_u32}.n < 200;"); + let queries = [q1.as_str(), q2.as_str()]; // The general approach in this test is that // we expect at most a single `on_X` callback per row. @@ -2075,10 +2014,11 @@ fn exec_row_deduplication_join_r_and_s() { connect_then(&test_counter, { move |ctx| { - let queries = [ - "SELECT * FROM pk_u_32;", - "SELECT unique_u32.* FROM unique_u32 JOIN pk_u32 ON unique_u32.n = pk_u32.n;", - ]; + let pk_u32 = table_name("pk_u32"); + let unique_u32 = table_name("unique_u32"); + let q1 = format!("SELECT * FROM {pk_u32};"); + let q2 = format!("SELECT {unique_u32}.* FROM {unique_u32} JOIN {pk_u32} ON {unique_u32}.n = {pk_u32}.n;"); + let queries = [q1.as_str(), q2.as_str()]; // These never happen. In the case of `PkU32` we get an update instead. UniqueU32::on_delete(ctx, move |_, _| panic!("we never delete a `UniqueU32`")); @@ -2136,12 +2076,14 @@ fn exec_row_deduplication_r_join_s_and_r_join_t() { connect_then(&test_counter, { move |ctx| { - let queries = [ - "SELECT * FROM pk_u_32;", - "SELECT * FROM pk_u_32_two;", - "SELECT unique_u32.* FROM unique_u32 JOIN pk_u32 ON unique_u32.n = pk_u32.n;", - "SELECT unique_u32.* FROM unique_u32 JOIN pk_u32_two ON unique_u32.n = pk_u32_two.n;", - ]; + let pk_u32 = table_name("pk_u32"); + let pk_u32_two = table_name("pk_u32_two"); + let unique_u32 = table_name("unique_u32"); + let q1 = format!("SELECT * FROM {pk_u32};"); + let q2 = format!("SELECT * FROM {pk_u32_two};"); + let q3 = format!("SELECT {unique_u32}.* FROM {unique_u32} JOIN {pk_u32} ON {unique_u32}.n = {pk_u32}.n;"); + let q4 = format!("SELECT {unique_u32}.* FROM {unique_u32} JOIN {pk_u32_two} ON {unique_u32}.n = {pk_u32_two}.n;"); + let queries = [q1.as_str(), q2.as_str(), q3.as_str(), q4.as_str()]; const KEY: u32 = 42; const DATA: i32 = 0xbeef; @@ -2189,12 +2131,13 @@ fn test_lhs_join_update() { let conn = Arc::new(connect_then(&update_counter, { move |ctx| { + let pk_u32 = table_name("pk_u32"); + let unique_u32 = table_name("unique_u32"); + let q1 = format!("SELECT p.* FROM {pk_u32} p WHERE n = 1"); + let q2 = format!("SELECT p.* FROM {pk_u32} p JOIN {unique_u32} u ON p.n = u.n WHERE u.data > 0 AND u.data < 5"); subscribe_these_then( ctx, - &[ - "SELECT p.* FROM pk_u32 p WHERE n = 1", - "SELECT p.* FROM pk_u32 p JOIN unique_u32 u ON p.n = u.n WHERE u.data > 0 AND u.data < 5", - ], + &[q1.as_str(), q2.as_str()], |_| {}, ); } @@ -2244,10 +2187,11 @@ fn test_lhs_join_update_disjoint_queries() { let conn = Arc::new(connect_then(&update_counter, { move |ctx| { - subscribe_these_then(ctx, &[ - "SELECT p.* FROM pk_u32 p WHERE n = 1", - "SELECT p.* FROM pk_u32 p JOIN unique_u32 u ON p.n = u.n WHERE u.data > 0 AND u.data < 5 AND u.n != 1", - ], |_| {}); + let pk_u32 = table_name("pk_u32"); + let unique_u32 = table_name("unique_u32"); + let q1 = format!("SELECT p.* FROM {pk_u32} p WHERE n = 1"); + let q2 = format!("SELECT p.* FROM {pk_u32} p JOIN {unique_u32} u ON p.n = u.n WHERE u.data > 0 AND u.data < 5 AND u.n != 1"); + subscribe_these_then(ctx, &[q1.as_str(), q2.as_str()], |_| {}); } })); @@ -2296,12 +2240,13 @@ fn test_intra_query_bag_semantics_for_join() { connect_then(&test_counter, { move |ctx| { + let pk_u32 = table_name("pk_u32"); + let btree_u32 = table_name("btree_u32"); + let q1 = format!("SELECT * from {btree_u32}"); + let q2 = format!("SELECT {pk_u32}.* FROM {pk_u32} JOIN {btree_u32} ON {pk_u32}.n = {btree_u32}.n"); subscribe_these_then( ctx, - &[ - "SELECT * from btree_u32", - "SELECT pk_u32.* FROM pk_u32 JOIN btree_u32 ON pk_u32.n = btree_u32.n", - ], + &[q1.as_str(), q2.as_str()], move |ctx| { // Insert (n: 0, data: 1) into btree_u32. // @@ -2391,7 +2336,8 @@ fn exec_two_different_compression_algos() { compression_name, |b| b.with_compression(compression), move |ctx| { - subscribe_these_then(ctx, &["SELECT * FROM vec_u_8"], move |ctx| { + let q = select_star("vec_u8"); + subscribe_these_then(ctx, &[q.as_str()], move |ctx| { VecU8::on_insert(ctx, move |_, actual| { let actual: &[u8] = actual.n.as_slice(); let res = if actual == &*expected1 { @@ -2451,7 +2397,8 @@ fn test_parameterized_subscription() { connect_with_then(&ctr_for_test, test_name, |builder| builder, { move |ctx| { let sender = ctx.identity(); - subscribe_these_then(ctx, &["SELECT * FROM pk_identity WHERE i = :sender"], move |ctx| { + let q = select_where("pk_identity", "i = :sender"); + subscribe_these_then(ctx, &[q.as_str()], move |ctx| { put_result(&mut record_sub, Ok(())); // Wait to insert until both client connections have been made ctr_for_subs.wait_for_all(); @@ -2522,7 +2469,8 @@ fn test_rls_subscription() { move |ctx| { let sender = ctx.identity(); let expected_identity = sender; - subscribe_these_then(ctx, &["SELECT * FROM users"], move |ctx| { + let q = select_star("users"); + subscribe_these_then(ctx, &[q.as_str()], move |ctx| { put_result(&mut record_sub, Ok(())); // Wait to insert until both client connections have been made ctr_for_subs.wait_for_all(); @@ -2556,7 +2504,8 @@ fn exec_pk_simple_enum() { let test_counter: Arc = TestCounter::new(); let mut updated = Some(test_counter.add_test("updated")); connect_then(&test_counter, move |ctx| { - subscribe_these_then(ctx, &["SELECT * FROM pk_simple_enum"], move |ctx| { + let q = select_star("pk_simple_enum"); + subscribe_these_then(ctx, &[q.as_str()], move |ctx| { let data1 = 42; let data2 = 24; let a = SimpleEnum::Two; @@ -2583,7 +2532,8 @@ fn exec_indexed_simple_enum() { let test_counter: Arc = TestCounter::new(); let mut updated = Some(test_counter.add_test("updated")); connect_then(&test_counter, move |ctx| { - subscribe_these_then(ctx, &["SELECT * FROM indexed_simple_enum"], move |ctx| { + let q = select_star("indexed_simple_enum"); + subscribe_these_then(ctx, &[q.as_str()], move |ctx| { let a1 = SimpleEnum::Two; let a2 = SimpleEnum::One; ctx.db.indexed_simple_enum().on_insert(move |ctx, row| match &row.n { From 0a84c01f1aa2aa23a9b16b2f5515a17306df46c6 Mon Sep 17 00:00:00 2001 From: Shubham Mishra Date: Fri, 20 Feb 2026 00:58:27 +0530 Subject: [PATCH 121/133] delete duplicate smoketest --- smoketests/tests/pg_wire.py | 317 ------------------------------------ 1 file changed, 317 deletions(-) delete mode 100644 smoketests/tests/pg_wire.py diff --git a/smoketests/tests/pg_wire.py b/smoketests/tests/pg_wire.py deleted file mode 100644 index 46b0a5eae94..00000000000 --- a/smoketests/tests/pg_wire.py +++ /dev/null @@ -1,317 +0,0 @@ -from .. import Smoketest -import subprocess -import os -import tomllib -import psycopg2 - -class SqlFormat(Smoketest): - AUTOPUBLISH = False - MODULE_CODE = """ -use spacetimedb::sats::{i256, u256}; -use spacetimedb::{ConnectionId, Identity, ReducerContext, SpacetimeType, Table, Timestamp, TimeDuration, Uuid}; - -#[derive(Copy, Clone)] -#[spacetimedb::table(accessor = t_ints, public)] -pub struct TInts { - i8: i8, - i16: i16, - i32: i32, - i64: i64, - i128: i128, - i256: i256, -} - -#[spacetimedb::table(accessor = t_ints_tuple, public)] -pub struct TIntsTuple { - tuple: TInts, -} - -#[derive(Copy, Clone)] -#[spacetimedb::table(accessor = t_uints, public)] -pub struct TUints { - u8: u8, - u16: u16, - u32: u32, - u64: u64, - u128: u128, - u256: u256, -} - -#[spacetimedb::table(accessor = t_uints_tuple, public)] -pub struct TUintsTuple { - tuple: TUints, -} - -#[derive(Clone)] -#[spacetimedb::table(accessor = t_others, public)] -pub struct TOthers { - bool: bool, - f32: f32, - f64: f64, - str: String, - bytes: Vec, - identity: Identity, - connection_id: ConnectionId, - timestamp: Timestamp, - duration: TimeDuration, - uuid: Uuid, -} - -#[spacetimedb::table(accessor = t_others_tuple, public)] -pub struct TOthersTuple { - tuple: TOthers -} - -#[derive(SpacetimeType, Debug, Clone, Copy)] -pub enum Action { - Inactive, - Active, -} - -#[derive(SpacetimeType, Debug, Clone, Copy)] -pub enum Color { - Gray(u8), -} - -#[derive(Copy, Clone)] -#[spacetimedb::table(accessor = t_simple_enum, public)] -pub struct TSimpleEnum { - id : u32, - action: Action, -} - -#[spacetimedb::table(accessor = t_enum, public)] -pub struct TEnum { - id : u32, - color: Color, -} - -#[spacetimedb::table(accessor = t_nested, public)] -pub struct TNested { - en: TEnum, - se: TSimpleEnum, - ints: TInts, -} - -#[derive(Clone)] -#[spacetimedb::table(accessor = t_enums)] -pub struct TEnums { - bool_opt: Option, - bool_result: Result, - action: Action, -} - -#[spacetimedb::table(accessor = t_enums_tuple)] -pub struct TEnumsTuple { - tuple: TEnums, -} - -#[spacetimedb::reducer] -pub fn test(ctx: &ReducerContext) { - let tuple = TInts { - i8: -25, - i16: -3224, - i32: -23443, - i64: -2344353, - i128: -234434897853, - i256: (-234434897853i128).into(), - }; - let ints = tuple; - ctx.db.t_ints().insert(tuple); - ctx.db.t_ints_tuple().insert(TIntsTuple { tuple }); - - let tuple = TUints { - u8: 105, - u16: 1050, - u32: 83892, - u64: 48937498, - u128: 4378528978889, - u256: 4378528978889u128.into(), - }; - ctx.db.t_uints().insert(tuple); - ctx.db.t_uints_tuple().insert(TUintsTuple { tuple }); - - let tuple = TOthers { - bool: true, - f32: 594806.58906, - f64: -3454353.345389043278459, - str: "This is spacetimedb".to_string(), - bytes: vec!(1, 2, 3, 4, 5, 6, 7), - identity: Identity::ONE, - connection_id: ConnectionId::ZERO, - timestamp: Timestamp::UNIX_EPOCH, - duration: TimeDuration::from_micros(1000 * 10000), - uuid: Uuid::NIL, - }; - ctx.db.t_others().insert(tuple.clone()); - ctx.db.t_others_tuple().insert(TOthersTuple { tuple }); - - ctx.db.t_simple_enum().insert(TSimpleEnum { id: 1, action: Action::Inactive }); - ctx.db.t_simple_enum().insert(TSimpleEnum { id: 2, action: Action::Active }); - - ctx.db.t_enum().insert(TEnum { id: 1, color: Color::Gray(128) }); - - ctx.db.t_nested().insert(TNested { - en: TEnum { id: 1, color: Color::Gray(128) }, - se: TSimpleEnum { id: 2, action: Action::Active }, - ints, - }); - - let tuple = TEnums { - bool_opt: Some(true), - bool_result: Ok(false), - action: Action::Active, - }; - - ctx.db.t_enums().insert(tuple.clone()); - ctx.db.t_enums_tuple().insert(TEnumsTuple { tuple }); -} -""" - - def psql(self, identity: str, sql: str) -> str: - """Call `psql` and execute the given SQL statement.""" - server = self.get_server_address() - result = subprocess.run( - ["psql", "-h", server["host"], "-p", "5432", "-U", "postgres", "-d", "quickstart", "--quiet", "-c", sql], - encoding="utf8", - env={**os.environ, "PGPASSWORD": identity}, - stdout=subprocess.PIPE, - stderr=subprocess.PIPE, - text=True, - ) - - if result.stderr: - raise Exception(result.stderr.strip()) - return result.stdout.strip() - - def connect_db(self, identity: str): - """Connect to the database using `psycopg2`.""" - server = self.get_server_address() - conn = psycopg2.connect(host=server["host"], port=5432, user="postgres", password=identity, dbname="quickstart") - conn.set_session(autocommit=True) # Disable automic transaction - return conn - - def assertPsql(self, token: str, sql: str, expected): - """Assert that the output of `psql` matches the expected output.""" - self.maxDiff = None - sql_out = self.psql(token, sql) - sql_out = "\n".join([line.rstrip() for line in sql_out.splitlines()]) - expected = "\n".join([line.rstrip() for line in expected.splitlines()]) - print(sql_out) - self.assertMultiLineEqual(sql_out, expected) - - def read_token(self): - """Read the token from the config file.""" - with open(self.config_path, "rb") as f: - config = tomllib.load(f) - return config['spacetimedb_token'] - - def test_sql_format(self): - """This test is designed to test calling `psql` to execute SQL statements""" - token = self.read_token() - self.publish_module("quickstart", clear=True) - - self.call("test") - - self.assertPsql(token, "SELECT * FROM t_ints", """\ - i_8 | i_16 | i_32 | i_64 | i_128 | i_256 ------+-------+--------+----------+---------------+--------------- - -25 | -3224 | -23443 | -2344353 | -234434897853 | -234434897853 -(1 row)""") - self.assertPsql(token, "SELECT * FROM t_ints_tuple", """\ -tuple ---------------------------------------------------------------------------------------------------------- - {"i8": -25, "i16": -3224, "i32": -23443, "i64": -2344353, "i128": -234434897853, "i256": -234434897853} -(1 row)""") - self.assertPsql(token, "SELECT * FROM t_uints", """\ -u8 | u16 | u32 | u64 | u128 | u256 ------+------+-------+----------+---------------+--------------- - 105 | 1050 | 83892 | 48937498 | 4378528978889 | 4378528978889 -(1 row)""") - self.assertPsql(token, "SELECT * FROM t_uints_tuple", """\ -tuple -------------------------------------------------------------------------------------------------------- - {"u8": 105, "u16": 1050, "u32": 83892, "u64": 48937498, "u128": 4378528978889, "u256": 4378528978889} -(1 row)""") - self.assertPsql(token, "SELECT * FROM t_others", """\ -bool | f32 | f64 | str | bytes | identity | connection_id | timestamp | duration | uuid -------+-----------+---------------------+---------------------+------------------+--------------------------------------------------------------------+------------------------------------+---------------------------+----------+-------------------------------------- - t | 594806.56 | -3454353.3453890434 | This is spacetimedb | \\x01020304050607 | \\x0000000000000000000000000000000000000000000000000000000000000001 | \\x00000000000000000000000000000000 | 1970-01-01T00:00:00+00:00 | PT10S | 00000000-0000-0000-0000-000000000000 -(1 row)""") - self.assertPsql(token, "SELECT * FROM t_others_tuple", """\ -tuple ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - {"bool": true, "f32": 594806.56, "f64": -3454353.3453890434, "str": "This is spacetimedb", "bytes": "0x01020304050607", "identity": "0x0000000000000000000000000000000000000000000000000000000000000001", "connection_id": "0x00000000000000000000000000000000", "timestamp": "1970-01-01T00:00:00+00:00", "duration": "PT10S", "uuid": "00000000-0000-0000-0000-000000000000"} -(1 row)""") - self.assertPsql(token, "SELECT * FROM t_simple_enum", """\ -id | action -----+---------- - 1 | Inactive - 2 | Active -(2 rows)""") - self.assertPsql(token, "SELECT * FROM t_enum", """\ -id | color -----+--------------- - 1 | {"Gray": 128} -(1 row)""") - self.assertPsql(token, "SELECT * FROM t_nested", """\ -en | se | ints ------------------------------------+-------------------------------------+--------------------------------------------------------------------------------------------------------- - {"id": 1, "color": {"Gray": 128}} | {"id": 2, "action": {"Active": {}}} | {"i8": -25, "i16": -3224, "i32": -23443, "i64": -2344353, "i128": -234434897853, "i256": -234434897853} -(1 row)""") - self.assertPsql(token,"SELECT * FROM t_enums", """\ -bool_opt | bool_result | action -----------------+---------------+-------- - {"some": true} | {"ok": false} | Active -(1 row) -""") - self.assertPsql(token,"SELECT * FROM t_enums_tuple", """\ -tuple --------------------------------------------------------------------------------------- - {"bool_opt": {"some": true}, "bool_result": {"ok": false}, "action": {"Active": {}}} -(1 row) -""") - - def test_sql_conn(self): - """This test is designed to test connecting to the database and executing queries using `psycopg2`""" - token = self.read_token() - self.publish_module("quickstart", clear=True) - self.call("test") - - conn = self.connect_db(token) - # Check prepared statements (faked by `psycopg2`) - with conn.cursor() as cur: - cur.execute("select * from t_uints where u8 = %s and u16 = %s", (105, 1050)) - rows = cur.fetchall() - self.assertEqual(rows[0], (105, 1050, 83892, 48937498, 4378528978889, 4378528978889)) - # Check long-lived connection - with conn.cursor() as cur: - for _ in range(10): - cur.execute("select count(*) as t from t_uints") - rows = cur.fetchall() - self.assertEqual(rows[0], (1,)) - conn.close() - - def test_failures(self): - """This test is designed to test failure cases""" - token = self.read_token() - self.publish_module("quickstart", clear=True) - - # Empty query - sql_out = self.psql(token, "") - self.assertEqual(sql_out, "") - - # Connection fails with invalid token - with self.assertRaises(Exception) as cm: - self.psql("invalid_token", "SELECT * FROM t_uints") - self.assertIn("Invalid token", str(cm.exception)) - - # Returns error for unsupported `sql` statements - with self.assertRaises(Exception) as cm: - self.psql(token, "SELECT CASE a WHEN 1 THEN 'one' ELSE 'other' END FROM t_uints") - self.assertIn("Unsupported", str(cm.exception)) - - # And prepared statements - with self.assertRaises(Exception) as cm: - self.psql(token, "SELECT * FROM t_uints where u8 = $1") - self.assertIn("Unsupported", str(cm.exception)) From 831d98f9cd2ff39e9a391fd57f766f9aef1aa7f8 Mon Sep 17 00:00:00 2001 From: Shubham Mishra Date: Fri, 20 Feb 2026 01:11:37 +0530 Subject: [PATCH 122/133] Revert "Derive SQL table names from generated bindings instead of hardcoding" This reverts commit 6c1a44547800cbc7a3dff96a674fda61ed572099. --- sdks/rust/tests/test-client/src/main.rs | 214 +++++++++++++++--------- 1 file changed, 132 insertions(+), 82 deletions(-) diff --git a/sdks/rust/tests/test-client/src/main.rs b/sdks/rust/tests/test-client/src/main.rs index 7cc6363e639..e9a3e0e92a5 100644 --- a/sdks/rust/tests/test-client/src/main.rs +++ b/sdks/rust/tests/test-client/src/main.rs @@ -287,41 +287,104 @@ fn assert_all_tables_empty(ctx: &impl RemoteDbContext) -> anyhow::Result<()> { Ok(()) } -/// Build subscription queries from the generated `ALL_TABLE_NAMES`, -/// so they always match the module's actual table names regardless of -/// case conversion policy or explicit accessor names. -fn subscribe_all_queries() -> Vec { - RemoteModule::ALL_TABLE_NAMES - .iter() - .map(|name| format!("SELECT * FROM {name};")) - .collect() -} - -/// Look up the canonical table name from the generated bindings. -/// -/// Finds the table whose name, after stripping underscores, matches `needle` -/// (also stripped of underscores). This accounts for case conversion differences -/// like `one_u8` vs `one_u_8`. -fn table_name(needle: &str) -> &'static str { - let needle_stripped: String = needle.chars().filter(|c| *c != '_').collect(); - RemoteModule::ALL_TABLE_NAMES - .iter() - .find(|name| { - let name_stripped: String = name.chars().filter(|c| *c != '_').collect(); - name_stripped == needle_stripped - }) - .unwrap_or_else(|| panic!("No table matching '{needle}' in ALL_TABLE_NAMES")) -} - -/// Build a `SELECT * FROM
;` query using the canonical table name. -fn select_star(table: &str) -> String { - format!("SELECT * FROM {};", table_name(table)) -} - -/// Build a `SELECT * FROM
WHERE ...;` query using the canonical table name. -fn select_where(table: &str, condition: &str) -> String { - format!("SELECT * FROM {} WHERE {};", table_name(table), condition) -} +/// A great big honking query that subscribes to all rows from all tables. +const SUBSCRIBE_ALL: &[&str] = &[ + "SELECT * FROM one_u_8;", + "SELECT * FROM one_u_16;", + "SELECT * FROM one_u_32;", + "SELECT * FROM one_u_64;", + "SELECT * FROM one_u_128;", + "SELECT * FROM one_u_256;", + "SELECT * FROM one_i_8;", + "SELECT * FROM one_i_16;", + "SELECT * FROM one_i_32;", + "SELECT * FROM one_i_64;", + "SELECT * FROM one_i_128;", + "SELECT * FROM one_i_256;", + "SELECT * FROM one_bool;", + "SELECT * FROM one_f_32;", + "SELECT * FROM one_f_64;", + "SELECT * FROM one_string;", + "SELECT * FROM one_identity;", + "SELECT * FROM one_connection_id;", + "SELECT * FROM one_timestamp;", + "SELECT * FROM one_uuid;", + "SELECT * FROM one_simple_enum;", + "SELECT * FROM one_enum_with_payload;", + "SELECT * FROM one_unit_struct;", + "SELECT * FROM one_byte_struct;", + "SELECT * FROM one_every_primitive_struct;", + "SELECT * FROM one_every_vec_struct;", + "SELECT * FROM vec_u_8;", + "SELECT * FROM vec_u_16;", + "SELECT * FROM vec_u_32;", + "SELECT * FROM vec_u_64;", + "SELECT * FROM vec_u_128;", + "SELECT * FROM vec_u_256;", + "SELECT * FROM vec_i_8;", + "SELECT * FROM vec_i_16;", + "SELECT * FROM vec_i_32;", + "SELECT * FROM vec_i_64;", + "SELECT * FROM vec_i_128;", + "SELECT * FROM vec_i_256;", + "SELECT * FROM vec_bool;", + "SELECT * FROM vec_f_32;", + "SELECT * FROM vec_f_64;", + "SELECT * FROM vec_string;", + "SELECT * FROM vec_identity;", + "SELECT * FROM vec_connection_id;", + "SELECT * FROM vec_timestamp;", + "SELECT * FROM vec_uuid;", + "SELECT * FROM vec_simple_enum;", + "SELECT * FROM vec_enum_with_payload;", + "SELECT * FROM vec_unit_struct;", + "SELECT * FROM vec_byte_struct;", + "SELECT * FROM vec_every_primitive_struct;", + "SELECT * FROM vec_every_vec_struct;", + "SELECT * FROM option_i_32;", + "SELECT * FROM option_string;", + "SELECT * FROM option_identity;", + "SELECT * FROM option_uuid;", + "SELECT * FROM option_simple_enum;", + "SELECT * FROM option_every_primitive_struct;", + "SELECT * FROM option_vec_option_i_32;", + "SELECT * FROM unique_u_8;", + "SELECT * FROM unique_u_16;", + "SELECT * FROM unique_u_32;", + "SELECT * FROM unique_u_64;", + "SELECT * FROM unique_u_128;", + "SELECT * FROM unique_u_256;", + "SELECT * FROM unique_i_8;", + "SELECT * FROM unique_i_16;", + "SELECT * FROM unique_i_32;", + "SELECT * FROM unique_i_64;", + "SELECT * FROM unique_i_128;", + "SELECT * FROM unique_i_256;", + "SELECT * FROM unique_bool;", + "SELECT * FROM unique_string;", + "SELECT * FROM unique_identity;", + "SELECT * FROM unique_connection_id;", + "SELECT * FROM unique_uuid;", + "SELECT * FROM pk_u_8;", + "SELECT * FROM pk_u_16;", + "SELECT * FROM pk_u_32;", + "SELECT * FROM pk_u_64;", + "SELECT * FROM pk_u_128;", + "SELECT * FROM pk_u_256;", + "SELECT * FROM pk_i_8;", + "SELECT * FROM pk_i_16;", + "SELECT * FROM pk_i_32;", + "SELECT * FROM pk_i_64;", + "SELECT * FROM pk_i_128;", + "SELECT * FROM pk_i_256;", + "SELECT * FROM pk_bool;", + "SELECT * FROM pk_string;", + "SELECT * FROM pk_identity;", + "SELECT * FROM pk_connection_id;", + "SELECT * FROM pk_uuid;", + "SELECT * FROM large_table;", + "SELECT * FROM table_holds_table;", +]; fn connect_with_then( test_counter: &std::sync::Arc, @@ -356,9 +419,7 @@ fn connect(test_counter: &std::sync::Arc) -> DbConnection { } fn subscribe_all_then(ctx: &impl RemoteDbContext, callback: impl FnOnce(&SubscriptionEventContext) + Send + 'static) { - let queries = subscribe_all_queries(); - let query_refs: Vec<&str> = queries.iter().map(|s| s.as_str()).collect(); - subscribe_these_then(ctx, &query_refs, callback) + subscribe_these_then(ctx, SUBSCRIBE_ALL, callback) } fn subscribe_these_then( @@ -383,7 +444,7 @@ fn exec_subscribe_and_cancel() { panic!("Subscription should never be applied"); }) .on_error(|_ctx, error| panic!("Subscription errored: {error:?}")) - .subscribe(&select_star("one_u8")); + .subscribe("SELECT * FROM one_u_8;"); assert!(!handle.is_active()); assert!(!handle.is_ended()); let handle_clone = handle.clone(); @@ -426,7 +487,7 @@ fn exec_subscribe_and_unsubscribe() { .unwrap(); }) .on_error(|_ctx, error| panic!("Subscription errored: {error:?}")) - .subscribe(&select_star("one_u8")); + .subscribe("SELECT * FROM one_u_8;"); handle_cell.lock().unwrap().replace(handle.clone()); assert!(!handle.is_active()); assert!(!handle.is_ended()); @@ -1951,10 +2012,10 @@ fn exec_row_deduplication() { let conn = connect_then(&test_counter, { move |ctx| { - let pk_u32 = table_name("pk_u32"); - let q1 = format!("SELECT * FROM {pk_u32} WHERE {pk_u32}.n < 100;"); - let q2 = format!("SELECT * FROM {pk_u32} WHERE {pk_u32}.n < 200;"); - let queries = [q1.as_str(), q2.as_str()]; + let queries = [ + "SELECT * FROM pk_u_32 WHERE pk_u_32.n < 100;", + "SELECT * FROM pk_u_32 WHERE pk_u_32.n < 200;", + ]; // The general approach in this test is that // we expect at most a single `on_X` callback per row. @@ -2014,11 +2075,10 @@ fn exec_row_deduplication_join_r_and_s() { connect_then(&test_counter, { move |ctx| { - let pk_u32 = table_name("pk_u32"); - let unique_u32 = table_name("unique_u32"); - let q1 = format!("SELECT * FROM {pk_u32};"); - let q2 = format!("SELECT {unique_u32}.* FROM {unique_u32} JOIN {pk_u32} ON {unique_u32}.n = {pk_u32}.n;"); - let queries = [q1.as_str(), q2.as_str()]; + let queries = [ + "SELECT * FROM pk_u_32;", + "SELECT unique_u32.* FROM unique_u32 JOIN pk_u32 ON unique_u32.n = pk_u32.n;", + ]; // These never happen. In the case of `PkU32` we get an update instead. UniqueU32::on_delete(ctx, move |_, _| panic!("we never delete a `UniqueU32`")); @@ -2076,14 +2136,12 @@ fn exec_row_deduplication_r_join_s_and_r_join_t() { connect_then(&test_counter, { move |ctx| { - let pk_u32 = table_name("pk_u32"); - let pk_u32_two = table_name("pk_u32_two"); - let unique_u32 = table_name("unique_u32"); - let q1 = format!("SELECT * FROM {pk_u32};"); - let q2 = format!("SELECT * FROM {pk_u32_two};"); - let q3 = format!("SELECT {unique_u32}.* FROM {unique_u32} JOIN {pk_u32} ON {unique_u32}.n = {pk_u32}.n;"); - let q4 = format!("SELECT {unique_u32}.* FROM {unique_u32} JOIN {pk_u32_two} ON {unique_u32}.n = {pk_u32_two}.n;"); - let queries = [q1.as_str(), q2.as_str(), q3.as_str(), q4.as_str()]; + let queries = [ + "SELECT * FROM pk_u_32;", + "SELECT * FROM pk_u_32_two;", + "SELECT unique_u32.* FROM unique_u32 JOIN pk_u32 ON unique_u32.n = pk_u32.n;", + "SELECT unique_u32.* FROM unique_u32 JOIN pk_u32_two ON unique_u32.n = pk_u32_two.n;", + ]; const KEY: u32 = 42; const DATA: i32 = 0xbeef; @@ -2131,13 +2189,12 @@ fn test_lhs_join_update() { let conn = Arc::new(connect_then(&update_counter, { move |ctx| { - let pk_u32 = table_name("pk_u32"); - let unique_u32 = table_name("unique_u32"); - let q1 = format!("SELECT p.* FROM {pk_u32} p WHERE n = 1"); - let q2 = format!("SELECT p.* FROM {pk_u32} p JOIN {unique_u32} u ON p.n = u.n WHERE u.data > 0 AND u.data < 5"); subscribe_these_then( ctx, - &[q1.as_str(), q2.as_str()], + &[ + "SELECT p.* FROM pk_u32 p WHERE n = 1", + "SELECT p.* FROM pk_u32 p JOIN unique_u32 u ON p.n = u.n WHERE u.data > 0 AND u.data < 5", + ], |_| {}, ); } @@ -2187,11 +2244,10 @@ fn test_lhs_join_update_disjoint_queries() { let conn = Arc::new(connect_then(&update_counter, { move |ctx| { - let pk_u32 = table_name("pk_u32"); - let unique_u32 = table_name("unique_u32"); - let q1 = format!("SELECT p.* FROM {pk_u32} p WHERE n = 1"); - let q2 = format!("SELECT p.* FROM {pk_u32} p JOIN {unique_u32} u ON p.n = u.n WHERE u.data > 0 AND u.data < 5 AND u.n != 1"); - subscribe_these_then(ctx, &[q1.as_str(), q2.as_str()], |_| {}); + subscribe_these_then(ctx, &[ + "SELECT p.* FROM pk_u32 p WHERE n = 1", + "SELECT p.* FROM pk_u32 p JOIN unique_u32 u ON p.n = u.n WHERE u.data > 0 AND u.data < 5 AND u.n != 1", + ], |_| {}); } })); @@ -2240,13 +2296,12 @@ fn test_intra_query_bag_semantics_for_join() { connect_then(&test_counter, { move |ctx| { - let pk_u32 = table_name("pk_u32"); - let btree_u32 = table_name("btree_u32"); - let q1 = format!("SELECT * from {btree_u32}"); - let q2 = format!("SELECT {pk_u32}.* FROM {pk_u32} JOIN {btree_u32} ON {pk_u32}.n = {btree_u32}.n"); subscribe_these_then( ctx, - &[q1.as_str(), q2.as_str()], + &[ + "SELECT * from btree_u32", + "SELECT pk_u32.* FROM pk_u32 JOIN btree_u32 ON pk_u32.n = btree_u32.n", + ], move |ctx| { // Insert (n: 0, data: 1) into btree_u32. // @@ -2336,8 +2391,7 @@ fn exec_two_different_compression_algos() { compression_name, |b| b.with_compression(compression), move |ctx| { - let q = select_star("vec_u8"); - subscribe_these_then(ctx, &[q.as_str()], move |ctx| { + subscribe_these_then(ctx, &["SELECT * FROM vec_u_8"], move |ctx| { VecU8::on_insert(ctx, move |_, actual| { let actual: &[u8] = actual.n.as_slice(); let res = if actual == &*expected1 { @@ -2397,8 +2451,7 @@ fn test_parameterized_subscription() { connect_with_then(&ctr_for_test, test_name, |builder| builder, { move |ctx| { let sender = ctx.identity(); - let q = select_where("pk_identity", "i = :sender"); - subscribe_these_then(ctx, &[q.as_str()], move |ctx| { + subscribe_these_then(ctx, &["SELECT * FROM pk_identity WHERE i = :sender"], move |ctx| { put_result(&mut record_sub, Ok(())); // Wait to insert until both client connections have been made ctr_for_subs.wait_for_all(); @@ -2469,8 +2522,7 @@ fn test_rls_subscription() { move |ctx| { let sender = ctx.identity(); let expected_identity = sender; - let q = select_star("users"); - subscribe_these_then(ctx, &[q.as_str()], move |ctx| { + subscribe_these_then(ctx, &["SELECT * FROM users"], move |ctx| { put_result(&mut record_sub, Ok(())); // Wait to insert until both client connections have been made ctr_for_subs.wait_for_all(); @@ -2504,8 +2556,7 @@ fn exec_pk_simple_enum() { let test_counter: Arc = TestCounter::new(); let mut updated = Some(test_counter.add_test("updated")); connect_then(&test_counter, move |ctx| { - let q = select_star("pk_simple_enum"); - subscribe_these_then(ctx, &[q.as_str()], move |ctx| { + subscribe_these_then(ctx, &["SELECT * FROM pk_simple_enum"], move |ctx| { let data1 = 42; let data2 = 24; let a = SimpleEnum::Two; @@ -2532,8 +2583,7 @@ fn exec_indexed_simple_enum() { let test_counter: Arc = TestCounter::new(); let mut updated = Some(test_counter.add_test("updated")); connect_then(&test_counter, move |ctx| { - let q = select_star("indexed_simple_enum"); - subscribe_these_then(ctx, &[q.as_str()], move |ctx| { + subscribe_these_then(ctx, &["SELECT * FROM indexed_simple_enum"], move |ctx| { let a1 = SimpleEnum::Two; let a2 = SimpleEnum::One; ctx.db.indexed_simple_enum().on_insert(move |ctx, row| match &row.n { From 9dc5d6cede3be973dc42db1896f7320fffb180e2 Mon Sep 17 00:00:00 2001 From: Shubham Mishra Date: Fri, 20 Feb 2026 01:43:21 +0530 Subject: [PATCH 123/133] enable tests --- crates/schema/src/def/validate/v10.rs | 47 ++++++++------------------- 1 file changed, 14 insertions(+), 33 deletions(-) diff --git a/crates/schema/src/def/validate/v10.rs b/crates/schema/src/def/validate/v10.rs index 107eb832bca..9def3d91ded 100644 --- a/crates/schema/src/def/validate/v10.rs +++ b/crates/schema/src/def/validate/v10.rs @@ -1985,39 +1985,20 @@ mod tests { assert_eq!(fb.indexes.len(), 2); // "RawBasketLookup" → explicit "fb_lookuP" - // let idx_explicit = fb - // .indexes - // .values() - // .find(|i| &*i.accessor_name == "RawBasketLookup") - // .expect("index with accessor 'RawBasketLookup' not found"); - // assert_eq!( - // idx_explicit.name, - // "fb_lookuP".into(), - // "explicit index name used verbatim" - // ); - // assert_eq!( - // idx_explicit.codegen_name, - // Some(id("fb_lookuP")), - // "codegen_name matches explicit" - // ); - // assert_eq!( - // &*idx_explicit.accessor_name, "RawBasketLookup", - // "accessor_name preserves raw source" - // ); - // - // // "RawCountDirect" — no override; autogenerated from canonical table "FB" + col "item_count" - // let idx_auto = fb - // .indexes - // .values() - // .find(|i| &*i.accessor_name == "RawCountDirect") - // .expect("index with accessor 'RawCountDirect' not found"); - // assert_eq!( - // idx_auto.name, - // "FB_item_count_idx_direct".into(), - // "non-overridden index autogenerated from explicit canonical table name" - // ); - // assert_eq!(idx_auto.codegen_name, Some(id("FB_item_count_idx_direct"))); - // assert_eq!(&*idx_auto.accessor_name, "RawCountDirect"); + let idx_explicit = fb + .indexes + .values() + .find(|i| i.accessor_name == Some(id("RawBasketLookup"))) + .expect("index with accessor 'RawBasketLookup' not found"); + assert_eq!( + idx_explicit.name, + "fb_lookuP".into(), + "explicit index name used verbatim" + ); + assert_eq!( + idx_explicit.accessor_name, Some(id("RawBasketLookup")), + "accessor_name preserves raw source" + ); // // Non-overridden index on deliveryRecord still uses policy-derived table name. let dr_index = dr.indexes.values().next().unwrap(); From 0be954627c3a825b2753c4d4a03ef399b209399f Mon Sep 17 00:00:00 2001 From: Shubham Mishra Date: Fri, 20 Feb 2026 01:47:48 +0530 Subject: [PATCH 124/133] fix index test --- crates/schema/src/def/validate/v10.rs | 29 ++++++++++++++------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/crates/schema/src/def/validate/v10.rs b/crates/schema/src/def/validate/v10.rs index 9def3d91ded..6e5402e491e 100644 --- a/crates/schema/src/def/validate/v10.rs +++ b/crates/schema/src/def/validate/v10.rs @@ -1985,20 +1985,21 @@ mod tests { assert_eq!(fb.indexes.len(), 2); // "RawBasketLookup" → explicit "fb_lookuP" - let idx_explicit = fb - .indexes - .values() - .find(|i| i.accessor_name == Some(id("RawBasketLookup"))) - .expect("index with accessor 'RawBasketLookup' not found"); - assert_eq!( - idx_explicit.name, - "fb_lookuP".into(), - "explicit index name used verbatim" - ); - assert_eq!( - idx_explicit.accessor_name, Some(id("RawBasketLookup")), - "accessor_name preserves raw source" - ); + let idx_explicit = fb + .indexes + .values() + .find(|i| i.accessor_name == Some(id("fruitNameIndex"))) + .expect("index with accessor 'RawBasketLookup' not found"); + assert_eq!( + idx_explicit.name, + "fb_lookuP".into(), + "explicit index name used verbatim" + ); + assert_eq!( + idx_explicit.accessor_name, + Some(id("fruitNameIndex")), + "accessor_name preserves raw source" + ); // // Non-overridden index on deliveryRecord still uses policy-derived table name. let dr_index = dr.indexes.values().next().unwrap(); From 4cf14e9b702dd125eb4bcf9562af5db84dc09252 Mon Sep 17 00:00:00 2001 From: Noa Date: Thu, 19 Feb 2026 16:31:45 -0600 Subject: [PATCH 125/133] Don't do toCamelCase --- crates/bindings-typescript/src/lib/schema.ts | 7 +++--- .../bindings-typescript/src/server/runtime.ts | 4 ++-- .../tests/client_query.test.ts | 22 +++++++++---------- .../tests/table_cache.test.ts | 4 ++-- 4 files changed, 18 insertions(+), 19 deletions(-) diff --git a/crates/bindings-typescript/src/lib/schema.ts b/crates/bindings-typescript/src/lib/schema.ts index 4774cc8358d..45206a4c5d3 100644 --- a/crates/bindings-typescript/src/lib/schema.ts +++ b/crates/bindings-typescript/src/lib/schema.ts @@ -30,8 +30,7 @@ import { type RowObj, type VariantsObj, } from './type_builders'; -import type { CamelCase, Values } from './type_util'; -import { toCamelCase } from './util'; +import type { Values } from './type_util'; export type TableNamesOf = Values< S['tables'] @@ -58,7 +57,7 @@ export interface TableToSchema< AccName extends string, T extends UntypedTableSchema, > extends UntypedTableDef { - accessorName: CamelCase; + accessorName: AccName; columns: T['rowType']['row']; rowType: T['rowSpacetimeType']; indexes: T['idxs']; @@ -92,7 +91,7 @@ export function tableToSchema< type AllowedCol = keyof T['rowType']['row'] & string; return { sourceName: accName, - accessorName: toCamelCase(accName), + accessorName: accName, columns: schema.rowType.row, // typed as T[i]['rowType']['row'] under TablesToSchema rowType: schema.rowSpacetimeType, constraints: tableDef.constraints.map(c => ({ diff --git a/crates/bindings-typescript/src/server/runtime.ts b/crates/bindings-typescript/src/server/runtime.ts index 0ef03c9b2ce..c68f3d765d5 100644 --- a/crates/bindings-typescript/src/server/runtime.ts +++ b/crates/bindings-typescript/src/server/runtime.ts @@ -34,7 +34,7 @@ import { } from '../lib/reducers'; import { type UntypedSchemaDef } from '../lib/schema'; import { type RowType, type Table, type TableMethods } from '../lib/table'; -import { hasOwn, toCamelCase } from '../lib/util'; +import { hasOwn } from '../lib/util'; import { type AnonymousViewCtx, type ViewCtx } from './views'; import { isRowTypedQuery, makeQueryBuilder, toSql } from './query'; import type { DbView } from './db_view'; @@ -288,7 +288,7 @@ class ModuleHooksImpl implements ModuleHooks { return (this.#dbView_ ??= freeze( Object.fromEntries( Object.values(this.#schema.schemaType.tables).map(table => [ - toCamelCase(table.accessorName), + table.accessorName, makeTableView(this.#schema.typespace, table.tableDef), ]) ) diff --git a/crates/bindings-typescript/tests/client_query.test.ts b/crates/bindings-typescript/tests/client_query.test.ts index 9da4eaee804..b29a44ba185 100644 --- a/crates/bindings-typescript/tests/client_query.test.ts +++ b/crates/bindings-typescript/tests/client_query.test.ts @@ -89,7 +89,7 @@ describe('ClientQuery.toSql', () => { it('renders semijoin queries without additional filters', () => { const sql = toSql( tables.player - .rightSemijoin(tables.unindexedPlayer, (player, other) => + .rightSemijoin(tables.unindexed_player, (player, other) => other.id.eq(player.id) ) .build() @@ -104,7 +104,7 @@ describe('ClientQuery.toSql', () => { const sql = toSql( tables.player .where(row => row.id.eq(42)) - .rightSemijoin(tables.unindexedPlayer, (player, other) => + .rightSemijoin(tables.unindexed_player, (player, other) => other.id.eq(player.id) ) .build() @@ -119,7 +119,7 @@ describe('ClientQuery.toSql', () => { const sql = toSql( tables.player .where(row => row.name.eq("O'Brian")) - .rightSemijoin(tables.unindexedPlayer, (player, other) => + .rightSemijoin(tables.unindexed_player, (player, other) => other.id.eq(player.id) ) .build() @@ -134,7 +134,7 @@ describe('ClientQuery.toSql', () => { const sql = toSql( tables.player .where(row => and(row.name.eq('Alice'), row.id.eq(30))) - .rightSemijoin(tables.unindexedPlayer, (player, other) => + .rightSemijoin(tables.unindexed_player, (player, other) => other.id.eq(player.id) ) .build() @@ -196,7 +196,7 @@ describe('ClientQuery.toSql', () => { it('basic semijoin', () => { const sql = toSql( tables.player - .rightSemijoin(tables.unindexedPlayer, (player, other) => + .rightSemijoin(tables.unindexed_player, (player, other) => other.id.eq(player.id) ) .build() @@ -209,7 +209,7 @@ describe('ClientQuery.toSql', () => { it('basic left semijoin', () => { const sql = toSql( tables.player - .leftSemijoin(tables.unindexedPlayer, (player, other) => + .leftSemijoin(tables.unindexed_player, (player, other) => other.id.eq(player.id) ) .build() @@ -252,7 +252,7 @@ describe('ClientQuery.toSql', () => { const sql = toSql( tables.player .where(row => row.id.eq(42)) - .rightSemijoin(tables.unindexedPlayer, (player, other) => + .rightSemijoin(tables.unindexed_player, (player, other) => other.id.eq(player.id) ) .where(row => row.name.eq('Gadget')) @@ -286,7 +286,7 @@ describe('useTable type compatibility', () => { it('rightSemijoin result is assignable to useTable query param', () => { assertType( - tables.player.rightSemijoin(tables.unindexedPlayer, (p, o) => + tables.player.rightSemijoin(tables.unindexed_player, (p, o) => o.id.eq(p.id) ) ); @@ -294,7 +294,7 @@ describe('useTable type compatibility', () => { it('leftSemijoin result is assignable to useTable query param', () => { assertType( - tables.player.leftSemijoin(tables.unindexedPlayer, (p, o) => + tables.player.leftSemijoin(tables.unindexed_player, (p, o) => o.id.eq(p.id) ) ); @@ -303,7 +303,7 @@ describe('useTable type compatibility', () => { it('semijoin with .where() is assignable to useTable query param', () => { assertType( tables.player - .rightSemijoin(tables.unindexedPlayer, (p, o) => o.id.eq(p.id)) + .rightSemijoin(tables.unindexed_player, (p, o) => o.id.eq(p.id)) .where(r => r.name.eq('test')) ); }); @@ -320,7 +320,7 @@ describe('useTable type compatibility', () => { it('semijoin result exposes toSql() returning string', () => { const sql: string = tables.player - .rightSemijoin(tables.unindexedPlayer, (p, o) => o.id.eq(p.id)) + .rightSemijoin(tables.unindexed_player, (p, o) => o.id.eq(p.id)) .toSql(); expect(typeof sql).toBe('string'); }); diff --git a/crates/bindings-typescript/tests/table_cache.test.ts b/crates/bindings-typescript/tests/table_cache.test.ts index 558faf06b48..a3b1f2becc6 100644 --- a/crates/bindings-typescript/tests/table_cache.test.ts +++ b/crates/bindings-typescript/tests/table_cache.test.ts @@ -101,13 +101,13 @@ function runTest( describe('TableCache', () => { describe('Unindexed player table', () => { - const newTable = () => new TableCacheImpl(tables.unindexedPlayer.tableDef); + const newTable = () => new TableCacheImpl(tables.unindexed_player.tableDef); const mkOperation = ( type: 'insert' | 'delete', row: Infer ) => { const rowId = AlgebraicType.intoMapKey( - { tag: 'Product', value: tables.unindexedPlayer.rowType }, + { tag: 'Product', value: tables.unindexed_player.rowType }, row ); return { From 2e6c33e2610b6284d15f65016bc362181029cb8a Mon Sep 17 00:00:00 2001 From: joshua-spacetime Date: Thu, 19 Feb 2026 14:55:29 -0800 Subject: [PATCH 126/133] fix ts lint --- crates/bindings-typescript/src/lib/schema.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/bindings-typescript/src/lib/schema.ts b/crates/bindings-typescript/src/lib/schema.ts index 45206a4c5d3..5d1fc053c65 100644 --- a/crates/bindings-typescript/src/lib/schema.ts +++ b/crates/bindings-typescript/src/lib/schema.ts @@ -30,7 +30,7 @@ import { type RowObj, type VariantsObj, } from './type_builders'; -import type { Values } from './type_util'; +import type { Values } from './type_util'; export type TableNamesOf = Values< S['tables'] From 671886d0c2f33bba0c881eafdfe7e8281e97b836 Mon Sep 17 00:00:00 2001 From: Jason Larabie Date: Thu, 19 Feb 2026 15:34:27 -0800 Subject: [PATCH 127/133] Commented out C++ sdk tests until C++ upgrade to V10 --- sdks/rust/tests/test.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sdks/rust/tests/test.rs b/sdks/rust/tests/test.rs index d6c5cac38ae..a430382c841 100644 --- a/sdks/rust/tests/test.rs +++ b/sdks/rust/tests/test.rs @@ -314,7 +314,7 @@ declare_tests_with_suffix!(rust, ""); declare_tests_with_suffix!(typescript, "-ts"); // TODO: migrate csharp to snake_case table names declare_tests_with_suffix!(csharp, "-cs"); -declare_tests_with_suffix!(cpp, "-cpp"); +//declare_tests_with_suffix!(cpp, "-cpp"); /// Tests of event table functionality, using <./event-table-client> and <../../../modules/sdk-test>. /// @@ -425,7 +425,7 @@ macro_rules! procedure_tests { procedure_tests!(rust_procedures, ""); procedure_tests!(typescript_procedures, "-ts"); -procedure_tests!(cpp_procedures, "-cpp"); +//procedure_tests!(cpp_procedures, "-cpp"); macro_rules! view_tests { ($mod_name:ident, $suffix:literal) => { @@ -487,4 +487,4 @@ macro_rules! view_tests { } view_tests!(rust_view, ""); -view_tests!(cpp_view, "-cpp"); +//view_tests!(cpp_view, "-cpp"); From 777c3305e3bb93455e90cb99441e807f6d3a1016 Mon Sep 17 00:00:00 2001 From: clockwork-labs-bot Date: Thu, 19 Feb 2026 23:07:38 -0500 Subject: [PATCH 128/133] Fix TS SDK test: use camelCase table accessors directly The tbl() helper was using toCamelCase(name) at runtime to look up tables on ctx.db, but the table accessor names (keys in the schema object) were snake_case. This mismatch caused 'Cannot read properties of undefined' errors for every insert/delete reducer. Fix: use camelCase keys directly in the table definitions (matching TypeScript convention), and access ctx.db[name] without runtime conversion. Remove the now-unused toCamelCase import. --- modules/sdk-test-ts/src/index.ts | 412 +++++++++++++++---------------- 1 file changed, 206 insertions(+), 206 deletions(-) diff --git a/modules/sdk-test-ts/src/index.ts b/modules/sdk-test-ts/src/index.ts index 758337c00ee..d2432ddaee1 100644 --- a/modules/sdk-test-ts/src/index.ts +++ b/modules/sdk-test-ts/src/index.ts @@ -1,7 +1,7 @@ // ───────────────────────────────────────────────────────────────────────────── // IMPORTS // ───────────────────────────────────────────────────────────────────────────── -import { toCamelCase, Uuid } from 'spacetimedb'; +import { Uuid } from 'spacetimedb'; import { type ModuleExport, type RowObj, @@ -107,8 +107,8 @@ type TableWithReducers = { type ExportsObj = Record; /** Somewhat mimics the `define_tables!` macro in sdk-test/src/lib.rs */ -function tbl( - name: Name, +function tbl( + accessor: Accessor, ops: { insert?: string; delete?: string; @@ -118,7 +118,7 @@ function tbl( delete_by?: [string, keyof Row]; }, row: Row -): TableWithReducers>> { +): TableWithReducers>> { const t = table({ public: true }, row); return { table: t, @@ -126,30 +126,30 @@ function tbl( const exports: ExportsObj = {}; if (ops.insert) { exports[ops.insert] = spacetimedb.reducer(row, (ctx, args) => { - (ctx.db[toCamelCase(name)] as any).insert({ ...args }); + (ctx.db[accessor] as any).insert({ ...args }); }); } if (ops.delete) { exports[ops.delete] = spacetimedb.reducer(row, (ctx, args) => { - (ctx.db[toCamelCase(name)] as any).delete({ ...args }); + (ctx.db[accessor] as any).delete({ ...args }); }); } if (ops.insert_or_panic) { exports[ops.insert_or_panic] = spacetimedb.reducer(row, (ctx, args) => { - (ctx.db[toCamelCase(name)] as any).insert({ ...args }); + (ctx.db[accessor] as any).insert({ ...args }); }); } if (ops.update_by) { const [reducer, col] = ops.update_by; exports[reducer] = spacetimedb.reducer(row, (ctx, args) => { - (ctx.db[toCamelCase(name)] as any)[col].update({ ...args }); + (ctx.db[accessor] as any)[col].update({ ...args }); }); } if (ops.update_non_pk_by) { const [reducer, col] = ops.update_non_pk_by; exports[reducer] = spacetimedb.reducer(row, (ctx, args) => { - (ctx.db[toCamelCase(name)] as any)[col].delete(args[col as any]); - (ctx.db[toCamelCase(name)] as any).insert({ ...args }); + (ctx.db[accessor] as any)[col].delete(args[col as any]); + (ctx.db[accessor] as any).insert({ ...args }); }); } if (ops.delete_by) { @@ -157,7 +157,7 @@ function tbl( exports[reducer] = spacetimedb.reducer( { [col]: row[col] }, (ctx, args) => { - (ctx.db[toCamelCase(name)] as any)[col].delete(args[col as any]); + (ctx.db[accessor] as any)[col].delete(args[col as any]); } ); } @@ -168,78 +168,78 @@ function tbl( // Tables holding a single value. const singleValTables = { - one_u8: tbl('one_u8', { insert: 'insert_one_u8' }, { n: t.u8() }), - one_u16: tbl('one_u16', { insert: 'insert_one_u16' }, { n: t.u16() }), - one_u32: tbl('one_u32', { insert: 'insert_one_u32' }, { n: t.u32() }), - one_u64: tbl('one_u64', { insert: 'insert_one_u64' }, { n: t.u64() }), - one_u128: tbl('one_u128', { insert: 'insert_one_u128' }, { n: t.u128() }), - one_u256: tbl('one_u256', { insert: 'insert_one_u256' }, { n: t.u256() }), - - one_i8: tbl('one_i8', { insert: 'insert_one_i8' }, { n: t.i8() }), - one_i16: tbl('one_i16', { insert: 'insert_one_i16' }, { n: t.i16() }), - one_i32: tbl('one_i32', { insert: 'insert_one_i32' }, { n: t.i32() }), - one_i64: tbl('one_i64', { insert: 'insert_one_i64' }, { n: t.i64() }), - one_i128: tbl('one_i128', { insert: 'insert_one_i128' }, { n: t.i128() }), - one_i256: tbl('one_i256', { insert: 'insert_one_i256' }, { n: t.i256() }), - - one_bool: tbl('one_bool', { insert: 'insert_one_bool' }, { b: t.bool() }), - - one_f32: tbl('one_f32', { insert: 'insert_one_f32' }, { f: t.f32() }), - one_f64: tbl('one_f64', { insert: 'insert_one_f64' }, { f: t.f64() }), - - one_string: tbl( - 'one_string', + oneU8: tbl('oneU8', { insert: 'insert_one_u8' }, { n: t.u8() }), + oneU16: tbl('oneU16', { insert: 'insert_one_u16' }, { n: t.u16() }), + oneU32: tbl('oneU32', { insert: 'insert_one_u32' }, { n: t.u32() }), + oneU64: tbl('oneU64', { insert: 'insert_one_u64' }, { n: t.u64() }), + oneU128: tbl('oneU128', { insert: 'insert_one_u128' }, { n: t.u128() }), + oneU256: tbl('oneU256', { insert: 'insert_one_u256' }, { n: t.u256() }), + + oneI8: tbl('oneI8', { insert: 'insert_one_i8' }, { n: t.i8() }), + oneI16: tbl('oneI16', { insert: 'insert_one_i16' }, { n: t.i16() }), + oneI32: tbl('oneI32', { insert: 'insert_one_i32' }, { n: t.i32() }), + oneI64: tbl('oneI64', { insert: 'insert_one_i64' }, { n: t.i64() }), + oneI128: tbl('oneI128', { insert: 'insert_one_i128' }, { n: t.i128() }), + oneI256: tbl('oneI256', { insert: 'insert_one_i256' }, { n: t.i256() }), + + oneBool: tbl('oneBool', { insert: 'insert_one_bool' }, { b: t.bool() }), + + oneF32: tbl('oneF32', { insert: 'insert_one_f32' }, { f: t.f32() }), + oneF64: tbl('oneF64', { insert: 'insert_one_f64' }, { f: t.f64() }), + + oneString: tbl( + 'oneString', { insert: 'insert_one_string' }, { s: t.string() } ), - one_identity: tbl( - 'one_identity', + oneIdentity: tbl( + 'oneIdentity', { insert: 'insert_one_identity' }, { i: t.identity() } ), - one_connection_id: tbl( - 'one_connection_id', + oneConnectionId: tbl( + 'oneConnectionId', { insert: 'insert_one_connection_id' }, { a: t.connectionId() } ), - one_uuid: tbl('one_uuid', { insert: 'insert_one_uuid' }, { u: t.uuid() }), + oneUuid: tbl('oneUuid', { insert: 'insert_one_uuid' }, { u: t.uuid() }), - one_timestamp: tbl( - 'one_timestamp', + oneTimestamp: tbl( + 'oneTimestamp', { insert: 'insert_one_timestamp' }, { t: t.timestamp() } ), - one_simple_enum: tbl( - 'one_simple_enum', + oneSimpleEnum: tbl( + 'oneSimpleEnum', { insert: 'insert_one_simple_enum' }, { e: SimpleEnum } ), - one_enum_with_payload: tbl( - 'one_enum_with_payload', + oneEnumWithPayload: tbl( + 'oneEnumWithPayload', { insert: 'insert_one_enum_with_payload' }, { e: EnumWithPayload } ), - one_unit_struct: tbl( - 'one_unit_struct', + oneUnitStruct: tbl( + 'oneUnitStruct', { insert: 'insert_one_unit_struct' }, { s: UnitStruct } ), - one_byte_struct: tbl( - 'one_byte_struct', + oneByteStruct: tbl( + 'oneByteStruct', { insert: 'insert_one_byte_struct' }, { s: ByteStruct } ), - one_every_primitive_struct: tbl( - 'one_every_primitive_struct', + oneEveryPrimitiveStruct: tbl( + 'oneEveryPrimitiveStruct', { insert: 'insert_one_every_primitive_struct' }, { s: EveryPrimitiveStruct } ), - one_every_vec_struct: tbl( - 'one_every_vec_struct', + oneEveryVecStruct: tbl( + 'oneEveryVecStruct', { insert: 'insert_one_every_vec_struct' }, { s: EveryVecStruct } ), @@ -247,134 +247,134 @@ const singleValTables = { // Tables holding a Vec of various types. const vecTables = { - vec_u8: tbl('vec_u8', { insert: 'insert_vec_u8' }, { n: t.array(t.u8()) }), - vec_u16: tbl( - 'vec_u16', + vecU8: tbl('vecU8', { insert: 'insert_vec_u8' }, { n: t.array(t.u8()) }), + vecU16: tbl( + 'vecU16', { insert: 'insert_vec_u16' }, { n: t.array(t.u16()) } ), - vec_u32: tbl( - 'vec_u32', + vecU32: tbl( + 'vecU32', { insert: 'insert_vec_u32' }, { n: t.array(t.u32()) } ), - vec_u64: tbl( - 'vec_u64', + vecU64: tbl( + 'vecU64', { insert: 'insert_vec_u64' }, { n: t.array(t.u64()) } ), - vec_u128: tbl( - 'vec_u128', + vecU128: tbl( + 'vecU128', { insert: 'insert_vec_u128' }, { n: t.array(t.u128()) } ), - vec_u256: tbl( - 'vec_u256', + vecU256: tbl( + 'vecU256', { insert: 'insert_vec_u256' }, { n: t.array(t.u256()) } ), - vec_i8: tbl('vec_i8', { insert: 'insert_vec_i8' }, { n: t.array(t.i8()) }), - vec_i16: tbl( - 'vec_i16', + vecI8: tbl('vecI8', { insert: 'insert_vec_i8' }, { n: t.array(t.i8()) }), + vecI16: tbl( + 'vecI16', { insert: 'insert_vec_i16' }, { n: t.array(t.i16()) } ), - vec_i32: tbl( - 'vec_i32', + vecI32: tbl( + 'vecI32', { insert: 'insert_vec_i32' }, { n: t.array(t.i32()) } ), - vec_i64: tbl( - 'vec_i64', + vecI64: tbl( + 'vecI64', { insert: 'insert_vec_i64' }, { n: t.array(t.i64()) } ), - vec_i128: tbl( - 'vec_i128', + vecI128: tbl( + 'vecI128', { insert: 'insert_vec_i128' }, { n: t.array(t.i128()) } ), - vec_i256: tbl( - 'vec_i256', + vecI256: tbl( + 'vecI256', { insert: 'insert_vec_i256' }, { n: t.array(t.i256()) } ), - vec_bool: tbl( - 'vec_bool', + vecBool: tbl( + 'vecBool', { insert: 'insert_vec_bool' }, { b: t.array(t.bool()) } ), - vec_f32: tbl( - 'vec_f32', + vecF32: tbl( + 'vecF32', { insert: 'insert_vec_f32' }, { f: t.array(t.f32()) } ), - vec_f64: tbl( - 'vec_f64', + vecF64: tbl( + 'vecF64', { insert: 'insert_vec_f64' }, { f: t.array(t.f64()) } ), - vec_string: tbl( - 'vec_string', + vecString: tbl( + 'vecString', { insert: 'insert_vec_string' }, { s: t.array(t.string()) } ), - vec_identity: tbl( - 'vec_identity', + vecIdentity: tbl( + 'vecIdentity', { insert: 'insert_vec_identity' }, { i: t.array(t.identity()) } ), - vec_connection_id: tbl( - 'vec_connection_id', + vecConnectionId: tbl( + 'vecConnectionId', { insert: 'insert_vec_connection_id' }, { a: t.array(t.connectionId()) } ), - vec_timestamp: tbl( - 'vec_timestamp', + vecTimestamp: tbl( + 'vecTimestamp', { insert: 'insert_vec_timestamp' }, { t: t.array(t.timestamp()) } ), - vec_uuid: tbl( - 'vec_uuid', + vecUuid: tbl( + 'vecUuid', { insert: 'insert_vec_uuid' }, { u: t.array(t.uuid()) } ), - vec_simple_enum: tbl( - 'vec_simple_enum', + vecSimpleEnum: tbl( + 'vecSimpleEnum', { insert: 'insert_vec_simple_enum' }, { e: t.array(SimpleEnum) } ), - vec_enum_with_payload: tbl( - 'vec_enum_with_payload', + vecEnumWithPayload: tbl( + 'vecEnumWithPayload', { insert: 'insert_vec_enum_with_payload' }, { e: t.array(EnumWithPayload) } ), - vec_unit_struct: tbl( - 'vec_unit_struct', + vecUnitStruct: tbl( + 'vecUnitStruct', { insert: 'insert_vec_unit_struct' }, { s: t.array(UnitStruct) } ), - vec_byte_struct: tbl( - 'vec_byte_struct', + vecByteStruct: tbl( + 'vecByteStruct', { insert: 'insert_vec_byte_struct' }, { s: t.array(ByteStruct) } ), - vec_every_primitive_struct: tbl( - 'vec_every_primitive_struct', + vecEveryPrimitiveStruct: tbl( + 'vecEveryPrimitiveStruct', { insert: 'insert_vec_every_primitive_struct' }, { s: t.array(EveryPrimitiveStruct) } ), - vec_every_vec_struct: tbl( - 'vec_every_vec_struct', + vecEveryVecStruct: tbl( + 'vecEveryVecStruct', { insert: 'insert_vec_every_vec_struct' }, { s: t.array(EveryVecStruct) } ), @@ -382,38 +382,38 @@ const vecTables = { // Tables holding an Option of various types. const optionTables = { - option_i32: tbl( - 'option_i32', + optionI32: tbl( + 'optionI32', { insert: 'insert_option_i32' }, { n: t.option(t.i32()) } ), - option_string: tbl( - 'option_string', + optionString: tbl( + 'optionString', { insert: 'insert_option_string' }, { s: t.option(t.string()) } ), - option_identity: tbl( - 'option_identity', + optionIdentity: tbl( + 'optionIdentity', { insert: 'insert_option_identity' }, { i: t.option(t.identity()) } ), - option_uuid: tbl( - 'option_uuid', + optionUuid: tbl( + 'optionUuid', { insert: 'insert_option_uuid' }, { u: t.option(t.uuid()) } ), - option_simple_enum: tbl( - 'option_simple_enum', + optionSimpleEnum: tbl( + 'optionSimpleEnum', { insert: 'insert_option_simple_enum' }, { e: t.option(SimpleEnum) } ), - option_every_primitive_struct: tbl( - 'option_every_primitive_struct', + optionEveryPrimitiveStruct: tbl( + 'optionEveryPrimitiveStruct', { insert: 'insert_option_every_primitive_struct' }, { s: t.option(EveryPrimitiveStruct) } ), - option_vec_option_i32: tbl( - 'option_vec_option_i32', + optionVecOptionI32: tbl( + 'optionVecOptionI32', { insert: 'insert_option_vec_option_i32' }, { v: t.option(t.array(t.option(t.i32()))) } ), @@ -421,33 +421,33 @@ const optionTables = { // Tables for Result values. const resultTables = { - result_i32_string: tbl( - 'result_i32_string', + resultI32String: tbl( + 'resultI32String', { insert: 'insert_result_i32_string' }, { r: t.result(t.i32(), t.string()) } ), - result_string_i32: tbl( - 'result_string_i32', + resultStringI32: tbl( + 'resultStringI32', { insert: 'insert_result_string_i32' }, { r: t.result(t.string(), t.i32()) } ), - result_identity_string: tbl( - 'result_identity_string', + resultIdentityString: tbl( + 'resultIdentityString', { insert: 'insert_result_identity_string' }, { r: t.result(t.identity(), t.string()) } ), - result_simple_enum_i32: tbl( - 'result_simple_enum_i32', + resultSimpleEnumI32: tbl( + 'resultSimpleEnumI32', { insert: 'insert_result_simple_enum_i32' }, { r: t.result(SimpleEnum, t.i32()) } ), - result_every_primitive_struct_string: tbl( - 'result_every_primitive_struct_string', + resultEveryPrimitiveStructString: tbl( + 'resultEveryPrimitiveStructString', { insert: 'insert_result_every_primitive_struct_string' }, { r: t.result(EveryPrimitiveStruct, t.string()) } ), - result_vec_i32_string: tbl( - 'result_vec_i32_string', + resultVecI32String: tbl( + 'resultVecI32String', { insert: 'insert_result_vec_i32_string' }, { r: t.result(t.array(t.i32()), t.string()) } ), @@ -456,8 +456,8 @@ const resultTables = { // Tables mapping a unique, but non-pk, key to a boring i32 payload. // This allows us to test delete events, and the semantically correct absence of update events. const uniqueTables = { - unique_u8: tbl( - 'unique_u8', + uniqueU8: tbl( + 'uniqueU8', { insert_or_panic: 'insert_unique_u8', update_non_pk_by: ['update_unique_u8', 'n'], @@ -466,8 +466,8 @@ const uniqueTables = { { n: t.u8().unique(), data: t.i32() } ), - unique_u16: tbl( - 'unique_u16', + uniqueU16: tbl( + 'uniqueU16', { insert_or_panic: 'insert_unique_u16', update_non_pk_by: ['update_unique_u16', 'n'], @@ -476,8 +476,8 @@ const uniqueTables = { { n: t.u16().unique(), data: t.i32() } ), - unique_u32: tbl( - 'unique_u32', + uniqueU32: tbl( + 'uniqueU32', { insert_or_panic: 'insert_unique_u32', update_non_pk_by: ['update_unique_u32', 'n'], @@ -486,8 +486,8 @@ const uniqueTables = { { n: t.u32().unique(), data: t.i32() } ), - unique_u64: tbl( - 'unique_u64', + uniqueU64: tbl( + 'uniqueU64', { insert_or_panic: 'insert_unique_u64', update_non_pk_by: ['update_unique_u64', 'n'], @@ -496,8 +496,8 @@ const uniqueTables = { { n: t.u64().unique(), data: t.i32() } ), - unique_u128: tbl( - 'unique_u128', + uniqueU128: tbl( + 'uniqueU128', { insert_or_panic: 'insert_unique_u128', update_non_pk_by: ['update_unique_u128', 'n'], @@ -506,8 +506,8 @@ const uniqueTables = { { n: t.u128().unique(), data: t.i32() } ), - unique_u256: tbl( - 'unique_u256', + uniqueU256: tbl( + 'uniqueU256', { insert_or_panic: 'insert_unique_u256', update_non_pk_by: ['update_unique_u256', 'n'], @@ -516,8 +516,8 @@ const uniqueTables = { { n: t.u256().unique(), data: t.i32() } ), - unique_i8: tbl( - 'unique_i8', + uniqueI8: tbl( + 'uniqueI8', { insert_or_panic: 'insert_unique_i8', update_non_pk_by: ['update_unique_i8', 'n'], @@ -526,8 +526,8 @@ const uniqueTables = { { n: t.i8().unique(), data: t.i32() } ), - unique_i16: tbl( - 'unique_i16', + uniqueI16: tbl( + 'uniqueI16', { insert_or_panic: 'insert_unique_i16', update_non_pk_by: ['update_unique_i16', 'n'], @@ -536,8 +536,8 @@ const uniqueTables = { { n: t.i16().unique(), data: t.i32() } ), - unique_i32: tbl( - 'unique_i32', + uniqueI32: tbl( + 'uniqueI32', { insert_or_panic: 'insert_unique_i32', update_non_pk_by: ['update_unique_i32', 'n'], @@ -546,8 +546,8 @@ const uniqueTables = { { n: t.i32().unique(), data: t.i32() } ), - unique_i64: tbl( - 'unique_i64', + uniqueI64: tbl( + 'uniqueI64', { insert_or_panic: 'insert_unique_i64', update_non_pk_by: ['update_unique_i64', 'n'], @@ -556,8 +556,8 @@ const uniqueTables = { { n: t.i64().unique(), data: t.i32() } ), - unique_i128: tbl( - 'unique_i128', + uniqueI128: tbl( + 'uniqueI128', { insert_or_panic: 'insert_unique_i128', update_non_pk_by: ['update_unique_i128', 'n'], @@ -566,8 +566,8 @@ const uniqueTables = { { n: t.i128().unique(), data: t.i32() } ), - unique_i256: tbl( - 'unique_i256', + uniqueI256: tbl( + 'uniqueI256', { insert_or_panic: 'insert_unique_i256', update_non_pk_by: ['update_unique_i256', 'n'], @@ -576,8 +576,8 @@ const uniqueTables = { { n: t.i256().unique(), data: t.i32() } ), - unique_bool: tbl( - 'unique_bool', + uniqueBool: tbl( + 'uniqueBool', { insert_or_panic: 'insert_unique_bool', update_non_pk_by: ['update_unique_bool', 'b'], @@ -586,8 +586,8 @@ const uniqueTables = { { b: t.bool().unique(), data: t.i32() } ), - unique_string: tbl( - 'unique_string', + uniqueString: tbl( + 'uniqueString', { insert_or_panic: 'insert_unique_string', update_non_pk_by: ['update_unique_string', 's'], @@ -596,8 +596,8 @@ const uniqueTables = { { s: t.string().unique(), data: t.i32() } ), - unique_identity: tbl( - 'unique_identity', + uniqueIdentity: tbl( + 'uniqueIdentity', { insert_or_panic: 'insert_unique_identity', update_non_pk_by: ['update_unique_identity', 'i'], @@ -606,8 +606,8 @@ const uniqueTables = { { i: t.identity().unique(), data: t.i32() } ), - unique_connection_id: tbl( - 'unique_connection_id', + uniqueConnectionId: tbl( + 'uniqueConnectionId', { insert_or_panic: 'insert_unique_connection_id', update_non_pk_by: ['update_unique_connection_id', 'a'], @@ -616,8 +616,8 @@ const uniqueTables = { { a: t.connectionId().unique(), data: t.i32() } ), - unique_uuid: tbl( - 'unique_uuid', + uniqueUuid: tbl( + 'uniqueUuid', { insert_or_panic: 'insert_unique_uuid', update_non_pk_by: ['update_unique_uuid', 'u'], @@ -630,8 +630,8 @@ const uniqueTables = { // Tables mapping a primary key to a boring i32 payload. // This allows us to test update and delete events. const pkTables = { - pk_u8: tbl( - 'pk_u8', + pkU8: tbl( + 'pkU8', { insert_or_panic: 'insert_pk_u8', update_by: ['update_pk_u8', 'n'], @@ -640,8 +640,8 @@ const pkTables = { { n: t.u8().primaryKey(), data: t.i32() } ), - pk_u16: tbl( - 'pk_u16', + pkU16: tbl( + 'pkU16', { insert_or_panic: 'insert_pk_u16', update_by: ['update_pk_u16', 'n'], @@ -650,8 +650,8 @@ const pkTables = { { n: t.u16().primaryKey(), data: t.i32() } ), - pk_u32: tbl( - 'pk_u32', + pkU32: tbl( + 'pkU32', { insert_or_panic: 'insert_pk_u32', update_by: ['update_pk_u32', 'n'], @@ -660,8 +660,8 @@ const pkTables = { { n: t.u32().primaryKey(), data: t.i32() } ), - pk_u32_two: tbl( - 'pk_u32_two', + pkU32Two: tbl( + 'pkU32Two', { insert_or_panic: 'insert_pk_u32_two', update_by: ['update_pk_u32_two', 'n'], @@ -670,8 +670,8 @@ const pkTables = { { n: t.u32().primaryKey(), data: t.i32() } ), - pk_u64: tbl( - 'pk_u64', + pkU64: tbl( + 'pkU64', { insert_or_panic: 'insert_pk_u64', update_by: ['update_pk_u64', 'n'], @@ -680,8 +680,8 @@ const pkTables = { { n: t.u64().primaryKey(), data: t.i32() } ), - pk_u128: tbl( - 'pk_u128', + pkU128: tbl( + 'pkU128', { insert_or_panic: 'insert_pk_u128', update_by: ['update_pk_u128', 'n'], @@ -690,8 +690,8 @@ const pkTables = { { n: t.u128().primaryKey(), data: t.i32() } ), - pk_u256: tbl( - 'pk_u256', + pkU256: tbl( + 'pkU256', { insert_or_panic: 'insert_pk_u256', update_by: ['update_pk_u256', 'n'], @@ -700,8 +700,8 @@ const pkTables = { { n: t.u256().primaryKey(), data: t.i32() } ), - pk_i8: tbl( - 'pk_i8', + pkI8: tbl( + 'pkI8', { insert_or_panic: 'insert_pk_i8', update_by: ['update_pk_i8', 'n'], @@ -710,8 +710,8 @@ const pkTables = { { n: t.i8().primaryKey(), data: t.i32() } ), - pk_i16: tbl( - 'pk_i16', + pkI16: tbl( + 'pkI16', { insert_or_panic: 'insert_pk_i16', update_by: ['update_pk_i16', 'n'], @@ -720,8 +720,8 @@ const pkTables = { { n: t.i16().primaryKey(), data: t.i32() } ), - pk_i32: tbl( - 'pk_i32', + pkI32: tbl( + 'pkI32', { insert_or_panic: 'insert_pk_i32', update_by: ['update_pk_i32', 'n'], @@ -730,8 +730,8 @@ const pkTables = { { n: t.i32().primaryKey(), data: t.i32() } ), - pk_i64: tbl( - 'pk_i64', + pkI64: tbl( + 'pkI64', { insert_or_panic: 'insert_pk_i64', update_by: ['update_pk_i64', 'n'], @@ -740,8 +740,8 @@ const pkTables = { { n: t.i64().primaryKey(), data: t.i32() } ), - pk_i128: tbl( - 'pk_i128', + pkI128: tbl( + 'pkI128', { insert_or_panic: 'insert_pk_i128', update_by: ['update_pk_i128', 'n'], @@ -750,8 +750,8 @@ const pkTables = { { n: t.i128().primaryKey(), data: t.i32() } ), - pk_i256: tbl( - 'pk_i256', + pkI256: tbl( + 'pkI256', { insert_or_panic: 'insert_pk_i256', update_by: ['update_pk_i256', 'n'], @@ -760,8 +760,8 @@ const pkTables = { { n: t.i256().primaryKey(), data: t.i32() } ), - pk_bool: tbl( - 'pk_bool', + pkBool: tbl( + 'pkBool', { insert_or_panic: 'insert_pk_bool', update_by: ['update_pk_bool', 'b'], @@ -770,8 +770,8 @@ const pkTables = { { b: t.bool().primaryKey(), data: t.i32() } ), - pk_string: tbl( - 'pk_string', + pkString: tbl( + 'pkString', { insert_or_panic: 'insert_pk_string', update_by: ['update_pk_string', 's'], @@ -780,8 +780,8 @@ const pkTables = { { s: t.string().primaryKey(), data: t.i32() } ), - pk_identity: tbl( - 'pk_identity', + pkIdentity: tbl( + 'pkIdentity', { insert_or_panic: 'insert_pk_identity', update_by: ['update_pk_identity', 'i'], @@ -790,8 +790,8 @@ const pkTables = { { i: t.identity().primaryKey(), data: t.i32() } ), - pk_connection_id: tbl( - 'pk_connection_id', + pkConnectionId: tbl( + 'pkConnectionId', { insert_or_panic: 'insert_pk_connection_id', update_by: ['update_pk_connection_id', 'a'], @@ -800,8 +800,8 @@ const pkTables = { { a: t.connectionId().primaryKey(), data: t.i32() } ), - pk_uuid: tbl( - 'pk_uuid', + pkUuid: tbl( + 'pkUuid', { insert_or_panic: 'insert_pk_uuid', update_by: ['update_pk_uuid', 'u'], @@ -810,8 +810,8 @@ const pkTables = { { u: t.uuid().primaryKey(), data: t.i32() } ), - pk_simple_enum: tbl( - 'pk_simple_enum', + pkSimpleEnum: tbl( + 'pkSimpleEnum', { insert_or_panic: 'insert_pk_simple_enum', }, @@ -822,8 +822,8 @@ const pkTables = { // Some weird-looking tables. const weirdTables = { // A table with many fields, of many different types. - large_table: tbl( - 'large_table', + largeTable: tbl( + 'largeTable', { insert: 'insert_large_table', delete: 'delete_large_table', @@ -856,19 +856,19 @@ const weirdTables = { // A table which holds instances of other table structs. // This tests that we can use tables as types. - table_holds_table: tbl( - 'table_holds_table', + tableHoldsTable: tbl( + 'tableHoldsTable', { insert: 'insert_table_holds_table', }, { - a: singleValTables.one_u8.table.rowType, - b: vecTables.vec_u8.table.rowType, + a: singleValTables.oneU8.table.rowType, + b: vecTables.vecU8.table.rowType, } ), }; -const PkU32 = pkTables.pk_u32.table.rowType; +const PkU32 = pkTables.pkU32.table.rowType; const allTables = { ...singleValTables, From c3bec13a7b824088746d06a50758450fe016d2ff Mon Sep 17 00:00:00 2001 From: clockwork-labs-bot Date: Thu, 19 Feb 2026 23:26:12 -0500 Subject: [PATCH 129/133] Use accessor names from definitions instead of recomputing In db_connection_impl.ts, reducers and procedures were recomputing accessor names with toCamelCase(name) instead of using the accessorName already set on the definition. Tables already used tbl.accessorName directly. Make reducers and procedures consistent. --- crates/bindings-typescript/src/sdk/db_connection_impl.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/crates/bindings-typescript/src/sdk/db_connection_impl.ts b/crates/bindings-typescript/src/sdk/db_connection_impl.ts index e115d9bdcd4..21e7990aeba 100644 --- a/crates/bindings-typescript/src/sdk/db_connection_impl.ts +++ b/crates/bindings-typescript/src/sdk/db_connection_impl.ts @@ -54,7 +54,6 @@ import type { } from './reducers.ts'; import type { ClientDbView } from './db_view.ts'; import type { RowType, UntypedTableDef } from '../lib/table.ts'; -import { toCamelCase } from '../lib/util.ts'; import type { ProceduresView } from './procedures.ts'; import type { Values } from '../lib/type_util.ts'; import type { TransactionUpdate } from './client_api/types.ts'; @@ -305,7 +304,7 @@ export class DbConnectionImpl for (const reducer of def.reducers) { const reducerName = reducer.name; - const key = toCamelCase(reducerName); + const key = reducer.accessorName; const { serialize: serializeArgs } = this.#reducerArgsSerializers[reducerName]; @@ -326,7 +325,7 @@ export class DbConnectionImpl for (const procedure of def.procedures) { const procedureName = procedure.name; - const key = toCamelCase(procedureName); + const key = procedure.accessorName; const { serializeArgs, deserializeReturn } = this.#procedureSerializers[procedureName]; From 2c0398bdae830bea6ee1745408549988622063e3 Mon Sep 17 00:00:00 2001 From: Shubham Mishra Date: Fri, 20 Feb 2026 11:08:46 +0530 Subject: [PATCH 130/133] u8 -> u_8 --- modules/sdk-test-ts/src/index.ts | 2 +- modules/sdk-test/src/lib.rs | 2 +- sdks/rust/tests/test-client/src/main.rs | 16 ++++++++-------- .../Private/Tests/SpacetimeFullClientTests.cpp | 8 ++++---- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/modules/sdk-test-ts/src/index.ts b/modules/sdk-test-ts/src/index.ts index d2432ddaee1..257086782f0 100644 --- a/modules/sdk-test-ts/src/index.ts +++ b/modules/sdk-test-ts/src/index.ts @@ -1137,7 +1137,7 @@ export const insert_primitives_as_strings = spacetimedb.reducer( export const no_op_succeeds = spacetimedb.reducer(_ctx => {}); export const oneu8Filter = spacetimedb.clientVisibilityFilter.sql( - 'SELECT * FROM one_u8' + 'SELECT * FROM one_u_8' ); export const send_scheduled_message = spacetimedb.reducer( diff --git a/modules/sdk-test/src/lib.rs b/modules/sdk-test/src/lib.rs index e01a80f7b51..830eef1c87b 100644 --- a/modules/sdk-test/src/lib.rs +++ b/modules/sdk-test/src/lib.rs @@ -808,7 +808,7 @@ define_tables! { fn no_op_succeeds(_ctx: &ReducerContext) {} #[spacetimedb::client_visibility_filter] -const ONE_U8_VISIBLE: spacetimedb::Filter = spacetimedb::Filter::Sql("SELECT * FROM one_u8"); +const ONE_U8_VISIBLE: spacetimedb::Filter = spacetimedb::Filter::Sql("SELECT * FROM one_u_8"); #[spacetimedb::table(accessor = scheduled_table, scheduled(send_scheduled_message), public)] pub struct ScheduledTable { diff --git a/sdks/rust/tests/test-client/src/main.rs b/sdks/rust/tests/test-client/src/main.rs index 65b1453d382..89dac3b00c7 100644 --- a/sdks/rust/tests/test-client/src/main.rs +++ b/sdks/rust/tests/test-client/src/main.rs @@ -2116,7 +2116,7 @@ fn exec_row_deduplication_join_r_and_s() { move |ctx| { let queries = [ "SELECT * FROM pk_u_32;", - "SELECT unique_u32.* FROM unique_u32 JOIN pk_u32 ON unique_u32.n = pk_u32.n;", + "SELECT unique_u_32.* FROM unique_u_32 JOIN pk_u_32 ON unique_u_32.n = pk_u_32.n;", ]; // These never happen. In the case of `PkU32` we get an update instead. @@ -2185,8 +2185,8 @@ fn exec_row_deduplication_r_join_s_and_r_join_t() { let queries = [ "SELECT * FROM pk_u_32;", "SELECT * FROM pk_u_32_two;", - "SELECT unique_u32.* FROM unique_u32 JOIN pk_u32 ON unique_u32.n = pk_u32.n;", - "SELECT unique_u32.* FROM unique_u32 JOIN pk_u32_two ON unique_u32.n = pk_u32_two.n;", + "SELECT unique_u_32.* FROM unique_u_32 JOIN pk_u_32 ON unique_u_32.n = pk_u_32.n;", + "SELECT unique_u_32.* FROM unique_u_32 JOIN pk_u_32_two ON unique_u_32.n = pk_u_32_two.n;", ]; const KEY: u32 = 42; @@ -2244,8 +2244,8 @@ fn test_lhs_join_update() { subscribe_these_then( ctx, &[ - "SELECT p.* FROM pk_u32 p WHERE n = 1", - "SELECT p.* FROM pk_u32 p JOIN unique_u32 u ON p.n = u.n WHERE u.data > 0 AND u.data < 5", + "SELECT p.* FROM pk_u_32 p WHERE n = 1", + "SELECT p.* FROM pk_u_32 p JOIN unique_u_32 u ON p.n = u.n WHERE u.data > 0 AND u.data < 5", ], |_| {}, ); @@ -2305,8 +2305,8 @@ fn test_lhs_join_update_disjoint_queries() { let conn = Arc::new(connect_then(&update_counter, { move |ctx| { subscribe_these_then(ctx, &[ - "SELECT p.* FROM pk_u32 p WHERE n = 1", - "SELECT p.* FROM pk_u32 p JOIN unique_u32 u ON p.n = u.n WHERE u.data > 0 AND u.data < 5 AND u.n != 1", + "SELECT p.* FROM pk_u_32 p WHERE n = 1", + "SELECT p.* FROM pk_u_32 p JOIN unique_u_32 u ON p.n = u.n WHERE u.data > 0 AND u.data < 5 AND u.n != 1", ], |_| {}); } })); @@ -2743,7 +2743,7 @@ fn exec_overlapping_subscriptions() { // Now, subscribe to two queries which each match that row. subscribe_these_then( &conn, - &["select * from pk_u8 where n < 100", "select * from pk_u8 where n > 0"], + &["select * from pk_u_8 where n < 100", "select * from pk_u_8 where n > 0"], move |ctx| { // It's not exposed to users of the SDK, so we won't assert on it, // but we expect the row to have multiplicity 2. diff --git a/sdks/unreal/tests/TestClient/Source/TestClient/Private/Tests/SpacetimeFullClientTests.cpp b/sdks/unreal/tests/TestClient/Source/TestClient/Private/Tests/SpacetimeFullClientTests.cpp index 2f9859605d5..4d201baeee3 100644 --- a/sdks/unreal/tests/TestClient/Source/TestClient/Private/Tests/SpacetimeFullClientTests.cpp +++ b/sdks/unreal/tests/TestClient/Source/TestClient/Private/Tests/SpacetimeFullClientTests.cpp @@ -162,7 +162,7 @@ bool FSubscribeAndCancelTest::RunTest(const FString &Parameters) FOnSubscriptionApplied AppliedDelegate; BIND_DELEGATE_SAFE(AppliedDelegate, Helper, UTestHelperDelegates, HandleSubscriptionApplied); FOnSubscriptionError ErrorDelegate; BIND_DELEGATE_SAFE(ErrorDelegate, Helper, UTestHelperDelegates, HandleSubscriptionError); - USubscriptionHandle* Handle = Conn->SubscriptionBuilder()->OnApplied(AppliedDelegate)->OnError(ErrorDelegate)->Subscribe({ TEXT("SELECT * FROM one_u8;") }); + USubscriptionHandle* Handle = Conn->SubscriptionBuilder()->OnApplied(AppliedDelegate)->OnError(ErrorDelegate)->Subscribe({ TEXT("SELECT * FROM one_u_8;") }); UTestHelperDelegates* EndHelper = NewObject(); EndHelper->AddToRoot(); @@ -262,7 +262,7 @@ bool FSubscribeAndUnsubscribeTest::RunTest(const FString &Parameters) FOnSubscriptionError ErrorDelegate; BIND_DELEGATE_SAFE(ErrorDelegate, State->Helper, UTestHelperDelegates, HandleSubscriptionError); // The handle is now stored in the state struct. - State->Handle = Conn->SubscriptionBuilder()->OnApplied(AppliedDelegate)->OnError(ErrorDelegate)->Subscribe({ TEXT("SELECT * FROM one_u8;") }); }); + State->Handle = Conn->SubscriptionBuilder()->OnApplied(AppliedDelegate)->OnError(ErrorDelegate)->Subscribe({ TEXT("SELECT * FROM one_u_8;") }); }); ADD_LATENT_AUTOMATION_COMMAND(FWaitForTestCounter(*this, TestName, Counter, FPlatformTime::Seconds())); return true; @@ -1956,8 +1956,8 @@ bool FRowDeduplicationJoinRAndSTest::RunTest(const FString &Parameters) Conn->Db->UniqueU32->OnDelete.AddDynamic(Handler, &URowDeduplicationJoinHandler::OnDeleteUniqueU32); TArray Queries = { - TEXT("SELECT * FROM pk_u32;"), - TEXT("SELECT unique_u32.* FROM unique_u32 JOIN pk_u32 ON unique_u32.n = pk_u32.n;") + TEXT("SELECT * FROM pk_u_32;"), + TEXT("SELECT unique_u_32.* FROM unique_u_32 JOIN pk_u_32 ON unique_u_32.n = pk_u_32.n;") }; SubscribeTheseThen(Conn, Queries, [Handler](FSubscriptionEventContext Ctx) From 3b546606ce27c4f5941cde4ae3302da016a9e586 Mon Sep 17 00:00:00 2001 From: Shubham Mishra Date: Fri, 20 Feb 2026 11:35:23 +0530 Subject: [PATCH 131/133] u8 -> u_8 in csharp module: --- modules/sdk-test-cs/Lib.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/sdk-test-cs/Lib.cs b/modules/sdk-test-cs/Lib.cs index 7fec0c0edef..ade952a1412 100644 --- a/modules/sdk-test-cs/Lib.cs +++ b/modules/sdk-test-cs/Lib.cs @@ -2175,7 +2175,7 @@ public static void insert_table_holds_table(ReducerContext ctx, OneU8 a, VecU8 b public static void no_op_succeeds(ReducerContext ctx) { } [SpacetimeDB.ClientVisibilityFilter] - public static readonly Filter ONE_U8_VISIBLE = new Filter.Sql("SELECT * FROM one_u8"); + public static readonly Filter ONE_U8_VISIBLE = new Filter.Sql("SELECT * FROM one_u_8"); [SpacetimeDB.Table(Accessor = "scheduled_table", Scheduled = nameof(send_scheduled_message), From e616b05888b2d333208f6f7ac62869584e905149 Mon Sep 17 00:00:00 2001 From: clockwork-labs-bot Date: Fri, 20 Feb 2026 01:54:06 -0500 Subject: [PATCH 132/133] Regenerate procedure-client and view-client bindings Re-ran spacetime generate for both modules to pick up codegen changes. Removes stale files (schedule_proc_type, scheduled_proc_procedure, scheduled_proc_table_table, player_location_table) that are no longer generated because those tables are private/scheduled. --- .../src/module_bindings/mod.rs | 35 +--- .../src/module_bindings/my_table_table.rs | 10 +- .../src/module_bindings/pk_uuid_table.rs | 27 +-- .../src/module_bindings/pk_uuid_type.rs | 12 +- .../proc_inserts_into_table.rs | 10 +- .../src/module_bindings/schedule_proc_type.rs | 13 -- .../scheduled_proc_procedure.rs | 46 ----- .../scheduled_proc_table_table.rs | 159 ------------------ .../view-client/src/module_bindings/mod.rs | 19 +-- .../module_bindings/player_location_table.rs | 142 ---------------- 10 files changed, 23 insertions(+), 450 deletions(-) delete mode 100644 sdks/rust/tests/procedure-client/src/module_bindings/schedule_proc_type.rs delete mode 100644 sdks/rust/tests/procedure-client/src/module_bindings/scheduled_proc_procedure.rs delete mode 100644 sdks/rust/tests/procedure-client/src/module_bindings/scheduled_proc_table_table.rs delete mode 100644 sdks/rust/tests/view-client/src/module_bindings/player_location_table.rs diff --git a/sdks/rust/tests/procedure-client/src/module_bindings/mod.rs b/sdks/rust/tests/procedure-client/src/module_bindings/mod.rs index dd914628925..6146ed8eb4f 100644 --- a/sdks/rust/tests/procedure-client/src/module_bindings/mod.rs +++ b/sdks/rust/tests/procedure-client/src/module_bindings/mod.rs @@ -1,7 +1,7 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE // WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. -// This was generated using spacetimedb cli version 2.0.0 (commit 9ff95757316cdd120699ca8fcabecbd13eb24157). +// This was generated using spacetimedb cli version 2.0.0 (commit 3b546606ce27c4f5941cde4ae3302da016a9e586). #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; @@ -23,9 +23,6 @@ pub mod return_primitive_procedure; pub mod return_struct_procedure; pub mod return_struct_type; pub mod schedule_proc_reducer; -pub mod schedule_proc_type; -pub mod scheduled_proc_procedure; -pub mod scheduled_proc_table_table; pub mod scheduled_proc_table_type; pub mod sorted_uuids_insert_procedure; pub mod will_panic_procedure; @@ -47,9 +44,6 @@ pub use return_primitive_procedure::return_primitive; pub use return_struct_procedure::return_struct; pub use return_struct_type::ReturnStruct; pub use schedule_proc_reducer::schedule_proc; -pub use schedule_proc_type::ScheduleProc; -pub use scheduled_proc_procedure::scheduled_proc; -pub use scheduled_proc_table_table::*; pub use scheduled_proc_table_type::ScheduledProcTable; pub use sorted_uuids_insert_procedure::sorted_uuids_insert; pub use will_panic_procedure::will_panic; @@ -92,7 +86,6 @@ pub struct DbUpdate { my_table: __sdk::TableUpdate, pk_uuid: __sdk::TableUpdate, proc_inserts_into: __sdk::TableUpdate, - scheduled_proc_table: __sdk::TableUpdate, } impl TryFrom<__ws::v2::TransactionUpdate> for DbUpdate { @@ -110,9 +103,6 @@ impl TryFrom<__ws::v2::TransactionUpdate> for DbUpdate { "proc_inserts_into" => db_update .proc_inserts_into .append(proc_inserts_into_table::parse_table_update(table_update)?), - "scheduled_proc_table" => db_update - .scheduled_proc_table - .append(scheduled_proc_table_table::parse_table_update(table_update)?), unknown => { return Err(__sdk::InternalError::unknown_name("table", unknown, "DatabaseUpdate").into()); @@ -132,14 +122,9 @@ impl __sdk::DbUpdate for DbUpdate { let mut diff = AppliedDiff::default(); diff.my_table = cache.apply_diff_to_table::("my_table", &self.my_table); - diff.pk_uuid = cache - .apply_diff_to_table::("pk_uuid", &self.pk_uuid) - .with_updates_by_pk(|row| &row.u); + diff.pk_uuid = cache.apply_diff_to_table::("pk_uuid", &self.pk_uuid); diff.proc_inserts_into = cache.apply_diff_to_table::("proc_inserts_into", &self.proc_inserts_into); - diff.scheduled_proc_table = cache - .apply_diff_to_table::("scheduled_proc_table", &self.scheduled_proc_table) - .with_updates_by_pk(|row| &row.scheduled_id); diff } @@ -156,9 +141,6 @@ impl __sdk::DbUpdate for DbUpdate { "proc_inserts_into" => db_update .proc_inserts_into .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "scheduled_proc_table" => db_update - .scheduled_proc_table - .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), unknown => { return Err(__sdk::InternalError::unknown_name("table", unknown, "QueryRows").into()); } @@ -179,9 +161,6 @@ impl __sdk::DbUpdate for DbUpdate { "proc_inserts_into" => db_update .proc_inserts_into .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "scheduled_proc_table" => db_update - .scheduled_proc_table - .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), unknown => { return Err(__sdk::InternalError::unknown_name("table", unknown, "QueryRows").into()); } @@ -198,7 +177,6 @@ pub struct AppliedDiff<'r> { my_table: __sdk::TableAppliedDiff<'r, MyTable>, pk_uuid: __sdk::TableAppliedDiff<'r, PkUuid>, proc_inserts_into: __sdk::TableAppliedDiff<'r, ProcInsertsInto>, - scheduled_proc_table: __sdk::TableAppliedDiff<'r, ScheduledProcTable>, __unused: std::marker::PhantomData<&'r ()>, } @@ -211,11 +189,6 @@ impl<'r> __sdk::AppliedDiff<'r> for AppliedDiff<'r> { callbacks.invoke_table_row_callbacks::("my_table", &self.my_table, event); callbacks.invoke_table_row_callbacks::("pk_uuid", &self.pk_uuid, event); callbacks.invoke_table_row_callbacks::("proc_inserts_into", &self.proc_inserts_into, event); - callbacks.invoke_table_row_callbacks::( - "scheduled_proc_table", - &self.scheduled_proc_table, - event, - ); } } @@ -863,8 +836,6 @@ impl __sdk::SpacetimeModule for RemoteModule { my_table_table::register_table(client_cache); pk_uuid_table::register_table(client_cache); proc_inserts_into_table::register_table(client_cache); - scheduled_proc_table_table::register_table(client_cache); } - const ALL_TABLE_NAMES: &'static [&'static str] = - &["my_table", "pk_uuid", "proc_inserts_into", "scheduled_proc_table"]; + const ALL_TABLE_NAMES: &'static [&'static str] = &["my_table", "pk_uuid", "proc_inserts_into"]; } diff --git a/sdks/rust/tests/procedure-client/src/module_bindings/my_table_table.rs b/sdks/rust/tests/procedure-client/src/module_bindings/my_table_table.rs index 2f58c1c120e..a9215f629c4 100644 --- a/sdks/rust/tests/procedure-client/src/module_bindings/my_table_table.rs +++ b/sdks/rust/tests/procedure-client/src/module_bindings/my_table_table.rs @@ -97,14 +97,14 @@ pub(super) fn parse_table_update(raw_updates: __ws::v2::TableUpdate) -> __sdk::R /// Extension trait for query builder access to the table `MyTable`. /// /// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait myTableQueryTableAccess { +pub trait my_tableQueryTableAccess { #[allow(non_snake_case)] /// Get a query builder for the table `MyTable`. - fn myTable(&self) -> __sdk::__query_builder::Table; + fn my_table(&self) -> __sdk::__query_builder::Table; } -impl myTableQueryTableAccess for __sdk::QueryTableAccessor { - fn myTable(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("myTable") +impl my_tableQueryTableAccess for __sdk::QueryTableAccessor { + fn my_table(&self) -> __sdk::__query_builder::Table { + __sdk::__query_builder::Table::new("my_table") } } diff --git a/sdks/rust/tests/procedure-client/src/module_bindings/pk_uuid_table.rs b/sdks/rust/tests/procedure-client/src/module_bindings/pk_uuid_table.rs index d5fc6f7bca3..f177d36ead8 100644 --- a/sdks/rust/tests/procedure-client/src/module_bindings/pk_uuid_table.rs +++ b/sdks/rust/tests/procedure-client/src/module_bindings/pk_uuid_table.rs @@ -78,23 +78,6 @@ impl<'ctx> __sdk::Table for PkUuidTableHandle<'ctx> { } } -pub struct PkUuidUpdateCallbackId(__sdk::CallbackId); - -impl<'ctx> __sdk::TableWithPrimaryKey for PkUuidTableHandle<'ctx> { - type UpdateCallbackId = PkUuidUpdateCallbackId; - - fn on_update( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static, - ) -> PkUuidUpdateCallbackId { - PkUuidUpdateCallbackId(self.imp.on_update(Box::new(callback))) - } - - fn remove_on_update(&self, callback: PkUuidUpdateCallbackId) { - self.imp.remove_on_update(callback.0) - } -} - #[doc(hidden)] pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { let _table = client_cache.get_or_make_table::("pk_uuid"); @@ -113,14 +96,14 @@ pub(super) fn parse_table_update(raw_updates: __ws::v2::TableUpdate) -> __sdk::R /// Extension trait for query builder access to the table `PkUuid`. /// /// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait pkUuidQueryTableAccess { +pub trait pk_uuidQueryTableAccess { #[allow(non_snake_case)] /// Get a query builder for the table `PkUuid`. - fn pkUuid(&self) -> __sdk::__query_builder::Table; + fn pk_uuid(&self) -> __sdk::__query_builder::Table; } -impl pkUuidQueryTableAccess for __sdk::QueryTableAccessor { - fn pkUuid(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("pkUuid") +impl pk_uuidQueryTableAccess for __sdk::QueryTableAccessor { + fn pk_uuid(&self) -> __sdk::__query_builder::Table { + __sdk::__query_builder::Table::new("pk_uuid") } } diff --git a/sdks/rust/tests/procedure-client/src/module_bindings/pk_uuid_type.rs b/sdks/rust/tests/procedure-client/src/module_bindings/pk_uuid_type.rs index 62acd5125be..dcc8174a6b3 100644 --- a/sdks/rust/tests/procedure-client/src/module_bindings/pk_uuid_type.rs +++ b/sdks/rust/tests/procedure-client/src/module_bindings/pk_uuid_type.rs @@ -8,7 +8,7 @@ use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; #[sats(crate = __lib)] pub struct PkUuid { pub u: __sdk::Uuid, - pub data: i32, + pub data: u8, } impl __sdk::InModule for PkUuid { @@ -20,7 +20,7 @@ impl __sdk::InModule for PkUuid { /// Provides typed access to columns for query building. pub struct PkUuidCols { pub u: __sdk::__query_builder::Col, - pub data: __sdk::__query_builder::Col, + pub data: __sdk::__query_builder::Col, } impl __sdk::__query_builder::HasCols for PkUuid { @@ -36,16 +36,12 @@ impl __sdk::__query_builder::HasCols for PkUuid { /// Indexed column accessor struct for the table `PkUuid`. /// /// Provides typed access to indexed columns for query building. -pub struct PkUuidIxCols { - pub u: __sdk::__query_builder::IxCol, -} +pub struct PkUuidIxCols {} impl __sdk::__query_builder::HasIxCols for PkUuid { type IxCols = PkUuidIxCols; fn ix_cols(table_name: &'static str) -> Self::IxCols { - PkUuidIxCols { - u: __sdk::__query_builder::IxCol::new(table_name, "u"), - } + PkUuidIxCols {} } } diff --git a/sdks/rust/tests/procedure-client/src/module_bindings/proc_inserts_into_table.rs b/sdks/rust/tests/procedure-client/src/module_bindings/proc_inserts_into_table.rs index 5a1c2263b00..6f61280d313 100644 --- a/sdks/rust/tests/procedure-client/src/module_bindings/proc_inserts_into_table.rs +++ b/sdks/rust/tests/procedure-client/src/module_bindings/proc_inserts_into_table.rs @@ -98,14 +98,14 @@ pub(super) fn parse_table_update( /// Extension trait for query builder access to the table `ProcInsertsInto`. /// /// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait procInsertsIntoQueryTableAccess { +pub trait proc_inserts_intoQueryTableAccess { #[allow(non_snake_case)] /// Get a query builder for the table `ProcInsertsInto`. - fn procInsertsInto(&self) -> __sdk::__query_builder::Table; + fn proc_inserts_into(&self) -> __sdk::__query_builder::Table; } -impl procInsertsIntoQueryTableAccess for __sdk::QueryTableAccessor { - fn procInsertsInto(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("procInsertsInto") +impl proc_inserts_intoQueryTableAccess for __sdk::QueryTableAccessor { + fn proc_inserts_into(&self) -> __sdk::__query_builder::Table { + __sdk::__query_builder::Table::new("proc_inserts_into") } } diff --git a/sdks/rust/tests/procedure-client/src/module_bindings/schedule_proc_type.rs b/sdks/rust/tests/procedure-client/src/module_bindings/schedule_proc_type.rs deleted file mode 100644 index 46ca35e45a4..00000000000 --- a/sdks/rust/tests/procedure-client/src/module_bindings/schedule_proc_type.rs +++ /dev/null @@ -1,13 +0,0 @@ -// 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, __lib, __sats, __ws}; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct ScheduleProc {} - -impl __sdk::InModule for ScheduleProc { - type Module = super::RemoteModule; -} diff --git a/sdks/rust/tests/procedure-client/src/module_bindings/scheduled_proc_procedure.rs b/sdks/rust/tests/procedure-client/src/module_bindings/scheduled_proc_procedure.rs deleted file mode 100644 index 124f51162f0..00000000000 --- a/sdks/rust/tests/procedure-client/src/module_bindings/scheduled_proc_procedure.rs +++ /dev/null @@ -1,46 +0,0 @@ -// 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, __lib, __sats, __ws}; - -use super::scheduled_proc_table_type::ScheduledProcTable; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -struct ScheduledProcArgs { - pub data: ScheduledProcTable, -} - -impl __sdk::InModule for ScheduledProcArgs { - type Module = super::RemoteModule; -} - -#[allow(non_camel_case_types)] -/// Extension trait for access to the procedure `scheduled_proc`. -/// -/// Implemented for [`super::RemoteProcedures`]. -pub trait scheduled_proc { - fn scheduled_proc(&self, data: ScheduledProcTable) { - self.scheduled_proc_then(data, |_, _| {}); - } - - fn scheduled_proc_then( - &self, - data: ScheduledProcTable, - - __callback: impl FnOnce(&super::ProcedureEventContext, Result<(), __sdk::InternalError>) + Send + 'static, - ); -} - -impl scheduled_proc for super::RemoteProcedures { - fn scheduled_proc_then( - &self, - data: ScheduledProcTable, - - __callback: impl FnOnce(&super::ProcedureEventContext, Result<(), __sdk::InternalError>) + Send + 'static, - ) { - self.imp - .invoke_procedure_with_callback::<_, ()>("scheduled_proc", ScheduledProcArgs { data }, __callback); - } -} diff --git a/sdks/rust/tests/procedure-client/src/module_bindings/scheduled_proc_table_table.rs b/sdks/rust/tests/procedure-client/src/module_bindings/scheduled_proc_table_table.rs deleted file mode 100644 index 6d47284f178..00000000000 --- a/sdks/rust/tests/procedure-client/src/module_bindings/scheduled_proc_table_table.rs +++ /dev/null @@ -1,159 +0,0 @@ -// 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 super::scheduled_proc_table_type::ScheduledProcTable; -use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; - -/// Table handle for the table `scheduled_proc_table`. -/// -/// Obtain a handle from the [`ScheduledProcTableTableAccess::scheduled_proc_table`] method on [`super::RemoteTables`], -/// like `ctx.db.scheduled_proc_table()`. -/// -/// Users are encouraged not to explicitly reference this type, -/// but to directly chain method calls, -/// like `ctx.db.scheduled_proc_table().on_insert(...)`. -pub struct ScheduledProcTableTableHandle<'ctx> { - imp: __sdk::TableHandle, - ctx: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -#[allow(non_camel_case_types)] -/// Extension trait for access to the table `scheduled_proc_table`. -/// -/// Implemented for [`super::RemoteTables`]. -pub trait ScheduledProcTableTableAccess { - #[allow(non_snake_case)] - /// Obtain a [`ScheduledProcTableTableHandle`], which mediates access to the table `scheduled_proc_table`. - fn scheduled_proc_table(&self) -> ScheduledProcTableTableHandle<'_>; -} - -impl ScheduledProcTableTableAccess for super::RemoteTables { - fn scheduled_proc_table(&self) -> ScheduledProcTableTableHandle<'_> { - ScheduledProcTableTableHandle { - imp: self.imp.get_table::("scheduled_proc_table"), - ctx: std::marker::PhantomData, - } - } -} - -pub struct ScheduledProcTableInsertCallbackId(__sdk::CallbackId); -pub struct ScheduledProcTableDeleteCallbackId(__sdk::CallbackId); - -impl<'ctx> __sdk::Table for ScheduledProcTableTableHandle<'ctx> { - type Row = ScheduledProcTable; - type EventContext = super::EventContext; - - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } - - type InsertCallbackId = ScheduledProcTableInsertCallbackId; - - fn on_insert( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> ScheduledProcTableInsertCallbackId { - ScheduledProcTableInsertCallbackId(self.imp.on_insert(Box::new(callback))) - } - - fn remove_on_insert(&self, callback: ScheduledProcTableInsertCallbackId) { - self.imp.remove_on_insert(callback.0) - } - - type DeleteCallbackId = ScheduledProcTableDeleteCallbackId; - - fn on_delete( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> ScheduledProcTableDeleteCallbackId { - ScheduledProcTableDeleteCallbackId(self.imp.on_delete(Box::new(callback))) - } - - fn remove_on_delete(&self, callback: ScheduledProcTableDeleteCallbackId) { - self.imp.remove_on_delete(callback.0) - } -} - -pub struct ScheduledProcTableUpdateCallbackId(__sdk::CallbackId); - -impl<'ctx> __sdk::TableWithPrimaryKey for ScheduledProcTableTableHandle<'ctx> { - type UpdateCallbackId = ScheduledProcTableUpdateCallbackId; - - fn on_update( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static, - ) -> ScheduledProcTableUpdateCallbackId { - ScheduledProcTableUpdateCallbackId(self.imp.on_update(Box::new(callback))) - } - - fn remove_on_update(&self, callback: ScheduledProcTableUpdateCallbackId) { - self.imp.remove_on_update(callback.0) - } -} - -/// Access to the `scheduled_id` unique index on the table `scheduled_proc_table`, -/// which allows point queries on the field of the same name -/// via the [`ScheduledProcTableScheduledIdUnique::find`] method. -/// -/// Users are encouraged not to explicitly reference this type, -/// but to directly chain method calls, -/// like `ctx.db.scheduled_proc_table().scheduled_id().find(...)`. -pub struct ScheduledProcTableScheduledIdUnique<'ctx> { - imp: __sdk::UniqueConstraintHandle, - phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -impl<'ctx> ScheduledProcTableTableHandle<'ctx> { - /// Get a handle on the `scheduled_id` unique index on the table `scheduled_proc_table`. - pub fn scheduled_id(&self) -> ScheduledProcTableScheduledIdUnique<'ctx> { - ScheduledProcTableScheduledIdUnique { - imp: self.imp.get_unique_constraint::("scheduled_id"), - phantom: std::marker::PhantomData, - } - } -} - -impl<'ctx> ScheduledProcTableScheduledIdUnique<'ctx> { - /// Find the subscribed row whose `scheduled_id` column value is equal to `col_val`, - /// if such a row is present in the client cache. - pub fn find(&self, col_val: &u64) -> Option { - self.imp.find(col_val) - } -} - -#[doc(hidden)] -pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { - let _table = client_cache.get_or_make_table::("scheduled_proc_table"); - _table.add_unique_constraint::("scheduled_id", |row| &row.scheduled_id); -} - -#[doc(hidden)] -pub(super) fn parse_table_update( - raw_updates: __ws::v2::TableUpdate, -) -> __sdk::Result<__sdk::TableUpdate> { - __sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| { - __sdk::InternalError::failed_parse("TableUpdate", "TableUpdate") - .with_cause(e) - .into() - }) -} - -#[allow(non_camel_case_types)] -/// Extension trait for query builder access to the table `ScheduledProcTable`. -/// -/// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait scheduledProcTableQueryTableAccess { - #[allow(non_snake_case)] - /// Get a query builder for the table `ScheduledProcTable`. - fn scheduledProcTable(&self) -> __sdk::__query_builder::Table; -} - -impl scheduledProcTableQueryTableAccess for __sdk::QueryTableAccessor { - fn scheduledProcTable(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("scheduledProcTable") - } -} diff --git a/sdks/rust/tests/view-client/src/module_bindings/mod.rs b/sdks/rust/tests/view-client/src/module_bindings/mod.rs index 522428b9c06..add4c397b48 100644 --- a/sdks/rust/tests/view-client/src/module_bindings/mod.rs +++ b/sdks/rust/tests/view-client/src/module_bindings/mod.rs @@ -1,7 +1,7 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE // WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. -// This was generated using spacetimedb cli version 2.0.0 (commit 9ff95757316cdd120699ca8fcabecbd13eb24157). +// This was generated using spacetimedb cli version 2.0.0 (commit 3b546606ce27c4f5941cde4ae3302da016a9e586). #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; @@ -15,7 +15,6 @@ pub mod nearby_players_table; pub mod player_and_level_type; pub mod player_level_table; pub mod player_level_type; -pub mod player_location_table; pub mod player_location_type; pub mod player_table; pub mod player_type; @@ -30,7 +29,6 @@ pub use nearby_players_table::*; pub use player_and_level_type::PlayerAndLevel; pub use player_level_table::*; pub use player_level_type::PlayerLevel; -pub use player_location_table::*; pub use player_location_type::PlayerLocation; pub use player_table::*; pub use player_type::Player; @@ -92,7 +90,6 @@ pub struct DbUpdate { nearby_players: __sdk::TableUpdate, player: __sdk::TableUpdate, player_level: __sdk::TableUpdate, - player_location: __sdk::TableUpdate, players_at_level_0: __sdk::TableUpdate, } @@ -115,9 +112,6 @@ impl TryFrom<__ws::v2::TransactionUpdate> for DbUpdate { "player_level" => db_update .player_level .append(player_level_table::parse_table_update(table_update)?), - "player_location" => db_update - .player_location - .append(player_location_table::parse_table_update(table_update)?), "players_at_level_0" => db_update .players_at_level_0 .append(players_at_level_0_table::parse_table_update(table_update)?), @@ -143,7 +137,6 @@ impl __sdk::DbUpdate for DbUpdate { .apply_diff_to_table::("player", &self.player) .with_updates_by_pk(|row| &row.entity_id); diff.player_level = cache.apply_diff_to_table::("player_level", &self.player_level); - diff.player_location = cache.apply_diff_to_table::("player_location", &self.player_location); diff.my_player = cache.apply_diff_to_table::("my_player", &self.my_player); diff.my_player_and_level = cache.apply_diff_to_table::("my_player_and_level", &self.my_player_and_level); @@ -171,9 +164,6 @@ impl __sdk::DbUpdate for DbUpdate { "player_level" => db_update .player_level .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "player_location" => db_update - .player_location - .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), "players_at_level_0" => db_update .players_at_level_0 .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), @@ -203,9 +193,6 @@ impl __sdk::DbUpdate for DbUpdate { "player_level" => db_update .player_level .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "player_location" => db_update - .player_location - .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), "players_at_level_0" => db_update .players_at_level_0 .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), @@ -227,7 +214,6 @@ pub struct AppliedDiff<'r> { nearby_players: __sdk::TableAppliedDiff<'r, PlayerLocation>, player: __sdk::TableAppliedDiff<'r, Player>, player_level: __sdk::TableAppliedDiff<'r, PlayerLevel>, - player_location: __sdk::TableAppliedDiff<'r, PlayerLocation>, players_at_level_0: __sdk::TableAppliedDiff<'r, Player>, __unused: std::marker::PhantomData<&'r ()>, } @@ -243,7 +229,6 @@ impl<'r> __sdk::AppliedDiff<'r> for AppliedDiff<'r> { callbacks.invoke_table_row_callbacks::("nearby_players", &self.nearby_players, event); callbacks.invoke_table_row_callbacks::("player", &self.player, event); callbacks.invoke_table_row_callbacks::("player_level", &self.player_level, event); - callbacks.invoke_table_row_callbacks::("player_location", &self.player_location, event); callbacks.invoke_table_row_callbacks::("players_at_level_0", &self.players_at_level_0, event); } } @@ -894,7 +879,6 @@ impl __sdk::SpacetimeModule for RemoteModule { nearby_players_table::register_table(client_cache); player_table::register_table(client_cache); player_level_table::register_table(client_cache); - player_location_table::register_table(client_cache); players_at_level_0_table::register_table(client_cache); } const ALL_TABLE_NAMES: &'static [&'static str] = &[ @@ -903,7 +887,6 @@ impl __sdk::SpacetimeModule for RemoteModule { "nearby_players", "player", "player_level", - "player_location", "players_at_level_0", ]; } diff --git a/sdks/rust/tests/view-client/src/module_bindings/player_location_table.rs b/sdks/rust/tests/view-client/src/module_bindings/player_location_table.rs deleted file mode 100644 index 6114b8bc3b5..00000000000 --- a/sdks/rust/tests/view-client/src/module_bindings/player_location_table.rs +++ /dev/null @@ -1,142 +0,0 @@ -// 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 super::player_location_type::PlayerLocation; -use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; - -/// Table handle for the table `player_location`. -/// -/// Obtain a handle from the [`PlayerLocationTableAccess::player_location`] method on [`super::RemoteTables`], -/// like `ctx.db.player_location()`. -/// -/// Users are encouraged not to explicitly reference this type, -/// but to directly chain method calls, -/// like `ctx.db.player_location().on_insert(...)`. -pub struct PlayerLocationTableHandle<'ctx> { - imp: __sdk::TableHandle, - ctx: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -#[allow(non_camel_case_types)] -/// Extension trait for access to the table `player_location`. -/// -/// Implemented for [`super::RemoteTables`]. -pub trait PlayerLocationTableAccess { - #[allow(non_snake_case)] - /// Obtain a [`PlayerLocationTableHandle`], which mediates access to the table `player_location`. - fn player_location(&self) -> PlayerLocationTableHandle<'_>; -} - -impl PlayerLocationTableAccess for super::RemoteTables { - fn player_location(&self) -> PlayerLocationTableHandle<'_> { - PlayerLocationTableHandle { - imp: self.imp.get_table::("player_location"), - ctx: std::marker::PhantomData, - } - } -} - -pub struct PlayerLocationInsertCallbackId(__sdk::CallbackId); -pub struct PlayerLocationDeleteCallbackId(__sdk::CallbackId); - -impl<'ctx> __sdk::Table for PlayerLocationTableHandle<'ctx> { - type Row = PlayerLocation; - type EventContext = super::EventContext; - - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } - - type InsertCallbackId = PlayerLocationInsertCallbackId; - - fn on_insert( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> PlayerLocationInsertCallbackId { - PlayerLocationInsertCallbackId(self.imp.on_insert(Box::new(callback))) - } - - fn remove_on_insert(&self, callback: PlayerLocationInsertCallbackId) { - self.imp.remove_on_insert(callback.0) - } - - type DeleteCallbackId = PlayerLocationDeleteCallbackId; - - fn on_delete( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> PlayerLocationDeleteCallbackId { - PlayerLocationDeleteCallbackId(self.imp.on_delete(Box::new(callback))) - } - - fn remove_on_delete(&self, callback: PlayerLocationDeleteCallbackId) { - self.imp.remove_on_delete(callback.0) - } -} - -/// Access to the `entity_id` unique index on the table `player_location`, -/// which allows point queries on the field of the same name -/// via the [`PlayerLocationEntityIdUnique::find`] method. -/// -/// Users are encouraged not to explicitly reference this type, -/// but to directly chain method calls, -/// like `ctx.db.player_location().entity_id().find(...)`. -pub struct PlayerLocationEntityIdUnique<'ctx> { - imp: __sdk::UniqueConstraintHandle, - phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -impl<'ctx> PlayerLocationTableHandle<'ctx> { - /// Get a handle on the `entity_id` unique index on the table `player_location`. - pub fn entity_id(&self) -> PlayerLocationEntityIdUnique<'ctx> { - PlayerLocationEntityIdUnique { - imp: self.imp.get_unique_constraint::("entity_id"), - phantom: std::marker::PhantomData, - } - } -} - -impl<'ctx> PlayerLocationEntityIdUnique<'ctx> { - /// Find the subscribed row whose `entity_id` column value is equal to `col_val`, - /// if such a row is present in the client cache. - pub fn find(&self, col_val: &u64) -> Option { - self.imp.find(col_val) - } -} - -#[doc(hidden)] -pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { - let _table = client_cache.get_or_make_table::("player_location"); - _table.add_unique_constraint::("entity_id", |row| &row.entity_id); -} - -#[doc(hidden)] -pub(super) fn parse_table_update( - raw_updates: __ws::v2::TableUpdate, -) -> __sdk::Result<__sdk::TableUpdate> { - __sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| { - __sdk::InternalError::failed_parse("TableUpdate", "TableUpdate") - .with_cause(e) - .into() - }) -} - -#[allow(non_camel_case_types)] -/// Extension trait for query builder access to the table `PlayerLocation`. -/// -/// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait player_locationQueryTableAccess { - #[allow(non_snake_case)] - /// Get a query builder for the table `PlayerLocation`. - fn player_location(&self) -> __sdk::__query_builder::Table; -} - -impl player_locationQueryTableAccess for __sdk::QueryTableAccessor { - fn player_location(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("player_location") - } -} From a35b08d82075760f38bc283569ca4e01c4dccf7b Mon Sep 17 00:00:00 2001 From: Shubham Mishra Date: Fri, 20 Feb 2026 13:03:22 +0530 Subject: [PATCH 133/133] procedure bindings --- .../src/module_bindings/mod.rs | 29 +++- .../scheduled_proc_procedure.rs | 46 +++++ .../scheduled_proc_table_table.rs | 159 ++++++++++++++++++ .../view-client/src/module_bindings/mod.rs | 19 ++- .../module_bindings/player_location_table.rs | 142 ++++++++++++++++ 5 files changed, 392 insertions(+), 3 deletions(-) create mode 100644 sdks/rust/tests/procedure-client/src/module_bindings/scheduled_proc_procedure.rs create mode 100644 sdks/rust/tests/procedure-client/src/module_bindings/scheduled_proc_table_table.rs create mode 100644 sdks/rust/tests/view-client/src/module_bindings/player_location_table.rs diff --git a/sdks/rust/tests/procedure-client/src/module_bindings/mod.rs b/sdks/rust/tests/procedure-client/src/module_bindings/mod.rs index 6146ed8eb4f..5a108fec382 100644 --- a/sdks/rust/tests/procedure-client/src/module_bindings/mod.rs +++ b/sdks/rust/tests/procedure-client/src/module_bindings/mod.rs @@ -1,7 +1,7 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE // WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. -// This was generated using spacetimedb cli version 2.0.0 (commit 3b546606ce27c4f5941cde4ae3302da016a9e586). +// This was generated using spacetimedb cli version 2.0.0 (commit e528393902d8cc982769e3b1a0f250d7d53edfa1). #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; @@ -23,6 +23,8 @@ pub mod return_primitive_procedure; pub mod return_struct_procedure; pub mod return_struct_type; pub mod schedule_proc_reducer; +pub mod scheduled_proc_procedure; +pub mod scheduled_proc_table_table; pub mod scheduled_proc_table_type; pub mod sorted_uuids_insert_procedure; pub mod will_panic_procedure; @@ -44,6 +46,8 @@ pub use return_primitive_procedure::return_primitive; pub use return_struct_procedure::return_struct; pub use return_struct_type::ReturnStruct; pub use schedule_proc_reducer::schedule_proc; +pub use scheduled_proc_procedure::scheduled_proc; +pub use scheduled_proc_table_table::*; pub use scheduled_proc_table_type::ScheduledProcTable; pub use sorted_uuids_insert_procedure::sorted_uuids_insert; pub use will_panic_procedure::will_panic; @@ -86,6 +90,7 @@ pub struct DbUpdate { my_table: __sdk::TableUpdate, pk_uuid: __sdk::TableUpdate, proc_inserts_into: __sdk::TableUpdate, + scheduled_proc_table: __sdk::TableUpdate, } impl TryFrom<__ws::v2::TransactionUpdate> for DbUpdate { @@ -103,6 +108,9 @@ impl TryFrom<__ws::v2::TransactionUpdate> for DbUpdate { "proc_inserts_into" => db_update .proc_inserts_into .append(proc_inserts_into_table::parse_table_update(table_update)?), + "scheduled_proc_table" => db_update + .scheduled_proc_table + .append(scheduled_proc_table_table::parse_table_update(table_update)?), unknown => { return Err(__sdk::InternalError::unknown_name("table", unknown, "DatabaseUpdate").into()); @@ -125,6 +133,9 @@ impl __sdk::DbUpdate for DbUpdate { diff.pk_uuid = cache.apply_diff_to_table::("pk_uuid", &self.pk_uuid); diff.proc_inserts_into = cache.apply_diff_to_table::("proc_inserts_into", &self.proc_inserts_into); + diff.scheduled_proc_table = cache + .apply_diff_to_table::("scheduled_proc_table", &self.scheduled_proc_table) + .with_updates_by_pk(|row| &row.scheduled_id); diff } @@ -141,6 +152,9 @@ impl __sdk::DbUpdate for DbUpdate { "proc_inserts_into" => db_update .proc_inserts_into .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), + "scheduled_proc_table" => db_update + .scheduled_proc_table + .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), unknown => { return Err(__sdk::InternalError::unknown_name("table", unknown, "QueryRows").into()); } @@ -161,6 +175,9 @@ impl __sdk::DbUpdate for DbUpdate { "proc_inserts_into" => db_update .proc_inserts_into .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), + "scheduled_proc_table" => db_update + .scheduled_proc_table + .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), unknown => { return Err(__sdk::InternalError::unknown_name("table", unknown, "QueryRows").into()); } @@ -177,6 +194,7 @@ pub struct AppliedDiff<'r> { my_table: __sdk::TableAppliedDiff<'r, MyTable>, pk_uuid: __sdk::TableAppliedDiff<'r, PkUuid>, proc_inserts_into: __sdk::TableAppliedDiff<'r, ProcInsertsInto>, + scheduled_proc_table: __sdk::TableAppliedDiff<'r, ScheduledProcTable>, __unused: std::marker::PhantomData<&'r ()>, } @@ -189,6 +207,11 @@ impl<'r> __sdk::AppliedDiff<'r> for AppliedDiff<'r> { callbacks.invoke_table_row_callbacks::("my_table", &self.my_table, event); callbacks.invoke_table_row_callbacks::("pk_uuid", &self.pk_uuid, event); callbacks.invoke_table_row_callbacks::("proc_inserts_into", &self.proc_inserts_into, event); + callbacks.invoke_table_row_callbacks::( + "scheduled_proc_table", + &self.scheduled_proc_table, + event, + ); } } @@ -836,6 +859,8 @@ impl __sdk::SpacetimeModule for RemoteModule { my_table_table::register_table(client_cache); pk_uuid_table::register_table(client_cache); proc_inserts_into_table::register_table(client_cache); + scheduled_proc_table_table::register_table(client_cache); } - const ALL_TABLE_NAMES: &'static [&'static str] = &["my_table", "pk_uuid", "proc_inserts_into"]; + const ALL_TABLE_NAMES: &'static [&'static str] = + &["my_table", "pk_uuid", "proc_inserts_into", "scheduled_proc_table"]; } diff --git a/sdks/rust/tests/procedure-client/src/module_bindings/scheduled_proc_procedure.rs b/sdks/rust/tests/procedure-client/src/module_bindings/scheduled_proc_procedure.rs new file mode 100644 index 00000000000..124f51162f0 --- /dev/null +++ b/sdks/rust/tests/procedure-client/src/module_bindings/scheduled_proc_procedure.rs @@ -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. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +use super::scheduled_proc_table_type::ScheduledProcTable; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +struct ScheduledProcArgs { + pub data: ScheduledProcTable, +} + +impl __sdk::InModule for ScheduledProcArgs { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the procedure `scheduled_proc`. +/// +/// Implemented for [`super::RemoteProcedures`]. +pub trait scheduled_proc { + fn scheduled_proc(&self, data: ScheduledProcTable) { + self.scheduled_proc_then(data, |_, _| {}); + } + + fn scheduled_proc_then( + &self, + data: ScheduledProcTable, + + __callback: impl FnOnce(&super::ProcedureEventContext, Result<(), __sdk::InternalError>) + Send + 'static, + ); +} + +impl scheduled_proc for super::RemoteProcedures { + fn scheduled_proc_then( + &self, + data: ScheduledProcTable, + + __callback: impl FnOnce(&super::ProcedureEventContext, Result<(), __sdk::InternalError>) + Send + 'static, + ) { + self.imp + .invoke_procedure_with_callback::<_, ()>("scheduled_proc", ScheduledProcArgs { data }, __callback); + } +} diff --git a/sdks/rust/tests/procedure-client/src/module_bindings/scheduled_proc_table_table.rs b/sdks/rust/tests/procedure-client/src/module_bindings/scheduled_proc_table_table.rs new file mode 100644 index 00000000000..03f3ea0fda9 --- /dev/null +++ b/sdks/rust/tests/procedure-client/src/module_bindings/scheduled_proc_table_table.rs @@ -0,0 +1,159 @@ +// 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 super::scheduled_proc_table_type::ScheduledProcTable; +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +/// Table handle for the table `scheduled_proc_table`. +/// +/// Obtain a handle from the [`ScheduledProcTableTableAccess::scheduled_proc_table`] method on [`super::RemoteTables`], +/// like `ctx.db.scheduled_proc_table()`. +/// +/// Users are encouraged not to explicitly reference this type, +/// but to directly chain method calls, +/// like `ctx.db.scheduled_proc_table().on_insert(...)`. +pub struct ScheduledProcTableTableHandle<'ctx> { + imp: __sdk::TableHandle, + ctx: std::marker::PhantomData<&'ctx super::RemoteTables>, +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the table `scheduled_proc_table`. +/// +/// Implemented for [`super::RemoteTables`]. +pub trait ScheduledProcTableTableAccess { + #[allow(non_snake_case)] + /// Obtain a [`ScheduledProcTableTableHandle`], which mediates access to the table `scheduled_proc_table`. + fn scheduled_proc_table(&self) -> ScheduledProcTableTableHandle<'_>; +} + +impl ScheduledProcTableTableAccess for super::RemoteTables { + fn scheduled_proc_table(&self) -> ScheduledProcTableTableHandle<'_> { + ScheduledProcTableTableHandle { + imp: self.imp.get_table::("scheduled_proc_table"), + ctx: std::marker::PhantomData, + } + } +} + +pub struct ScheduledProcTableInsertCallbackId(__sdk::CallbackId); +pub struct ScheduledProcTableDeleteCallbackId(__sdk::CallbackId); + +impl<'ctx> __sdk::Table for ScheduledProcTableTableHandle<'ctx> { + type Row = ScheduledProcTable; + type EventContext = super::EventContext; + + fn count(&self) -> u64 { + self.imp.count() + } + fn iter(&self) -> impl Iterator + '_ { + self.imp.iter() + } + + type InsertCallbackId = ScheduledProcTableInsertCallbackId; + + fn on_insert( + &self, + callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, + ) -> ScheduledProcTableInsertCallbackId { + ScheduledProcTableInsertCallbackId(self.imp.on_insert(Box::new(callback))) + } + + fn remove_on_insert(&self, callback: ScheduledProcTableInsertCallbackId) { + self.imp.remove_on_insert(callback.0) + } + + type DeleteCallbackId = ScheduledProcTableDeleteCallbackId; + + fn on_delete( + &self, + callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, + ) -> ScheduledProcTableDeleteCallbackId { + ScheduledProcTableDeleteCallbackId(self.imp.on_delete(Box::new(callback))) + } + + fn remove_on_delete(&self, callback: ScheduledProcTableDeleteCallbackId) { + self.imp.remove_on_delete(callback.0) + } +} + +pub struct ScheduledProcTableUpdateCallbackId(__sdk::CallbackId); + +impl<'ctx> __sdk::TableWithPrimaryKey for ScheduledProcTableTableHandle<'ctx> { + type UpdateCallbackId = ScheduledProcTableUpdateCallbackId; + + fn on_update( + &self, + callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static, + ) -> ScheduledProcTableUpdateCallbackId { + ScheduledProcTableUpdateCallbackId(self.imp.on_update(Box::new(callback))) + } + + fn remove_on_update(&self, callback: ScheduledProcTableUpdateCallbackId) { + self.imp.remove_on_update(callback.0) + } +} + +/// Access to the `scheduled_id` unique index on the table `scheduled_proc_table`, +/// which allows point queries on the field of the same name +/// via the [`ScheduledProcTableScheduledIdUnique::find`] method. +/// +/// Users are encouraged not to explicitly reference this type, +/// but to directly chain method calls, +/// like `ctx.db.scheduled_proc_table().scheduled_id().find(...)`. +pub struct ScheduledProcTableScheduledIdUnique<'ctx> { + imp: __sdk::UniqueConstraintHandle, + phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, +} + +impl<'ctx> ScheduledProcTableTableHandle<'ctx> { + /// Get a handle on the `scheduled_id` unique index on the table `scheduled_proc_table`. + pub fn scheduled_id(&self) -> ScheduledProcTableScheduledIdUnique<'ctx> { + ScheduledProcTableScheduledIdUnique { + imp: self.imp.get_unique_constraint::("scheduled_id"), + phantom: std::marker::PhantomData, + } + } +} + +impl<'ctx> ScheduledProcTableScheduledIdUnique<'ctx> { + /// Find the subscribed row whose `scheduled_id` column value is equal to `col_val`, + /// if such a row is present in the client cache. + pub fn find(&self, col_val: &u64) -> Option { + self.imp.find(col_val) + } +} + +#[doc(hidden)] +pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { + let _table = client_cache.get_or_make_table::("scheduled_proc_table"); + _table.add_unique_constraint::("scheduled_id", |row| &row.scheduled_id); +} + +#[doc(hidden)] +pub(super) fn parse_table_update( + raw_updates: __ws::v2::TableUpdate, +) -> __sdk::Result<__sdk::TableUpdate> { + __sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| { + __sdk::InternalError::failed_parse("TableUpdate", "TableUpdate") + .with_cause(e) + .into() + }) +} + +#[allow(non_camel_case_types)] +/// Extension trait for query builder access to the table `ScheduledProcTable`. +/// +/// Implemented for [`__sdk::QueryTableAccessor`]. +pub trait scheduled_proc_tableQueryTableAccess { + #[allow(non_snake_case)] + /// Get a query builder for the table `ScheduledProcTable`. + fn scheduled_proc_table(&self) -> __sdk::__query_builder::Table; +} + +impl scheduled_proc_tableQueryTableAccess for __sdk::QueryTableAccessor { + fn scheduled_proc_table(&self) -> __sdk::__query_builder::Table { + __sdk::__query_builder::Table::new("scheduled_proc_table") + } +} diff --git a/sdks/rust/tests/view-client/src/module_bindings/mod.rs b/sdks/rust/tests/view-client/src/module_bindings/mod.rs index add4c397b48..48c5151eee9 100644 --- a/sdks/rust/tests/view-client/src/module_bindings/mod.rs +++ b/sdks/rust/tests/view-client/src/module_bindings/mod.rs @@ -1,7 +1,7 @@ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE // WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. -// This was generated using spacetimedb cli version 2.0.0 (commit 3b546606ce27c4f5941cde4ae3302da016a9e586). +// This was generated using spacetimedb cli version 2.0.0 (commit e528393902d8cc982769e3b1a0f250d7d53edfa1). #![allow(unused, clippy::all)] use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; @@ -15,6 +15,7 @@ pub mod nearby_players_table; pub mod player_and_level_type; pub mod player_level_table; pub mod player_level_type; +pub mod player_location_table; pub mod player_location_type; pub mod player_table; pub mod player_type; @@ -29,6 +30,7 @@ pub use nearby_players_table::*; pub use player_and_level_type::PlayerAndLevel; pub use player_level_table::*; pub use player_level_type::PlayerLevel; +pub use player_location_table::*; pub use player_location_type::PlayerLocation; pub use player_table::*; pub use player_type::Player; @@ -90,6 +92,7 @@ pub struct DbUpdate { nearby_players: __sdk::TableUpdate, player: __sdk::TableUpdate, player_level: __sdk::TableUpdate, + player_location: __sdk::TableUpdate, players_at_level_0: __sdk::TableUpdate, } @@ -112,6 +115,9 @@ impl TryFrom<__ws::v2::TransactionUpdate> for DbUpdate { "player_level" => db_update .player_level .append(player_level_table::parse_table_update(table_update)?), + "player_location" => db_update + .player_location + .append(player_location_table::parse_table_update(table_update)?), "players_at_level_0" => db_update .players_at_level_0 .append(players_at_level_0_table::parse_table_update(table_update)?), @@ -137,6 +143,7 @@ impl __sdk::DbUpdate for DbUpdate { .apply_diff_to_table::("player", &self.player) .with_updates_by_pk(|row| &row.entity_id); diff.player_level = cache.apply_diff_to_table::("player_level", &self.player_level); + diff.player_location = cache.apply_diff_to_table::("player_location", &self.player_location); diff.my_player = cache.apply_diff_to_table::("my_player", &self.my_player); diff.my_player_and_level = cache.apply_diff_to_table::("my_player_and_level", &self.my_player_and_level); @@ -164,6 +171,9 @@ impl __sdk::DbUpdate for DbUpdate { "player_level" => db_update .player_level .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), + "player_location" => db_update + .player_location + .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), "players_at_level_0" => db_update .players_at_level_0 .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), @@ -193,6 +203,9 @@ impl __sdk::DbUpdate for DbUpdate { "player_level" => db_update .player_level .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), + "player_location" => db_update + .player_location + .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), "players_at_level_0" => db_update .players_at_level_0 .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), @@ -214,6 +227,7 @@ pub struct AppliedDiff<'r> { nearby_players: __sdk::TableAppliedDiff<'r, PlayerLocation>, player: __sdk::TableAppliedDiff<'r, Player>, player_level: __sdk::TableAppliedDiff<'r, PlayerLevel>, + player_location: __sdk::TableAppliedDiff<'r, PlayerLocation>, players_at_level_0: __sdk::TableAppliedDiff<'r, Player>, __unused: std::marker::PhantomData<&'r ()>, } @@ -229,6 +243,7 @@ impl<'r> __sdk::AppliedDiff<'r> for AppliedDiff<'r> { callbacks.invoke_table_row_callbacks::("nearby_players", &self.nearby_players, event); callbacks.invoke_table_row_callbacks::("player", &self.player, event); callbacks.invoke_table_row_callbacks::("player_level", &self.player_level, event); + callbacks.invoke_table_row_callbacks::("player_location", &self.player_location, event); callbacks.invoke_table_row_callbacks::("players_at_level_0", &self.players_at_level_0, event); } } @@ -879,6 +894,7 @@ impl __sdk::SpacetimeModule for RemoteModule { nearby_players_table::register_table(client_cache); player_table::register_table(client_cache); player_level_table::register_table(client_cache); + player_location_table::register_table(client_cache); players_at_level_0_table::register_table(client_cache); } const ALL_TABLE_NAMES: &'static [&'static str] = &[ @@ -887,6 +903,7 @@ impl __sdk::SpacetimeModule for RemoteModule { "nearby_players", "player", "player_level", + "player_location", "players_at_level_0", ]; } diff --git a/sdks/rust/tests/view-client/src/module_bindings/player_location_table.rs b/sdks/rust/tests/view-client/src/module_bindings/player_location_table.rs new file mode 100644 index 00000000000..6114b8bc3b5 --- /dev/null +++ b/sdks/rust/tests/view-client/src/module_bindings/player_location_table.rs @@ -0,0 +1,142 @@ +// 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 super::player_location_type::PlayerLocation; +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +/// Table handle for the table `player_location`. +/// +/// Obtain a handle from the [`PlayerLocationTableAccess::player_location`] method on [`super::RemoteTables`], +/// like `ctx.db.player_location()`. +/// +/// Users are encouraged not to explicitly reference this type, +/// but to directly chain method calls, +/// like `ctx.db.player_location().on_insert(...)`. +pub struct PlayerLocationTableHandle<'ctx> { + imp: __sdk::TableHandle, + ctx: std::marker::PhantomData<&'ctx super::RemoteTables>, +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the table `player_location`. +/// +/// Implemented for [`super::RemoteTables`]. +pub trait PlayerLocationTableAccess { + #[allow(non_snake_case)] + /// Obtain a [`PlayerLocationTableHandle`], which mediates access to the table `player_location`. + fn player_location(&self) -> PlayerLocationTableHandle<'_>; +} + +impl PlayerLocationTableAccess for super::RemoteTables { + fn player_location(&self) -> PlayerLocationTableHandle<'_> { + PlayerLocationTableHandle { + imp: self.imp.get_table::("player_location"), + ctx: std::marker::PhantomData, + } + } +} + +pub struct PlayerLocationInsertCallbackId(__sdk::CallbackId); +pub struct PlayerLocationDeleteCallbackId(__sdk::CallbackId); + +impl<'ctx> __sdk::Table for PlayerLocationTableHandle<'ctx> { + type Row = PlayerLocation; + type EventContext = super::EventContext; + + fn count(&self) -> u64 { + self.imp.count() + } + fn iter(&self) -> impl Iterator + '_ { + self.imp.iter() + } + + type InsertCallbackId = PlayerLocationInsertCallbackId; + + fn on_insert( + &self, + callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, + ) -> PlayerLocationInsertCallbackId { + PlayerLocationInsertCallbackId(self.imp.on_insert(Box::new(callback))) + } + + fn remove_on_insert(&self, callback: PlayerLocationInsertCallbackId) { + self.imp.remove_on_insert(callback.0) + } + + type DeleteCallbackId = PlayerLocationDeleteCallbackId; + + fn on_delete( + &self, + callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, + ) -> PlayerLocationDeleteCallbackId { + PlayerLocationDeleteCallbackId(self.imp.on_delete(Box::new(callback))) + } + + fn remove_on_delete(&self, callback: PlayerLocationDeleteCallbackId) { + self.imp.remove_on_delete(callback.0) + } +} + +/// Access to the `entity_id` unique index on the table `player_location`, +/// which allows point queries on the field of the same name +/// via the [`PlayerLocationEntityIdUnique::find`] method. +/// +/// Users are encouraged not to explicitly reference this type, +/// but to directly chain method calls, +/// like `ctx.db.player_location().entity_id().find(...)`. +pub struct PlayerLocationEntityIdUnique<'ctx> { + imp: __sdk::UniqueConstraintHandle, + phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, +} + +impl<'ctx> PlayerLocationTableHandle<'ctx> { + /// Get a handle on the `entity_id` unique index on the table `player_location`. + pub fn entity_id(&self) -> PlayerLocationEntityIdUnique<'ctx> { + PlayerLocationEntityIdUnique { + imp: self.imp.get_unique_constraint::("entity_id"), + phantom: std::marker::PhantomData, + } + } +} + +impl<'ctx> PlayerLocationEntityIdUnique<'ctx> { + /// Find the subscribed row whose `entity_id` column value is equal to `col_val`, + /// if such a row is present in the client cache. + pub fn find(&self, col_val: &u64) -> Option { + self.imp.find(col_val) + } +} + +#[doc(hidden)] +pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { + let _table = client_cache.get_or_make_table::("player_location"); + _table.add_unique_constraint::("entity_id", |row| &row.entity_id); +} + +#[doc(hidden)] +pub(super) fn parse_table_update( + raw_updates: __ws::v2::TableUpdate, +) -> __sdk::Result<__sdk::TableUpdate> { + __sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| { + __sdk::InternalError::failed_parse("TableUpdate", "TableUpdate") + .with_cause(e) + .into() + }) +} + +#[allow(non_camel_case_types)] +/// Extension trait for query builder access to the table `PlayerLocation`. +/// +/// Implemented for [`__sdk::QueryTableAccessor`]. +pub trait player_locationQueryTableAccess { + #[allow(non_snake_case)] + /// Get a query builder for the table `PlayerLocation`. + fn player_location(&self) -> __sdk::__query_builder::Table; +} + +impl player_locationQueryTableAccess for __sdk::QueryTableAccessor { + fn player_location(&self) -> __sdk::__query_builder::Table { + __sdk::__query_builder::Table::new("player_location") + } +}