Repository navigation
LeanDB 0.4.0
LeanDB 0.4.0 lands the LeanGD engine surface (LDB-01 … LDB-11). Defaults stay byte-identical to 0.3.x (synchronous=FULL, 5s busy timeout, audit log .all).
- LDB-01.
transaction/withTransaction/untrackedSqliteandLeanDb.Runtime.Service:BEGIN IMMEDIATEat depth 0, savepoints when nested, typed.abort, poisoned connections after a failedROLLBACK, serializedwithConnection,drain/resume/snapshot/restore/close. - LDB-02.
OpenConfig(synchronous,cache_size,mmap_size,wal_autocheckpoint, allowlistedextraPragmas) plusLEANDB_*environment overrides. - LDB-03.
Indexes αdeclares indexes and composite UNIQUE constraints; they appear in DDL,schemaJSON, the fingerprint, andmigrateadd/drop plans. Child tables get(parent, position) UNIQUE. - LDB-04.
selectPtakes a pushedOrderandWindow(LIMIT/OFFSET); a Lean-side sort plus a limit is refused. Tie-break is, id ASC. - LDB-05.
LogConfig.verbs(all/failuresAndPlans/failuresOnly/none) andsampleEvery; CLI default remains.all. - LDB-06.
count/countP/exists?/existsPpushCOUNT(*)/EXISTSwhen the predicate has no residual. - LDB-07. Typed
patchwith aPredguard;PatchResultis.updated/.notFound/.guardFailed. - LDB-08.
insertManyand keysetscan. - LDB-09.
Runtime.Config.readersandService.withReader; write verbs on a read-only connection returnDbError.readOnly. - LDB-10.
deriving instance LeanDb.ClosedEnum/DbJson/Inlineworks post-hoc on LeanDB-free domain types. - LDB-11. Extra tables in a fingerprinted instance are tolerated;
Base.auxiliarydeclares FTS5 objects;searchPbindsMATCH.
Also in this release: JSON true/false only on Bool columns; colliding table names are refused; --db is taken only before the verb; WAL + deferred snapshots; HTTP Host/Origin pin and JSON Content-Type requirement; restore-safety path shared with the runtime.
Lean 4.33.0 and the pinned SQLite dependency are unchanged.
Validation: lake build LeanDb, lake build leandb, and .lake/build/bin/leandb_tests (all engine tests passed).