A storage adapter for RxDB that uses Bun's native bun:sqlite for high-performance reactive database storage. Current stable version is 1.8.3-beta. It is updated sporadically, with new releases tied to RxDB major version bumps (supports RxDB ^16.0.0 and ^17.0.0-beta). Differentiates from other RxDB SQLite adapters by leveraging Bun's native SQLite bindings (bun:sqlite), offering significantly faster performance than Node.js-based SQLite adapters. Requires Bun runtime (>=1.0.0) and RxDB. Ships TypeScript declarations.
npm install bun-sqlite-for-rxdbNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates an RxDB database using Bun's native SQLite storage adapter, adds a collection, and inserts a document.
Upgrade RxDB to ^16.0.0 or ^17.0.0-beta. If stuck on RxDB v15, use bun-sqlite-for-rxdb@1.7.x.
Replace 'createBunSQLiteStorage' with 'getRxDatabaseBunSQLite' in your code.
Use absolute paths (e.g., path.join(__dirname, './mydb.sqlite')) or process.cwd() to ensure correct location.
Provide a valid file path. For testing, use a temporary file (e.g., ':memory:' is not supported).
For multi-process scenarios, consider using RxDB's replication or a server-side database.
Run 'bun install' to ensure all dependencies including 'rxdb' and 'bun-sqlite-for-rxdb' are present.
Use named import: import { getRxDatabaseBunSQLite } from 'bun-sqlite-for-rxdb'.Ensure the database file path is empty or delete the file and let RxDB recreate it.
Set "type": "module" in your package.json or rename file to .mjs.