Expand description
Query execution: the Connection API and the read-query executor.
This layer ties the pieces together: parse SQL (crate::sql), resolve
names against the schema catalog (crate::schema), scan b-trees
(crate::btree), decode records (crate::format::record), and evaluate
expressions (eval) to produce result rows.
It implements an operational, iterator-style executor rather than emitting
VDBE bytecode. The observable semantics (row order, type coercion, NULL
handling) follow SQLite; the bytecode representation the roadmap describes is
an internal-representation refactor we can layer in later without changing
results. The Connection reads (query) and writes (execute) over a
writable pager, an in-memory database, or — read-only — a WAL-mode database
(the -wal overlay is detected automatically).
Modules§
- datetime
- Date/time functions and
printf/format. - eval
- Expression evaluation with SQLite value semantics.
- func
- Built-in scalar functions.
- json
- A minimal JSON value model with the parser, serializer, and path navigation
behind SQLite’s core JSON functions (
json,json_extract,json_type, …). - vdbe
- A minimal register-machine (VDBE) IR and interpreter.
Structs§
- Connection
- A database connection. Supports reading (
query) and writing (execute), over a file or in memory. - Query
Result - The result of a query: column labels and the materialized rows.
Traits§
- Aggregate
Function - A user-defined aggregate’s accumulator:
stepis called once per group row with the evaluated argument values, thenfinalizeproduces the result. A fresh accumulator is created (by the registered factory) for each group.
Type Aliases§
- Aggregate
Factory - Builds a fresh
AggregateFunctionaccumulator per group. Registered withConnection::register_aggregate_function. - Scalar
Function - A user-defined scalar function: it receives its evaluated argument values and
returns a result
Value(or an error). Registered withConnection::register_function.