rocksdb-native 3.1.1 → 3.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CMakeLists.txt CHANGED
@@ -7,7 +7,7 @@ find_package(cmake-npm REQUIRED PATHS node_modules/cmake-npm)
7
7
 
8
8
  project(rocksdb_native C CXX)
9
9
 
10
- fetch_package("github:holepunchto/librocksdb#af0e81e")
10
+ fetch_package("github:holepunchto/librocksdb#caeaa2b")
11
11
 
12
12
  add_bare_module(rocksdb_native_bare)
13
13
 
package/index.js CHANGED
@@ -28,13 +28,17 @@ class RocksDB {
28
28
  }
29
29
 
30
30
  get closed() {
31
- return this.isRoot() ? this._state.closed : this._destroyed
31
+ return this.isRoot() ? this._state.closed : this._index === -1
32
32
  }
33
33
 
34
34
  get path() {
35
35
  return this._state.path
36
36
  }
37
37
 
38
+ get snapshotted() {
39
+ return this._snapshot !== null
40
+ }
41
+
38
42
  get defaultColumnFamily() {
39
43
  return this._columnFamily
40
44
  }
@@ -172,6 +176,6 @@ module.exports = exports = RocksDB
172
176
  exports.ColumnFamily = ColumnFamily
173
177
 
174
178
  function maybeClosed(db) {
175
- if (db._state.closing || db._destroyed)
179
+ if (db._state.closing || db._index === -1)
176
180
  throw new Error('RocksDB session is closed')
177
181
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rocksdb-native",
3
- "version": "3.1.1",
3
+ "version": "3.1.3",
4
4
  "description": "librocksdb bindings for JavaScript",
5
5
  "exports": {
6
6
  ".": "./index.js",