@nxtedition/rocksdb 7.0.65 → 7.0.67
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
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
#include <rocksdb/table.h>
|
|
19
19
|
#include <rocksdb/write_batch.h>
|
|
20
20
|
|
|
21
|
+
#include <iostream>
|
|
21
22
|
#include <memory>
|
|
22
23
|
#include <optional>
|
|
23
24
|
#include <set>
|
|
@@ -594,8 +595,12 @@ napi_status InitOptions(napi_env env, T& columnOptions, const U& options) {
|
|
|
594
595
|
std::optional<std::string> mergeOperatorOpt;
|
|
595
596
|
NAPI_STATUS_RETURN(GetProperty(env, options, "mergeOperator", mergeOperatorOpt));
|
|
596
597
|
if (mergeOperatorOpt) {
|
|
597
|
-
|
|
598
|
-
|
|
598
|
+
if (*mergeOperatorOpt == "maxRev") {
|
|
599
|
+
columnOptions.merge_operator = std::make_shared<MaxRevOperator>();
|
|
600
|
+
} else {
|
|
601
|
+
ROCKS_STATUS_RETURN_NAPI(
|
|
602
|
+
rocksdb::MergeOperator::CreateFromString(configOptions, *mergeOperatorOpt, &columnOptions.merge_operator));
|
|
603
|
+
}
|
|
599
604
|
}
|
|
600
605
|
|
|
601
606
|
uint32_t cacheSize = 8 << 20;
|
package/max_rev_operator.h
CHANGED
package/package.json
CHANGED
|
Binary file
|
|
Binary file
|