Skip to main content

Module executor

Module executor 

Source
Expand description

Query executors — evaluate parsed SQL statements against the in-memory storage and produce formatted output.

Structs§

SelectResult
Executes a parsed SelectQuery against the database and returns a human-readable rendering of the result set (prettytable). Also returns the number of rows produced, for the top-level status message. Structured result of a SELECT: column names in projection order, and each matching row as a Vec<Value> aligned with the columns. Phase 5a introduced this so the public Connection / Statement API has typed rows to yield; the existing execute_select that returns pre-rendered text is now a thin wrapper on top.

Functions§

eval_predicate
Returns true if the row at rowid matches the predicate expression.
execute_create_index
Handles CREATE INDEX [UNIQUE] <name> ON <table> (<column>). Single- column indexes only; multi-column / composite indexes are future work. Returns the (possibly synthesized) index name for the status message.
execute_delete
Executes a DELETE statement. Returns the number of rows removed.
execute_select
Executes a SELECT and returns (rendered_table, row_count). The REPL and Tauri app use this to keep the table-printing behaviour the engine has always shipped. Structured callers use execute_select_rows instead.
execute_select_rows
Executes a SELECT and returns structured rows. The typed rows are what the new public API streams to callers; the REPL / Tauri app pre-render into a prettytable via execute_select.
execute_update
Executes an UPDATE statement. Returns the number of rows updated.