Crate llkv_sql

Crate llkv_sql 

Source
Expand description

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

Structs§

SelectExecution
Streaming execution handle for SELECT queries.
SqlEngine
SQL execution engine built on top of the LLKV runtime.

Enums§

RuntimeStatementResult
TransactionKind
Transaction kind enum representing transaction control operations.

Type Aliases§

SqlResult