laminar-db
Unified database facade for LaminarDB.
Overview
This crate provides LaminarDB, the primary user-facing type that ties together the SQL parser, query planner, DataFusion context, streaming infrastructure, and connector registry into a single interface.
Key Types
LaminarDB-- Main database handle. Manages sources, streams, sinks, and the streaming pipeline lifecycle.LaminarDbBuilder-- Fluent builder for constructingLaminarDBwith custom configuration.ExecuteResult-- Result of executing a SQL statement (DDL, query, rows affected, metadata).QueryHandle-- Handle to a running streaming query with schema and subscription access.SourceHandle<T>/UntypedSourceHandle-- Typed and untyped handles for pushing data into sources.TypedSubscription<T>-- Subscription to a named stream with automatic RecordBatch-to-struct conversion.
Usage
use LaminarDB;
let db = open?;
// Create a source
db.execute.await?;
// Create a continuous query
db.execute.await?;
// Push data
let source = db.source_untyped?;
// Start the pipeline
db.start.await?;
// Shutdown
db.shutdown.await?;
Feature Flags
| Flag | Purpose |
|---|---|
api |
FFI-friendly API module with Connection, Writer, QueryStream |
ffi |
C FFI layer with extern "C" functions and Arrow C Data Interface |
jit |
Cranelift JIT compilation (forwards to laminar-core) |
kafka |
Kafka source/sink connector |
postgres-cdc |
PostgreSQL CDC source |
postgres-sink |
PostgreSQL sink |
rocksdb |
RocksDB-backed persistent state |
Related Crates
laminar-core-- Ring 0 engine (operators, state, streaming)laminar-sql-- SQL parser and DataFusion integrationlaminar-storage-- WAL and checkpointinglaminar-connectors-- External system connectors