@nxtedition/rocksdb 11.0.2 → 11.0.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.
Files changed (2) hide show
  1. package/iterator.js +9 -1
  2. package/package.json +1 -1
package/iterator.js CHANGED
@@ -94,8 +94,16 @@ class Iterator extends AbstractIterator {
94
94
  }
95
95
 
96
96
  _nextvSync (size, options) {
97
+ if (this[kFinished]) {
98
+ return []
99
+ }
100
+
101
+ const { rows, finished } = binding.iterator_nextv(this[kContext], size)
102
+
97
103
  this[kFirst] = false
98
- return binding.iterator_nextv(this[kContext], size)
104
+ this[kFinished] = finished
105
+
106
+ return rows
99
107
  }
100
108
 
101
109
  _close (callback) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nxtedition/rocksdb",
3
- "version": "11.0.2",
3
+ "version": "11.0.3",
4
4
  "description": "A low-level Node.js RocksDB binding",
5
5
  "license": "MIT",
6
6
  "main": "index.js",