MCPcopy Create free account
hub / github.com/clockworklabs/SpacetimeDB / add_row

Method add_row

sdks/rust/src/client_cache.rs:614–623  ·  view source on GitHub ↗
(&mut self, row: Self::Row)

Source from the content-addressed store, hash-verified

612{
613 type Row = Row;
614 fn add_row(&mut self, row: Self::Row) {
615 let col = (self.get_unique_col)(&row).clone();
616 if let Some(prev_row) = self.rows.insert(col, row) {
617 panic!(
618 "Duplicated entry in unique index at key {:?}, for type {}",
619 (self.get_unique_col)(&prev_row),
620 type_name::<Row>()
621 );
622 }
623 }
624 fn remove_row(&mut self, row: &Self::Row) {
625 let col = (self.get_unique_col)(row);
626 self.rows

Callers 1

apply_diffMethod · 0.80

Calls 2

insertMethod · 0.65
cloneMethod · 0.45

Tested by

no test coverage detected