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

Function qualified_ident_pair

nodedb-sql/src/planner/ast_helpers.rs:13–20  ·  view source on GitHub ↗

Return `(table, column)` for a `table.col` compound identifier, or `None`.

(expr: &ast::Expr)

Source from the content-addressed store, hash-verified

11
12/// Return `(table, column)` for a `table.col` compound identifier, or `None`.
13pub fn qualified_ident_pair(expr: &ast::Expr) -> Option<(String, String)> {
14 match expr {
15 ast::Expr::CompoundIdentifier(parts) if parts.len() == 2 => {
16 Some((normalize_ident(&parts[0]), normalize_ident(&parts[1])))
17 }
18 _ => None,
19 }
20}
21
22/// Flatten a right-leaning AND expression tree into a list of conjuncts.
23pub fn flatten_and_expr(expr: &ast::Expr, out: &mut Vec<ast::Expr>) {

Callers 2

extract_merge_equijoinFunction · 0.85
try_equijoin_pairFunction · 0.85

Calls 2

normalize_identFunction · 0.85
lenMethod · 0.45

Tested by

no test coverage detected