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

Method count_table

crates/bench/src/sqlite.rs:100–105  ·  view source on GitHub ↗
(&mut self, table_id: &Self::TableId)

Source from the content-addressed store, hash-verified

98 }
99
100 fn count_table(&mut self, table_id: &Self::TableId) -> ResultBench<u32> {
101 let rows = self
102 .db
103 .query_row(&format!("SELECT COUNT(*) FROM {table_id}"), (), |row| row.get(0))?;
104 Ok(rows)
105 }
106
107 fn empty_transaction(&mut self) -> ResultBench<()> {
108 let mut begin = self.db.prepare_cached(BEGIN_TRANSACTION)?;

Callers

nothing calls this directly

Calls 2

OkFunction · 0.50
getMethod · 0.45

Tested by

no test coverage detected