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

Function count_select_cols

nodedb-sql/src/planner/cte.rs:249–254  ·  view source on GitHub ↗

Count SELECT projection columns; returns 0 if the expression is not a SELECT.

(expr: &SetExpr)

Source from the content-addressed store, hash-verified

247
248/// Count SELECT projection columns; returns 0 if the expression is not a SELECT.
249fn count_select_cols(expr: &SetExpr) -> usize {
250 match expr {
251 SetExpr::Select(s) => s.projection.len(),
252 _ => 0,
253 }
254}
255
256/// Validate that the CTE name appears exactly once in the recursive arm and
257/// not inside a subquery, aggregate function, or the nullable side of an outer join.

Callers 1

Calls 1

lenMethod · 0.45

Tested by

no test coverage detected