Skip to content

Commit 53d1d0f

Browse files
committed
docs: remove leveldb, localstorage and memory references
1 parent c863506 commit 53d1d0f

17 files changed

Lines changed: 25 additions & 225 deletions

File tree

.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/nodesqlite/etc.)
18+
- Adapter: (idb/indexeddb/nodesqlite/etc.)
1919
- Server: (CouchDB/Cloudant/PouchDB Server/etc.)
2020

2121
### Reproduce

TESTING.md

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,7 @@ The main test suite can be run using the following command:
6565
> If the tests don‘t pass on `main`, try building once before running the tests: `$npm run build`.
6666
6767
PouchDB runs in the browser and on Node.js, and has multiple different storage
68-
backends known as _adapters_. In the browser these are `idb`, `indexeddb` and
69-
`memory` and on Node.js they're `nodesqlite`, `leveldb` and `memory`.
68+
backends known as _adapters_. In the browser these are `idb` and `indexeddb` and on Node.js there is `nodesqlite`.
7069

7170
It also includes an adapter named `http`, which works by delegating operations
7271
to CouchDB (or anything that's API-compatible with it) over the network. Since
@@ -92,8 +91,8 @@ databases. These are selected automatically based on the execution environment,
9291
but this variable overrides the default choice and causes additional adapters to
9392
be loaded if they're not part of the default distribution.
9493

95-
On Node.js the available local adapters are `nodesqlite`, `leveldb` and `memory`. In the
96-
browser they're `idb`, `indexeddb` and `memory`.
94+
On Node.js the available local adapter is `nodesqlite`. In the
95+
browser they're `idb` and `indexeddb`.
9796

9897
You can also set `ADAPTERS=http` to force all PouchDB databases to be created on
9998
a remote server, identified by `COUCH_HOST`. This is not necessary for
@@ -181,14 +180,14 @@ following values:
181180

182181
Set this to `1` to skip the migration tests.
183182

184-
#### `VIEW_ADAPTERS` (default: `memory`) <!-- omit from toc -->
183+
#### `VIEW_ADAPTERS` (default: `nodesqlite`) <!-- omit from toc -->
185184

186185
Comma-separated list of preferred view adapter backends that PouchDB will use.
187186
This variable overrides the default choice and causes additional adapters to
188187
be loaded if they're not part of the default distribution.
189188

190-
On Node.js the available adapters are `nodesqlite`, `leveldb` and `memory`. In the
191-
browser they're `idb`, `indexeddb` and `memory`.
189+
On Node.js the available adapter is `nodesqlite`. In the
190+
browser they're `idb` and `indexeddb`.
192191

193192

194193
## Other sets of tests
@@ -213,8 +212,8 @@ These suites support most of the same options as the integration tests.
213212
You'll want to test specific adapters by specifying them on the command-line,
214213
for example:
215214

216-
# run the "find" tests with the memory client on node.js
217-
$ TYPE=find PLUGINS=pouchdb-find CLIENT=node ADAPTERS=memory npm test
215+
# run the "find" tests with the nodesqlite client on node.js
216+
$ TYPE=find PLUGINS=pouchdb-find CLIENT=node ADAPTERS=nodesqlite npm test
218217

219218
# run the "mapreduce" tests with indexeddb in firefox
220219
$ TYPE=mapreduce CLIENT=firefox ADAPTERS=indexeddb npm test

docs/_includes/api/batch_fetch.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
* `options.startkey` &amp; `options.endkey`: Get documents with IDs in a certain range (inclusive/inclusive).
1818
* `options.inclusive_end`: Include documents having an ID equal to the given `options.endkey`. Default: `true`.
1919
* `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!).
2121
* `options.descending`: Reverse the order of the output documents. Note that the order of `startkey` and `endkey` is reversed when `descending`:`true`.
2222
* `options.key`: Only return documents with IDs matching this string key.
2323
* `options.keys`: Array of string keys to fetch in a single shot.

docs/_includes/api/create_database.html

Lines changed: 2 additions & 5 deletions
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'`, `'nodesqlite'`, or `'http'`.
16+
* `adapter`: One of `'indexeddb'`, `'idb'`, `'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.
@@ -30,12 +30,9 @@
3030

3131
1. In IndexedDB PouchDB will use `_pouch_` to prefix the internal database names. Do not manually create databases with the same prefix.
3232
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.
3534

3635
[request]: https://github.com/mikeal/request
37-
[levelup]: https://github.com/rvagg/node-levelup
38-
[levelup_options]: https://github.com/rvagg/node-levelup/#options
3936

4037
#### Example Usage:
4138
{% highlight "js" %}

docs/_includes/api/database_information.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,6 @@
5454

5555
There are also some details you can use for debugging. These are unofficial and may change at any time:
5656

57-
* `adapter`: The name of the adapter being used (idb, leveldb, ...).
57+
* `adapter`: The name of the adapter being used (idb, ...).
5858
* `idb_attachment_format`: (IndexedDB) either `'base64'` or `'binary'`, depending on whether the browser [supports binary blobs](/faq.html#data_types).
5959
* `backend_adapter`: (Node.JS) the backend *DOWN adapter being used (MemDOWN, RiakDOWN, ...).

docs/_includes/api/defaults.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
const MyPrefixedPouch = PouchDB.defaults({
2424
prefix: '/path/to/my/db/'
2525
});
26-
// db will be named '/path/to/my/db/dbname', useful for LevelDB
26+
// db will be named '/path/to/my/db/dbname'
2727
const myPrefixedPouch = new MyPrefixedPouch('dbname');
2828

2929
const HTTPPouch = PouchDB.defaults({

docs/_includes/api/query_database.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
* `options.startkey` &amp; `options.endkey`: Get rows with keys in a certain range (inclusive/inclusive).
4242
* `options.inclusive_end`: Include rows having a key equal to the given `options.endkey`. Default: `true`.
4343
* `options.limit`: Maximum number of rows to return.
44-
* `options.skip`: Number of rows to skip before returning (warning: poor performance on IndexedDB/LevelDB!).
44+
* `options.skip`: Number of rows to skip before returning (warning: poor performance on IndexedDB!).
4545
* `options.descending`: Reverse the order of the output rows.
4646
* `options.key`: Only return rows matching this key.
4747
* `options.keys`: Array of keys to fetch in a single shot.

docs/_layouts/default.html

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -122,20 +122,6 @@ <h4>{{ sub_title}}</h4>
122122
</a>
123123
</div>
124124

125-
<div class="col-xs-4 col-md-2">
126-
<a
127-
href="https://github.com/rvagg/node-levelup"
128-
target="_blank"
129-
rel="noopener noreferrer"
130-
>
131-
<img
132-
class="icon"
133-
src="{{ site.baseurl}}/static/img/friends/leveldb.svg"
134-
alt="Node Levelup"
135-
/>
136-
</a>
137-
</div>
138-
139125
<div class="col-xs-4 col-md-2">
140126
<a
141127
href="https://github.com/apache/pouchdb"

docs/adapters.md

Lines changed: 1 addition & 118 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ title: Adapters
44
sidebar: nav.html
55
---
66

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:
88

99
<object data="static/svg/pouchdb_adapters.svg" type="image/svg+xml">
1010
<img src="static/img/pouchdb_adapters.png" alt="adapters">
@@ -66,83 +66,6 @@ The built-in IndexedDB adapter is nearly always more performant and stable.
6666

6767
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.
6868

69-
**Downloads:**
70-
71-
* [pouchdb.memory.js](https://github.com/apache/pouchdb/releases/download/{{ site.version }}/pouchdb.memory.js) (Minified: [pouchdb.memory.min.js](https://github.com/apache/pouchdb/releases/download/{{ site.version }}/pouchdb.memory.min.js))
72-
* [pouchdb.localstorage.js](https://github.com/apache/pouchdb/releases/download/{{ site.version }}/pouchdb.localstorage.js) (Minified: [pouchdb.localstorage.min.js](https://github.com/apache/pouchdb/releases/download/{{ site.version }}/pouchdb.localstorage.min.js))
73-
74-
{% include alert/start.html variant="warning"%}
75-
{% markdown %}
76-
These plugins add a hefty footprint due to external dependencies, so take them with a grain of salt.
77-
{% endmarkdown %}
78-
{% include alert/end.html%}
79-
80-
#### In-memory adapter
81-
82-
If you want a quick database for your unit tests, you can use the `pouchdb.memory.js` plugin, which offers a pure in-memory PouchDB:
83-
84-
```html
85-
<script src="pouchdb.js"></script>
86-
<script src="pouchdb.memory.js"></script>
87-
<script>
88-
// this pouch is ephemeral; it only exists in memory
89-
const pouch = new PouchDB('mydb', {adapter: 'memory'});
90-
</script>
91-
```
92-
93-
This pouch will act exactly like a normal one &ndash; replicating, storing attachments, pagination, etc. &ndash; 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:
94-
95-
```js
96-
// pouch1 and pouch2 will share the same data
97-
const pouch1 = new PouchDB('myDB', {adapter: 'memory'});
98-
const pouch2 = new PouchDB('myDB', {adapter: 'memory'});
99-
100-
// pouch3 will have its own data
101-
const pouch3 = new PouchDB('myOtherDB', {adapter: 'memory'});
102-
```
103-
104-
#### LocalStorage adapter
105-
106-
If you need to support very old browsers, such as IE &le; 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.
107-
108-
```html
109-
<script src="pouchdb.js"></script>
110-
<script src="pouchdb.localstorage.js"></script>
111-
<script>
112-
// this pouch is backed by LocalStorage
113-
const pouch = new PouchDB('mydb', {adapter: 'localstorage'});
114-
</script>
115-
```
116-
117-
{% include alert/start.html variant="warning"%}
118-
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 <a href='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:
132-
133-
```
134-
$ npm install pouchdb-adapter-memory
135-
```
136-
137-
then:
138-
139-
```js
140-
PouchDB.plugin(require('pouchdb-adapter-memory'));
141-
const pouch = new PouchDB('myDB', {adapter: 'memory'});
142-
```
143-
144-
This implementation is based on [MemDOWN](https://github.com/level/memdown), and will not write any changes to disk.
145-
14669
#### Node SQLite adapter
14770

14871
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.
@@ -154,45 +77,6 @@ PouchDB.plugin(require('pouchdb-adapter-node-sqlite'));
15477
const db = new PouchDB('mydatabase.db', {adapter: 'nodesqlite'});
15578
```
15679

157-
#### Other LevelDOWN adapters
158-
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-
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:
174-
175-
```js
176-
const pouch = new PouchDB('http://my-site.com:5984/my-db');
177-
const securePouch = new PouchDB('https://my-secure-site.com:5984/my-secure-db');
178-
```
179-
180-
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-
19680
#### PouchDB Server
19781

19882
[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
21397

21498
[IndexedDB]: http://www.w3.org/TR/IndexedDB/
21599
[WebSQL]: http://www.w3.org/TR/webdatabase/
216-
[LevelDB]: https://code.google.com/p/leveldb/
217100
[LocalStorage]: https://developer.mozilla.org/en-US/docs/Web/Guide/API/DOM/Storage
218101
[es5-shims]: https://github.com/es-shims/es5-shim
219102
[sqlite plugin]: https://github.com/brodysoft/Cordova-SQLitePlugin

0 commit comments

Comments
 (0)