You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pouchdb.apache.org by ja...@apache.org on 2026/04/23 15:01:14 UTC
(pouchdb) 06/07: docs: add nodesqlite and deprecation notice
This is an automated email from the ASF dual-hosted git repository.
janl pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pouchdb.git
commit a5bcbc92e3648d2e28b3527b81eea73dedaf739a
Author: Alba Herrerias <al...@gmail.com>
AuthorDate: Thu Apr 23 15:38:16 2026 +0100
docs: add nodesqlite and deprecation notice
---
.github/ISSUE_TEMPLATE/issue.md | 2 +-
TESTING.md | 6 +++---
docs/_includes/api/create_database.html | 2 +-
docs/adapters.md | 24 +++++++++++++++---------
docs/custom.md | 12 ++++++++++++
docs/static/img/pouchdb_adapters.png | Bin 23600 -> 26008 bytes
docs/static/svg/pouchdb_adapters.svg | 2 +-
7 files changed, 33 insertions(+), 15 deletions(-)
diff --git a/.github/ISSUE_TEMPLATE/issue.md b/.github/ISSUE_TEMPLATE/issue.md
index f5b6cfebc..6f866c230 100644
--- a/.github/ISSUE_TEMPLATE/issue.md
+++ b/.github/ISSUE_TEMPLATE/issue.md
@@ -15,7 +15,7 @@ Write the description of the issue here
### Info
- Environment: (Node.js/browser/hybrid app/etc.)
- Platform: (Chrome/FF/Safari/Edge/iOS/Android/etc.)
-- Adapter: (idb/indexeddb/memory/leveldb/etc.)
+- Adapter: (idb/indexeddb/memory/leveldb/nodesqlite/etc.)
- Server: (CouchDB/Cloudant/PouchDB Server/etc.)
### Reproduce
diff --git a/TESTING.md b/TESTING.md
index 961d8fa15..245579b87 100644
--- a/TESTING.md
+++ b/TESTING.md
@@ -66,7 +66,7 @@ The main test suite can be run using the following command:
PouchDB runs in the browser and on Node.js, and has multiple different storage
backends known as _adapters_. In the browser these are `idb`, `indexeddb` and
-`memory` and on Node.js they're `leveldb` and `memory`.
+`memory` and on Node.js they're `nodesqlite`, `leveldb` and `memory`.
It also includes an adapter named `http`, which works by delegating operations
to CouchDB (or anything that's API-compatible with it) over the network. Since
@@ -92,7 +92,7 @@ databases. These are selected automatically based on the execution environment,
but this variable overrides the default choice and causes additional adapters to
be loaded if they're not part of the default distribution.
-On Node.js the available local adapters are `leveldb` and `memory`. In the
+On Node.js the available local adapters are `nodesqlite`, `leveldb` and `memory`. In the
browser they're `idb`, `indexeddb` and `memory`.
You can also set `ADAPTERS=http` to force all PouchDB databases to be created on
@@ -187,7 +187,7 @@ Comma-separated list of preferred view adapter backends that PouchDB will use.
This variable overrides the default choice and causes additional adapters to
be loaded if they're not part of the default distribution.
-On Node.js the available adapters are `leveldb` and `memory`. In the
+On Node.js the available adapters are `nodesqlite`, `leveldb` and `memory`. In the
browser they're `idb`, `indexeddb` and `memory`.
diff --git a/docs/_includes/api/create_database.html b/docs/_includes/api/create_database.html
index f29d88f2e..3d606f47f 100644
--- a/docs/_includes/api/create_database.html
+++ b/docs/_includes/api/create_database.html
@@ -13,7 +13,7 @@ This method creates a database or opens an existing one. If you use a URL like `
**Options for local databases:**
* `auto_compaction`: This turns on auto compaction, which means `compact()` is called after every change to the database. Defaults to `false`.
-* `adapter`: One of `'indexeddb'`, `'idb'`, `'leveldb'`, or `'http'`.
+* `adapter`: One of `'indexeddb'`, `'idb'`, `'leveldb'`, `'nodesqlite'`, or `'http'`.
* `revs_limit`: Specify how many old revisions we keep track (not a copy) of. Specifying a low value means Pouch may not be able to figure out whether a new revision received via replication is related to any it currently has which could result in a conflict. Defaults to `1000`.
* `deterministic_revs`: Use a md5 hash to create a deterministic revision number for documents. Setting it to false will mean that the revision number will be a random UUID. Defaults to true.
* `view_update_changes_batch_size`: Specify how many change records will be consumed at a time when rebuilding view indexes when the `query()` method is used. Defaults to 50.
diff --git a/docs/adapters.md b/docs/adapters.md
index 38a3d9151..82cc35f22 100644
--- a/docs/adapters.md
+++ b/docs/adapters.md
@@ -122,6 +122,12 @@ The LocalStorage plugin should be considered highly experimental, and the underl
#### In-memory
+{% include alert/start.html variant="warning"%}
+{% markdown %}
+**Warning: deprecation notice.** The `memory` adapter will be deprecated in PouchDB version 10.0.0 and removed in version 11.0.0. You can read [the migration guide here](https://pouchdb.com/2026/04/10/migration-to-nodesqlite.html) and more about the topic in [this link](https://github.com/apache/pouchdb/issues/9163).
+{% endmarkdown %}
+{% include alert/end.html%}
+
Just as in the browser, you can also create a pure in-memory PouchDB:
```
@@ -139,23 +145,23 @@ This implementation is based on [MemDOWN](https://github.com/level/memdown), and
#### Node SQLite adapter
-You can also use PouchDB over [SQLite3](https://github.com/mapbox/node-sqlite3) in Node, using the WebSQL adapter and
-[node-websql](https://github.com/nolanlawson/node-websql):
+You can also use PouchDB in Node.js' [native SQLite module](https://nodejs.org/api/sqlite.html), when using Node.js' `>22.5.0` version.
```js
const PouchDB = require('pouchdb');
-PouchDB.plugin(require('pouchdb-adapter-node-websql'));
+PouchDB.plugin(require('pouchdb-adapter-node-sqlite'));
-const db = new PouchDB('mydatabase.db', {adapter: 'websql'});
+const db = new PouchDB('mydatabase.db', {adapter: 'nodesqlite'});
```
-In this case, PouchDB is directly using SQLite queries to build the database, exactly as the WebSQL adapter would.
-
-See ["Prebuilt databases with PouchDB"]({{ site.baseurl }}/2016/04/28/prebuilt-databases-with-pouchdb.html)
-for a guide to how you might use this adapter to create prebuilt SQLite database files for adapters such as Cordova or Electron.
-
#### Other LevelDOWN adapters
+{% include alert/start.html variant="warning"%}
+{% markdown %}
+**Warning: deprecation notice.** The `leveldb` adapter will be deprecated in PouchDB version 10.0.0 and removed in version 11.0.0. You can read [the migration guide here](https://pouchdb.com/2026/04/10/migration-to-nodesqlite.html) and more about the topic in [this link](https://github.com/apache/pouchdb/issues/9163).
+{% endmarkdown %}
+{% include alert/end.html%}
+
Technically you are free to use
[any LevelDOWN-based implementation](https://github.com/rvagg/node-levelup/wiki/Modules#storage-back-ends) in either Node or the browser.
However this should be considered **extremely experimental** and not designed for production use.
diff --git a/docs/custom.md b/docs/custom.md
index fd48700f1..613049e6f 100644
--- a/docs/custom.md
+++ b/docs/custom.md
@@ -175,6 +175,12 @@ console.log(db.adapter); // 'websql'
### [pouchdb-adapter-leveldb](https://npmjs.org/package/pouchdb-adapter-leveldb)
+{% include alert/start.html variant="warning"%}
+{% markdown %}
+**Warning: deprecation notice.** The `leveldb` adapter will be deprecated in PouchDB version 10.0.0 and removed in version 11.0.0. You can read [the migration guide here](https://pouchdb.com/2026/04/10/migration-to-nodesqlite.html) and more about the topic in [this link](https://github.com/apache/pouchdb/issues/9163).
+{% endmarkdown %}
+{% include alert/end.html%}
+
The primary adapter used by PouchDB in Node.js, using LevelDB. The adapter name
is `'leveldb'`.
@@ -213,6 +219,12 @@ console.log(db.adapter); // 'http'
### [pouchdb-adapter-memory](https://npmjs.org/package/pouchdb-adapter-memory)
+{% include alert/start.html variant="warning"%}
+{% markdown %}
+**Warning: deprecation notice.** The `memory` adapter will be deprecated in PouchDB version 10.0.0 and removed in version 11.0.0. You can read [the migration guide here](https://pouchdb.com/2026/04/10/migration-to-nodesqlite.html) and more about the topic in [this link](https://github.com/apache/pouchdb/issues/9163).
+{% endmarkdown %}
+{% include alert/end.html%}
+
An optional adapter that works in the browser and Node.js, fully in-memory. The adapter name
is `'memory'`.
diff --git a/docs/static/img/pouchdb_adapters.png b/docs/static/img/pouchdb_adapters.png
index 548aa0c1d..ca4c84498 100644
Binary files a/docs/static/img/pouchdb_adapters.png and b/docs/static/img/pouchdb_adapters.png differ
diff --git a/docs/static/svg/pouchdb_adapters.svg b/docs/static/svg/pouchdb_adapters.svg
index 2cfee97a3..d659c808b 100644
--- a/docs/static/svg/pouchdb_adapters.svg
+++ b/docs/static/svg/pouchdb_adapters.svg
@@ -1 +1 @@
-<svg version="1.1" viewBox="0.0 0.0 630.5275590551181 362.95538057742783" fill="none" stroke="none" stroke-linecap="square" stroke-miterlimit="10" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg"><clipPath id="p.0"><path d="m0 0l630.5276 0l0 362.95538l-630.5276 0l0 -362.95538z" clip-rule="nonzero"/></clipPath><g clip-path="url(#p.0)"><path fill="#000000" fill-opacity="0.0" d="m0 0l630.5276 0l0 362.95538l-630.5276 0z" fill-rule="evenodd"/><path fill="#000000" [...]
\ No newline at end of file
+<svg version="1.1" viewBox="0.0 0.0 831.50656167979 362.46456692913387" fill="none" stroke="none" stroke-linecap="square" stroke-miterlimit="10" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg"><clipPath id="p.0"><path d="m0 0l831.5066 0l0 362.46457l-831.5066 0l0 -362.46457z" clip-rule="nonzero"/></clipPath><g clip-path="url(#p.0)"><path fill="#000000" fill-opacity="0.0" d="m0 0l831.5066 0l0 362.46457l-831.5066 0z" fill-rule="evenodd"/><path fill="#000000" fi [...]
\ No newline at end of file