@nxtedition/rocksdb 12.0.5 → 12.0.7

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
@@ -357,6 +357,8 @@ struct BaseIterator : public Closable {
357
357
 
358
358
  virtual rocksdb::Status Close() override {
359
359
  if (iterator_) {
360
+ lower_bound_.reset();
361
+ upper_bound_.reset();
360
362
  iterator_.reset();
361
363
  database_->Detach(this);
362
364
  }
@@ -1018,9 +1020,12 @@ NAPI_METHOD(db_get_many_sync) {
1018
1020
  int32_t highWaterMarkBytes = std::numeric_limits<int32_t>::max();
1019
1021
  NAPI_STATUS_THROWS(GetProperty(env, argv[2], "highWaterMarkBytes", highWaterMarkBytes));
1020
1022
 
1021
- std::vector<rocksdb::Slice> keys{count};
1022
- std::vector<rocksdb::Status> statuses{count};
1023
- std::vector<rocksdb::PinnableSlice> values{count};
1023
+ std::vector<rocksdb::Slice> keys;
1024
+ keys.resize(count);
1025
+ std::vector<rocksdb::Status> statuses;
1026
+ statuses.resize(count);
1027
+ std::vector<rocksdb::PinnableSlice> values;
1028
+ values.resize(count);
1024
1029
 
1025
1030
  for (uint32_t n = 0; n < count; n++) {
1026
1031
  napi_value element;
@@ -1101,9 +1106,10 @@ NAPI_METHOD(db_get_many) {
1101
1106
  readOptions.optimize_multiget_for_io = true;
1102
1107
  readOptions.value_size_soft_limit = highWaterMarkBytes;
1103
1108
 
1104
- std::vector<rocksdb::Slice> keys{count};
1109
+ std::vector<rocksdb::Slice> keys;
1110
+ keys.reserve(count);
1105
1111
  for (uint32_t n = 0; n < count; n++) {
1106
- keys[n] = state.keys[n];
1112
+ keys.emplace_back(state.keys[n]);
1107
1113
  }
1108
1114
 
1109
1115
  state.statuses.resize(count);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nxtedition/rocksdb",
3
- "version": "12.0.5",
3
+ "version": "12.0.7",
4
4
  "description": "A low-level Node.js RocksDB binding",
5
5
  "license": "MIT",
6
6
  "main": "index.js",