@nxtedition/rocksdb 8.1.16 → 8.2.0-alpha.1

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
@@ -468,7 +468,13 @@ static void FinalizeDatabase(napi_env env, void* data, void* hint) {
468
468
  }
469
469
  }
470
470
 
471
+ #include <liburing.h>
472
+ #include <iostream>
473
+
471
474
  NAPI_METHOD(db_init) {
475
+ struct io_uring* new_io_uring = new struct io_uring;
476
+ std::cerr << "###############" << io_uring_queue_init(256, new_io_uring, 0);
477
+
472
478
  auto database = new Database();
473
479
  napi_add_env_cleanup_hook(env, env_cleanup_hook, database);
474
480
 
@@ -1634,6 +1640,7 @@ NAPI_METHOD(db_flush_wal) {
1634
1640
  return 0;
1635
1641
  }
1636
1642
 
1643
+
1637
1644
  NAPI_INIT() {
1638
1645
  NAPI_EXPORT_FUNCTION(db_init);
1639
1646
  NAPI_EXPORT_FUNCTION(db_open);
package/binding.gyp CHANGED
@@ -46,8 +46,11 @@
46
46
  }
47
47
  ]
48
48
  ],
49
- "dependencies": ["<(module_root_dir)/deps/rocksdb/rocksdb.gyp:rocksdb"],
50
- "include_dirs": ["<!(node -e \"require('napi-macros')\")"],
49
+ "dependencies": [
50
+ "<(module_root_dir)/deps/rocksdb/rocksdb.gyp:rocksdb",
51
+ "<(module_root_dir)/deps/liburing/liburing.gyp:liburing"
52
+ ],
53
+ "include_dirs": ["<!(node -e \"require('napi-macros')\")",],
51
54
  "sources": ["binding.cc"]
52
55
  }
53
56
  ]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nxtedition/rocksdb",
3
- "version": "8.1.16",
3
+ "version": "8.2.0-alpha.1",
4
4
  "description": "A low-level Node.js RocksDB binding",
5
5
  "license": "MIT",
6
6
  "main": "index.js",
Binary file
package/tmp/test.js ADDED
@@ -0,0 +1,7 @@
1
+ 'use strict'
2
+
3
+ const tempy = require('tempy')
4
+ const { RocksLevel } = require('@nxtedition/rocksdb')
5
+
6
+ const db = new RocksLevel(tempy.directory(), {})
7
+ db.open().then(() => db.close())