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

@ -80,11 +80,6 @@ impl<'ctx> __sdk::Table for BotTableHandle<'ctx> {
}
}
#[doc(hidden)]
pub(super) fn register_table(client_cache: &mut __sdk::ClientCache<super::RemoteModule>) {
let _table = client_cache.get_or_make_table::<Bot>("bot");
_table.add_unique_constraint::<u32>("id", |row| &row.id);
}
pub struct BotUpdateCallbackId(__sdk::CallbackId);
impl<'ctx> __sdk::TableWithPrimaryKey for BotTableHandle<'ctx> {
@ -102,17 +97,6 @@ impl<'ctx> __sdk::TableWithPrimaryKey for BotTableHandle<'ctx> {
}
}
#[doc(hidden)]
pub(super) fn parse_table_update(
raw_updates: __ws::TableUpdate<__ws::BsatnFormat>,
) -> __sdk::Result<__sdk::TableUpdate<Bot>> {
__sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| {
__sdk::InternalError::failed_parse("TableUpdate<Bot>", "TableUpdate")
.with_cause(e)
.into()
})
}
/// Access to the `id` unique index on the table `bot`,
/// which allows point queries on the field of the same name
/// via the [`BotIdUnique::find`] method.
@ -143,6 +127,23 @@ impl<'ctx> BotIdUnique<'ctx> {
}
}
#[doc(hidden)]
pub(super) fn register_table(client_cache: &mut __sdk::ClientCache<super::RemoteModule>) {
let _table = client_cache.get_or_make_table::<Bot>("bot");
_table.add_unique_constraint::<u32>("id", |row| &row.id);
}
#[doc(hidden)]
pub(super) fn parse_table_update(
raw_updates: __ws::v2::TableUpdate,
) -> __sdk::Result<__sdk::TableUpdate<Bot>> {
__sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| {
__sdk::InternalError::failed_parse("TableUpdate<Bot>", "TableUpdate")
.with_cause(e)
.into()
})
}
#[allow(non_camel_case_types)]
/// Extension trait for query builder access to the table `Bot`.
///