Expand description
SQL interface for LLKV.
This crate provides the SqlEngine, which parses SQL statements and executes
them using the LLKV runtime. It serves as the primary user-facing interface for
interacting with LLKV databases.
SQL String → sqlparser → AST → Plan → Runtime → StorageThe SQL engine:
- Parses SQL using
sqlparser - Converts AST to execution plans
- Delegates to
llkv-runtimefor execution - Returns results as Arrow
RecordBatchinstances or row counts
§Transactions
By default, each statement executes in its own auto-commit transaction. Use explicit transaction control for multi-statement transactions:
§Type System
SQL types are mapped to Arrow data types (the following is a non-exhaustive list):
INT,INTEGER,BIGINT→Int64FLOAT,DOUBLE,REAL→Float64TEXT,VARCHAR→Utf8DATE→Date32
Structs§
- Prepared
Statement - Select
Execution - Streaming execution handle for SELECT queries.
- SqlEngine
Enums§
- Runtime
Statement Result - SqlParam
Value - Statement
Expectation - Transaction
Kind - Transaction kind enum representing transaction control operations.