@nxtedition/rocksdb 7.0.14 → 7.0.17
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 +7 -4
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -193,7 +193,10 @@ class RocksLevel extends AbstractLevel {
|
|
|
193
193
|
|
|
194
194
|
class Updates {
|
|
195
195
|
constructor (db, options) {
|
|
196
|
-
this.context = binding.updates_init(db[kContext],
|
|
196
|
+
this.context = binding.updates_init(db[kContext], {
|
|
197
|
+
...options,
|
|
198
|
+
since: BigInt(options.since || 0)
|
|
199
|
+
})
|
|
197
200
|
this.closed = false
|
|
198
201
|
this.promise = null
|
|
199
202
|
this.db = db
|
|
@@ -248,11 +251,11 @@ class RocksLevel extends AbstractLevel {
|
|
|
248
251
|
const updates = new Updates(this, options)
|
|
249
252
|
try {
|
|
250
253
|
while (true) {
|
|
251
|
-
const
|
|
252
|
-
if (!
|
|
254
|
+
const { sequence, rows } = await updates.next()
|
|
255
|
+
if (!rows) {
|
|
253
256
|
return
|
|
254
257
|
}
|
|
255
|
-
yield
|
|
258
|
+
yield { sequence: Number(sequence), rows }
|
|
256
259
|
}
|
|
257
260
|
} finally {
|
|
258
261
|
await updates.close()
|