@boxxy/store-sqlite
v0.2.4
Published
boxxy's store on SQLite
Readme
boxxy's store on SQLite: the schema, the migrations and the transactions behind the ClaimStore
port.
createSQLiteClaimStore(path) opens one SQLite file, creates it when it's missing, runs the
migrations the file hasn't run, and returns the store with a close function.
Install
Install the package from npm with Bun:
bun add @boxxy/store-sqliteThe package runs on Bun 1.3 or newer.
Features
- Items, levers, attempts, leases, limit seats, notes, notices and the outbox in one file, with each change applied whole or not at all (one write path).
exclusivecalls that run one at a time in aBEGIN IMMEDIATEtransaction, andreadcalls that see the last commit (store rules).- Each item's position and state derived on each read, from the rows and the loaded rules (v1).
Documentation
The v1 tables migration creates each table, and the store
section of 02-types.ts gives the port, the
seat take and the seat sync.
