You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/_includes/api/batch_fetch.html
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -17,7 +17,7 @@
17
17
* `options.startkey` & `options.endkey`: Get documents with IDs in a certain range (inclusive/inclusive).
18
18
* `options.inclusive_end`: Include documents having an ID equal to the given `options.endkey`. Default: `true`.
19
19
* `options.limit`: Maximum number of documents to return.
20
-
* `options.skip`: Number of docs to skip before returning (warning: poor performance on IndexedDB/LevelDB!).
20
+
* `options.skip`: Number of docs to skip before returning (warning: poor performance on IndexedDB!).
21
21
* `options.descending`: Reverse the order of the output documents. Note that the order of `startkey` and `endkey` is reversed when `descending`:`true`.
22
22
* `options.key`: Only return documents with IDs matching this string key.
23
23
* `options.keys`: Array of string keys to fetch in a single shot.
Copy file name to clipboardExpand all lines: docs/_includes/api/create_database.html
+2-5Lines changed: 2 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,7 @@
13
13
**Options for local databases:**
14
14
15
15
* `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'`, `'nodesqlite'`, or `'http'`.
16
+
* `adapter`: One of `'indexeddb'`, `'idb'`, `'nodesqlite'`, or `'http'`.
17
17
* `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`.
18
18
* `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.
19
19
* `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.
@@ -30,12 +30,9 @@
30
30
31
31
1. In IndexedDB PouchDB will use `_pouch_` to prefix the internal database names. Do not manually create databases with the same prefix.
32
32
2. When acting as a client on Node, any other options given will be passed to [request][].
33
-
3. When using the `'leveldb'` adapter (the default on Node), any other options given will be passed to [levelup][].
34
-
4. If you are using the jwt auth handler, please use the fetch option to add the required headers and handle connected logic like token refreshes.
33
+
3. If you are using the jwt auth handler, please use the fetch option to add the required headers and handle connected logic like token refreshes.
Copy file name to clipboardExpand all lines: docs/_includes/api/database_information.html
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -54,6 +54,6 @@
54
54
55
55
There are also some details you can use for debugging. These are unofficial and may change at any time:
56
56
57
-
* `adapter`: The name of the adapter being used (idb, leveldb, ...).
57
+
* `adapter`: The name of the adapter being used (idb, ...).
58
58
* `idb_attachment_format`: (IndexedDB) either `'base64'` or `'binary'`, depending on whether the browser [supports binary blobs](/faq.html#data_types).
59
59
* `backend_adapter`: (Node.JS) the backend *DOWN adapter being used (MemDOWN, RiakDOWN, ...).
Copy file name to clipboardExpand all lines: docs/adapters.md
+1-118Lines changed: 1 addition & 118 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ title: Adapters
4
4
sidebar: nav.html
5
5
---
6
6
7
-
PouchDB is not a self-contained database; it is a CouchDB-style abstraction layer over other databases. By default, PouchDB ships with the [IndexedDB][] adapter for the browser, and a [LevelDB][] adapter in Node.js. This can be visualized as so:
7
+
PouchDB is not a self-contained database; it is a CouchDB-style abstraction layer over other databases. By default, PouchDB ships with the [IndexedDB][] adapter for the browser, and a [nodesqlite][] adapter in Node.js. This can be visualized as so:
@@ -66,83 +66,6 @@ The built-in IndexedDB adapter is nearly always more performant and stable.
66
66
67
67
PouchDB also offers separate browser plugins that use backends other than IndexedDB. These plugins fully pass the PouchDB test suite and are rigorously tested in our CI process.
This pouch will act exactly like a normal one – replicating, storing attachments, pagination, etc. – but it will be deleted as soon as the user closes their browser. However, multiple `PouchDB` objects with the same database name will share the same data:
If you need to support very old browsers, such as IE ≤ 9.0 and Opera Mini, you can use the `pouchdb.localstorage.js` plugin, which allows PouchDB to fall back to [LocalStorage][] on browsers that don't support either IndexedDB or WebSQL. The [es5-shims][] will also be necessary.
The LocalStorage plugin should be considered highly experimental, and the underlying structure may change in the future. Currently it stores all document IDs in memory, which works fine on small databases but may crash on larger databases. You can follow <ahref='https://github.com/No9/localstorage-down'>localstorage-down</a> to track our progress.
119
-
{% include alert/end.html %}
120
-
121
-
{% include anchor.html title="PouchDB in Node.js" hash="pouchdb_in_node_js"%}
122
-
123
-
#### In-memory
124
-
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
-
131
-
Just as in the browser, you can also create a pure in-memory PouchDB:
**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
-
165
-
Technically you are free to use
166
-
[any LevelDOWN-based implementation](https://github.com/rvagg/node-levelup/wiki/Modules#storage-back-ends) in either Node or the browser.
167
-
However this should be considered **extremely experimental** and not designed for production use.
168
-
169
-
See [pouchdb-adapter-leveldb-core](https://www.npmjs.com/package/pouchdb-adapter-leveldb-core) for details.
170
-
171
-
{% include anchor.html title="PouchDB over HTTP" hash="pouchdb_over_http"%}
172
-
173
-
In both the browser and in Node.js, PouchDB can also function as a straightforward API on top of any [CouchDB](https://couchdb.apache.org/)-compliant database:
You can also sync to and from these databases to your local PouchDB.
181
-
182
-
Currently PouchDB has full support for:
183
-
184
-
* CouchDB 1.x
185
-
*[Smileupps](https://www.smileupps.com/) (same as 1.x)
186
-
* CouchDB 2.x ([tested in CI](https://github.com/apache/pouchdb/actions))
187
-
* CouchDB 3.x ([tested in CI](https://github.com/apache/pouchdb/actions))
188
-
*[Cloudant](https://cloudant.com/) (roughly the same as 2.x)
189
-
*[PouchDB Server](https://github.com/pouchdb/pouchdb-server) ([tested in CI](https://github.com/apache/pouchdb/actions))
190
-
*[PouchDB Server --in-memory mode](https://github.com/pouchdb/pouchdb-server)
191
-
192
-
[Drupal 8](http://wearepropeople.com/blog/a-content-staging-solution-for-drupal-8-and-more) has also announced support for PouchDB, and there is [rcouch](https://github.com/rcouch/rcouch) as well, but these are both untested by PouchDB.
193
-
194
-
If you are ever unsure about a server, consider replicating from PouchDB to CouchDB, then from that CouchDB to the other server.
195
-
196
80
#### PouchDB Server
197
81
198
82
[PouchDB Server](https://github.com/pouchdb/pouchdb-server) is a standalone REST server that implements the CouchDB API, while using a LevelDB-based PouchDB under the hood. It also supports an `--in-memory` mode and any [LevelDOWN][] adapter, which you may find handy.
@@ -213,7 +97,6 @@ The best place to look for information on which browsers support which databases
0 commit comments