Skip to content

Commit f01bbd4

Browse files
committed
docs: add nodesqlite and deprecation notice
1 parent 405193f commit f01bbd4

File tree

7 files changed

+33
-16
lines changed

7 files changed

+33
-16
lines changed

.github/ISSUE_TEMPLATE/issue.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Write the description of the issue here
1515
### Info
1616
- Environment: (Node.js/browser/hybrid app/etc.)
1717
- Platform: (Chrome/FF/Safari/Edge/iOS/Android/etc.)
18-
- Adapter: (idb/indexeddb/memory/leveldb/etc.)
18+
- Adapter: (idb/indexeddb/memory/leveldb/nodesqlite/etc.)
1919
- Server: (CouchDB/Cloudant/PouchDB Server/etc.)
2020

2121
### Reproduce

TESTING.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ The main test suite can be run using the following command:
6666
6767
PouchDB runs in the browser and on Node.js, and has multiple different storage
6868
backends known as _adapters_. In the browser these are `idb`, `indexeddb` and
69-
`memory` and on Node.js they're `leveldb` and `memory`.
69+
`memory` and on Node.js they're `nodesqlite`, `leveldb` and `memory`.
7070

7171
It also includes an adapter named `http`, which works by delegating operations
7272
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,
9292
but this variable overrides the default choice and causes additional adapters to
9393
be loaded if they're not part of the default distribution.
9494

95-
On Node.js the available local adapters are `leveldb` and `memory`. In the
95+
On Node.js the available local adapters are `nodesqlite`, `leveldb` and `memory`. In the
9696
browser they're `idb`, `indexeddb` and `memory`.
9797

9898
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.
187187
This variable overrides the default choice and causes additional adapters to
188188
be loaded if they're not part of the default distribution.
189189

190-
On Node.js the available adapters are `leveldb` and `memory`. In the
190+
On Node.js the available adapters are `nodesqlite`, `leveldb` and `memory`. In the
191191
browser they're `idb`, `indexeddb` and `memory`.
192192

193193

docs/_includes/api/create_database.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
**Options for local databases:**
1414

1515
* `auto_compaction`: This turns on auto compaction, which means `compact()` is called after every change to the database. Defaults to `false`.
16-
* `adapter`: One of `'indexeddb'`, `'idb'`, `'leveldb'`, or `'http'`.
16+
* `adapter`: One of `'indexeddb'`, `'idb'`, `'leveldb'`, `'nodesqlite'`, or `'http'`.
1717
* `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`.
1818
* `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.
1919
* `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.

docs/adapters.md

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,12 @@ The LocalStorage plugin should be considered highly experimental, and the underl
122122

123123
#### In-memory
124124

125+
{% include alert/start.html variant="warning"%}
126+
{% markdown %}
127+
**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).
128+
{% endmarkdown %}
129+
{% include alert/end.html%}
130+
125131
Just as in the browser, you can also create a pure in-memory PouchDB:
126132

127133
```
@@ -139,23 +145,23 @@ This implementation is based on [MemDOWN](https://github.com/level/memdown), and
139145

140146
#### Node SQLite adapter
141147

142-
You can also use PouchDB over [SQLite3](https://github.com/mapbox/node-sqlite3) in Node, using the WebSQL adapter and
143-
[node-websql](https://github.com/nolanlawson/node-websql):
148+
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.
144149

145150
```js
146151
const PouchDB = require('pouchdb');
147-
PouchDB.plugin(require('pouchdb-adapter-node-websql'));
152+
PouchDB.plugin(require('pouchdb-adapter-node-sqlite'));
148153

149-
const db = new PouchDB('mydatabase.db', {adapter: 'websql'});
154+
const db = new PouchDB('mydatabase.db', {adapter: 'nodesqlite'});
150155
```
151156

152-
In this case, PouchDB is directly using SQLite queries to build the database, exactly as the WebSQL adapter would.
153-
154-
See ["Prebuilt databases with PouchDB"]({{ site.baseurl }}/2016/04/28/prebuilt-databases-with-pouchdb.html)
155-
for a guide to how you might use this adapter to create prebuilt SQLite database files for adapters such as Cordova or Electron.
156-
157157
#### Other LevelDOWN adapters
158158

159+
{% include alert/start.html variant="warning"%}
160+
{% markdown %}
161+
**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).
162+
{% endmarkdown %}
163+
{% include alert/end.html%}
164+
159165
Technically you are free to use
160166
[any LevelDOWN-based implementation](https://github.com/rvagg/node-levelup/wiki/Modules#storage-back-ends) in either Node or the browser.
161167
However this should be considered **extremely experimental** and not designed for production use.

docs/custom.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,12 @@ console.log(db.adapter); // 'websql'
175175

176176
### [pouchdb-adapter-leveldb](https://npmjs.org/package/pouchdb-adapter-leveldb)
177177

178+
{% include alert/start.html variant="warning"%}
179+
{% markdown %}
180+
**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).
181+
{% endmarkdown %}
182+
{% include alert/end.html%}
183+
178184
The primary adapter used by PouchDB in Node.js, using LevelDB. The adapter name
179185
is `'leveldb'`.
180186

@@ -213,6 +219,12 @@ console.log(db.adapter); // 'http'
213219

214220
### [pouchdb-adapter-memory](https://npmjs.org/package/pouchdb-adapter-memory)
215221

222+
{% include alert/start.html variant="warning"%}
223+
{% markdown %}
224+
**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).
225+
{% endmarkdown %}
226+
{% include alert/end.html%}
227+
216228
An optional adapter that works in the browser and Node.js, fully in-memory. The adapter name
217229
is `'memory'`.
218230

-9.81 KB
Loading

docs/static/svg/pouchdb_adapters.svg

Lines changed: 1 addition & 2 deletions
Loading

0 commit comments

Comments
 (0)