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.
Re-exports§
pub use runtime_storage_namespace::PERSISTENT_NAMESPACE_ID;pub use runtime_storage_namespace::PersistentRuntimeNamespace;pub use runtime_storage_namespace::RuntimeNamespaceId;pub use runtime_storage_namespace::RuntimeStorageNamespace;pub use runtime_storage_namespace::RuntimeStorageNamespaceOps;pub use runtime_storage_namespace::RuntimeStorageNamespaceRegistry;pub use runtime_storage_namespace::TEMPORARY_NAMESPACE_ID;pub use runtime_storage_namespace::TemporaryRuntimeNamespace;
Modules§
- runtime_
storage_ namespace - Runtime storage namespace abstractions and registries.
Structs§
- Alter
Table Plan - Plan for ALTER TABLE operations.
- Column
Assignment - Column assignment for UPDATE.
- Create
Index Plan - Plan for creating an index on a table.
- Create
Table Plan - Plan for creating a table.
- Create
View Plan - Plan for creating a view.
- Delete
Plan - Plan for deleting rows from a table.
- Drop
Index Plan - Plan for dropping an index.
- Drop
Table Plan - Plan for dropping a table.
- Drop
View Plan - Plan for dropping a view.
- Foreign
KeySpec - Index
Column Plan - Column specification for CREATE INDEX statements.
- Insert
Plan - Plan for inserting data into a table.
- Multi
Column Unique Spec - Multi-column unique constraint specification.
- Order
ByPlan - ORDER BY specification.
- Plan
Column Spec - Column specification produced by the logical planner.
- Reindex
Plan - Plan for rebuilding an index.
- Rename
Table Plan - Plan for renaming a table.
- Runtime
Context - In-memory execution context shared by plan-based queries.
- Runtime
Create Table Builder - Runtime
Engine - Runtime
Lazy Frame - Lazily built logical plan (thin wrapper over SelectPlan).
- Runtime
Range Select Rows - Result of parsing a range() SELECT statement.
- Runtime
Row - Runtime
Session - A session for executing operations with optional transaction support.
- Runtime
Table Handle - Runtime
Transaction Context - Transaction-scoped façade over
RuntimeContext. - Select
Execution - Streaming execution handle for SELECT queries.
- Select
Plan - Logical query plan for SELECT operations.
- Transaction
Manager - Transaction manager for coordinating sessions.
- Transaction
Session - A session handle for transaction management.
- Transaction
Snapshot - Transaction metadata captured when a transaction begins.
- Truncate
Plan - Plan for TRUNCATE TABLE operation (removes all rows).
- TxnId
Manager - Transaction ID manager that hands out IDs and tracks commit status.
- Update
Plan - Plan for updating rows in a table.
Enums§
- Aggregate
Expr - Aggregate expression in SELECT.
- Assignment
Value - Value to assign in an UPDATE.
- Create
Table Source - Source data for CREATE TABLE AS SELECT.
- Foreign
KeyAction - Insert
Conflict Action - SQLite conflict resolution action for INSERT statements.
- 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 - Select
Projection - Projection specification for SELECT.
- Transaction
Kind - Transaction kind enum representing transaction control operations.
- Transaction
Result - Transaction result enum representing the outcome of a transaction operation.
Constants§
- TXN_
ID_ AUTO_ COMMIT - Transaction ID for auto-commit (single-statement) transactions.
- TXN_
ID_ NONE - Transaction ID representing “no transaction” or “not deleted”.
Traits§
- Into
Insert Row - Into
Plan Column Spec - Trait for types that can be converted into a
PlanColumnSpec. - Transaction
Context - A trait for transaction context operations.
Functions§
- extract_
rows_ from_ range - Extract rows from a range() SELECT statement.
- row
- statement_
table_ name
Type Aliases§
- TxnId
- Transaction ID type.