upgrade spacetimedb to v2.0.1

This commit is contained in:
Tao Tien 2026-02-25 15:22:10 -08:00
parent 5ebf3f6c05
commit baab16144b
38 changed files with 481 additions and 1647 deletions

View file

@ -78,12 +78,6 @@ impl<'ctx> __sdk::Table for GameTimerTableHandle<'ctx> {
}
}
#[doc(hidden)]
pub(super) fn register_table(client_cache: &mut __sdk::ClientCache<super::RemoteModule>) {
let _table = client_cache.get_or_make_table::<GameTimer>("game_timer");
_table.add_unique_constraint::<u64>("id", |row| &row.id);
_table.add_unique_constraint::<u32>("lobby_id", |row| &row.lobby_id);
}
pub struct GameTimerUpdateCallbackId(__sdk::CallbackId);
impl<'ctx> __sdk::TableWithPrimaryKey for GameTimerTableHandle<'ctx> {
@ -101,17 +95,6 @@ impl<'ctx> __sdk::TableWithPrimaryKey for GameTimerTableHandle<'ctx> {
}
}
#[doc(hidden)]
pub(super) fn parse_table_update(
raw_updates: __ws::TableUpdate<__ws::BsatnFormat>,
) -> __sdk::Result<__sdk::TableUpdate<GameTimer>> {
__sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| {
__sdk::InternalError::failed_parse("TableUpdate<GameTimer>", "TableUpdate")
.with_cause(e)
.into()
})
}
/// Access to the `id` unique index on the table `game_timer`,
/// which allows point queries on the field of the same name
/// via the [`GameTimerIdUnique::find`] method.
@ -172,6 +155,24 @@ impl<'ctx> GameTimerLobbyIdUnique<'ctx> {
}
}
#[doc(hidden)]
pub(super) fn register_table(client_cache: &mut __sdk::ClientCache<super::RemoteModule>) {
let _table = client_cache.get_or_make_table::<GameTimer>("game_timer");
_table.add_unique_constraint::<u64>("id", |row| &row.id);
_table.add_unique_constraint::<u32>("lobby_id", |row| &row.lobby_id);
}
#[doc(hidden)]
pub(super) fn parse_table_update(
raw_updates: __ws::v2::TableUpdate,
) -> __sdk::Result<__sdk::TableUpdate<GameTimer>> {
__sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| {
__sdk::InternalError::failed_parse("TableUpdate<GameTimer>", "TableUpdate")
.with_cause(e)
.into()
})
}
#[allow(non_camel_case_types)]
/// Extension trait for query builder access to the table `GameTimer`.
///