feat: add analytics date dimension bindings
Some checks failed
CI / verify (push) Has been cancelled

- lock profile task tracking scope to user

- add analytics date dimension module support and tests

- regenerate SpacetimeDB Rust bindings with private APIs
This commit is contained in:
2026-05-04 13:41:22 +08:00
committed by 历冰郁-hermes版
parent 9f3e34e81a
commit 5c7c039e52
253 changed files with 14783 additions and 1462 deletions

View File

@@ -47,11 +47,9 @@ pub trait accept_quest {
&self,
input: QuestRecordInput,
callback: impl FnOnce(
&super::ReducerEventContext,
Result<Result<(), String>, __sdk::InternalError>,
) + Send
+ 'static,
callback: impl FnOnce(&super::ReducerEventContext, Result<Result<(), String>, __sdk::InternalError>)
+ Send
+ 'static,
) -> __sdk::Result<()>;
}
@@ -60,11 +58,9 @@ impl accept_quest for super::RemoteReducers {
&self,
input: QuestRecordInput,
callback: impl FnOnce(
&super::ReducerEventContext,
Result<Result<(), String>, __sdk::InternalError>,
) + Send
+ 'static,
callback: impl FnOnce(&super::ReducerEventContext, Result<Result<(), String>, __sdk::InternalError>)
+ Send
+ 'static,
) -> __sdk::Result<()> {
self.imp
.invoke_reducer_with_callback(AcceptQuestArgs { input }, callback)

View File

@@ -47,11 +47,9 @@ pub trait acknowledge_quest_completion {
&self,
input: QuestCompletionAckInput,
callback: impl FnOnce(
&super::ReducerEventContext,
Result<Result<(), String>, __sdk::InternalError>,
) + Send
+ 'static,
callback: impl FnOnce(&super::ReducerEventContext, Result<Result<(), String>, __sdk::InternalError>)
+ Send
+ 'static,
) -> __sdk::Result<()>;
}
@@ -60,11 +58,9 @@ impl acknowledge_quest_completion for super::RemoteReducers {
&self,
input: QuestCompletionAckInput,
callback: impl FnOnce(
&super::ReducerEventContext,
Result<Result<(), String>, __sdk::InternalError>,
) + Send
+ 'static,
callback: impl FnOnce(&super::ReducerEventContext, Result<Result<(), String>, __sdk::InternalError>)
+ Send
+ 'static,
) -> __sdk::Result<()> {
self.imp
.invoke_reducer_with_callback(AcknowledgeQuestCompletionArgs { input }, callback)

View File

@@ -31,10 +31,10 @@ pub trait admin_disable_profile_redeem_code {
input: RuntimeProfileRedeemCodeAdminDisableInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<RuntimeProfileRedeemCodeAdminProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
&super::ProcedureEventContext,
Result<RuntimeProfileRedeemCodeAdminProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
);
}
@@ -44,10 +44,10 @@ impl admin_disable_profile_redeem_code for super::RemoteProcedures {
input: RuntimeProfileRedeemCodeAdminDisableInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<RuntimeProfileRedeemCodeAdminProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
&super::ProcedureEventContext,
Result<RuntimeProfileRedeemCodeAdminProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
) {
self.imp
.invoke_procedure_with_callback::<_, RuntimeProfileRedeemCodeAdminProcedureResult>(

View File

@@ -31,10 +31,10 @@ pub trait admin_disable_profile_task_config {
input: RuntimeProfileTaskConfigAdminDisableInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<RuntimeProfileTaskConfigAdminProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
&super::ProcedureEventContext,
Result<RuntimeProfileTaskConfigAdminProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
);
}
@@ -44,10 +44,10 @@ impl admin_disable_profile_task_config for super::RemoteProcedures {
input: RuntimeProfileTaskConfigAdminDisableInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<RuntimeProfileTaskConfigAdminProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
&super::ProcedureEventContext,
Result<RuntimeProfileTaskConfigAdminProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
) {
self.imp
.invoke_procedure_with_callback::<_, RuntimeProfileTaskConfigAdminProcedureResult>(

View File

@@ -31,10 +31,10 @@ pub trait admin_list_profile_invite_codes {
input: RuntimeProfileInviteCodeAdminListInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<RuntimeProfileInviteCodeAdminListProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
&super::ProcedureEventContext,
Result<RuntimeProfileInviteCodeAdminListProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
);
}
@@ -44,10 +44,10 @@ impl admin_list_profile_invite_codes for super::RemoteProcedures {
input: RuntimeProfileInviteCodeAdminListInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<RuntimeProfileInviteCodeAdminListProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
&super::ProcedureEventContext,
Result<RuntimeProfileInviteCodeAdminListProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
) {
self.imp
.invoke_procedure_with_callback::<_, RuntimeProfileInviteCodeAdminListProcedureResult>(

View File

@@ -31,10 +31,10 @@ pub trait admin_list_profile_redeem_codes {
input: RuntimeProfileRedeemCodeAdminListInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<RuntimeProfileRedeemCodeAdminListProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
&super::ProcedureEventContext,
Result<RuntimeProfileRedeemCodeAdminListProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
);
}
@@ -44,10 +44,10 @@ impl admin_list_profile_redeem_codes for super::RemoteProcedures {
input: RuntimeProfileRedeemCodeAdminListInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<RuntimeProfileRedeemCodeAdminListProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
&super::ProcedureEventContext,
Result<RuntimeProfileRedeemCodeAdminListProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
) {
self.imp
.invoke_procedure_with_callback::<_, RuntimeProfileRedeemCodeAdminListProcedureResult>(

View File

@@ -31,10 +31,10 @@ pub trait admin_list_profile_task_configs {
input: RuntimeProfileTaskConfigAdminListInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<RuntimeProfileTaskConfigAdminListProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
&super::ProcedureEventContext,
Result<RuntimeProfileTaskConfigAdminListProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
);
}
@@ -44,10 +44,10 @@ impl admin_list_profile_task_configs for super::RemoteProcedures {
input: RuntimeProfileTaskConfigAdminListInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<RuntimeProfileTaskConfigAdminListProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
&super::ProcedureEventContext,
Result<RuntimeProfileTaskConfigAdminListProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
) {
self.imp
.invoke_procedure_with_callback::<_, RuntimeProfileTaskConfigAdminListProcedureResult>(

View File

@@ -31,10 +31,10 @@ pub trait admin_upsert_profile_invite_code {
input: RuntimeProfileInviteCodeAdminUpsertInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<RuntimeProfileInviteCodeAdminProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
&super::ProcedureEventContext,
Result<RuntimeProfileInviteCodeAdminProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
);
}
@@ -44,10 +44,10 @@ impl admin_upsert_profile_invite_code for super::RemoteProcedures {
input: RuntimeProfileInviteCodeAdminUpsertInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<RuntimeProfileInviteCodeAdminProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
&super::ProcedureEventContext,
Result<RuntimeProfileInviteCodeAdminProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
) {
self.imp
.invoke_procedure_with_callback::<_, RuntimeProfileInviteCodeAdminProcedureResult>(

View File

@@ -31,10 +31,10 @@ pub trait admin_upsert_profile_redeem_code {
input: RuntimeProfileRedeemCodeAdminUpsertInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<RuntimeProfileRedeemCodeAdminProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
&super::ProcedureEventContext,
Result<RuntimeProfileRedeemCodeAdminProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
);
}
@@ -44,10 +44,10 @@ impl admin_upsert_profile_redeem_code for super::RemoteProcedures {
input: RuntimeProfileRedeemCodeAdminUpsertInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<RuntimeProfileRedeemCodeAdminProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
&super::ProcedureEventContext,
Result<RuntimeProfileRedeemCodeAdminProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
) {
self.imp
.invoke_procedure_with_callback::<_, RuntimeProfileRedeemCodeAdminProcedureResult>(

View File

@@ -31,10 +31,10 @@ pub trait admin_upsert_profile_task_config {
input: RuntimeProfileTaskConfigAdminUpsertInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<RuntimeProfileTaskConfigAdminProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
&super::ProcedureEventContext,
Result<RuntimeProfileTaskConfigAdminProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
);
}
@@ -44,10 +44,10 @@ impl admin_upsert_profile_task_config for super::RemoteProcedures {
input: RuntimeProfileTaskConfigAdminUpsertInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<RuntimeProfileTaskConfigAdminProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
&super::ProcedureEventContext,
Result<RuntimeProfileTaskConfigAdminProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
) {
self.imp
.invoke_procedure_with_callback::<_, RuntimeProfileTaskConfigAdminProcedureResult>(

View File

@@ -31,10 +31,10 @@ pub trait advance_puzzle_next_level {
input: PuzzleRunNextLevelInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<PuzzleRunProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
&super::ProcedureEventContext,
Result<PuzzleRunProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
);
}
@@ -44,10 +44,10 @@ impl advance_puzzle_next_level for super::RemoteProcedures {
input: PuzzleRunNextLevelInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<PuzzleRunProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
&super::ProcedureEventContext,
Result<PuzzleRunProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
) {
self.imp
.invoke_procedure_with_callback::<_, PuzzleRunProcedureResult>(

View File

@@ -0,0 +1,166 @@
// 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 super::ai_result_reference_kind_type::AiResultReferenceKind;
use super::ai_result_reference_type::AiResultReference;
use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws};
/// 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")
}
}

View File

@@ -0,0 +1,161 @@
// 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 super::ai_task_stage_kind_type::AiTaskStageKind;
use super::ai_task_stage_status_type::AiTaskStageStatus;
use super::ai_task_stage_type::AiTaskStage;
use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws};
/// 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")
}
}

View File

@@ -0,0 +1,161 @@
// 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 super::ai_task_kind_type::AiTaskKind;
use super::ai_task_status_type::AiTaskStatus;
use super::ai_task_type::AiTask;
use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws};
/// 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")
}
}

View File

@@ -0,0 +1,162 @@
// 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 super::ai_task_stage_kind_type::AiTaskStageKind;
use super::ai_text_chunk_type::AiTextChunk;
use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws};
/// 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")
}
}

View File

@@ -0,0 +1,15 @@
// 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};
#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)]
#[sats(crate = __lib)]
pub struct AnalyticsDateDimensionEnsureInput {
pub date_key: i64,
}
impl __sdk::InModule for AnalyticsDateDimensionEnsureInput {
type Module = super::RemoteModule;
}

View File

@@ -0,0 +1,16 @@
// 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};
#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)]
#[sats(crate = __lib)]
pub struct AnalyticsDateDimensionSeedInput {
pub start_date: String,
pub end_date: String,
}
impl __sdk::InModule for AnalyticsDateDimensionSeedInput {
type Module = super::RemoteModule;
}

View File

@@ -0,0 +1,162 @@
// 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 super::analytics_date_dimension_type::AnalyticsDateDimension;
use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws};
/// Table handle for the table `analytics_date_dimension`.
///
/// Obtain a handle from the [`AnalyticsDateDimensionTableAccess::analytics_date_dimension`] method on [`super::RemoteTables`],
/// like `ctx.db.analytics_date_dimension()`.
///
/// Users are encouraged not to explicitly reference this type,
/// but to directly chain method calls,
/// like `ctx.db.analytics_date_dimension().on_insert(...)`.
pub struct AnalyticsDateDimensionTableHandle<'ctx> {
imp: __sdk::TableHandle<AnalyticsDateDimension>,
ctx: std::marker::PhantomData<&'ctx super::RemoteTables>,
}
#[allow(non_camel_case_types)]
/// Extension trait for access to the table `analytics_date_dimension`.
///
/// Implemented for [`super::RemoteTables`].
pub trait AnalyticsDateDimensionTableAccess {
#[allow(non_snake_case)]
/// Obtain a [`AnalyticsDateDimensionTableHandle`], which mediates access to the table `analytics_date_dimension`.
fn analytics_date_dimension(&self) -> AnalyticsDateDimensionTableHandle<'_>;
}
impl AnalyticsDateDimensionTableAccess for super::RemoteTables {
fn analytics_date_dimension(&self) -> AnalyticsDateDimensionTableHandle<'_> {
AnalyticsDateDimensionTableHandle {
imp: self
.imp
.get_table::<AnalyticsDateDimension>("analytics_date_dimension"),
ctx: std::marker::PhantomData,
}
}
}
pub struct AnalyticsDateDimensionInsertCallbackId(__sdk::CallbackId);
pub struct AnalyticsDateDimensionDeleteCallbackId(__sdk::CallbackId);
impl<'ctx> __sdk::Table for AnalyticsDateDimensionTableHandle<'ctx> {
type Row = AnalyticsDateDimension;
type EventContext = super::EventContext;
fn count(&self) -> u64 {
self.imp.count()
}
fn iter(&self) -> impl Iterator<Item = AnalyticsDateDimension> + '_ {
self.imp.iter()
}
type InsertCallbackId = AnalyticsDateDimensionInsertCallbackId;
fn on_insert(
&self,
callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static,
) -> AnalyticsDateDimensionInsertCallbackId {
AnalyticsDateDimensionInsertCallbackId(self.imp.on_insert(Box::new(callback)))
}
fn remove_on_insert(&self, callback: AnalyticsDateDimensionInsertCallbackId) {
self.imp.remove_on_insert(callback.0)
}
type DeleteCallbackId = AnalyticsDateDimensionDeleteCallbackId;
fn on_delete(
&self,
callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static,
) -> AnalyticsDateDimensionDeleteCallbackId {
AnalyticsDateDimensionDeleteCallbackId(self.imp.on_delete(Box::new(callback)))
}
fn remove_on_delete(&self, callback: AnalyticsDateDimensionDeleteCallbackId) {
self.imp.remove_on_delete(callback.0)
}
}
pub struct AnalyticsDateDimensionUpdateCallbackId(__sdk::CallbackId);
impl<'ctx> __sdk::TableWithPrimaryKey for AnalyticsDateDimensionTableHandle<'ctx> {
type UpdateCallbackId = AnalyticsDateDimensionUpdateCallbackId;
fn on_update(
&self,
callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static,
) -> AnalyticsDateDimensionUpdateCallbackId {
AnalyticsDateDimensionUpdateCallbackId(self.imp.on_update(Box::new(callback)))
}
fn remove_on_update(&self, callback: AnalyticsDateDimensionUpdateCallbackId) {
self.imp.remove_on_update(callback.0)
}
}
/// Access to the `date_key` unique index on the table `analytics_date_dimension`,
/// which allows point queries on the field of the same name
/// via the [`AnalyticsDateDimensionDateKeyUnique::find`] method.
///
/// Users are encouraged not to explicitly reference this type,
/// but to directly chain method calls,
/// like `ctx.db.analytics_date_dimension().date_key().find(...)`.
pub struct AnalyticsDateDimensionDateKeyUnique<'ctx> {
imp: __sdk::UniqueConstraintHandle<AnalyticsDateDimension, i64>,
phantom: std::marker::PhantomData<&'ctx super::RemoteTables>,
}
impl<'ctx> AnalyticsDateDimensionTableHandle<'ctx> {
/// Get a handle on the `date_key` unique index on the table `analytics_date_dimension`.
pub fn date_key(&self) -> AnalyticsDateDimensionDateKeyUnique<'ctx> {
AnalyticsDateDimensionDateKeyUnique {
imp: self.imp.get_unique_constraint::<i64>("date_key"),
phantom: std::marker::PhantomData,
}
}
}
impl<'ctx> AnalyticsDateDimensionDateKeyUnique<'ctx> {
/// Find the subscribed row whose `date_key` column value is equal to `col_val`,
/// if such a row is present in the client cache.
pub fn find(&self, col_val: &i64) -> Option<AnalyticsDateDimension> {
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::<AnalyticsDateDimension>("analytics_date_dimension");
_table.add_unique_constraint::<i64>("date_key", |row| &row.date_key);
}
#[doc(hidden)]
pub(super) fn parse_table_update(
raw_updates: __ws::v2::TableUpdate,
) -> __sdk::Result<__sdk::TableUpdate<AnalyticsDateDimension>> {
__sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| {
__sdk::InternalError::failed_parse("TableUpdate<AnalyticsDateDimension>", "TableUpdate")
.with_cause(e)
.into()
})
}
#[allow(non_camel_case_types)]
/// Extension trait for query builder access to the table `AnalyticsDateDimension`.
///
/// Implemented for [`__sdk::QueryTableAccessor`].
pub trait analytics_date_dimensionQueryTableAccess {
#[allow(non_snake_case)]
/// Get a query builder for the table `AnalyticsDateDimension`.
fn analytics_date_dimension(&self) -> __sdk::__query_builder::Table<AnalyticsDateDimension>;
}
impl analytics_date_dimensionQueryTableAccess for __sdk::QueryTableAccessor {
fn analytics_date_dimension(&self) -> __sdk::__query_builder::Table<AnalyticsDateDimension> {
__sdk::__query_builder::Table::new("analytics_date_dimension")
}
}

View File

@@ -0,0 +1,120 @@
// 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};
#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)]
#[sats(crate = __lib)]
pub struct AnalyticsDateDimension {
pub date_key: i64,
pub calendar_date: String,
pub weekday: u8,
pub iso_week_key: i32,
pub week_start_date_key: i64,
pub week_end_date_key: i64,
pub month_key: i32,
pub month_start_date_key: i64,
pub month_end_date_key: i64,
pub quarter_key: i32,
pub quarter_start_date_key: i64,
pub quarter_end_date_key: i64,
pub year_key: i32,
pub year_start_date_key: i64,
pub year_end_date_key: i64,
pub created_at: __sdk::Timestamp,
pub updated_at: __sdk::Timestamp,
}
impl __sdk::InModule for AnalyticsDateDimension {
type Module = super::RemoteModule;
}
/// Column accessor struct for the table `AnalyticsDateDimension`.
///
/// Provides typed access to columns for query building.
pub struct AnalyticsDateDimensionCols {
pub date_key: __sdk::__query_builder::Col<AnalyticsDateDimension, i64>,
pub calendar_date: __sdk::__query_builder::Col<AnalyticsDateDimension, String>,
pub weekday: __sdk::__query_builder::Col<AnalyticsDateDimension, u8>,
pub iso_week_key: __sdk::__query_builder::Col<AnalyticsDateDimension, i32>,
pub week_start_date_key: __sdk::__query_builder::Col<AnalyticsDateDimension, i64>,
pub week_end_date_key: __sdk::__query_builder::Col<AnalyticsDateDimension, i64>,
pub month_key: __sdk::__query_builder::Col<AnalyticsDateDimension, i32>,
pub month_start_date_key: __sdk::__query_builder::Col<AnalyticsDateDimension, i64>,
pub month_end_date_key: __sdk::__query_builder::Col<AnalyticsDateDimension, i64>,
pub quarter_key: __sdk::__query_builder::Col<AnalyticsDateDimension, i32>,
pub quarter_start_date_key: __sdk::__query_builder::Col<AnalyticsDateDimension, i64>,
pub quarter_end_date_key: __sdk::__query_builder::Col<AnalyticsDateDimension, i64>,
pub year_key: __sdk::__query_builder::Col<AnalyticsDateDimension, i32>,
pub year_start_date_key: __sdk::__query_builder::Col<AnalyticsDateDimension, i64>,
pub year_end_date_key: __sdk::__query_builder::Col<AnalyticsDateDimension, i64>,
pub created_at: __sdk::__query_builder::Col<AnalyticsDateDimension, __sdk::Timestamp>,
pub updated_at: __sdk::__query_builder::Col<AnalyticsDateDimension, __sdk::Timestamp>,
}
impl __sdk::__query_builder::HasCols for AnalyticsDateDimension {
type Cols = AnalyticsDateDimensionCols;
fn cols(table_name: &'static str) -> Self::Cols {
AnalyticsDateDimensionCols {
date_key: __sdk::__query_builder::Col::new(table_name, "date_key"),
calendar_date: __sdk::__query_builder::Col::new(table_name, "calendar_date"),
weekday: __sdk::__query_builder::Col::new(table_name, "weekday"),
iso_week_key: __sdk::__query_builder::Col::new(table_name, "iso_week_key"),
week_start_date_key: __sdk::__query_builder::Col::new(
table_name,
"week_start_date_key",
),
week_end_date_key: __sdk::__query_builder::Col::new(table_name, "week_end_date_key"),
month_key: __sdk::__query_builder::Col::new(table_name, "month_key"),
month_start_date_key: __sdk::__query_builder::Col::new(
table_name,
"month_start_date_key",
),
month_end_date_key: __sdk::__query_builder::Col::new(table_name, "month_end_date_key"),
quarter_key: __sdk::__query_builder::Col::new(table_name, "quarter_key"),
quarter_start_date_key: __sdk::__query_builder::Col::new(
table_name,
"quarter_start_date_key",
),
quarter_end_date_key: __sdk::__query_builder::Col::new(
table_name,
"quarter_end_date_key",
),
year_key: __sdk::__query_builder::Col::new(table_name, "year_key"),
year_start_date_key: __sdk::__query_builder::Col::new(
table_name,
"year_start_date_key",
),
year_end_date_key: __sdk::__query_builder::Col::new(table_name, "year_end_date_key"),
created_at: __sdk::__query_builder::Col::new(table_name, "created_at"),
updated_at: __sdk::__query_builder::Col::new(table_name, "updated_at"),
}
}
}
/// Indexed column accessor struct for the table `AnalyticsDateDimension`.
///
/// Provides typed access to indexed columns for query building.
pub struct AnalyticsDateDimensionIxCols {
pub date_key: __sdk::__query_builder::IxCol<AnalyticsDateDimension, i64>,
pub iso_week_key: __sdk::__query_builder::IxCol<AnalyticsDateDimension, i32>,
pub month_key: __sdk::__query_builder::IxCol<AnalyticsDateDimension, i32>,
pub quarter_key: __sdk::__query_builder::IxCol<AnalyticsDateDimension, i32>,
pub year_key: __sdk::__query_builder::IxCol<AnalyticsDateDimension, i32>,
}
impl __sdk::__query_builder::HasIxCols for AnalyticsDateDimension {
type IxCols = AnalyticsDateDimensionIxCols;
fn ix_cols(table_name: &'static str) -> Self::IxCols {
AnalyticsDateDimensionIxCols {
date_key: __sdk::__query_builder::IxCol::new(table_name, "date_key"),
iso_week_key: __sdk::__query_builder::IxCol::new(table_name, "iso_week_key"),
month_key: __sdk::__query_builder::IxCol::new(table_name, "month_key"),
quarter_key: __sdk::__query_builder::IxCol::new(table_name, "quarter_key"),
year_key: __sdk::__query_builder::IxCol::new(table_name, "year_key"),
}
}
}
impl __sdk::__query_builder::CanBeLookupTable for AnalyticsDateDimension {}

View File

@@ -31,10 +31,10 @@ pub trait append_ai_text_chunk_and_return {
input: AiTextChunkAppendInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<AiTaskProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
&super::ProcedureEventContext,
Result<AiTaskProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
);
}
@@ -44,10 +44,10 @@ impl append_ai_text_chunk_and_return for super::RemoteProcedures {
input: AiTextChunkAppendInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<AiTaskProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
&super::ProcedureEventContext,
Result<AiTaskProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
) {
self.imp
.invoke_procedure_with_callback::<_, AiTaskProcedureResult>(

View File

@@ -34,10 +34,10 @@ pub trait apply_chapter_progression_ledger_entry_and_return {
input: ChapterProgressionLedgerInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<ChapterProgressionProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
&super::ProcedureEventContext,
Result<ChapterProgressionProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
);
}
@@ -47,10 +47,10 @@ impl apply_chapter_progression_ledger_entry_and_return for super::RemoteProcedur
input: ChapterProgressionLedgerInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<ChapterProgressionProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
&super::ProcedureEventContext,
Result<ChapterProgressionProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
) {
self.imp
.invoke_procedure_with_callback::<_, ChapterProgressionProcedureResult>(

View File

@@ -50,11 +50,9 @@ pub trait apply_chapter_progression_ledger_entry {
&self,
input: ChapterProgressionLedgerInput,
callback: impl FnOnce(
&super::ReducerEventContext,
Result<Result<(), String>, __sdk::InternalError>,
) + Send
+ 'static,
callback: impl FnOnce(&super::ReducerEventContext, Result<Result<(), String>, __sdk::InternalError>)
+ Send
+ 'static,
) -> __sdk::Result<()>;
}
@@ -63,11 +61,9 @@ impl apply_chapter_progression_ledger_entry for super::RemoteReducers {
&self,
input: ChapterProgressionLedgerInput,
callback: impl FnOnce(
&super::ReducerEventContext,
Result<Result<(), String>, __sdk::InternalError>,
) + Send
+ 'static,
callback: impl FnOnce(&super::ReducerEventContext, Result<Result<(), String>, __sdk::InternalError>)
+ Send
+ 'static,
) -> __sdk::Result<()> {
self.imp.invoke_reducer_with_callback(
ApplyChapterProgressionLedgerEntryArgs { input },

View File

@@ -47,11 +47,9 @@ pub trait apply_inventory_mutation {
&self,
input: InventoryMutationInput,
callback: impl FnOnce(
&super::ReducerEventContext,
Result<Result<(), String>, __sdk::InternalError>,
) + Send
+ 'static,
callback: impl FnOnce(&super::ReducerEventContext, Result<Result<(), String>, __sdk::InternalError>)
+ Send
+ 'static,
) -> __sdk::Result<()>;
}
@@ -60,11 +58,9 @@ impl apply_inventory_mutation for super::RemoteReducers {
&self,
input: InventoryMutationInput,
callback: impl FnOnce(
&super::ReducerEventContext,
Result<Result<(), String>, __sdk::InternalError>,
) + Send
+ 'static,
callback: impl FnOnce(&super::ReducerEventContext, Result<Result<(), String>, __sdk::InternalError>)
+ Send
+ 'static,
) -> __sdk::Result<()> {
self.imp
.invoke_reducer_with_callback(ApplyInventoryMutationArgs { input }, callback)

View File

@@ -47,11 +47,9 @@ pub trait apply_quest_signal {
&self,
input: QuestSignalApplyInput,
callback: impl FnOnce(
&super::ReducerEventContext,
Result<Result<(), String>, __sdk::InternalError>,
) + Send
+ 'static,
callback: impl FnOnce(&super::ReducerEventContext, Result<Result<(), String>, __sdk::InternalError>)
+ Send
+ 'static,
) -> __sdk::Result<()>;
}
@@ -60,11 +58,9 @@ impl apply_quest_signal for super::RemoteReducers {
&self,
input: QuestSignalApplyInput,
callback: impl FnOnce(
&super::ReducerEventContext,
Result<Result<(), String>, __sdk::InternalError>,
) + Send
+ 'static,
callback: impl FnOnce(&super::ReducerEventContext, Result<Result<(), String>, __sdk::InternalError>)
+ Send
+ 'static,
) -> __sdk::Result<()> {
self.imp
.invoke_reducer_with_callback(ApplyQuestSignalArgs { input }, callback)

View File

@@ -0,0 +1,161 @@
// 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 super::asset_entity_binding_type::AssetEntityBinding;
use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws};
/// 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")
}
}

View File

@@ -0,0 +1,160 @@
// 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 super::asset_object_access_policy_type::AssetObjectAccessPolicy;
use super::asset_object_type::AssetObject;
use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws};
/// 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")
}
}

View File

@@ -31,10 +31,10 @@ pub trait attach_ai_result_reference_and_return {
input: AiResultReferenceInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<AiTaskProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
&super::ProcedureEventContext,
Result<AiTaskProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
);
}
@@ -44,10 +44,10 @@ impl attach_ai_result_reference_and_return for super::RemoteProcedures {
input: AiResultReferenceInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<AiTaskProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
&super::ProcedureEventContext,
Result<AiTaskProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
) {
self.imp
.invoke_procedure_with_callback::<_, AiTaskProcedureResult>(

View File

@@ -0,0 +1,159 @@
// 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 super::auth_identity_type::AuthIdentity;
use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws};
/// 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")
}
}

View File

@@ -0,0 +1,161 @@
// 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 super::auth_store_snapshot_type::AuthStoreSnapshot;
use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws};
/// 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")
}
}

View File

@@ -34,10 +34,10 @@ pub trait authorize_database_migration_operator {
input: DatabaseMigrationAuthorizeOperatorInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<DatabaseMigrationOperatorProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
&super::ProcedureEventContext,
Result<DatabaseMigrationOperatorProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
);
}
@@ -47,10 +47,10 @@ impl authorize_database_migration_operator for super::RemoteProcedures {
input: DatabaseMigrationAuthorizeOperatorInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<DatabaseMigrationOperatorProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
&super::ProcedureEventContext,
Result<DatabaseMigrationOperatorProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
) {
self.imp
.invoke_procedure_with_callback::<_, DatabaseMigrationOperatorProcedureResult>(

View File

@@ -0,0 +1,163 @@
// 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 super::battle_mode_type::BattleMode;
use super::battle_state_type::BattleState;
use super::battle_status_type::BattleStatus;
use super::combat_outcome_type::CombatOutcome;
use super::runtime_item_reward_item_snapshot_type::RuntimeItemRewardItemSnapshot;
use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws};
/// 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")
}
}

View File

@@ -31,10 +31,10 @@ pub trait begin_story_session_and_return {
input: StorySessionInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<StorySessionProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
&super::ProcedureEventContext,
Result<StorySessionProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
);
}
@@ -44,10 +44,10 @@ impl begin_story_session_and_return for super::RemoteProcedures {
input: StorySessionInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<StorySessionProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
&super::ProcedureEventContext,
Result<StorySessionProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
) {
self.imp
.invoke_procedure_with_callback::<_, StorySessionProcedureResult>(

View File

@@ -47,11 +47,9 @@ pub trait begin_story_session {
&self,
input: StorySessionInput,
callback: impl FnOnce(
&super::ReducerEventContext,
Result<Result<(), String>, __sdk::InternalError>,
) + Send
+ 'static,
callback: impl FnOnce(&super::ReducerEventContext, Result<Result<(), String>, __sdk::InternalError>)
+ Send
+ 'static,
) -> __sdk::Result<()>;
}
@@ -60,11 +58,9 @@ impl begin_story_session for super::RemoteReducers {
&self,
input: StorySessionInput,
callback: impl FnOnce(
&super::ReducerEventContext,
Result<Result<(), String>, __sdk::InternalError>,
) + Send
+ 'static,
callback: impl FnOnce(&super::ReducerEventContext, Result<Result<(), String>, __sdk::InternalError>)
+ Send
+ 'static,
) -> __sdk::Result<()> {
self.imp
.invoke_reducer_with_callback(BeginStorySessionArgs { input }, callback)

View File

@@ -0,0 +1,163 @@
// 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 super::big_fish_agent_message_kind_type::BigFishAgentMessageKind;
use super::big_fish_agent_message_role_type::BigFishAgentMessageRole;
use super::big_fish_agent_message_type::BigFishAgentMessage;
use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws};
/// 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")
}
}

View File

@@ -0,0 +1,163 @@
// 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 super::big_fish_asset_kind_type::BigFishAssetKind;
use super::big_fish_asset_slot_type::BigFishAssetSlot;
use super::big_fish_asset_status_type::BigFishAssetStatus;
use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws};
/// 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")
}
}

View File

@@ -0,0 +1,163 @@
// 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 super::big_fish_creation_session_type::BigFishCreationSession;
use super::big_fish_creation_stage_type::BigFishCreationStage;
use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws};
/// 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")
}
}

View File

@@ -0,0 +1,162 @@
// 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 super::big_fish_run_status_type::BigFishRunStatus;
use super::big_fish_runtime_run_type::BigFishRuntimeRun;
use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws};
/// 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")
}
}

View File

@@ -31,10 +31,10 @@ pub trait bind_asset_object_to_entity_and_return {
input: AssetEntityBindingInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<AssetEntityBindingProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
&super::ProcedureEventContext,
Result<AssetEntityBindingProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
);
}
@@ -44,10 +44,10 @@ impl bind_asset_object_to_entity_and_return for super::RemoteProcedures {
input: AssetEntityBindingInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<AssetEntityBindingProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
&super::ProcedureEventContext,
Result<AssetEntityBindingProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
) {
self.imp
.invoke_procedure_with_callback::<_, AssetEntityBindingProcedureResult>(

View File

@@ -47,11 +47,9 @@ pub trait bind_asset_object_to_entity {
&self,
input: AssetEntityBindingInput,
callback: impl FnOnce(
&super::ReducerEventContext,
Result<Result<(), String>, __sdk::InternalError>,
) + Send
+ 'static,
callback: impl FnOnce(&super::ReducerEventContext, Result<Result<(), String>, __sdk::InternalError>)
+ Send
+ 'static,
) -> __sdk::Result<()>;
}
@@ -60,11 +58,9 @@ impl bind_asset_object_to_entity for super::RemoteReducers {
&self,
input: AssetEntityBindingInput,
callback: impl FnOnce(
&super::ReducerEventContext,
Result<Result<(), String>, __sdk::InternalError>,
) + Send
+ 'static,
callback: impl FnOnce(&super::ReducerEventContext, Result<Result<(), String>, __sdk::InternalError>)
+ Send
+ 'static,
) -> __sdk::Result<()> {
self.imp
.invoke_reducer_with_callback(BindAssetObjectToEntityArgs { input }, callback)

View File

@@ -31,10 +31,10 @@ pub trait cancel_ai_task_and_return {
input: AiTaskCancelInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<AiTaskProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
&super::ProcedureEventContext,
Result<AiTaskProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
);
}
@@ -44,10 +44,10 @@ impl cancel_ai_task_and_return for super::RemoteProcedures {
input: AiTaskCancelInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<AiTaskProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
&super::ProcedureEventContext,
Result<AiTaskProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
) {
self.imp
.invoke_procedure_with_callback::<_, AiTaskProcedureResult>(

View File

@@ -0,0 +1,166 @@
// 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 super::chapter_pace_band_type::ChapterPaceBand;
use super::chapter_progression_type::ChapterProgression;
use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws};
/// 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")
}
}

View File

@@ -31,10 +31,10 @@ pub trait claim_profile_task_reward_and_return {
input: RuntimeProfileTaskClaimInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<RuntimeProfileTaskClaimProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
&super::ProcedureEventContext,
Result<RuntimeProfileTaskClaimProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
);
}
@@ -44,10 +44,10 @@ impl claim_profile_task_reward_and_return for super::RemoteProcedures {
input: RuntimeProfileTaskClaimInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<RuntimeProfileTaskClaimProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
&super::ProcedureEventContext,
Result<RuntimeProfileTaskClaimProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
) {
self.imp
.invoke_procedure_with_callback::<_, RuntimeProfileTaskClaimProcedureResult>(

View File

@@ -31,10 +31,10 @@ pub trait claim_puzzle_work_point_incentive {
input: PuzzleWorkPointIncentiveClaimInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<PuzzleWorkProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
&super::ProcedureEventContext,
Result<PuzzleWorkProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
);
}
@@ -44,10 +44,10 @@ impl claim_puzzle_work_point_incentive for super::RemoteProcedures {
input: PuzzleWorkPointIncentiveClaimInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<PuzzleWorkProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
&super::ProcedureEventContext,
Result<PuzzleWorkProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
) {
self.imp
.invoke_procedure_with_callback::<_, PuzzleWorkProcedureResult>(

View File

@@ -34,10 +34,10 @@ pub trait clear_database_migration_import_chunks {
input: DatabaseMigrationImportChunksClearInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<DatabaseMigrationProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
&super::ProcedureEventContext,
Result<DatabaseMigrationProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
);
}
@@ -47,10 +47,10 @@ impl clear_database_migration_import_chunks for super::RemoteProcedures {
input: DatabaseMigrationImportChunksClearInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<DatabaseMigrationProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
&super::ProcedureEventContext,
Result<DatabaseMigrationProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
) {
self.imp
.invoke_procedure_with_callback::<_, DatabaseMigrationProcedureResult>(

View File

@@ -31,10 +31,10 @@ pub trait clear_platform_browse_history_and_return {
input: RuntimeBrowseHistoryClearInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<RuntimeBrowseHistoryProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
&super::ProcedureEventContext,
Result<RuntimeBrowseHistoryProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
);
}
@@ -44,10 +44,10 @@ impl clear_platform_browse_history_and_return for super::RemoteProcedures {
input: RuntimeBrowseHistoryClearInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<RuntimeBrowseHistoryProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
&super::ProcedureEventContext,
Result<RuntimeBrowseHistoryProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
) {
self.imp
.invoke_procedure_with_callback::<_, RuntimeBrowseHistoryProcedureResult>(

View File

@@ -31,10 +31,10 @@ pub trait click_match_3_d_item {
input: Match3DRunClickInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<Match3DClickItemProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
&super::ProcedureEventContext,
Result<Match3DClickItemProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
);
}
@@ -44,10 +44,10 @@ impl click_match_3_d_item for super::RemoteProcedures {
input: Match3DRunClickInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<Match3DClickItemProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
&super::ProcedureEventContext,
Result<Match3DClickItemProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
) {
self.imp
.invoke_procedure_with_callback::<_, Match3DClickItemProcedureResult>(

View File

@@ -31,10 +31,10 @@ pub trait compile_big_fish_draft {
input: BigFishDraftCompileInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<BigFishSessionProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
&super::ProcedureEventContext,
Result<BigFishSessionProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
);
}
@@ -44,10 +44,10 @@ impl compile_big_fish_draft for super::RemoteProcedures {
input: BigFishDraftCompileInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<BigFishSessionProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
&super::ProcedureEventContext,
Result<BigFishSessionProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
) {
self.imp
.invoke_procedure_with_callback::<_, BigFishSessionProcedureResult>(

View File

@@ -34,10 +34,10 @@ pub trait compile_custom_world_published_profile {
input: CustomWorldPublishedProfileCompileInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<CustomWorldPublishedProfileCompileResult, __sdk::InternalError>,
) + Send
+ 'static,
&super::ProcedureEventContext,
Result<CustomWorldPublishedProfileCompileResult, __sdk::InternalError>,
) + Send
+ 'static,
);
}
@@ -47,10 +47,10 @@ impl compile_custom_world_published_profile for super::RemoteProcedures {
input: CustomWorldPublishedProfileCompileInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<CustomWorldPublishedProfileCompileResult, __sdk::InternalError>,
) + Send
+ 'static,
&super::ProcedureEventContext,
Result<CustomWorldPublishedProfileCompileResult, __sdk::InternalError>,
) + Send
+ 'static,
) {
self.imp
.invoke_procedure_with_callback::<_, CustomWorldPublishedProfileCompileResult>(

View File

@@ -31,10 +31,10 @@ pub trait compile_match_3_d_draft {
input: Match3DDraftCompileInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<Match3DAgentSessionProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
&super::ProcedureEventContext,
Result<Match3DAgentSessionProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
);
}
@@ -44,10 +44,10 @@ impl compile_match_3_d_draft for super::RemoteProcedures {
input: Match3DDraftCompileInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<Match3DAgentSessionProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
&super::ProcedureEventContext,
Result<Match3DAgentSessionProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
) {
self.imp
.invoke_procedure_with_callback::<_, Match3DAgentSessionProcedureResult>(

View File

@@ -31,10 +31,10 @@ pub trait compile_puzzle_agent_draft {
input: PuzzleDraftCompileInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<PuzzleAgentSessionProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
&super::ProcedureEventContext,
Result<PuzzleAgentSessionProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
);
}
@@ -44,10 +44,10 @@ impl compile_puzzle_agent_draft for super::RemoteProcedures {
input: PuzzleDraftCompileInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<PuzzleAgentSessionProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
&super::ProcedureEventContext,
Result<PuzzleAgentSessionProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
) {
self.imp
.invoke_procedure_with_callback::<_, PuzzleAgentSessionProcedureResult>(

View File

@@ -31,10 +31,10 @@ pub trait complete_ai_stage_and_return {
input: AiStageCompletionInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<AiTaskProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
&super::ProcedureEventContext,
Result<AiTaskProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
);
}
@@ -44,10 +44,10 @@ impl complete_ai_stage_and_return for super::RemoteProcedures {
input: AiStageCompletionInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<AiTaskProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
&super::ProcedureEventContext,
Result<AiTaskProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
) {
self.imp
.invoke_procedure_with_callback::<_, AiTaskProcedureResult>(

View File

@@ -31,10 +31,10 @@ pub trait complete_ai_task_and_return {
input: AiTaskFinishInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<AiTaskProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
&super::ProcedureEventContext,
Result<AiTaskProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
);
}
@@ -44,10 +44,10 @@ impl complete_ai_task_and_return for super::RemoteProcedures {
input: AiTaskFinishInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<AiTaskProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
&super::ProcedureEventContext,
Result<AiTaskProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
) {
self.imp
.invoke_procedure_with_callback::<_, AiTaskProcedureResult>(

View File

@@ -31,10 +31,10 @@ pub trait confirm_asset_object_and_return {
input: AssetObjectUpsertInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<AssetObjectProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
&super::ProcedureEventContext,
Result<AssetObjectProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
);
}
@@ -44,10 +44,10 @@ impl confirm_asset_object_and_return for super::RemoteProcedures {
input: AssetObjectUpsertInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<AssetObjectProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
&super::ProcedureEventContext,
Result<AssetObjectProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
) {
self.imp
.invoke_procedure_with_callback::<_, AssetObjectProcedureResult>(

View File

@@ -47,11 +47,9 @@ pub trait confirm_asset_object {
&self,
input: AssetObjectUpsertInput,
callback: impl FnOnce(
&super::ReducerEventContext,
Result<Result<(), String>, __sdk::InternalError>,
) + Send
+ 'static,
callback: impl FnOnce(&super::ReducerEventContext, Result<Result<(), String>, __sdk::InternalError>)
+ Send
+ 'static,
) -> __sdk::Result<()>;
}
@@ -60,11 +58,9 @@ impl confirm_asset_object for super::RemoteReducers {
&self,
input: AssetObjectUpsertInput,
callback: impl FnOnce(
&super::ReducerEventContext,
Result<Result<(), String>, __sdk::InternalError>,
) + Send
+ 'static,
callback: impl FnOnce(&super::ReducerEventContext, Result<Result<(), String>, __sdk::InternalError>)
+ Send
+ 'static,
) -> __sdk::Result<()> {
self.imp
.invoke_reducer_with_callback(ConfirmAssetObjectArgs { input }, callback)

View File

@@ -31,10 +31,10 @@ pub trait consume_profile_wallet_points_and_return {
input: RuntimeProfileWalletAdjustmentInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<RuntimeProfileWalletAdjustmentProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
&super::ProcedureEventContext,
Result<RuntimeProfileWalletAdjustmentProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
);
}
@@ -44,10 +44,10 @@ impl consume_profile_wallet_points_and_return for super::RemoteProcedures {
input: RuntimeProfileWalletAdjustmentInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<RuntimeProfileWalletAdjustmentProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
&super::ProcedureEventContext,
Result<RuntimeProfileWalletAdjustmentProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
) {
self.imp
.invoke_procedure_with_callback::<_, RuntimeProfileWalletAdjustmentProcedureResult>(

View File

@@ -31,10 +31,10 @@ pub trait continue_story_and_return {
input: StoryContinueInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<StorySessionProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
&super::ProcedureEventContext,
Result<StorySessionProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
);
}
@@ -44,10 +44,10 @@ impl continue_story_and_return for super::RemoteProcedures {
input: StoryContinueInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<StorySessionProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
&super::ProcedureEventContext,
Result<StorySessionProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
) {
self.imp
.invoke_procedure_with_callback::<_, StorySessionProcedureResult>(

View File

@@ -47,11 +47,9 @@ pub trait continue_story {
&self,
input: StoryContinueInput,
callback: impl FnOnce(
&super::ReducerEventContext,
Result<Result<(), String>, __sdk::InternalError>,
) + Send
+ 'static,
callback: impl FnOnce(&super::ReducerEventContext, Result<Result<(), String>, __sdk::InternalError>)
+ Send
+ 'static,
) -> __sdk::Result<()>;
}
@@ -60,11 +58,9 @@ impl continue_story for super::RemoteReducers {
&self,
input: StoryContinueInput,
callback: impl FnOnce(
&super::ReducerEventContext,
Result<Result<(), String>, __sdk::InternalError>,
) + Send
+ 'static,
callback: impl FnOnce(&super::ReducerEventContext, Result<Result<(), String>, __sdk::InternalError>)
+ Send
+ 'static,
) -> __sdk::Result<()> {
self.imp
.invoke_reducer_with_callback(ContinueStoryArgs { input }, callback)

View File

@@ -31,10 +31,10 @@ pub trait create_ai_task_and_return {
input: AiTaskCreateInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<AiTaskProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
&super::ProcedureEventContext,
Result<AiTaskProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
);
}
@@ -44,10 +44,10 @@ impl create_ai_task_and_return for super::RemoteProcedures {
input: AiTaskCreateInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<AiTaskProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
&super::ProcedureEventContext,
Result<AiTaskProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
) {
self.imp
.invoke_procedure_with_callback::<_, AiTaskProcedureResult>(

View File

@@ -47,11 +47,9 @@ pub trait create_ai_task {
&self,
input: AiTaskCreateInput,
callback: impl FnOnce(
&super::ReducerEventContext,
Result<Result<(), String>, __sdk::InternalError>,
) + Send
+ 'static,
callback: impl FnOnce(&super::ReducerEventContext, Result<Result<(), String>, __sdk::InternalError>)
+ Send
+ 'static,
) -> __sdk::Result<()>;
}
@@ -60,11 +58,9 @@ impl create_ai_task for super::RemoteReducers {
&self,
input: AiTaskCreateInput,
callback: impl FnOnce(
&super::ReducerEventContext,
Result<Result<(), String>, __sdk::InternalError>,
) + Send
+ 'static,
callback: impl FnOnce(&super::ReducerEventContext, Result<Result<(), String>, __sdk::InternalError>)
+ Send
+ 'static,
) -> __sdk::Result<()> {
self.imp
.invoke_reducer_with_callback(CreateAiTaskArgs { input }, callback)

View File

@@ -31,10 +31,10 @@ pub trait create_battle_state_and_return {
input: BattleStateInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<BattleStateProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
&super::ProcedureEventContext,
Result<BattleStateProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
);
}
@@ -44,10 +44,10 @@ impl create_battle_state_and_return for super::RemoteProcedures {
input: BattleStateInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<BattleStateProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
&super::ProcedureEventContext,
Result<BattleStateProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
) {
self.imp
.invoke_procedure_with_callback::<_, BattleStateProcedureResult>(

View File

@@ -47,11 +47,9 @@ pub trait create_battle_state {
&self,
input: BattleStateInput,
callback: impl FnOnce(
&super::ReducerEventContext,
Result<Result<(), String>, __sdk::InternalError>,
) + Send
+ 'static,
callback: impl FnOnce(&super::ReducerEventContext, Result<Result<(), String>, __sdk::InternalError>)
+ Send
+ 'static,
) -> __sdk::Result<()>;
}
@@ -60,11 +58,9 @@ impl create_battle_state for super::RemoteReducers {
&self,
input: BattleStateInput,
callback: impl FnOnce(
&super::ReducerEventContext,
Result<Result<(), String>, __sdk::InternalError>,
) + Send
+ 'static,
callback: impl FnOnce(&super::ReducerEventContext, Result<Result<(), String>, __sdk::InternalError>)
+ Send
+ 'static,
) -> __sdk::Result<()> {
self.imp
.invoke_reducer_with_callback(CreateBattleStateArgs { input }, callback)

View File

@@ -31,10 +31,10 @@ pub trait create_big_fish_session {
input: BigFishSessionCreateInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<BigFishSessionProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
&super::ProcedureEventContext,
Result<BigFishSessionProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
);
}
@@ -44,10 +44,10 @@ impl create_big_fish_session for super::RemoteProcedures {
input: BigFishSessionCreateInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<BigFishSessionProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
&super::ProcedureEventContext,
Result<BigFishSessionProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
) {
self.imp
.invoke_procedure_with_callback::<_, BigFishSessionProcedureResult>(

View File

@@ -31,10 +31,10 @@ pub trait create_custom_world_agent_session {
input: CustomWorldAgentSessionCreateInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<CustomWorldAgentSessionProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
&super::ProcedureEventContext,
Result<CustomWorldAgentSessionProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
);
}
@@ -44,10 +44,10 @@ impl create_custom_world_agent_session for super::RemoteProcedures {
input: CustomWorldAgentSessionCreateInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<CustomWorldAgentSessionProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
&super::ProcedureEventContext,
Result<CustomWorldAgentSessionProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
) {
self.imp
.invoke_procedure_with_callback::<_, CustomWorldAgentSessionProcedureResult>(

View File

@@ -31,10 +31,10 @@ pub trait create_match_3_d_agent_session {
input: Match3DAgentSessionCreateInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<Match3DAgentSessionProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
&super::ProcedureEventContext,
Result<Match3DAgentSessionProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
);
}
@@ -44,10 +44,10 @@ impl create_match_3_d_agent_session for super::RemoteProcedures {
input: Match3DAgentSessionCreateInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<Match3DAgentSessionProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
&super::ProcedureEventContext,
Result<Match3DAgentSessionProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
) {
self.imp
.invoke_procedure_with_callback::<_, Match3DAgentSessionProcedureResult>(

View File

@@ -34,10 +34,10 @@ pub trait create_profile_recharge_order_and_return {
input: RuntimeProfileRechargeOrderCreateInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<RuntimeProfileRechargeCenterProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
&super::ProcedureEventContext,
Result<RuntimeProfileRechargeCenterProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
);
}
@@ -47,10 +47,10 @@ impl create_profile_recharge_order_and_return for super::RemoteProcedures {
input: RuntimeProfileRechargeOrderCreateInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<RuntimeProfileRechargeCenterProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
&super::ProcedureEventContext,
Result<RuntimeProfileRechargeCenterProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
) {
self.imp
.invoke_procedure_with_callback::<_, RuntimeProfileRechargeCenterProcedureResult>(

View File

@@ -31,10 +31,10 @@ pub trait create_puzzle_agent_session {
input: PuzzleAgentSessionCreateInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<PuzzleAgentSessionProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
&super::ProcedureEventContext,
Result<PuzzleAgentSessionProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
);
}
@@ -44,10 +44,10 @@ impl create_puzzle_agent_session for super::RemoteProcedures {
input: PuzzleAgentSessionCreateInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<PuzzleAgentSessionProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
&super::ProcedureEventContext,
Result<PuzzleAgentSessionProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
) {
self.imp
.invoke_procedure_with_callback::<_, PuzzleAgentSessionProcedureResult>(

View File

@@ -0,0 +1,164 @@
// 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 super::custom_world_agent_message_type::CustomWorldAgentMessage;
use super::rpg_agent_message_kind_type::RpgAgentMessageKind;
use super::rpg_agent_message_role_type::RpgAgentMessageRole;
use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws};
/// 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")
}
}

View File

@@ -0,0 +1,168 @@
// 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 super::custom_world_agent_operation_type::CustomWorldAgentOperation;
use super::rpg_agent_operation_status_type::RpgAgentOperationStatus;
use super::rpg_agent_operation_type_type::RpgAgentOperationType;
use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws};
/// 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")
}
}

View File

@@ -0,0 +1,163 @@
// 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 super::custom_world_agent_session_type::CustomWorldAgentSession;
use super::rpg_agent_stage_type::RpgAgentStage;
use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws};
/// 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")
}
}

View File

@@ -0,0 +1,164 @@
// 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 super::custom_world_draft_card_type::CustomWorldDraftCard;
use super::custom_world_role_asset_status_type::CustomWorldRoleAssetStatus;
use super::rpg_agent_draft_card_kind_type::RpgAgentDraftCardKind;
use super::rpg_agent_draft_card_status_type::RpgAgentDraftCardStatus;
use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws};
/// 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")
}
}

View File

@@ -0,0 +1,163 @@
// 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 super::custom_world_profile_type::CustomWorldProfile;
use super::custom_world_publication_status_type::CustomWorldPublicationStatus;
use super::custom_world_theme_mode_type::CustomWorldThemeMode;
use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws};
/// 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")
}
}

View File

@@ -0,0 +1,163 @@
// 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 super::custom_world_generation_mode_type::CustomWorldGenerationMode;
use super::custom_world_session_status_type::CustomWorldSessionStatus;
use super::custom_world_session_type::CustomWorldSession;
use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws};
/// 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")
}
}

View File

@@ -0,0 +1,169 @@
// 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 super::database_migration_import_chunk_type::DatabaseMigrationImportChunk;
use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws};
/// Table handle for the table `database_migration_import_chunk`.
///
/// Obtain a handle from the [`DatabaseMigrationImportChunkTableAccess::database_migration_import_chunk`] method on [`super::RemoteTables`],
/// like `ctx.db.database_migration_import_chunk()`.
///
/// Users are encouraged not to explicitly reference this type,
/// but to directly chain method calls,
/// like `ctx.db.database_migration_import_chunk().on_insert(...)`.
pub struct DatabaseMigrationImportChunkTableHandle<'ctx> {
imp: __sdk::TableHandle<DatabaseMigrationImportChunk>,
ctx: std::marker::PhantomData<&'ctx super::RemoteTables>,
}
#[allow(non_camel_case_types)]
/// Extension trait for access to the table `database_migration_import_chunk`.
///
/// Implemented for [`super::RemoteTables`].
pub trait DatabaseMigrationImportChunkTableAccess {
#[allow(non_snake_case)]
/// Obtain a [`DatabaseMigrationImportChunkTableHandle`], which mediates access to the table `database_migration_import_chunk`.
fn database_migration_import_chunk(&self) -> DatabaseMigrationImportChunkTableHandle<'_>;
}
impl DatabaseMigrationImportChunkTableAccess for super::RemoteTables {
fn database_migration_import_chunk(&self) -> DatabaseMigrationImportChunkTableHandle<'_> {
DatabaseMigrationImportChunkTableHandle {
imp: self
.imp
.get_table::<DatabaseMigrationImportChunk>("database_migration_import_chunk"),
ctx: std::marker::PhantomData,
}
}
}
pub struct DatabaseMigrationImportChunkInsertCallbackId(__sdk::CallbackId);
pub struct DatabaseMigrationImportChunkDeleteCallbackId(__sdk::CallbackId);
impl<'ctx> __sdk::Table for DatabaseMigrationImportChunkTableHandle<'ctx> {
type Row = DatabaseMigrationImportChunk;
type EventContext = super::EventContext;
fn count(&self) -> u64 {
self.imp.count()
}
fn iter(&self) -> impl Iterator<Item = DatabaseMigrationImportChunk> + '_ {
self.imp.iter()
}
type InsertCallbackId = DatabaseMigrationImportChunkInsertCallbackId;
fn on_insert(
&self,
callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static,
) -> DatabaseMigrationImportChunkInsertCallbackId {
DatabaseMigrationImportChunkInsertCallbackId(self.imp.on_insert(Box::new(callback)))
}
fn remove_on_insert(&self, callback: DatabaseMigrationImportChunkInsertCallbackId) {
self.imp.remove_on_insert(callback.0)
}
type DeleteCallbackId = DatabaseMigrationImportChunkDeleteCallbackId;
fn on_delete(
&self,
callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static,
) -> DatabaseMigrationImportChunkDeleteCallbackId {
DatabaseMigrationImportChunkDeleteCallbackId(self.imp.on_delete(Box::new(callback)))
}
fn remove_on_delete(&self, callback: DatabaseMigrationImportChunkDeleteCallbackId) {
self.imp.remove_on_delete(callback.0)
}
}
pub struct DatabaseMigrationImportChunkUpdateCallbackId(__sdk::CallbackId);
impl<'ctx> __sdk::TableWithPrimaryKey for DatabaseMigrationImportChunkTableHandle<'ctx> {
type UpdateCallbackId = DatabaseMigrationImportChunkUpdateCallbackId;
fn on_update(
&self,
callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static,
) -> DatabaseMigrationImportChunkUpdateCallbackId {
DatabaseMigrationImportChunkUpdateCallbackId(self.imp.on_update(Box::new(callback)))
}
fn remove_on_update(&self, callback: DatabaseMigrationImportChunkUpdateCallbackId) {
self.imp.remove_on_update(callback.0)
}
}
/// Access to the `chunk_key` unique index on the table `database_migration_import_chunk`,
/// which allows point queries on the field of the same name
/// via the [`DatabaseMigrationImportChunkChunkKeyUnique::find`] method.
///
/// Users are encouraged not to explicitly reference this type,
/// but to directly chain method calls,
/// like `ctx.db.database_migration_import_chunk().chunk_key().find(...)`.
pub struct DatabaseMigrationImportChunkChunkKeyUnique<'ctx> {
imp: __sdk::UniqueConstraintHandle<DatabaseMigrationImportChunk, String>,
phantom: std::marker::PhantomData<&'ctx super::RemoteTables>,
}
impl<'ctx> DatabaseMigrationImportChunkTableHandle<'ctx> {
/// Get a handle on the `chunk_key` unique index on the table `database_migration_import_chunk`.
pub fn chunk_key(&self) -> DatabaseMigrationImportChunkChunkKeyUnique<'ctx> {
DatabaseMigrationImportChunkChunkKeyUnique {
imp: self.imp.get_unique_constraint::<String>("chunk_key"),
phantom: std::marker::PhantomData,
}
}
}
impl<'ctx> DatabaseMigrationImportChunkChunkKeyUnique<'ctx> {
/// Find the subscribed row whose `chunk_key` 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<DatabaseMigrationImportChunk> {
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::<DatabaseMigrationImportChunk>("database_migration_import_chunk");
_table.add_unique_constraint::<String>("chunk_key", |row| &row.chunk_key);
}
#[doc(hidden)]
pub(super) fn parse_table_update(
raw_updates: __ws::v2::TableUpdate,
) -> __sdk::Result<__sdk::TableUpdate<DatabaseMigrationImportChunk>> {
__sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| {
__sdk::InternalError::failed_parse(
"TableUpdate<DatabaseMigrationImportChunk>",
"TableUpdate",
)
.with_cause(e)
.into()
})
}
#[allow(non_camel_case_types)]
/// Extension trait for query builder access to the table `DatabaseMigrationImportChunk`.
///
/// Implemented for [`__sdk::QueryTableAccessor`].
pub trait database_migration_import_chunkQueryTableAccess {
#[allow(non_snake_case)]
/// Get a query builder for the table `DatabaseMigrationImportChunk`.
fn database_migration_import_chunk(
&self,
) -> __sdk::__query_builder::Table<DatabaseMigrationImportChunk>;
}
impl database_migration_import_chunkQueryTableAccess for __sdk::QueryTableAccessor {
fn database_migration_import_chunk(
&self,
) -> __sdk::__query_builder::Table<DatabaseMigrationImportChunk> {
__sdk::__query_builder::Table::new("database_migration_import_chunk")
}
}

View File

@@ -0,0 +1,170 @@
// 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 super::database_migration_operator_type::DatabaseMigrationOperator;
use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws};
/// Table handle for the table `database_migration_operator`.
///
/// Obtain a handle from the [`DatabaseMigrationOperatorTableAccess::database_migration_operator`] method on [`super::RemoteTables`],
/// like `ctx.db.database_migration_operator()`.
///
/// Users are encouraged not to explicitly reference this type,
/// but to directly chain method calls,
/// like `ctx.db.database_migration_operator().on_insert(...)`.
pub struct DatabaseMigrationOperatorTableHandle<'ctx> {
imp: __sdk::TableHandle<DatabaseMigrationOperator>,
ctx: std::marker::PhantomData<&'ctx super::RemoteTables>,
}
#[allow(non_camel_case_types)]
/// Extension trait for access to the table `database_migration_operator`.
///
/// Implemented for [`super::RemoteTables`].
pub trait DatabaseMigrationOperatorTableAccess {
#[allow(non_snake_case)]
/// Obtain a [`DatabaseMigrationOperatorTableHandle`], which mediates access to the table `database_migration_operator`.
fn database_migration_operator(&self) -> DatabaseMigrationOperatorTableHandle<'_>;
}
impl DatabaseMigrationOperatorTableAccess for super::RemoteTables {
fn database_migration_operator(&self) -> DatabaseMigrationOperatorTableHandle<'_> {
DatabaseMigrationOperatorTableHandle {
imp: self
.imp
.get_table::<DatabaseMigrationOperator>("database_migration_operator"),
ctx: std::marker::PhantomData,
}
}
}
pub struct DatabaseMigrationOperatorInsertCallbackId(__sdk::CallbackId);
pub struct DatabaseMigrationOperatorDeleteCallbackId(__sdk::CallbackId);
impl<'ctx> __sdk::Table for DatabaseMigrationOperatorTableHandle<'ctx> {
type Row = DatabaseMigrationOperator;
type EventContext = super::EventContext;
fn count(&self) -> u64 {
self.imp.count()
}
fn iter(&self) -> impl Iterator<Item = DatabaseMigrationOperator> + '_ {
self.imp.iter()
}
type InsertCallbackId = DatabaseMigrationOperatorInsertCallbackId;
fn on_insert(
&self,
callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static,
) -> DatabaseMigrationOperatorInsertCallbackId {
DatabaseMigrationOperatorInsertCallbackId(self.imp.on_insert(Box::new(callback)))
}
fn remove_on_insert(&self, callback: DatabaseMigrationOperatorInsertCallbackId) {
self.imp.remove_on_insert(callback.0)
}
type DeleteCallbackId = DatabaseMigrationOperatorDeleteCallbackId;
fn on_delete(
&self,
callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static,
) -> DatabaseMigrationOperatorDeleteCallbackId {
DatabaseMigrationOperatorDeleteCallbackId(self.imp.on_delete(Box::new(callback)))
}
fn remove_on_delete(&self, callback: DatabaseMigrationOperatorDeleteCallbackId) {
self.imp.remove_on_delete(callback.0)
}
}
pub struct DatabaseMigrationOperatorUpdateCallbackId(__sdk::CallbackId);
impl<'ctx> __sdk::TableWithPrimaryKey for DatabaseMigrationOperatorTableHandle<'ctx> {
type UpdateCallbackId = DatabaseMigrationOperatorUpdateCallbackId;
fn on_update(
&self,
callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static,
) -> DatabaseMigrationOperatorUpdateCallbackId {
DatabaseMigrationOperatorUpdateCallbackId(self.imp.on_update(Box::new(callback)))
}
fn remove_on_update(&self, callback: DatabaseMigrationOperatorUpdateCallbackId) {
self.imp.remove_on_update(callback.0)
}
}
/// Access to the `operator_identity` unique index on the table `database_migration_operator`,
/// which allows point queries on the field of the same name
/// via the [`DatabaseMigrationOperatorOperatorIdentityUnique::find`] method.
///
/// Users are encouraged not to explicitly reference this type,
/// but to directly chain method calls,
/// like `ctx.db.database_migration_operator().operator_identity().find(...)`.
pub struct DatabaseMigrationOperatorOperatorIdentityUnique<'ctx> {
imp: __sdk::UniqueConstraintHandle<DatabaseMigrationOperator, __sdk::Identity>,
phantom: std::marker::PhantomData<&'ctx super::RemoteTables>,
}
impl<'ctx> DatabaseMigrationOperatorTableHandle<'ctx> {
/// Get a handle on the `operator_identity` unique index on the table `database_migration_operator`.
pub fn operator_identity(&self) -> DatabaseMigrationOperatorOperatorIdentityUnique<'ctx> {
DatabaseMigrationOperatorOperatorIdentityUnique {
imp: self
.imp
.get_unique_constraint::<__sdk::Identity>("operator_identity"),
phantom: std::marker::PhantomData,
}
}
}
impl<'ctx> DatabaseMigrationOperatorOperatorIdentityUnique<'ctx> {
/// Find the subscribed row whose `operator_identity` column value is equal to `col_val`,
/// if such a row is present in the client cache.
pub fn find(&self, col_val: &__sdk::Identity) -> Option<DatabaseMigrationOperator> {
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::<DatabaseMigrationOperator>("database_migration_operator");
_table.add_unique_constraint::<__sdk::Identity>("operator_identity", |row| {
&row.operator_identity
});
}
#[doc(hidden)]
pub(super) fn parse_table_update(
raw_updates: __ws::v2::TableUpdate,
) -> __sdk::Result<__sdk::TableUpdate<DatabaseMigrationOperator>> {
__sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| {
__sdk::InternalError::failed_parse("TableUpdate<DatabaseMigrationOperator>", "TableUpdate")
.with_cause(e)
.into()
})
}
#[allow(non_camel_case_types)]
/// Extension trait for query builder access to the table `DatabaseMigrationOperator`.
///
/// Implemented for [`__sdk::QueryTableAccessor`].
pub trait database_migration_operatorQueryTableAccess {
#[allow(non_snake_case)]
/// Get a query builder for the table `DatabaseMigrationOperator`.
fn database_migration_operator(
&self,
) -> __sdk::__query_builder::Table<DatabaseMigrationOperator>;
}
impl database_migration_operatorQueryTableAccess for __sdk::QueryTableAccessor {
fn database_migration_operator(
&self,
) -> __sdk::__query_builder::Table<DatabaseMigrationOperator> {
__sdk::__query_builder::Table::new("database_migration_operator")
}
}

View File

@@ -31,10 +31,10 @@ pub trait delete_big_fish_work {
input: BigFishWorkDeleteInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<BigFishWorksProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
&super::ProcedureEventContext,
Result<BigFishWorksProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
);
}
@@ -44,10 +44,10 @@ impl delete_big_fish_work for super::RemoteProcedures {
input: BigFishWorkDeleteInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<BigFishWorksProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
&super::ProcedureEventContext,
Result<BigFishWorksProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
) {
self.imp
.invoke_procedure_with_callback::<_, BigFishWorksProcedureResult>(

View File

@@ -31,10 +31,10 @@ pub trait delete_custom_world_agent_session {
input: CustomWorldAgentSessionGetInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<CustomWorldWorksListResult, __sdk::InternalError>,
) + Send
+ 'static,
&super::ProcedureEventContext,
Result<CustomWorldWorksListResult, __sdk::InternalError>,
) + Send
+ 'static,
);
}
@@ -44,10 +44,10 @@ impl delete_custom_world_agent_session for super::RemoteProcedures {
input: CustomWorldAgentSessionGetInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<CustomWorldWorksListResult, __sdk::InternalError>,
) + Send
+ 'static,
&super::ProcedureEventContext,
Result<CustomWorldWorksListResult, __sdk::InternalError>,
) + Send
+ 'static,
) {
self.imp
.invoke_procedure_with_callback::<_, CustomWorldWorksListResult>(

View File

@@ -31,10 +31,10 @@ pub trait delete_custom_world_profile_and_return {
input: CustomWorldProfileDeleteInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<CustomWorldProfileListResult, __sdk::InternalError>,
) + Send
+ 'static,
&super::ProcedureEventContext,
Result<CustomWorldProfileListResult, __sdk::InternalError>,
) + Send
+ 'static,
);
}
@@ -44,10 +44,10 @@ impl delete_custom_world_profile_and_return for super::RemoteProcedures {
input: CustomWorldProfileDeleteInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<CustomWorldProfileListResult, __sdk::InternalError>,
) + Send
+ 'static,
&super::ProcedureEventContext,
Result<CustomWorldProfileListResult, __sdk::InternalError>,
) + Send
+ 'static,
) {
self.imp
.invoke_procedure_with_callback::<_, CustomWorldProfileListResult>(

View File

@@ -31,10 +31,10 @@ pub trait delete_match_3_d_work {
input: Match3DWorkDeleteInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<Match3DWorksProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
&super::ProcedureEventContext,
Result<Match3DWorksProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
);
}
@@ -44,10 +44,10 @@ impl delete_match_3_d_work for super::RemoteProcedures {
input: Match3DWorkDeleteInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<Match3DWorksProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
&super::ProcedureEventContext,
Result<Match3DWorksProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
) {
self.imp
.invoke_procedure_with_callback::<_, Match3DWorksProcedureResult>(

View File

@@ -31,10 +31,10 @@ pub trait delete_puzzle_work {
input: PuzzleWorkDeleteInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<PuzzleWorksProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
&super::ProcedureEventContext,
Result<PuzzleWorksProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
);
}
@@ -44,10 +44,10 @@ impl delete_puzzle_work for super::RemoteProcedures {
input: PuzzleWorkDeleteInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<PuzzleWorksProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
&super::ProcedureEventContext,
Result<PuzzleWorksProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
) {
self.imp
.invoke_procedure_with_callback::<_, PuzzleWorksProcedureResult>(

View File

@@ -31,10 +31,10 @@ pub trait delete_runtime_snapshot_and_return {
input: RuntimeSnapshotDeleteInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<RuntimeSnapshotProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
&super::ProcedureEventContext,
Result<RuntimeSnapshotProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
);
}
@@ -44,10 +44,10 @@ impl delete_runtime_snapshot_and_return for super::RemoteProcedures {
input: RuntimeSnapshotDeleteInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<RuntimeSnapshotProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
&super::ProcedureEventContext,
Result<RuntimeSnapshotProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
) {
self.imp
.invoke_procedure_with_callback::<_, RuntimeSnapshotProcedureResult>(

View File

@@ -31,10 +31,10 @@ pub trait drag_puzzle_piece_or_group {
input: PuzzleRunDragInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<PuzzleRunProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
&super::ProcedureEventContext,
Result<PuzzleRunProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
);
}
@@ -44,10 +44,10 @@ impl drag_puzzle_piece_or_group for super::RemoteProcedures {
input: PuzzleRunDragInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<PuzzleRunProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
&super::ProcedureEventContext,
Result<PuzzleRunProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
) {
self.imp
.invoke_procedure_with_callback::<_, PuzzleRunProcedureResult>(

View File

@@ -0,0 +1,73 @@
// 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::analytics_date_dimension_ensure_input_type::AnalyticsDateDimensionEnsureInput;
#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)]
#[sats(crate = __lib)]
pub(super) struct EnsureAnalyticsDateDimensionForDateArgs {
pub input: AnalyticsDateDimensionEnsureInput,
}
impl From<EnsureAnalyticsDateDimensionForDateArgs> for super::Reducer {
fn from(args: EnsureAnalyticsDateDimensionForDateArgs) -> Self {
Self::EnsureAnalyticsDateDimensionForDate { input: args.input }
}
}
impl __sdk::InModule for EnsureAnalyticsDateDimensionForDateArgs {
type Module = super::RemoteModule;
}
#[allow(non_camel_case_types)]
/// Extension trait for access to the reducer `ensure_analytics_date_dimension_for_date`.
///
/// Implemented for [`super::RemoteReducers`].
pub trait ensure_analytics_date_dimension_for_date {
/// Request that the remote module invoke the reducer `ensure_analytics_date_dimension_for_date` to run as soon as possible.
///
/// This method returns immediately, and errors only if we are unable to send the request.
/// The reducer will run asynchronously in the future,
/// and this method provides no way to listen for its completion status.
/// /// Use [`ensure_analytics_date_dimension_for_date:ensure_analytics_date_dimension_for_date_then`] to run a callback after the reducer completes.
fn ensure_analytics_date_dimension_for_date(
&self,
input: AnalyticsDateDimensionEnsureInput,
) -> __sdk::Result<()> {
self.ensure_analytics_date_dimension_for_date_then(input, |_, _| {})
}
/// Request that the remote module invoke the reducer `ensure_analytics_date_dimension_for_date` to run as soon as possible,
/// registering `callback` to run when we are notified that the reducer completed.
///
/// This method returns immediately, and errors only if we are unable to send the request.
/// The reducer will run asynchronously in the future,
/// and its status can be observed with the `callback`.
fn ensure_analytics_date_dimension_for_date_then(
&self,
input: AnalyticsDateDimensionEnsureInput,
callback: impl FnOnce(&super::ReducerEventContext, Result<Result<(), String>, __sdk::InternalError>)
+ Send
+ 'static,
) -> __sdk::Result<()>;
}
impl ensure_analytics_date_dimension_for_date for super::RemoteReducers {
fn ensure_analytics_date_dimension_for_date_then(
&self,
input: AnalyticsDateDimensionEnsureInput,
callback: impl FnOnce(&super::ReducerEventContext, Result<Result<(), String>, __sdk::InternalError>)
+ Send
+ 'static,
) -> __sdk::Result<()> {
self.imp.invoke_reducer_with_callback(
EnsureAnalyticsDateDimensionForDateArgs { input },
callback,
)
}
}

View File

@@ -31,10 +31,10 @@ pub trait execute_custom_world_agent_action {
input: CustomWorldAgentActionExecuteInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<CustomWorldAgentActionExecuteResult, __sdk::InternalError>,
) + Send
+ 'static,
&super::ProcedureEventContext,
Result<CustomWorldAgentActionExecuteResult, __sdk::InternalError>,
) + Send
+ 'static,
);
}
@@ -44,10 +44,10 @@ impl execute_custom_world_agent_action for super::RemoteProcedures {
input: CustomWorldAgentActionExecuteInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<CustomWorldAgentActionExecuteResult, __sdk::InternalError>,
) + Send
+ 'static,
&super::ProcedureEventContext,
Result<CustomWorldAgentActionExecuteResult, __sdk::InternalError>,
) + Send
+ 'static,
) {
self.imp
.invoke_procedure_with_callback::<_, CustomWorldAgentActionExecuteResult>(

View File

@@ -27,10 +27,10 @@ pub trait export_auth_store_snapshot_from_tables {
&self,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<AuthStoreSnapshotProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
&super::ProcedureEventContext,
Result<AuthStoreSnapshotProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
);
}
@@ -39,10 +39,10 @@ impl export_auth_store_snapshot_from_tables for super::RemoteProcedures {
&self,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<AuthStoreSnapshotProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
&super::ProcedureEventContext,
Result<AuthStoreSnapshotProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
) {
self.imp
.invoke_procedure_with_callback::<_, AuthStoreSnapshotProcedureResult>(

View File

@@ -31,10 +31,10 @@ pub trait export_database_migration_to_file {
input: DatabaseMigrationExportInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<DatabaseMigrationProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
&super::ProcedureEventContext,
Result<DatabaseMigrationProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
);
}
@@ -44,10 +44,10 @@ impl export_database_migration_to_file for super::RemoteProcedures {
input: DatabaseMigrationExportInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<DatabaseMigrationProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
&super::ProcedureEventContext,
Result<DatabaseMigrationProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
) {
self.imp
.invoke_procedure_with_callback::<_, DatabaseMigrationProcedureResult>(

View File

@@ -31,10 +31,10 @@ pub trait fail_ai_task_and_return {
input: AiTaskFailureInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<AiTaskProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
&super::ProcedureEventContext,
Result<AiTaskProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
);
}
@@ -44,10 +44,10 @@ impl fail_ai_task_and_return for super::RemoteProcedures {
input: AiTaskFailureInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<AiTaskProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
&super::ProcedureEventContext,
Result<AiTaskProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
) {
self.imp
.invoke_procedure_with_callback::<_, AiTaskProcedureResult>(

View File

@@ -31,10 +31,10 @@ pub trait finalize_big_fish_agent_message_turn {
input: BigFishMessageFinalizeInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<BigFishSessionProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
&super::ProcedureEventContext,
Result<BigFishSessionProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
);
}
@@ -44,10 +44,10 @@ impl finalize_big_fish_agent_message_turn for super::RemoteProcedures {
input: BigFishMessageFinalizeInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<BigFishSessionProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
&super::ProcedureEventContext,
Result<BigFishSessionProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
) {
self.imp
.invoke_procedure_with_callback::<_, BigFishSessionProcedureResult>(

View File

@@ -34,10 +34,10 @@ pub trait finalize_custom_world_agent_message_turn {
input: CustomWorldAgentMessageFinalizeInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<CustomWorldAgentOperationProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
&super::ProcedureEventContext,
Result<CustomWorldAgentOperationProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
);
}
@@ -47,10 +47,10 @@ impl finalize_custom_world_agent_message_turn for super::RemoteProcedures {
input: CustomWorldAgentMessageFinalizeInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<CustomWorldAgentOperationProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
&super::ProcedureEventContext,
Result<CustomWorldAgentOperationProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
) {
self.imp
.invoke_procedure_with_callback::<_, CustomWorldAgentOperationProcedureResult>(

View File

@@ -31,10 +31,10 @@ pub trait finalize_match_3_d_agent_message_turn {
input: Match3DAgentMessageFinalizeInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<Match3DAgentSessionProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
&super::ProcedureEventContext,
Result<Match3DAgentSessionProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
);
}
@@ -44,10 +44,10 @@ impl finalize_match_3_d_agent_message_turn for super::RemoteProcedures {
input: Match3DAgentMessageFinalizeInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<Match3DAgentSessionProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
&super::ProcedureEventContext,
Result<Match3DAgentSessionProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
) {
self.imp
.invoke_procedure_with_callback::<_, Match3DAgentSessionProcedureResult>(

View File

@@ -31,10 +31,10 @@ pub trait finalize_puzzle_agent_message_turn {
input: PuzzleAgentMessageFinalizeInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<PuzzleAgentSessionProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
&super::ProcedureEventContext,
Result<PuzzleAgentSessionProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
);
}
@@ -44,10 +44,10 @@ impl finalize_puzzle_agent_message_turn for super::RemoteProcedures {
input: PuzzleAgentMessageFinalizeInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<PuzzleAgentSessionProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
&super::ProcedureEventContext,
Result<PuzzleAgentSessionProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
) {
self.imp
.invoke_procedure_with_callback::<_, PuzzleAgentSessionProcedureResult>(

View File

@@ -31,10 +31,10 @@ pub trait finish_match_3_d_time_up {
input: Match3DRunTimeUpInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<Match3DRunProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
&super::ProcedureEventContext,
Result<Match3DRunProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
);
}
@@ -44,10 +44,10 @@ impl finish_match_3_d_time_up for super::RemoteProcedures {
input: Match3DRunTimeUpInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<Match3DRunProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
&super::ProcedureEventContext,
Result<Match3DRunProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
) {
self.imp
.invoke_procedure_with_callback::<_, Match3DRunProcedureResult>(

View File

@@ -31,10 +31,10 @@ pub trait generate_big_fish_asset {
input: BigFishAssetGenerateInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<BigFishSessionProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
&super::ProcedureEventContext,
Result<BigFishSessionProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
);
}
@@ -44,10 +44,10 @@ impl generate_big_fish_asset for super::RemoteProcedures {
input: BigFishAssetGenerateInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<BigFishSessionProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
&super::ProcedureEventContext,
Result<BigFishSessionProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
) {
self.imp
.invoke_procedure_with_callback::<_, BigFishSessionProcedureResult>(

View File

@@ -27,10 +27,10 @@ pub trait get_auth_store_snapshot {
&self,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<AuthStoreSnapshotProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
&super::ProcedureEventContext,
Result<AuthStoreSnapshotProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
);
}
@@ -39,10 +39,10 @@ impl get_auth_store_snapshot for super::RemoteProcedures {
&self,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<AuthStoreSnapshotProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
&super::ProcedureEventContext,
Result<AuthStoreSnapshotProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
) {
self.imp
.invoke_procedure_with_callback::<_, AuthStoreSnapshotProcedureResult>(

View File

@@ -31,10 +31,10 @@ pub trait get_battle_state {
input: BattleStateQueryInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<BattleStateProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
&super::ProcedureEventContext,
Result<BattleStateProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
);
}
@@ -44,10 +44,10 @@ impl get_battle_state for super::RemoteProcedures {
input: BattleStateQueryInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<BattleStateProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
&super::ProcedureEventContext,
Result<BattleStateProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
) {
self.imp
.invoke_procedure_with_callback::<_, BattleStateProcedureResult>(

View File

@@ -31,10 +31,10 @@ pub trait get_big_fish_run {
input: BigFishRunGetInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<BigFishRunProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
&super::ProcedureEventContext,
Result<BigFishRunProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
);
}
@@ -44,10 +44,10 @@ impl get_big_fish_run for super::RemoteProcedures {
input: BigFishRunGetInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<BigFishRunProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
&super::ProcedureEventContext,
Result<BigFishRunProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
) {
self.imp
.invoke_procedure_with_callback::<_, BigFishRunProcedureResult>(

View File

@@ -31,10 +31,10 @@ pub trait get_big_fish_session {
input: BigFishSessionGetInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<BigFishSessionProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
&super::ProcedureEventContext,
Result<BigFishSessionProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
);
}
@@ -44,10 +44,10 @@ impl get_big_fish_session for super::RemoteProcedures {
input: BigFishSessionGetInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<BigFishSessionProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
&super::ProcedureEventContext,
Result<BigFishSessionProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
) {
self.imp
.invoke_procedure_with_callback::<_, BigFishSessionProcedureResult>(

View File

@@ -31,10 +31,10 @@ pub trait get_chapter_progression {
input: ChapterProgressionGetInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<ChapterProgressionProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
&super::ProcedureEventContext,
Result<ChapterProgressionProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
);
}
@@ -44,10 +44,10 @@ impl get_chapter_progression for super::RemoteProcedures {
input: ChapterProgressionGetInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<ChapterProgressionProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
&super::ProcedureEventContext,
Result<ChapterProgressionProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
) {
self.imp
.invoke_procedure_with_callback::<_, ChapterProgressionProcedureResult>(

View File

@@ -31,10 +31,10 @@ pub trait get_custom_world_agent_card_detail {
input: CustomWorldAgentCardDetailGetInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<CustomWorldDraftCardDetailResult, __sdk::InternalError>,
) + Send
+ 'static,
&super::ProcedureEventContext,
Result<CustomWorldDraftCardDetailResult, __sdk::InternalError>,
) + Send
+ 'static,
);
}
@@ -44,10 +44,10 @@ impl get_custom_world_agent_card_detail for super::RemoteProcedures {
input: CustomWorldAgentCardDetailGetInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<CustomWorldDraftCardDetailResult, __sdk::InternalError>,
) + Send
+ 'static,
&super::ProcedureEventContext,
Result<CustomWorldDraftCardDetailResult, __sdk::InternalError>,
) + Send
+ 'static,
) {
self.imp
.invoke_procedure_with_callback::<_, CustomWorldDraftCardDetailResult>(

View File

@@ -31,10 +31,10 @@ pub trait get_custom_world_agent_operation {
input: CustomWorldAgentOperationGetInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<CustomWorldAgentOperationProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
&super::ProcedureEventContext,
Result<CustomWorldAgentOperationProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
);
}
@@ -44,10 +44,10 @@ impl get_custom_world_agent_operation for super::RemoteProcedures {
input: CustomWorldAgentOperationGetInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<CustomWorldAgentOperationProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
&super::ProcedureEventContext,
Result<CustomWorldAgentOperationProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
) {
self.imp
.invoke_procedure_with_callback::<_, CustomWorldAgentOperationProcedureResult>(

View File

@@ -31,10 +31,10 @@ pub trait get_custom_world_agent_session {
input: CustomWorldAgentSessionGetInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<CustomWorldAgentSessionProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
&super::ProcedureEventContext,
Result<CustomWorldAgentSessionProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
);
}
@@ -44,10 +44,10 @@ impl get_custom_world_agent_session for super::RemoteProcedures {
input: CustomWorldAgentSessionGetInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<CustomWorldAgentSessionProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
&super::ProcedureEventContext,
Result<CustomWorldAgentSessionProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
) {
self.imp
.invoke_procedure_with_callback::<_, CustomWorldAgentSessionProcedureResult>(

Some files were not shown because too many files have changed in this diff Show More