Expand description
Query execution runtime for LLKV.
This crate provides the runtime API (see RuntimeEngine) for executing SQL plans with full
transaction support. It coordinates between the transaction layer, storage layer,
and query executor to provide a complete database runtime.
§Key Components
RuntimeEngine: Main execution engine for SQL operationsRuntimeSession: Session-level interface with transaction managementTransactionContext: Single-transaction execution context- Table Provider: Integration with the query executor for table access
§Transaction Support
The runtime supports both:
- Auto-commit: Single-statement transactions (uses
TXN_ID_AUTO_COMMIT) - Multi-statement: Explicit BEGIN/COMMIT/ROLLBACK transactions
§MVCC Integration
All data modifications automatically include MVCC metadata:
row_id: Unique row identifiercreated_by: Transaction ID that created the rowdeleted_by: Transaction ID that deleted the row (orTXN_ID_NONE)
The runtime ensures these columns are injected and managed consistently.
Modules§
Structs§
- Column
Assignment - Column assignment for UPDATE.
- Column
Spec - Column specification for CREATE TABLE.
- Create
Index Plan - Plan for creating an index on a table.
- Create
Table Plan - Plan for creating a table.
- Delete
Plan - Plan for deleting rows from a table.
- Foreign
KeySpec - Index
Column Plan - Column specification for CREATE INDEX statements.
- Insert
Plan - Plan for inserting data into a table.
- Order
ByPlan - ORDER BY specification.
- Query
Executor - Query executor that executes SELECT plans.
- RowBatch
- Runtime
Context - In-memory execution context shared by plan-based queries.
- Runtime
Context Wrapper - Wrapper for Context that implements TransactionContext
- Runtime
Create Table Builder - Runtime
Engine - Runtime
Lazy Frame - Lazily built logical plan (thin wrapper over SelectPlan).
- Runtime
Range Select Rows - Runtime
Range Spec - Runtime
Row - Runtime
Session - A session for executing operations with optional transaction support.
- Runtime
Table Handle - Select
Execution - Streaming execution handle for SELECT queries.
- Select
Plan - Logical query plan for SELECT operations.
- Update
Plan - Plan for updating rows in a table.
Enums§
- Aggregate
Expr - Aggregate expression in SELECT.
- Aggregate
Function - Supported aggregate functions.
- Assignment
Value - Value to assign in an UPDATE.
- Column
Nullability - Column nullability specification.
- Create
Table Source - Source data for CREATE TABLE AS SELECT.
- Foreign
KeyAction - Insert
Source - Source data for INSERT operations.
- Order
Sort Type - Sort type for ORDER BY.
- Order
Target - Target column/expression for ORDER BY.
- Plan
Operation - Recordable plan operation for transaction replay.
- Plan
Statement - Top-level plan statements that can be executed against a
Session. - Plan
Value - Runtime
Statement Result - Result of running a plan statement.
- Select
Projection - Projection specification for SELECT.
- Transaction
Kind - Transaction kind enum
Constants§
Traits§
- Into
Column Spec - Trait for types that can be converted into a ColumnSpec.
- Into
Insert Row - Table
Provider - Trait for providing table access to the executor.
Functions§
- build_
array_ for_ column - extract_
rows_ from_ range - resolve_
insert_ columns - row
- statement_
table_ name - Return the table name referenced by a plan statement, if any.