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

Function plan_cte_branch

nodedb-sql/src/planner/cte.rs:506–532  ·  view source on GitHub ↗
(
    expr: &SetExpr,
    catalog: &dyn SqlCatalog,
    functions: &FunctionRegistry,
    temporal: crate::TemporalScope,
)

Source from the content-addressed store, hash-verified

504}
505
506fn plan_cte_branch(
507 expr: &SetExpr,
508 catalog: &dyn SqlCatalog,
509 functions: &FunctionRegistry,
510 temporal: crate::TemporalScope,
511) -> Result<SqlPlan> {
512 match expr {
513 SetExpr::Select(select) => {
514 let query = Query {
515 with: None,
516 body: Box::new(SetExpr::Select(select.clone())),
517 order_by: None,
518 limit_clause: None,
519 fetch: None,
520 locks: Vec::new(),
521 for_clause: None,
522 settings: None,
523 format_clause: None,
524 pipe_operators: Vec::new(),
525 };
526 super::select::plan_query(&query, catalog, functions, temporal)
527 }
528 _ => Err(SqlError::Unsupported {
529 detail: "CTE branch must be SELECT".into(),
530 }),
531 }
532}
533
534fn extract_collection(plan: &SqlPlan) -> String {
535 match plan {

Callers 2

plan_recursive_cteFunction · 0.85

Calls 2

plan_queryFunction · 0.85
cloneMethod · 0.45

Tested by

no test coverage detected