12 releases (5 breaking)

Uses new Rust 2024

new 0.8.5-alpha Dec 3, 2025
0.8.3-alpha Nov 27, 2025
0.7.0-alpha Nov 5, 2025
0.6.0-alpha Oct 31, 2025
0.3.5-alpha Oct 20, 2025

#494 in Database implementations

24 downloads per month
Used in 4 crates

Apache-2.0

3MB
69K SLoC

SQL interface for LLKV.

This crate provides the SqlEngine, which parses SQL statements and executes them using the LLKV runtime. It serves as the primary user-facing interface for interacting with LLKV databases.

SQL String → sqlparser → AST → Plan → Runtime → Storage

The SQL engine:

  1. Parses SQL using sqlparser
  2. Converts AST to execution plans
  3. Delegates to llkv-runtime for execution
  4. Returns results as Arrow RecordBatch instances or row counts

Transactions

By default, each statement executes in its own auto-commit transaction. Use explicit transaction control for multi-statement transactions:

Type System

SQL types are mapped to Arrow data types (the following is a non-exhaustive list):

  • INT, INTEGER, BIGINTInt64
  • FLOAT, DOUBLE, REALFloat64
  • TEXT, VARCHARUtf8
  • DATEDate32

LLKV SQL

llkv-sql exposes SqlEngine, the primary entry point for executing SQL against the LLKV database toolkit. It converts SQL text into typed plans, handles dialect quirks, batches insert workloads, and delegates execution to the runtime layer.

This crate is not intended for direct standalone use.

License

Licensed under the Apache-2.0 License.

Dependencies

~29MB
~514K SLoC