8db5cfe7e1
CI / test (push) Has been cancelled
CI / verify (push) Has been cancelled
Clients CI / build-server (push) Has been cancelled
Clients CI / test-python (push) Has been cancelled
Clients CI / test-javascript (push) Has been cancelled
Clients CI / test-nim (push) Has been cancelled
Clients CI / test-rust (push) Has been cancelled
Core storage: hash MemTable, WAL group commit, L0 compaction rebuild, reader-writer lock, and a global StorageGate so HTTP workers and TCP share the LSM safely under multi-thread access. Schema: durable CREATE/ALTER/DROP under _schema:tables:* with full LSM restore on open. Executor types/values/schema split into query/exec/. Wire protocol: switch default MM to ARC — ORC cycle collector segfaulted after ~20 async INSERTs. Fair multi-tier benchmarks (SQLite/HTTP/wire/PG) and honesty docs for mixed-tier comparisons.
Executor package (query/exec/)
The original executor.nim was a ~5.8k-line god object. Shared pieces live here;
../executor.nim remains the main execution engine and re-exports this package
so existing import barabadb/query/executor keeps working.
Modules
| Module | Responsibility |
|---|---|
types.nim |
ExecutionContext, TableDef, Row, ExecResult, … |
values.nim |
Null/string conversion, row payload parse/escape, SQL escapes |
schema.nim |
Durable catalog (_schema:tables:*), restore, index rebuild |
Import rules
- No cycles:
types→ nothing inexec/;values→types;schema→types+values. executor.nimimports all three andexports them.- Prefer adding new shared helpers under
exec/instead of growingexecutor.nim.
Sensible next extractions (not done yet)
dml.nim—execScan/execInsert/execUpdate/execDelete(needs eval/triggers hooks)rls.nim— row-level security + privilegeslower.nim— AST → IR (lowerExpr/lowerSelect)plan_exec.nim— IR plan walker / window functionshybrid.nim— hybrid vector+FTS search helpers
Keep statement dispatch (executeQueryImpl) in executor.nim until those land.