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
{{ message }}
This repository was archived by the owner on Dec 1, 2024. It is now read-only.
[](#backers)
14
14
[](#sponsors)
15
15
16
-
**If you are upgrading:** please see [UPGRADING.md](UPGRADING.md).
16
+
## Table of Contents
17
+
18
+
<details><summary>Click to expand</summary>
19
+
20
+
-[Introduction](#introduction)
21
+
-[Supported Platforms](#supported-platforms)
22
+
-[API](#api)
23
+
-[Contributing](#contributing)
24
+
-[Donate](#donate)
25
+
-[License](#license)
26
+
27
+
</details>
17
28
18
-
`rocksdb` is based on the [LevelDown](https://github.com/Level/leveldown) code, which was extracted from [LevelUP](https://github.com/Level/levelup) and now serves as a stand-alone binding for LevelDB. The native code in `rocksdb` is based on [Facebooks fork of LevelDB](https://github.com/facebook/rocksdb).
29
+
## Introduction
19
30
20
-
It is **strongly recommended** that you use LevelUP in preference to `rocksdb` unless you have measurable performance reasons to do so. LevelUP is optimised for usability and safety. Although we are working to improve the safety of the `rocksdb` interface it is still easy to crash your Node process if you don't do things in just the right way.
31
+
This module closely follows [`leveldown`](https://github.com/Level/leveldown) and implements the same API. The difference is that `leveldown` is a binding for [LevelDB](https://github.com/google/leveldb) while `rocksdb` is a binding for [RocksDB, Facebook's fork of LevelDB](https://github.com/facebook/rocksdb).
32
+
33
+
It is **strongly recommended** that you use `levelup` in preference to `rocksdb` unless you have measurable performance reasons to do so. `levelup` is optimized for usability and safety. Although we are working to improve the safety of the `rocksdb` interface it is still easy to crash your Node process if you don't do things in just the right way.
34
+
35
+
**If you are upgrading:** please see [UPGRADING.md](UPGRADING.md).
21
36
22
-
<aname="platforms"></a>
23
37
## Supported Platforms
24
38
25
39
We aim to support _at least_ Active LTS and Current Node.js releases, Electron 4.0.0, as well as any future Node.js and Electron releases thanks to [N-API](https://nodejs.org/api/n-api.html). Because N-API has an experimental status in node 6 and early 8.x releases, the minimum node version for `rocksdb` is `8.6.0`.
26
40
27
-
The `rocksdb` npm package ships with prebuilt binaries for popular 64-bit platforms ~~as well as ARM, Android and Alpine (musl)~~and is known to work on:
41
+
The `rocksdb` npm package ships with prebuilt binaries for popular 64-bit platforms and is known to work on:
28
42
29
43
-**Linux** (including ARM platforms such as Raspberry Pi and Kindle)
30
44
-**Mac OS**
@@ -36,10 +50,11 @@ When installing `rocksdb`, [`node-gyp-build`](https://github.com/prebuild/node-g
36
50
37
51
If you don't want to use the prebuilt binary for the platform you are installing on, specify the `--build-from-source` flag when you install. If you are working on `rocksdb` itself and want to re-compile the C++ code it's enough to do `npm install`.
38
52
39
-
<aname="api"></a>
40
53
## API
41
54
42
-
`rocksdb` implements the same API of [LevelDown](https://github.com/Level/leveldown#api).
55
+
Please refer to [`leveldown`](https://github.com/Level/leveldown#api) for API documentation. The `db.open(options, callback)` method of `rocksdb` has a few additional options:
56
+
57
+
-`readOnly` (boolean, default `false`): open database in read-only mode.
0 commit comments