@@ -1423,6 +1423,7 @@ pub mod test_e_table;
14231423pub mod test_f_table;
14241424pub mod return_value_procedure;
14251425pub mod sleep_one_second_procedure;
1426+ pub mod with_tx_procedure;
14261427
14271428pub use baz_type::Baz;
14281429pub use foobar_type::Foobar;
@@ -1468,6 +1469,7 @@ pub use test_reducer::{test, set_flags_for_test, TestCallbackId};
14681469pub use test_btree_index_args_reducer::{test_btree_index_args, set_flags_for_test_btree_index_args, TestBtreeIndexArgsCallbackId};
14691470pub use return_value_procedure::return_value;
14701471pub use sleep_one_second_procedure::sleep_one_second;
1472+ pub use with_tx_procedure::with_tx;
14711473
14721474#[derive(Clone, PartialEq, Debug)]
14731475
@@ -4851,3 +4853,57 @@ impl set_flags_for_test for super::SetReducerFlags {
48514853}
48524854
48534855'''
4856+ "with_tx_procedure.rs" = '''
4857+ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE
4858+ // WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD.
4859+
4860+ #![allow(unused, clippy::all)]
4861+ use spacetimedb_sdk::__codegen::{
4862+ self as __sdk,
4863+ __lib,
4864+ __sats,
4865+ __ws,
4866+ };
4867+
4868+
4869+ #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)]
4870+ #[sats(crate = __lib)]
4871+ struct WithTxArgs {
4872+ }
4873+
4874+
4875+ impl __sdk::InModule for WithTxArgs {
4876+ type Module = super::RemoteModule;
4877+ }
4878+
4879+ #[allow(non_camel_case_types)]
4880+ /// Extension trait for access to the procedure `with_tx`.
4881+ ///
4882+ /// Implemented for [`super::RemoteProcedures`].
4883+ pub trait with_tx {
4884+ fn with_tx(&self, ) {
4885+ self.with_tx_then( |_, _| {});
4886+ }
4887+
4888+ fn with_tx_then(
4889+ &self,
4890+
4891+ __callback: impl FnOnce(&super::ProcedureEventContext, Result<(), __sdk::InternalError>) + Send + 'static,
4892+ );
4893+ }
4894+
4895+ impl with_tx for super::RemoteProcedures {
4896+ fn with_tx_then(
4897+ &self,
4898+
4899+ __callback: impl FnOnce(&super::ProcedureEventContext, Result<(), __sdk::InternalError>) + Send + 'static,
4900+ ) {
4901+ self.imp.invoke_procedure_with_callback::<_, ()>(
4902+ "with_tx",
4903+ WithTxArgs { },
4904+ __callback,
4905+ );
4906+ }
4907+ }
4908+
4909+ '''
0 commit comments