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

Function is_column

nodedb-sql/src/planner/dml_helpers.rs:206–216  ·  view source on GitHub ↗
(expr: &ast::Expr, name: &str)

Source from the content-addressed store, hash-verified

204}
205
206fn is_column(expr: &ast::Expr, name: &str) -> bool {
207 match expr {
208 ast::Expr::Identifier(ident) => normalize_ident(ident) == name,
209 // Three or more parts: schema.table.col — never matches a plain pk name.
210 ast::Expr::CompoundIdentifier(parts) if parts.len() >= 3 => false,
211 ast::Expr::CompoundIdentifier(parts) if parts.len() == 2 => {
212 normalize_ident(&parts[1]) == name
213 }
214 _ => false,
215 }
216}
217
218/// Build a `SqlPlan::VectorPrimaryInsert` from parsed rows.
219///

Callers 1

collect_pk_equalitiesFunction · 0.85

Calls 2

normalize_identFunction · 0.85
lenMethod · 0.45

Tested by

no test coverage detected