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

Method parse_initial_rows

templates/basic-rs/src/module_bindings/mod.rs:89–102  ·  view source on GitHub ↗
(raw: __ws::v2::QueryRows)

Source from the content-addressed store, hash-verified

87 diff
88 }
89 fn parse_initial_rows(raw: __ws::v2::QueryRows) -> __sdk::Result<Self> {
90 let mut db_update = DbUpdate::default();
91 for table_rows in raw.tables {
92 match &table_rows.table[..] {
93 "person" => db_update
94 .person
95 .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?),
96 unknown => {
97 return Err(__sdk::InternalError::unknown_name("table", unknown, "QueryRows").into());
98 }
99 }
100 }
101 Ok(db_update)
102 }
103 fn parse_unsubscribe_rows(raw: __ws::v2::QueryRows) -> __sdk::Result<Self> {
104 let mut db_update = DbUpdate::default();
105 for table_rows in raw.tables {

Callers

nothing calls this directly

Calls 4

ErrFunction · 0.50
OkFunction · 0.50
appendMethod · 0.45

Tested by

no test coverage detected