MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / add

Method add

nodedb-sql/src/resolver/columns.rs:48–58  ·  view source on GitHub ↗

Add a resolved table. Returns error if name conflicts.

(&mut self, table: ResolvedTable)

Source from the content-addressed store, hash-verified

46
47 /// Add a resolved table. Returns error if name conflicts.
48 pub fn add(&mut self, table: ResolvedTable) -> Result<()> {
49 let key = table.ref_name().to_string();
50 if self.tables.contains_key(&key) {
51 return Err(SqlError::Parse {
52 detail: format!("duplicate table reference: {key}"),
53 });
54 }
55 self.order.push(key.clone());
56 self.tables.insert(key, table);
57 Ok(())
58 }
59
60 /// Resolve a column name, optionally qualified with a table reference.
61 ///

Callers 2

resolve_table_factorMethod · 0.45
scope_withFunction · 0.45

Calls 5

to_stringMethod · 0.80
ref_nameMethod · 0.80
pushMethod · 0.45
cloneMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected