import type { Expr, PipeStage, QueryExpr, SelectExpr } from "./ir.js"; /** Every QueryExpr reachable in the IR (the AST, its nested query blocks, and, for a routine/ * compound container, each inner statement of `statements`, recursively). */ export declare function allQueryExprs(root: QueryExpr): QueryExpr[]; /** A QueryExpr's own DECLARE initializer expressions (T-SQL `DECLARE @x int = 1, @y int = @x + 1`). * `declarations` lives on QueryExpr itself, not on any QueryBody/Scope.body — the same "not reachable * from the body walk" shape as `orderBy`/`limit`, so callers attribute these to the owning scope the * same way (see node-at.ts / scope/walk.ts). Populated only on the top-level statement's QueryExpr; * absent everywhere else. NOT part of childExprs — these are not sub-expressions of any Expr. */ export declare function declarationExprs(query: QueryExpr): Expr[]; /** Sub-expressions reachable WITHOUT crossing a scope boundary (no subquery/exists descent). */ export declare function childExprs(expr: Expr): Expr[]; export declare function selectExprs(body: SelectExpr): Expr[]; export declare function stageExprs(stage: PipeStage): Expr[]; /** Depth-first walk over an Expr and every sub-expression reachable via childExprs, root first. */ export declare function walkExprs(root: Expr): Generator;