@nxtedition/rocksdb 7.0.37 → 7.0.38
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 +13 -12
- package/package.json +1 -1
- package/prebuilds/darwin-arm64/node.napi.node +0 -0
package/binding.cc
CHANGED
|
@@ -1845,18 +1845,6 @@ NAPI_METHOD(batch_clear) {
|
|
|
1845
1845
|
return 0;
|
|
1846
1846
|
}
|
|
1847
1847
|
|
|
1848
|
-
NAPI_METHOD(batch_count) {
|
|
1849
|
-
NAPI_ARGV(2);
|
|
1850
|
-
|
|
1851
|
-
rocksdb::WriteBatch* batch;
|
|
1852
|
-
NAPI_STATUS_THROWS(napi_get_value_external(env, argv[1], reinterpret_cast<void**>(&batch)));
|
|
1853
|
-
|
|
1854
|
-
napi_value result;
|
|
1855
|
-
NAPI_STATUS_THROWS(napi_create_bigint_int64(env, batch->Count(), &result));
|
|
1856
|
-
|
|
1857
|
-
return result;
|
|
1858
|
-
}
|
|
1859
|
-
|
|
1860
1848
|
NAPI_METHOD(batch_write) {
|
|
1861
1849
|
NAPI_ARGV(3);
|
|
1862
1850
|
|
|
@@ -1912,6 +1900,18 @@ NAPI_METHOD(batch_merge) {
|
|
|
1912
1900
|
return 0;
|
|
1913
1901
|
}
|
|
1914
1902
|
|
|
1903
|
+
NAPI_METHOD(batch_count) {
|
|
1904
|
+
NAPI_ARGV(2);
|
|
1905
|
+
|
|
1906
|
+
rocksdb::WriteBatch* batch;
|
|
1907
|
+
NAPI_STATUS_THROWS(napi_get_value_external(env, argv[1], reinterpret_cast<void**>(&batch)));
|
|
1908
|
+
|
|
1909
|
+
napi_value result;
|
|
1910
|
+
NAPI_STATUS_THROWS(napi_create_bigint_int64(env, batch->Count(), &result));
|
|
1911
|
+
|
|
1912
|
+
return result;
|
|
1913
|
+
}
|
|
1914
|
+
|
|
1915
1915
|
NAPI_METHOD(db_flush_wal) {
|
|
1916
1916
|
NAPI_ARGV(2);
|
|
1917
1917
|
|
|
@@ -2021,4 +2021,5 @@ NAPI_INIT() {
|
|
|
2021
2021
|
NAPI_EXPORT_FUNCTION(batch_write);
|
|
2022
2022
|
NAPI_EXPORT_FUNCTION(batch_put_log_data);
|
|
2023
2023
|
NAPI_EXPORT_FUNCTION(batch_merge);
|
|
2024
|
+
NAPI_EXPORT_FUNCTION(batch_count);
|
|
2024
2025
|
}
|
package/package.json
CHANGED
|
Binary file
|