@nxtedition/rocksdb 7.0.48 → 7.0.51

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/binding.cc CHANGED
@@ -1248,8 +1248,8 @@ NAPI_METHOD(updates_init) {
1248
1248
  const bool keyAsBuffer = EncodingIsBuffer(env, argv[1], "keyEncoding");
1249
1249
  const bool valueAsBuffer = EncodingIsBuffer(env, argv[1], "valueEncoding");
1250
1250
 
1251
- rocksdb::ColumnFamilyHandle* column;
1252
- NAPI_STATUS_THROWS(GetColumnFamily(nullptr, env, argv[1], &column));
1251
+ rocksdb::ColumnFamilyHandle* column = nullptr;
1252
+ // NAPI_STATUS_THROWS(GetColumnFamily(nullptr, env, argv[1], &column));
1253
1253
 
1254
1254
  auto updates = std::make_unique<Updates>(database, since, keys, values, data, column, keyAsBuffer, valueAsBuffer);
1255
1255
 
@@ -1933,8 +1933,8 @@ NAPI_METHOD(batch_iterate) {
1933
1933
  const bool keyAsBuffer = EncodingIsBuffer(env, argv[1], "keyEncoding");
1934
1934
  const bool valueAsBuffer = EncodingIsBuffer(env, argv[1], "valueEncoding");
1935
1935
 
1936
- rocksdb::ColumnFamilyHandle* column;
1937
- NAPI_STATUS_THROWS(GetColumnFamily(nullptr, env, argv[2], &column));
1936
+ rocksdb::ColumnFamilyHandle* column = nullptr;
1937
+ // NAPI_STATUS_THROWS(GetColumnFamily(nullptr, env, argv[2], &column));
1938
1938
 
1939
1939
  napi_value result;
1940
1940
  BatchIterator iterator(nullptr, keys, values, data, column, keyAsBuffer, valueAsBuffer);
package/index.js CHANGED
@@ -64,6 +64,9 @@ class RocksLevel extends AbstractLevel {
64
64
  this[kLocation] = location
65
65
  this[kContext] = binding.db_init()
66
66
  this[kColumns] = {}
67
+
68
+ // .updates(...) uses 'write' listener.
69
+ this.setMaxListeners(100)
67
70
  }
68
71
 
69
72
  get sequence () {
@@ -305,9 +308,8 @@ class RocksLevel extends AbstractLevel {
305
308
  signal: options?.signal ?? null
306
309
  }
307
310
 
308
- // HACK: We don't properly check for nully column in binding.
309
311
  if (options.column) {
310
- throw new TypeError("'column' not supported")
312
+ throw new TypeError("'column' not implemented")
311
313
  }
312
314
 
313
315
  if (typeof options.since !== 'number') {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nxtedition/rocksdb",
3
- "version": "7.0.48",
3
+ "version": "7.0.51",
4
4
  "description": "A low-level Node.js RocksDB binding",
5
5
  "license": "MIT",
6
6
  "main": "index.js",