pub fn codegen_select(
b: &mut ProgramBuilder,
stmt: &SelectStatement,
schema: &[TableSchema],
_ctx: &CodegenContext,
) -> Result<(), CodegenError>Expand description
Generate VDBE bytecode for a SELECT statement.
Handles three patterns:
- Expression-only:
SELECT 1+1,SELECT abs(-5)(no FROM) - Rowid lookup:
SELECT cols FROM t WHERE rowid = ? - Full table scan:
SELECT cols FROM t
Returns the cursor number used (for composability).