@nxtedition/rocksdb 13.5.2 → 13.5.5
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
|
@@ -271,6 +271,16 @@ class RocksLevel extends AbstractLevel {
|
|
|
271
271
|
}
|
|
272
272
|
|
|
273
273
|
async * updates (options) {
|
|
274
|
+
yield * this.updatesSync(options)
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
* updatesSync (options) {
|
|
278
|
+
if (this.status !== 'open') {
|
|
279
|
+
throw new ModuleError('Database is not open', {
|
|
280
|
+
code: 'LEVEL_DATABASE_NOT_OPEN'
|
|
281
|
+
})
|
|
282
|
+
}
|
|
283
|
+
|
|
274
284
|
const handle = binding.updates_init(this[kContext], options)
|
|
275
285
|
try {
|
|
276
286
|
while (true) {
|
package/package.json
CHANGED
|
Binary file
|
|
Binary file
|
package/util.h
CHANGED
|
@@ -138,7 +138,7 @@ static napi_status GetString(napi_env env, napi_value from, rocksdb::Slice& to)
|
|
|
138
138
|
{
|
|
139
139
|
napi_value property;
|
|
140
140
|
NAPI_STATUS_RETURN(napi_get_named_property(env, from, "byteLength", &property));
|
|
141
|
-
NAPI_STATUS_RETURN(napi_get_value_int32(env, property, &
|
|
141
|
+
NAPI_STATUS_RETURN(napi_get_value_int32(env, property, &len));
|
|
142
142
|
}
|
|
143
143
|
|
|
144
144
|
if (len < 0 || len > length) {
|