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

Function query_references_cte

nodedb-sql/src/planner/cte.rs:345–355  ·  view source on GitHub ↗
(query: &Query, cte_name: &str)

Source from the content-addressed store, hash-verified

343}
344
345fn query_references_cte(query: &Query, cte_name: &str) -> bool {
346 match &*query.body {
347 SetExpr::Select(s) => s.from.iter().any(|f| {
348 table_ref_matches(&f.relation, cte_name)
349 || f.joins
350 .iter()
351 .any(|j| table_ref_matches(&j.relation, cte_name))
352 }),
353 _ => false,
354 }
355}
356
357// ── Helpers shared with collection-backed path ────────────────────────────────
358

Callers 1

Calls 2

table_ref_matchesFunction · 0.85
iterMethod · 0.45

Tested by

no test coverage detected