feat: complete M3 runtime snapshot and profile save archive

This commit is contained in:
2026-04-22 13:22:23 +08:00
parent 997a8daada
commit 209e924403
340 changed files with 9878 additions and 4429 deletions

View File

@@ -2,12 +2,17 @@
// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD.
#![allow(unused, clippy::all)]
use super::quest_log_event_kind_type::QuestLogEventKind;
use spacetimedb_sdk::__codegen::{
self as __sdk,
__lib,
__sats,
__ws,
};
use super::quest_log_type::QuestLog;
use super::quest_progress_signal_type::QuestProgressSignal;
use super::quest_signal_kind_type::QuestSignalKind;
use super::quest_status_type::QuestStatus;
use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws};
use super::quest_progress_signal_type::QuestProgressSignal;
use super::quest_log_event_kind_type::QuestLogEventKind;
use super::quest_signal_kind_type::QuestSignalKind;
/// Table handle for the table `quest_log`.
///
@@ -48,12 +53,8 @@ impl<'ctx> __sdk::Table for QuestLogTableHandle<'ctx> {
type Row = QuestLog;
type EventContext = super::EventContext;
fn count(&self) -> u64 {
self.imp.count()
}
fn iter(&self) -> impl Iterator<Item = QuestLog> + '_ {
self.imp.iter()
}
fn count(&self) -> u64 { self.imp.count() }
fn iter(&self) -> impl Iterator<Item = QuestLog> + '_ { self.imp.iter() }
type InsertCallbackId = QuestLogInsertCallbackId;
@@ -99,38 +100,39 @@ impl<'ctx> __sdk::TableWithPrimaryKey for QuestLogTableHandle<'ctx> {
}
}
/// Access to the `log_id` unique index on the table `quest_log`,
/// which allows point queries on the field of the same name
/// via the [`QuestLogLogIdUnique::find`] method.
///
/// Users are encouraged not to explicitly reference this type,
/// but to directly chain method calls,
/// like `ctx.db.quest_log().log_id().find(...)`.
pub struct QuestLogLogIdUnique<'ctx> {
imp: __sdk::UniqueConstraintHandle<QuestLog, String>,
phantom: std::marker::PhantomData<&'ctx super::RemoteTables>,
}
impl<'ctx> QuestLogTableHandle<'ctx> {
/// Get a handle on the `log_id` unique index on the table `quest_log`.
pub fn log_id(&self) -> QuestLogLogIdUnique<'ctx> {
QuestLogLogIdUnique {
imp: self.imp.get_unique_constraint::<String>("log_id"),
phantom: std::marker::PhantomData,
/// Access to the `log_id` unique index on the table `quest_log`,
/// which allows point queries on the field of the same name
/// via the [`QuestLogLogIdUnique::find`] method.
///
/// Users are encouraged not to explicitly reference this type,
/// but to directly chain method calls,
/// like `ctx.db.quest_log().log_id().find(...)`.
pub struct QuestLogLogIdUnique<'ctx> {
imp: __sdk::UniqueConstraintHandle<QuestLog, String>,
phantom: std::marker::PhantomData<&'ctx super::RemoteTables>,
}
}
}
impl<'ctx> QuestLogLogIdUnique<'ctx> {
/// Find the subscribed row whose `log_id` column value is equal to `col_val`,
/// if such a row is present in the client cache.
pub fn find(&self, col_val: &String) -> Option<QuestLog> {
self.imp.find(col_val)
}
}
impl<'ctx> QuestLogTableHandle<'ctx> {
/// Get a handle on the `log_id` unique index on the table `quest_log`.
pub fn log_id(&self) -> QuestLogLogIdUnique<'ctx> {
QuestLogLogIdUnique {
imp: self.imp.get_unique_constraint::<String>("log_id"),
phantom: std::marker::PhantomData,
}
}
}
impl<'ctx> QuestLogLogIdUnique<'ctx> {
/// Find the subscribed row whose `log_id` column value is equal to `col_val`,
/// if such a row is present in the client cache.
pub fn find(&self, col_val: &String) -> Option<QuestLog> {
self.imp.find(col_val)
}
}
#[doc(hidden)]
pub(super) fn register_table(client_cache: &mut __sdk::ClientCache<super::RemoteModule>) {
let _table = client_cache.get_or_make_table::<QuestLog>("quest_log");
_table.add_unique_constraint::<String>("log_id", |row| &row.log_id);
}
@@ -140,24 +142,26 @@ pub(super) fn parse_table_update(
raw_updates: __ws::v2::TableUpdate,
) -> __sdk::Result<__sdk::TableUpdate<QuestLog>> {
__sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| {
__sdk::InternalError::failed_parse("TableUpdate<QuestLog>", "TableUpdate")
.with_cause(e)
.into()
__sdk::InternalError::failed_parse(
"TableUpdate<QuestLog>",
"TableUpdate",
).with_cause(e).into()
})
}
#[allow(non_camel_case_types)]
/// Extension trait for query builder access to the table `QuestLog`.
///
/// Implemented for [`__sdk::QueryTableAccessor`].
pub trait quest_logQueryTableAccess {
#[allow(non_snake_case)]
/// Get a query builder for the table `QuestLog`.
fn quest_log(&self) -> __sdk::__query_builder::Table<QuestLog>;
}
#[allow(non_camel_case_types)]
/// Extension trait for query builder access to the table `QuestLog`.
///
/// Implemented for [`__sdk::QueryTableAccessor`].
pub trait quest_logQueryTableAccess {
#[allow(non_snake_case)]
/// Get a query builder for the table `QuestLog`.
fn quest_log(&self) -> __sdk::__query_builder::Table<QuestLog>;
}
impl quest_logQueryTableAccess for __sdk::QueryTableAccessor {
fn quest_log(&self) -> __sdk::__query_builder::Table<QuestLog> {
__sdk::__query_builder::Table::new("quest_log")
}
}
impl quest_logQueryTableAccess for __sdk::QueryTableAccessor {
fn quest_log(&self) -> __sdk::__query_builder::Table<QuestLog> {
__sdk::__query_builder::Table::new("quest_log")
}
}