@nxtedition/rocksdb 11.0.0 → 11.0.2
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
|
@@ -889,6 +889,9 @@ NAPI_METHOD(db_get_many) {
|
|
|
889
889
|
Encoding valueEncoding = Encoding::Buffer;
|
|
890
890
|
NAPI_STATUS_THROWS(GetProperty(env, argv[2], "valueEncoding", valueEncoding));
|
|
891
891
|
|
|
892
|
+
int32_t highWaterMarkBytes = std::numeric_limits<int32_t>::max();
|
|
893
|
+
NAPI_STATUS_THROWS(GetProperty(env, argv[2], "highWaterMarkBytes", highWaterMarkBytes));
|
|
894
|
+
|
|
892
895
|
std::vector<rocksdb::Slice> keys{count};
|
|
893
896
|
std::vector<rocksdb::Status> statuses{count};
|
|
894
897
|
std::vector<rocksdb::PinnableSlice> values{count};
|
|
@@ -903,6 +906,7 @@ NAPI_METHOD(db_get_many) {
|
|
|
903
906
|
readOptions.fill_cache = fillCache;
|
|
904
907
|
readOptions.async_io = true;
|
|
905
908
|
readOptions.optimize_multiget_for_io = true;
|
|
909
|
+
readOptions.value_size_soft_limit = highWaterMarkBytes;
|
|
906
910
|
|
|
907
911
|
database->db->MultiGet(readOptions, column, count, keys.data(), values.data(), statuses.data());
|
|
908
912
|
|
|
@@ -915,6 +919,8 @@ NAPI_METHOD(db_get_many) {
|
|
|
915
919
|
for (auto n = 0; n < count; n++) {
|
|
916
920
|
napi_value row;
|
|
917
921
|
if (statuses[n].IsNotFound()) {
|
|
922
|
+
NAPI_STATUS_THROWS(napi_get_null(env, &row));
|
|
923
|
+
} else if (statuses[n].IsAborted()) {
|
|
918
924
|
NAPI_STATUS_THROWS(napi_get_undefined(env, &row));
|
|
919
925
|
} else {
|
|
920
926
|
ROCKS_STATUS_THROWS_NAPI(statuses[n]);
|
package/package.json
CHANGED
|
Binary file
|
|
Binary file
|