@nxtedition/rocksdb 12.0.4 → 12.0.6

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
  }
package/index.js CHANGED
@@ -152,10 +152,6 @@ class RocksLevel extends AbstractLevel {
152
152
  }
153
153
 
154
154
  _getMany (keys, options, callback) {
155
- if (keys.some(key => typeof key === 'string')) {
156
- keys = keys.map(key => typeof key === 'string' ? Buffer.from(key) : key)
157
- }
158
-
159
155
  callback = fromCallback(callback, kPromise)
160
156
 
161
157
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nxtedition/rocksdb",
3
- "version": "12.0.4",
3
+ "version": "12.0.6",
4
4
  "description": "A low-level Node.js RocksDB binding",
5
5
  "license": "MIT",
6
6
  "main": "index.js",
package/util.h CHANGED
@@ -133,10 +133,6 @@ static napi_status GetString(napi_env env, napi_value from, std::string& to) {
133
133
  return napi_ok;
134
134
  }
135
135
 
136
- void CleanupString(void* env, void* ref) {
137
- napi_delete_reference(static_cast<napi_env>(env), static_cast<napi_ref>(ref));
138
- }
139
-
140
136
  static napi_status GetString(napi_env env, napi_value from, rocksdb::PinnableSlice& to) {
141
137
  napi_valuetype type;
142
138
  NAPI_STATUS_RETURN(napi_typeof(env, from, &type));
@@ -156,8 +152,7 @@ static napi_status GetString(napi_env env, napi_value from, rocksdb::PinnableSli
156
152
  size_t length = 0;
157
153
  napi_ref ref;
158
154
  NAPI_STATUS_RETURN(napi_get_buffer_info(env, from, reinterpret_cast<void**>(&buf), &length));
159
- NAPI_STATUS_RETURN(napi_create_reference(env, from, 1, &ref));
160
- to.PinSlice(rocksdb::Slice{buf,length}, CleanupString, env, ref);
155
+ to.PinSelf(rocksdb::Slice{buf,length});
161
156
  } else {
162
157
  return napi_invalid_arg;
163
158
  }