Expand description
Unified database facade for LaminarDB.
Provides a single entry point (LaminarDB) that ties together
the SQL parser, query planner, DataFusion context, and streaming API.
§Example
ⓘ
use laminar_db::LaminarDB;
let db = LaminarDB::open()?;
db.execute("CREATE SOURCE trades (
symbol VARCHAR, price DOUBLE, ts TIMESTAMP,
WATERMARK FOR ts AS ts - INTERVAL '1' SECOND
)").await?;
let query = db.execute("SELECT symbol, AVG(price)
FROM trades GROUP BY symbol, TUMBLE(ts, INTERVAL '1' MINUTE)
").await?;Re-exports§
pub use engine_metrics::EngineMetrics;pub use profile::Profile;pub use profile::ProfileError;pub use recovery_manager::RecoveredState;pub use recovery_manager::RecoveryManager;pub use recovery_manager::VnodeRehydration;pub use recovery_manager::VnodeRehydrator;
Modules§
- ai
- AI inference module, containing model registry, provider trait, and backends. Backend-agnostic AI inference types: registry, provider trait, cache, call log, adapters, and backends. Inference runs on a Ring 1 worker, never Ring 0.
- api
- FFI-friendly API for language bindings.
- engine_
metrics - Prometheus metrics for the streaming engine. Prometheus metrics for the streaming engine.
- ffi
- C FFI layer for LaminarDB.
- pipeline
- Thread-per-core connector pipeline.
Streaming connector pipeline. Each source connector runs as a tokio task
pushing batches via crossfire mpsc to the
StreamingCoordinator, which drives SQL execution cycles, routes results to sinks, and manages checkpoint barriers. See thestreaming_coordinatorsubmodule for the runtime topology. - profile
- Deployment profiles.
Deployment profiles for
LaminarDB. - rebalance
- Dynamic vnode rebalance control plane. Dynamic vnode rebalance control plane.
- recovery_
manager - Unified recovery manager. Checkpoint recovery: selects a committed manifest and resolves its operator-state sidecar. Runtime owners restore sources, sinks, tables, and operators from that single recovered cut.
- subscription
- External named-subscription substrate: byte-bounded shared logs and cursor portals.
SUBSCRIBEsubstrate: one shared byte-bounded log per object and cursor portals.
Structs§
- Arrow
Record - Record type for Arrow-based streaming subscriptions.
- Checkpoint
Result - Result of a checkpoint attempt.
- Checkpoint
Stats - Checkpoint performance statistics.
- Config
KeySpec - Re-export connector metadata types for the control-plane HTTP API (connector catalog / source-creation wizard). Specification for a configuration key.
- Connector
Info - Re-export connector metadata types for the control-plane HTTP API (connector catalog / source-creation wizard). Metadata about a connector implementation.
- Connector
Registry - Re-export the connector registry for custom connector registration.
Registry of available connector implementations. Connectors register
a factory per type string; the runtime looks up by the
connectorproperty inCREATE SOURCE/SINKDDL. - DdlInfo
- Information about a completed DDL statement.
- Laminar
Config - Configuration for a
LaminarDBinstance. - LaminarDB
- The main
LaminarDBdatabase handle. - Laminar
DbBuilder - Fluent builder for constructing a
LaminarDBinstance. - Materialized
View Info - JSON-serializable projection of a
MaterializedViewfor the control-plane HTTP API. - Pipeline
Edge - A directed edge in the pipeline topology graph.
- Pipeline
Metrics - Pipeline-wide metrics snapshot.
- Pipeline
Node - A node in the pipeline topology graph.
- Pipeline
Topology - The complete pipeline topology: nodes and edges.
- Query
Handle - Handle to a running streaming query.
- Query
Info - Information about a running query.
- Rehydrated
Vnode - Rebalance-driven state-rehydration types (cluster mode). Committed vnode state staged during rebalance adoption for deferred apply.
- Restart
Policy - Auto-restart policy for the fault supervisor (see
LaminarDB::enable_supervision). - Sink
Info - Information about a registered sink.
- Snapshot
Adoption - Rebalance-driven state-rehydration types (cluster mode).
Summary of a single
LaminarDB::adopt_assignment_snapshotcall. - Source
Catalog - Central registry of sources, sinks, streams, and queries.
- Source
Entry - A registered source in the catalog.
- Source
Handle - Typed handle for pushing data into a registered source.
- Source
Info - Information about a registered source.
- Source
Metrics - Metrics for a single registered source.
- Stream
Info - Metadata about a registered stream.
- Stream
Metrics - Metrics for a single registered stream.
- Typed
Subscription - Typed subscription that deserializes named-stream
RecordBatchrows. - Untyped
Source Handle - Untyped handle for pushing raw
RecordBatchdata.
Enums§
- Backpressure
Policy - What to do when an operator’s input buffer exceeds its cap.
- Checkpoint
Failure Disposition - Required runtime response when a checkpoint attempt fails.
- Checkpoint
Phase - Phase of the checkpoint lifecycle.
- Cluster
Startup Disposition - Rebalance-driven state-rehydration types (cluster mode). Result of certifying a clustered process at startup.
- DbError
- Errors from database operations.
- Delivery
Guarantee - Delivery guarantee level for the pipeline.
- Execute
Result - Result of executing a SQL statement.
- Pipeline
Node Type - Type of a node in the pipeline topology.
- Pipeline
State - The state of a streaming pipeline.
- Subscription
Error - Terminal failure from a named subscription.
- Typed
Subscription Frame - A typed frame from a named subscription.
Traits§
- From
Batch - Deserialize rows from a
RecordBatch. Auto-generated by#[derive(FromRecordBatch)].