Skip to content

basalt / events-sqlite/src / openOutboxDatabase

Function: openOutboxDatabase() ​

> openOutboxDatabase(location?): DatabaseSync

Defined in: events-sqlite/src/index.ts:30

Durable, SQLite-backed implementation of the @basaltkit/events OutboxStore, on Node's built-in node:sqlite. Zero external dependencies. The single-node reference backend for the transactional outbox; the production (Postgres/MySQL) counterpart is @basaltkit/events-prisma.

The whole point of the outbox is to survive a crash between "committed" and "delivered" — so its store must be durable. MemoryOutboxStore (the default) loses every un-relayed event on restart; this one doesn't.

Requires Node 22.5+ (stable and flag-free on Node 24; --experimental-sqlite on 22.x).

Parameters ​

location? ​

string = ':memory:'

Returns ​

DatabaseSync

Released under the MIT License.