@ayepi/sqlite
v0.6.1
Published
SQLite backends for ayepi (better-sqlite3) — the @ayepi/work Queue, Store and PubSub, and an @ayepi/rate store, in one database file
Maintainers
Readme
@ayepi/sqlite
SQLite backends for ayepi on one database file, through a better-sqlite3 connection you open:
sqliteQueue,sqliteStore,sqlitePubSub(or all three assqliteBackend) — the@ayepi/workports: a leased, at-least-once queue with dead letters, a key/value store with an atomic claim and counter, and pub/sub across processes.sqliteRateStore— an@ayepi/ratestore running rate's own algorithms (weighted costs included) on rows, shared by every process using the file.
pnpm add @ayepi/sqlite better-sqlite3 zodimport Database from 'better-sqlite3'
import { createWork } from '@ayepi/work'
import { sqliteBackend } from '@ayepi/sqlite'
const db = new Database('app.db')
db.pragma('journal_mode = WAL')
const work = createWork({ work: [send] as const, ...sqliteBackend(db) })For AI coding agents
This package ships a dense, machine-oriented reference written for AI coding agents:
License
MIT
