@nxtedition/rocksdb 12.1.2 → 12.1.4
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
|
@@ -17,8 +17,6 @@
|
|
|
17
17
|
#include <rocksdb/status.h>
|
|
18
18
|
#include <rocksdb/table.h>
|
|
19
19
|
#include <rocksdb/write_batch.h>
|
|
20
|
-
#include <folly/FBVector.h>
|
|
21
|
-
#include <folly/small_vector.h>
|
|
22
20
|
|
|
23
21
|
#include <iostream>
|
|
24
22
|
#include <memory>
|
|
@@ -26,6 +24,7 @@
|
|
|
26
24
|
#include <set>
|
|
27
25
|
#include <string>
|
|
28
26
|
#include <thread>
|
|
27
|
+
#include <vector>
|
|
29
28
|
|
|
30
29
|
#include "max_rev_operator.h"
|
|
31
30
|
#include "util.h"
|
|
@@ -272,7 +271,7 @@ struct BatchIterator : public rocksdb::WriteBatch::Handler {
|
|
|
272
271
|
const rocksdb::ColumnFamilyHandle* column_;
|
|
273
272
|
const Encoding keyEncoding_;
|
|
274
273
|
const Encoding valueEncoding_;
|
|
275
|
-
|
|
274
|
+
std::vector<BatchEntry> cache_;
|
|
276
275
|
};
|
|
277
276
|
|
|
278
277
|
struct BaseIterator : public Closable {
|
|
@@ -500,8 +499,8 @@ class Iterator final : public BaseIterator {
|
|
|
500
499
|
|
|
501
500
|
napi_value nextv(napi_env env, uint32_t count, napi_value callback) {
|
|
502
501
|
struct State {
|
|
503
|
-
|
|
504
|
-
|
|
502
|
+
std::vector<rocksdb::PinnableSlice> keys;
|
|
503
|
+
std::vector<rocksdb::PinnableSlice> values;
|
|
505
504
|
size_t count = 0;
|
|
506
505
|
bool finished = false;
|
|
507
506
|
};
|
|
@@ -1130,11 +1129,11 @@ NAPI_METHOD(db_get_many_sync) {
|
|
|
1130
1129
|
bool unsafe = false;
|
|
1131
1130
|
NAPI_STATUS_THROWS(GetProperty(env, argv[2], "unsafe", unsafe));
|
|
1132
1131
|
|
|
1133
|
-
|
|
1132
|
+
std::vector<rocksdb::Slice> keys;
|
|
1134
1133
|
keys.resize(count);
|
|
1135
|
-
|
|
1134
|
+
std::vector<rocksdb::Status> statuses;
|
|
1136
1135
|
statuses.resize(count);
|
|
1137
|
-
|
|
1136
|
+
std::vector<rocksdb::PinnableSlice> values;
|
|
1138
1137
|
values.resize(count);
|
|
1139
1138
|
|
|
1140
1139
|
for (uint32_t n = 0; n < count; n++) {
|
|
@@ -1204,9 +1203,9 @@ NAPI_METHOD(db_get_many) {
|
|
|
1204
1203
|
auto callback = argv[3];
|
|
1205
1204
|
|
|
1206
1205
|
struct State {
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1206
|
+
std::vector<rocksdb::Status> statuses;
|
|
1207
|
+
std::vector<rocksdb::PinnableSlice> values;
|
|
1208
|
+
std::vector<rocksdb::PinnableSlice> keys;
|
|
1210
1209
|
} state;
|
|
1211
1210
|
|
|
1212
1211
|
state.keys.resize(count);
|
|
@@ -1226,7 +1225,7 @@ NAPI_METHOD(db_get_many) {
|
|
|
1226
1225
|
readOptions.optimize_multiget_for_io = true;
|
|
1227
1226
|
readOptions.value_size_soft_limit = highWaterMarkBytes;
|
|
1228
1227
|
|
|
1229
|
-
|
|
1228
|
+
std::vector<rocksdb::Slice> keys;
|
|
1230
1229
|
keys.reserve(count);
|
|
1231
1230
|
for (uint32_t n = 0; n < count; n++) {
|
|
1232
1231
|
keys.emplace_back(state.keys[n]);
|
package/binding.gyp
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nxtedition/rocksdb",
|
|
3
|
-
"version": "12.1.
|
|
3
|
+
"version": "12.1.4",
|
|
4
4
|
"description": "A low-level Node.js RocksDB binding",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "index.js",
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
"install": "node-gyp-build",
|
|
9
9
|
"test": "standard && (nyc -s tape test/*-test.js | faucet) && nyc report",
|
|
10
10
|
"test-prebuild": "cross-env PREBUILDS_ONLY=1 npm t",
|
|
11
|
+
"prebuildify": "JOBS=8 prebuildify --napi --strip",
|
|
11
12
|
"rebuild": "JOBS=8 npm run install --build-from-source"
|
|
12
13
|
},
|
|
13
14
|
"dependencies": {
|
|
@@ -15,7 +16,8 @@
|
|
|
15
16
|
"catering": "^2.1.1",
|
|
16
17
|
"module-error": "^1.0.2",
|
|
17
18
|
"napi-macros": "~2.2.2",
|
|
18
|
-
"node-gyp-build": "^4.8.2"
|
|
19
|
+
"node-gyp-build": "^4.8.2",
|
|
20
|
+
"prebuildify": "^6.0.1"
|
|
19
21
|
},
|
|
20
22
|
"devDependencies": {
|
|
21
23
|
"@types/node": "^22.7.4",
|
|
Binary file
|
|
Binary file
|