pub struct RecursiveBody {
pub seeds: Vec<(CompoundOp, BoundSelect)>,
pub steps: Vec<(CompoundOp, BoundSelect)>,
pub order_by: Vec<BoundOrderTerm>,
pub limit: Option<BoundExpr>,
pub offset: Option<BoundExpr>,
}Expand description
A recursive CTE’s arms, split by whether they refer to the CTE.
SQLite’s rule is that the arms which do not reference the CTE are its seed and run once, and the arms which do are its step and run against each row the seed and earlier steps produced. Splitting them at bind time rather than at compile time is what lets the compiler emit one queue walk rather than re-deciding per arm what each one is.
Fields§
§seeds: Vec<(CompoundOp, BoundSelect)>The arms that do not reference the CTE, with the operator before each.
steps: Vec<(CompoundOp, BoundSelect)>The arms that do.
order_by: Vec<BoundOrderTerm>The ORDER BY of the whole recursive query, which orders its queue.
Empty means the queue is first in, first out. A term names a result column, as it does on any compound.
limit: Option<BoundExpr>The LIMIT of the whole recursive query, which stops the recursion.
offset: Option<BoundExpr>The OFFSET of the whole recursive query.