@@ -50,17 +50,11 @@ use crate::{
|
||||
request_context::RequestContext, state::AppState,
|
||||
};
|
||||
|
||||
#[path = "compat/ai.rs"]
|
||||
mod ai;
|
||||
#[path = "compat/equipment_actions.rs"]
|
||||
mod equipment_actions;
|
||||
#[path = "compat/game_state.rs"]
|
||||
mod game_state;
|
||||
#[path = "compat/npc_actions.rs"]
|
||||
mod npc_actions;
|
||||
#[path = "compat/presentation.rs"]
|
||||
mod presentation;
|
||||
#[path = "compat/quest_actions.rs"]
|
||||
mod quest_actions;
|
||||
|
||||
use self::{
|
||||
@@ -68,7 +62,6 @@ use self::{
|
||||
};
|
||||
|
||||
#[cfg(test)]
|
||||
#[path = "compat/tests.rs"]
|
||||
mod tests;
|
||||
|
||||
pub async fn resolve_runtime_story_state(
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
use super::*;
|
||||
|
||||
pub(super) use module_runtime_story_compat::{
|
||||
build_runtime_equipment_item, build_runtime_material_item,
|
||||
};
|
||||
@@ -1,164 +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::ai_result_reference_type::AiResultReference;
|
||||
use super::ai_result_reference_kind_type::AiResultReferenceKind;
|
||||
|
||||
/// Table handle for the table `ai_result_reference`.
|
||||
///
|
||||
/// Obtain a handle from the [`AiResultReferenceTableAccess::ai_result_reference`] method on [`super::RemoteTables`],
|
||||
/// like `ctx.db.ai_result_reference()`.
|
||||
///
|
||||
/// Users are encouraged not to explicitly reference this type,
|
||||
/// but to directly chain method calls,
|
||||
/// like `ctx.db.ai_result_reference().on_insert(...)`.
|
||||
pub struct AiResultReferenceTableHandle<'ctx> {
|
||||
imp: __sdk::TableHandle<AiResultReference>,
|
||||
ctx: std::marker::PhantomData<&'ctx super::RemoteTables>,
|
||||
}
|
||||
|
||||
#[allow(non_camel_case_types)]
|
||||
/// Extension trait for access to the table `ai_result_reference`.
|
||||
///
|
||||
/// Implemented for [`super::RemoteTables`].
|
||||
pub trait AiResultReferenceTableAccess {
|
||||
#[allow(non_snake_case)]
|
||||
/// Obtain a [`AiResultReferenceTableHandle`], which mediates access to the table `ai_result_reference`.
|
||||
fn ai_result_reference(&self) -> AiResultReferenceTableHandle<'_>;
|
||||
}
|
||||
|
||||
impl AiResultReferenceTableAccess for super::RemoteTables {
|
||||
fn ai_result_reference(&self) -> AiResultReferenceTableHandle<'_> {
|
||||
AiResultReferenceTableHandle {
|
||||
imp: self.imp.get_table::<AiResultReference>("ai_result_reference"),
|
||||
ctx: std::marker::PhantomData,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct AiResultReferenceInsertCallbackId(__sdk::CallbackId);
|
||||
pub struct AiResultReferenceDeleteCallbackId(__sdk::CallbackId);
|
||||
|
||||
impl<'ctx> __sdk::Table for AiResultReferenceTableHandle<'ctx> {
|
||||
type Row = AiResultReference;
|
||||
type EventContext = super::EventContext;
|
||||
|
||||
fn count(&self) -> u64 { self.imp.count() }
|
||||
fn iter(&self) -> impl Iterator<Item = AiResultReference> + '_ { self.imp.iter() }
|
||||
|
||||
type InsertCallbackId = AiResultReferenceInsertCallbackId;
|
||||
|
||||
fn on_insert(
|
||||
&self,
|
||||
callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static,
|
||||
) -> AiResultReferenceInsertCallbackId {
|
||||
AiResultReferenceInsertCallbackId(self.imp.on_insert(Box::new(callback)))
|
||||
}
|
||||
|
||||
fn remove_on_insert(&self, callback: AiResultReferenceInsertCallbackId) {
|
||||
self.imp.remove_on_insert(callback.0)
|
||||
}
|
||||
|
||||
type DeleteCallbackId = AiResultReferenceDeleteCallbackId;
|
||||
|
||||
fn on_delete(
|
||||
&self,
|
||||
callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static,
|
||||
) -> AiResultReferenceDeleteCallbackId {
|
||||
AiResultReferenceDeleteCallbackId(self.imp.on_delete(Box::new(callback)))
|
||||
}
|
||||
|
||||
fn remove_on_delete(&self, callback: AiResultReferenceDeleteCallbackId) {
|
||||
self.imp.remove_on_delete(callback.0)
|
||||
}
|
||||
}
|
||||
|
||||
pub struct AiResultReferenceUpdateCallbackId(__sdk::CallbackId);
|
||||
|
||||
impl<'ctx> __sdk::TableWithPrimaryKey for AiResultReferenceTableHandle<'ctx> {
|
||||
type UpdateCallbackId = AiResultReferenceUpdateCallbackId;
|
||||
|
||||
fn on_update(
|
||||
&self,
|
||||
callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static,
|
||||
) -> AiResultReferenceUpdateCallbackId {
|
||||
AiResultReferenceUpdateCallbackId(self.imp.on_update(Box::new(callback)))
|
||||
}
|
||||
|
||||
fn remove_on_update(&self, callback: AiResultReferenceUpdateCallbackId) {
|
||||
self.imp.remove_on_update(callback.0)
|
||||
}
|
||||
}
|
||||
|
||||
/// Access to the `result_reference_row_id` unique index on the table `ai_result_reference`,
|
||||
/// which allows point queries on the field of the same name
|
||||
/// via the [`AiResultReferenceResultReferenceRowIdUnique::find`] method.
|
||||
///
|
||||
/// Users are encouraged not to explicitly reference this type,
|
||||
/// but to directly chain method calls,
|
||||
/// like `ctx.db.ai_result_reference().result_reference_row_id().find(...)`.
|
||||
pub struct AiResultReferenceResultReferenceRowIdUnique<'ctx> {
|
||||
imp: __sdk::UniqueConstraintHandle<AiResultReference, String>,
|
||||
phantom: std::marker::PhantomData<&'ctx super::RemoteTables>,
|
||||
}
|
||||
|
||||
impl<'ctx> AiResultReferenceTableHandle<'ctx> {
|
||||
/// Get a handle on the `result_reference_row_id` unique index on the table `ai_result_reference`.
|
||||
pub fn result_reference_row_id(&self) -> AiResultReferenceResultReferenceRowIdUnique<'ctx> {
|
||||
AiResultReferenceResultReferenceRowIdUnique {
|
||||
imp: self.imp.get_unique_constraint::<String>("result_reference_row_id"),
|
||||
phantom: std::marker::PhantomData,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<'ctx> AiResultReferenceResultReferenceRowIdUnique<'ctx> {
|
||||
/// Find the subscribed row whose `result_reference_row_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<AiResultReference> {
|
||||
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::<AiResultReference>("ai_result_reference");
|
||||
_table.add_unique_constraint::<String>("result_reference_row_id", |row| &row.result_reference_row_id);
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
pub(super) fn parse_table_update(
|
||||
raw_updates: __ws::v2::TableUpdate,
|
||||
) -> __sdk::Result<__sdk::TableUpdate<AiResultReference>> {
|
||||
__sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| {
|
||||
__sdk::InternalError::failed_parse(
|
||||
"TableUpdate<AiResultReference>",
|
||||
"TableUpdate",
|
||||
).with_cause(e).into()
|
||||
})
|
||||
}
|
||||
|
||||
#[allow(non_camel_case_types)]
|
||||
/// Extension trait for query builder access to the table `AiResultReference`.
|
||||
///
|
||||
/// Implemented for [`__sdk::QueryTableAccessor`].
|
||||
pub trait ai_result_referenceQueryTableAccess {
|
||||
#[allow(non_snake_case)]
|
||||
/// Get a query builder for the table `AiResultReference`.
|
||||
fn ai_result_reference(&self) -> __sdk::__query_builder::Table<AiResultReference>;
|
||||
}
|
||||
|
||||
impl ai_result_referenceQueryTableAccess for __sdk::QueryTableAccessor {
|
||||
fn ai_result_reference(&self) -> __sdk::__query_builder::Table<AiResultReference> {
|
||||
__sdk::__query_builder::Table::new("ai_result_reference")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,165 +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::ai_task_stage_type::AiTaskStage;
|
||||
use super::ai_task_stage_kind_type::AiTaskStageKind;
|
||||
use super::ai_task_stage_status_type::AiTaskStageStatus;
|
||||
|
||||
/// Table handle for the table `ai_task_stage`.
|
||||
///
|
||||
/// Obtain a handle from the [`AiTaskStageTableAccess::ai_task_stage`] method on [`super::RemoteTables`],
|
||||
/// like `ctx.db.ai_task_stage()`.
|
||||
///
|
||||
/// Users are encouraged not to explicitly reference this type,
|
||||
/// but to directly chain method calls,
|
||||
/// like `ctx.db.ai_task_stage().on_insert(...)`.
|
||||
pub struct AiTaskStageTableHandle<'ctx> {
|
||||
imp: __sdk::TableHandle<AiTaskStage>,
|
||||
ctx: std::marker::PhantomData<&'ctx super::RemoteTables>,
|
||||
}
|
||||
|
||||
#[allow(non_camel_case_types)]
|
||||
/// Extension trait for access to the table `ai_task_stage`.
|
||||
///
|
||||
/// Implemented for [`super::RemoteTables`].
|
||||
pub trait AiTaskStageTableAccess {
|
||||
#[allow(non_snake_case)]
|
||||
/// Obtain a [`AiTaskStageTableHandle`], which mediates access to the table `ai_task_stage`.
|
||||
fn ai_task_stage(&self) -> AiTaskStageTableHandle<'_>;
|
||||
}
|
||||
|
||||
impl AiTaskStageTableAccess for super::RemoteTables {
|
||||
fn ai_task_stage(&self) -> AiTaskStageTableHandle<'_> {
|
||||
AiTaskStageTableHandle {
|
||||
imp: self.imp.get_table::<AiTaskStage>("ai_task_stage"),
|
||||
ctx: std::marker::PhantomData,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct AiTaskStageInsertCallbackId(__sdk::CallbackId);
|
||||
pub struct AiTaskStageDeleteCallbackId(__sdk::CallbackId);
|
||||
|
||||
impl<'ctx> __sdk::Table for AiTaskStageTableHandle<'ctx> {
|
||||
type Row = AiTaskStage;
|
||||
type EventContext = super::EventContext;
|
||||
|
||||
fn count(&self) -> u64 { self.imp.count() }
|
||||
fn iter(&self) -> impl Iterator<Item = AiTaskStage> + '_ { self.imp.iter() }
|
||||
|
||||
type InsertCallbackId = AiTaskStageInsertCallbackId;
|
||||
|
||||
fn on_insert(
|
||||
&self,
|
||||
callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static,
|
||||
) -> AiTaskStageInsertCallbackId {
|
||||
AiTaskStageInsertCallbackId(self.imp.on_insert(Box::new(callback)))
|
||||
}
|
||||
|
||||
fn remove_on_insert(&self, callback: AiTaskStageInsertCallbackId) {
|
||||
self.imp.remove_on_insert(callback.0)
|
||||
}
|
||||
|
||||
type DeleteCallbackId = AiTaskStageDeleteCallbackId;
|
||||
|
||||
fn on_delete(
|
||||
&self,
|
||||
callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static,
|
||||
) -> AiTaskStageDeleteCallbackId {
|
||||
AiTaskStageDeleteCallbackId(self.imp.on_delete(Box::new(callback)))
|
||||
}
|
||||
|
||||
fn remove_on_delete(&self, callback: AiTaskStageDeleteCallbackId) {
|
||||
self.imp.remove_on_delete(callback.0)
|
||||
}
|
||||
}
|
||||
|
||||
pub struct AiTaskStageUpdateCallbackId(__sdk::CallbackId);
|
||||
|
||||
impl<'ctx> __sdk::TableWithPrimaryKey for AiTaskStageTableHandle<'ctx> {
|
||||
type UpdateCallbackId = AiTaskStageUpdateCallbackId;
|
||||
|
||||
fn on_update(
|
||||
&self,
|
||||
callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static,
|
||||
) -> AiTaskStageUpdateCallbackId {
|
||||
AiTaskStageUpdateCallbackId(self.imp.on_update(Box::new(callback)))
|
||||
}
|
||||
|
||||
fn remove_on_update(&self, callback: AiTaskStageUpdateCallbackId) {
|
||||
self.imp.remove_on_update(callback.0)
|
||||
}
|
||||
}
|
||||
|
||||
/// Access to the `task_stage_id` unique index on the table `ai_task_stage`,
|
||||
/// which allows point queries on the field of the same name
|
||||
/// via the [`AiTaskStageTaskStageIdUnique::find`] method.
|
||||
///
|
||||
/// Users are encouraged not to explicitly reference this type,
|
||||
/// but to directly chain method calls,
|
||||
/// like `ctx.db.ai_task_stage().task_stage_id().find(...)`.
|
||||
pub struct AiTaskStageTaskStageIdUnique<'ctx> {
|
||||
imp: __sdk::UniqueConstraintHandle<AiTaskStage, String>,
|
||||
phantom: std::marker::PhantomData<&'ctx super::RemoteTables>,
|
||||
}
|
||||
|
||||
impl<'ctx> AiTaskStageTableHandle<'ctx> {
|
||||
/// Get a handle on the `task_stage_id` unique index on the table `ai_task_stage`.
|
||||
pub fn task_stage_id(&self) -> AiTaskStageTaskStageIdUnique<'ctx> {
|
||||
AiTaskStageTaskStageIdUnique {
|
||||
imp: self.imp.get_unique_constraint::<String>("task_stage_id"),
|
||||
phantom: std::marker::PhantomData,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<'ctx> AiTaskStageTaskStageIdUnique<'ctx> {
|
||||
/// Find the subscribed row whose `task_stage_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<AiTaskStage> {
|
||||
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::<AiTaskStage>("ai_task_stage");
|
||||
_table.add_unique_constraint::<String>("task_stage_id", |row| &row.task_stage_id);
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
pub(super) fn parse_table_update(
|
||||
raw_updates: __ws::v2::TableUpdate,
|
||||
) -> __sdk::Result<__sdk::TableUpdate<AiTaskStage>> {
|
||||
__sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| {
|
||||
__sdk::InternalError::failed_parse(
|
||||
"TableUpdate<AiTaskStage>",
|
||||
"TableUpdate",
|
||||
).with_cause(e).into()
|
||||
})
|
||||
}
|
||||
|
||||
#[allow(non_camel_case_types)]
|
||||
/// Extension trait for query builder access to the table `AiTaskStage`.
|
||||
///
|
||||
/// Implemented for [`__sdk::QueryTableAccessor`].
|
||||
pub trait ai_task_stageQueryTableAccess {
|
||||
#[allow(non_snake_case)]
|
||||
/// Get a query builder for the table `AiTaskStage`.
|
||||
fn ai_task_stage(&self) -> __sdk::__query_builder::Table<AiTaskStage>;
|
||||
}
|
||||
|
||||
impl ai_task_stageQueryTableAccess for __sdk::QueryTableAccessor {
|
||||
fn ai_task_stage(&self) -> __sdk::__query_builder::Table<AiTaskStage> {
|
||||
__sdk::__query_builder::Table::new("ai_task_stage")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,165 +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::ai_task_type::AiTask;
|
||||
use super::ai_task_kind_type::AiTaskKind;
|
||||
use super::ai_task_status_type::AiTaskStatus;
|
||||
|
||||
/// Table handle for the table `ai_task`.
|
||||
///
|
||||
/// Obtain a handle from the [`AiTaskTableAccess::ai_task`] method on [`super::RemoteTables`],
|
||||
/// like `ctx.db.ai_task()`.
|
||||
///
|
||||
/// Users are encouraged not to explicitly reference this type,
|
||||
/// but to directly chain method calls,
|
||||
/// like `ctx.db.ai_task().on_insert(...)`.
|
||||
pub struct AiTaskTableHandle<'ctx> {
|
||||
imp: __sdk::TableHandle<AiTask>,
|
||||
ctx: std::marker::PhantomData<&'ctx super::RemoteTables>,
|
||||
}
|
||||
|
||||
#[allow(non_camel_case_types)]
|
||||
/// Extension trait for access to the table `ai_task`.
|
||||
///
|
||||
/// Implemented for [`super::RemoteTables`].
|
||||
pub trait AiTaskTableAccess {
|
||||
#[allow(non_snake_case)]
|
||||
/// Obtain a [`AiTaskTableHandle`], which mediates access to the table `ai_task`.
|
||||
fn ai_task(&self) -> AiTaskTableHandle<'_>;
|
||||
}
|
||||
|
||||
impl AiTaskTableAccess for super::RemoteTables {
|
||||
fn ai_task(&self) -> AiTaskTableHandle<'_> {
|
||||
AiTaskTableHandle {
|
||||
imp: self.imp.get_table::<AiTask>("ai_task"),
|
||||
ctx: std::marker::PhantomData,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct AiTaskInsertCallbackId(__sdk::CallbackId);
|
||||
pub struct AiTaskDeleteCallbackId(__sdk::CallbackId);
|
||||
|
||||
impl<'ctx> __sdk::Table for AiTaskTableHandle<'ctx> {
|
||||
type Row = AiTask;
|
||||
type EventContext = super::EventContext;
|
||||
|
||||
fn count(&self) -> u64 { self.imp.count() }
|
||||
fn iter(&self) -> impl Iterator<Item = AiTask> + '_ { self.imp.iter() }
|
||||
|
||||
type InsertCallbackId = AiTaskInsertCallbackId;
|
||||
|
||||
fn on_insert(
|
||||
&self,
|
||||
callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static,
|
||||
) -> AiTaskInsertCallbackId {
|
||||
AiTaskInsertCallbackId(self.imp.on_insert(Box::new(callback)))
|
||||
}
|
||||
|
||||
fn remove_on_insert(&self, callback: AiTaskInsertCallbackId) {
|
||||
self.imp.remove_on_insert(callback.0)
|
||||
}
|
||||
|
||||
type DeleteCallbackId = AiTaskDeleteCallbackId;
|
||||
|
||||
fn on_delete(
|
||||
&self,
|
||||
callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static,
|
||||
) -> AiTaskDeleteCallbackId {
|
||||
AiTaskDeleteCallbackId(self.imp.on_delete(Box::new(callback)))
|
||||
}
|
||||
|
||||
fn remove_on_delete(&self, callback: AiTaskDeleteCallbackId) {
|
||||
self.imp.remove_on_delete(callback.0)
|
||||
}
|
||||
}
|
||||
|
||||
pub struct AiTaskUpdateCallbackId(__sdk::CallbackId);
|
||||
|
||||
impl<'ctx> __sdk::TableWithPrimaryKey for AiTaskTableHandle<'ctx> {
|
||||
type UpdateCallbackId = AiTaskUpdateCallbackId;
|
||||
|
||||
fn on_update(
|
||||
&self,
|
||||
callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static,
|
||||
) -> AiTaskUpdateCallbackId {
|
||||
AiTaskUpdateCallbackId(self.imp.on_update(Box::new(callback)))
|
||||
}
|
||||
|
||||
fn remove_on_update(&self, callback: AiTaskUpdateCallbackId) {
|
||||
self.imp.remove_on_update(callback.0)
|
||||
}
|
||||
}
|
||||
|
||||
/// Access to the `task_id` unique index on the table `ai_task`,
|
||||
/// which allows point queries on the field of the same name
|
||||
/// via the [`AiTaskTaskIdUnique::find`] method.
|
||||
///
|
||||
/// Users are encouraged not to explicitly reference this type,
|
||||
/// but to directly chain method calls,
|
||||
/// like `ctx.db.ai_task().task_id().find(...)`.
|
||||
pub struct AiTaskTaskIdUnique<'ctx> {
|
||||
imp: __sdk::UniqueConstraintHandle<AiTask, String>,
|
||||
phantom: std::marker::PhantomData<&'ctx super::RemoteTables>,
|
||||
}
|
||||
|
||||
impl<'ctx> AiTaskTableHandle<'ctx> {
|
||||
/// Get a handle on the `task_id` unique index on the table `ai_task`.
|
||||
pub fn task_id(&self) -> AiTaskTaskIdUnique<'ctx> {
|
||||
AiTaskTaskIdUnique {
|
||||
imp: self.imp.get_unique_constraint::<String>("task_id"),
|
||||
phantom: std::marker::PhantomData,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<'ctx> AiTaskTaskIdUnique<'ctx> {
|
||||
/// Find the subscribed row whose `task_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<AiTask> {
|
||||
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::<AiTask>("ai_task");
|
||||
_table.add_unique_constraint::<String>("task_id", |row| &row.task_id);
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
pub(super) fn parse_table_update(
|
||||
raw_updates: __ws::v2::TableUpdate,
|
||||
) -> __sdk::Result<__sdk::TableUpdate<AiTask>> {
|
||||
__sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| {
|
||||
__sdk::InternalError::failed_parse(
|
||||
"TableUpdate<AiTask>",
|
||||
"TableUpdate",
|
||||
).with_cause(e).into()
|
||||
})
|
||||
}
|
||||
|
||||
#[allow(non_camel_case_types)]
|
||||
/// Extension trait for query builder access to the table `AiTask`.
|
||||
///
|
||||
/// Implemented for [`__sdk::QueryTableAccessor`].
|
||||
pub trait ai_taskQueryTableAccess {
|
||||
#[allow(non_snake_case)]
|
||||
/// Get a query builder for the table `AiTask`.
|
||||
fn ai_task(&self) -> __sdk::__query_builder::Table<AiTask>;
|
||||
}
|
||||
|
||||
impl ai_taskQueryTableAccess for __sdk::QueryTableAccessor {
|
||||
fn ai_task(&self) -> __sdk::__query_builder::Table<AiTask> {
|
||||
__sdk::__query_builder::Table::new("ai_task")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,164 +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::ai_text_chunk_type::AiTextChunk;
|
||||
use super::ai_task_stage_kind_type::AiTaskStageKind;
|
||||
|
||||
/// Table handle for the table `ai_text_chunk`.
|
||||
///
|
||||
/// Obtain a handle from the [`AiTextChunkTableAccess::ai_text_chunk`] method on [`super::RemoteTables`],
|
||||
/// like `ctx.db.ai_text_chunk()`.
|
||||
///
|
||||
/// Users are encouraged not to explicitly reference this type,
|
||||
/// but to directly chain method calls,
|
||||
/// like `ctx.db.ai_text_chunk().on_insert(...)`.
|
||||
pub struct AiTextChunkTableHandle<'ctx> {
|
||||
imp: __sdk::TableHandle<AiTextChunk>,
|
||||
ctx: std::marker::PhantomData<&'ctx super::RemoteTables>,
|
||||
}
|
||||
|
||||
#[allow(non_camel_case_types)]
|
||||
/// Extension trait for access to the table `ai_text_chunk`.
|
||||
///
|
||||
/// Implemented for [`super::RemoteTables`].
|
||||
pub trait AiTextChunkTableAccess {
|
||||
#[allow(non_snake_case)]
|
||||
/// Obtain a [`AiTextChunkTableHandle`], which mediates access to the table `ai_text_chunk`.
|
||||
fn ai_text_chunk(&self) -> AiTextChunkTableHandle<'_>;
|
||||
}
|
||||
|
||||
impl AiTextChunkTableAccess for super::RemoteTables {
|
||||
fn ai_text_chunk(&self) -> AiTextChunkTableHandle<'_> {
|
||||
AiTextChunkTableHandle {
|
||||
imp: self.imp.get_table::<AiTextChunk>("ai_text_chunk"),
|
||||
ctx: std::marker::PhantomData,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct AiTextChunkInsertCallbackId(__sdk::CallbackId);
|
||||
pub struct AiTextChunkDeleteCallbackId(__sdk::CallbackId);
|
||||
|
||||
impl<'ctx> __sdk::Table for AiTextChunkTableHandle<'ctx> {
|
||||
type Row = AiTextChunk;
|
||||
type EventContext = super::EventContext;
|
||||
|
||||
fn count(&self) -> u64 { self.imp.count() }
|
||||
fn iter(&self) -> impl Iterator<Item = AiTextChunk> + '_ { self.imp.iter() }
|
||||
|
||||
type InsertCallbackId = AiTextChunkInsertCallbackId;
|
||||
|
||||
fn on_insert(
|
||||
&self,
|
||||
callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static,
|
||||
) -> AiTextChunkInsertCallbackId {
|
||||
AiTextChunkInsertCallbackId(self.imp.on_insert(Box::new(callback)))
|
||||
}
|
||||
|
||||
fn remove_on_insert(&self, callback: AiTextChunkInsertCallbackId) {
|
||||
self.imp.remove_on_insert(callback.0)
|
||||
}
|
||||
|
||||
type DeleteCallbackId = AiTextChunkDeleteCallbackId;
|
||||
|
||||
fn on_delete(
|
||||
&self,
|
||||
callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static,
|
||||
) -> AiTextChunkDeleteCallbackId {
|
||||
AiTextChunkDeleteCallbackId(self.imp.on_delete(Box::new(callback)))
|
||||
}
|
||||
|
||||
fn remove_on_delete(&self, callback: AiTextChunkDeleteCallbackId) {
|
||||
self.imp.remove_on_delete(callback.0)
|
||||
}
|
||||
}
|
||||
|
||||
pub struct AiTextChunkUpdateCallbackId(__sdk::CallbackId);
|
||||
|
||||
impl<'ctx> __sdk::TableWithPrimaryKey for AiTextChunkTableHandle<'ctx> {
|
||||
type UpdateCallbackId = AiTextChunkUpdateCallbackId;
|
||||
|
||||
fn on_update(
|
||||
&self,
|
||||
callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static,
|
||||
) -> AiTextChunkUpdateCallbackId {
|
||||
AiTextChunkUpdateCallbackId(self.imp.on_update(Box::new(callback)))
|
||||
}
|
||||
|
||||
fn remove_on_update(&self, callback: AiTextChunkUpdateCallbackId) {
|
||||
self.imp.remove_on_update(callback.0)
|
||||
}
|
||||
}
|
||||
|
||||
/// Access to the `text_chunk_row_id` unique index on the table `ai_text_chunk`,
|
||||
/// which allows point queries on the field of the same name
|
||||
/// via the [`AiTextChunkTextChunkRowIdUnique::find`] method.
|
||||
///
|
||||
/// Users are encouraged not to explicitly reference this type,
|
||||
/// but to directly chain method calls,
|
||||
/// like `ctx.db.ai_text_chunk().text_chunk_row_id().find(...)`.
|
||||
pub struct AiTextChunkTextChunkRowIdUnique<'ctx> {
|
||||
imp: __sdk::UniqueConstraintHandle<AiTextChunk, String>,
|
||||
phantom: std::marker::PhantomData<&'ctx super::RemoteTables>,
|
||||
}
|
||||
|
||||
impl<'ctx> AiTextChunkTableHandle<'ctx> {
|
||||
/// Get a handle on the `text_chunk_row_id` unique index on the table `ai_text_chunk`.
|
||||
pub fn text_chunk_row_id(&self) -> AiTextChunkTextChunkRowIdUnique<'ctx> {
|
||||
AiTextChunkTextChunkRowIdUnique {
|
||||
imp: self.imp.get_unique_constraint::<String>("text_chunk_row_id"),
|
||||
phantom: std::marker::PhantomData,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<'ctx> AiTextChunkTextChunkRowIdUnique<'ctx> {
|
||||
/// Find the subscribed row whose `text_chunk_row_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<AiTextChunk> {
|
||||
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::<AiTextChunk>("ai_text_chunk");
|
||||
_table.add_unique_constraint::<String>("text_chunk_row_id", |row| &row.text_chunk_row_id);
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
pub(super) fn parse_table_update(
|
||||
raw_updates: __ws::v2::TableUpdate,
|
||||
) -> __sdk::Result<__sdk::TableUpdate<AiTextChunk>> {
|
||||
__sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| {
|
||||
__sdk::InternalError::failed_parse(
|
||||
"TableUpdate<AiTextChunk>",
|
||||
"TableUpdate",
|
||||
).with_cause(e).into()
|
||||
})
|
||||
}
|
||||
|
||||
#[allow(non_camel_case_types)]
|
||||
/// Extension trait for query builder access to the table `AiTextChunk`.
|
||||
///
|
||||
/// Implemented for [`__sdk::QueryTableAccessor`].
|
||||
pub trait ai_text_chunkQueryTableAccess {
|
||||
#[allow(non_snake_case)]
|
||||
/// Get a query builder for the table `AiTextChunk`.
|
||||
fn ai_text_chunk(&self) -> __sdk::__query_builder::Table<AiTextChunk>;
|
||||
}
|
||||
|
||||
impl ai_text_chunkQueryTableAccess for __sdk::QueryTableAccessor {
|
||||
fn ai_text_chunk(&self) -> __sdk::__query_builder::Table<AiTextChunk> {
|
||||
__sdk::__query_builder::Table::new("ai_text_chunk")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,163 +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::asset_entity_binding_type::AssetEntityBinding;
|
||||
|
||||
/// Table handle for the table `asset_entity_binding`.
|
||||
///
|
||||
/// Obtain a handle from the [`AssetEntityBindingTableAccess::asset_entity_binding`] method on [`super::RemoteTables`],
|
||||
/// like `ctx.db.asset_entity_binding()`.
|
||||
///
|
||||
/// Users are encouraged not to explicitly reference this type,
|
||||
/// but to directly chain method calls,
|
||||
/// like `ctx.db.asset_entity_binding().on_insert(...)`.
|
||||
pub struct AssetEntityBindingTableHandle<'ctx> {
|
||||
imp: __sdk::TableHandle<AssetEntityBinding>,
|
||||
ctx: std::marker::PhantomData<&'ctx super::RemoteTables>,
|
||||
}
|
||||
|
||||
#[allow(non_camel_case_types)]
|
||||
/// Extension trait for access to the table `asset_entity_binding`.
|
||||
///
|
||||
/// Implemented for [`super::RemoteTables`].
|
||||
pub trait AssetEntityBindingTableAccess {
|
||||
#[allow(non_snake_case)]
|
||||
/// Obtain a [`AssetEntityBindingTableHandle`], which mediates access to the table `asset_entity_binding`.
|
||||
fn asset_entity_binding(&self) -> AssetEntityBindingTableHandle<'_>;
|
||||
}
|
||||
|
||||
impl AssetEntityBindingTableAccess for super::RemoteTables {
|
||||
fn asset_entity_binding(&self) -> AssetEntityBindingTableHandle<'_> {
|
||||
AssetEntityBindingTableHandle {
|
||||
imp: self.imp.get_table::<AssetEntityBinding>("asset_entity_binding"),
|
||||
ctx: std::marker::PhantomData,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct AssetEntityBindingInsertCallbackId(__sdk::CallbackId);
|
||||
pub struct AssetEntityBindingDeleteCallbackId(__sdk::CallbackId);
|
||||
|
||||
impl<'ctx> __sdk::Table for AssetEntityBindingTableHandle<'ctx> {
|
||||
type Row = AssetEntityBinding;
|
||||
type EventContext = super::EventContext;
|
||||
|
||||
fn count(&self) -> u64 { self.imp.count() }
|
||||
fn iter(&self) -> impl Iterator<Item = AssetEntityBinding> + '_ { self.imp.iter() }
|
||||
|
||||
type InsertCallbackId = AssetEntityBindingInsertCallbackId;
|
||||
|
||||
fn on_insert(
|
||||
&self,
|
||||
callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static,
|
||||
) -> AssetEntityBindingInsertCallbackId {
|
||||
AssetEntityBindingInsertCallbackId(self.imp.on_insert(Box::new(callback)))
|
||||
}
|
||||
|
||||
fn remove_on_insert(&self, callback: AssetEntityBindingInsertCallbackId) {
|
||||
self.imp.remove_on_insert(callback.0)
|
||||
}
|
||||
|
||||
type DeleteCallbackId = AssetEntityBindingDeleteCallbackId;
|
||||
|
||||
fn on_delete(
|
||||
&self,
|
||||
callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static,
|
||||
) -> AssetEntityBindingDeleteCallbackId {
|
||||
AssetEntityBindingDeleteCallbackId(self.imp.on_delete(Box::new(callback)))
|
||||
}
|
||||
|
||||
fn remove_on_delete(&self, callback: AssetEntityBindingDeleteCallbackId) {
|
||||
self.imp.remove_on_delete(callback.0)
|
||||
}
|
||||
}
|
||||
|
||||
pub struct AssetEntityBindingUpdateCallbackId(__sdk::CallbackId);
|
||||
|
||||
impl<'ctx> __sdk::TableWithPrimaryKey for AssetEntityBindingTableHandle<'ctx> {
|
||||
type UpdateCallbackId = AssetEntityBindingUpdateCallbackId;
|
||||
|
||||
fn on_update(
|
||||
&self,
|
||||
callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static,
|
||||
) -> AssetEntityBindingUpdateCallbackId {
|
||||
AssetEntityBindingUpdateCallbackId(self.imp.on_update(Box::new(callback)))
|
||||
}
|
||||
|
||||
fn remove_on_update(&self, callback: AssetEntityBindingUpdateCallbackId) {
|
||||
self.imp.remove_on_update(callback.0)
|
||||
}
|
||||
}
|
||||
|
||||
/// Access to the `binding_id` unique index on the table `asset_entity_binding`,
|
||||
/// which allows point queries on the field of the same name
|
||||
/// via the [`AssetEntityBindingBindingIdUnique::find`] method.
|
||||
///
|
||||
/// Users are encouraged not to explicitly reference this type,
|
||||
/// but to directly chain method calls,
|
||||
/// like `ctx.db.asset_entity_binding().binding_id().find(...)`.
|
||||
pub struct AssetEntityBindingBindingIdUnique<'ctx> {
|
||||
imp: __sdk::UniqueConstraintHandle<AssetEntityBinding, String>,
|
||||
phantom: std::marker::PhantomData<&'ctx super::RemoteTables>,
|
||||
}
|
||||
|
||||
impl<'ctx> AssetEntityBindingTableHandle<'ctx> {
|
||||
/// Get a handle on the `binding_id` unique index on the table `asset_entity_binding`.
|
||||
pub fn binding_id(&self) -> AssetEntityBindingBindingIdUnique<'ctx> {
|
||||
AssetEntityBindingBindingIdUnique {
|
||||
imp: self.imp.get_unique_constraint::<String>("binding_id"),
|
||||
phantom: std::marker::PhantomData,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<'ctx> AssetEntityBindingBindingIdUnique<'ctx> {
|
||||
/// Find the subscribed row whose `binding_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<AssetEntityBinding> {
|
||||
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::<AssetEntityBinding>("asset_entity_binding");
|
||||
_table.add_unique_constraint::<String>("binding_id", |row| &row.binding_id);
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
pub(super) fn parse_table_update(
|
||||
raw_updates: __ws::v2::TableUpdate,
|
||||
) -> __sdk::Result<__sdk::TableUpdate<AssetEntityBinding>> {
|
||||
__sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| {
|
||||
__sdk::InternalError::failed_parse(
|
||||
"TableUpdate<AssetEntityBinding>",
|
||||
"TableUpdate",
|
||||
).with_cause(e).into()
|
||||
})
|
||||
}
|
||||
|
||||
#[allow(non_camel_case_types)]
|
||||
/// Extension trait for query builder access to the table `AssetEntityBinding`.
|
||||
///
|
||||
/// Implemented for [`__sdk::QueryTableAccessor`].
|
||||
pub trait asset_entity_bindingQueryTableAccess {
|
||||
#[allow(non_snake_case)]
|
||||
/// Get a query builder for the table `AssetEntityBinding`.
|
||||
fn asset_entity_binding(&self) -> __sdk::__query_builder::Table<AssetEntityBinding>;
|
||||
}
|
||||
|
||||
impl asset_entity_bindingQueryTableAccess for __sdk::QueryTableAccessor {
|
||||
fn asset_entity_binding(&self) -> __sdk::__query_builder::Table<AssetEntityBinding> {
|
||||
__sdk::__query_builder::Table::new("asset_entity_binding")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,164 +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::asset_object_type::AssetObject;
|
||||
use super::asset_object_access_policy_type::AssetObjectAccessPolicy;
|
||||
|
||||
/// Table handle for the table `asset_object`.
|
||||
///
|
||||
/// Obtain a handle from the [`AssetObjectTableAccess::asset_object`] method on [`super::RemoteTables`],
|
||||
/// like `ctx.db.asset_object()`.
|
||||
///
|
||||
/// Users are encouraged not to explicitly reference this type,
|
||||
/// but to directly chain method calls,
|
||||
/// like `ctx.db.asset_object().on_insert(...)`.
|
||||
pub struct AssetObjectTableHandle<'ctx> {
|
||||
imp: __sdk::TableHandle<AssetObject>,
|
||||
ctx: std::marker::PhantomData<&'ctx super::RemoteTables>,
|
||||
}
|
||||
|
||||
#[allow(non_camel_case_types)]
|
||||
/// Extension trait for access to the table `asset_object`.
|
||||
///
|
||||
/// Implemented for [`super::RemoteTables`].
|
||||
pub trait AssetObjectTableAccess {
|
||||
#[allow(non_snake_case)]
|
||||
/// Obtain a [`AssetObjectTableHandle`], which mediates access to the table `asset_object`.
|
||||
fn asset_object(&self) -> AssetObjectTableHandle<'_>;
|
||||
}
|
||||
|
||||
impl AssetObjectTableAccess for super::RemoteTables {
|
||||
fn asset_object(&self) -> AssetObjectTableHandle<'_> {
|
||||
AssetObjectTableHandle {
|
||||
imp: self.imp.get_table::<AssetObject>("asset_object"),
|
||||
ctx: std::marker::PhantomData,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct AssetObjectInsertCallbackId(__sdk::CallbackId);
|
||||
pub struct AssetObjectDeleteCallbackId(__sdk::CallbackId);
|
||||
|
||||
impl<'ctx> __sdk::Table for AssetObjectTableHandle<'ctx> {
|
||||
type Row = AssetObject;
|
||||
type EventContext = super::EventContext;
|
||||
|
||||
fn count(&self) -> u64 { self.imp.count() }
|
||||
fn iter(&self) -> impl Iterator<Item = AssetObject> + '_ { self.imp.iter() }
|
||||
|
||||
type InsertCallbackId = AssetObjectInsertCallbackId;
|
||||
|
||||
fn on_insert(
|
||||
&self,
|
||||
callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static,
|
||||
) -> AssetObjectInsertCallbackId {
|
||||
AssetObjectInsertCallbackId(self.imp.on_insert(Box::new(callback)))
|
||||
}
|
||||
|
||||
fn remove_on_insert(&self, callback: AssetObjectInsertCallbackId) {
|
||||
self.imp.remove_on_insert(callback.0)
|
||||
}
|
||||
|
||||
type DeleteCallbackId = AssetObjectDeleteCallbackId;
|
||||
|
||||
fn on_delete(
|
||||
&self,
|
||||
callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static,
|
||||
) -> AssetObjectDeleteCallbackId {
|
||||
AssetObjectDeleteCallbackId(self.imp.on_delete(Box::new(callback)))
|
||||
}
|
||||
|
||||
fn remove_on_delete(&self, callback: AssetObjectDeleteCallbackId) {
|
||||
self.imp.remove_on_delete(callback.0)
|
||||
}
|
||||
}
|
||||
|
||||
pub struct AssetObjectUpdateCallbackId(__sdk::CallbackId);
|
||||
|
||||
impl<'ctx> __sdk::TableWithPrimaryKey for AssetObjectTableHandle<'ctx> {
|
||||
type UpdateCallbackId = AssetObjectUpdateCallbackId;
|
||||
|
||||
fn on_update(
|
||||
&self,
|
||||
callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static,
|
||||
) -> AssetObjectUpdateCallbackId {
|
||||
AssetObjectUpdateCallbackId(self.imp.on_update(Box::new(callback)))
|
||||
}
|
||||
|
||||
fn remove_on_update(&self, callback: AssetObjectUpdateCallbackId) {
|
||||
self.imp.remove_on_update(callback.0)
|
||||
}
|
||||
}
|
||||
|
||||
/// Access to the `asset_object_id` unique index on the table `asset_object`,
|
||||
/// which allows point queries on the field of the same name
|
||||
/// via the [`AssetObjectAssetObjectIdUnique::find`] method.
|
||||
///
|
||||
/// Users are encouraged not to explicitly reference this type,
|
||||
/// but to directly chain method calls,
|
||||
/// like `ctx.db.asset_object().asset_object_id().find(...)`.
|
||||
pub struct AssetObjectAssetObjectIdUnique<'ctx> {
|
||||
imp: __sdk::UniqueConstraintHandle<AssetObject, String>,
|
||||
phantom: std::marker::PhantomData<&'ctx super::RemoteTables>,
|
||||
}
|
||||
|
||||
impl<'ctx> AssetObjectTableHandle<'ctx> {
|
||||
/// Get a handle on the `asset_object_id` unique index on the table `asset_object`.
|
||||
pub fn asset_object_id(&self) -> AssetObjectAssetObjectIdUnique<'ctx> {
|
||||
AssetObjectAssetObjectIdUnique {
|
||||
imp: self.imp.get_unique_constraint::<String>("asset_object_id"),
|
||||
phantom: std::marker::PhantomData,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<'ctx> AssetObjectAssetObjectIdUnique<'ctx> {
|
||||
/// Find the subscribed row whose `asset_object_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<AssetObject> {
|
||||
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::<AssetObject>("asset_object");
|
||||
_table.add_unique_constraint::<String>("asset_object_id", |row| &row.asset_object_id);
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
pub(super) fn parse_table_update(
|
||||
raw_updates: __ws::v2::TableUpdate,
|
||||
) -> __sdk::Result<__sdk::TableUpdate<AssetObject>> {
|
||||
__sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| {
|
||||
__sdk::InternalError::failed_parse(
|
||||
"TableUpdate<AssetObject>",
|
||||
"TableUpdate",
|
||||
).with_cause(e).into()
|
||||
})
|
||||
}
|
||||
|
||||
#[allow(non_camel_case_types)]
|
||||
/// Extension trait for query builder access to the table `AssetObject`.
|
||||
///
|
||||
/// Implemented for [`__sdk::QueryTableAccessor`].
|
||||
pub trait asset_objectQueryTableAccess {
|
||||
#[allow(non_snake_case)]
|
||||
/// Get a query builder for the table `AssetObject`.
|
||||
fn asset_object(&self) -> __sdk::__query_builder::Table<AssetObject>;
|
||||
}
|
||||
|
||||
impl asset_objectQueryTableAccess for __sdk::QueryTableAccessor {
|
||||
fn asset_object(&self) -> __sdk::__query_builder::Table<AssetObject> {
|
||||
__sdk::__query_builder::Table::new("asset_object")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,163 +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::auth_identity_type::AuthIdentity;
|
||||
|
||||
/// Table handle for the table `auth_identity`.
|
||||
///
|
||||
/// Obtain a handle from the [`AuthIdentityTableAccess::auth_identity`] method on [`super::RemoteTables`],
|
||||
/// like `ctx.db.auth_identity()`.
|
||||
///
|
||||
/// Users are encouraged not to explicitly reference this type,
|
||||
/// but to directly chain method calls,
|
||||
/// like `ctx.db.auth_identity().on_insert(...)`.
|
||||
pub struct AuthIdentityTableHandle<'ctx> {
|
||||
imp: __sdk::TableHandle<AuthIdentity>,
|
||||
ctx: std::marker::PhantomData<&'ctx super::RemoteTables>,
|
||||
}
|
||||
|
||||
#[allow(non_camel_case_types)]
|
||||
/// Extension trait for access to the table `auth_identity`.
|
||||
///
|
||||
/// Implemented for [`super::RemoteTables`].
|
||||
pub trait AuthIdentityTableAccess {
|
||||
#[allow(non_snake_case)]
|
||||
/// Obtain a [`AuthIdentityTableHandle`], which mediates access to the table `auth_identity`.
|
||||
fn auth_identity(&self) -> AuthIdentityTableHandle<'_>;
|
||||
}
|
||||
|
||||
impl AuthIdentityTableAccess for super::RemoteTables {
|
||||
fn auth_identity(&self) -> AuthIdentityTableHandle<'_> {
|
||||
AuthIdentityTableHandle {
|
||||
imp: self.imp.get_table::<AuthIdentity>("auth_identity"),
|
||||
ctx: std::marker::PhantomData,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct AuthIdentityInsertCallbackId(__sdk::CallbackId);
|
||||
pub struct AuthIdentityDeleteCallbackId(__sdk::CallbackId);
|
||||
|
||||
impl<'ctx> __sdk::Table for AuthIdentityTableHandle<'ctx> {
|
||||
type Row = AuthIdentity;
|
||||
type EventContext = super::EventContext;
|
||||
|
||||
fn count(&self) -> u64 { self.imp.count() }
|
||||
fn iter(&self) -> impl Iterator<Item = AuthIdentity> + '_ { self.imp.iter() }
|
||||
|
||||
type InsertCallbackId = AuthIdentityInsertCallbackId;
|
||||
|
||||
fn on_insert(
|
||||
&self,
|
||||
callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static,
|
||||
) -> AuthIdentityInsertCallbackId {
|
||||
AuthIdentityInsertCallbackId(self.imp.on_insert(Box::new(callback)))
|
||||
}
|
||||
|
||||
fn remove_on_insert(&self, callback: AuthIdentityInsertCallbackId) {
|
||||
self.imp.remove_on_insert(callback.0)
|
||||
}
|
||||
|
||||
type DeleteCallbackId = AuthIdentityDeleteCallbackId;
|
||||
|
||||
fn on_delete(
|
||||
&self,
|
||||
callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static,
|
||||
) -> AuthIdentityDeleteCallbackId {
|
||||
AuthIdentityDeleteCallbackId(self.imp.on_delete(Box::new(callback)))
|
||||
}
|
||||
|
||||
fn remove_on_delete(&self, callback: AuthIdentityDeleteCallbackId) {
|
||||
self.imp.remove_on_delete(callback.0)
|
||||
}
|
||||
}
|
||||
|
||||
pub struct AuthIdentityUpdateCallbackId(__sdk::CallbackId);
|
||||
|
||||
impl<'ctx> __sdk::TableWithPrimaryKey for AuthIdentityTableHandle<'ctx> {
|
||||
type UpdateCallbackId = AuthIdentityUpdateCallbackId;
|
||||
|
||||
fn on_update(
|
||||
&self,
|
||||
callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static,
|
||||
) -> AuthIdentityUpdateCallbackId {
|
||||
AuthIdentityUpdateCallbackId(self.imp.on_update(Box::new(callback)))
|
||||
}
|
||||
|
||||
fn remove_on_update(&self, callback: AuthIdentityUpdateCallbackId) {
|
||||
self.imp.remove_on_update(callback.0)
|
||||
}
|
||||
}
|
||||
|
||||
/// Access to the `identity_id` unique index on the table `auth_identity`,
|
||||
/// which allows point queries on the field of the same name
|
||||
/// via the [`AuthIdentityIdentityIdUnique::find`] method.
|
||||
///
|
||||
/// Users are encouraged not to explicitly reference this type,
|
||||
/// but to directly chain method calls,
|
||||
/// like `ctx.db.auth_identity().identity_id().find(...)`.
|
||||
pub struct AuthIdentityIdentityIdUnique<'ctx> {
|
||||
imp: __sdk::UniqueConstraintHandle<AuthIdentity, String>,
|
||||
phantom: std::marker::PhantomData<&'ctx super::RemoteTables>,
|
||||
}
|
||||
|
||||
impl<'ctx> AuthIdentityTableHandle<'ctx> {
|
||||
/// Get a handle on the `identity_id` unique index on the table `auth_identity`.
|
||||
pub fn identity_id(&self) -> AuthIdentityIdentityIdUnique<'ctx> {
|
||||
AuthIdentityIdentityIdUnique {
|
||||
imp: self.imp.get_unique_constraint::<String>("identity_id"),
|
||||
phantom: std::marker::PhantomData,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<'ctx> AuthIdentityIdentityIdUnique<'ctx> {
|
||||
/// Find the subscribed row whose `identity_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<AuthIdentity> {
|
||||
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::<AuthIdentity>("auth_identity");
|
||||
_table.add_unique_constraint::<String>("identity_id", |row| &row.identity_id);
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
pub(super) fn parse_table_update(
|
||||
raw_updates: __ws::v2::TableUpdate,
|
||||
) -> __sdk::Result<__sdk::TableUpdate<AuthIdentity>> {
|
||||
__sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| {
|
||||
__sdk::InternalError::failed_parse(
|
||||
"TableUpdate<AuthIdentity>",
|
||||
"TableUpdate",
|
||||
).with_cause(e).into()
|
||||
})
|
||||
}
|
||||
|
||||
#[allow(non_camel_case_types)]
|
||||
/// Extension trait for query builder access to the table `AuthIdentity`.
|
||||
///
|
||||
/// Implemented for [`__sdk::QueryTableAccessor`].
|
||||
pub trait auth_identityQueryTableAccess {
|
||||
#[allow(non_snake_case)]
|
||||
/// Get a query builder for the table `AuthIdentity`.
|
||||
fn auth_identity(&self) -> __sdk::__query_builder::Table<AuthIdentity>;
|
||||
}
|
||||
|
||||
impl auth_identityQueryTableAccess for __sdk::QueryTableAccessor {
|
||||
fn auth_identity(&self) -> __sdk::__query_builder::Table<AuthIdentity> {
|
||||
__sdk::__query_builder::Table::new("auth_identity")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,163 +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::auth_store_snapshot_type::AuthStoreSnapshot;
|
||||
|
||||
/// Table handle for the table `auth_store_snapshot`.
|
||||
///
|
||||
/// Obtain a handle from the [`AuthStoreSnapshotTableAccess::auth_store_snapshot`] method on [`super::RemoteTables`],
|
||||
/// like `ctx.db.auth_store_snapshot()`.
|
||||
///
|
||||
/// Users are encouraged not to explicitly reference this type,
|
||||
/// but to directly chain method calls,
|
||||
/// like `ctx.db.auth_store_snapshot().on_insert(...)`.
|
||||
pub struct AuthStoreSnapshotTableHandle<'ctx> {
|
||||
imp: __sdk::TableHandle<AuthStoreSnapshot>,
|
||||
ctx: std::marker::PhantomData<&'ctx super::RemoteTables>,
|
||||
}
|
||||
|
||||
#[allow(non_camel_case_types)]
|
||||
/// Extension trait for access to the table `auth_store_snapshot`.
|
||||
///
|
||||
/// Implemented for [`super::RemoteTables`].
|
||||
pub trait AuthStoreSnapshotTableAccess {
|
||||
#[allow(non_snake_case)]
|
||||
/// Obtain a [`AuthStoreSnapshotTableHandle`], which mediates access to the table `auth_store_snapshot`.
|
||||
fn auth_store_snapshot(&self) -> AuthStoreSnapshotTableHandle<'_>;
|
||||
}
|
||||
|
||||
impl AuthStoreSnapshotTableAccess for super::RemoteTables {
|
||||
fn auth_store_snapshot(&self) -> AuthStoreSnapshotTableHandle<'_> {
|
||||
AuthStoreSnapshotTableHandle {
|
||||
imp: self.imp.get_table::<AuthStoreSnapshot>("auth_store_snapshot"),
|
||||
ctx: std::marker::PhantomData,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct AuthStoreSnapshotInsertCallbackId(__sdk::CallbackId);
|
||||
pub struct AuthStoreSnapshotDeleteCallbackId(__sdk::CallbackId);
|
||||
|
||||
impl<'ctx> __sdk::Table for AuthStoreSnapshotTableHandle<'ctx> {
|
||||
type Row = AuthStoreSnapshot;
|
||||
type EventContext = super::EventContext;
|
||||
|
||||
fn count(&self) -> u64 { self.imp.count() }
|
||||
fn iter(&self) -> impl Iterator<Item = AuthStoreSnapshot> + '_ { self.imp.iter() }
|
||||
|
||||
type InsertCallbackId = AuthStoreSnapshotInsertCallbackId;
|
||||
|
||||
fn on_insert(
|
||||
&self,
|
||||
callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static,
|
||||
) -> AuthStoreSnapshotInsertCallbackId {
|
||||
AuthStoreSnapshotInsertCallbackId(self.imp.on_insert(Box::new(callback)))
|
||||
}
|
||||
|
||||
fn remove_on_insert(&self, callback: AuthStoreSnapshotInsertCallbackId) {
|
||||
self.imp.remove_on_insert(callback.0)
|
||||
}
|
||||
|
||||
type DeleteCallbackId = AuthStoreSnapshotDeleteCallbackId;
|
||||
|
||||
fn on_delete(
|
||||
&self,
|
||||
callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static,
|
||||
) -> AuthStoreSnapshotDeleteCallbackId {
|
||||
AuthStoreSnapshotDeleteCallbackId(self.imp.on_delete(Box::new(callback)))
|
||||
}
|
||||
|
||||
fn remove_on_delete(&self, callback: AuthStoreSnapshotDeleteCallbackId) {
|
||||
self.imp.remove_on_delete(callback.0)
|
||||
}
|
||||
}
|
||||
|
||||
pub struct AuthStoreSnapshotUpdateCallbackId(__sdk::CallbackId);
|
||||
|
||||
impl<'ctx> __sdk::TableWithPrimaryKey for AuthStoreSnapshotTableHandle<'ctx> {
|
||||
type UpdateCallbackId = AuthStoreSnapshotUpdateCallbackId;
|
||||
|
||||
fn on_update(
|
||||
&self,
|
||||
callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static,
|
||||
) -> AuthStoreSnapshotUpdateCallbackId {
|
||||
AuthStoreSnapshotUpdateCallbackId(self.imp.on_update(Box::new(callback)))
|
||||
}
|
||||
|
||||
fn remove_on_update(&self, callback: AuthStoreSnapshotUpdateCallbackId) {
|
||||
self.imp.remove_on_update(callback.0)
|
||||
}
|
||||
}
|
||||
|
||||
/// Access to the `snapshot_id` unique index on the table `auth_store_snapshot`,
|
||||
/// which allows point queries on the field of the same name
|
||||
/// via the [`AuthStoreSnapshotSnapshotIdUnique::find`] method.
|
||||
///
|
||||
/// Users are encouraged not to explicitly reference this type,
|
||||
/// but to directly chain method calls,
|
||||
/// like `ctx.db.auth_store_snapshot().snapshot_id().find(...)`.
|
||||
pub struct AuthStoreSnapshotSnapshotIdUnique<'ctx> {
|
||||
imp: __sdk::UniqueConstraintHandle<AuthStoreSnapshot, String>,
|
||||
phantom: std::marker::PhantomData<&'ctx super::RemoteTables>,
|
||||
}
|
||||
|
||||
impl<'ctx> AuthStoreSnapshotTableHandle<'ctx> {
|
||||
/// Get a handle on the `snapshot_id` unique index on the table `auth_store_snapshot`.
|
||||
pub fn snapshot_id(&self) -> AuthStoreSnapshotSnapshotIdUnique<'ctx> {
|
||||
AuthStoreSnapshotSnapshotIdUnique {
|
||||
imp: self.imp.get_unique_constraint::<String>("snapshot_id"),
|
||||
phantom: std::marker::PhantomData,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<'ctx> AuthStoreSnapshotSnapshotIdUnique<'ctx> {
|
||||
/// Find the subscribed row whose `snapshot_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<AuthStoreSnapshot> {
|
||||
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::<AuthStoreSnapshot>("auth_store_snapshot");
|
||||
_table.add_unique_constraint::<String>("snapshot_id", |row| &row.snapshot_id);
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
pub(super) fn parse_table_update(
|
||||
raw_updates: __ws::v2::TableUpdate,
|
||||
) -> __sdk::Result<__sdk::TableUpdate<AuthStoreSnapshot>> {
|
||||
__sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| {
|
||||
__sdk::InternalError::failed_parse(
|
||||
"TableUpdate<AuthStoreSnapshot>",
|
||||
"TableUpdate",
|
||||
).with_cause(e).into()
|
||||
})
|
||||
}
|
||||
|
||||
#[allow(non_camel_case_types)]
|
||||
/// Extension trait for query builder access to the table `AuthStoreSnapshot`.
|
||||
///
|
||||
/// Implemented for [`__sdk::QueryTableAccessor`].
|
||||
pub trait auth_store_snapshotQueryTableAccess {
|
||||
#[allow(non_snake_case)]
|
||||
/// Get a query builder for the table `AuthStoreSnapshot`.
|
||||
fn auth_store_snapshot(&self) -> __sdk::__query_builder::Table<AuthStoreSnapshot>;
|
||||
}
|
||||
|
||||
impl auth_store_snapshotQueryTableAccess for __sdk::QueryTableAccessor {
|
||||
fn auth_store_snapshot(&self) -> __sdk::__query_builder::Table<AuthStoreSnapshot> {
|
||||
__sdk::__query_builder::Table::new("auth_store_snapshot")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,167 +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::battle_state_type::BattleState;
|
||||
use super::battle_mode_type::BattleMode;
|
||||
use super::battle_status_type::BattleStatus;
|
||||
use super::runtime_item_reward_item_snapshot_type::RuntimeItemRewardItemSnapshot;
|
||||
use super::combat_outcome_type::CombatOutcome;
|
||||
|
||||
/// Table handle for the table `battle_state`.
|
||||
///
|
||||
/// Obtain a handle from the [`BattleStateTableAccess::battle_state`] method on [`super::RemoteTables`],
|
||||
/// like `ctx.db.battle_state()`.
|
||||
///
|
||||
/// Users are encouraged not to explicitly reference this type,
|
||||
/// but to directly chain method calls,
|
||||
/// like `ctx.db.battle_state().on_insert(...)`.
|
||||
pub struct BattleStateTableHandle<'ctx> {
|
||||
imp: __sdk::TableHandle<BattleState>,
|
||||
ctx: std::marker::PhantomData<&'ctx super::RemoteTables>,
|
||||
}
|
||||
|
||||
#[allow(non_camel_case_types)]
|
||||
/// Extension trait for access to the table `battle_state`.
|
||||
///
|
||||
/// Implemented for [`super::RemoteTables`].
|
||||
pub trait BattleStateTableAccess {
|
||||
#[allow(non_snake_case)]
|
||||
/// Obtain a [`BattleStateTableHandle`], which mediates access to the table `battle_state`.
|
||||
fn battle_state(&self) -> BattleStateTableHandle<'_>;
|
||||
}
|
||||
|
||||
impl BattleStateTableAccess for super::RemoteTables {
|
||||
fn battle_state(&self) -> BattleStateTableHandle<'_> {
|
||||
BattleStateTableHandle {
|
||||
imp: self.imp.get_table::<BattleState>("battle_state"),
|
||||
ctx: std::marker::PhantomData,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct BattleStateInsertCallbackId(__sdk::CallbackId);
|
||||
pub struct BattleStateDeleteCallbackId(__sdk::CallbackId);
|
||||
|
||||
impl<'ctx> __sdk::Table for BattleStateTableHandle<'ctx> {
|
||||
type Row = BattleState;
|
||||
type EventContext = super::EventContext;
|
||||
|
||||
fn count(&self) -> u64 { self.imp.count() }
|
||||
fn iter(&self) -> impl Iterator<Item = BattleState> + '_ { self.imp.iter() }
|
||||
|
||||
type InsertCallbackId = BattleStateInsertCallbackId;
|
||||
|
||||
fn on_insert(
|
||||
&self,
|
||||
callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static,
|
||||
) -> BattleStateInsertCallbackId {
|
||||
BattleStateInsertCallbackId(self.imp.on_insert(Box::new(callback)))
|
||||
}
|
||||
|
||||
fn remove_on_insert(&self, callback: BattleStateInsertCallbackId) {
|
||||
self.imp.remove_on_insert(callback.0)
|
||||
}
|
||||
|
||||
type DeleteCallbackId = BattleStateDeleteCallbackId;
|
||||
|
||||
fn on_delete(
|
||||
&self,
|
||||
callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static,
|
||||
) -> BattleStateDeleteCallbackId {
|
||||
BattleStateDeleteCallbackId(self.imp.on_delete(Box::new(callback)))
|
||||
}
|
||||
|
||||
fn remove_on_delete(&self, callback: BattleStateDeleteCallbackId) {
|
||||
self.imp.remove_on_delete(callback.0)
|
||||
}
|
||||
}
|
||||
|
||||
pub struct BattleStateUpdateCallbackId(__sdk::CallbackId);
|
||||
|
||||
impl<'ctx> __sdk::TableWithPrimaryKey for BattleStateTableHandle<'ctx> {
|
||||
type UpdateCallbackId = BattleStateUpdateCallbackId;
|
||||
|
||||
fn on_update(
|
||||
&self,
|
||||
callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static,
|
||||
) -> BattleStateUpdateCallbackId {
|
||||
BattleStateUpdateCallbackId(self.imp.on_update(Box::new(callback)))
|
||||
}
|
||||
|
||||
fn remove_on_update(&self, callback: BattleStateUpdateCallbackId) {
|
||||
self.imp.remove_on_update(callback.0)
|
||||
}
|
||||
}
|
||||
|
||||
/// Access to the `battle_state_id` unique index on the table `battle_state`,
|
||||
/// which allows point queries on the field of the same name
|
||||
/// via the [`BattleStateBattleStateIdUnique::find`] method.
|
||||
///
|
||||
/// Users are encouraged not to explicitly reference this type,
|
||||
/// but to directly chain method calls,
|
||||
/// like `ctx.db.battle_state().battle_state_id().find(...)`.
|
||||
pub struct BattleStateBattleStateIdUnique<'ctx> {
|
||||
imp: __sdk::UniqueConstraintHandle<BattleState, String>,
|
||||
phantom: std::marker::PhantomData<&'ctx super::RemoteTables>,
|
||||
}
|
||||
|
||||
impl<'ctx> BattleStateTableHandle<'ctx> {
|
||||
/// Get a handle on the `battle_state_id` unique index on the table `battle_state`.
|
||||
pub fn battle_state_id(&self) -> BattleStateBattleStateIdUnique<'ctx> {
|
||||
BattleStateBattleStateIdUnique {
|
||||
imp: self.imp.get_unique_constraint::<String>("battle_state_id"),
|
||||
phantom: std::marker::PhantomData,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<'ctx> BattleStateBattleStateIdUnique<'ctx> {
|
||||
/// Find the subscribed row whose `battle_state_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<BattleState> {
|
||||
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::<BattleState>("battle_state");
|
||||
_table.add_unique_constraint::<String>("battle_state_id", |row| &row.battle_state_id);
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
pub(super) fn parse_table_update(
|
||||
raw_updates: __ws::v2::TableUpdate,
|
||||
) -> __sdk::Result<__sdk::TableUpdate<BattleState>> {
|
||||
__sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| {
|
||||
__sdk::InternalError::failed_parse(
|
||||
"TableUpdate<BattleState>",
|
||||
"TableUpdate",
|
||||
).with_cause(e).into()
|
||||
})
|
||||
}
|
||||
|
||||
#[allow(non_camel_case_types)]
|
||||
/// Extension trait for query builder access to the table `BattleState`.
|
||||
///
|
||||
/// Implemented for [`__sdk::QueryTableAccessor`].
|
||||
pub trait battle_stateQueryTableAccess {
|
||||
#[allow(non_snake_case)]
|
||||
/// Get a query builder for the table `BattleState`.
|
||||
fn battle_state(&self) -> __sdk::__query_builder::Table<BattleState>;
|
||||
}
|
||||
|
||||
impl battle_stateQueryTableAccess for __sdk::QueryTableAccessor {
|
||||
fn battle_state(&self) -> __sdk::__query_builder::Table<BattleState> {
|
||||
__sdk::__query_builder::Table::new("battle_state")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,165 +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::big_fish_agent_message_type::BigFishAgentMessage;
|
||||
use super::big_fish_agent_message_role_type::BigFishAgentMessageRole;
|
||||
use super::big_fish_agent_message_kind_type::BigFishAgentMessageKind;
|
||||
|
||||
/// Table handle for the table `big_fish_agent_message`.
|
||||
///
|
||||
/// Obtain a handle from the [`BigFishAgentMessageTableAccess::big_fish_agent_message`] method on [`super::RemoteTables`],
|
||||
/// like `ctx.db.big_fish_agent_message()`.
|
||||
///
|
||||
/// Users are encouraged not to explicitly reference this type,
|
||||
/// but to directly chain method calls,
|
||||
/// like `ctx.db.big_fish_agent_message().on_insert(...)`.
|
||||
pub struct BigFishAgentMessageTableHandle<'ctx> {
|
||||
imp: __sdk::TableHandle<BigFishAgentMessage>,
|
||||
ctx: std::marker::PhantomData<&'ctx super::RemoteTables>,
|
||||
}
|
||||
|
||||
#[allow(non_camel_case_types)]
|
||||
/// Extension trait for access to the table `big_fish_agent_message`.
|
||||
///
|
||||
/// Implemented for [`super::RemoteTables`].
|
||||
pub trait BigFishAgentMessageTableAccess {
|
||||
#[allow(non_snake_case)]
|
||||
/// Obtain a [`BigFishAgentMessageTableHandle`], which mediates access to the table `big_fish_agent_message`.
|
||||
fn big_fish_agent_message(&self) -> BigFishAgentMessageTableHandle<'_>;
|
||||
}
|
||||
|
||||
impl BigFishAgentMessageTableAccess for super::RemoteTables {
|
||||
fn big_fish_agent_message(&self) -> BigFishAgentMessageTableHandle<'_> {
|
||||
BigFishAgentMessageTableHandle {
|
||||
imp: self.imp.get_table::<BigFishAgentMessage>("big_fish_agent_message"),
|
||||
ctx: std::marker::PhantomData,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct BigFishAgentMessageInsertCallbackId(__sdk::CallbackId);
|
||||
pub struct BigFishAgentMessageDeleteCallbackId(__sdk::CallbackId);
|
||||
|
||||
impl<'ctx> __sdk::Table for BigFishAgentMessageTableHandle<'ctx> {
|
||||
type Row = BigFishAgentMessage;
|
||||
type EventContext = super::EventContext;
|
||||
|
||||
fn count(&self) -> u64 { self.imp.count() }
|
||||
fn iter(&self) -> impl Iterator<Item = BigFishAgentMessage> + '_ { self.imp.iter() }
|
||||
|
||||
type InsertCallbackId = BigFishAgentMessageInsertCallbackId;
|
||||
|
||||
fn on_insert(
|
||||
&self,
|
||||
callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static,
|
||||
) -> BigFishAgentMessageInsertCallbackId {
|
||||
BigFishAgentMessageInsertCallbackId(self.imp.on_insert(Box::new(callback)))
|
||||
}
|
||||
|
||||
fn remove_on_insert(&self, callback: BigFishAgentMessageInsertCallbackId) {
|
||||
self.imp.remove_on_insert(callback.0)
|
||||
}
|
||||
|
||||
type DeleteCallbackId = BigFishAgentMessageDeleteCallbackId;
|
||||
|
||||
fn on_delete(
|
||||
&self,
|
||||
callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static,
|
||||
) -> BigFishAgentMessageDeleteCallbackId {
|
||||
BigFishAgentMessageDeleteCallbackId(self.imp.on_delete(Box::new(callback)))
|
||||
}
|
||||
|
||||
fn remove_on_delete(&self, callback: BigFishAgentMessageDeleteCallbackId) {
|
||||
self.imp.remove_on_delete(callback.0)
|
||||
}
|
||||
}
|
||||
|
||||
pub struct BigFishAgentMessageUpdateCallbackId(__sdk::CallbackId);
|
||||
|
||||
impl<'ctx> __sdk::TableWithPrimaryKey for BigFishAgentMessageTableHandle<'ctx> {
|
||||
type UpdateCallbackId = BigFishAgentMessageUpdateCallbackId;
|
||||
|
||||
fn on_update(
|
||||
&self,
|
||||
callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static,
|
||||
) -> BigFishAgentMessageUpdateCallbackId {
|
||||
BigFishAgentMessageUpdateCallbackId(self.imp.on_update(Box::new(callback)))
|
||||
}
|
||||
|
||||
fn remove_on_update(&self, callback: BigFishAgentMessageUpdateCallbackId) {
|
||||
self.imp.remove_on_update(callback.0)
|
||||
}
|
||||
}
|
||||
|
||||
/// Access to the `message_id` unique index on the table `big_fish_agent_message`,
|
||||
/// which allows point queries on the field of the same name
|
||||
/// via the [`BigFishAgentMessageMessageIdUnique::find`] method.
|
||||
///
|
||||
/// Users are encouraged not to explicitly reference this type,
|
||||
/// but to directly chain method calls,
|
||||
/// like `ctx.db.big_fish_agent_message().message_id().find(...)`.
|
||||
pub struct BigFishAgentMessageMessageIdUnique<'ctx> {
|
||||
imp: __sdk::UniqueConstraintHandle<BigFishAgentMessage, String>,
|
||||
phantom: std::marker::PhantomData<&'ctx super::RemoteTables>,
|
||||
}
|
||||
|
||||
impl<'ctx> BigFishAgentMessageTableHandle<'ctx> {
|
||||
/// Get a handle on the `message_id` unique index on the table `big_fish_agent_message`.
|
||||
pub fn message_id(&self) -> BigFishAgentMessageMessageIdUnique<'ctx> {
|
||||
BigFishAgentMessageMessageIdUnique {
|
||||
imp: self.imp.get_unique_constraint::<String>("message_id"),
|
||||
phantom: std::marker::PhantomData,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<'ctx> BigFishAgentMessageMessageIdUnique<'ctx> {
|
||||
/// Find the subscribed row whose `message_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<BigFishAgentMessage> {
|
||||
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::<BigFishAgentMessage>("big_fish_agent_message");
|
||||
_table.add_unique_constraint::<String>("message_id", |row| &row.message_id);
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
pub(super) fn parse_table_update(
|
||||
raw_updates: __ws::v2::TableUpdate,
|
||||
) -> __sdk::Result<__sdk::TableUpdate<BigFishAgentMessage>> {
|
||||
__sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| {
|
||||
__sdk::InternalError::failed_parse(
|
||||
"TableUpdate<BigFishAgentMessage>",
|
||||
"TableUpdate",
|
||||
).with_cause(e).into()
|
||||
})
|
||||
}
|
||||
|
||||
#[allow(non_camel_case_types)]
|
||||
/// Extension trait for query builder access to the table `BigFishAgentMessage`.
|
||||
///
|
||||
/// Implemented for [`__sdk::QueryTableAccessor`].
|
||||
pub trait big_fish_agent_messageQueryTableAccess {
|
||||
#[allow(non_snake_case)]
|
||||
/// Get a query builder for the table `BigFishAgentMessage`.
|
||||
fn big_fish_agent_message(&self) -> __sdk::__query_builder::Table<BigFishAgentMessage>;
|
||||
}
|
||||
|
||||
impl big_fish_agent_messageQueryTableAccess for __sdk::QueryTableAccessor {
|
||||
fn big_fish_agent_message(&self) -> __sdk::__query_builder::Table<BigFishAgentMessage> {
|
||||
__sdk::__query_builder::Table::new("big_fish_agent_message")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,165 +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::big_fish_asset_slot_type::BigFishAssetSlot;
|
||||
use super::big_fish_asset_kind_type::BigFishAssetKind;
|
||||
use super::big_fish_asset_status_type::BigFishAssetStatus;
|
||||
|
||||
/// Table handle for the table `big_fish_asset_slot`.
|
||||
///
|
||||
/// Obtain a handle from the [`BigFishAssetSlotTableAccess::big_fish_asset_slot`] method on [`super::RemoteTables`],
|
||||
/// like `ctx.db.big_fish_asset_slot()`.
|
||||
///
|
||||
/// Users are encouraged not to explicitly reference this type,
|
||||
/// but to directly chain method calls,
|
||||
/// like `ctx.db.big_fish_asset_slot().on_insert(...)`.
|
||||
pub struct BigFishAssetSlotTableHandle<'ctx> {
|
||||
imp: __sdk::TableHandle<BigFishAssetSlot>,
|
||||
ctx: std::marker::PhantomData<&'ctx super::RemoteTables>,
|
||||
}
|
||||
|
||||
#[allow(non_camel_case_types)]
|
||||
/// Extension trait for access to the table `big_fish_asset_slot`.
|
||||
///
|
||||
/// Implemented for [`super::RemoteTables`].
|
||||
pub trait BigFishAssetSlotTableAccess {
|
||||
#[allow(non_snake_case)]
|
||||
/// Obtain a [`BigFishAssetSlotTableHandle`], which mediates access to the table `big_fish_asset_slot`.
|
||||
fn big_fish_asset_slot(&self) -> BigFishAssetSlotTableHandle<'_>;
|
||||
}
|
||||
|
||||
impl BigFishAssetSlotTableAccess for super::RemoteTables {
|
||||
fn big_fish_asset_slot(&self) -> BigFishAssetSlotTableHandle<'_> {
|
||||
BigFishAssetSlotTableHandle {
|
||||
imp: self.imp.get_table::<BigFishAssetSlot>("big_fish_asset_slot"),
|
||||
ctx: std::marker::PhantomData,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct BigFishAssetSlotInsertCallbackId(__sdk::CallbackId);
|
||||
pub struct BigFishAssetSlotDeleteCallbackId(__sdk::CallbackId);
|
||||
|
||||
impl<'ctx> __sdk::Table for BigFishAssetSlotTableHandle<'ctx> {
|
||||
type Row = BigFishAssetSlot;
|
||||
type EventContext = super::EventContext;
|
||||
|
||||
fn count(&self) -> u64 { self.imp.count() }
|
||||
fn iter(&self) -> impl Iterator<Item = BigFishAssetSlot> + '_ { self.imp.iter() }
|
||||
|
||||
type InsertCallbackId = BigFishAssetSlotInsertCallbackId;
|
||||
|
||||
fn on_insert(
|
||||
&self,
|
||||
callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static,
|
||||
) -> BigFishAssetSlotInsertCallbackId {
|
||||
BigFishAssetSlotInsertCallbackId(self.imp.on_insert(Box::new(callback)))
|
||||
}
|
||||
|
||||
fn remove_on_insert(&self, callback: BigFishAssetSlotInsertCallbackId) {
|
||||
self.imp.remove_on_insert(callback.0)
|
||||
}
|
||||
|
||||
type DeleteCallbackId = BigFishAssetSlotDeleteCallbackId;
|
||||
|
||||
fn on_delete(
|
||||
&self,
|
||||
callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static,
|
||||
) -> BigFishAssetSlotDeleteCallbackId {
|
||||
BigFishAssetSlotDeleteCallbackId(self.imp.on_delete(Box::new(callback)))
|
||||
}
|
||||
|
||||
fn remove_on_delete(&self, callback: BigFishAssetSlotDeleteCallbackId) {
|
||||
self.imp.remove_on_delete(callback.0)
|
||||
}
|
||||
}
|
||||
|
||||
pub struct BigFishAssetSlotUpdateCallbackId(__sdk::CallbackId);
|
||||
|
||||
impl<'ctx> __sdk::TableWithPrimaryKey for BigFishAssetSlotTableHandle<'ctx> {
|
||||
type UpdateCallbackId = BigFishAssetSlotUpdateCallbackId;
|
||||
|
||||
fn on_update(
|
||||
&self,
|
||||
callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static,
|
||||
) -> BigFishAssetSlotUpdateCallbackId {
|
||||
BigFishAssetSlotUpdateCallbackId(self.imp.on_update(Box::new(callback)))
|
||||
}
|
||||
|
||||
fn remove_on_update(&self, callback: BigFishAssetSlotUpdateCallbackId) {
|
||||
self.imp.remove_on_update(callback.0)
|
||||
}
|
||||
}
|
||||
|
||||
/// Access to the `slot_id` unique index on the table `big_fish_asset_slot`,
|
||||
/// which allows point queries on the field of the same name
|
||||
/// via the [`BigFishAssetSlotSlotIdUnique::find`] method.
|
||||
///
|
||||
/// Users are encouraged not to explicitly reference this type,
|
||||
/// but to directly chain method calls,
|
||||
/// like `ctx.db.big_fish_asset_slot().slot_id().find(...)`.
|
||||
pub struct BigFishAssetSlotSlotIdUnique<'ctx> {
|
||||
imp: __sdk::UniqueConstraintHandle<BigFishAssetSlot, String>,
|
||||
phantom: std::marker::PhantomData<&'ctx super::RemoteTables>,
|
||||
}
|
||||
|
||||
impl<'ctx> BigFishAssetSlotTableHandle<'ctx> {
|
||||
/// Get a handle on the `slot_id` unique index on the table `big_fish_asset_slot`.
|
||||
pub fn slot_id(&self) -> BigFishAssetSlotSlotIdUnique<'ctx> {
|
||||
BigFishAssetSlotSlotIdUnique {
|
||||
imp: self.imp.get_unique_constraint::<String>("slot_id"),
|
||||
phantom: std::marker::PhantomData,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<'ctx> BigFishAssetSlotSlotIdUnique<'ctx> {
|
||||
/// Find the subscribed row whose `slot_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<BigFishAssetSlot> {
|
||||
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::<BigFishAssetSlot>("big_fish_asset_slot");
|
||||
_table.add_unique_constraint::<String>("slot_id", |row| &row.slot_id);
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
pub(super) fn parse_table_update(
|
||||
raw_updates: __ws::v2::TableUpdate,
|
||||
) -> __sdk::Result<__sdk::TableUpdate<BigFishAssetSlot>> {
|
||||
__sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| {
|
||||
__sdk::InternalError::failed_parse(
|
||||
"TableUpdate<BigFishAssetSlot>",
|
||||
"TableUpdate",
|
||||
).with_cause(e).into()
|
||||
})
|
||||
}
|
||||
|
||||
#[allow(non_camel_case_types)]
|
||||
/// Extension trait for query builder access to the table `BigFishAssetSlot`.
|
||||
///
|
||||
/// Implemented for [`__sdk::QueryTableAccessor`].
|
||||
pub trait big_fish_asset_slotQueryTableAccess {
|
||||
#[allow(non_snake_case)]
|
||||
/// Get a query builder for the table `BigFishAssetSlot`.
|
||||
fn big_fish_asset_slot(&self) -> __sdk::__query_builder::Table<BigFishAssetSlot>;
|
||||
}
|
||||
|
||||
impl big_fish_asset_slotQueryTableAccess for __sdk::QueryTableAccessor {
|
||||
fn big_fish_asset_slot(&self) -> __sdk::__query_builder::Table<BigFishAssetSlot> {
|
||||
__sdk::__query_builder::Table::new("big_fish_asset_slot")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,164 +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::big_fish_creation_session_type::BigFishCreationSession;
|
||||
use super::big_fish_creation_stage_type::BigFishCreationStage;
|
||||
|
||||
/// Table handle for the table `big_fish_creation_session`.
|
||||
///
|
||||
/// Obtain a handle from the [`BigFishCreationSessionTableAccess::big_fish_creation_session`] method on [`super::RemoteTables`],
|
||||
/// like `ctx.db.big_fish_creation_session()`.
|
||||
///
|
||||
/// Users are encouraged not to explicitly reference this type,
|
||||
/// but to directly chain method calls,
|
||||
/// like `ctx.db.big_fish_creation_session().on_insert(...)`.
|
||||
pub struct BigFishCreationSessionTableHandle<'ctx> {
|
||||
imp: __sdk::TableHandle<BigFishCreationSession>,
|
||||
ctx: std::marker::PhantomData<&'ctx super::RemoteTables>,
|
||||
}
|
||||
|
||||
#[allow(non_camel_case_types)]
|
||||
/// Extension trait for access to the table `big_fish_creation_session`.
|
||||
///
|
||||
/// Implemented for [`super::RemoteTables`].
|
||||
pub trait BigFishCreationSessionTableAccess {
|
||||
#[allow(non_snake_case)]
|
||||
/// Obtain a [`BigFishCreationSessionTableHandle`], which mediates access to the table `big_fish_creation_session`.
|
||||
fn big_fish_creation_session(&self) -> BigFishCreationSessionTableHandle<'_>;
|
||||
}
|
||||
|
||||
impl BigFishCreationSessionTableAccess for super::RemoteTables {
|
||||
fn big_fish_creation_session(&self) -> BigFishCreationSessionTableHandle<'_> {
|
||||
BigFishCreationSessionTableHandle {
|
||||
imp: self.imp.get_table::<BigFishCreationSession>("big_fish_creation_session"),
|
||||
ctx: std::marker::PhantomData,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct BigFishCreationSessionInsertCallbackId(__sdk::CallbackId);
|
||||
pub struct BigFishCreationSessionDeleteCallbackId(__sdk::CallbackId);
|
||||
|
||||
impl<'ctx> __sdk::Table for BigFishCreationSessionTableHandle<'ctx> {
|
||||
type Row = BigFishCreationSession;
|
||||
type EventContext = super::EventContext;
|
||||
|
||||
fn count(&self) -> u64 { self.imp.count() }
|
||||
fn iter(&self) -> impl Iterator<Item = BigFishCreationSession> + '_ { self.imp.iter() }
|
||||
|
||||
type InsertCallbackId = BigFishCreationSessionInsertCallbackId;
|
||||
|
||||
fn on_insert(
|
||||
&self,
|
||||
callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static,
|
||||
) -> BigFishCreationSessionInsertCallbackId {
|
||||
BigFishCreationSessionInsertCallbackId(self.imp.on_insert(Box::new(callback)))
|
||||
}
|
||||
|
||||
fn remove_on_insert(&self, callback: BigFishCreationSessionInsertCallbackId) {
|
||||
self.imp.remove_on_insert(callback.0)
|
||||
}
|
||||
|
||||
type DeleteCallbackId = BigFishCreationSessionDeleteCallbackId;
|
||||
|
||||
fn on_delete(
|
||||
&self,
|
||||
callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static,
|
||||
) -> BigFishCreationSessionDeleteCallbackId {
|
||||
BigFishCreationSessionDeleteCallbackId(self.imp.on_delete(Box::new(callback)))
|
||||
}
|
||||
|
||||
fn remove_on_delete(&self, callback: BigFishCreationSessionDeleteCallbackId) {
|
||||
self.imp.remove_on_delete(callback.0)
|
||||
}
|
||||
}
|
||||
|
||||
pub struct BigFishCreationSessionUpdateCallbackId(__sdk::CallbackId);
|
||||
|
||||
impl<'ctx> __sdk::TableWithPrimaryKey for BigFishCreationSessionTableHandle<'ctx> {
|
||||
type UpdateCallbackId = BigFishCreationSessionUpdateCallbackId;
|
||||
|
||||
fn on_update(
|
||||
&self,
|
||||
callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static,
|
||||
) -> BigFishCreationSessionUpdateCallbackId {
|
||||
BigFishCreationSessionUpdateCallbackId(self.imp.on_update(Box::new(callback)))
|
||||
}
|
||||
|
||||
fn remove_on_update(&self, callback: BigFishCreationSessionUpdateCallbackId) {
|
||||
self.imp.remove_on_update(callback.0)
|
||||
}
|
||||
}
|
||||
|
||||
/// Access to the `session_id` unique index on the table `big_fish_creation_session`,
|
||||
/// which allows point queries on the field of the same name
|
||||
/// via the [`BigFishCreationSessionSessionIdUnique::find`] method.
|
||||
///
|
||||
/// Users are encouraged not to explicitly reference this type,
|
||||
/// but to directly chain method calls,
|
||||
/// like `ctx.db.big_fish_creation_session().session_id().find(...)`.
|
||||
pub struct BigFishCreationSessionSessionIdUnique<'ctx> {
|
||||
imp: __sdk::UniqueConstraintHandle<BigFishCreationSession, String>,
|
||||
phantom: std::marker::PhantomData<&'ctx super::RemoteTables>,
|
||||
}
|
||||
|
||||
impl<'ctx> BigFishCreationSessionTableHandle<'ctx> {
|
||||
/// Get a handle on the `session_id` unique index on the table `big_fish_creation_session`.
|
||||
pub fn session_id(&self) -> BigFishCreationSessionSessionIdUnique<'ctx> {
|
||||
BigFishCreationSessionSessionIdUnique {
|
||||
imp: self.imp.get_unique_constraint::<String>("session_id"),
|
||||
phantom: std::marker::PhantomData,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<'ctx> BigFishCreationSessionSessionIdUnique<'ctx> {
|
||||
/// Find the subscribed row whose `session_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<BigFishCreationSession> {
|
||||
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::<BigFishCreationSession>("big_fish_creation_session");
|
||||
_table.add_unique_constraint::<String>("session_id", |row| &row.session_id);
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
pub(super) fn parse_table_update(
|
||||
raw_updates: __ws::v2::TableUpdate,
|
||||
) -> __sdk::Result<__sdk::TableUpdate<BigFishCreationSession>> {
|
||||
__sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| {
|
||||
__sdk::InternalError::failed_parse(
|
||||
"TableUpdate<BigFishCreationSession>",
|
||||
"TableUpdate",
|
||||
).with_cause(e).into()
|
||||
})
|
||||
}
|
||||
|
||||
#[allow(non_camel_case_types)]
|
||||
/// Extension trait for query builder access to the table `BigFishCreationSession`.
|
||||
///
|
||||
/// Implemented for [`__sdk::QueryTableAccessor`].
|
||||
pub trait big_fish_creation_sessionQueryTableAccess {
|
||||
#[allow(non_snake_case)]
|
||||
/// Get a query builder for the table `BigFishCreationSession`.
|
||||
fn big_fish_creation_session(&self) -> __sdk::__query_builder::Table<BigFishCreationSession>;
|
||||
}
|
||||
|
||||
impl big_fish_creation_sessionQueryTableAccess for __sdk::QueryTableAccessor {
|
||||
fn big_fish_creation_session(&self) -> __sdk::__query_builder::Table<BigFishCreationSession> {
|
||||
__sdk::__query_builder::Table::new("big_fish_creation_session")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,164 +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::big_fish_runtime_run_type::BigFishRuntimeRun;
|
||||
use super::big_fish_run_status_type::BigFishRunStatus;
|
||||
|
||||
/// Table handle for the table `big_fish_runtime_run`.
|
||||
///
|
||||
/// Obtain a handle from the [`BigFishRuntimeRunTableAccess::big_fish_runtime_run`] method on [`super::RemoteTables`],
|
||||
/// like `ctx.db.big_fish_runtime_run()`.
|
||||
///
|
||||
/// Users are encouraged not to explicitly reference this type,
|
||||
/// but to directly chain method calls,
|
||||
/// like `ctx.db.big_fish_runtime_run().on_insert(...)`.
|
||||
pub struct BigFishRuntimeRunTableHandle<'ctx> {
|
||||
imp: __sdk::TableHandle<BigFishRuntimeRun>,
|
||||
ctx: std::marker::PhantomData<&'ctx super::RemoteTables>,
|
||||
}
|
||||
|
||||
#[allow(non_camel_case_types)]
|
||||
/// Extension trait for access to the table `big_fish_runtime_run`.
|
||||
///
|
||||
/// Implemented for [`super::RemoteTables`].
|
||||
pub trait BigFishRuntimeRunTableAccess {
|
||||
#[allow(non_snake_case)]
|
||||
/// Obtain a [`BigFishRuntimeRunTableHandle`], which mediates access to the table `big_fish_runtime_run`.
|
||||
fn big_fish_runtime_run(&self) -> BigFishRuntimeRunTableHandle<'_>;
|
||||
}
|
||||
|
||||
impl BigFishRuntimeRunTableAccess for super::RemoteTables {
|
||||
fn big_fish_runtime_run(&self) -> BigFishRuntimeRunTableHandle<'_> {
|
||||
BigFishRuntimeRunTableHandle {
|
||||
imp: self.imp.get_table::<BigFishRuntimeRun>("big_fish_runtime_run"),
|
||||
ctx: std::marker::PhantomData,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct BigFishRuntimeRunInsertCallbackId(__sdk::CallbackId);
|
||||
pub struct BigFishRuntimeRunDeleteCallbackId(__sdk::CallbackId);
|
||||
|
||||
impl<'ctx> __sdk::Table for BigFishRuntimeRunTableHandle<'ctx> {
|
||||
type Row = BigFishRuntimeRun;
|
||||
type EventContext = super::EventContext;
|
||||
|
||||
fn count(&self) -> u64 { self.imp.count() }
|
||||
fn iter(&self) -> impl Iterator<Item = BigFishRuntimeRun> + '_ { self.imp.iter() }
|
||||
|
||||
type InsertCallbackId = BigFishRuntimeRunInsertCallbackId;
|
||||
|
||||
fn on_insert(
|
||||
&self,
|
||||
callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static,
|
||||
) -> BigFishRuntimeRunInsertCallbackId {
|
||||
BigFishRuntimeRunInsertCallbackId(self.imp.on_insert(Box::new(callback)))
|
||||
}
|
||||
|
||||
fn remove_on_insert(&self, callback: BigFishRuntimeRunInsertCallbackId) {
|
||||
self.imp.remove_on_insert(callback.0)
|
||||
}
|
||||
|
||||
type DeleteCallbackId = BigFishRuntimeRunDeleteCallbackId;
|
||||
|
||||
fn on_delete(
|
||||
&self,
|
||||
callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static,
|
||||
) -> BigFishRuntimeRunDeleteCallbackId {
|
||||
BigFishRuntimeRunDeleteCallbackId(self.imp.on_delete(Box::new(callback)))
|
||||
}
|
||||
|
||||
fn remove_on_delete(&self, callback: BigFishRuntimeRunDeleteCallbackId) {
|
||||
self.imp.remove_on_delete(callback.0)
|
||||
}
|
||||
}
|
||||
|
||||
pub struct BigFishRuntimeRunUpdateCallbackId(__sdk::CallbackId);
|
||||
|
||||
impl<'ctx> __sdk::TableWithPrimaryKey for BigFishRuntimeRunTableHandle<'ctx> {
|
||||
type UpdateCallbackId = BigFishRuntimeRunUpdateCallbackId;
|
||||
|
||||
fn on_update(
|
||||
&self,
|
||||
callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static,
|
||||
) -> BigFishRuntimeRunUpdateCallbackId {
|
||||
BigFishRuntimeRunUpdateCallbackId(self.imp.on_update(Box::new(callback)))
|
||||
}
|
||||
|
||||
fn remove_on_update(&self, callback: BigFishRuntimeRunUpdateCallbackId) {
|
||||
self.imp.remove_on_update(callback.0)
|
||||
}
|
||||
}
|
||||
|
||||
/// Access to the `run_id` unique index on the table `big_fish_runtime_run`,
|
||||
/// which allows point queries on the field of the same name
|
||||
/// via the [`BigFishRuntimeRunRunIdUnique::find`] method.
|
||||
///
|
||||
/// Users are encouraged not to explicitly reference this type,
|
||||
/// but to directly chain method calls,
|
||||
/// like `ctx.db.big_fish_runtime_run().run_id().find(...)`.
|
||||
pub struct BigFishRuntimeRunRunIdUnique<'ctx> {
|
||||
imp: __sdk::UniqueConstraintHandle<BigFishRuntimeRun, String>,
|
||||
phantom: std::marker::PhantomData<&'ctx super::RemoteTables>,
|
||||
}
|
||||
|
||||
impl<'ctx> BigFishRuntimeRunTableHandle<'ctx> {
|
||||
/// Get a handle on the `run_id` unique index on the table `big_fish_runtime_run`.
|
||||
pub fn run_id(&self) -> BigFishRuntimeRunRunIdUnique<'ctx> {
|
||||
BigFishRuntimeRunRunIdUnique {
|
||||
imp: self.imp.get_unique_constraint::<String>("run_id"),
|
||||
phantom: std::marker::PhantomData,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<'ctx> BigFishRuntimeRunRunIdUnique<'ctx> {
|
||||
/// Find the subscribed row whose `run_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<BigFishRuntimeRun> {
|
||||
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::<BigFishRuntimeRun>("big_fish_runtime_run");
|
||||
_table.add_unique_constraint::<String>("run_id", |row| &row.run_id);
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
pub(super) fn parse_table_update(
|
||||
raw_updates: __ws::v2::TableUpdate,
|
||||
) -> __sdk::Result<__sdk::TableUpdate<BigFishRuntimeRun>> {
|
||||
__sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| {
|
||||
__sdk::InternalError::failed_parse(
|
||||
"TableUpdate<BigFishRuntimeRun>",
|
||||
"TableUpdate",
|
||||
).with_cause(e).into()
|
||||
})
|
||||
}
|
||||
|
||||
#[allow(non_camel_case_types)]
|
||||
/// Extension trait for query builder access to the table `BigFishRuntimeRun`.
|
||||
///
|
||||
/// Implemented for [`__sdk::QueryTableAccessor`].
|
||||
pub trait big_fish_runtime_runQueryTableAccess {
|
||||
#[allow(non_snake_case)]
|
||||
/// Get a query builder for the table `BigFishRuntimeRun`.
|
||||
fn big_fish_runtime_run(&self) -> __sdk::__query_builder::Table<BigFishRuntimeRun>;
|
||||
}
|
||||
|
||||
impl big_fish_runtime_runQueryTableAccess for __sdk::QueryTableAccessor {
|
||||
fn big_fish_runtime_run(&self) -> __sdk::__query_builder::Table<BigFishRuntimeRun> {
|
||||
__sdk::__query_builder::Table::new("big_fish_runtime_run")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,164 +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::chapter_progression_type::ChapterProgression;
|
||||
use super::chapter_pace_band_type::ChapterPaceBand;
|
||||
|
||||
/// Table handle for the table `chapter_progression`.
|
||||
///
|
||||
/// Obtain a handle from the [`ChapterProgressionTableAccess::chapter_progression`] method on [`super::RemoteTables`],
|
||||
/// like `ctx.db.chapter_progression()`.
|
||||
///
|
||||
/// Users are encouraged not to explicitly reference this type,
|
||||
/// but to directly chain method calls,
|
||||
/// like `ctx.db.chapter_progression().on_insert(...)`.
|
||||
pub struct ChapterProgressionTableHandle<'ctx> {
|
||||
imp: __sdk::TableHandle<ChapterProgression>,
|
||||
ctx: std::marker::PhantomData<&'ctx super::RemoteTables>,
|
||||
}
|
||||
|
||||
#[allow(non_camel_case_types)]
|
||||
/// Extension trait for access to the table `chapter_progression`.
|
||||
///
|
||||
/// Implemented for [`super::RemoteTables`].
|
||||
pub trait ChapterProgressionTableAccess {
|
||||
#[allow(non_snake_case)]
|
||||
/// Obtain a [`ChapterProgressionTableHandle`], which mediates access to the table `chapter_progression`.
|
||||
fn chapter_progression(&self) -> ChapterProgressionTableHandle<'_>;
|
||||
}
|
||||
|
||||
impl ChapterProgressionTableAccess for super::RemoteTables {
|
||||
fn chapter_progression(&self) -> ChapterProgressionTableHandle<'_> {
|
||||
ChapterProgressionTableHandle {
|
||||
imp: self.imp.get_table::<ChapterProgression>("chapter_progression"),
|
||||
ctx: std::marker::PhantomData,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct ChapterProgressionInsertCallbackId(__sdk::CallbackId);
|
||||
pub struct ChapterProgressionDeleteCallbackId(__sdk::CallbackId);
|
||||
|
||||
impl<'ctx> __sdk::Table for ChapterProgressionTableHandle<'ctx> {
|
||||
type Row = ChapterProgression;
|
||||
type EventContext = super::EventContext;
|
||||
|
||||
fn count(&self) -> u64 { self.imp.count() }
|
||||
fn iter(&self) -> impl Iterator<Item = ChapterProgression> + '_ { self.imp.iter() }
|
||||
|
||||
type InsertCallbackId = ChapterProgressionInsertCallbackId;
|
||||
|
||||
fn on_insert(
|
||||
&self,
|
||||
callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static,
|
||||
) -> ChapterProgressionInsertCallbackId {
|
||||
ChapterProgressionInsertCallbackId(self.imp.on_insert(Box::new(callback)))
|
||||
}
|
||||
|
||||
fn remove_on_insert(&self, callback: ChapterProgressionInsertCallbackId) {
|
||||
self.imp.remove_on_insert(callback.0)
|
||||
}
|
||||
|
||||
type DeleteCallbackId = ChapterProgressionDeleteCallbackId;
|
||||
|
||||
fn on_delete(
|
||||
&self,
|
||||
callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static,
|
||||
) -> ChapterProgressionDeleteCallbackId {
|
||||
ChapterProgressionDeleteCallbackId(self.imp.on_delete(Box::new(callback)))
|
||||
}
|
||||
|
||||
fn remove_on_delete(&self, callback: ChapterProgressionDeleteCallbackId) {
|
||||
self.imp.remove_on_delete(callback.0)
|
||||
}
|
||||
}
|
||||
|
||||
pub struct ChapterProgressionUpdateCallbackId(__sdk::CallbackId);
|
||||
|
||||
impl<'ctx> __sdk::TableWithPrimaryKey for ChapterProgressionTableHandle<'ctx> {
|
||||
type UpdateCallbackId = ChapterProgressionUpdateCallbackId;
|
||||
|
||||
fn on_update(
|
||||
&self,
|
||||
callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static,
|
||||
) -> ChapterProgressionUpdateCallbackId {
|
||||
ChapterProgressionUpdateCallbackId(self.imp.on_update(Box::new(callback)))
|
||||
}
|
||||
|
||||
fn remove_on_update(&self, callback: ChapterProgressionUpdateCallbackId) {
|
||||
self.imp.remove_on_update(callback.0)
|
||||
}
|
||||
}
|
||||
|
||||
/// Access to the `chapter_progression_id` unique index on the table `chapter_progression`,
|
||||
/// which allows point queries on the field of the same name
|
||||
/// via the [`ChapterProgressionChapterProgressionIdUnique::find`] method.
|
||||
///
|
||||
/// Users are encouraged not to explicitly reference this type,
|
||||
/// but to directly chain method calls,
|
||||
/// like `ctx.db.chapter_progression().chapter_progression_id().find(...)`.
|
||||
pub struct ChapterProgressionChapterProgressionIdUnique<'ctx> {
|
||||
imp: __sdk::UniqueConstraintHandle<ChapterProgression, String>,
|
||||
phantom: std::marker::PhantomData<&'ctx super::RemoteTables>,
|
||||
}
|
||||
|
||||
impl<'ctx> ChapterProgressionTableHandle<'ctx> {
|
||||
/// Get a handle on the `chapter_progression_id` unique index on the table `chapter_progression`.
|
||||
pub fn chapter_progression_id(&self) -> ChapterProgressionChapterProgressionIdUnique<'ctx> {
|
||||
ChapterProgressionChapterProgressionIdUnique {
|
||||
imp: self.imp.get_unique_constraint::<String>("chapter_progression_id"),
|
||||
phantom: std::marker::PhantomData,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<'ctx> ChapterProgressionChapterProgressionIdUnique<'ctx> {
|
||||
/// Find the subscribed row whose `chapter_progression_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<ChapterProgression> {
|
||||
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::<ChapterProgression>("chapter_progression");
|
||||
_table.add_unique_constraint::<String>("chapter_progression_id", |row| &row.chapter_progression_id);
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
pub(super) fn parse_table_update(
|
||||
raw_updates: __ws::v2::TableUpdate,
|
||||
) -> __sdk::Result<__sdk::TableUpdate<ChapterProgression>> {
|
||||
__sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| {
|
||||
__sdk::InternalError::failed_parse(
|
||||
"TableUpdate<ChapterProgression>",
|
||||
"TableUpdate",
|
||||
).with_cause(e).into()
|
||||
})
|
||||
}
|
||||
|
||||
#[allow(non_camel_case_types)]
|
||||
/// Extension trait for query builder access to the table `ChapterProgression`.
|
||||
///
|
||||
/// Implemented for [`__sdk::QueryTableAccessor`].
|
||||
pub trait chapter_progressionQueryTableAccess {
|
||||
#[allow(non_snake_case)]
|
||||
/// Get a query builder for the table `ChapterProgression`.
|
||||
fn chapter_progression(&self) -> __sdk::__query_builder::Table<ChapterProgression>;
|
||||
}
|
||||
|
||||
impl chapter_progressionQueryTableAccess for __sdk::QueryTableAccessor {
|
||||
fn chapter_progression(&self) -> __sdk::__query_builder::Table<ChapterProgression> {
|
||||
__sdk::__query_builder::Table::new("chapter_progression")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,165 +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::custom_world_agent_message_type::CustomWorldAgentMessage;
|
||||
use super::rpg_agent_message_role_type::RpgAgentMessageRole;
|
||||
use super::rpg_agent_message_kind_type::RpgAgentMessageKind;
|
||||
|
||||
/// Table handle for the table `custom_world_agent_message`.
|
||||
///
|
||||
/// Obtain a handle from the [`CustomWorldAgentMessageTableAccess::custom_world_agent_message`] method on [`super::RemoteTables`],
|
||||
/// like `ctx.db.custom_world_agent_message()`.
|
||||
///
|
||||
/// Users are encouraged not to explicitly reference this type,
|
||||
/// but to directly chain method calls,
|
||||
/// like `ctx.db.custom_world_agent_message().on_insert(...)`.
|
||||
pub struct CustomWorldAgentMessageTableHandle<'ctx> {
|
||||
imp: __sdk::TableHandle<CustomWorldAgentMessage>,
|
||||
ctx: std::marker::PhantomData<&'ctx super::RemoteTables>,
|
||||
}
|
||||
|
||||
#[allow(non_camel_case_types)]
|
||||
/// Extension trait for access to the table `custom_world_agent_message`.
|
||||
///
|
||||
/// Implemented for [`super::RemoteTables`].
|
||||
pub trait CustomWorldAgentMessageTableAccess {
|
||||
#[allow(non_snake_case)]
|
||||
/// Obtain a [`CustomWorldAgentMessageTableHandle`], which mediates access to the table `custom_world_agent_message`.
|
||||
fn custom_world_agent_message(&self) -> CustomWorldAgentMessageTableHandle<'_>;
|
||||
}
|
||||
|
||||
impl CustomWorldAgentMessageTableAccess for super::RemoteTables {
|
||||
fn custom_world_agent_message(&self) -> CustomWorldAgentMessageTableHandle<'_> {
|
||||
CustomWorldAgentMessageTableHandle {
|
||||
imp: self.imp.get_table::<CustomWorldAgentMessage>("custom_world_agent_message"),
|
||||
ctx: std::marker::PhantomData,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct CustomWorldAgentMessageInsertCallbackId(__sdk::CallbackId);
|
||||
pub struct CustomWorldAgentMessageDeleteCallbackId(__sdk::CallbackId);
|
||||
|
||||
impl<'ctx> __sdk::Table for CustomWorldAgentMessageTableHandle<'ctx> {
|
||||
type Row = CustomWorldAgentMessage;
|
||||
type EventContext = super::EventContext;
|
||||
|
||||
fn count(&self) -> u64 { self.imp.count() }
|
||||
fn iter(&self) -> impl Iterator<Item = CustomWorldAgentMessage> + '_ { self.imp.iter() }
|
||||
|
||||
type InsertCallbackId = CustomWorldAgentMessageInsertCallbackId;
|
||||
|
||||
fn on_insert(
|
||||
&self,
|
||||
callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static,
|
||||
) -> CustomWorldAgentMessageInsertCallbackId {
|
||||
CustomWorldAgentMessageInsertCallbackId(self.imp.on_insert(Box::new(callback)))
|
||||
}
|
||||
|
||||
fn remove_on_insert(&self, callback: CustomWorldAgentMessageInsertCallbackId) {
|
||||
self.imp.remove_on_insert(callback.0)
|
||||
}
|
||||
|
||||
type DeleteCallbackId = CustomWorldAgentMessageDeleteCallbackId;
|
||||
|
||||
fn on_delete(
|
||||
&self,
|
||||
callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static,
|
||||
) -> CustomWorldAgentMessageDeleteCallbackId {
|
||||
CustomWorldAgentMessageDeleteCallbackId(self.imp.on_delete(Box::new(callback)))
|
||||
}
|
||||
|
||||
fn remove_on_delete(&self, callback: CustomWorldAgentMessageDeleteCallbackId) {
|
||||
self.imp.remove_on_delete(callback.0)
|
||||
}
|
||||
}
|
||||
|
||||
pub struct CustomWorldAgentMessageUpdateCallbackId(__sdk::CallbackId);
|
||||
|
||||
impl<'ctx> __sdk::TableWithPrimaryKey for CustomWorldAgentMessageTableHandle<'ctx> {
|
||||
type UpdateCallbackId = CustomWorldAgentMessageUpdateCallbackId;
|
||||
|
||||
fn on_update(
|
||||
&self,
|
||||
callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static,
|
||||
) -> CustomWorldAgentMessageUpdateCallbackId {
|
||||
CustomWorldAgentMessageUpdateCallbackId(self.imp.on_update(Box::new(callback)))
|
||||
}
|
||||
|
||||
fn remove_on_update(&self, callback: CustomWorldAgentMessageUpdateCallbackId) {
|
||||
self.imp.remove_on_update(callback.0)
|
||||
}
|
||||
}
|
||||
|
||||
/// Access to the `message_id` unique index on the table `custom_world_agent_message`,
|
||||
/// which allows point queries on the field of the same name
|
||||
/// via the [`CustomWorldAgentMessageMessageIdUnique::find`] method.
|
||||
///
|
||||
/// Users are encouraged not to explicitly reference this type,
|
||||
/// but to directly chain method calls,
|
||||
/// like `ctx.db.custom_world_agent_message().message_id().find(...)`.
|
||||
pub struct CustomWorldAgentMessageMessageIdUnique<'ctx> {
|
||||
imp: __sdk::UniqueConstraintHandle<CustomWorldAgentMessage, String>,
|
||||
phantom: std::marker::PhantomData<&'ctx super::RemoteTables>,
|
||||
}
|
||||
|
||||
impl<'ctx> CustomWorldAgentMessageTableHandle<'ctx> {
|
||||
/// Get a handle on the `message_id` unique index on the table `custom_world_agent_message`.
|
||||
pub fn message_id(&self) -> CustomWorldAgentMessageMessageIdUnique<'ctx> {
|
||||
CustomWorldAgentMessageMessageIdUnique {
|
||||
imp: self.imp.get_unique_constraint::<String>("message_id"),
|
||||
phantom: std::marker::PhantomData,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<'ctx> CustomWorldAgentMessageMessageIdUnique<'ctx> {
|
||||
/// Find the subscribed row whose `message_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<CustomWorldAgentMessage> {
|
||||
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::<CustomWorldAgentMessage>("custom_world_agent_message");
|
||||
_table.add_unique_constraint::<String>("message_id", |row| &row.message_id);
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
pub(super) fn parse_table_update(
|
||||
raw_updates: __ws::v2::TableUpdate,
|
||||
) -> __sdk::Result<__sdk::TableUpdate<CustomWorldAgentMessage>> {
|
||||
__sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| {
|
||||
__sdk::InternalError::failed_parse(
|
||||
"TableUpdate<CustomWorldAgentMessage>",
|
||||
"TableUpdate",
|
||||
).with_cause(e).into()
|
||||
})
|
||||
}
|
||||
|
||||
#[allow(non_camel_case_types)]
|
||||
/// Extension trait for query builder access to the table `CustomWorldAgentMessage`.
|
||||
///
|
||||
/// Implemented for [`__sdk::QueryTableAccessor`].
|
||||
pub trait custom_world_agent_messageQueryTableAccess {
|
||||
#[allow(non_snake_case)]
|
||||
/// Get a query builder for the table `CustomWorldAgentMessage`.
|
||||
fn custom_world_agent_message(&self) -> __sdk::__query_builder::Table<CustomWorldAgentMessage>;
|
||||
}
|
||||
|
||||
impl custom_world_agent_messageQueryTableAccess for __sdk::QueryTableAccessor {
|
||||
fn custom_world_agent_message(&self) -> __sdk::__query_builder::Table<CustomWorldAgentMessage> {
|
||||
__sdk::__query_builder::Table::new("custom_world_agent_message")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,165 +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::custom_world_agent_operation_type::CustomWorldAgentOperation;
|
||||
use super::rpg_agent_operation_type_type::RpgAgentOperationType;
|
||||
use super::rpg_agent_operation_status_type::RpgAgentOperationStatus;
|
||||
|
||||
/// Table handle for the table `custom_world_agent_operation`.
|
||||
///
|
||||
/// Obtain a handle from the [`CustomWorldAgentOperationTableAccess::custom_world_agent_operation`] method on [`super::RemoteTables`],
|
||||
/// like `ctx.db.custom_world_agent_operation()`.
|
||||
///
|
||||
/// Users are encouraged not to explicitly reference this type,
|
||||
/// but to directly chain method calls,
|
||||
/// like `ctx.db.custom_world_agent_operation().on_insert(...)`.
|
||||
pub struct CustomWorldAgentOperationTableHandle<'ctx> {
|
||||
imp: __sdk::TableHandle<CustomWorldAgentOperation>,
|
||||
ctx: std::marker::PhantomData<&'ctx super::RemoteTables>,
|
||||
}
|
||||
|
||||
#[allow(non_camel_case_types)]
|
||||
/// Extension trait for access to the table `custom_world_agent_operation`.
|
||||
///
|
||||
/// Implemented for [`super::RemoteTables`].
|
||||
pub trait CustomWorldAgentOperationTableAccess {
|
||||
#[allow(non_snake_case)]
|
||||
/// Obtain a [`CustomWorldAgentOperationTableHandle`], which mediates access to the table `custom_world_agent_operation`.
|
||||
fn custom_world_agent_operation(&self) -> CustomWorldAgentOperationTableHandle<'_>;
|
||||
}
|
||||
|
||||
impl CustomWorldAgentOperationTableAccess for super::RemoteTables {
|
||||
fn custom_world_agent_operation(&self) -> CustomWorldAgentOperationTableHandle<'_> {
|
||||
CustomWorldAgentOperationTableHandle {
|
||||
imp: self.imp.get_table::<CustomWorldAgentOperation>("custom_world_agent_operation"),
|
||||
ctx: std::marker::PhantomData,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct CustomWorldAgentOperationInsertCallbackId(__sdk::CallbackId);
|
||||
pub struct CustomWorldAgentOperationDeleteCallbackId(__sdk::CallbackId);
|
||||
|
||||
impl<'ctx> __sdk::Table for CustomWorldAgentOperationTableHandle<'ctx> {
|
||||
type Row = CustomWorldAgentOperation;
|
||||
type EventContext = super::EventContext;
|
||||
|
||||
fn count(&self) -> u64 { self.imp.count() }
|
||||
fn iter(&self) -> impl Iterator<Item = CustomWorldAgentOperation> + '_ { self.imp.iter() }
|
||||
|
||||
type InsertCallbackId = CustomWorldAgentOperationInsertCallbackId;
|
||||
|
||||
fn on_insert(
|
||||
&self,
|
||||
callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static,
|
||||
) -> CustomWorldAgentOperationInsertCallbackId {
|
||||
CustomWorldAgentOperationInsertCallbackId(self.imp.on_insert(Box::new(callback)))
|
||||
}
|
||||
|
||||
fn remove_on_insert(&self, callback: CustomWorldAgentOperationInsertCallbackId) {
|
||||
self.imp.remove_on_insert(callback.0)
|
||||
}
|
||||
|
||||
type DeleteCallbackId = CustomWorldAgentOperationDeleteCallbackId;
|
||||
|
||||
fn on_delete(
|
||||
&self,
|
||||
callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static,
|
||||
) -> CustomWorldAgentOperationDeleteCallbackId {
|
||||
CustomWorldAgentOperationDeleteCallbackId(self.imp.on_delete(Box::new(callback)))
|
||||
}
|
||||
|
||||
fn remove_on_delete(&self, callback: CustomWorldAgentOperationDeleteCallbackId) {
|
||||
self.imp.remove_on_delete(callback.0)
|
||||
}
|
||||
}
|
||||
|
||||
pub struct CustomWorldAgentOperationUpdateCallbackId(__sdk::CallbackId);
|
||||
|
||||
impl<'ctx> __sdk::TableWithPrimaryKey for CustomWorldAgentOperationTableHandle<'ctx> {
|
||||
type UpdateCallbackId = CustomWorldAgentOperationUpdateCallbackId;
|
||||
|
||||
fn on_update(
|
||||
&self,
|
||||
callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static,
|
||||
) -> CustomWorldAgentOperationUpdateCallbackId {
|
||||
CustomWorldAgentOperationUpdateCallbackId(self.imp.on_update(Box::new(callback)))
|
||||
}
|
||||
|
||||
fn remove_on_update(&self, callback: CustomWorldAgentOperationUpdateCallbackId) {
|
||||
self.imp.remove_on_update(callback.0)
|
||||
}
|
||||
}
|
||||
|
||||
/// Access to the `operation_id` unique index on the table `custom_world_agent_operation`,
|
||||
/// which allows point queries on the field of the same name
|
||||
/// via the [`CustomWorldAgentOperationOperationIdUnique::find`] method.
|
||||
///
|
||||
/// Users are encouraged not to explicitly reference this type,
|
||||
/// but to directly chain method calls,
|
||||
/// like `ctx.db.custom_world_agent_operation().operation_id().find(...)`.
|
||||
pub struct CustomWorldAgentOperationOperationIdUnique<'ctx> {
|
||||
imp: __sdk::UniqueConstraintHandle<CustomWorldAgentOperation, String>,
|
||||
phantom: std::marker::PhantomData<&'ctx super::RemoteTables>,
|
||||
}
|
||||
|
||||
impl<'ctx> CustomWorldAgentOperationTableHandle<'ctx> {
|
||||
/// Get a handle on the `operation_id` unique index on the table `custom_world_agent_operation`.
|
||||
pub fn operation_id(&self) -> CustomWorldAgentOperationOperationIdUnique<'ctx> {
|
||||
CustomWorldAgentOperationOperationIdUnique {
|
||||
imp: self.imp.get_unique_constraint::<String>("operation_id"),
|
||||
phantom: std::marker::PhantomData,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<'ctx> CustomWorldAgentOperationOperationIdUnique<'ctx> {
|
||||
/// Find the subscribed row whose `operation_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<CustomWorldAgentOperation> {
|
||||
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::<CustomWorldAgentOperation>("custom_world_agent_operation");
|
||||
_table.add_unique_constraint::<String>("operation_id", |row| &row.operation_id);
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
pub(super) fn parse_table_update(
|
||||
raw_updates: __ws::v2::TableUpdate,
|
||||
) -> __sdk::Result<__sdk::TableUpdate<CustomWorldAgentOperation>> {
|
||||
__sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| {
|
||||
__sdk::InternalError::failed_parse(
|
||||
"TableUpdate<CustomWorldAgentOperation>",
|
||||
"TableUpdate",
|
||||
).with_cause(e).into()
|
||||
})
|
||||
}
|
||||
|
||||
#[allow(non_camel_case_types)]
|
||||
/// Extension trait for query builder access to the table `CustomWorldAgentOperation`.
|
||||
///
|
||||
/// Implemented for [`__sdk::QueryTableAccessor`].
|
||||
pub trait custom_world_agent_operationQueryTableAccess {
|
||||
#[allow(non_snake_case)]
|
||||
/// Get a query builder for the table `CustomWorldAgentOperation`.
|
||||
fn custom_world_agent_operation(&self) -> __sdk::__query_builder::Table<CustomWorldAgentOperation>;
|
||||
}
|
||||
|
||||
impl custom_world_agent_operationQueryTableAccess for __sdk::QueryTableAccessor {
|
||||
fn custom_world_agent_operation(&self) -> __sdk::__query_builder::Table<CustomWorldAgentOperation> {
|
||||
__sdk::__query_builder::Table::new("custom_world_agent_operation")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,164 +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::custom_world_agent_session_type::CustomWorldAgentSession;
|
||||
use super::rpg_agent_stage_type::RpgAgentStage;
|
||||
|
||||
/// Table handle for the table `custom_world_agent_session`.
|
||||
///
|
||||
/// Obtain a handle from the [`CustomWorldAgentSessionTableAccess::custom_world_agent_session`] method on [`super::RemoteTables`],
|
||||
/// like `ctx.db.custom_world_agent_session()`.
|
||||
///
|
||||
/// Users are encouraged not to explicitly reference this type,
|
||||
/// but to directly chain method calls,
|
||||
/// like `ctx.db.custom_world_agent_session().on_insert(...)`.
|
||||
pub struct CustomWorldAgentSessionTableHandle<'ctx> {
|
||||
imp: __sdk::TableHandle<CustomWorldAgentSession>,
|
||||
ctx: std::marker::PhantomData<&'ctx super::RemoteTables>,
|
||||
}
|
||||
|
||||
#[allow(non_camel_case_types)]
|
||||
/// Extension trait for access to the table `custom_world_agent_session`.
|
||||
///
|
||||
/// Implemented for [`super::RemoteTables`].
|
||||
pub trait CustomWorldAgentSessionTableAccess {
|
||||
#[allow(non_snake_case)]
|
||||
/// Obtain a [`CustomWorldAgentSessionTableHandle`], which mediates access to the table `custom_world_agent_session`.
|
||||
fn custom_world_agent_session(&self) -> CustomWorldAgentSessionTableHandle<'_>;
|
||||
}
|
||||
|
||||
impl CustomWorldAgentSessionTableAccess for super::RemoteTables {
|
||||
fn custom_world_agent_session(&self) -> CustomWorldAgentSessionTableHandle<'_> {
|
||||
CustomWorldAgentSessionTableHandle {
|
||||
imp: self.imp.get_table::<CustomWorldAgentSession>("custom_world_agent_session"),
|
||||
ctx: std::marker::PhantomData,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct CustomWorldAgentSessionInsertCallbackId(__sdk::CallbackId);
|
||||
pub struct CustomWorldAgentSessionDeleteCallbackId(__sdk::CallbackId);
|
||||
|
||||
impl<'ctx> __sdk::Table for CustomWorldAgentSessionTableHandle<'ctx> {
|
||||
type Row = CustomWorldAgentSession;
|
||||
type EventContext = super::EventContext;
|
||||
|
||||
fn count(&self) -> u64 { self.imp.count() }
|
||||
fn iter(&self) -> impl Iterator<Item = CustomWorldAgentSession> + '_ { self.imp.iter() }
|
||||
|
||||
type InsertCallbackId = CustomWorldAgentSessionInsertCallbackId;
|
||||
|
||||
fn on_insert(
|
||||
&self,
|
||||
callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static,
|
||||
) -> CustomWorldAgentSessionInsertCallbackId {
|
||||
CustomWorldAgentSessionInsertCallbackId(self.imp.on_insert(Box::new(callback)))
|
||||
}
|
||||
|
||||
fn remove_on_insert(&self, callback: CustomWorldAgentSessionInsertCallbackId) {
|
||||
self.imp.remove_on_insert(callback.0)
|
||||
}
|
||||
|
||||
type DeleteCallbackId = CustomWorldAgentSessionDeleteCallbackId;
|
||||
|
||||
fn on_delete(
|
||||
&self,
|
||||
callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static,
|
||||
) -> CustomWorldAgentSessionDeleteCallbackId {
|
||||
CustomWorldAgentSessionDeleteCallbackId(self.imp.on_delete(Box::new(callback)))
|
||||
}
|
||||
|
||||
fn remove_on_delete(&self, callback: CustomWorldAgentSessionDeleteCallbackId) {
|
||||
self.imp.remove_on_delete(callback.0)
|
||||
}
|
||||
}
|
||||
|
||||
pub struct CustomWorldAgentSessionUpdateCallbackId(__sdk::CallbackId);
|
||||
|
||||
impl<'ctx> __sdk::TableWithPrimaryKey for CustomWorldAgentSessionTableHandle<'ctx> {
|
||||
type UpdateCallbackId = CustomWorldAgentSessionUpdateCallbackId;
|
||||
|
||||
fn on_update(
|
||||
&self,
|
||||
callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static,
|
||||
) -> CustomWorldAgentSessionUpdateCallbackId {
|
||||
CustomWorldAgentSessionUpdateCallbackId(self.imp.on_update(Box::new(callback)))
|
||||
}
|
||||
|
||||
fn remove_on_update(&self, callback: CustomWorldAgentSessionUpdateCallbackId) {
|
||||
self.imp.remove_on_update(callback.0)
|
||||
}
|
||||
}
|
||||
|
||||
/// Access to the `session_id` unique index on the table `custom_world_agent_session`,
|
||||
/// which allows point queries on the field of the same name
|
||||
/// via the [`CustomWorldAgentSessionSessionIdUnique::find`] method.
|
||||
///
|
||||
/// Users are encouraged not to explicitly reference this type,
|
||||
/// but to directly chain method calls,
|
||||
/// like `ctx.db.custom_world_agent_session().session_id().find(...)`.
|
||||
pub struct CustomWorldAgentSessionSessionIdUnique<'ctx> {
|
||||
imp: __sdk::UniqueConstraintHandle<CustomWorldAgentSession, String>,
|
||||
phantom: std::marker::PhantomData<&'ctx super::RemoteTables>,
|
||||
}
|
||||
|
||||
impl<'ctx> CustomWorldAgentSessionTableHandle<'ctx> {
|
||||
/// Get a handle on the `session_id` unique index on the table `custom_world_agent_session`.
|
||||
pub fn session_id(&self) -> CustomWorldAgentSessionSessionIdUnique<'ctx> {
|
||||
CustomWorldAgentSessionSessionIdUnique {
|
||||
imp: self.imp.get_unique_constraint::<String>("session_id"),
|
||||
phantom: std::marker::PhantomData,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<'ctx> CustomWorldAgentSessionSessionIdUnique<'ctx> {
|
||||
/// Find the subscribed row whose `session_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<CustomWorldAgentSession> {
|
||||
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::<CustomWorldAgentSession>("custom_world_agent_session");
|
||||
_table.add_unique_constraint::<String>("session_id", |row| &row.session_id);
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
pub(super) fn parse_table_update(
|
||||
raw_updates: __ws::v2::TableUpdate,
|
||||
) -> __sdk::Result<__sdk::TableUpdate<CustomWorldAgentSession>> {
|
||||
__sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| {
|
||||
__sdk::InternalError::failed_parse(
|
||||
"TableUpdate<CustomWorldAgentSession>",
|
||||
"TableUpdate",
|
||||
).with_cause(e).into()
|
||||
})
|
||||
}
|
||||
|
||||
#[allow(non_camel_case_types)]
|
||||
/// Extension trait for query builder access to the table `CustomWorldAgentSession`.
|
||||
///
|
||||
/// Implemented for [`__sdk::QueryTableAccessor`].
|
||||
pub trait custom_world_agent_sessionQueryTableAccess {
|
||||
#[allow(non_snake_case)]
|
||||
/// Get a query builder for the table `CustomWorldAgentSession`.
|
||||
fn custom_world_agent_session(&self) -> __sdk::__query_builder::Table<CustomWorldAgentSession>;
|
||||
}
|
||||
|
||||
impl custom_world_agent_sessionQueryTableAccess for __sdk::QueryTableAccessor {
|
||||
fn custom_world_agent_session(&self) -> __sdk::__query_builder::Table<CustomWorldAgentSession> {
|
||||
__sdk::__query_builder::Table::new("custom_world_agent_session")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,166 +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::custom_world_draft_card_type::CustomWorldDraftCard;
|
||||
use super::rpg_agent_draft_card_kind_type::RpgAgentDraftCardKind;
|
||||
use super::rpg_agent_draft_card_status_type::RpgAgentDraftCardStatus;
|
||||
use super::custom_world_role_asset_status_type::CustomWorldRoleAssetStatus;
|
||||
|
||||
/// Table handle for the table `custom_world_draft_card`.
|
||||
///
|
||||
/// Obtain a handle from the [`CustomWorldDraftCardTableAccess::custom_world_draft_card`] method on [`super::RemoteTables`],
|
||||
/// like `ctx.db.custom_world_draft_card()`.
|
||||
///
|
||||
/// Users are encouraged not to explicitly reference this type,
|
||||
/// but to directly chain method calls,
|
||||
/// like `ctx.db.custom_world_draft_card().on_insert(...)`.
|
||||
pub struct CustomWorldDraftCardTableHandle<'ctx> {
|
||||
imp: __sdk::TableHandle<CustomWorldDraftCard>,
|
||||
ctx: std::marker::PhantomData<&'ctx super::RemoteTables>,
|
||||
}
|
||||
|
||||
#[allow(non_camel_case_types)]
|
||||
/// Extension trait for access to the table `custom_world_draft_card`.
|
||||
///
|
||||
/// Implemented for [`super::RemoteTables`].
|
||||
pub trait CustomWorldDraftCardTableAccess {
|
||||
#[allow(non_snake_case)]
|
||||
/// Obtain a [`CustomWorldDraftCardTableHandle`], which mediates access to the table `custom_world_draft_card`.
|
||||
fn custom_world_draft_card(&self) -> CustomWorldDraftCardTableHandle<'_>;
|
||||
}
|
||||
|
||||
impl CustomWorldDraftCardTableAccess for super::RemoteTables {
|
||||
fn custom_world_draft_card(&self) -> CustomWorldDraftCardTableHandle<'_> {
|
||||
CustomWorldDraftCardTableHandle {
|
||||
imp: self.imp.get_table::<CustomWorldDraftCard>("custom_world_draft_card"),
|
||||
ctx: std::marker::PhantomData,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct CustomWorldDraftCardInsertCallbackId(__sdk::CallbackId);
|
||||
pub struct CustomWorldDraftCardDeleteCallbackId(__sdk::CallbackId);
|
||||
|
||||
impl<'ctx> __sdk::Table for CustomWorldDraftCardTableHandle<'ctx> {
|
||||
type Row = CustomWorldDraftCard;
|
||||
type EventContext = super::EventContext;
|
||||
|
||||
fn count(&self) -> u64 { self.imp.count() }
|
||||
fn iter(&self) -> impl Iterator<Item = CustomWorldDraftCard> + '_ { self.imp.iter() }
|
||||
|
||||
type InsertCallbackId = CustomWorldDraftCardInsertCallbackId;
|
||||
|
||||
fn on_insert(
|
||||
&self,
|
||||
callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static,
|
||||
) -> CustomWorldDraftCardInsertCallbackId {
|
||||
CustomWorldDraftCardInsertCallbackId(self.imp.on_insert(Box::new(callback)))
|
||||
}
|
||||
|
||||
fn remove_on_insert(&self, callback: CustomWorldDraftCardInsertCallbackId) {
|
||||
self.imp.remove_on_insert(callback.0)
|
||||
}
|
||||
|
||||
type DeleteCallbackId = CustomWorldDraftCardDeleteCallbackId;
|
||||
|
||||
fn on_delete(
|
||||
&self,
|
||||
callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static,
|
||||
) -> CustomWorldDraftCardDeleteCallbackId {
|
||||
CustomWorldDraftCardDeleteCallbackId(self.imp.on_delete(Box::new(callback)))
|
||||
}
|
||||
|
||||
fn remove_on_delete(&self, callback: CustomWorldDraftCardDeleteCallbackId) {
|
||||
self.imp.remove_on_delete(callback.0)
|
||||
}
|
||||
}
|
||||
|
||||
pub struct CustomWorldDraftCardUpdateCallbackId(__sdk::CallbackId);
|
||||
|
||||
impl<'ctx> __sdk::TableWithPrimaryKey for CustomWorldDraftCardTableHandle<'ctx> {
|
||||
type UpdateCallbackId = CustomWorldDraftCardUpdateCallbackId;
|
||||
|
||||
fn on_update(
|
||||
&self,
|
||||
callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static,
|
||||
) -> CustomWorldDraftCardUpdateCallbackId {
|
||||
CustomWorldDraftCardUpdateCallbackId(self.imp.on_update(Box::new(callback)))
|
||||
}
|
||||
|
||||
fn remove_on_update(&self, callback: CustomWorldDraftCardUpdateCallbackId) {
|
||||
self.imp.remove_on_update(callback.0)
|
||||
}
|
||||
}
|
||||
|
||||
/// Access to the `card_id` unique index on the table `custom_world_draft_card`,
|
||||
/// which allows point queries on the field of the same name
|
||||
/// via the [`CustomWorldDraftCardCardIdUnique::find`] method.
|
||||
///
|
||||
/// Users are encouraged not to explicitly reference this type,
|
||||
/// but to directly chain method calls,
|
||||
/// like `ctx.db.custom_world_draft_card().card_id().find(...)`.
|
||||
pub struct CustomWorldDraftCardCardIdUnique<'ctx> {
|
||||
imp: __sdk::UniqueConstraintHandle<CustomWorldDraftCard, String>,
|
||||
phantom: std::marker::PhantomData<&'ctx super::RemoteTables>,
|
||||
}
|
||||
|
||||
impl<'ctx> CustomWorldDraftCardTableHandle<'ctx> {
|
||||
/// Get a handle on the `card_id` unique index on the table `custom_world_draft_card`.
|
||||
pub fn card_id(&self) -> CustomWorldDraftCardCardIdUnique<'ctx> {
|
||||
CustomWorldDraftCardCardIdUnique {
|
||||
imp: self.imp.get_unique_constraint::<String>("card_id"),
|
||||
phantom: std::marker::PhantomData,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<'ctx> CustomWorldDraftCardCardIdUnique<'ctx> {
|
||||
/// Find the subscribed row whose `card_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<CustomWorldDraftCard> {
|
||||
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::<CustomWorldDraftCard>("custom_world_draft_card");
|
||||
_table.add_unique_constraint::<String>("card_id", |row| &row.card_id);
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
pub(super) fn parse_table_update(
|
||||
raw_updates: __ws::v2::TableUpdate,
|
||||
) -> __sdk::Result<__sdk::TableUpdate<CustomWorldDraftCard>> {
|
||||
__sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| {
|
||||
__sdk::InternalError::failed_parse(
|
||||
"TableUpdate<CustomWorldDraftCard>",
|
||||
"TableUpdate",
|
||||
).with_cause(e).into()
|
||||
})
|
||||
}
|
||||
|
||||
#[allow(non_camel_case_types)]
|
||||
/// Extension trait for query builder access to the table `CustomWorldDraftCard`.
|
||||
///
|
||||
/// Implemented for [`__sdk::QueryTableAccessor`].
|
||||
pub trait custom_world_draft_cardQueryTableAccess {
|
||||
#[allow(non_snake_case)]
|
||||
/// Get a query builder for the table `CustomWorldDraftCard`.
|
||||
fn custom_world_draft_card(&self) -> __sdk::__query_builder::Table<CustomWorldDraftCard>;
|
||||
}
|
||||
|
||||
impl custom_world_draft_cardQueryTableAccess for __sdk::QueryTableAccessor {
|
||||
fn custom_world_draft_card(&self) -> __sdk::__query_builder::Table<CustomWorldDraftCard> {
|
||||
__sdk::__query_builder::Table::new("custom_world_draft_card")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,165 +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::custom_world_profile_type::CustomWorldProfile;
|
||||
use super::custom_world_theme_mode_type::CustomWorldThemeMode;
|
||||
use super::custom_world_publication_status_type::CustomWorldPublicationStatus;
|
||||
|
||||
/// Table handle for the table `custom_world_profile`.
|
||||
///
|
||||
/// Obtain a handle from the [`CustomWorldProfileTableAccess::custom_world_profile`] method on [`super::RemoteTables`],
|
||||
/// like `ctx.db.custom_world_profile()`.
|
||||
///
|
||||
/// Users are encouraged not to explicitly reference this type,
|
||||
/// but to directly chain method calls,
|
||||
/// like `ctx.db.custom_world_profile().on_insert(...)`.
|
||||
pub struct CustomWorldProfileTableHandle<'ctx> {
|
||||
imp: __sdk::TableHandle<CustomWorldProfile>,
|
||||
ctx: std::marker::PhantomData<&'ctx super::RemoteTables>,
|
||||
}
|
||||
|
||||
#[allow(non_camel_case_types)]
|
||||
/// Extension trait for access to the table `custom_world_profile`.
|
||||
///
|
||||
/// Implemented for [`super::RemoteTables`].
|
||||
pub trait CustomWorldProfileTableAccess {
|
||||
#[allow(non_snake_case)]
|
||||
/// Obtain a [`CustomWorldProfileTableHandle`], which mediates access to the table `custom_world_profile`.
|
||||
fn custom_world_profile(&self) -> CustomWorldProfileTableHandle<'_>;
|
||||
}
|
||||
|
||||
impl CustomWorldProfileTableAccess for super::RemoteTables {
|
||||
fn custom_world_profile(&self) -> CustomWorldProfileTableHandle<'_> {
|
||||
CustomWorldProfileTableHandle {
|
||||
imp: self.imp.get_table::<CustomWorldProfile>("custom_world_profile"),
|
||||
ctx: std::marker::PhantomData,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct CustomWorldProfileInsertCallbackId(__sdk::CallbackId);
|
||||
pub struct CustomWorldProfileDeleteCallbackId(__sdk::CallbackId);
|
||||
|
||||
impl<'ctx> __sdk::Table for CustomWorldProfileTableHandle<'ctx> {
|
||||
type Row = CustomWorldProfile;
|
||||
type EventContext = super::EventContext;
|
||||
|
||||
fn count(&self) -> u64 { self.imp.count() }
|
||||
fn iter(&self) -> impl Iterator<Item = CustomWorldProfile> + '_ { self.imp.iter() }
|
||||
|
||||
type InsertCallbackId = CustomWorldProfileInsertCallbackId;
|
||||
|
||||
fn on_insert(
|
||||
&self,
|
||||
callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static,
|
||||
) -> CustomWorldProfileInsertCallbackId {
|
||||
CustomWorldProfileInsertCallbackId(self.imp.on_insert(Box::new(callback)))
|
||||
}
|
||||
|
||||
fn remove_on_insert(&self, callback: CustomWorldProfileInsertCallbackId) {
|
||||
self.imp.remove_on_insert(callback.0)
|
||||
}
|
||||
|
||||
type DeleteCallbackId = CustomWorldProfileDeleteCallbackId;
|
||||
|
||||
fn on_delete(
|
||||
&self,
|
||||
callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static,
|
||||
) -> CustomWorldProfileDeleteCallbackId {
|
||||
CustomWorldProfileDeleteCallbackId(self.imp.on_delete(Box::new(callback)))
|
||||
}
|
||||
|
||||
fn remove_on_delete(&self, callback: CustomWorldProfileDeleteCallbackId) {
|
||||
self.imp.remove_on_delete(callback.0)
|
||||
}
|
||||
}
|
||||
|
||||
pub struct CustomWorldProfileUpdateCallbackId(__sdk::CallbackId);
|
||||
|
||||
impl<'ctx> __sdk::TableWithPrimaryKey for CustomWorldProfileTableHandle<'ctx> {
|
||||
type UpdateCallbackId = CustomWorldProfileUpdateCallbackId;
|
||||
|
||||
fn on_update(
|
||||
&self,
|
||||
callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static,
|
||||
) -> CustomWorldProfileUpdateCallbackId {
|
||||
CustomWorldProfileUpdateCallbackId(self.imp.on_update(Box::new(callback)))
|
||||
}
|
||||
|
||||
fn remove_on_update(&self, callback: CustomWorldProfileUpdateCallbackId) {
|
||||
self.imp.remove_on_update(callback.0)
|
||||
}
|
||||
}
|
||||
|
||||
/// Access to the `profile_id` unique index on the table `custom_world_profile`,
|
||||
/// which allows point queries on the field of the same name
|
||||
/// via the [`CustomWorldProfileProfileIdUnique::find`] method.
|
||||
///
|
||||
/// Users are encouraged not to explicitly reference this type,
|
||||
/// but to directly chain method calls,
|
||||
/// like `ctx.db.custom_world_profile().profile_id().find(...)`.
|
||||
pub struct CustomWorldProfileProfileIdUnique<'ctx> {
|
||||
imp: __sdk::UniqueConstraintHandle<CustomWorldProfile, String>,
|
||||
phantom: std::marker::PhantomData<&'ctx super::RemoteTables>,
|
||||
}
|
||||
|
||||
impl<'ctx> CustomWorldProfileTableHandle<'ctx> {
|
||||
/// Get a handle on the `profile_id` unique index on the table `custom_world_profile`.
|
||||
pub fn profile_id(&self) -> CustomWorldProfileProfileIdUnique<'ctx> {
|
||||
CustomWorldProfileProfileIdUnique {
|
||||
imp: self.imp.get_unique_constraint::<String>("profile_id"),
|
||||
phantom: std::marker::PhantomData,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<'ctx> CustomWorldProfileProfileIdUnique<'ctx> {
|
||||
/// Find the subscribed row whose `profile_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<CustomWorldProfile> {
|
||||
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::<CustomWorldProfile>("custom_world_profile");
|
||||
_table.add_unique_constraint::<String>("profile_id", |row| &row.profile_id);
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
pub(super) fn parse_table_update(
|
||||
raw_updates: __ws::v2::TableUpdate,
|
||||
) -> __sdk::Result<__sdk::TableUpdate<CustomWorldProfile>> {
|
||||
__sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| {
|
||||
__sdk::InternalError::failed_parse(
|
||||
"TableUpdate<CustomWorldProfile>",
|
||||
"TableUpdate",
|
||||
).with_cause(e).into()
|
||||
})
|
||||
}
|
||||
|
||||
#[allow(non_camel_case_types)]
|
||||
/// Extension trait for query builder access to the table `CustomWorldProfile`.
|
||||
///
|
||||
/// Implemented for [`__sdk::QueryTableAccessor`].
|
||||
pub trait custom_world_profileQueryTableAccess {
|
||||
#[allow(non_snake_case)]
|
||||
/// Get a query builder for the table `CustomWorldProfile`.
|
||||
fn custom_world_profile(&self) -> __sdk::__query_builder::Table<CustomWorldProfile>;
|
||||
}
|
||||
|
||||
impl custom_world_profileQueryTableAccess for __sdk::QueryTableAccessor {
|
||||
fn custom_world_profile(&self) -> __sdk::__query_builder::Table<CustomWorldProfile> {
|
||||
__sdk::__query_builder::Table::new("custom_world_profile")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,165 +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::custom_world_session_type::CustomWorldSession;
|
||||
use super::custom_world_generation_mode_type::CustomWorldGenerationMode;
|
||||
use super::custom_world_session_status_type::CustomWorldSessionStatus;
|
||||
|
||||
/// Table handle for the table `custom_world_session`.
|
||||
///
|
||||
/// Obtain a handle from the [`CustomWorldSessionTableAccess::custom_world_session`] method on [`super::RemoteTables`],
|
||||
/// like `ctx.db.custom_world_session()`.
|
||||
///
|
||||
/// Users are encouraged not to explicitly reference this type,
|
||||
/// but to directly chain method calls,
|
||||
/// like `ctx.db.custom_world_session().on_insert(...)`.
|
||||
pub struct CustomWorldSessionTableHandle<'ctx> {
|
||||
imp: __sdk::TableHandle<CustomWorldSession>,
|
||||
ctx: std::marker::PhantomData<&'ctx super::RemoteTables>,
|
||||
}
|
||||
|
||||
#[allow(non_camel_case_types)]
|
||||
/// Extension trait for access to the table `custom_world_session`.
|
||||
///
|
||||
/// Implemented for [`super::RemoteTables`].
|
||||
pub trait CustomWorldSessionTableAccess {
|
||||
#[allow(non_snake_case)]
|
||||
/// Obtain a [`CustomWorldSessionTableHandle`], which mediates access to the table `custom_world_session`.
|
||||
fn custom_world_session(&self) -> CustomWorldSessionTableHandle<'_>;
|
||||
}
|
||||
|
||||
impl CustomWorldSessionTableAccess for super::RemoteTables {
|
||||
fn custom_world_session(&self) -> CustomWorldSessionTableHandle<'_> {
|
||||
CustomWorldSessionTableHandle {
|
||||
imp: self.imp.get_table::<CustomWorldSession>("custom_world_session"),
|
||||
ctx: std::marker::PhantomData,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct CustomWorldSessionInsertCallbackId(__sdk::CallbackId);
|
||||
pub struct CustomWorldSessionDeleteCallbackId(__sdk::CallbackId);
|
||||
|
||||
impl<'ctx> __sdk::Table for CustomWorldSessionTableHandle<'ctx> {
|
||||
type Row = CustomWorldSession;
|
||||
type EventContext = super::EventContext;
|
||||
|
||||
fn count(&self) -> u64 { self.imp.count() }
|
||||
fn iter(&self) -> impl Iterator<Item = CustomWorldSession> + '_ { self.imp.iter() }
|
||||
|
||||
type InsertCallbackId = CustomWorldSessionInsertCallbackId;
|
||||
|
||||
fn on_insert(
|
||||
&self,
|
||||
callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static,
|
||||
) -> CustomWorldSessionInsertCallbackId {
|
||||
CustomWorldSessionInsertCallbackId(self.imp.on_insert(Box::new(callback)))
|
||||
}
|
||||
|
||||
fn remove_on_insert(&self, callback: CustomWorldSessionInsertCallbackId) {
|
||||
self.imp.remove_on_insert(callback.0)
|
||||
}
|
||||
|
||||
type DeleteCallbackId = CustomWorldSessionDeleteCallbackId;
|
||||
|
||||
fn on_delete(
|
||||
&self,
|
||||
callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static,
|
||||
) -> CustomWorldSessionDeleteCallbackId {
|
||||
CustomWorldSessionDeleteCallbackId(self.imp.on_delete(Box::new(callback)))
|
||||
}
|
||||
|
||||
fn remove_on_delete(&self, callback: CustomWorldSessionDeleteCallbackId) {
|
||||
self.imp.remove_on_delete(callback.0)
|
||||
}
|
||||
}
|
||||
|
||||
pub struct CustomWorldSessionUpdateCallbackId(__sdk::CallbackId);
|
||||
|
||||
impl<'ctx> __sdk::TableWithPrimaryKey for CustomWorldSessionTableHandle<'ctx> {
|
||||
type UpdateCallbackId = CustomWorldSessionUpdateCallbackId;
|
||||
|
||||
fn on_update(
|
||||
&self,
|
||||
callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static,
|
||||
) -> CustomWorldSessionUpdateCallbackId {
|
||||
CustomWorldSessionUpdateCallbackId(self.imp.on_update(Box::new(callback)))
|
||||
}
|
||||
|
||||
fn remove_on_update(&self, callback: CustomWorldSessionUpdateCallbackId) {
|
||||
self.imp.remove_on_update(callback.0)
|
||||
}
|
||||
}
|
||||
|
||||
/// Access to the `session_id` unique index on the table `custom_world_session`,
|
||||
/// which allows point queries on the field of the same name
|
||||
/// via the [`CustomWorldSessionSessionIdUnique::find`] method.
|
||||
///
|
||||
/// Users are encouraged not to explicitly reference this type,
|
||||
/// but to directly chain method calls,
|
||||
/// like `ctx.db.custom_world_session().session_id().find(...)`.
|
||||
pub struct CustomWorldSessionSessionIdUnique<'ctx> {
|
||||
imp: __sdk::UniqueConstraintHandle<CustomWorldSession, String>,
|
||||
phantom: std::marker::PhantomData<&'ctx super::RemoteTables>,
|
||||
}
|
||||
|
||||
impl<'ctx> CustomWorldSessionTableHandle<'ctx> {
|
||||
/// Get a handle on the `session_id` unique index on the table `custom_world_session`.
|
||||
pub fn session_id(&self) -> CustomWorldSessionSessionIdUnique<'ctx> {
|
||||
CustomWorldSessionSessionIdUnique {
|
||||
imp: self.imp.get_unique_constraint::<String>("session_id"),
|
||||
phantom: std::marker::PhantomData,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<'ctx> CustomWorldSessionSessionIdUnique<'ctx> {
|
||||
/// Find the subscribed row whose `session_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<CustomWorldSession> {
|
||||
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::<CustomWorldSession>("custom_world_session");
|
||||
_table.add_unique_constraint::<String>("session_id", |row| &row.session_id);
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
pub(super) fn parse_table_update(
|
||||
raw_updates: __ws::v2::TableUpdate,
|
||||
) -> __sdk::Result<__sdk::TableUpdate<CustomWorldSession>> {
|
||||
__sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| {
|
||||
__sdk::InternalError::failed_parse(
|
||||
"TableUpdate<CustomWorldSession>",
|
||||
"TableUpdate",
|
||||
).with_cause(e).into()
|
||||
})
|
||||
}
|
||||
|
||||
#[allow(non_camel_case_types)]
|
||||
/// Extension trait for query builder access to the table `CustomWorldSession`.
|
||||
///
|
||||
/// Implemented for [`__sdk::QueryTableAccessor`].
|
||||
pub trait custom_world_sessionQueryTableAccess {
|
||||
#[allow(non_snake_case)]
|
||||
/// Get a query builder for the table `CustomWorldSession`.
|
||||
fn custom_world_session(&self) -> __sdk::__query_builder::Table<CustomWorldSession>;
|
||||
}
|
||||
|
||||
impl custom_world_sessionQueryTableAccess for __sdk::QueryTableAccessor {
|
||||
fn custom_world_session(&self) -> __sdk::__query_builder::Table<CustomWorldSession> {
|
||||
__sdk::__query_builder::Table::new("custom_world_session")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,167 +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::inventory_slot_type::InventorySlot;
|
||||
use super::inventory_item_rarity_type::InventoryItemRarity;
|
||||
use super::inventory_equipment_slot_type::InventoryEquipmentSlot;
|
||||
use super::inventory_item_source_kind_type::InventoryItemSourceKind;
|
||||
use super::inventory_container_kind_type::InventoryContainerKind;
|
||||
|
||||
/// Table handle for the table `inventory_slot`.
|
||||
///
|
||||
/// Obtain a handle from the [`InventorySlotTableAccess::inventory_slot`] method on [`super::RemoteTables`],
|
||||
/// like `ctx.db.inventory_slot()`.
|
||||
///
|
||||
/// Users are encouraged not to explicitly reference this type,
|
||||
/// but to directly chain method calls,
|
||||
/// like `ctx.db.inventory_slot().on_insert(...)`.
|
||||
pub struct InventorySlotTableHandle<'ctx> {
|
||||
imp: __sdk::TableHandle<InventorySlot>,
|
||||
ctx: std::marker::PhantomData<&'ctx super::RemoteTables>,
|
||||
}
|
||||
|
||||
#[allow(non_camel_case_types)]
|
||||
/// Extension trait for access to the table `inventory_slot`.
|
||||
///
|
||||
/// Implemented for [`super::RemoteTables`].
|
||||
pub trait InventorySlotTableAccess {
|
||||
#[allow(non_snake_case)]
|
||||
/// Obtain a [`InventorySlotTableHandle`], which mediates access to the table `inventory_slot`.
|
||||
fn inventory_slot(&self) -> InventorySlotTableHandle<'_>;
|
||||
}
|
||||
|
||||
impl InventorySlotTableAccess for super::RemoteTables {
|
||||
fn inventory_slot(&self) -> InventorySlotTableHandle<'_> {
|
||||
InventorySlotTableHandle {
|
||||
imp: self.imp.get_table::<InventorySlot>("inventory_slot"),
|
||||
ctx: std::marker::PhantomData,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct InventorySlotInsertCallbackId(__sdk::CallbackId);
|
||||
pub struct InventorySlotDeleteCallbackId(__sdk::CallbackId);
|
||||
|
||||
impl<'ctx> __sdk::Table for InventorySlotTableHandle<'ctx> {
|
||||
type Row = InventorySlot;
|
||||
type EventContext = super::EventContext;
|
||||
|
||||
fn count(&self) -> u64 { self.imp.count() }
|
||||
fn iter(&self) -> impl Iterator<Item = InventorySlot> + '_ { self.imp.iter() }
|
||||
|
||||
type InsertCallbackId = InventorySlotInsertCallbackId;
|
||||
|
||||
fn on_insert(
|
||||
&self,
|
||||
callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static,
|
||||
) -> InventorySlotInsertCallbackId {
|
||||
InventorySlotInsertCallbackId(self.imp.on_insert(Box::new(callback)))
|
||||
}
|
||||
|
||||
fn remove_on_insert(&self, callback: InventorySlotInsertCallbackId) {
|
||||
self.imp.remove_on_insert(callback.0)
|
||||
}
|
||||
|
||||
type DeleteCallbackId = InventorySlotDeleteCallbackId;
|
||||
|
||||
fn on_delete(
|
||||
&self,
|
||||
callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static,
|
||||
) -> InventorySlotDeleteCallbackId {
|
||||
InventorySlotDeleteCallbackId(self.imp.on_delete(Box::new(callback)))
|
||||
}
|
||||
|
||||
fn remove_on_delete(&self, callback: InventorySlotDeleteCallbackId) {
|
||||
self.imp.remove_on_delete(callback.0)
|
||||
}
|
||||
}
|
||||
|
||||
pub struct InventorySlotUpdateCallbackId(__sdk::CallbackId);
|
||||
|
||||
impl<'ctx> __sdk::TableWithPrimaryKey for InventorySlotTableHandle<'ctx> {
|
||||
type UpdateCallbackId = InventorySlotUpdateCallbackId;
|
||||
|
||||
fn on_update(
|
||||
&self,
|
||||
callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static,
|
||||
) -> InventorySlotUpdateCallbackId {
|
||||
InventorySlotUpdateCallbackId(self.imp.on_update(Box::new(callback)))
|
||||
}
|
||||
|
||||
fn remove_on_update(&self, callback: InventorySlotUpdateCallbackId) {
|
||||
self.imp.remove_on_update(callback.0)
|
||||
}
|
||||
}
|
||||
|
||||
/// Access to the `slot_id` unique index on the table `inventory_slot`,
|
||||
/// which allows point queries on the field of the same name
|
||||
/// via the [`InventorySlotSlotIdUnique::find`] method.
|
||||
///
|
||||
/// Users are encouraged not to explicitly reference this type,
|
||||
/// but to directly chain method calls,
|
||||
/// like `ctx.db.inventory_slot().slot_id().find(...)`.
|
||||
pub struct InventorySlotSlotIdUnique<'ctx> {
|
||||
imp: __sdk::UniqueConstraintHandle<InventorySlot, String>,
|
||||
phantom: std::marker::PhantomData<&'ctx super::RemoteTables>,
|
||||
}
|
||||
|
||||
impl<'ctx> InventorySlotTableHandle<'ctx> {
|
||||
/// Get a handle on the `slot_id` unique index on the table `inventory_slot`.
|
||||
pub fn slot_id(&self) -> InventorySlotSlotIdUnique<'ctx> {
|
||||
InventorySlotSlotIdUnique {
|
||||
imp: self.imp.get_unique_constraint::<String>("slot_id"),
|
||||
phantom: std::marker::PhantomData,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<'ctx> InventorySlotSlotIdUnique<'ctx> {
|
||||
/// Find the subscribed row whose `slot_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<InventorySlot> {
|
||||
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::<InventorySlot>("inventory_slot");
|
||||
_table.add_unique_constraint::<String>("slot_id", |row| &row.slot_id);
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
pub(super) fn parse_table_update(
|
||||
raw_updates: __ws::v2::TableUpdate,
|
||||
) -> __sdk::Result<__sdk::TableUpdate<InventorySlot>> {
|
||||
__sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| {
|
||||
__sdk::InternalError::failed_parse(
|
||||
"TableUpdate<InventorySlot>",
|
||||
"TableUpdate",
|
||||
).with_cause(e).into()
|
||||
})
|
||||
}
|
||||
|
||||
#[allow(non_camel_case_types)]
|
||||
/// Extension trait for query builder access to the table `InventorySlot`.
|
||||
///
|
||||
/// Implemented for [`__sdk::QueryTableAccessor`].
|
||||
pub trait inventory_slotQueryTableAccess {
|
||||
#[allow(non_snake_case)]
|
||||
/// Get a query builder for the table `InventorySlot`.
|
||||
fn inventory_slot(&self) -> __sdk::__query_builder::Table<InventorySlot>;
|
||||
}
|
||||
|
||||
impl inventory_slotQueryTableAccess for __sdk::QueryTableAccessor {
|
||||
fn inventory_slot(&self) -> __sdk::__query_builder::Table<InventorySlot> {
|
||||
__sdk::__query_builder::Table::new("inventory_slot")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,165 +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::npc_state_type::NpcState;
|
||||
use super::npc_relation_state_type::NpcRelationState;
|
||||
use super::npc_stance_profile_type::NpcStanceProfile;
|
||||
|
||||
/// Table handle for the table `npc_state`.
|
||||
///
|
||||
/// Obtain a handle from the [`NpcStateTableAccess::npc_state`] method on [`super::RemoteTables`],
|
||||
/// like `ctx.db.npc_state()`.
|
||||
///
|
||||
/// Users are encouraged not to explicitly reference this type,
|
||||
/// but to directly chain method calls,
|
||||
/// like `ctx.db.npc_state().on_insert(...)`.
|
||||
pub struct NpcStateTableHandle<'ctx> {
|
||||
imp: __sdk::TableHandle<NpcState>,
|
||||
ctx: std::marker::PhantomData<&'ctx super::RemoteTables>,
|
||||
}
|
||||
|
||||
#[allow(non_camel_case_types)]
|
||||
/// Extension trait for access to the table `npc_state`.
|
||||
///
|
||||
/// Implemented for [`super::RemoteTables`].
|
||||
pub trait NpcStateTableAccess {
|
||||
#[allow(non_snake_case)]
|
||||
/// Obtain a [`NpcStateTableHandle`], which mediates access to the table `npc_state`.
|
||||
fn npc_state(&self) -> NpcStateTableHandle<'_>;
|
||||
}
|
||||
|
||||
impl NpcStateTableAccess for super::RemoteTables {
|
||||
fn npc_state(&self) -> NpcStateTableHandle<'_> {
|
||||
NpcStateTableHandle {
|
||||
imp: self.imp.get_table::<NpcState>("npc_state"),
|
||||
ctx: std::marker::PhantomData,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct NpcStateInsertCallbackId(__sdk::CallbackId);
|
||||
pub struct NpcStateDeleteCallbackId(__sdk::CallbackId);
|
||||
|
||||
impl<'ctx> __sdk::Table for NpcStateTableHandle<'ctx> {
|
||||
type Row = NpcState;
|
||||
type EventContext = super::EventContext;
|
||||
|
||||
fn count(&self) -> u64 { self.imp.count() }
|
||||
fn iter(&self) -> impl Iterator<Item = NpcState> + '_ { self.imp.iter() }
|
||||
|
||||
type InsertCallbackId = NpcStateInsertCallbackId;
|
||||
|
||||
fn on_insert(
|
||||
&self,
|
||||
callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static,
|
||||
) -> NpcStateInsertCallbackId {
|
||||
NpcStateInsertCallbackId(self.imp.on_insert(Box::new(callback)))
|
||||
}
|
||||
|
||||
fn remove_on_insert(&self, callback: NpcStateInsertCallbackId) {
|
||||
self.imp.remove_on_insert(callback.0)
|
||||
}
|
||||
|
||||
type DeleteCallbackId = NpcStateDeleteCallbackId;
|
||||
|
||||
fn on_delete(
|
||||
&self,
|
||||
callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static,
|
||||
) -> NpcStateDeleteCallbackId {
|
||||
NpcStateDeleteCallbackId(self.imp.on_delete(Box::new(callback)))
|
||||
}
|
||||
|
||||
fn remove_on_delete(&self, callback: NpcStateDeleteCallbackId) {
|
||||
self.imp.remove_on_delete(callback.0)
|
||||
}
|
||||
}
|
||||
|
||||
pub struct NpcStateUpdateCallbackId(__sdk::CallbackId);
|
||||
|
||||
impl<'ctx> __sdk::TableWithPrimaryKey for NpcStateTableHandle<'ctx> {
|
||||
type UpdateCallbackId = NpcStateUpdateCallbackId;
|
||||
|
||||
fn on_update(
|
||||
&self,
|
||||
callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static,
|
||||
) -> NpcStateUpdateCallbackId {
|
||||
NpcStateUpdateCallbackId(self.imp.on_update(Box::new(callback)))
|
||||
}
|
||||
|
||||
fn remove_on_update(&self, callback: NpcStateUpdateCallbackId) {
|
||||
self.imp.remove_on_update(callback.0)
|
||||
}
|
||||
}
|
||||
|
||||
/// Access to the `npc_state_id` unique index on the table `npc_state`,
|
||||
/// which allows point queries on the field of the same name
|
||||
/// via the [`NpcStateNpcStateIdUnique::find`] method.
|
||||
///
|
||||
/// Users are encouraged not to explicitly reference this type,
|
||||
/// but to directly chain method calls,
|
||||
/// like `ctx.db.npc_state().npc_state_id().find(...)`.
|
||||
pub struct NpcStateNpcStateIdUnique<'ctx> {
|
||||
imp: __sdk::UniqueConstraintHandle<NpcState, String>,
|
||||
phantom: std::marker::PhantomData<&'ctx super::RemoteTables>,
|
||||
}
|
||||
|
||||
impl<'ctx> NpcStateTableHandle<'ctx> {
|
||||
/// Get a handle on the `npc_state_id` unique index on the table `npc_state`.
|
||||
pub fn npc_state_id(&self) -> NpcStateNpcStateIdUnique<'ctx> {
|
||||
NpcStateNpcStateIdUnique {
|
||||
imp: self.imp.get_unique_constraint::<String>("npc_state_id"),
|
||||
phantom: std::marker::PhantomData,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<'ctx> NpcStateNpcStateIdUnique<'ctx> {
|
||||
/// Find the subscribed row whose `npc_state_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<NpcState> {
|
||||
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::<NpcState>("npc_state");
|
||||
_table.add_unique_constraint::<String>("npc_state_id", |row| &row.npc_state_id);
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
pub(super) fn parse_table_update(
|
||||
raw_updates: __ws::v2::TableUpdate,
|
||||
) -> __sdk::Result<__sdk::TableUpdate<NpcState>> {
|
||||
__sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| {
|
||||
__sdk::InternalError::failed_parse(
|
||||
"TableUpdate<NpcState>",
|
||||
"TableUpdate",
|
||||
).with_cause(e).into()
|
||||
})
|
||||
}
|
||||
|
||||
#[allow(non_camel_case_types)]
|
||||
/// Extension trait for query builder access to the table `NpcState`.
|
||||
///
|
||||
/// Implemented for [`__sdk::QueryTableAccessor`].
|
||||
pub trait npc_stateQueryTableAccess {
|
||||
#[allow(non_snake_case)]
|
||||
/// Get a query builder for the table `NpcState`.
|
||||
fn npc_state(&self) -> __sdk::__query_builder::Table<NpcState>;
|
||||
}
|
||||
|
||||
impl npc_stateQueryTableAccess for __sdk::QueryTableAccessor {
|
||||
fn npc_state(&self) -> __sdk::__query_builder::Table<NpcState> {
|
||||
__sdk::__query_builder::Table::new("npc_state")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,164 +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::player_progression_type::PlayerProgression;
|
||||
use super::player_progression_grant_source_type::PlayerProgressionGrantSource;
|
||||
|
||||
/// Table handle for the table `player_progression`.
|
||||
///
|
||||
/// Obtain a handle from the [`PlayerProgressionTableAccess::player_progression`] method on [`super::RemoteTables`],
|
||||
/// like `ctx.db.player_progression()`.
|
||||
///
|
||||
/// Users are encouraged not to explicitly reference this type,
|
||||
/// but to directly chain method calls,
|
||||
/// like `ctx.db.player_progression().on_insert(...)`.
|
||||
pub struct PlayerProgressionTableHandle<'ctx> {
|
||||
imp: __sdk::TableHandle<PlayerProgression>,
|
||||
ctx: std::marker::PhantomData<&'ctx super::RemoteTables>,
|
||||
}
|
||||
|
||||
#[allow(non_camel_case_types)]
|
||||
/// Extension trait for access to the table `player_progression`.
|
||||
///
|
||||
/// Implemented for [`super::RemoteTables`].
|
||||
pub trait PlayerProgressionTableAccess {
|
||||
#[allow(non_snake_case)]
|
||||
/// Obtain a [`PlayerProgressionTableHandle`], which mediates access to the table `player_progression`.
|
||||
fn player_progression(&self) -> PlayerProgressionTableHandle<'_>;
|
||||
}
|
||||
|
||||
impl PlayerProgressionTableAccess for super::RemoteTables {
|
||||
fn player_progression(&self) -> PlayerProgressionTableHandle<'_> {
|
||||
PlayerProgressionTableHandle {
|
||||
imp: self.imp.get_table::<PlayerProgression>("player_progression"),
|
||||
ctx: std::marker::PhantomData,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct PlayerProgressionInsertCallbackId(__sdk::CallbackId);
|
||||
pub struct PlayerProgressionDeleteCallbackId(__sdk::CallbackId);
|
||||
|
||||
impl<'ctx> __sdk::Table for PlayerProgressionTableHandle<'ctx> {
|
||||
type Row = PlayerProgression;
|
||||
type EventContext = super::EventContext;
|
||||
|
||||
fn count(&self) -> u64 { self.imp.count() }
|
||||
fn iter(&self) -> impl Iterator<Item = PlayerProgression> + '_ { self.imp.iter() }
|
||||
|
||||
type InsertCallbackId = PlayerProgressionInsertCallbackId;
|
||||
|
||||
fn on_insert(
|
||||
&self,
|
||||
callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static,
|
||||
) -> PlayerProgressionInsertCallbackId {
|
||||
PlayerProgressionInsertCallbackId(self.imp.on_insert(Box::new(callback)))
|
||||
}
|
||||
|
||||
fn remove_on_insert(&self, callback: PlayerProgressionInsertCallbackId) {
|
||||
self.imp.remove_on_insert(callback.0)
|
||||
}
|
||||
|
||||
type DeleteCallbackId = PlayerProgressionDeleteCallbackId;
|
||||
|
||||
fn on_delete(
|
||||
&self,
|
||||
callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static,
|
||||
) -> PlayerProgressionDeleteCallbackId {
|
||||
PlayerProgressionDeleteCallbackId(self.imp.on_delete(Box::new(callback)))
|
||||
}
|
||||
|
||||
fn remove_on_delete(&self, callback: PlayerProgressionDeleteCallbackId) {
|
||||
self.imp.remove_on_delete(callback.0)
|
||||
}
|
||||
}
|
||||
|
||||
pub struct PlayerProgressionUpdateCallbackId(__sdk::CallbackId);
|
||||
|
||||
impl<'ctx> __sdk::TableWithPrimaryKey for PlayerProgressionTableHandle<'ctx> {
|
||||
type UpdateCallbackId = PlayerProgressionUpdateCallbackId;
|
||||
|
||||
fn on_update(
|
||||
&self,
|
||||
callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static,
|
||||
) -> PlayerProgressionUpdateCallbackId {
|
||||
PlayerProgressionUpdateCallbackId(self.imp.on_update(Box::new(callback)))
|
||||
}
|
||||
|
||||
fn remove_on_update(&self, callback: PlayerProgressionUpdateCallbackId) {
|
||||
self.imp.remove_on_update(callback.0)
|
||||
}
|
||||
}
|
||||
|
||||
/// Access to the `user_id` unique index on the table `player_progression`,
|
||||
/// which allows point queries on the field of the same name
|
||||
/// via the [`PlayerProgressionUserIdUnique::find`] method.
|
||||
///
|
||||
/// Users are encouraged not to explicitly reference this type,
|
||||
/// but to directly chain method calls,
|
||||
/// like `ctx.db.player_progression().user_id().find(...)`.
|
||||
pub struct PlayerProgressionUserIdUnique<'ctx> {
|
||||
imp: __sdk::UniqueConstraintHandle<PlayerProgression, String>,
|
||||
phantom: std::marker::PhantomData<&'ctx super::RemoteTables>,
|
||||
}
|
||||
|
||||
impl<'ctx> PlayerProgressionTableHandle<'ctx> {
|
||||
/// Get a handle on the `user_id` unique index on the table `player_progression`.
|
||||
pub fn user_id(&self) -> PlayerProgressionUserIdUnique<'ctx> {
|
||||
PlayerProgressionUserIdUnique {
|
||||
imp: self.imp.get_unique_constraint::<String>("user_id"),
|
||||
phantom: std::marker::PhantomData,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<'ctx> PlayerProgressionUserIdUnique<'ctx> {
|
||||
/// Find the subscribed row whose `user_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<PlayerProgression> {
|
||||
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::<PlayerProgression>("player_progression");
|
||||
_table.add_unique_constraint::<String>("user_id", |row| &row.user_id);
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
pub(super) fn parse_table_update(
|
||||
raw_updates: __ws::v2::TableUpdate,
|
||||
) -> __sdk::Result<__sdk::TableUpdate<PlayerProgression>> {
|
||||
__sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| {
|
||||
__sdk::InternalError::failed_parse(
|
||||
"TableUpdate<PlayerProgression>",
|
||||
"TableUpdate",
|
||||
).with_cause(e).into()
|
||||
})
|
||||
}
|
||||
|
||||
#[allow(non_camel_case_types)]
|
||||
/// Extension trait for query builder access to the table `PlayerProgression`.
|
||||
///
|
||||
/// Implemented for [`__sdk::QueryTableAccessor`].
|
||||
pub trait player_progressionQueryTableAccess {
|
||||
#[allow(non_snake_case)]
|
||||
/// Get a query builder for the table `PlayerProgression`.
|
||||
fn player_progression(&self) -> __sdk::__query_builder::Table<PlayerProgression>;
|
||||
}
|
||||
|
||||
impl player_progressionQueryTableAccess for __sdk::QueryTableAccessor {
|
||||
fn player_progression(&self) -> __sdk::__query_builder::Table<PlayerProgression> {
|
||||
__sdk::__query_builder::Table::new("player_progression")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,163 +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::profile_dashboard_state_type::ProfileDashboardState;
|
||||
|
||||
/// Table handle for the table `profile_dashboard_state`.
|
||||
///
|
||||
/// Obtain a handle from the [`ProfileDashboardStateTableAccess::profile_dashboard_state`] method on [`super::RemoteTables`],
|
||||
/// like `ctx.db.profile_dashboard_state()`.
|
||||
///
|
||||
/// Users are encouraged not to explicitly reference this type,
|
||||
/// but to directly chain method calls,
|
||||
/// like `ctx.db.profile_dashboard_state().on_insert(...)`.
|
||||
pub struct ProfileDashboardStateTableHandle<'ctx> {
|
||||
imp: __sdk::TableHandle<ProfileDashboardState>,
|
||||
ctx: std::marker::PhantomData<&'ctx super::RemoteTables>,
|
||||
}
|
||||
|
||||
#[allow(non_camel_case_types)]
|
||||
/// Extension trait for access to the table `profile_dashboard_state`.
|
||||
///
|
||||
/// Implemented for [`super::RemoteTables`].
|
||||
pub trait ProfileDashboardStateTableAccess {
|
||||
#[allow(non_snake_case)]
|
||||
/// Obtain a [`ProfileDashboardStateTableHandle`], which mediates access to the table `profile_dashboard_state`.
|
||||
fn profile_dashboard_state(&self) -> ProfileDashboardStateTableHandle<'_>;
|
||||
}
|
||||
|
||||
impl ProfileDashboardStateTableAccess for super::RemoteTables {
|
||||
fn profile_dashboard_state(&self) -> ProfileDashboardStateTableHandle<'_> {
|
||||
ProfileDashboardStateTableHandle {
|
||||
imp: self.imp.get_table::<ProfileDashboardState>("profile_dashboard_state"),
|
||||
ctx: std::marker::PhantomData,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct ProfileDashboardStateInsertCallbackId(__sdk::CallbackId);
|
||||
pub struct ProfileDashboardStateDeleteCallbackId(__sdk::CallbackId);
|
||||
|
||||
impl<'ctx> __sdk::Table for ProfileDashboardStateTableHandle<'ctx> {
|
||||
type Row = ProfileDashboardState;
|
||||
type EventContext = super::EventContext;
|
||||
|
||||
fn count(&self) -> u64 { self.imp.count() }
|
||||
fn iter(&self) -> impl Iterator<Item = ProfileDashboardState> + '_ { self.imp.iter() }
|
||||
|
||||
type InsertCallbackId = ProfileDashboardStateInsertCallbackId;
|
||||
|
||||
fn on_insert(
|
||||
&self,
|
||||
callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static,
|
||||
) -> ProfileDashboardStateInsertCallbackId {
|
||||
ProfileDashboardStateInsertCallbackId(self.imp.on_insert(Box::new(callback)))
|
||||
}
|
||||
|
||||
fn remove_on_insert(&self, callback: ProfileDashboardStateInsertCallbackId) {
|
||||
self.imp.remove_on_insert(callback.0)
|
||||
}
|
||||
|
||||
type DeleteCallbackId = ProfileDashboardStateDeleteCallbackId;
|
||||
|
||||
fn on_delete(
|
||||
&self,
|
||||
callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static,
|
||||
) -> ProfileDashboardStateDeleteCallbackId {
|
||||
ProfileDashboardStateDeleteCallbackId(self.imp.on_delete(Box::new(callback)))
|
||||
}
|
||||
|
||||
fn remove_on_delete(&self, callback: ProfileDashboardStateDeleteCallbackId) {
|
||||
self.imp.remove_on_delete(callback.0)
|
||||
}
|
||||
}
|
||||
|
||||
pub struct ProfileDashboardStateUpdateCallbackId(__sdk::CallbackId);
|
||||
|
||||
impl<'ctx> __sdk::TableWithPrimaryKey for ProfileDashboardStateTableHandle<'ctx> {
|
||||
type UpdateCallbackId = ProfileDashboardStateUpdateCallbackId;
|
||||
|
||||
fn on_update(
|
||||
&self,
|
||||
callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static,
|
||||
) -> ProfileDashboardStateUpdateCallbackId {
|
||||
ProfileDashboardStateUpdateCallbackId(self.imp.on_update(Box::new(callback)))
|
||||
}
|
||||
|
||||
fn remove_on_update(&self, callback: ProfileDashboardStateUpdateCallbackId) {
|
||||
self.imp.remove_on_update(callback.0)
|
||||
}
|
||||
}
|
||||
|
||||
/// Access to the `user_id` unique index on the table `profile_dashboard_state`,
|
||||
/// which allows point queries on the field of the same name
|
||||
/// via the [`ProfileDashboardStateUserIdUnique::find`] method.
|
||||
///
|
||||
/// Users are encouraged not to explicitly reference this type,
|
||||
/// but to directly chain method calls,
|
||||
/// like `ctx.db.profile_dashboard_state().user_id().find(...)`.
|
||||
pub struct ProfileDashboardStateUserIdUnique<'ctx> {
|
||||
imp: __sdk::UniqueConstraintHandle<ProfileDashboardState, String>,
|
||||
phantom: std::marker::PhantomData<&'ctx super::RemoteTables>,
|
||||
}
|
||||
|
||||
impl<'ctx> ProfileDashboardStateTableHandle<'ctx> {
|
||||
/// Get a handle on the `user_id` unique index on the table `profile_dashboard_state`.
|
||||
pub fn user_id(&self) -> ProfileDashboardStateUserIdUnique<'ctx> {
|
||||
ProfileDashboardStateUserIdUnique {
|
||||
imp: self.imp.get_unique_constraint::<String>("user_id"),
|
||||
phantom: std::marker::PhantomData,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<'ctx> ProfileDashboardStateUserIdUnique<'ctx> {
|
||||
/// Find the subscribed row whose `user_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<ProfileDashboardState> {
|
||||
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::<ProfileDashboardState>("profile_dashboard_state");
|
||||
_table.add_unique_constraint::<String>("user_id", |row| &row.user_id);
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
pub(super) fn parse_table_update(
|
||||
raw_updates: __ws::v2::TableUpdate,
|
||||
) -> __sdk::Result<__sdk::TableUpdate<ProfileDashboardState>> {
|
||||
__sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| {
|
||||
__sdk::InternalError::failed_parse(
|
||||
"TableUpdate<ProfileDashboardState>",
|
||||
"TableUpdate",
|
||||
).with_cause(e).into()
|
||||
})
|
||||
}
|
||||
|
||||
#[allow(non_camel_case_types)]
|
||||
/// Extension trait for query builder access to the table `ProfileDashboardState`.
|
||||
///
|
||||
/// Implemented for [`__sdk::QueryTableAccessor`].
|
||||
pub trait profile_dashboard_stateQueryTableAccess {
|
||||
#[allow(non_snake_case)]
|
||||
/// Get a query builder for the table `ProfileDashboardState`.
|
||||
fn profile_dashboard_state(&self) -> __sdk::__query_builder::Table<ProfileDashboardState>;
|
||||
}
|
||||
|
||||
impl profile_dashboard_stateQueryTableAccess for __sdk::QueryTableAccessor {
|
||||
fn profile_dashboard_state(&self) -> __sdk::__query_builder::Table<ProfileDashboardState> {
|
||||
__sdk::__query_builder::Table::new("profile_dashboard_state")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,163 +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::profile_played_world_type::ProfilePlayedWorld;
|
||||
|
||||
/// Table handle for the table `profile_played_world`.
|
||||
///
|
||||
/// Obtain a handle from the [`ProfilePlayedWorldTableAccess::profile_played_world`] method on [`super::RemoteTables`],
|
||||
/// like `ctx.db.profile_played_world()`.
|
||||
///
|
||||
/// Users are encouraged not to explicitly reference this type,
|
||||
/// but to directly chain method calls,
|
||||
/// like `ctx.db.profile_played_world().on_insert(...)`.
|
||||
pub struct ProfilePlayedWorldTableHandle<'ctx> {
|
||||
imp: __sdk::TableHandle<ProfilePlayedWorld>,
|
||||
ctx: std::marker::PhantomData<&'ctx super::RemoteTables>,
|
||||
}
|
||||
|
||||
#[allow(non_camel_case_types)]
|
||||
/// Extension trait for access to the table `profile_played_world`.
|
||||
///
|
||||
/// Implemented for [`super::RemoteTables`].
|
||||
pub trait ProfilePlayedWorldTableAccess {
|
||||
#[allow(non_snake_case)]
|
||||
/// Obtain a [`ProfilePlayedWorldTableHandle`], which mediates access to the table `profile_played_world`.
|
||||
fn profile_played_world(&self) -> ProfilePlayedWorldTableHandle<'_>;
|
||||
}
|
||||
|
||||
impl ProfilePlayedWorldTableAccess for super::RemoteTables {
|
||||
fn profile_played_world(&self) -> ProfilePlayedWorldTableHandle<'_> {
|
||||
ProfilePlayedWorldTableHandle {
|
||||
imp: self.imp.get_table::<ProfilePlayedWorld>("profile_played_world"),
|
||||
ctx: std::marker::PhantomData,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct ProfilePlayedWorldInsertCallbackId(__sdk::CallbackId);
|
||||
pub struct ProfilePlayedWorldDeleteCallbackId(__sdk::CallbackId);
|
||||
|
||||
impl<'ctx> __sdk::Table for ProfilePlayedWorldTableHandle<'ctx> {
|
||||
type Row = ProfilePlayedWorld;
|
||||
type EventContext = super::EventContext;
|
||||
|
||||
fn count(&self) -> u64 { self.imp.count() }
|
||||
fn iter(&self) -> impl Iterator<Item = ProfilePlayedWorld> + '_ { self.imp.iter() }
|
||||
|
||||
type InsertCallbackId = ProfilePlayedWorldInsertCallbackId;
|
||||
|
||||
fn on_insert(
|
||||
&self,
|
||||
callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static,
|
||||
) -> ProfilePlayedWorldInsertCallbackId {
|
||||
ProfilePlayedWorldInsertCallbackId(self.imp.on_insert(Box::new(callback)))
|
||||
}
|
||||
|
||||
fn remove_on_insert(&self, callback: ProfilePlayedWorldInsertCallbackId) {
|
||||
self.imp.remove_on_insert(callback.0)
|
||||
}
|
||||
|
||||
type DeleteCallbackId = ProfilePlayedWorldDeleteCallbackId;
|
||||
|
||||
fn on_delete(
|
||||
&self,
|
||||
callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static,
|
||||
) -> ProfilePlayedWorldDeleteCallbackId {
|
||||
ProfilePlayedWorldDeleteCallbackId(self.imp.on_delete(Box::new(callback)))
|
||||
}
|
||||
|
||||
fn remove_on_delete(&self, callback: ProfilePlayedWorldDeleteCallbackId) {
|
||||
self.imp.remove_on_delete(callback.0)
|
||||
}
|
||||
}
|
||||
|
||||
pub struct ProfilePlayedWorldUpdateCallbackId(__sdk::CallbackId);
|
||||
|
||||
impl<'ctx> __sdk::TableWithPrimaryKey for ProfilePlayedWorldTableHandle<'ctx> {
|
||||
type UpdateCallbackId = ProfilePlayedWorldUpdateCallbackId;
|
||||
|
||||
fn on_update(
|
||||
&self,
|
||||
callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static,
|
||||
) -> ProfilePlayedWorldUpdateCallbackId {
|
||||
ProfilePlayedWorldUpdateCallbackId(self.imp.on_update(Box::new(callback)))
|
||||
}
|
||||
|
||||
fn remove_on_update(&self, callback: ProfilePlayedWorldUpdateCallbackId) {
|
||||
self.imp.remove_on_update(callback.0)
|
||||
}
|
||||
}
|
||||
|
||||
/// Access to the `played_world_id` unique index on the table `profile_played_world`,
|
||||
/// which allows point queries on the field of the same name
|
||||
/// via the [`ProfilePlayedWorldPlayedWorldIdUnique::find`] method.
|
||||
///
|
||||
/// Users are encouraged not to explicitly reference this type,
|
||||
/// but to directly chain method calls,
|
||||
/// like `ctx.db.profile_played_world().played_world_id().find(...)`.
|
||||
pub struct ProfilePlayedWorldPlayedWorldIdUnique<'ctx> {
|
||||
imp: __sdk::UniqueConstraintHandle<ProfilePlayedWorld, String>,
|
||||
phantom: std::marker::PhantomData<&'ctx super::RemoteTables>,
|
||||
}
|
||||
|
||||
impl<'ctx> ProfilePlayedWorldTableHandle<'ctx> {
|
||||
/// Get a handle on the `played_world_id` unique index on the table `profile_played_world`.
|
||||
pub fn played_world_id(&self) -> ProfilePlayedWorldPlayedWorldIdUnique<'ctx> {
|
||||
ProfilePlayedWorldPlayedWorldIdUnique {
|
||||
imp: self.imp.get_unique_constraint::<String>("played_world_id"),
|
||||
phantom: std::marker::PhantomData,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<'ctx> ProfilePlayedWorldPlayedWorldIdUnique<'ctx> {
|
||||
/// Find the subscribed row whose `played_world_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<ProfilePlayedWorld> {
|
||||
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::<ProfilePlayedWorld>("profile_played_world");
|
||||
_table.add_unique_constraint::<String>("played_world_id", |row| &row.played_world_id);
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
pub(super) fn parse_table_update(
|
||||
raw_updates: __ws::v2::TableUpdate,
|
||||
) -> __sdk::Result<__sdk::TableUpdate<ProfilePlayedWorld>> {
|
||||
__sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| {
|
||||
__sdk::InternalError::failed_parse(
|
||||
"TableUpdate<ProfilePlayedWorld>",
|
||||
"TableUpdate",
|
||||
).with_cause(e).into()
|
||||
})
|
||||
}
|
||||
|
||||
#[allow(non_camel_case_types)]
|
||||
/// Extension trait for query builder access to the table `ProfilePlayedWorld`.
|
||||
///
|
||||
/// Implemented for [`__sdk::QueryTableAccessor`].
|
||||
pub trait profile_played_worldQueryTableAccess {
|
||||
#[allow(non_snake_case)]
|
||||
/// Get a query builder for the table `ProfilePlayedWorld`.
|
||||
fn profile_played_world(&self) -> __sdk::__query_builder::Table<ProfilePlayedWorld>;
|
||||
}
|
||||
|
||||
impl profile_played_worldQueryTableAccess for __sdk::QueryTableAccessor {
|
||||
fn profile_played_world(&self) -> __sdk::__query_builder::Table<ProfilePlayedWorld> {
|
||||
__sdk::__query_builder::Table::new("profile_played_world")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,163 +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::profile_save_archive_type::ProfileSaveArchive;
|
||||
|
||||
/// Table handle for the table `profile_save_archive`.
|
||||
///
|
||||
/// Obtain a handle from the [`ProfileSaveArchiveTableAccess::profile_save_archive`] method on [`super::RemoteTables`],
|
||||
/// like `ctx.db.profile_save_archive()`.
|
||||
///
|
||||
/// Users are encouraged not to explicitly reference this type,
|
||||
/// but to directly chain method calls,
|
||||
/// like `ctx.db.profile_save_archive().on_insert(...)`.
|
||||
pub struct ProfileSaveArchiveTableHandle<'ctx> {
|
||||
imp: __sdk::TableHandle<ProfileSaveArchive>,
|
||||
ctx: std::marker::PhantomData<&'ctx super::RemoteTables>,
|
||||
}
|
||||
|
||||
#[allow(non_camel_case_types)]
|
||||
/// Extension trait for access to the table `profile_save_archive`.
|
||||
///
|
||||
/// Implemented for [`super::RemoteTables`].
|
||||
pub trait ProfileSaveArchiveTableAccess {
|
||||
#[allow(non_snake_case)]
|
||||
/// Obtain a [`ProfileSaveArchiveTableHandle`], which mediates access to the table `profile_save_archive`.
|
||||
fn profile_save_archive(&self) -> ProfileSaveArchiveTableHandle<'_>;
|
||||
}
|
||||
|
||||
impl ProfileSaveArchiveTableAccess for super::RemoteTables {
|
||||
fn profile_save_archive(&self) -> ProfileSaveArchiveTableHandle<'_> {
|
||||
ProfileSaveArchiveTableHandle {
|
||||
imp: self.imp.get_table::<ProfileSaveArchive>("profile_save_archive"),
|
||||
ctx: std::marker::PhantomData,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct ProfileSaveArchiveInsertCallbackId(__sdk::CallbackId);
|
||||
pub struct ProfileSaveArchiveDeleteCallbackId(__sdk::CallbackId);
|
||||
|
||||
impl<'ctx> __sdk::Table for ProfileSaveArchiveTableHandle<'ctx> {
|
||||
type Row = ProfileSaveArchive;
|
||||
type EventContext = super::EventContext;
|
||||
|
||||
fn count(&self) -> u64 { self.imp.count() }
|
||||
fn iter(&self) -> impl Iterator<Item = ProfileSaveArchive> + '_ { self.imp.iter() }
|
||||
|
||||
type InsertCallbackId = ProfileSaveArchiveInsertCallbackId;
|
||||
|
||||
fn on_insert(
|
||||
&self,
|
||||
callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static,
|
||||
) -> ProfileSaveArchiveInsertCallbackId {
|
||||
ProfileSaveArchiveInsertCallbackId(self.imp.on_insert(Box::new(callback)))
|
||||
}
|
||||
|
||||
fn remove_on_insert(&self, callback: ProfileSaveArchiveInsertCallbackId) {
|
||||
self.imp.remove_on_insert(callback.0)
|
||||
}
|
||||
|
||||
type DeleteCallbackId = ProfileSaveArchiveDeleteCallbackId;
|
||||
|
||||
fn on_delete(
|
||||
&self,
|
||||
callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static,
|
||||
) -> ProfileSaveArchiveDeleteCallbackId {
|
||||
ProfileSaveArchiveDeleteCallbackId(self.imp.on_delete(Box::new(callback)))
|
||||
}
|
||||
|
||||
fn remove_on_delete(&self, callback: ProfileSaveArchiveDeleteCallbackId) {
|
||||
self.imp.remove_on_delete(callback.0)
|
||||
}
|
||||
}
|
||||
|
||||
pub struct ProfileSaveArchiveUpdateCallbackId(__sdk::CallbackId);
|
||||
|
||||
impl<'ctx> __sdk::TableWithPrimaryKey for ProfileSaveArchiveTableHandle<'ctx> {
|
||||
type UpdateCallbackId = ProfileSaveArchiveUpdateCallbackId;
|
||||
|
||||
fn on_update(
|
||||
&self,
|
||||
callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static,
|
||||
) -> ProfileSaveArchiveUpdateCallbackId {
|
||||
ProfileSaveArchiveUpdateCallbackId(self.imp.on_update(Box::new(callback)))
|
||||
}
|
||||
|
||||
fn remove_on_update(&self, callback: ProfileSaveArchiveUpdateCallbackId) {
|
||||
self.imp.remove_on_update(callback.0)
|
||||
}
|
||||
}
|
||||
|
||||
/// Access to the `archive_id` unique index on the table `profile_save_archive`,
|
||||
/// which allows point queries on the field of the same name
|
||||
/// via the [`ProfileSaveArchiveArchiveIdUnique::find`] method.
|
||||
///
|
||||
/// Users are encouraged not to explicitly reference this type,
|
||||
/// but to directly chain method calls,
|
||||
/// like `ctx.db.profile_save_archive().archive_id().find(...)`.
|
||||
pub struct ProfileSaveArchiveArchiveIdUnique<'ctx> {
|
||||
imp: __sdk::UniqueConstraintHandle<ProfileSaveArchive, String>,
|
||||
phantom: std::marker::PhantomData<&'ctx super::RemoteTables>,
|
||||
}
|
||||
|
||||
impl<'ctx> ProfileSaveArchiveTableHandle<'ctx> {
|
||||
/// Get a handle on the `archive_id` unique index on the table `profile_save_archive`.
|
||||
pub fn archive_id(&self) -> ProfileSaveArchiveArchiveIdUnique<'ctx> {
|
||||
ProfileSaveArchiveArchiveIdUnique {
|
||||
imp: self.imp.get_unique_constraint::<String>("archive_id"),
|
||||
phantom: std::marker::PhantomData,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<'ctx> ProfileSaveArchiveArchiveIdUnique<'ctx> {
|
||||
/// Find the subscribed row whose `archive_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<ProfileSaveArchive> {
|
||||
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::<ProfileSaveArchive>("profile_save_archive");
|
||||
_table.add_unique_constraint::<String>("archive_id", |row| &row.archive_id);
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
pub(super) fn parse_table_update(
|
||||
raw_updates: __ws::v2::TableUpdate,
|
||||
) -> __sdk::Result<__sdk::TableUpdate<ProfileSaveArchive>> {
|
||||
__sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| {
|
||||
__sdk::InternalError::failed_parse(
|
||||
"TableUpdate<ProfileSaveArchive>",
|
||||
"TableUpdate",
|
||||
).with_cause(e).into()
|
||||
})
|
||||
}
|
||||
|
||||
#[allow(non_camel_case_types)]
|
||||
/// Extension trait for query builder access to the table `ProfileSaveArchive`.
|
||||
///
|
||||
/// Implemented for [`__sdk::QueryTableAccessor`].
|
||||
pub trait profile_save_archiveQueryTableAccess {
|
||||
#[allow(non_snake_case)]
|
||||
/// Get a query builder for the table `ProfileSaveArchive`.
|
||||
fn profile_save_archive(&self) -> __sdk::__query_builder::Table<ProfileSaveArchive>;
|
||||
}
|
||||
|
||||
impl profile_save_archiveQueryTableAccess for __sdk::QueryTableAccessor {
|
||||
fn profile_save_archive(&self) -> __sdk::__query_builder::Table<ProfileSaveArchive> {
|
||||
__sdk::__query_builder::Table::new("profile_save_archive")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,164 +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::profile_wallet_ledger_type::ProfileWalletLedger;
|
||||
use super::runtime_profile_wallet_ledger_source_type_type::RuntimeProfileWalletLedgerSourceType;
|
||||
|
||||
/// Table handle for the table `profile_wallet_ledger`.
|
||||
///
|
||||
/// Obtain a handle from the [`ProfileWalletLedgerTableAccess::profile_wallet_ledger`] method on [`super::RemoteTables`],
|
||||
/// like `ctx.db.profile_wallet_ledger()`.
|
||||
///
|
||||
/// Users are encouraged not to explicitly reference this type,
|
||||
/// but to directly chain method calls,
|
||||
/// like `ctx.db.profile_wallet_ledger().on_insert(...)`.
|
||||
pub struct ProfileWalletLedgerTableHandle<'ctx> {
|
||||
imp: __sdk::TableHandle<ProfileWalletLedger>,
|
||||
ctx: std::marker::PhantomData<&'ctx super::RemoteTables>,
|
||||
}
|
||||
|
||||
#[allow(non_camel_case_types)]
|
||||
/// Extension trait for access to the table `profile_wallet_ledger`.
|
||||
///
|
||||
/// Implemented for [`super::RemoteTables`].
|
||||
pub trait ProfileWalletLedgerTableAccess {
|
||||
#[allow(non_snake_case)]
|
||||
/// Obtain a [`ProfileWalletLedgerTableHandle`], which mediates access to the table `profile_wallet_ledger`.
|
||||
fn profile_wallet_ledger(&self) -> ProfileWalletLedgerTableHandle<'_>;
|
||||
}
|
||||
|
||||
impl ProfileWalletLedgerTableAccess for super::RemoteTables {
|
||||
fn profile_wallet_ledger(&self) -> ProfileWalletLedgerTableHandle<'_> {
|
||||
ProfileWalletLedgerTableHandle {
|
||||
imp: self.imp.get_table::<ProfileWalletLedger>("profile_wallet_ledger"),
|
||||
ctx: std::marker::PhantomData,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct ProfileWalletLedgerInsertCallbackId(__sdk::CallbackId);
|
||||
pub struct ProfileWalletLedgerDeleteCallbackId(__sdk::CallbackId);
|
||||
|
||||
impl<'ctx> __sdk::Table for ProfileWalletLedgerTableHandle<'ctx> {
|
||||
type Row = ProfileWalletLedger;
|
||||
type EventContext = super::EventContext;
|
||||
|
||||
fn count(&self) -> u64 { self.imp.count() }
|
||||
fn iter(&self) -> impl Iterator<Item = ProfileWalletLedger> + '_ { self.imp.iter() }
|
||||
|
||||
type InsertCallbackId = ProfileWalletLedgerInsertCallbackId;
|
||||
|
||||
fn on_insert(
|
||||
&self,
|
||||
callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static,
|
||||
) -> ProfileWalletLedgerInsertCallbackId {
|
||||
ProfileWalletLedgerInsertCallbackId(self.imp.on_insert(Box::new(callback)))
|
||||
}
|
||||
|
||||
fn remove_on_insert(&self, callback: ProfileWalletLedgerInsertCallbackId) {
|
||||
self.imp.remove_on_insert(callback.0)
|
||||
}
|
||||
|
||||
type DeleteCallbackId = ProfileWalletLedgerDeleteCallbackId;
|
||||
|
||||
fn on_delete(
|
||||
&self,
|
||||
callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static,
|
||||
) -> ProfileWalletLedgerDeleteCallbackId {
|
||||
ProfileWalletLedgerDeleteCallbackId(self.imp.on_delete(Box::new(callback)))
|
||||
}
|
||||
|
||||
fn remove_on_delete(&self, callback: ProfileWalletLedgerDeleteCallbackId) {
|
||||
self.imp.remove_on_delete(callback.0)
|
||||
}
|
||||
}
|
||||
|
||||
pub struct ProfileWalletLedgerUpdateCallbackId(__sdk::CallbackId);
|
||||
|
||||
impl<'ctx> __sdk::TableWithPrimaryKey for ProfileWalletLedgerTableHandle<'ctx> {
|
||||
type UpdateCallbackId = ProfileWalletLedgerUpdateCallbackId;
|
||||
|
||||
fn on_update(
|
||||
&self,
|
||||
callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static,
|
||||
) -> ProfileWalletLedgerUpdateCallbackId {
|
||||
ProfileWalletLedgerUpdateCallbackId(self.imp.on_update(Box::new(callback)))
|
||||
}
|
||||
|
||||
fn remove_on_update(&self, callback: ProfileWalletLedgerUpdateCallbackId) {
|
||||
self.imp.remove_on_update(callback.0)
|
||||
}
|
||||
}
|
||||
|
||||
/// Access to the `wallet_ledger_id` unique index on the table `profile_wallet_ledger`,
|
||||
/// which allows point queries on the field of the same name
|
||||
/// via the [`ProfileWalletLedgerWalletLedgerIdUnique::find`] method.
|
||||
///
|
||||
/// Users are encouraged not to explicitly reference this type,
|
||||
/// but to directly chain method calls,
|
||||
/// like `ctx.db.profile_wallet_ledger().wallet_ledger_id().find(...)`.
|
||||
pub struct ProfileWalletLedgerWalletLedgerIdUnique<'ctx> {
|
||||
imp: __sdk::UniqueConstraintHandle<ProfileWalletLedger, String>,
|
||||
phantom: std::marker::PhantomData<&'ctx super::RemoteTables>,
|
||||
}
|
||||
|
||||
impl<'ctx> ProfileWalletLedgerTableHandle<'ctx> {
|
||||
/// Get a handle on the `wallet_ledger_id` unique index on the table `profile_wallet_ledger`.
|
||||
pub fn wallet_ledger_id(&self) -> ProfileWalletLedgerWalletLedgerIdUnique<'ctx> {
|
||||
ProfileWalletLedgerWalletLedgerIdUnique {
|
||||
imp: self.imp.get_unique_constraint::<String>("wallet_ledger_id"),
|
||||
phantom: std::marker::PhantomData,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<'ctx> ProfileWalletLedgerWalletLedgerIdUnique<'ctx> {
|
||||
/// Find the subscribed row whose `wallet_ledger_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<ProfileWalletLedger> {
|
||||
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::<ProfileWalletLedger>("profile_wallet_ledger");
|
||||
_table.add_unique_constraint::<String>("wallet_ledger_id", |row| &row.wallet_ledger_id);
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
pub(super) fn parse_table_update(
|
||||
raw_updates: __ws::v2::TableUpdate,
|
||||
) -> __sdk::Result<__sdk::TableUpdate<ProfileWalletLedger>> {
|
||||
__sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| {
|
||||
__sdk::InternalError::failed_parse(
|
||||
"TableUpdate<ProfileWalletLedger>",
|
||||
"TableUpdate",
|
||||
).with_cause(e).into()
|
||||
})
|
||||
}
|
||||
|
||||
#[allow(non_camel_case_types)]
|
||||
/// Extension trait for query builder access to the table `ProfileWalletLedger`.
|
||||
///
|
||||
/// Implemented for [`__sdk::QueryTableAccessor`].
|
||||
pub trait profile_wallet_ledgerQueryTableAccess {
|
||||
#[allow(non_snake_case)]
|
||||
/// Get a query builder for the table `ProfileWalletLedger`.
|
||||
fn profile_wallet_ledger(&self) -> __sdk::__query_builder::Table<ProfileWalletLedger>;
|
||||
}
|
||||
|
||||
impl profile_wallet_ledgerQueryTableAccess for __sdk::QueryTableAccessor {
|
||||
fn profile_wallet_ledger(&self) -> __sdk::__query_builder::Table<ProfileWalletLedger> {
|
||||
__sdk::__query_builder::Table::new("profile_wallet_ledger")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,165 +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::puzzle_agent_message_row_type::PuzzleAgentMessageRow;
|
||||
use super::puzzle_agent_message_role_type::PuzzleAgentMessageRole;
|
||||
use super::puzzle_agent_message_kind_type::PuzzleAgentMessageKind;
|
||||
|
||||
/// Table handle for the table `puzzle_agent_message`.
|
||||
///
|
||||
/// Obtain a handle from the [`PuzzleAgentMessageTableAccess::puzzle_agent_message`] method on [`super::RemoteTables`],
|
||||
/// like `ctx.db.puzzle_agent_message()`.
|
||||
///
|
||||
/// Users are encouraged not to explicitly reference this type,
|
||||
/// but to directly chain method calls,
|
||||
/// like `ctx.db.puzzle_agent_message().on_insert(...)`.
|
||||
pub struct PuzzleAgentMessageTableHandle<'ctx> {
|
||||
imp: __sdk::TableHandle<PuzzleAgentMessageRow>,
|
||||
ctx: std::marker::PhantomData<&'ctx super::RemoteTables>,
|
||||
}
|
||||
|
||||
#[allow(non_camel_case_types)]
|
||||
/// Extension trait for access to the table `puzzle_agent_message`.
|
||||
///
|
||||
/// Implemented for [`super::RemoteTables`].
|
||||
pub trait PuzzleAgentMessageTableAccess {
|
||||
#[allow(non_snake_case)]
|
||||
/// Obtain a [`PuzzleAgentMessageTableHandle`], which mediates access to the table `puzzle_agent_message`.
|
||||
fn puzzle_agent_message(&self) -> PuzzleAgentMessageTableHandle<'_>;
|
||||
}
|
||||
|
||||
impl PuzzleAgentMessageTableAccess for super::RemoteTables {
|
||||
fn puzzle_agent_message(&self) -> PuzzleAgentMessageTableHandle<'_> {
|
||||
PuzzleAgentMessageTableHandle {
|
||||
imp: self.imp.get_table::<PuzzleAgentMessageRow>("puzzle_agent_message"),
|
||||
ctx: std::marker::PhantomData,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct PuzzleAgentMessageInsertCallbackId(__sdk::CallbackId);
|
||||
pub struct PuzzleAgentMessageDeleteCallbackId(__sdk::CallbackId);
|
||||
|
||||
impl<'ctx> __sdk::Table for PuzzleAgentMessageTableHandle<'ctx> {
|
||||
type Row = PuzzleAgentMessageRow;
|
||||
type EventContext = super::EventContext;
|
||||
|
||||
fn count(&self) -> u64 { self.imp.count() }
|
||||
fn iter(&self) -> impl Iterator<Item = PuzzleAgentMessageRow> + '_ { self.imp.iter() }
|
||||
|
||||
type InsertCallbackId = PuzzleAgentMessageInsertCallbackId;
|
||||
|
||||
fn on_insert(
|
||||
&self,
|
||||
callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static,
|
||||
) -> PuzzleAgentMessageInsertCallbackId {
|
||||
PuzzleAgentMessageInsertCallbackId(self.imp.on_insert(Box::new(callback)))
|
||||
}
|
||||
|
||||
fn remove_on_insert(&self, callback: PuzzleAgentMessageInsertCallbackId) {
|
||||
self.imp.remove_on_insert(callback.0)
|
||||
}
|
||||
|
||||
type DeleteCallbackId = PuzzleAgentMessageDeleteCallbackId;
|
||||
|
||||
fn on_delete(
|
||||
&self,
|
||||
callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static,
|
||||
) -> PuzzleAgentMessageDeleteCallbackId {
|
||||
PuzzleAgentMessageDeleteCallbackId(self.imp.on_delete(Box::new(callback)))
|
||||
}
|
||||
|
||||
fn remove_on_delete(&self, callback: PuzzleAgentMessageDeleteCallbackId) {
|
||||
self.imp.remove_on_delete(callback.0)
|
||||
}
|
||||
}
|
||||
|
||||
pub struct PuzzleAgentMessageUpdateCallbackId(__sdk::CallbackId);
|
||||
|
||||
impl<'ctx> __sdk::TableWithPrimaryKey for PuzzleAgentMessageTableHandle<'ctx> {
|
||||
type UpdateCallbackId = PuzzleAgentMessageUpdateCallbackId;
|
||||
|
||||
fn on_update(
|
||||
&self,
|
||||
callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static,
|
||||
) -> PuzzleAgentMessageUpdateCallbackId {
|
||||
PuzzleAgentMessageUpdateCallbackId(self.imp.on_update(Box::new(callback)))
|
||||
}
|
||||
|
||||
fn remove_on_update(&self, callback: PuzzleAgentMessageUpdateCallbackId) {
|
||||
self.imp.remove_on_update(callback.0)
|
||||
}
|
||||
}
|
||||
|
||||
/// Access to the `message_id` unique index on the table `puzzle_agent_message`,
|
||||
/// which allows point queries on the field of the same name
|
||||
/// via the [`PuzzleAgentMessageMessageIdUnique::find`] method.
|
||||
///
|
||||
/// Users are encouraged not to explicitly reference this type,
|
||||
/// but to directly chain method calls,
|
||||
/// like `ctx.db.puzzle_agent_message().message_id().find(...)`.
|
||||
pub struct PuzzleAgentMessageMessageIdUnique<'ctx> {
|
||||
imp: __sdk::UniqueConstraintHandle<PuzzleAgentMessageRow, String>,
|
||||
phantom: std::marker::PhantomData<&'ctx super::RemoteTables>,
|
||||
}
|
||||
|
||||
impl<'ctx> PuzzleAgentMessageTableHandle<'ctx> {
|
||||
/// Get a handle on the `message_id` unique index on the table `puzzle_agent_message`.
|
||||
pub fn message_id(&self) -> PuzzleAgentMessageMessageIdUnique<'ctx> {
|
||||
PuzzleAgentMessageMessageIdUnique {
|
||||
imp: self.imp.get_unique_constraint::<String>("message_id"),
|
||||
phantom: std::marker::PhantomData,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<'ctx> PuzzleAgentMessageMessageIdUnique<'ctx> {
|
||||
/// Find the subscribed row whose `message_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<PuzzleAgentMessageRow> {
|
||||
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::<PuzzleAgentMessageRow>("puzzle_agent_message");
|
||||
_table.add_unique_constraint::<String>("message_id", |row| &row.message_id);
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
pub(super) fn parse_table_update(
|
||||
raw_updates: __ws::v2::TableUpdate,
|
||||
) -> __sdk::Result<__sdk::TableUpdate<PuzzleAgentMessageRow>> {
|
||||
__sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| {
|
||||
__sdk::InternalError::failed_parse(
|
||||
"TableUpdate<PuzzleAgentMessageRow>",
|
||||
"TableUpdate",
|
||||
).with_cause(e).into()
|
||||
})
|
||||
}
|
||||
|
||||
#[allow(non_camel_case_types)]
|
||||
/// Extension trait for query builder access to the table `PuzzleAgentMessageRow`.
|
||||
///
|
||||
/// Implemented for [`__sdk::QueryTableAccessor`].
|
||||
pub trait puzzle_agent_messageQueryTableAccess {
|
||||
#[allow(non_snake_case)]
|
||||
/// Get a query builder for the table `PuzzleAgentMessageRow`.
|
||||
fn puzzle_agent_message(&self) -> __sdk::__query_builder::Table<PuzzleAgentMessageRow>;
|
||||
}
|
||||
|
||||
impl puzzle_agent_messageQueryTableAccess for __sdk::QueryTableAccessor {
|
||||
fn puzzle_agent_message(&self) -> __sdk::__query_builder::Table<PuzzleAgentMessageRow> {
|
||||
__sdk::__query_builder::Table::new("puzzle_agent_message")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,164 +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::puzzle_agent_session_row_type::PuzzleAgentSessionRow;
|
||||
use super::puzzle_agent_stage_type::PuzzleAgentStage;
|
||||
|
||||
/// Table handle for the table `puzzle_agent_session`.
|
||||
///
|
||||
/// Obtain a handle from the [`PuzzleAgentSessionTableAccess::puzzle_agent_session`] method on [`super::RemoteTables`],
|
||||
/// like `ctx.db.puzzle_agent_session()`.
|
||||
///
|
||||
/// Users are encouraged not to explicitly reference this type,
|
||||
/// but to directly chain method calls,
|
||||
/// like `ctx.db.puzzle_agent_session().on_insert(...)`.
|
||||
pub struct PuzzleAgentSessionTableHandle<'ctx> {
|
||||
imp: __sdk::TableHandle<PuzzleAgentSessionRow>,
|
||||
ctx: std::marker::PhantomData<&'ctx super::RemoteTables>,
|
||||
}
|
||||
|
||||
#[allow(non_camel_case_types)]
|
||||
/// Extension trait for access to the table `puzzle_agent_session`.
|
||||
///
|
||||
/// Implemented for [`super::RemoteTables`].
|
||||
pub trait PuzzleAgentSessionTableAccess {
|
||||
#[allow(non_snake_case)]
|
||||
/// Obtain a [`PuzzleAgentSessionTableHandle`], which mediates access to the table `puzzle_agent_session`.
|
||||
fn puzzle_agent_session(&self) -> PuzzleAgentSessionTableHandle<'_>;
|
||||
}
|
||||
|
||||
impl PuzzleAgentSessionTableAccess for super::RemoteTables {
|
||||
fn puzzle_agent_session(&self) -> PuzzleAgentSessionTableHandle<'_> {
|
||||
PuzzleAgentSessionTableHandle {
|
||||
imp: self.imp.get_table::<PuzzleAgentSessionRow>("puzzle_agent_session"),
|
||||
ctx: std::marker::PhantomData,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct PuzzleAgentSessionInsertCallbackId(__sdk::CallbackId);
|
||||
pub struct PuzzleAgentSessionDeleteCallbackId(__sdk::CallbackId);
|
||||
|
||||
impl<'ctx> __sdk::Table for PuzzleAgentSessionTableHandle<'ctx> {
|
||||
type Row = PuzzleAgentSessionRow;
|
||||
type EventContext = super::EventContext;
|
||||
|
||||
fn count(&self) -> u64 { self.imp.count() }
|
||||
fn iter(&self) -> impl Iterator<Item = PuzzleAgentSessionRow> + '_ { self.imp.iter() }
|
||||
|
||||
type InsertCallbackId = PuzzleAgentSessionInsertCallbackId;
|
||||
|
||||
fn on_insert(
|
||||
&self,
|
||||
callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static,
|
||||
) -> PuzzleAgentSessionInsertCallbackId {
|
||||
PuzzleAgentSessionInsertCallbackId(self.imp.on_insert(Box::new(callback)))
|
||||
}
|
||||
|
||||
fn remove_on_insert(&self, callback: PuzzleAgentSessionInsertCallbackId) {
|
||||
self.imp.remove_on_insert(callback.0)
|
||||
}
|
||||
|
||||
type DeleteCallbackId = PuzzleAgentSessionDeleteCallbackId;
|
||||
|
||||
fn on_delete(
|
||||
&self,
|
||||
callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static,
|
||||
) -> PuzzleAgentSessionDeleteCallbackId {
|
||||
PuzzleAgentSessionDeleteCallbackId(self.imp.on_delete(Box::new(callback)))
|
||||
}
|
||||
|
||||
fn remove_on_delete(&self, callback: PuzzleAgentSessionDeleteCallbackId) {
|
||||
self.imp.remove_on_delete(callback.0)
|
||||
}
|
||||
}
|
||||
|
||||
pub struct PuzzleAgentSessionUpdateCallbackId(__sdk::CallbackId);
|
||||
|
||||
impl<'ctx> __sdk::TableWithPrimaryKey for PuzzleAgentSessionTableHandle<'ctx> {
|
||||
type UpdateCallbackId = PuzzleAgentSessionUpdateCallbackId;
|
||||
|
||||
fn on_update(
|
||||
&self,
|
||||
callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static,
|
||||
) -> PuzzleAgentSessionUpdateCallbackId {
|
||||
PuzzleAgentSessionUpdateCallbackId(self.imp.on_update(Box::new(callback)))
|
||||
}
|
||||
|
||||
fn remove_on_update(&self, callback: PuzzleAgentSessionUpdateCallbackId) {
|
||||
self.imp.remove_on_update(callback.0)
|
||||
}
|
||||
}
|
||||
|
||||
/// Access to the `session_id` unique index on the table `puzzle_agent_session`,
|
||||
/// which allows point queries on the field of the same name
|
||||
/// via the [`PuzzleAgentSessionSessionIdUnique::find`] method.
|
||||
///
|
||||
/// Users are encouraged not to explicitly reference this type,
|
||||
/// but to directly chain method calls,
|
||||
/// like `ctx.db.puzzle_agent_session().session_id().find(...)`.
|
||||
pub struct PuzzleAgentSessionSessionIdUnique<'ctx> {
|
||||
imp: __sdk::UniqueConstraintHandle<PuzzleAgentSessionRow, String>,
|
||||
phantom: std::marker::PhantomData<&'ctx super::RemoteTables>,
|
||||
}
|
||||
|
||||
impl<'ctx> PuzzleAgentSessionTableHandle<'ctx> {
|
||||
/// Get a handle on the `session_id` unique index on the table `puzzle_agent_session`.
|
||||
pub fn session_id(&self) -> PuzzleAgentSessionSessionIdUnique<'ctx> {
|
||||
PuzzleAgentSessionSessionIdUnique {
|
||||
imp: self.imp.get_unique_constraint::<String>("session_id"),
|
||||
phantom: std::marker::PhantomData,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<'ctx> PuzzleAgentSessionSessionIdUnique<'ctx> {
|
||||
/// Find the subscribed row whose `session_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<PuzzleAgentSessionRow> {
|
||||
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::<PuzzleAgentSessionRow>("puzzle_agent_session");
|
||||
_table.add_unique_constraint::<String>("session_id", |row| &row.session_id);
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
pub(super) fn parse_table_update(
|
||||
raw_updates: __ws::v2::TableUpdate,
|
||||
) -> __sdk::Result<__sdk::TableUpdate<PuzzleAgentSessionRow>> {
|
||||
__sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| {
|
||||
__sdk::InternalError::failed_parse(
|
||||
"TableUpdate<PuzzleAgentSessionRow>",
|
||||
"TableUpdate",
|
||||
).with_cause(e).into()
|
||||
})
|
||||
}
|
||||
|
||||
#[allow(non_camel_case_types)]
|
||||
/// Extension trait for query builder access to the table `PuzzleAgentSessionRow`.
|
||||
///
|
||||
/// Implemented for [`__sdk::QueryTableAccessor`].
|
||||
pub trait puzzle_agent_sessionQueryTableAccess {
|
||||
#[allow(non_snake_case)]
|
||||
/// Get a query builder for the table `PuzzleAgentSessionRow`.
|
||||
fn puzzle_agent_session(&self) -> __sdk::__query_builder::Table<PuzzleAgentSessionRow>;
|
||||
}
|
||||
|
||||
impl puzzle_agent_sessionQueryTableAccess for __sdk::QueryTableAccessor {
|
||||
fn puzzle_agent_session(&self) -> __sdk::__query_builder::Table<PuzzleAgentSessionRow> {
|
||||
__sdk::__query_builder::Table::new("puzzle_agent_session")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,163 +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::puzzle_runtime_run_row_type::PuzzleRuntimeRunRow;
|
||||
|
||||
/// Table handle for the table `puzzle_runtime_run`.
|
||||
///
|
||||
/// Obtain a handle from the [`PuzzleRuntimeRunTableAccess::puzzle_runtime_run`] method on [`super::RemoteTables`],
|
||||
/// like `ctx.db.puzzle_runtime_run()`.
|
||||
///
|
||||
/// Users are encouraged not to explicitly reference this type,
|
||||
/// but to directly chain method calls,
|
||||
/// like `ctx.db.puzzle_runtime_run().on_insert(...)`.
|
||||
pub struct PuzzleRuntimeRunTableHandle<'ctx> {
|
||||
imp: __sdk::TableHandle<PuzzleRuntimeRunRow>,
|
||||
ctx: std::marker::PhantomData<&'ctx super::RemoteTables>,
|
||||
}
|
||||
|
||||
#[allow(non_camel_case_types)]
|
||||
/// Extension trait for access to the table `puzzle_runtime_run`.
|
||||
///
|
||||
/// Implemented for [`super::RemoteTables`].
|
||||
pub trait PuzzleRuntimeRunTableAccess {
|
||||
#[allow(non_snake_case)]
|
||||
/// Obtain a [`PuzzleRuntimeRunTableHandle`], which mediates access to the table `puzzle_runtime_run`.
|
||||
fn puzzle_runtime_run(&self) -> PuzzleRuntimeRunTableHandle<'_>;
|
||||
}
|
||||
|
||||
impl PuzzleRuntimeRunTableAccess for super::RemoteTables {
|
||||
fn puzzle_runtime_run(&self) -> PuzzleRuntimeRunTableHandle<'_> {
|
||||
PuzzleRuntimeRunTableHandle {
|
||||
imp: self.imp.get_table::<PuzzleRuntimeRunRow>("puzzle_runtime_run"),
|
||||
ctx: std::marker::PhantomData,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct PuzzleRuntimeRunInsertCallbackId(__sdk::CallbackId);
|
||||
pub struct PuzzleRuntimeRunDeleteCallbackId(__sdk::CallbackId);
|
||||
|
||||
impl<'ctx> __sdk::Table for PuzzleRuntimeRunTableHandle<'ctx> {
|
||||
type Row = PuzzleRuntimeRunRow;
|
||||
type EventContext = super::EventContext;
|
||||
|
||||
fn count(&self) -> u64 { self.imp.count() }
|
||||
fn iter(&self) -> impl Iterator<Item = PuzzleRuntimeRunRow> + '_ { self.imp.iter() }
|
||||
|
||||
type InsertCallbackId = PuzzleRuntimeRunInsertCallbackId;
|
||||
|
||||
fn on_insert(
|
||||
&self,
|
||||
callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static,
|
||||
) -> PuzzleRuntimeRunInsertCallbackId {
|
||||
PuzzleRuntimeRunInsertCallbackId(self.imp.on_insert(Box::new(callback)))
|
||||
}
|
||||
|
||||
fn remove_on_insert(&self, callback: PuzzleRuntimeRunInsertCallbackId) {
|
||||
self.imp.remove_on_insert(callback.0)
|
||||
}
|
||||
|
||||
type DeleteCallbackId = PuzzleRuntimeRunDeleteCallbackId;
|
||||
|
||||
fn on_delete(
|
||||
&self,
|
||||
callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static,
|
||||
) -> PuzzleRuntimeRunDeleteCallbackId {
|
||||
PuzzleRuntimeRunDeleteCallbackId(self.imp.on_delete(Box::new(callback)))
|
||||
}
|
||||
|
||||
fn remove_on_delete(&self, callback: PuzzleRuntimeRunDeleteCallbackId) {
|
||||
self.imp.remove_on_delete(callback.0)
|
||||
}
|
||||
}
|
||||
|
||||
pub struct PuzzleRuntimeRunUpdateCallbackId(__sdk::CallbackId);
|
||||
|
||||
impl<'ctx> __sdk::TableWithPrimaryKey for PuzzleRuntimeRunTableHandle<'ctx> {
|
||||
type UpdateCallbackId = PuzzleRuntimeRunUpdateCallbackId;
|
||||
|
||||
fn on_update(
|
||||
&self,
|
||||
callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static,
|
||||
) -> PuzzleRuntimeRunUpdateCallbackId {
|
||||
PuzzleRuntimeRunUpdateCallbackId(self.imp.on_update(Box::new(callback)))
|
||||
}
|
||||
|
||||
fn remove_on_update(&self, callback: PuzzleRuntimeRunUpdateCallbackId) {
|
||||
self.imp.remove_on_update(callback.0)
|
||||
}
|
||||
}
|
||||
|
||||
/// Access to the `run_id` unique index on the table `puzzle_runtime_run`,
|
||||
/// which allows point queries on the field of the same name
|
||||
/// via the [`PuzzleRuntimeRunRunIdUnique::find`] method.
|
||||
///
|
||||
/// Users are encouraged not to explicitly reference this type,
|
||||
/// but to directly chain method calls,
|
||||
/// like `ctx.db.puzzle_runtime_run().run_id().find(...)`.
|
||||
pub struct PuzzleRuntimeRunRunIdUnique<'ctx> {
|
||||
imp: __sdk::UniqueConstraintHandle<PuzzleRuntimeRunRow, String>,
|
||||
phantom: std::marker::PhantomData<&'ctx super::RemoteTables>,
|
||||
}
|
||||
|
||||
impl<'ctx> PuzzleRuntimeRunTableHandle<'ctx> {
|
||||
/// Get a handle on the `run_id` unique index on the table `puzzle_runtime_run`.
|
||||
pub fn run_id(&self) -> PuzzleRuntimeRunRunIdUnique<'ctx> {
|
||||
PuzzleRuntimeRunRunIdUnique {
|
||||
imp: self.imp.get_unique_constraint::<String>("run_id"),
|
||||
phantom: std::marker::PhantomData,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<'ctx> PuzzleRuntimeRunRunIdUnique<'ctx> {
|
||||
/// Find the subscribed row whose `run_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<PuzzleRuntimeRunRow> {
|
||||
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::<PuzzleRuntimeRunRow>("puzzle_runtime_run");
|
||||
_table.add_unique_constraint::<String>("run_id", |row| &row.run_id);
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
pub(super) fn parse_table_update(
|
||||
raw_updates: __ws::v2::TableUpdate,
|
||||
) -> __sdk::Result<__sdk::TableUpdate<PuzzleRuntimeRunRow>> {
|
||||
__sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| {
|
||||
__sdk::InternalError::failed_parse(
|
||||
"TableUpdate<PuzzleRuntimeRunRow>",
|
||||
"TableUpdate",
|
||||
).with_cause(e).into()
|
||||
})
|
||||
}
|
||||
|
||||
#[allow(non_camel_case_types)]
|
||||
/// Extension trait for query builder access to the table `PuzzleRuntimeRunRow`.
|
||||
///
|
||||
/// Implemented for [`__sdk::QueryTableAccessor`].
|
||||
pub trait puzzle_runtime_runQueryTableAccess {
|
||||
#[allow(non_snake_case)]
|
||||
/// Get a query builder for the table `PuzzleRuntimeRunRow`.
|
||||
fn puzzle_runtime_run(&self) -> __sdk::__query_builder::Table<PuzzleRuntimeRunRow>;
|
||||
}
|
||||
|
||||
impl puzzle_runtime_runQueryTableAccess for __sdk::QueryTableAccessor {
|
||||
fn puzzle_runtime_run(&self) -> __sdk::__query_builder::Table<PuzzleRuntimeRunRow> {
|
||||
__sdk::__query_builder::Table::new("puzzle_runtime_run")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,164 +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::puzzle_work_profile_row_type::PuzzleWorkProfileRow;
|
||||
use super::puzzle_publication_status_type::PuzzlePublicationStatus;
|
||||
|
||||
/// Table handle for the table `puzzle_work_profile`.
|
||||
///
|
||||
/// Obtain a handle from the [`PuzzleWorkProfileTableAccess::puzzle_work_profile`] method on [`super::RemoteTables`],
|
||||
/// like `ctx.db.puzzle_work_profile()`.
|
||||
///
|
||||
/// Users are encouraged not to explicitly reference this type,
|
||||
/// but to directly chain method calls,
|
||||
/// like `ctx.db.puzzle_work_profile().on_insert(...)`.
|
||||
pub struct PuzzleWorkProfileTableHandle<'ctx> {
|
||||
imp: __sdk::TableHandle<PuzzleWorkProfileRow>,
|
||||
ctx: std::marker::PhantomData<&'ctx super::RemoteTables>,
|
||||
}
|
||||
|
||||
#[allow(non_camel_case_types)]
|
||||
/// Extension trait for access to the table `puzzle_work_profile`.
|
||||
///
|
||||
/// Implemented for [`super::RemoteTables`].
|
||||
pub trait PuzzleWorkProfileTableAccess {
|
||||
#[allow(non_snake_case)]
|
||||
/// Obtain a [`PuzzleWorkProfileTableHandle`], which mediates access to the table `puzzle_work_profile`.
|
||||
fn puzzle_work_profile(&self) -> PuzzleWorkProfileTableHandle<'_>;
|
||||
}
|
||||
|
||||
impl PuzzleWorkProfileTableAccess for super::RemoteTables {
|
||||
fn puzzle_work_profile(&self) -> PuzzleWorkProfileTableHandle<'_> {
|
||||
PuzzleWorkProfileTableHandle {
|
||||
imp: self.imp.get_table::<PuzzleWorkProfileRow>("puzzle_work_profile"),
|
||||
ctx: std::marker::PhantomData,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct PuzzleWorkProfileInsertCallbackId(__sdk::CallbackId);
|
||||
pub struct PuzzleWorkProfileDeleteCallbackId(__sdk::CallbackId);
|
||||
|
||||
impl<'ctx> __sdk::Table for PuzzleWorkProfileTableHandle<'ctx> {
|
||||
type Row = PuzzleWorkProfileRow;
|
||||
type EventContext = super::EventContext;
|
||||
|
||||
fn count(&self) -> u64 { self.imp.count() }
|
||||
fn iter(&self) -> impl Iterator<Item = PuzzleWorkProfileRow> + '_ { self.imp.iter() }
|
||||
|
||||
type InsertCallbackId = PuzzleWorkProfileInsertCallbackId;
|
||||
|
||||
fn on_insert(
|
||||
&self,
|
||||
callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static,
|
||||
) -> PuzzleWorkProfileInsertCallbackId {
|
||||
PuzzleWorkProfileInsertCallbackId(self.imp.on_insert(Box::new(callback)))
|
||||
}
|
||||
|
||||
fn remove_on_insert(&self, callback: PuzzleWorkProfileInsertCallbackId) {
|
||||
self.imp.remove_on_insert(callback.0)
|
||||
}
|
||||
|
||||
type DeleteCallbackId = PuzzleWorkProfileDeleteCallbackId;
|
||||
|
||||
fn on_delete(
|
||||
&self,
|
||||
callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static,
|
||||
) -> PuzzleWorkProfileDeleteCallbackId {
|
||||
PuzzleWorkProfileDeleteCallbackId(self.imp.on_delete(Box::new(callback)))
|
||||
}
|
||||
|
||||
fn remove_on_delete(&self, callback: PuzzleWorkProfileDeleteCallbackId) {
|
||||
self.imp.remove_on_delete(callback.0)
|
||||
}
|
||||
}
|
||||
|
||||
pub struct PuzzleWorkProfileUpdateCallbackId(__sdk::CallbackId);
|
||||
|
||||
impl<'ctx> __sdk::TableWithPrimaryKey for PuzzleWorkProfileTableHandle<'ctx> {
|
||||
type UpdateCallbackId = PuzzleWorkProfileUpdateCallbackId;
|
||||
|
||||
fn on_update(
|
||||
&self,
|
||||
callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static,
|
||||
) -> PuzzleWorkProfileUpdateCallbackId {
|
||||
PuzzleWorkProfileUpdateCallbackId(self.imp.on_update(Box::new(callback)))
|
||||
}
|
||||
|
||||
fn remove_on_update(&self, callback: PuzzleWorkProfileUpdateCallbackId) {
|
||||
self.imp.remove_on_update(callback.0)
|
||||
}
|
||||
}
|
||||
|
||||
/// Access to the `profile_id` unique index on the table `puzzle_work_profile`,
|
||||
/// which allows point queries on the field of the same name
|
||||
/// via the [`PuzzleWorkProfileProfileIdUnique::find`] method.
|
||||
///
|
||||
/// Users are encouraged not to explicitly reference this type,
|
||||
/// but to directly chain method calls,
|
||||
/// like `ctx.db.puzzle_work_profile().profile_id().find(...)`.
|
||||
pub struct PuzzleWorkProfileProfileIdUnique<'ctx> {
|
||||
imp: __sdk::UniqueConstraintHandle<PuzzleWorkProfileRow, String>,
|
||||
phantom: std::marker::PhantomData<&'ctx super::RemoteTables>,
|
||||
}
|
||||
|
||||
impl<'ctx> PuzzleWorkProfileTableHandle<'ctx> {
|
||||
/// Get a handle on the `profile_id` unique index on the table `puzzle_work_profile`.
|
||||
pub fn profile_id(&self) -> PuzzleWorkProfileProfileIdUnique<'ctx> {
|
||||
PuzzleWorkProfileProfileIdUnique {
|
||||
imp: self.imp.get_unique_constraint::<String>("profile_id"),
|
||||
phantom: std::marker::PhantomData,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<'ctx> PuzzleWorkProfileProfileIdUnique<'ctx> {
|
||||
/// Find the subscribed row whose `profile_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<PuzzleWorkProfileRow> {
|
||||
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::<PuzzleWorkProfileRow>("puzzle_work_profile");
|
||||
_table.add_unique_constraint::<String>("profile_id", |row| &row.profile_id);
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
pub(super) fn parse_table_update(
|
||||
raw_updates: __ws::v2::TableUpdate,
|
||||
) -> __sdk::Result<__sdk::TableUpdate<PuzzleWorkProfileRow>> {
|
||||
__sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| {
|
||||
__sdk::InternalError::failed_parse(
|
||||
"TableUpdate<PuzzleWorkProfileRow>",
|
||||
"TableUpdate",
|
||||
).with_cause(e).into()
|
||||
})
|
||||
}
|
||||
|
||||
#[allow(non_camel_case_types)]
|
||||
/// Extension trait for query builder access to the table `PuzzleWorkProfileRow`.
|
||||
///
|
||||
/// Implemented for [`__sdk::QueryTableAccessor`].
|
||||
pub trait puzzle_work_profileQueryTableAccess {
|
||||
#[allow(non_snake_case)]
|
||||
/// Get a query builder for the table `PuzzleWorkProfileRow`.
|
||||
fn puzzle_work_profile(&self) -> __sdk::__query_builder::Table<PuzzleWorkProfileRow>;
|
||||
}
|
||||
|
||||
impl puzzle_work_profileQueryTableAccess for __sdk::QueryTableAccessor {
|
||||
fn puzzle_work_profile(&self) -> __sdk::__query_builder::Table<PuzzleWorkProfileRow> {
|
||||
__sdk::__query_builder::Table::new("puzzle_work_profile")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,167 +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::quest_log_type::QuestLog;
|
||||
use super::quest_status_type::QuestStatus;
|
||||
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`.
|
||||
///
|
||||
/// Obtain a handle from the [`QuestLogTableAccess::quest_log`] method on [`super::RemoteTables`],
|
||||
/// like `ctx.db.quest_log()`.
|
||||
///
|
||||
/// Users are encouraged not to explicitly reference this type,
|
||||
/// but to directly chain method calls,
|
||||
/// like `ctx.db.quest_log().on_insert(...)`.
|
||||
pub struct QuestLogTableHandle<'ctx> {
|
||||
imp: __sdk::TableHandle<QuestLog>,
|
||||
ctx: std::marker::PhantomData<&'ctx super::RemoteTables>,
|
||||
}
|
||||
|
||||
#[allow(non_camel_case_types)]
|
||||
/// Extension trait for access to the table `quest_log`.
|
||||
///
|
||||
/// Implemented for [`super::RemoteTables`].
|
||||
pub trait QuestLogTableAccess {
|
||||
#[allow(non_snake_case)]
|
||||
/// Obtain a [`QuestLogTableHandle`], which mediates access to the table `quest_log`.
|
||||
fn quest_log(&self) -> QuestLogTableHandle<'_>;
|
||||
}
|
||||
|
||||
impl QuestLogTableAccess for super::RemoteTables {
|
||||
fn quest_log(&self) -> QuestLogTableHandle<'_> {
|
||||
QuestLogTableHandle {
|
||||
imp: self.imp.get_table::<QuestLog>("quest_log"),
|
||||
ctx: std::marker::PhantomData,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct QuestLogInsertCallbackId(__sdk::CallbackId);
|
||||
pub struct QuestLogDeleteCallbackId(__sdk::CallbackId);
|
||||
|
||||
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() }
|
||||
|
||||
type InsertCallbackId = QuestLogInsertCallbackId;
|
||||
|
||||
fn on_insert(
|
||||
&self,
|
||||
callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static,
|
||||
) -> QuestLogInsertCallbackId {
|
||||
QuestLogInsertCallbackId(self.imp.on_insert(Box::new(callback)))
|
||||
}
|
||||
|
||||
fn remove_on_insert(&self, callback: QuestLogInsertCallbackId) {
|
||||
self.imp.remove_on_insert(callback.0)
|
||||
}
|
||||
|
||||
type DeleteCallbackId = QuestLogDeleteCallbackId;
|
||||
|
||||
fn on_delete(
|
||||
&self,
|
||||
callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static,
|
||||
) -> QuestLogDeleteCallbackId {
|
||||
QuestLogDeleteCallbackId(self.imp.on_delete(Box::new(callback)))
|
||||
}
|
||||
|
||||
fn remove_on_delete(&self, callback: QuestLogDeleteCallbackId) {
|
||||
self.imp.remove_on_delete(callback.0)
|
||||
}
|
||||
}
|
||||
|
||||
pub struct QuestLogUpdateCallbackId(__sdk::CallbackId);
|
||||
|
||||
impl<'ctx> __sdk::TableWithPrimaryKey for QuestLogTableHandle<'ctx> {
|
||||
type UpdateCallbackId = QuestLogUpdateCallbackId;
|
||||
|
||||
fn on_update(
|
||||
&self,
|
||||
callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static,
|
||||
) -> QuestLogUpdateCallbackId {
|
||||
QuestLogUpdateCallbackId(self.imp.on_update(Box::new(callback)))
|
||||
}
|
||||
|
||||
fn remove_on_update(&self, callback: QuestLogUpdateCallbackId) {
|
||||
self.imp.remove_on_update(callback.0)
|
||||
}
|
||||
}
|
||||
|
||||
/// 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,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
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()
|
||||
})
|
||||
}
|
||||
|
||||
#[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")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,168 +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::quest_record_type::QuestRecord;
|
||||
use super::quest_status_type::QuestStatus;
|
||||
use super::quest_reward_snapshot_type::QuestRewardSnapshot;
|
||||
use super::quest_narrative_binding_snapshot_type::QuestNarrativeBindingSnapshot;
|
||||
use super::quest_step_snapshot_type::QuestStepSnapshot;
|
||||
use super::quest_objective_snapshot_type::QuestObjectiveSnapshot;
|
||||
|
||||
/// Table handle for the table `quest_record`.
|
||||
///
|
||||
/// Obtain a handle from the [`QuestRecordTableAccess::quest_record`] method on [`super::RemoteTables`],
|
||||
/// like `ctx.db.quest_record()`.
|
||||
///
|
||||
/// Users are encouraged not to explicitly reference this type,
|
||||
/// but to directly chain method calls,
|
||||
/// like `ctx.db.quest_record().on_insert(...)`.
|
||||
pub struct QuestRecordTableHandle<'ctx> {
|
||||
imp: __sdk::TableHandle<QuestRecord>,
|
||||
ctx: std::marker::PhantomData<&'ctx super::RemoteTables>,
|
||||
}
|
||||
|
||||
#[allow(non_camel_case_types)]
|
||||
/// Extension trait for access to the table `quest_record`.
|
||||
///
|
||||
/// Implemented for [`super::RemoteTables`].
|
||||
pub trait QuestRecordTableAccess {
|
||||
#[allow(non_snake_case)]
|
||||
/// Obtain a [`QuestRecordTableHandle`], which mediates access to the table `quest_record`.
|
||||
fn quest_record(&self) -> QuestRecordTableHandle<'_>;
|
||||
}
|
||||
|
||||
impl QuestRecordTableAccess for super::RemoteTables {
|
||||
fn quest_record(&self) -> QuestRecordTableHandle<'_> {
|
||||
QuestRecordTableHandle {
|
||||
imp: self.imp.get_table::<QuestRecord>("quest_record"),
|
||||
ctx: std::marker::PhantomData,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct QuestRecordInsertCallbackId(__sdk::CallbackId);
|
||||
pub struct QuestRecordDeleteCallbackId(__sdk::CallbackId);
|
||||
|
||||
impl<'ctx> __sdk::Table for QuestRecordTableHandle<'ctx> {
|
||||
type Row = QuestRecord;
|
||||
type EventContext = super::EventContext;
|
||||
|
||||
fn count(&self) -> u64 { self.imp.count() }
|
||||
fn iter(&self) -> impl Iterator<Item = QuestRecord> + '_ { self.imp.iter() }
|
||||
|
||||
type InsertCallbackId = QuestRecordInsertCallbackId;
|
||||
|
||||
fn on_insert(
|
||||
&self,
|
||||
callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static,
|
||||
) -> QuestRecordInsertCallbackId {
|
||||
QuestRecordInsertCallbackId(self.imp.on_insert(Box::new(callback)))
|
||||
}
|
||||
|
||||
fn remove_on_insert(&self, callback: QuestRecordInsertCallbackId) {
|
||||
self.imp.remove_on_insert(callback.0)
|
||||
}
|
||||
|
||||
type DeleteCallbackId = QuestRecordDeleteCallbackId;
|
||||
|
||||
fn on_delete(
|
||||
&self,
|
||||
callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static,
|
||||
) -> QuestRecordDeleteCallbackId {
|
||||
QuestRecordDeleteCallbackId(self.imp.on_delete(Box::new(callback)))
|
||||
}
|
||||
|
||||
fn remove_on_delete(&self, callback: QuestRecordDeleteCallbackId) {
|
||||
self.imp.remove_on_delete(callback.0)
|
||||
}
|
||||
}
|
||||
|
||||
pub struct QuestRecordUpdateCallbackId(__sdk::CallbackId);
|
||||
|
||||
impl<'ctx> __sdk::TableWithPrimaryKey for QuestRecordTableHandle<'ctx> {
|
||||
type UpdateCallbackId = QuestRecordUpdateCallbackId;
|
||||
|
||||
fn on_update(
|
||||
&self,
|
||||
callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static,
|
||||
) -> QuestRecordUpdateCallbackId {
|
||||
QuestRecordUpdateCallbackId(self.imp.on_update(Box::new(callback)))
|
||||
}
|
||||
|
||||
fn remove_on_update(&self, callback: QuestRecordUpdateCallbackId) {
|
||||
self.imp.remove_on_update(callback.0)
|
||||
}
|
||||
}
|
||||
|
||||
/// Access to the `quest_id` unique index on the table `quest_record`,
|
||||
/// which allows point queries on the field of the same name
|
||||
/// via the [`QuestRecordQuestIdUnique::find`] method.
|
||||
///
|
||||
/// Users are encouraged not to explicitly reference this type,
|
||||
/// but to directly chain method calls,
|
||||
/// like `ctx.db.quest_record().quest_id().find(...)`.
|
||||
pub struct QuestRecordQuestIdUnique<'ctx> {
|
||||
imp: __sdk::UniqueConstraintHandle<QuestRecord, String>,
|
||||
phantom: std::marker::PhantomData<&'ctx super::RemoteTables>,
|
||||
}
|
||||
|
||||
impl<'ctx> QuestRecordTableHandle<'ctx> {
|
||||
/// Get a handle on the `quest_id` unique index on the table `quest_record`.
|
||||
pub fn quest_id(&self) -> QuestRecordQuestIdUnique<'ctx> {
|
||||
QuestRecordQuestIdUnique {
|
||||
imp: self.imp.get_unique_constraint::<String>("quest_id"),
|
||||
phantom: std::marker::PhantomData,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<'ctx> QuestRecordQuestIdUnique<'ctx> {
|
||||
/// Find the subscribed row whose `quest_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<QuestRecord> {
|
||||
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::<QuestRecord>("quest_record");
|
||||
_table.add_unique_constraint::<String>("quest_id", |row| &row.quest_id);
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
pub(super) fn parse_table_update(
|
||||
raw_updates: __ws::v2::TableUpdate,
|
||||
) -> __sdk::Result<__sdk::TableUpdate<QuestRecord>> {
|
||||
__sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| {
|
||||
__sdk::InternalError::failed_parse(
|
||||
"TableUpdate<QuestRecord>",
|
||||
"TableUpdate",
|
||||
).with_cause(e).into()
|
||||
})
|
||||
}
|
||||
|
||||
#[allow(non_camel_case_types)]
|
||||
/// Extension trait for query builder access to the table `QuestRecord`.
|
||||
///
|
||||
/// Implemented for [`__sdk::QueryTableAccessor`].
|
||||
pub trait quest_recordQueryTableAccess {
|
||||
#[allow(non_snake_case)]
|
||||
/// Get a query builder for the table `QuestRecord`.
|
||||
fn quest_record(&self) -> __sdk::__query_builder::Table<QuestRecord>;
|
||||
}
|
||||
|
||||
impl quest_recordQueryTableAccess for __sdk::QueryTableAccessor {
|
||||
fn quest_record(&self) -> __sdk::__query_builder::Table<QuestRecord> {
|
||||
__sdk::__query_builder::Table::new("quest_record")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,163 +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::refresh_session_type::RefreshSession;
|
||||
|
||||
/// Table handle for the table `refresh_session`.
|
||||
///
|
||||
/// Obtain a handle from the [`RefreshSessionTableAccess::refresh_session`] method on [`super::RemoteTables`],
|
||||
/// like `ctx.db.refresh_session()`.
|
||||
///
|
||||
/// Users are encouraged not to explicitly reference this type,
|
||||
/// but to directly chain method calls,
|
||||
/// like `ctx.db.refresh_session().on_insert(...)`.
|
||||
pub struct RefreshSessionTableHandle<'ctx> {
|
||||
imp: __sdk::TableHandle<RefreshSession>,
|
||||
ctx: std::marker::PhantomData<&'ctx super::RemoteTables>,
|
||||
}
|
||||
|
||||
#[allow(non_camel_case_types)]
|
||||
/// Extension trait for access to the table `refresh_session`.
|
||||
///
|
||||
/// Implemented for [`super::RemoteTables`].
|
||||
pub trait RefreshSessionTableAccess {
|
||||
#[allow(non_snake_case)]
|
||||
/// Obtain a [`RefreshSessionTableHandle`], which mediates access to the table `refresh_session`.
|
||||
fn refresh_session(&self) -> RefreshSessionTableHandle<'_>;
|
||||
}
|
||||
|
||||
impl RefreshSessionTableAccess for super::RemoteTables {
|
||||
fn refresh_session(&self) -> RefreshSessionTableHandle<'_> {
|
||||
RefreshSessionTableHandle {
|
||||
imp: self.imp.get_table::<RefreshSession>("refresh_session"),
|
||||
ctx: std::marker::PhantomData,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct RefreshSessionInsertCallbackId(__sdk::CallbackId);
|
||||
pub struct RefreshSessionDeleteCallbackId(__sdk::CallbackId);
|
||||
|
||||
impl<'ctx> __sdk::Table for RefreshSessionTableHandle<'ctx> {
|
||||
type Row = RefreshSession;
|
||||
type EventContext = super::EventContext;
|
||||
|
||||
fn count(&self) -> u64 { self.imp.count() }
|
||||
fn iter(&self) -> impl Iterator<Item = RefreshSession> + '_ { self.imp.iter() }
|
||||
|
||||
type InsertCallbackId = RefreshSessionInsertCallbackId;
|
||||
|
||||
fn on_insert(
|
||||
&self,
|
||||
callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static,
|
||||
) -> RefreshSessionInsertCallbackId {
|
||||
RefreshSessionInsertCallbackId(self.imp.on_insert(Box::new(callback)))
|
||||
}
|
||||
|
||||
fn remove_on_insert(&self, callback: RefreshSessionInsertCallbackId) {
|
||||
self.imp.remove_on_insert(callback.0)
|
||||
}
|
||||
|
||||
type DeleteCallbackId = RefreshSessionDeleteCallbackId;
|
||||
|
||||
fn on_delete(
|
||||
&self,
|
||||
callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static,
|
||||
) -> RefreshSessionDeleteCallbackId {
|
||||
RefreshSessionDeleteCallbackId(self.imp.on_delete(Box::new(callback)))
|
||||
}
|
||||
|
||||
fn remove_on_delete(&self, callback: RefreshSessionDeleteCallbackId) {
|
||||
self.imp.remove_on_delete(callback.0)
|
||||
}
|
||||
}
|
||||
|
||||
pub struct RefreshSessionUpdateCallbackId(__sdk::CallbackId);
|
||||
|
||||
impl<'ctx> __sdk::TableWithPrimaryKey for RefreshSessionTableHandle<'ctx> {
|
||||
type UpdateCallbackId = RefreshSessionUpdateCallbackId;
|
||||
|
||||
fn on_update(
|
||||
&self,
|
||||
callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static,
|
||||
) -> RefreshSessionUpdateCallbackId {
|
||||
RefreshSessionUpdateCallbackId(self.imp.on_update(Box::new(callback)))
|
||||
}
|
||||
|
||||
fn remove_on_update(&self, callback: RefreshSessionUpdateCallbackId) {
|
||||
self.imp.remove_on_update(callback.0)
|
||||
}
|
||||
}
|
||||
|
||||
/// Access to the `session_id` unique index on the table `refresh_session`,
|
||||
/// which allows point queries on the field of the same name
|
||||
/// via the [`RefreshSessionSessionIdUnique::find`] method.
|
||||
///
|
||||
/// Users are encouraged not to explicitly reference this type,
|
||||
/// but to directly chain method calls,
|
||||
/// like `ctx.db.refresh_session().session_id().find(...)`.
|
||||
pub struct RefreshSessionSessionIdUnique<'ctx> {
|
||||
imp: __sdk::UniqueConstraintHandle<RefreshSession, String>,
|
||||
phantom: std::marker::PhantomData<&'ctx super::RemoteTables>,
|
||||
}
|
||||
|
||||
impl<'ctx> RefreshSessionTableHandle<'ctx> {
|
||||
/// Get a handle on the `session_id` unique index on the table `refresh_session`.
|
||||
pub fn session_id(&self) -> RefreshSessionSessionIdUnique<'ctx> {
|
||||
RefreshSessionSessionIdUnique {
|
||||
imp: self.imp.get_unique_constraint::<String>("session_id"),
|
||||
phantom: std::marker::PhantomData,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<'ctx> RefreshSessionSessionIdUnique<'ctx> {
|
||||
/// Find the subscribed row whose `session_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<RefreshSession> {
|
||||
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::<RefreshSession>("refresh_session");
|
||||
_table.add_unique_constraint::<String>("session_id", |row| &row.session_id);
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
pub(super) fn parse_table_update(
|
||||
raw_updates: __ws::v2::TableUpdate,
|
||||
) -> __sdk::Result<__sdk::TableUpdate<RefreshSession>> {
|
||||
__sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| {
|
||||
__sdk::InternalError::failed_parse(
|
||||
"TableUpdate<RefreshSession>",
|
||||
"TableUpdate",
|
||||
).with_cause(e).into()
|
||||
})
|
||||
}
|
||||
|
||||
#[allow(non_camel_case_types)]
|
||||
/// Extension trait for query builder access to the table `RefreshSession`.
|
||||
///
|
||||
/// Implemented for [`__sdk::QueryTableAccessor`].
|
||||
pub trait refresh_sessionQueryTableAccess {
|
||||
#[allow(non_snake_case)]
|
||||
/// Get a query builder for the table `RefreshSession`.
|
||||
fn refresh_session(&self) -> __sdk::__query_builder::Table<RefreshSession>;
|
||||
}
|
||||
|
||||
impl refresh_sessionQueryTableAccess for __sdk::QueryTableAccessor {
|
||||
fn refresh_session(&self) -> __sdk::__query_builder::Table<RefreshSession> {
|
||||
__sdk::__query_builder::Table::new("refresh_session")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,164 +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::runtime_setting_type::RuntimeSetting;
|
||||
use super::runtime_platform_theme_type::RuntimePlatformTheme;
|
||||
|
||||
/// Table handle for the table `runtime_setting`.
|
||||
///
|
||||
/// Obtain a handle from the [`RuntimeSettingTableAccess::runtime_setting`] method on [`super::RemoteTables`],
|
||||
/// like `ctx.db.runtime_setting()`.
|
||||
///
|
||||
/// Users are encouraged not to explicitly reference this type,
|
||||
/// but to directly chain method calls,
|
||||
/// like `ctx.db.runtime_setting().on_insert(...)`.
|
||||
pub struct RuntimeSettingTableHandle<'ctx> {
|
||||
imp: __sdk::TableHandle<RuntimeSetting>,
|
||||
ctx: std::marker::PhantomData<&'ctx super::RemoteTables>,
|
||||
}
|
||||
|
||||
#[allow(non_camel_case_types)]
|
||||
/// Extension trait for access to the table `runtime_setting`.
|
||||
///
|
||||
/// Implemented for [`super::RemoteTables`].
|
||||
pub trait RuntimeSettingTableAccess {
|
||||
#[allow(non_snake_case)]
|
||||
/// Obtain a [`RuntimeSettingTableHandle`], which mediates access to the table `runtime_setting`.
|
||||
fn runtime_setting(&self) -> RuntimeSettingTableHandle<'_>;
|
||||
}
|
||||
|
||||
impl RuntimeSettingTableAccess for super::RemoteTables {
|
||||
fn runtime_setting(&self) -> RuntimeSettingTableHandle<'_> {
|
||||
RuntimeSettingTableHandle {
|
||||
imp: self.imp.get_table::<RuntimeSetting>("runtime_setting"),
|
||||
ctx: std::marker::PhantomData,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct RuntimeSettingInsertCallbackId(__sdk::CallbackId);
|
||||
pub struct RuntimeSettingDeleteCallbackId(__sdk::CallbackId);
|
||||
|
||||
impl<'ctx> __sdk::Table for RuntimeSettingTableHandle<'ctx> {
|
||||
type Row = RuntimeSetting;
|
||||
type EventContext = super::EventContext;
|
||||
|
||||
fn count(&self) -> u64 { self.imp.count() }
|
||||
fn iter(&self) -> impl Iterator<Item = RuntimeSetting> + '_ { self.imp.iter() }
|
||||
|
||||
type InsertCallbackId = RuntimeSettingInsertCallbackId;
|
||||
|
||||
fn on_insert(
|
||||
&self,
|
||||
callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static,
|
||||
) -> RuntimeSettingInsertCallbackId {
|
||||
RuntimeSettingInsertCallbackId(self.imp.on_insert(Box::new(callback)))
|
||||
}
|
||||
|
||||
fn remove_on_insert(&self, callback: RuntimeSettingInsertCallbackId) {
|
||||
self.imp.remove_on_insert(callback.0)
|
||||
}
|
||||
|
||||
type DeleteCallbackId = RuntimeSettingDeleteCallbackId;
|
||||
|
||||
fn on_delete(
|
||||
&self,
|
||||
callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static,
|
||||
) -> RuntimeSettingDeleteCallbackId {
|
||||
RuntimeSettingDeleteCallbackId(self.imp.on_delete(Box::new(callback)))
|
||||
}
|
||||
|
||||
fn remove_on_delete(&self, callback: RuntimeSettingDeleteCallbackId) {
|
||||
self.imp.remove_on_delete(callback.0)
|
||||
}
|
||||
}
|
||||
|
||||
pub struct RuntimeSettingUpdateCallbackId(__sdk::CallbackId);
|
||||
|
||||
impl<'ctx> __sdk::TableWithPrimaryKey for RuntimeSettingTableHandle<'ctx> {
|
||||
type UpdateCallbackId = RuntimeSettingUpdateCallbackId;
|
||||
|
||||
fn on_update(
|
||||
&self,
|
||||
callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static,
|
||||
) -> RuntimeSettingUpdateCallbackId {
|
||||
RuntimeSettingUpdateCallbackId(self.imp.on_update(Box::new(callback)))
|
||||
}
|
||||
|
||||
fn remove_on_update(&self, callback: RuntimeSettingUpdateCallbackId) {
|
||||
self.imp.remove_on_update(callback.0)
|
||||
}
|
||||
}
|
||||
|
||||
/// Access to the `user_id` unique index on the table `runtime_setting`,
|
||||
/// which allows point queries on the field of the same name
|
||||
/// via the [`RuntimeSettingUserIdUnique::find`] method.
|
||||
///
|
||||
/// Users are encouraged not to explicitly reference this type,
|
||||
/// but to directly chain method calls,
|
||||
/// like `ctx.db.runtime_setting().user_id().find(...)`.
|
||||
pub struct RuntimeSettingUserIdUnique<'ctx> {
|
||||
imp: __sdk::UniqueConstraintHandle<RuntimeSetting, String>,
|
||||
phantom: std::marker::PhantomData<&'ctx super::RemoteTables>,
|
||||
}
|
||||
|
||||
impl<'ctx> RuntimeSettingTableHandle<'ctx> {
|
||||
/// Get a handle on the `user_id` unique index on the table `runtime_setting`.
|
||||
pub fn user_id(&self) -> RuntimeSettingUserIdUnique<'ctx> {
|
||||
RuntimeSettingUserIdUnique {
|
||||
imp: self.imp.get_unique_constraint::<String>("user_id"),
|
||||
phantom: std::marker::PhantomData,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<'ctx> RuntimeSettingUserIdUnique<'ctx> {
|
||||
/// Find the subscribed row whose `user_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<RuntimeSetting> {
|
||||
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::<RuntimeSetting>("runtime_setting");
|
||||
_table.add_unique_constraint::<String>("user_id", |row| &row.user_id);
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
pub(super) fn parse_table_update(
|
||||
raw_updates: __ws::v2::TableUpdate,
|
||||
) -> __sdk::Result<__sdk::TableUpdate<RuntimeSetting>> {
|
||||
__sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| {
|
||||
__sdk::InternalError::failed_parse(
|
||||
"TableUpdate<RuntimeSetting>",
|
||||
"TableUpdate",
|
||||
).with_cause(e).into()
|
||||
})
|
||||
}
|
||||
|
||||
#[allow(non_camel_case_types)]
|
||||
/// Extension trait for query builder access to the table `RuntimeSetting`.
|
||||
///
|
||||
/// Implemented for [`__sdk::QueryTableAccessor`].
|
||||
pub trait runtime_settingQueryTableAccess {
|
||||
#[allow(non_snake_case)]
|
||||
/// Get a query builder for the table `RuntimeSetting`.
|
||||
fn runtime_setting(&self) -> __sdk::__query_builder::Table<RuntimeSetting>;
|
||||
}
|
||||
|
||||
impl runtime_settingQueryTableAccess for __sdk::QueryTableAccessor {
|
||||
fn runtime_setting(&self) -> __sdk::__query_builder::Table<RuntimeSetting> {
|
||||
__sdk::__query_builder::Table::new("runtime_setting")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,163 +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::runtime_snapshot_row_type::RuntimeSnapshotRow;
|
||||
|
||||
/// Table handle for the table `runtime_snapshot`.
|
||||
///
|
||||
/// Obtain a handle from the [`RuntimeSnapshotTableAccess::runtime_snapshot`] method on [`super::RemoteTables`],
|
||||
/// like `ctx.db.runtime_snapshot()`.
|
||||
///
|
||||
/// Users are encouraged not to explicitly reference this type,
|
||||
/// but to directly chain method calls,
|
||||
/// like `ctx.db.runtime_snapshot().on_insert(...)`.
|
||||
pub struct RuntimeSnapshotTableHandle<'ctx> {
|
||||
imp: __sdk::TableHandle<RuntimeSnapshotRow>,
|
||||
ctx: std::marker::PhantomData<&'ctx super::RemoteTables>,
|
||||
}
|
||||
|
||||
#[allow(non_camel_case_types)]
|
||||
/// Extension trait for access to the table `runtime_snapshot`.
|
||||
///
|
||||
/// Implemented for [`super::RemoteTables`].
|
||||
pub trait RuntimeSnapshotTableAccess {
|
||||
#[allow(non_snake_case)]
|
||||
/// Obtain a [`RuntimeSnapshotTableHandle`], which mediates access to the table `runtime_snapshot`.
|
||||
fn runtime_snapshot(&self) -> RuntimeSnapshotTableHandle<'_>;
|
||||
}
|
||||
|
||||
impl RuntimeSnapshotTableAccess for super::RemoteTables {
|
||||
fn runtime_snapshot(&self) -> RuntimeSnapshotTableHandle<'_> {
|
||||
RuntimeSnapshotTableHandle {
|
||||
imp: self.imp.get_table::<RuntimeSnapshotRow>("runtime_snapshot"),
|
||||
ctx: std::marker::PhantomData,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct RuntimeSnapshotInsertCallbackId(__sdk::CallbackId);
|
||||
pub struct RuntimeSnapshotDeleteCallbackId(__sdk::CallbackId);
|
||||
|
||||
impl<'ctx> __sdk::Table for RuntimeSnapshotTableHandle<'ctx> {
|
||||
type Row = RuntimeSnapshotRow;
|
||||
type EventContext = super::EventContext;
|
||||
|
||||
fn count(&self) -> u64 { self.imp.count() }
|
||||
fn iter(&self) -> impl Iterator<Item = RuntimeSnapshotRow> + '_ { self.imp.iter() }
|
||||
|
||||
type InsertCallbackId = RuntimeSnapshotInsertCallbackId;
|
||||
|
||||
fn on_insert(
|
||||
&self,
|
||||
callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static,
|
||||
) -> RuntimeSnapshotInsertCallbackId {
|
||||
RuntimeSnapshotInsertCallbackId(self.imp.on_insert(Box::new(callback)))
|
||||
}
|
||||
|
||||
fn remove_on_insert(&self, callback: RuntimeSnapshotInsertCallbackId) {
|
||||
self.imp.remove_on_insert(callback.0)
|
||||
}
|
||||
|
||||
type DeleteCallbackId = RuntimeSnapshotDeleteCallbackId;
|
||||
|
||||
fn on_delete(
|
||||
&self,
|
||||
callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static,
|
||||
) -> RuntimeSnapshotDeleteCallbackId {
|
||||
RuntimeSnapshotDeleteCallbackId(self.imp.on_delete(Box::new(callback)))
|
||||
}
|
||||
|
||||
fn remove_on_delete(&self, callback: RuntimeSnapshotDeleteCallbackId) {
|
||||
self.imp.remove_on_delete(callback.0)
|
||||
}
|
||||
}
|
||||
|
||||
pub struct RuntimeSnapshotUpdateCallbackId(__sdk::CallbackId);
|
||||
|
||||
impl<'ctx> __sdk::TableWithPrimaryKey for RuntimeSnapshotTableHandle<'ctx> {
|
||||
type UpdateCallbackId = RuntimeSnapshotUpdateCallbackId;
|
||||
|
||||
fn on_update(
|
||||
&self,
|
||||
callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static,
|
||||
) -> RuntimeSnapshotUpdateCallbackId {
|
||||
RuntimeSnapshotUpdateCallbackId(self.imp.on_update(Box::new(callback)))
|
||||
}
|
||||
|
||||
fn remove_on_update(&self, callback: RuntimeSnapshotUpdateCallbackId) {
|
||||
self.imp.remove_on_update(callback.0)
|
||||
}
|
||||
}
|
||||
|
||||
/// Access to the `user_id` unique index on the table `runtime_snapshot`,
|
||||
/// which allows point queries on the field of the same name
|
||||
/// via the [`RuntimeSnapshotUserIdUnique::find`] method.
|
||||
///
|
||||
/// Users are encouraged not to explicitly reference this type,
|
||||
/// but to directly chain method calls,
|
||||
/// like `ctx.db.runtime_snapshot().user_id().find(...)`.
|
||||
pub struct RuntimeSnapshotUserIdUnique<'ctx> {
|
||||
imp: __sdk::UniqueConstraintHandle<RuntimeSnapshotRow, String>,
|
||||
phantom: std::marker::PhantomData<&'ctx super::RemoteTables>,
|
||||
}
|
||||
|
||||
impl<'ctx> RuntimeSnapshotTableHandle<'ctx> {
|
||||
/// Get a handle on the `user_id` unique index on the table `runtime_snapshot`.
|
||||
pub fn user_id(&self) -> RuntimeSnapshotUserIdUnique<'ctx> {
|
||||
RuntimeSnapshotUserIdUnique {
|
||||
imp: self.imp.get_unique_constraint::<String>("user_id"),
|
||||
phantom: std::marker::PhantomData,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<'ctx> RuntimeSnapshotUserIdUnique<'ctx> {
|
||||
/// Find the subscribed row whose `user_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<RuntimeSnapshotRow> {
|
||||
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::<RuntimeSnapshotRow>("runtime_snapshot");
|
||||
_table.add_unique_constraint::<String>("user_id", |row| &row.user_id);
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
pub(super) fn parse_table_update(
|
||||
raw_updates: __ws::v2::TableUpdate,
|
||||
) -> __sdk::Result<__sdk::TableUpdate<RuntimeSnapshotRow>> {
|
||||
__sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| {
|
||||
__sdk::InternalError::failed_parse(
|
||||
"TableUpdate<RuntimeSnapshotRow>",
|
||||
"TableUpdate",
|
||||
).with_cause(e).into()
|
||||
})
|
||||
}
|
||||
|
||||
#[allow(non_camel_case_types)]
|
||||
/// Extension trait for query builder access to the table `RuntimeSnapshotRow`.
|
||||
///
|
||||
/// Implemented for [`__sdk::QueryTableAccessor`].
|
||||
pub trait runtime_snapshotQueryTableAccess {
|
||||
#[allow(non_snake_case)]
|
||||
/// Get a query builder for the table `RuntimeSnapshotRow`.
|
||||
fn runtime_snapshot(&self) -> __sdk::__query_builder::Table<RuntimeSnapshotRow>;
|
||||
}
|
||||
|
||||
impl runtime_snapshotQueryTableAccess for __sdk::QueryTableAccessor {
|
||||
fn runtime_snapshot(&self) -> __sdk::__query_builder::Table<RuntimeSnapshotRow> {
|
||||
__sdk::__query_builder::Table::new("runtime_snapshot")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,164 +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::story_event_type::StoryEvent;
|
||||
use super::story_event_kind_type::StoryEventKind;
|
||||
|
||||
/// Table handle for the table `story_event`.
|
||||
///
|
||||
/// Obtain a handle from the [`StoryEventTableAccess::story_event`] method on [`super::RemoteTables`],
|
||||
/// like `ctx.db.story_event()`.
|
||||
///
|
||||
/// Users are encouraged not to explicitly reference this type,
|
||||
/// but to directly chain method calls,
|
||||
/// like `ctx.db.story_event().on_insert(...)`.
|
||||
pub struct StoryEventTableHandle<'ctx> {
|
||||
imp: __sdk::TableHandle<StoryEvent>,
|
||||
ctx: std::marker::PhantomData<&'ctx super::RemoteTables>,
|
||||
}
|
||||
|
||||
#[allow(non_camel_case_types)]
|
||||
/// Extension trait for access to the table `story_event`.
|
||||
///
|
||||
/// Implemented for [`super::RemoteTables`].
|
||||
pub trait StoryEventTableAccess {
|
||||
#[allow(non_snake_case)]
|
||||
/// Obtain a [`StoryEventTableHandle`], which mediates access to the table `story_event`.
|
||||
fn story_event(&self) -> StoryEventTableHandle<'_>;
|
||||
}
|
||||
|
||||
impl StoryEventTableAccess for super::RemoteTables {
|
||||
fn story_event(&self) -> StoryEventTableHandle<'_> {
|
||||
StoryEventTableHandle {
|
||||
imp: self.imp.get_table::<StoryEvent>("story_event"),
|
||||
ctx: std::marker::PhantomData,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct StoryEventInsertCallbackId(__sdk::CallbackId);
|
||||
pub struct StoryEventDeleteCallbackId(__sdk::CallbackId);
|
||||
|
||||
impl<'ctx> __sdk::Table for StoryEventTableHandle<'ctx> {
|
||||
type Row = StoryEvent;
|
||||
type EventContext = super::EventContext;
|
||||
|
||||
fn count(&self) -> u64 { self.imp.count() }
|
||||
fn iter(&self) -> impl Iterator<Item = StoryEvent> + '_ { self.imp.iter() }
|
||||
|
||||
type InsertCallbackId = StoryEventInsertCallbackId;
|
||||
|
||||
fn on_insert(
|
||||
&self,
|
||||
callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static,
|
||||
) -> StoryEventInsertCallbackId {
|
||||
StoryEventInsertCallbackId(self.imp.on_insert(Box::new(callback)))
|
||||
}
|
||||
|
||||
fn remove_on_insert(&self, callback: StoryEventInsertCallbackId) {
|
||||
self.imp.remove_on_insert(callback.0)
|
||||
}
|
||||
|
||||
type DeleteCallbackId = StoryEventDeleteCallbackId;
|
||||
|
||||
fn on_delete(
|
||||
&self,
|
||||
callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static,
|
||||
) -> StoryEventDeleteCallbackId {
|
||||
StoryEventDeleteCallbackId(self.imp.on_delete(Box::new(callback)))
|
||||
}
|
||||
|
||||
fn remove_on_delete(&self, callback: StoryEventDeleteCallbackId) {
|
||||
self.imp.remove_on_delete(callback.0)
|
||||
}
|
||||
}
|
||||
|
||||
pub struct StoryEventUpdateCallbackId(__sdk::CallbackId);
|
||||
|
||||
impl<'ctx> __sdk::TableWithPrimaryKey for StoryEventTableHandle<'ctx> {
|
||||
type UpdateCallbackId = StoryEventUpdateCallbackId;
|
||||
|
||||
fn on_update(
|
||||
&self,
|
||||
callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static,
|
||||
) -> StoryEventUpdateCallbackId {
|
||||
StoryEventUpdateCallbackId(self.imp.on_update(Box::new(callback)))
|
||||
}
|
||||
|
||||
fn remove_on_update(&self, callback: StoryEventUpdateCallbackId) {
|
||||
self.imp.remove_on_update(callback.0)
|
||||
}
|
||||
}
|
||||
|
||||
/// Access to the `event_id` unique index on the table `story_event`,
|
||||
/// which allows point queries on the field of the same name
|
||||
/// via the [`StoryEventEventIdUnique::find`] method.
|
||||
///
|
||||
/// Users are encouraged not to explicitly reference this type,
|
||||
/// but to directly chain method calls,
|
||||
/// like `ctx.db.story_event().event_id().find(...)`.
|
||||
pub struct StoryEventEventIdUnique<'ctx> {
|
||||
imp: __sdk::UniqueConstraintHandle<StoryEvent, String>,
|
||||
phantom: std::marker::PhantomData<&'ctx super::RemoteTables>,
|
||||
}
|
||||
|
||||
impl<'ctx> StoryEventTableHandle<'ctx> {
|
||||
/// Get a handle on the `event_id` unique index on the table `story_event`.
|
||||
pub fn event_id(&self) -> StoryEventEventIdUnique<'ctx> {
|
||||
StoryEventEventIdUnique {
|
||||
imp: self.imp.get_unique_constraint::<String>("event_id"),
|
||||
phantom: std::marker::PhantomData,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<'ctx> StoryEventEventIdUnique<'ctx> {
|
||||
/// Find the subscribed row whose `event_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<StoryEvent> {
|
||||
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::<StoryEvent>("story_event");
|
||||
_table.add_unique_constraint::<String>("event_id", |row| &row.event_id);
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
pub(super) fn parse_table_update(
|
||||
raw_updates: __ws::v2::TableUpdate,
|
||||
) -> __sdk::Result<__sdk::TableUpdate<StoryEvent>> {
|
||||
__sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| {
|
||||
__sdk::InternalError::failed_parse(
|
||||
"TableUpdate<StoryEvent>",
|
||||
"TableUpdate",
|
||||
).with_cause(e).into()
|
||||
})
|
||||
}
|
||||
|
||||
#[allow(non_camel_case_types)]
|
||||
/// Extension trait for query builder access to the table `StoryEvent`.
|
||||
///
|
||||
/// Implemented for [`__sdk::QueryTableAccessor`].
|
||||
pub trait story_eventQueryTableAccess {
|
||||
#[allow(non_snake_case)]
|
||||
/// Get a query builder for the table `StoryEvent`.
|
||||
fn story_event(&self) -> __sdk::__query_builder::Table<StoryEvent>;
|
||||
}
|
||||
|
||||
impl story_eventQueryTableAccess for __sdk::QueryTableAccessor {
|
||||
fn story_event(&self) -> __sdk::__query_builder::Table<StoryEvent> {
|
||||
__sdk::__query_builder::Table::new("story_event")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,164 +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::story_session_type::StorySession;
|
||||
use super::story_session_status_type::StorySessionStatus;
|
||||
|
||||
/// Table handle for the table `story_session`.
|
||||
///
|
||||
/// Obtain a handle from the [`StorySessionTableAccess::story_session`] method on [`super::RemoteTables`],
|
||||
/// like `ctx.db.story_session()`.
|
||||
///
|
||||
/// Users are encouraged not to explicitly reference this type,
|
||||
/// but to directly chain method calls,
|
||||
/// like `ctx.db.story_session().on_insert(...)`.
|
||||
pub struct StorySessionTableHandle<'ctx> {
|
||||
imp: __sdk::TableHandle<StorySession>,
|
||||
ctx: std::marker::PhantomData<&'ctx super::RemoteTables>,
|
||||
}
|
||||
|
||||
#[allow(non_camel_case_types)]
|
||||
/// Extension trait for access to the table `story_session`.
|
||||
///
|
||||
/// Implemented for [`super::RemoteTables`].
|
||||
pub trait StorySessionTableAccess {
|
||||
#[allow(non_snake_case)]
|
||||
/// Obtain a [`StorySessionTableHandle`], which mediates access to the table `story_session`.
|
||||
fn story_session(&self) -> StorySessionTableHandle<'_>;
|
||||
}
|
||||
|
||||
impl StorySessionTableAccess for super::RemoteTables {
|
||||
fn story_session(&self) -> StorySessionTableHandle<'_> {
|
||||
StorySessionTableHandle {
|
||||
imp: self.imp.get_table::<StorySession>("story_session"),
|
||||
ctx: std::marker::PhantomData,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct StorySessionInsertCallbackId(__sdk::CallbackId);
|
||||
pub struct StorySessionDeleteCallbackId(__sdk::CallbackId);
|
||||
|
||||
impl<'ctx> __sdk::Table for StorySessionTableHandle<'ctx> {
|
||||
type Row = StorySession;
|
||||
type EventContext = super::EventContext;
|
||||
|
||||
fn count(&self) -> u64 { self.imp.count() }
|
||||
fn iter(&self) -> impl Iterator<Item = StorySession> + '_ { self.imp.iter() }
|
||||
|
||||
type InsertCallbackId = StorySessionInsertCallbackId;
|
||||
|
||||
fn on_insert(
|
||||
&self,
|
||||
callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static,
|
||||
) -> StorySessionInsertCallbackId {
|
||||
StorySessionInsertCallbackId(self.imp.on_insert(Box::new(callback)))
|
||||
}
|
||||
|
||||
fn remove_on_insert(&self, callback: StorySessionInsertCallbackId) {
|
||||
self.imp.remove_on_insert(callback.0)
|
||||
}
|
||||
|
||||
type DeleteCallbackId = StorySessionDeleteCallbackId;
|
||||
|
||||
fn on_delete(
|
||||
&self,
|
||||
callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static,
|
||||
) -> StorySessionDeleteCallbackId {
|
||||
StorySessionDeleteCallbackId(self.imp.on_delete(Box::new(callback)))
|
||||
}
|
||||
|
||||
fn remove_on_delete(&self, callback: StorySessionDeleteCallbackId) {
|
||||
self.imp.remove_on_delete(callback.0)
|
||||
}
|
||||
}
|
||||
|
||||
pub struct StorySessionUpdateCallbackId(__sdk::CallbackId);
|
||||
|
||||
impl<'ctx> __sdk::TableWithPrimaryKey for StorySessionTableHandle<'ctx> {
|
||||
type UpdateCallbackId = StorySessionUpdateCallbackId;
|
||||
|
||||
fn on_update(
|
||||
&self,
|
||||
callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static,
|
||||
) -> StorySessionUpdateCallbackId {
|
||||
StorySessionUpdateCallbackId(self.imp.on_update(Box::new(callback)))
|
||||
}
|
||||
|
||||
fn remove_on_update(&self, callback: StorySessionUpdateCallbackId) {
|
||||
self.imp.remove_on_update(callback.0)
|
||||
}
|
||||
}
|
||||
|
||||
/// Access to the `story_session_id` unique index on the table `story_session`,
|
||||
/// which allows point queries on the field of the same name
|
||||
/// via the [`StorySessionStorySessionIdUnique::find`] method.
|
||||
///
|
||||
/// Users are encouraged not to explicitly reference this type,
|
||||
/// but to directly chain method calls,
|
||||
/// like `ctx.db.story_session().story_session_id().find(...)`.
|
||||
pub struct StorySessionStorySessionIdUnique<'ctx> {
|
||||
imp: __sdk::UniqueConstraintHandle<StorySession, String>,
|
||||
phantom: std::marker::PhantomData<&'ctx super::RemoteTables>,
|
||||
}
|
||||
|
||||
impl<'ctx> StorySessionTableHandle<'ctx> {
|
||||
/// Get a handle on the `story_session_id` unique index on the table `story_session`.
|
||||
pub fn story_session_id(&self) -> StorySessionStorySessionIdUnique<'ctx> {
|
||||
StorySessionStorySessionIdUnique {
|
||||
imp: self.imp.get_unique_constraint::<String>("story_session_id"),
|
||||
phantom: std::marker::PhantomData,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<'ctx> StorySessionStorySessionIdUnique<'ctx> {
|
||||
/// Find the subscribed row whose `story_session_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<StorySession> {
|
||||
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::<StorySession>("story_session");
|
||||
_table.add_unique_constraint::<String>("story_session_id", |row| &row.story_session_id);
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
pub(super) fn parse_table_update(
|
||||
raw_updates: __ws::v2::TableUpdate,
|
||||
) -> __sdk::Result<__sdk::TableUpdate<StorySession>> {
|
||||
__sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| {
|
||||
__sdk::InternalError::failed_parse(
|
||||
"TableUpdate<StorySession>",
|
||||
"TableUpdate",
|
||||
).with_cause(e).into()
|
||||
})
|
||||
}
|
||||
|
||||
#[allow(non_camel_case_types)]
|
||||
/// Extension trait for query builder access to the table `StorySession`.
|
||||
///
|
||||
/// Implemented for [`__sdk::QueryTableAccessor`].
|
||||
pub trait story_sessionQueryTableAccess {
|
||||
#[allow(non_snake_case)]
|
||||
/// Get a query builder for the table `StorySession`.
|
||||
fn story_session(&self) -> __sdk::__query_builder::Table<StorySession>;
|
||||
}
|
||||
|
||||
impl story_sessionQueryTableAccess for __sdk::QueryTableAccessor {
|
||||
fn story_session(&self) -> __sdk::__query_builder::Table<StorySession> {
|
||||
__sdk::__query_builder::Table::new("story_session")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,165 +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::treasure_record_type::TreasureRecord;
|
||||
use super::runtime_item_reward_item_snapshot_type::RuntimeItemRewardItemSnapshot;
|
||||
use super::treasure_interaction_action_type::TreasureInteractionAction;
|
||||
|
||||
/// Table handle for the table `treasure_record`.
|
||||
///
|
||||
/// Obtain a handle from the [`TreasureRecordTableAccess::treasure_record`] method on [`super::RemoteTables`],
|
||||
/// like `ctx.db.treasure_record()`.
|
||||
///
|
||||
/// Users are encouraged not to explicitly reference this type,
|
||||
/// but to directly chain method calls,
|
||||
/// like `ctx.db.treasure_record().on_insert(...)`.
|
||||
pub struct TreasureRecordTableHandle<'ctx> {
|
||||
imp: __sdk::TableHandle<TreasureRecord>,
|
||||
ctx: std::marker::PhantomData<&'ctx super::RemoteTables>,
|
||||
}
|
||||
|
||||
#[allow(non_camel_case_types)]
|
||||
/// Extension trait for access to the table `treasure_record`.
|
||||
///
|
||||
/// Implemented for [`super::RemoteTables`].
|
||||
pub trait TreasureRecordTableAccess {
|
||||
#[allow(non_snake_case)]
|
||||
/// Obtain a [`TreasureRecordTableHandle`], which mediates access to the table `treasure_record`.
|
||||
fn treasure_record(&self) -> TreasureRecordTableHandle<'_>;
|
||||
}
|
||||
|
||||
impl TreasureRecordTableAccess for super::RemoteTables {
|
||||
fn treasure_record(&self) -> TreasureRecordTableHandle<'_> {
|
||||
TreasureRecordTableHandle {
|
||||
imp: self.imp.get_table::<TreasureRecord>("treasure_record"),
|
||||
ctx: std::marker::PhantomData,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct TreasureRecordInsertCallbackId(__sdk::CallbackId);
|
||||
pub struct TreasureRecordDeleteCallbackId(__sdk::CallbackId);
|
||||
|
||||
impl<'ctx> __sdk::Table for TreasureRecordTableHandle<'ctx> {
|
||||
type Row = TreasureRecord;
|
||||
type EventContext = super::EventContext;
|
||||
|
||||
fn count(&self) -> u64 { self.imp.count() }
|
||||
fn iter(&self) -> impl Iterator<Item = TreasureRecord> + '_ { self.imp.iter() }
|
||||
|
||||
type InsertCallbackId = TreasureRecordInsertCallbackId;
|
||||
|
||||
fn on_insert(
|
||||
&self,
|
||||
callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static,
|
||||
) -> TreasureRecordInsertCallbackId {
|
||||
TreasureRecordInsertCallbackId(self.imp.on_insert(Box::new(callback)))
|
||||
}
|
||||
|
||||
fn remove_on_insert(&self, callback: TreasureRecordInsertCallbackId) {
|
||||
self.imp.remove_on_insert(callback.0)
|
||||
}
|
||||
|
||||
type DeleteCallbackId = TreasureRecordDeleteCallbackId;
|
||||
|
||||
fn on_delete(
|
||||
&self,
|
||||
callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static,
|
||||
) -> TreasureRecordDeleteCallbackId {
|
||||
TreasureRecordDeleteCallbackId(self.imp.on_delete(Box::new(callback)))
|
||||
}
|
||||
|
||||
fn remove_on_delete(&self, callback: TreasureRecordDeleteCallbackId) {
|
||||
self.imp.remove_on_delete(callback.0)
|
||||
}
|
||||
}
|
||||
|
||||
pub struct TreasureRecordUpdateCallbackId(__sdk::CallbackId);
|
||||
|
||||
impl<'ctx> __sdk::TableWithPrimaryKey for TreasureRecordTableHandle<'ctx> {
|
||||
type UpdateCallbackId = TreasureRecordUpdateCallbackId;
|
||||
|
||||
fn on_update(
|
||||
&self,
|
||||
callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static,
|
||||
) -> TreasureRecordUpdateCallbackId {
|
||||
TreasureRecordUpdateCallbackId(self.imp.on_update(Box::new(callback)))
|
||||
}
|
||||
|
||||
fn remove_on_update(&self, callback: TreasureRecordUpdateCallbackId) {
|
||||
self.imp.remove_on_update(callback.0)
|
||||
}
|
||||
}
|
||||
|
||||
/// Access to the `treasure_record_id` unique index on the table `treasure_record`,
|
||||
/// which allows point queries on the field of the same name
|
||||
/// via the [`TreasureRecordTreasureRecordIdUnique::find`] method.
|
||||
///
|
||||
/// Users are encouraged not to explicitly reference this type,
|
||||
/// but to directly chain method calls,
|
||||
/// like `ctx.db.treasure_record().treasure_record_id().find(...)`.
|
||||
pub struct TreasureRecordTreasureRecordIdUnique<'ctx> {
|
||||
imp: __sdk::UniqueConstraintHandle<TreasureRecord, String>,
|
||||
phantom: std::marker::PhantomData<&'ctx super::RemoteTables>,
|
||||
}
|
||||
|
||||
impl<'ctx> TreasureRecordTableHandle<'ctx> {
|
||||
/// Get a handle on the `treasure_record_id` unique index on the table `treasure_record`.
|
||||
pub fn treasure_record_id(&self) -> TreasureRecordTreasureRecordIdUnique<'ctx> {
|
||||
TreasureRecordTreasureRecordIdUnique {
|
||||
imp: self.imp.get_unique_constraint::<String>("treasure_record_id"),
|
||||
phantom: std::marker::PhantomData,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<'ctx> TreasureRecordTreasureRecordIdUnique<'ctx> {
|
||||
/// Find the subscribed row whose `treasure_record_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<TreasureRecord> {
|
||||
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::<TreasureRecord>("treasure_record");
|
||||
_table.add_unique_constraint::<String>("treasure_record_id", |row| &row.treasure_record_id);
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
pub(super) fn parse_table_update(
|
||||
raw_updates: __ws::v2::TableUpdate,
|
||||
) -> __sdk::Result<__sdk::TableUpdate<TreasureRecord>> {
|
||||
__sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| {
|
||||
__sdk::InternalError::failed_parse(
|
||||
"TableUpdate<TreasureRecord>",
|
||||
"TableUpdate",
|
||||
).with_cause(e).into()
|
||||
})
|
||||
}
|
||||
|
||||
#[allow(non_camel_case_types)]
|
||||
/// Extension trait for query builder access to the table `TreasureRecord`.
|
||||
///
|
||||
/// Implemented for [`__sdk::QueryTableAccessor`].
|
||||
pub trait treasure_recordQueryTableAccess {
|
||||
#[allow(non_snake_case)]
|
||||
/// Get a query builder for the table `TreasureRecord`.
|
||||
fn treasure_record(&self) -> __sdk::__query_builder::Table<TreasureRecord>;
|
||||
}
|
||||
|
||||
impl treasure_recordQueryTableAccess for __sdk::QueryTableAccessor {
|
||||
fn treasure_record(&self) -> __sdk::__query_builder::Table<TreasureRecord> {
|
||||
__sdk::__query_builder::Table::new("treasure_record")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,163 +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::user_account_type::UserAccount;
|
||||
|
||||
/// Table handle for the table `user_account`.
|
||||
///
|
||||
/// Obtain a handle from the [`UserAccountTableAccess::user_account`] method on [`super::RemoteTables`],
|
||||
/// like `ctx.db.user_account()`.
|
||||
///
|
||||
/// Users are encouraged not to explicitly reference this type,
|
||||
/// but to directly chain method calls,
|
||||
/// like `ctx.db.user_account().on_insert(...)`.
|
||||
pub struct UserAccountTableHandle<'ctx> {
|
||||
imp: __sdk::TableHandle<UserAccount>,
|
||||
ctx: std::marker::PhantomData<&'ctx super::RemoteTables>,
|
||||
}
|
||||
|
||||
#[allow(non_camel_case_types)]
|
||||
/// Extension trait for access to the table `user_account`.
|
||||
///
|
||||
/// Implemented for [`super::RemoteTables`].
|
||||
pub trait UserAccountTableAccess {
|
||||
#[allow(non_snake_case)]
|
||||
/// Obtain a [`UserAccountTableHandle`], which mediates access to the table `user_account`.
|
||||
fn user_account(&self) -> UserAccountTableHandle<'_>;
|
||||
}
|
||||
|
||||
impl UserAccountTableAccess for super::RemoteTables {
|
||||
fn user_account(&self) -> UserAccountTableHandle<'_> {
|
||||
UserAccountTableHandle {
|
||||
imp: self.imp.get_table::<UserAccount>("user_account"),
|
||||
ctx: std::marker::PhantomData,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct UserAccountInsertCallbackId(__sdk::CallbackId);
|
||||
pub struct UserAccountDeleteCallbackId(__sdk::CallbackId);
|
||||
|
||||
impl<'ctx> __sdk::Table for UserAccountTableHandle<'ctx> {
|
||||
type Row = UserAccount;
|
||||
type EventContext = super::EventContext;
|
||||
|
||||
fn count(&self) -> u64 { self.imp.count() }
|
||||
fn iter(&self) -> impl Iterator<Item = UserAccount> + '_ { self.imp.iter() }
|
||||
|
||||
type InsertCallbackId = UserAccountInsertCallbackId;
|
||||
|
||||
fn on_insert(
|
||||
&self,
|
||||
callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static,
|
||||
) -> UserAccountInsertCallbackId {
|
||||
UserAccountInsertCallbackId(self.imp.on_insert(Box::new(callback)))
|
||||
}
|
||||
|
||||
fn remove_on_insert(&self, callback: UserAccountInsertCallbackId) {
|
||||
self.imp.remove_on_insert(callback.0)
|
||||
}
|
||||
|
||||
type DeleteCallbackId = UserAccountDeleteCallbackId;
|
||||
|
||||
fn on_delete(
|
||||
&self,
|
||||
callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static,
|
||||
) -> UserAccountDeleteCallbackId {
|
||||
UserAccountDeleteCallbackId(self.imp.on_delete(Box::new(callback)))
|
||||
}
|
||||
|
||||
fn remove_on_delete(&self, callback: UserAccountDeleteCallbackId) {
|
||||
self.imp.remove_on_delete(callback.0)
|
||||
}
|
||||
}
|
||||
|
||||
pub struct UserAccountUpdateCallbackId(__sdk::CallbackId);
|
||||
|
||||
impl<'ctx> __sdk::TableWithPrimaryKey for UserAccountTableHandle<'ctx> {
|
||||
type UpdateCallbackId = UserAccountUpdateCallbackId;
|
||||
|
||||
fn on_update(
|
||||
&self,
|
||||
callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static,
|
||||
) -> UserAccountUpdateCallbackId {
|
||||
UserAccountUpdateCallbackId(self.imp.on_update(Box::new(callback)))
|
||||
}
|
||||
|
||||
fn remove_on_update(&self, callback: UserAccountUpdateCallbackId) {
|
||||
self.imp.remove_on_update(callback.0)
|
||||
}
|
||||
}
|
||||
|
||||
/// Access to the `user_id` unique index on the table `user_account`,
|
||||
/// which allows point queries on the field of the same name
|
||||
/// via the [`UserAccountUserIdUnique::find`] method.
|
||||
///
|
||||
/// Users are encouraged not to explicitly reference this type,
|
||||
/// but to directly chain method calls,
|
||||
/// like `ctx.db.user_account().user_id().find(...)`.
|
||||
pub struct UserAccountUserIdUnique<'ctx> {
|
||||
imp: __sdk::UniqueConstraintHandle<UserAccount, String>,
|
||||
phantom: std::marker::PhantomData<&'ctx super::RemoteTables>,
|
||||
}
|
||||
|
||||
impl<'ctx> UserAccountTableHandle<'ctx> {
|
||||
/// Get a handle on the `user_id` unique index on the table `user_account`.
|
||||
pub fn user_id(&self) -> UserAccountUserIdUnique<'ctx> {
|
||||
UserAccountUserIdUnique {
|
||||
imp: self.imp.get_unique_constraint::<String>("user_id"),
|
||||
phantom: std::marker::PhantomData,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<'ctx> UserAccountUserIdUnique<'ctx> {
|
||||
/// Find the subscribed row whose `user_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<UserAccount> {
|
||||
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::<UserAccount>("user_account");
|
||||
_table.add_unique_constraint::<String>("user_id", |row| &row.user_id);
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
pub(super) fn parse_table_update(
|
||||
raw_updates: __ws::v2::TableUpdate,
|
||||
) -> __sdk::Result<__sdk::TableUpdate<UserAccount>> {
|
||||
__sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| {
|
||||
__sdk::InternalError::failed_parse(
|
||||
"TableUpdate<UserAccount>",
|
||||
"TableUpdate",
|
||||
).with_cause(e).into()
|
||||
})
|
||||
}
|
||||
|
||||
#[allow(non_camel_case_types)]
|
||||
/// Extension trait for query builder access to the table `UserAccount`.
|
||||
///
|
||||
/// Implemented for [`__sdk::QueryTableAccessor`].
|
||||
pub trait user_accountQueryTableAccess {
|
||||
#[allow(non_snake_case)]
|
||||
/// Get a query builder for the table `UserAccount`.
|
||||
fn user_account(&self) -> __sdk::__query_builder::Table<UserAccount>;
|
||||
}
|
||||
|
||||
impl user_accountQueryTableAccess for __sdk::QueryTableAccessor {
|
||||
fn user_account(&self) -> __sdk::__query_builder::Table<UserAccount> {
|
||||
__sdk::__query_builder::Table::new("user_account")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,164 +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::user_browse_history_type::UserBrowseHistory;
|
||||
use super::runtime_browse_history_theme_mode_type::RuntimeBrowseHistoryThemeMode;
|
||||
|
||||
/// Table handle for the table `user_browse_history`.
|
||||
///
|
||||
/// Obtain a handle from the [`UserBrowseHistoryTableAccess::user_browse_history`] method on [`super::RemoteTables`],
|
||||
/// like `ctx.db.user_browse_history()`.
|
||||
///
|
||||
/// Users are encouraged not to explicitly reference this type,
|
||||
/// but to directly chain method calls,
|
||||
/// like `ctx.db.user_browse_history().on_insert(...)`.
|
||||
pub struct UserBrowseHistoryTableHandle<'ctx> {
|
||||
imp: __sdk::TableHandle<UserBrowseHistory>,
|
||||
ctx: std::marker::PhantomData<&'ctx super::RemoteTables>,
|
||||
}
|
||||
|
||||
#[allow(non_camel_case_types)]
|
||||
/// Extension trait for access to the table `user_browse_history`.
|
||||
///
|
||||
/// Implemented for [`super::RemoteTables`].
|
||||
pub trait UserBrowseHistoryTableAccess {
|
||||
#[allow(non_snake_case)]
|
||||
/// Obtain a [`UserBrowseHistoryTableHandle`], which mediates access to the table `user_browse_history`.
|
||||
fn user_browse_history(&self) -> UserBrowseHistoryTableHandle<'_>;
|
||||
}
|
||||
|
||||
impl UserBrowseHistoryTableAccess for super::RemoteTables {
|
||||
fn user_browse_history(&self) -> UserBrowseHistoryTableHandle<'_> {
|
||||
UserBrowseHistoryTableHandle {
|
||||
imp: self.imp.get_table::<UserBrowseHistory>("user_browse_history"),
|
||||
ctx: std::marker::PhantomData,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct UserBrowseHistoryInsertCallbackId(__sdk::CallbackId);
|
||||
pub struct UserBrowseHistoryDeleteCallbackId(__sdk::CallbackId);
|
||||
|
||||
impl<'ctx> __sdk::Table for UserBrowseHistoryTableHandle<'ctx> {
|
||||
type Row = UserBrowseHistory;
|
||||
type EventContext = super::EventContext;
|
||||
|
||||
fn count(&self) -> u64 { self.imp.count() }
|
||||
fn iter(&self) -> impl Iterator<Item = UserBrowseHistory> + '_ { self.imp.iter() }
|
||||
|
||||
type InsertCallbackId = UserBrowseHistoryInsertCallbackId;
|
||||
|
||||
fn on_insert(
|
||||
&self,
|
||||
callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static,
|
||||
) -> UserBrowseHistoryInsertCallbackId {
|
||||
UserBrowseHistoryInsertCallbackId(self.imp.on_insert(Box::new(callback)))
|
||||
}
|
||||
|
||||
fn remove_on_insert(&self, callback: UserBrowseHistoryInsertCallbackId) {
|
||||
self.imp.remove_on_insert(callback.0)
|
||||
}
|
||||
|
||||
type DeleteCallbackId = UserBrowseHistoryDeleteCallbackId;
|
||||
|
||||
fn on_delete(
|
||||
&self,
|
||||
callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static,
|
||||
) -> UserBrowseHistoryDeleteCallbackId {
|
||||
UserBrowseHistoryDeleteCallbackId(self.imp.on_delete(Box::new(callback)))
|
||||
}
|
||||
|
||||
fn remove_on_delete(&self, callback: UserBrowseHistoryDeleteCallbackId) {
|
||||
self.imp.remove_on_delete(callback.0)
|
||||
}
|
||||
}
|
||||
|
||||
pub struct UserBrowseHistoryUpdateCallbackId(__sdk::CallbackId);
|
||||
|
||||
impl<'ctx> __sdk::TableWithPrimaryKey for UserBrowseHistoryTableHandle<'ctx> {
|
||||
type UpdateCallbackId = UserBrowseHistoryUpdateCallbackId;
|
||||
|
||||
fn on_update(
|
||||
&self,
|
||||
callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static,
|
||||
) -> UserBrowseHistoryUpdateCallbackId {
|
||||
UserBrowseHistoryUpdateCallbackId(self.imp.on_update(Box::new(callback)))
|
||||
}
|
||||
|
||||
fn remove_on_update(&self, callback: UserBrowseHistoryUpdateCallbackId) {
|
||||
self.imp.remove_on_update(callback.0)
|
||||
}
|
||||
}
|
||||
|
||||
/// Access to the `browse_history_id` unique index on the table `user_browse_history`,
|
||||
/// which allows point queries on the field of the same name
|
||||
/// via the [`UserBrowseHistoryBrowseHistoryIdUnique::find`] method.
|
||||
///
|
||||
/// Users are encouraged not to explicitly reference this type,
|
||||
/// but to directly chain method calls,
|
||||
/// like `ctx.db.user_browse_history().browse_history_id().find(...)`.
|
||||
pub struct UserBrowseHistoryBrowseHistoryIdUnique<'ctx> {
|
||||
imp: __sdk::UniqueConstraintHandle<UserBrowseHistory, String>,
|
||||
phantom: std::marker::PhantomData<&'ctx super::RemoteTables>,
|
||||
}
|
||||
|
||||
impl<'ctx> UserBrowseHistoryTableHandle<'ctx> {
|
||||
/// Get a handle on the `browse_history_id` unique index on the table `user_browse_history`.
|
||||
pub fn browse_history_id(&self) -> UserBrowseHistoryBrowseHistoryIdUnique<'ctx> {
|
||||
UserBrowseHistoryBrowseHistoryIdUnique {
|
||||
imp: self.imp.get_unique_constraint::<String>("browse_history_id"),
|
||||
phantom: std::marker::PhantomData,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<'ctx> UserBrowseHistoryBrowseHistoryIdUnique<'ctx> {
|
||||
/// Find the subscribed row whose `browse_history_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<UserBrowseHistory> {
|
||||
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::<UserBrowseHistory>("user_browse_history");
|
||||
_table.add_unique_constraint::<String>("browse_history_id", |row| &row.browse_history_id);
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
pub(super) fn parse_table_update(
|
||||
raw_updates: __ws::v2::TableUpdate,
|
||||
) -> __sdk::Result<__sdk::TableUpdate<UserBrowseHistory>> {
|
||||
__sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| {
|
||||
__sdk::InternalError::failed_parse(
|
||||
"TableUpdate<UserBrowseHistory>",
|
||||
"TableUpdate",
|
||||
).with_cause(e).into()
|
||||
})
|
||||
}
|
||||
|
||||
#[allow(non_camel_case_types)]
|
||||
/// Extension trait for query builder access to the table `UserBrowseHistory`.
|
||||
///
|
||||
/// Implemented for [`__sdk::QueryTableAccessor`].
|
||||
pub trait user_browse_historyQueryTableAccess {
|
||||
#[allow(non_snake_case)]
|
||||
/// Get a query builder for the table `UserBrowseHistory`.
|
||||
fn user_browse_history(&self) -> __sdk::__query_builder::Table<UserBrowseHistory>;
|
||||
}
|
||||
|
||||
impl user_browse_historyQueryTableAccess for __sdk::QueryTableAccessor {
|
||||
fn user_browse_history(&self) -> __sdk::__query_builder::Table<UserBrowseHistory> {
|
||||
__sdk::__query_builder::Table::new("user_browse_history")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user