@nxtedition/rocksdb 7.1.32 → 7.1.33
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 +9 -11
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -208,11 +208,7 @@ class RocksLevel extends AbstractLevel {
|
|
|
208
208
|
this[kUnref]()
|
|
209
209
|
|
|
210
210
|
if (!err) {
|
|
211
|
-
this.emit('update', {
|
|
212
|
-
rows: batch.toArray(),
|
|
213
|
-
count: batch.length,
|
|
214
|
-
sequence: sequence
|
|
215
|
-
})
|
|
211
|
+
this.emit('update', { batch, sequence })
|
|
216
212
|
}
|
|
217
213
|
|
|
218
214
|
callback(err)
|
|
@@ -233,11 +229,7 @@ class RocksLevel extends AbstractLevel {
|
|
|
233
229
|
|
|
234
230
|
// TODO (fix)
|
|
235
231
|
// if (!err) {
|
|
236
|
-
//
|
|
237
|
-
// rows: batch.toArray(),
|
|
238
|
-
// count: batch.length,
|
|
239
|
-
// sequence: sequence
|
|
240
|
-
// })
|
|
232
|
+
// this.emit('update', { batch, sequence })
|
|
241
233
|
// }
|
|
242
234
|
|
|
243
235
|
callback(err)
|
|
@@ -366,7 +358,13 @@ class RocksLevel extends AbstractLevel {
|
|
|
366
358
|
objectMode: true,
|
|
367
359
|
readableHighWaterMark: 8192,
|
|
368
360
|
construct (callback) {
|
|
369
|
-
this._next = (
|
|
361
|
+
this._next = ({ batch, sequence }) => {
|
|
362
|
+
const update = {
|
|
363
|
+
rows: batch.toArray(options),
|
|
364
|
+
count: batch.length,
|
|
365
|
+
sequence: sequence
|
|
366
|
+
}
|
|
367
|
+
|
|
370
368
|
if (!this.push(update)) {
|
|
371
369
|
this.push(null)
|
|
372
370
|
db.off('update', this._next)
|