sqlite-idb (v0.0.16) is a lightweight library that runs SQLite in the browser using WebAssembly and stores the database in IndexedDB for persistence. It provides a tagged template literal API for SQL queries (sql.rows, sql.first, sql.multiple) and supports custom SQL functions via createFunction. Ships TypeScript types and aims for a minimal footprint. Release cadence is irregular. Differentiator: combines SQLite's full SQL engine with IndexedDB's persistent storage without needing a server.
npm install sqlite-idbNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates an in-browser SQLite database persisted in IndexedDB, runs a CREATE TABLE, INSERT, SELECT, and defines a custom SQL function.
Use ESM imports (import/import()).
Provide locateFile with your own URL or use Vite's ?url import.
Pass response.body (ReadableStream) from fetch.
Use await before every sql.* call.
Use import { Sqlite } from 'sqlite-idb' and ensure your project uses ESM.Set locateFile to a function that returns the correct URL for the .wasm file.
Pass an idbName (e.g., 'myDB') in the options object.
No dependency data recorded yet.