@nxtedition/rocksdb 11.1.7 → 11.1.8

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
@@ -1531,49 +1531,6 @@ NAPI_METHOD(regex_test) {
1531
1531
  }
1532
1532
  }
1533
1533
 
1534
- NAPI_METHOD(regex_test_many) {
1535
- NAPI_ARGV(2);
1536
-
1537
- boost::regex* regex;
1538
- NAPI_STATUS_THROWS(napi_get_value_external(env, argv[0], reinterpret_cast<void**>(&regex)));
1539
-
1540
- uint32_t count;
1541
- NAPI_STATUS_THROWS(napi_get_array_length(env, argv[1], &count));
1542
-
1543
- napi_value result;
1544
- NAPI_STATUS_THROWS(napi_create_array_with_length(env, count, &result));
1545
-
1546
- try {
1547
- std::vector<rocksdb::Slice> keys;
1548
- keys.resize(count);
1549
-
1550
- std::vector<bool> matches;
1551
- matches.resize(count);
1552
-
1553
- for (uint32_t n = 0; n < count; n++) {
1554
- napi_value valueElement;
1555
- NAPI_STATUS_THROWS(napi_get_element(env, argv[1], n, &valueElement));
1556
- NAPI_STATUS_THROWS(GetValue(env, valueElement, keys[n]))
1557
- }
1558
-
1559
- for (uint32_t n = 0; n < count; n++) {
1560
- matches[n] = boost::regex_search(keys[n].data(), keys[n].data() + keys[n].size(), *regex);
1561
- }
1562
-
1563
- for (uint32_t n = 0; n < count; n++) {
1564
- napi_value element;
1565
- NAPI_STATUS_THROWS(napi_get_boolean(env, matches[n], &element));
1566
- NAPI_STATUS_THROWS(napi_set_element(env, result, n, element));
1567
- }
1568
-
1569
- return result;
1570
- } catch (const std::exception& e) {
1571
- napi_throw_error(env, nullptr, e.what());
1572
- return 0;
1573
- }
1574
- }
1575
-
1576
-
1577
1534
  NAPI_INIT() {
1578
1535
  NAPI_EXPORT_FUNCTION(db_init);
1579
1536
  NAPI_EXPORT_FUNCTION(db_open);
@@ -1603,6 +1560,5 @@ NAPI_INIT() {
1603
1560
  NAPI_EXPORT_FUNCTION(batch_iterate);
1604
1561
 
1605
1562
  NAPI_EXPORT_FUNCTION(regex_init);
1606
- NAPI_EXPORT_FUNCTION(regex_test_many);
1607
1563
  NAPI_EXPORT_FUNCTION(regex_test);
1608
1564
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nxtedition/rocksdb",
3
- "version": "11.1.7",
3
+ "version": "11.1.8",
4
4
  "description": "A low-level Node.js RocksDB binding",
5
5
  "license": "MIT",
6
6
  "main": "index.js",
package/regex.js CHANGED
@@ -20,10 +20,6 @@ class Regex {
20
20
 
21
21
  return binding.regex_test(this.#context, buffer, byteOffset, byteLength)
22
22
  }
23
-
24
- testMany (values) {
25
- return binding.regex_test_many(this.#context, values)
26
- }
27
23
  }
28
24
 
29
25
  exports.Regex = Regex