Expand description
SQL-like relational engine with SIMD-accelerated filtering.
Provides table storage, indexing, and query execution on top of
tensor_store::RelationalSlab for columnar storage.
§Durability Model
When using durable storage (via RelationalEngine::open_durable or
RelationalEngine::recover), the following data is persisted:
Persisted and auto-recovered:
- Table schemas and metadata
- Row data (columnar storage)
- B-tree indexes (automatically rebuilt on recovery)
- Row counters (automatically rebuilt from scanning data)
NOT persisted (must recreate after recovery):
- Hash indexes: call
RelationalEngine::create_indexafter recovery - Transaction state: transactions are aborted on crash
§Recovery Example
ⓘ
// Open durable engine - B-tree indexes are automatically rebuilt
let engine = RelationalEngine::recover(
"data/wal",
&WalConfig::default(),
Some(Path::new("data/snapshot")),
)?;
// Only hash indexes need to be recreated after recovery
for table in engine.list_tables() {
engine.create_index(&table, "user_id")?;
// B-tree indexes are already restored!
}Re-exports§
pub use transaction::Transaction;pub use transaction::TransactionManager;pub use transaction::TxPhase;pub use cursor::CursorBuilder;pub use cursor::StreamingCursor;pub use observability::IndexMissReport;pub use observability::IndexTracker;pub use observability::QueryMetrics;
Modules§
- cursor
- Streaming cursor API for memory-efficient large result sets.
- observability
- Observability infrastructure for relational engine.
- transaction
- Transaction support for
RelationalEngine.
Structs§
- Column
- Column definition with name, type, and nullability.
- Column
Data - Column data with values and null tracking.
- Columnar
Scan Options - Options for columnar scan operations.
- Cursor
Options - Options for cursor-based iteration over query results.
- Foreign
KeyConstraint - Foreign key constraint definition.
- Grouped
Row - Result of a grouped aggregate query.
- Query
Options - Options for query execution.
- Relational
Config - Configuration for
RelationalEngineresource limits and timeouts. - Relational
Engine - SQL-like relational database engine.
- Row
- A row with ID and column values.
- RowCursor
- Iterator over query results.
- Schema
- Table schema defining column structure.
- WalConfig
- WAL configuration.
Enums§
- Aggregate
Expr - Aggregate expression for GROUP BY queries.
- Aggregate
Ref - Reference to an aggregate in HAVING clause.
- Aggregate
Value - Typed aggregate result value.
- Column
Type - Column data type.
- Condition
- Query filter condition.
- Constraint
- Table constraint definition.
- Having
Condition - HAVING condition for filtering groups after aggregation.
- Referential
Action - Referential action for foreign key constraints.
- Relational
Error - Errors from relational engine operations.
- Value
- Query value type.
Type Aliases§
- Result
- Result type alias for relational engine operations.