pouchdb-adapter-generic-sqlite
v0.1.2
Published
Generic pluggable SQLite storage adapter for PouchDB.
Maintainers
Readme
pouchdb-adapter-generic-sqlite
The PouchDB 9 native async storage core and plugin for the generic SQLite driver family.
This repository is currently pre-0.1 and the package is not published to npm yet.
import PouchDB from "pouchdb-core";
import genericSQLite from "pouchdb-adapter-generic-sqlite";
import { createNodeSQLiteDriver } from "pouchdb-sqlite-driver-node";
const DB = PouchDB.plugin(genericSQLite);
const db = new DB("app.sqlite", {
adapter: "generic-sqlite",
sqlite: { driver: createNodeSQLiteDriver() },
});The core does not choose a SQLite implementation globally. Every database receives an explicit driver factory, and all SQL runs through its generic transaction-scoped executor.
Each database persists a text-key storage codec on first creation. Drivers that preserve embedded-NUL PouchDB keys select the zero-overhead raw path; drivers that report a NUL-unsafe text boundary select the collision-free, order-preserving nul-escaped path. Reopens always honor the stored codec.
See the repository root README.md and docs/DRIVER_CONTRACT.md for lifecycle, cache identity, and custom-driver details.
