diff --git a/Cargo.lock b/Cargo.lock index 8cfcc97f1f..79b60322bb 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1487,6 +1487,15 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "fixed_bitmaps" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab96a926e4a8b304e4bee94122e2e1305e954d794974931148d81ab354d32975" +dependencies = [ + "serde", +] + [[package]] name = "fixedbitset" version = "0.4.2" @@ -4308,6 +4317,7 @@ dependencies = [ "derive_more", "dirs", "email_address", + "fixed_bitmaps", "flate2", "fs2", "futures", diff --git a/crates/core/Cargo.toml b/crates/core/Cargo.toml index 838eccd5ec..3228c3a221 100644 --- a/crates/core/Cargo.toml +++ b/crates/core/Cargo.toml @@ -23,6 +23,8 @@ spacetimedb-sats = { path = "../sats", version = "0.7.0" } spacetimedb-vm = { path = "../vm", version = "0.7.0" } spacetimedb-client-api-messages = { path = "../client-api-messages", version = "0.7.0" } +fixed_bitmaps = "0.10.2" + anyhow.workspace = true async-trait.workspace = true backtrace.workspace = true diff --git a/crates/core/src/db/datastore/locking_tx_datastore/mod.rs b/crates/core/src/db/datastore/locking_tx_datastore/mod.rs index b11313d0d4..a925ae7714 100644 --- a/crates/core/src/db/datastore/locking_tx_datastore/mod.rs +++ b/crates/core/src/db/datastore/locking_tx_datastore/mod.rs @@ -44,6 +44,7 @@ use crate::{ error::{DBError, IndexError, TableError}, }; +use crate::db::datastore::locking_tx_datastore::table::{RowPk, RowsIterator}; use anyhow::anyhow; use derive_more::Into; use parking_lot::{lock_api::ArcMutexGuard, Mutex, RawMutex}; @@ -139,7 +140,7 @@ impl CommittedState { self.tables.entry(table_id).or_insert_with(|| Table { row_type: row_type.clone(), schema: schema.clone(), - rows: BTreeMap::new(), + rows: Default::default(), indexes: HashMap::new(), }) } @@ -156,20 +157,22 @@ impl CommittedState { commit_table.row_type = table.row_type; commit_table.schema = table.schema; - tx_data.records.extend(table.rows.into_iter().map(|(row_id, row)| { - commit_table.insert(row_id, row.clone()); - let pv = row; - let bytes = match row_id.0 { - DataKey::Data(data) => Arc::new(data.to_vec()), - DataKey::Hash(_) => memory.get(&row_id.0).unwrap().clone(), - }; - TxRecord { - op: TxOp::Insert(bytes), - table_id, - key: row_id.0, - product_value: pv, - } - })); + tx_data + .records + .extend(table.rows.into_iter().map(|RowPk { key: row_id, row }| { + commit_table.insert(*row_id, row.clone()); + let pv = row; + let bytes = match row_id.0 { + DataKey::Data(data) => Arc::new(data.to_vec()), + DataKey::Hash(_) => memory.get(&row_id.0).unwrap().clone(), + }; + TxRecord { + op: TxOp::Insert(bytes), + table_id, + key: row_id.0, + product_value: pv.clone(), + } + })); // Add all newly created indexes to the committed state for (_, index) in table.indexes { @@ -251,6 +254,17 @@ struct TxState { delete_tables: BTreeMap>, } +enum RowState2 { + /// The row is present because it has been inserted in the + /// current transaction. + Insert, + /// The row is absent because it has been deleted in the + /// current transaction. + Delete, + /// The row is not present in the table. + Absent, +} + /// Represents whether a row has been previously committed, inserted /// or deleted this transaction, or simply not present at all. enum RowState { @@ -275,6 +289,26 @@ impl TxState { } } + #[tracing::instrument(skip_all)] + pub fn get_row_op2( + &self, + table_inserted: Option<&Table>, + table_deleted: Option<&BTreeSet>, + row_id: &RowId, + ) -> RowState2 { + if let Some(true) = table_deleted.map(|set| set.contains(row_id)) { + return RowState2::Delete; + } + let Some(_) = table_inserted else { + return RowState2::Absent; + }; + // table + // .get_row(row_id) + // .map(|_| RowState2::Insert) + // .unwrap_or(RowState2::Absent) + RowState2::Absent + } + #[tracing::instrument(skip_all)] pub fn get_row_op(&self, table_id: &TableId, row_id: &RowId) -> RowState { if let Some(true) = self.delete_tables.get(table_id).map(|set| set.contains(row_id)) { @@ -572,7 +606,7 @@ impl Inner { row_type, schema, indexes: HashMap::new(), - rows: BTreeMap::new(), + rows: Default::default(), }, ); } @@ -784,7 +818,7 @@ impl Inner { row_type, schema, indexes: HashMap::new(), - rows: BTreeMap::new(), + rows: Default::default(), }, ); Ok(()) @@ -1013,7 +1047,7 @@ impl Inner { row_type, schema, indexes: HashMap::new(), - rows: BTreeMap::new(), + rows: Default::default(), }, ); self.tx_state @@ -1251,7 +1285,7 @@ impl Inner { ) }) .collect::>(), - rows: BTreeMap::new(), + rows: Default::default(), }; self.tx_state.as_mut().unwrap().insert_tables.insert(table_id, table); self.tx_state.as_ref().unwrap().get_insert_table(&table_id).unwrap() @@ -1640,7 +1674,7 @@ impl Locking { row_type: row_type.clone(), schema, indexes: HashMap::new(), - rows: BTreeMap::new(), + rows: Default::default(), }); match write.operation { Operation::Delete => { @@ -1692,46 +1726,57 @@ impl traits::Tx for Locking { } pub struct Iter<'a> { - table_id: TableId, - inner: &'a Inner, + //table_id: TableId, + //inner: &'a Inner, stage: ScanStage<'a>, + state: Option<&'a TxState>, + table_committed: Option<&'a Table>, + table_insert: Option<&'a Table>, + table_deleted: Option<&'a BTreeSet>, } impl<'a> Iter<'a> { fn new(table_id: TableId, inner: &'a Inner) -> Self { + let state = inner.tx_state.as_ref(); + let table_committed = inner.committed_state.tables.get(&table_id); + let table_insert = inner + .tx_state + .as_ref() + .and_then(|tx_state| tx_state.insert_tables.get(&table_id)); + let table_deleted = state.and_then(|x| x.delete_tables.get(&table_id)); Self { - table_id, - inner, + //table_id, + //inner, stage: ScanStage::Start, + state, + table_committed, + table_insert, + table_deleted, } } } enum ScanStage<'a> { Start, - CurrentTx { - iter: std::collections::btree_map::Iter<'a, RowId, ProductValue>, - }, - Committed { - iter: std::collections::btree_map::Iter<'a, RowId, ProductValue>, - }, + CurrentTx { iter: RowsIterator<'a> }, + Committed { iter: RowsIterator<'a> }, } -impl Iterator for Iter<'_> { +impl<'a> Iterator for Iter<'a> { type Item = DataRef; #[tracing::instrument(skip_all)] + #[inline] fn next(&mut self) -> Option { loop { match &mut self.stage { ScanStage::Start => { let _span = tracing::debug_span!("ScanStage::Start").entered(); - if let Some(table) = self.inner.committed_state.tables.get(&self.table_id) { + if let Some(table) = self.table_committed { self.stage = ScanStage::Committed { iter: table.rows.iter(), }; - } else if let Some(table) = self.inner.tx_state.as_ref().unwrap().insert_tables.get(&self.table_id) - { + } else if let Some(table) = self.table_insert { self.stage = ScanStage::CurrentTx { iter: table.rows.iter(), }; @@ -1739,30 +1784,25 @@ impl Iterator for Iter<'_> { } ScanStage::Committed { iter } => { let _span = tracing::debug_span!("ScanStage::Committed").entered(); - for (row_id, row) in iter { - match self - .inner - .tx_state - .as_ref() - .map(|tx_state| tx_state.get_row_op(&self.table_id, row_id)) - { - Some(RowState::Committed(_)) => unreachable!("a row cannot be committed in a tx state"), - Some(RowState::Insert(_)) => (), // Do nothing, we'll get it in the next stage - Some(RowState::Delete) => (), // Skip it, it's been deleted - Some(RowState::Absent) => { - return Some(DataRef::new(row_id.0, row.clone())); - } - None => { - return Some(DataRef::new(row_id.0, row.clone())); - } - } + if let Some(row_pk) = iter.next() { + return Some(DataRef::new(row_pk.key.0, row_pk.row.clone())); } - if let Some(table) = self - .inner - .tx_state - .as_ref() - .and_then(|tx_state| tx_state.insert_tables.get(&self.table_id)) - { + // for row_pk in iter { + // match self + // .state + // .map(|tx_state| tx_state.get_row_op2(self.table_insert, self.table_deleted, &row_pk.key)) + // { + // Some(RowState2::Insert) => (), // Do nothing, we'll get it in the next stage + // Some(RowState2::Delete) => (), // Skip it, it's been deleted + // Some(RowState2::Absent) => { + // return Some(DataRef::new(row_pk.key.0, row_pk.row.clone())); + // } + // None => { + // return Some(DataRef::new(row_pk.key.0, row_pk.row.clone())); + // } + // } + // } + if let Some(table) = self.table_insert { self.stage = ScanStage::CurrentTx { iter: table.rows.iter(), }; @@ -1772,8 +1812,8 @@ impl Iterator for Iter<'_> { } ScanStage::CurrentTx { iter } => { let _span = tracing::debug_span!("ScanStage::CurrentTx").entered(); - if let Some((id, row)) = iter.next() { - return Some(DataRef::new(id.0, row.clone())); + if let Some(row) = iter.next() { + return Some(DataRef::new(row.key.0, row.row.clone())); } break; } @@ -1781,6 +1821,15 @@ impl Iterator for Iter<'_> { } None } + + fn size_hint(&self) -> (usize, Option) { + let total_rows = self.table_committed.map(|x| x.rows.len()).unwrap_or_default() + + self.table_insert.map(|x| x.rows.len()).unwrap_or_default() + - self.table_deleted.map(|x| x.len()).unwrap_or_default(); + + //dbg!(total_rows); + (total_rows, Some(total_rows)) + } } pub struct IndexSeekIterInner<'a> { @@ -1900,7 +1949,7 @@ impl> Iterator for ScanIterByColRange<'_, R> { let row = data_ref.view(); let value = &row.elements[self.col_id.0 as usize]; if self.range.contains(value) { - return Some(data_ref); + return Some(data_ref.into()); } } None @@ -2152,8 +2201,10 @@ impl traits::MutProgrammable for Locking { #[cfg(test)] mod tests { use super::{ColId, Locking, StTableRow}; + use crate::db::datastore::locking_tx_datastore::table::RowPk; + use crate::db::datastore::locking_tx_datastore::RowId; use crate::db::datastore::system_tables::{StConstraintRow, ST_CONSTRAINTS_ID}; - use crate::db::datastore::traits::IndexId; + use crate::db::datastore::traits::{IndexId, TxDatastore}; use crate::{ db::datastore::{ locking_tx_datastore::{ @@ -2167,12 +2218,14 @@ mod tests { }; use itertools::Itertools; use nonempty::NonEmpty; + use spacetimedb_lib::data_key::ToDataKey; use spacetimedb_lib::{ auth::{StAccess, StTableType}, error::ResultTest, ColumnIndexAttribute, }; use spacetimedb_sats::{product, AlgebraicType, AlgebraicValue, ProductValue}; + use std::time::Instant; fn u32_str_u32(a: u32, b: &str, c: u32) -> ProductValue { product![a, b, c] @@ -2338,6 +2391,62 @@ mod tests { Ok(()) } + #[test] + fn test_iter() -> ResultTest<()> { + let datastore = get_datastore()?; + let mut tx = datastore.begin_mut_tx(); + let schema = basic_table_schema(); + let table_id = datastore.create_table_mut_tx(&mut tx, schema)?; + let total = 10000; + let mut rows = Vec::with_capacity(total); + for i in 0..total { + let row = ProductValue::from_iter(vec![ + AlgebraicValue::U32(0), // 0 will be ignored. + AlgebraicValue::String(format!("val {i}")), + AlgebraicValue::U32((18 * i) as u32), + ]); + rows.push(RowPk { + key: RowId(row.to_data_key()), + row: row.clone(), + }); + datastore.insert_mut_tx(&mut tx, table_id, row)?; + } + + let mut result_stdb = Vec::with_capacity(1000); + let mut result_stdb_rows = result_stdb.clone(); + let mut result_vec = result_stdb.clone(); + + for _ in 0..1000 { + let now = Instant::now(); + let _table_rows = datastore.iter_tx(&tx, table_id)?.collect::>(); + let elapsed = now.elapsed(); + result_stdb.push(elapsed); + + let table_rows = datastore.iter_tx(&tx, table_id)?.table_insert.unwrap(); + let now = Instant::now(); + + let _table_rows: Vec<_> = std::hint::black_box(table_rows.rows.iter().collect()); + //.map(|x| x.row.clone()) + let elapsed = now.elapsed(); + result_stdb_rows.push(elapsed); + + // dbg!(table_rows); + let now = Instant::now(); + let _table_rows: Vec<_> = std::hint::black_box(rows.iter().collect()); + let elapsed = now.elapsed(); + result_vec.push(elapsed); + } + + result_stdb.sort(); + println!("Elapsed STDB: {:.2?}", result_stdb.last().unwrap()); + result_stdb_rows.sort(); + println!("Elapsed STDB ROWs: {:.2?}", result_stdb_rows.last().unwrap()); + result_vec.sort(); + println!("Elapsed STDB Vec: {:.2?}", result_vec.last().unwrap()); + + Ok(()) + } + #[test] fn test_create_table_pre_commit() -> ResultTest<()> { let datastore = get_datastore()?; diff --git a/crates/core/src/db/datastore/locking_tx_datastore/table.rs b/crates/core/src/db/datastore/locking_tx_datastore/table.rs index 5653bd601f..e794c8c1fe 100644 --- a/crates/core/src/db/datastore/locking_tx_datastore/table.rs +++ b/crates/core/src/db/datastore/locking_tx_datastore/table.rs @@ -9,12 +9,134 @@ use std::{ collections::{BTreeMap, HashMap}, ops::RangeBounds, }; +// +// fn set_true(val: &mut usize, bit_pos: usize) { +// *val |= 1 << bit_pos; +// } +// +// fn set_false(val: &mut usize, bit_pos: usize) { +// *val &= !(1 << bit_pos); +// } +// +// fn is_set(val: usize, bit_pos: usize) -> bool { +// let mask = 1 << bit_pos; +// val & mask == 1 +// } + +#[derive(Debug, Clone)] +pub struct RowPk { + pub(crate) key: RowId, + pub(crate) row: ProductValue, +} + +#[derive(Debug, Clone)] +pub struct Rows { + data: Vec, + index: BTreeMap, +} + +impl Default for Rows { + fn default() -> Self { + Self { + data: Vec::new(), + index: BTreeMap::new(), + } + } +} + +impl Rows { + pub fn insert(&mut self, key: RowId, value: ProductValue) -> Option<&ProductValue> { + let pos = if let Some(pos) = self.index.get(&key) { + *pos + } else { + let idx = self.data.len(); + self.index.insert(key, idx); + self.data.push(RowPk { key, row: value }); + idx + }; + // set_false(&mut self.deleted, pos); + + self.data.get(pos).map(|x| &x.row) + } + + pub fn remove(&mut self, key: &RowId) -> Option { + if let Some(pos) = self.index.remove(key) { + // set_true(&mut self.deleted, pos); + + self.data.get(pos).map(|x| x.row.clone()) + } else { + None + } + } + + pub fn get(&self, key: &RowId) -> Option<&ProductValue> { + if let Some(pos) = self.index.get(key) { + self.data.get(*pos).map(|x| &x.row) + } else { + None + } + } + + #[inline] + pub fn iter(&self) -> RowsIterator<'_> { + RowsIterator::new(self) + } + + pub fn len(&self) -> usize { + self.index.len() + } +} + +pub struct RowsIterator<'a> { + rows: &'a Rows, + iter: std::slice::Iter<'a, RowPk>, +} + +//unsafe impl<'a> std::iter::TrustedLen for RowsIterator<'a> {} + +impl<'a> ExactSizeIterator for RowsIterator<'a> {} + +impl<'a> RowsIterator<'a> { + pub fn new(rows: &'a Rows) -> Self { + RowsIterator { + rows, + iter: rows.data.iter(), + } + } +} + +impl<'a> Iterator for RowsIterator<'a> { + type Item = &'a RowPk; + + fn next(&mut self) -> Option { + if let Some(row) = self.iter.next() { + //if self.rows.index.contains_key(&row.key) { + return Some(row); + //} + }; + None + } + + fn size_hint(&self) -> (usize, Option) { + (self.rows.len(), Some(self.rows.len())) + } +} + +impl<'a> IntoIterator for &'a Rows { + type Item = &'a RowPk; + type IntoIter = RowsIterator<'a>; + + fn into_iter(self) -> Self::IntoIter { + RowsIterator::new(self) + } +} pub(crate) struct Table { pub(crate) row_type: ProductType, pub(crate) schema: TableSchema, pub(crate) indexes: HashMap, BTreeIndex>, - pub(crate) rows: BTreeMap, + pub(crate) rows: Rows, + // pub(crate) rows: BTreeMap, } impl Table { @@ -53,7 +175,7 @@ impl Table { } pub(crate) fn scan_rows(&self) -> impl Iterator { - self.rows.values() + self.rows.iter().map(|x| &x.row) } /// When there's an index for `cols`, diff --git a/crates/core/src/lib.rs b/crates/core/src/lib.rs index ac44494523..b31ad9ec6f 100644 --- a/crates/core/src/lib.rs +++ b/crates/core/src/lib.rs @@ -1,3 +1,4 @@ +//#![feature(trusted_len)] use std::path::{Path, PathBuf}; use once_cell::sync::Lazy; diff --git a/crates/sdk/tests/test-client/src/module_bindings/mod.rs b/crates/sdk/tests/test-client/src/module_bindings/mod.rs index e2167506ca..33212a172e 100644 --- a/crates/sdk/tests/test-client/src/module_bindings/mod.rs +++ b/crates/sdk/tests/test-client/src/module_bindings/mod.rs @@ -861,147 +861,147 @@ impl SpacetimeModule for Module { return None; }; #[allow(clippy::match_single_binding)] - match &function_call.reducer[..] { - "delete_pk_address" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::DeletePkAddress), - "delete_pk_bool" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::DeletePkBool), - "delete_pk_i128" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::DeletePkI128), - "delete_pk_i16" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::DeletePkI16), - "delete_pk_i32" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::DeletePkI32), - "delete_pk_i64" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::DeletePkI64), - "delete_pk_i8" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::DeletePkI8), - "delete_pk_identity" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::DeletePkIdentity), - "delete_pk_string" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::DeletePkString), - "delete_pk_u128" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::DeletePkU128), - "delete_pk_u16" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::DeletePkU16), - "delete_pk_u32" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::DeletePkU32), - "delete_pk_u64" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::DeletePkU64), - "delete_pk_u8" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::DeletePkU8), - "delete_unique_address" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::DeleteUniqueAddress), - "delete_unique_bool" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::DeleteUniqueBool), - "delete_unique_i128" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::DeleteUniqueI128), - "delete_unique_i16" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::DeleteUniqueI16), - "delete_unique_i32" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::DeleteUniqueI32), - "delete_unique_i64" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::DeleteUniqueI64), - "delete_unique_i8" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::DeleteUniqueI8), - "delete_unique_identity" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::DeleteUniqueIdentity), - "delete_unique_string" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::DeleteUniqueString), - "delete_unique_u128" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::DeleteUniqueU128), - "delete_unique_u16" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::DeleteUniqueU16), - "delete_unique_u32" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::DeleteUniqueU32), - "delete_unique_u64" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::DeleteUniqueU64), - "delete_unique_u8" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::DeleteUniqueU8), - "insert_caller_one_address" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertCallerOneAddress), - "insert_caller_one_identity" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertCallerOneIdentity), - "insert_caller_pk_address" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertCallerPkAddress), - "insert_caller_pk_identity" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertCallerPkIdentity), - "insert_caller_unique_address" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertCallerUniqueAddress), - "insert_caller_unique_identity" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertCallerUniqueIdentity), - "insert_caller_vec_address" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertCallerVecAddress), - "insert_caller_vec_identity" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertCallerVecIdentity), - "insert_large_table" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertLargeTable), - "insert_one_address" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertOneAddress), - "insert_one_bool" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertOneBool), - "insert_one_byte_struct" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertOneByteStruct), - "insert_one_enum_with_payload" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertOneEnumWithPayload), - "insert_one_every_primitive_struct" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertOneEveryPrimitiveStruct), - "insert_one_every_vec_struct" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertOneEveryVecStruct), - "insert_one_f32" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertOneF32), - "insert_one_f64" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertOneF64), - "insert_one_i128" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertOneI128), - "insert_one_i16" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertOneI16), - "insert_one_i32" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertOneI32), - "insert_one_i64" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertOneI64), - "insert_one_i8" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertOneI8), - "insert_one_identity" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertOneIdentity), - "insert_one_simple_enum" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertOneSimpleEnum), - "insert_one_string" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertOneString), - "insert_one_u128" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertOneU128), - "insert_one_u16" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertOneU16), - "insert_one_u32" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertOneU32), - "insert_one_u64" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertOneU64), - "insert_one_u8" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertOneU8), - "insert_one_unit_struct" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertOneUnitStruct), - "insert_pk_address" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertPkAddress), - "insert_pk_bool" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertPkBool), - "insert_pk_i128" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertPkI128), - "insert_pk_i16" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertPkI16), - "insert_pk_i32" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertPkI32), - "insert_pk_i64" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertPkI64), - "insert_pk_i8" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertPkI8), - "insert_pk_identity" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertPkIdentity), - "insert_pk_string" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertPkString), - "insert_pk_u128" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertPkU128), - "insert_pk_u16" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertPkU16), - "insert_pk_u32" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertPkU32), - "insert_pk_u64" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertPkU64), - "insert_pk_u8" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertPkU8), - "insert_table_holds_table" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertTableHoldsTable), - "insert_unique_address" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertUniqueAddress), - "insert_unique_bool" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertUniqueBool), - "insert_unique_i128" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertUniqueI128), - "insert_unique_i16" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertUniqueI16), - "insert_unique_i32" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertUniqueI32), - "insert_unique_i64" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertUniqueI64), - "insert_unique_i8" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertUniqueI8), - "insert_unique_identity" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertUniqueIdentity), - "insert_unique_string" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertUniqueString), - "insert_unique_u128" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertUniqueU128), - "insert_unique_u16" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertUniqueU16), - "insert_unique_u32" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertUniqueU32), - "insert_unique_u64" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertUniqueU64), - "insert_unique_u8" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertUniqueU8), - "insert_vec_address" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertVecAddress), - "insert_vec_bool" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertVecBool), - "insert_vec_byte_struct" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertVecByteStruct), - "insert_vec_enum_with_payload" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertVecEnumWithPayload), - "insert_vec_every_primitive_struct" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertVecEveryPrimitiveStruct), - "insert_vec_every_vec_struct" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertVecEveryVecStruct), - "insert_vec_f32" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertVecF32), - "insert_vec_f64" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertVecF64), - "insert_vec_i128" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertVecI128), - "insert_vec_i16" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertVecI16), - "insert_vec_i32" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertVecI32), - "insert_vec_i64" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertVecI64), - "insert_vec_i8" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertVecI8), - "insert_vec_identity" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertVecIdentity), - "insert_vec_simple_enum" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertVecSimpleEnum), - "insert_vec_string" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertVecString), - "insert_vec_u128" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertVecU128), - "insert_vec_u16" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertVecU16), - "insert_vec_u32" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertVecU32), - "insert_vec_u64" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertVecU64), - "insert_vec_u8" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertVecU8), - "insert_vec_unit_struct" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertVecUnitStruct), - "update_pk_address" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::UpdatePkAddress), - "update_pk_bool" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::UpdatePkBool), - "update_pk_i128" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::UpdatePkI128), - "update_pk_i16" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::UpdatePkI16), - "update_pk_i32" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::UpdatePkI32), - "update_pk_i64" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::UpdatePkI64), - "update_pk_i8" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::UpdatePkI8), - "update_pk_identity" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::UpdatePkIdentity), - "update_pk_string" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::UpdatePkString), - "update_pk_u128" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::UpdatePkU128), - "update_pk_u16" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::UpdatePkU16), - "update_pk_u32" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::UpdatePkU32), - "update_pk_u64" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::UpdatePkU64), - "update_pk_u8" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::UpdatePkU8), - "update_unique_address" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::UpdateUniqueAddress), - "update_unique_bool" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::UpdateUniqueBool), - "update_unique_i128" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::UpdateUniqueI128), - "update_unique_i16" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::UpdateUniqueI16), - "update_unique_i32" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::UpdateUniqueI32), - "update_unique_i64" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::UpdateUniqueI64), - "update_unique_i8" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::UpdateUniqueI8), - "update_unique_identity" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::UpdateUniqueIdentity), - "update_unique_string" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::UpdateUniqueString), - "update_unique_u128" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::UpdateUniqueU128), - "update_unique_u16" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::UpdateUniqueU16), - "update_unique_u32" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::UpdateUniqueU32), - "update_unique_u64" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::UpdateUniqueU64), - "update_unique_u8" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::UpdateUniqueU8), - unknown => { spacetimedb_sdk::log::error!("Event on an unknown reducer: {:?}", unknown); None } - } +match &function_call.reducer[..] { + "delete_pk_address" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::DeletePkAddress), + "delete_pk_bool" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::DeletePkBool), + "delete_pk_i128" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::DeletePkI128), + "delete_pk_i16" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::DeletePkI16), + "delete_pk_i32" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::DeletePkI32), + "delete_pk_i64" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::DeletePkI64), + "delete_pk_i8" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::DeletePkI8), + "delete_pk_identity" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::DeletePkIdentity), + "delete_pk_string" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::DeletePkString), + "delete_pk_u128" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::DeletePkU128), + "delete_pk_u16" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::DeletePkU16), + "delete_pk_u32" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::DeletePkU32), + "delete_pk_u64" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::DeletePkU64), + "delete_pk_u8" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::DeletePkU8), + "delete_unique_address" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::DeleteUniqueAddress), + "delete_unique_bool" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::DeleteUniqueBool), + "delete_unique_i128" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::DeleteUniqueI128), + "delete_unique_i16" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::DeleteUniqueI16), + "delete_unique_i32" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::DeleteUniqueI32), + "delete_unique_i64" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::DeleteUniqueI64), + "delete_unique_i8" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::DeleteUniqueI8), + "delete_unique_identity" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::DeleteUniqueIdentity), + "delete_unique_string" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::DeleteUniqueString), + "delete_unique_u128" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::DeleteUniqueU128), + "delete_unique_u16" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::DeleteUniqueU16), + "delete_unique_u32" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::DeleteUniqueU32), + "delete_unique_u64" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::DeleteUniqueU64), + "delete_unique_u8" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::DeleteUniqueU8), + "insert_caller_one_address" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertCallerOneAddress), + "insert_caller_one_identity" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertCallerOneIdentity), + "insert_caller_pk_address" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertCallerPkAddress), + "insert_caller_pk_identity" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertCallerPkIdentity), + "insert_caller_unique_address" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertCallerUniqueAddress), + "insert_caller_unique_identity" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertCallerUniqueIdentity), + "insert_caller_vec_address" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertCallerVecAddress), + "insert_caller_vec_identity" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertCallerVecIdentity), + "insert_large_table" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertLargeTable), + "insert_one_address" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertOneAddress), + "insert_one_bool" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertOneBool), + "insert_one_byte_struct" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertOneByteStruct), + "insert_one_enum_with_payload" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertOneEnumWithPayload), + "insert_one_every_primitive_struct" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertOneEveryPrimitiveStruct), + "insert_one_every_vec_struct" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertOneEveryVecStruct), + "insert_one_f32" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertOneF32), + "insert_one_f64" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertOneF64), + "insert_one_i128" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertOneI128), + "insert_one_i16" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertOneI16), + "insert_one_i32" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertOneI32), + "insert_one_i64" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertOneI64), + "insert_one_i8" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertOneI8), + "insert_one_identity" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertOneIdentity), + "insert_one_simple_enum" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertOneSimpleEnum), + "insert_one_string" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertOneString), + "insert_one_u128" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertOneU128), + "insert_one_u16" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertOneU16), + "insert_one_u32" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertOneU32), + "insert_one_u64" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertOneU64), + "insert_one_u8" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertOneU8), + "insert_one_unit_struct" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertOneUnitStruct), + "insert_pk_address" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertPkAddress), + "insert_pk_bool" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertPkBool), + "insert_pk_i128" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertPkI128), + "insert_pk_i16" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertPkI16), + "insert_pk_i32" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertPkI32), + "insert_pk_i64" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertPkI64), + "insert_pk_i8" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertPkI8), + "insert_pk_identity" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertPkIdentity), + "insert_pk_string" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertPkString), + "insert_pk_u128" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertPkU128), + "insert_pk_u16" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertPkU16), + "insert_pk_u32" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertPkU32), + "insert_pk_u64" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertPkU64), + "insert_pk_u8" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertPkU8), + "insert_table_holds_table" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertTableHoldsTable), + "insert_unique_address" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertUniqueAddress), + "insert_unique_bool" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertUniqueBool), + "insert_unique_i128" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertUniqueI128), + "insert_unique_i16" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertUniqueI16), + "insert_unique_i32" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertUniqueI32), + "insert_unique_i64" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertUniqueI64), + "insert_unique_i8" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertUniqueI8), + "insert_unique_identity" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertUniqueIdentity), + "insert_unique_string" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertUniqueString), + "insert_unique_u128" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertUniqueU128), + "insert_unique_u16" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertUniqueU16), + "insert_unique_u32" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertUniqueU32), + "insert_unique_u64" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertUniqueU64), + "insert_unique_u8" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertUniqueU8), + "insert_vec_address" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertVecAddress), + "insert_vec_bool" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertVecBool), + "insert_vec_byte_struct" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertVecByteStruct), + "insert_vec_enum_with_payload" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertVecEnumWithPayload), + "insert_vec_every_primitive_struct" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertVecEveryPrimitiveStruct), + "insert_vec_every_vec_struct" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertVecEveryVecStruct), + "insert_vec_f32" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertVecF32), + "insert_vec_f64" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertVecF64), + "insert_vec_i128" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertVecI128), + "insert_vec_i16" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertVecI16), + "insert_vec_i32" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertVecI32), + "insert_vec_i64" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertVecI64), + "insert_vec_i8" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertVecI8), + "insert_vec_identity" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertVecIdentity), + "insert_vec_simple_enum" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertVecSimpleEnum), + "insert_vec_string" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertVecString), + "insert_vec_u128" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertVecU128), + "insert_vec_u16" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertVecU16), + "insert_vec_u32" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertVecU32), + "insert_vec_u64" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertVecU64), + "insert_vec_u8" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertVecU8), + "insert_vec_unit_struct" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::InsertVecUnitStruct), + "update_pk_address" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::UpdatePkAddress), + "update_pk_bool" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::UpdatePkBool), + "update_pk_i128" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::UpdatePkI128), + "update_pk_i16" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::UpdatePkI16), + "update_pk_i32" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::UpdatePkI32), + "update_pk_i64" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::UpdatePkI64), + "update_pk_i8" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::UpdatePkI8), + "update_pk_identity" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::UpdatePkIdentity), + "update_pk_string" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::UpdatePkString), + "update_pk_u128" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::UpdatePkU128), + "update_pk_u16" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::UpdatePkU16), + "update_pk_u32" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::UpdatePkU32), + "update_pk_u64" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::UpdatePkU64), + "update_pk_u8" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::UpdatePkU8), + "update_unique_address" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::UpdateUniqueAddress), + "update_unique_bool" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::UpdateUniqueBool), + "update_unique_i128" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::UpdateUniqueI128), + "update_unique_i16" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::UpdateUniqueI16), + "update_unique_i32" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::UpdateUniqueI32), + "update_unique_i64" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::UpdateUniqueI64), + "update_unique_i8" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::UpdateUniqueI8), + "update_unique_identity" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::UpdateUniqueIdentity), + "update_unique_string" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::UpdateUniqueString), + "update_unique_u128" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::UpdateUniqueU128), + "update_unique_u16" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::UpdateUniqueU16), + "update_unique_u32" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::UpdateUniqueU32), + "update_unique_u64" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::UpdateUniqueU64), + "update_unique_u8" => _reducer_callbacks.handle_event_of_type::(event, _state, ReducerEvent::UpdateUniqueU8), + unknown => { spacetimedb_sdk::log::error!("Event on an unknown reducer: {:?}", unknown); None } +} } fn handle_resubscribe( &self, diff --git a/run_standalone_temp.sh b/run_standalone_temp.sh index 53566ce549..6c8794e535 100755 --- a/run_standalone_temp.sh +++ b/run_standalone_temp.sh @@ -25,7 +25,7 @@ trap cleanup EXIT cp crates/standalone/log.conf "$STDB_PATH/log.conf" # -i differs between GNU and BSD sed, so use a temp file -sed 's/spacetimedb=debug/spacetimedb=trace/g' "$STDB_PATH/log.conf" > "$STDB_PATH/log.conf.tmp" && \ +sed 's/spacetimedb=debug/spacetimedb=debug/g' "$STDB_PATH/log.conf" > "$STDB_PATH/log.conf.tmp" && \ mv "$STDB_PATH/log.conf.tmp" "$STDB_PATH/log.conf" export SPACETIMEDB_LOG_CONFIG="$STDB_PATH/log.conf" @@ -35,4 +35,4 @@ export SPACETIMEDB_TRACY=1 echo "DATABASE AT ${STDB_PATH}" echo "LOGS AT $STDB_PATH/logs" -cargo run -p spacetimedb-standalone -- start -l 127.0.0.1:3000 --enable-tracy +cargo run -p spacetimedb-standalone -- start -l 127.0.0.1:3000