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

Method table_id

crates/engine/src/sql/ast.rs:26–34  ·  view source on GitHub ↗
(&self, name: &str)

Source from the content-addressed store, hash-verified

24
25impl<T: StateView> SchemaView for SchemaViewer<'_, T> {
26 fn table_id(&self, name: &str) -> Option<TableId> {
27 self.tx
28 .table_id_from_name_or_alias(name)
29 .ok()
30 .flatten()
31 .and_then(|table_id| self.schema_for_table(table_id))
32 .filter(|schema| self.auth.has_read_access(schema.table_access))
33 .map(|schema| schema.table_id)
34 }
35
36 fn schema_for_table(&self, table_id: TableId) -> Option<Arc<TableOrViewSchema>> {
37 self.tx

Callers

nothing calls this directly

Calls 7

flattenMethod · 0.80
has_read_accessMethod · 0.80
filterMethod · 0.65
mapMethod · 0.45
okMethod · 0.45
schema_for_tableMethod · 0.45

Tested by

no test coverage detected