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

Method schema_for_table

crates/expr/src/check.rs:208–221  ·  view source on GitHub ↗
(&self, table_id: TableId)

Source from the content-addressed store, hash-verified

206 }
207
208 fn schema_for_table(&self, table_id: TableId) -> Option<Arc<TableOrViewSchema>> {
209 match table_id.idx() {
210 0 => Some((TableId(0), "t")),
211 1 => Some((TableId(1), "s")),
212 _ => None,
213 }
214 .and_then(|(table_id, name)| {
215 self.0
216 .table(name)
217 .map(|def| Arc::new(TableSchema::from_module_def(&self.0, def, (), table_id)))
218 .map(TableOrViewSchema::from)
219 .map(Arc::new)
220 })
221 }
222
223 fn rls_rules_for_table(&self, _: TableId) -> anyhow::Result<Vec<Box<str>>> {
224 Ok(vec![])

Callers 1

schemaMethod · 0.45

Calls 5

TableIdClass · 0.50
newFunction · 0.50
idxMethod · 0.45
mapMethod · 0.45
tableMethod · 0.45

Tested by

no test coverage detected