This commit is contained in:
Tao Tien 2026-02-22 00:39:51 -08:00
parent d7b4221727
commit 2d3993452b
33 changed files with 920 additions and 143 deletions

View file

@ -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.11.3 (commit 02449737ca3b29e7e39679fccbef541a50f32094).
// This was generated using spacetimedb cli version 1.12.0 (commit 4fdb8d923f39ed592931ad4c7e6391ed99b9fe3a).
#![allow(unused, clippy::all)]
use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws};
@ -37,6 +37,7 @@ pub mod suit_type;
pub mod tile_table;
pub mod tile_type;
pub mod turn_state_type;
pub mod view_hand_table;
pub mod wall_table;
pub mod wind_type;
@ -73,6 +74,7 @@ pub use suit_type::Suit;
pub use tile_table::*;
pub use tile_type::Tile;
pub use turn_state_type::TurnState;
pub use view_hand_table::*;
pub use wall_table::*;
pub use wind_type::Wind;
@ -188,6 +190,7 @@ pub struct DbUpdate {
player_clock: __sdk::TableUpdate<PlayerClock>,
player_hand: __sdk::TableUpdate<PlayerHand>,
tile: __sdk::TableUpdate<DbTile>,
view_hand: __sdk::TableUpdate<PlayerHand>,
wall: __sdk::TableUpdate<DbWall>,
}
@ -221,6 +224,9 @@ impl TryFrom<__ws::DatabaseUpdate<__ws::BsatnFormat>> for DbUpdate {
"tile" => db_update
.tile
.append(tile_table::parse_table_update(table_update)?),
"view_hand" => db_update
.view_hand
.append(view_hand_table::parse_table_update(table_update)?),
"wall" => db_update
.wall
.append(wall_table::parse_table_update(table_update)?),
@ -277,6 +283,7 @@ impl __sdk::DbUpdate for DbUpdate {
diff.wall = cache
.apply_diff_to_table::<DbWall>("wall", &self.wall)
.with_updates_by_pk(|row| &row.lobby_id);
diff.view_hand = cache.apply_diff_to_table::<PlayerHand>("view_hand", &self.view_hand);
diff
}
@ -294,6 +301,7 @@ pub struct AppliedDiff<'r> {
player_clock: __sdk::TableAppliedDiff<'r, PlayerClock>,
player_hand: __sdk::TableAppliedDiff<'r, PlayerHand>,
tile: __sdk::TableAppliedDiff<'r, DbTile>,
view_hand: __sdk::TableAppliedDiff<'r, PlayerHand>,
wall: __sdk::TableAppliedDiff<'r, DbWall>,
__unused: std::marker::PhantomData<&'r ()>,
}
@ -324,6 +332,7 @@ impl<'r> __sdk::AppliedDiff<'r> for AppliedDiff<'r> {
);
callbacks.invoke_table_row_callbacks::<PlayerHand>("player_hand", &self.player_hand, event);
callbacks.invoke_table_row_callbacks::<DbTile>("tile", &self.tile, event);
callbacks.invoke_table_row_callbacks::<PlayerHand>("view_hand", &self.view_hand, event);
callbacks.invoke_table_row_callbacks::<DbWall>("wall", &self.wall, event);
}
}
@ -1042,6 +1051,7 @@ impl __sdk::SpacetimeModule for RemoteModule {
type DbUpdate = DbUpdate;
type AppliedDiff<'r> = AppliedDiff<'r>;
type SubscriptionHandle = SubscriptionHandle;
type QueryBuilder = __sdk::QueryBuilder;
fn register_tables(client_cache: &mut __sdk::ClientCache<Self>) {
bot_table::register_table(client_cache);
@ -1052,6 +1062,7 @@ impl __sdk::SpacetimeModule for RemoteModule {
player_clock_table::register_table(client_cache);
player_hand_table::register_table(client_cache);
tile_table::register_table(client_cache);
view_hand_table::register_table(client_cache);
wall_table::register_table(client_cache);
}
}