rocksdb-native 2.6.0 → 2.6.2

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/index.js CHANGED
@@ -119,6 +119,10 @@ const RocksDB = module.exports = class RocksDB extends ReadyResource {
119
119
  }
120
120
 
121
121
  _incRef () {
122
+ if (this.closing !== null) {
123
+ throw new Error('Database closed')
124
+ }
125
+
122
126
  this._refs++
123
127
  }
124
128
 
package/lib/iterator.js CHANGED
@@ -36,7 +36,7 @@ module.exports = class RocksDBIterator extends Readable {
36
36
  this._lte = lte ? this._encodeKey(lte) : empty
37
37
 
38
38
  this._reverse = reverse
39
- this._limit = limit
39
+ this._limit = limit < 0 ? Infinity : limit
40
40
  this._capacity = capacity
41
41
  this._snapshot = snapshot
42
42
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rocksdb-native",
3
- "version": "2.6.0",
3
+ "version": "2.6.2",
4
4
  "description": "librocksdb bindings for JavaScript",
5
5
  "exports": {
6
6
  ".": "./index.js",
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes