@nxtedition/rocksdb 5.2.26 → 5.2.27

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.gyp CHANGED
@@ -27,7 +27,7 @@
27
27
  }
28
28
  },
29
29
  {
30
- "cflags": ["-std=c++17"],
30
+ "cflags": ["-std=c++20"],
31
31
  "cflags!": ["-fno-rtti"],
32
32
  "cflags_cc!": ["-fno-rtti"],
33
33
  "cflags_cc+": ["-frtti"]
package/chained-batch.js CHANGED
@@ -27,11 +27,10 @@ class ChainedBatch extends AbstractChainedBatch {
27
27
  }
28
28
 
29
29
  _write (options, callback) {
30
- binding.batch_write(this[kDbContext], this[kBatchContext], options, callback)
30
+ process.nextTick(callback, binding.batch_write(this[kDbContext], this[kBatchContext], options))
31
31
  }
32
32
 
33
33
  _close (callback) {
34
- // TODO: close native batch (currently done on GC)
35
34
  process.nextTick(callback)
36
35
  }
37
36
  }
@@ -0,0 +1,7 @@
1
+ macro(get_cxx_std_flags FLAGS_VARIABLE)
2
+ if( CMAKE_CXX_STANDARD_REQUIRED )
3
+ set(${FLAGS_VARIABLE} ${CMAKE_CXX${CMAKE_CXX_STANDARD}_STANDARD_COMPILE_OPTION})
4
+ else()
5
+ set(${FLAGS_VARIABLE} ${CMAKE_CXX${CMAKE_CXX_STANDARD}_EXTENSION_COMPILE_OPTION})
6
+ endif()
7
+ endmacro()
@@ -0,0 +1,29 @@
1
+ # - Find JeMalloc library
2
+ # Find the native JeMalloc includes and library
3
+ #
4
+ # JeMalloc_INCLUDE_DIRS - where to find jemalloc.h, etc.
5
+ # JeMalloc_LIBRARIES - List of libraries when using jemalloc.
6
+ # JeMalloc_FOUND - True if jemalloc found.
7
+
8
+ find_path(JeMalloc_INCLUDE_DIRS
9
+ NAMES jemalloc/jemalloc.h
10
+ HINTS ${JEMALLOC_ROOT_DIR}/include)
11
+
12
+ find_library(JeMalloc_LIBRARIES
13
+ NAMES jemalloc
14
+ HINTS ${JEMALLOC_ROOT_DIR}/lib)
15
+
16
+ include(FindPackageHandleStandardArgs)
17
+ find_package_handle_standard_args(JeMalloc DEFAULT_MSG JeMalloc_LIBRARIES JeMalloc_INCLUDE_DIRS)
18
+
19
+ mark_as_advanced(
20
+ JeMalloc_LIBRARIES
21
+ JeMalloc_INCLUDE_DIRS)
22
+
23
+ if(JeMalloc_FOUND AND NOT (TARGET JeMalloc::JeMalloc))
24
+ add_library (JeMalloc::JeMalloc UNKNOWN IMPORTED)
25
+ set_target_properties(JeMalloc::JeMalloc
26
+ PROPERTIES
27
+ IMPORTED_LOCATION ${JeMalloc_LIBRARIES}
28
+ INTERFACE_INCLUDE_DIRECTORIES ${JeMalloc_INCLUDE_DIRS})
29
+ endif()
@@ -0,0 +1,29 @@
1
+ # - Find NUMA
2
+ # Find the NUMA library and includes
3
+ #
4
+ # NUMA_INCLUDE_DIRS - where to find numa.h, etc.
5
+ # NUMA_LIBRARIES - List of libraries when using NUMA.
6
+ # NUMA_FOUND - True if NUMA found.
7
+
8
+ find_path(NUMA_INCLUDE_DIRS
9
+ NAMES numa.h numaif.h
10
+ HINTS ${NUMA_ROOT_DIR}/include)
11
+
12
+ find_library(NUMA_LIBRARIES
13
+ NAMES numa
14
+ HINTS ${NUMA_ROOT_DIR}/lib)
15
+
16
+ include(FindPackageHandleStandardArgs)
17
+ find_package_handle_standard_args(NUMA DEFAULT_MSG NUMA_LIBRARIES NUMA_INCLUDE_DIRS)
18
+
19
+ mark_as_advanced(
20
+ NUMA_LIBRARIES
21
+ NUMA_INCLUDE_DIRS)
22
+
23
+ if(NUMA_FOUND AND NOT (TARGET NUMA::NUMA))
24
+ add_library (NUMA::NUMA UNKNOWN IMPORTED)
25
+ set_target_properties(NUMA::NUMA
26
+ PROPERTIES
27
+ IMPORTED_LOCATION ${NUMA_LIBRARIES}
28
+ INTERFACE_INCLUDE_DIRECTORIES ${NUMA_INCLUDE_DIRS})
29
+ endif()
@@ -0,0 +1,29 @@
1
+ # - Find Snappy
2
+ # Find the snappy compression library and includes
3
+ #
4
+ # Snappy_INCLUDE_DIRS - where to find snappy.h, etc.
5
+ # Snappy_LIBRARIES - List of libraries when using snappy.
6
+ # Snappy_FOUND - True if snappy found.
7
+
8
+ find_path(Snappy_INCLUDE_DIRS
9
+ NAMES snappy.h
10
+ HINTS ${snappy_ROOT_DIR}/include)
11
+
12
+ find_library(Snappy_LIBRARIES
13
+ NAMES snappy
14
+ HINTS ${snappy_ROOT_DIR}/lib)
15
+
16
+ include(FindPackageHandleStandardArgs)
17
+ find_package_handle_standard_args(Snappy DEFAULT_MSG Snappy_LIBRARIES Snappy_INCLUDE_DIRS)
18
+
19
+ mark_as_advanced(
20
+ Snappy_LIBRARIES
21
+ Snappy_INCLUDE_DIRS)
22
+
23
+ if(Snappy_FOUND AND NOT (TARGET Snappy::snappy))
24
+ add_library (Snappy::snappy UNKNOWN IMPORTED)
25
+ set_target_properties(Snappy::snappy
26
+ PROPERTIES
27
+ IMPORTED_LOCATION ${Snappy_LIBRARIES}
28
+ INTERFACE_INCLUDE_DIRECTORIES ${Snappy_INCLUDE_DIRS})
29
+ endif()
@@ -0,0 +1,33 @@
1
+ # - Find TBB
2
+ # Find the Thread Building Blocks library and includes
3
+ #
4
+ # TBB_INCLUDE_DIRS - where to find tbb.h, etc.
5
+ # TBB_LIBRARIES - List of libraries when using TBB.
6
+ # TBB_FOUND - True if TBB found.
7
+
8
+ if(NOT DEFINED TBB_ROOT_DIR)
9
+ set(TBB_ROOT_DIR "$ENV{TBBROOT}")
10
+ endif()
11
+
12
+ find_path(TBB_INCLUDE_DIRS
13
+ NAMES tbb/tbb.h
14
+ HINTS ${TBB_ROOT_DIR}/include)
15
+
16
+ find_library(TBB_LIBRARIES
17
+ NAMES tbb
18
+ HINTS ${TBB_ROOT_DIR}/lib ENV LIBRARY_PATH)
19
+
20
+ include(FindPackageHandleStandardArgs)
21
+ find_package_handle_standard_args(TBB DEFAULT_MSG TBB_LIBRARIES TBB_INCLUDE_DIRS)
22
+
23
+ mark_as_advanced(
24
+ TBB_LIBRARIES
25
+ TBB_INCLUDE_DIRS)
26
+
27
+ if(TBB_FOUND AND NOT (TARGET TBB::TBB))
28
+ add_library (TBB::TBB UNKNOWN IMPORTED)
29
+ set_target_properties(TBB::TBB
30
+ PROPERTIES
31
+ IMPORTED_LOCATION ${TBB_LIBRARIES}
32
+ INTERFACE_INCLUDE_DIRECTORIES ${TBB_INCLUDE_DIRS})
33
+ endif()
@@ -0,0 +1,29 @@
1
+ # - Find gflags library
2
+ # Find the gflags includes and library
3
+ #
4
+ # GFLAGS_INCLUDE_DIR - where to find gflags.h.
5
+ # GFLAGS_LIBRARIES - List of libraries when using gflags.
6
+ # gflags_FOUND - True if gflags found.
7
+
8
+ find_path(GFLAGS_INCLUDE_DIR
9
+ NAMES gflags/gflags.h)
10
+
11
+ find_library(GFLAGS_LIBRARIES
12
+ NAMES gflags)
13
+
14
+ include(FindPackageHandleStandardArgs)
15
+ find_package_handle_standard_args(gflags
16
+ DEFAULT_MSG GFLAGS_LIBRARIES GFLAGS_INCLUDE_DIR)
17
+
18
+ mark_as_advanced(
19
+ GFLAGS_LIBRARIES
20
+ GFLAGS_INCLUDE_DIR)
21
+
22
+ if(gflags_FOUND AND NOT (TARGET gflags::gflags))
23
+ add_library(gflags::gflags UNKNOWN IMPORTED)
24
+ set_target_properties(gflags::gflags
25
+ PROPERTIES
26
+ IMPORTED_LOCATION ${GFLAGS_LIBRARIES}
27
+ INTERFACE_INCLUDE_DIRECTORIES ${GFLAGS_INCLUDE_DIR}
28
+ IMPORTED_LINK_INTERFACE_LANGUAGES "CXX")
29
+ endif()
@@ -0,0 +1,29 @@
1
+ # - Find Lz4
2
+ # Find the lz4 compression library and includes
3
+ #
4
+ # lz4_INCLUDE_DIRS - where to find lz4.h, etc.
5
+ # lz4_LIBRARIES - List of libraries when using lz4.
6
+ # lz4_FOUND - True if lz4 found.
7
+
8
+ find_path(lz4_INCLUDE_DIRS
9
+ NAMES lz4.h
10
+ HINTS ${lz4_ROOT_DIR}/include)
11
+
12
+ find_library(lz4_LIBRARIES
13
+ NAMES lz4
14
+ HINTS ${lz4_ROOT_DIR}/lib)
15
+
16
+ include(FindPackageHandleStandardArgs)
17
+ find_package_handle_standard_args(lz4 DEFAULT_MSG lz4_LIBRARIES lz4_INCLUDE_DIRS)
18
+
19
+ mark_as_advanced(
20
+ lz4_LIBRARIES
21
+ lz4_INCLUDE_DIRS)
22
+
23
+ if(lz4_FOUND AND NOT (TARGET lz4::lz4))
24
+ add_library(lz4::lz4 UNKNOWN IMPORTED)
25
+ set_target_properties(lz4::lz4
26
+ PROPERTIES
27
+ IMPORTED_LOCATION ${lz4_LIBRARIES}
28
+ INTERFACE_INCLUDE_DIRECTORIES ${lz4_INCLUDE_DIRS})
29
+ endif()
@@ -0,0 +1,26 @@
1
+ # - Find liburing
2
+ #
3
+ # uring_INCLUDE_DIR - Where to find liburing.h
4
+ # uring_LIBRARIES - List of libraries when using uring.
5
+ # uring_FOUND - True if uring found.
6
+
7
+ find_path(uring_INCLUDE_DIR
8
+ NAMES liburing.h)
9
+ find_library(uring_LIBRARIES
10
+ NAMES liburing.a liburing)
11
+
12
+ include(FindPackageHandleStandardArgs)
13
+ find_package_handle_standard_args(uring
14
+ DEFAULT_MSG uring_LIBRARIES uring_INCLUDE_DIR)
15
+
16
+ mark_as_advanced(
17
+ uring_INCLUDE_DIR
18
+ uring_LIBRARIES)
19
+
20
+ if(uring_FOUND AND NOT TARGET uring::uring)
21
+ add_library(uring::uring UNKNOWN IMPORTED)
22
+ set_target_properties(uring::uring PROPERTIES
23
+ INTERFACE_INCLUDE_DIRECTORIES "${uring_INCLUDE_DIR}"
24
+ IMPORTED_LINK_INTERFACE_LANGUAGES "C"
25
+ IMPORTED_LOCATION "${uring_LIBRARIES}")
26
+ endif()
@@ -0,0 +1,29 @@
1
+ # - Find zstd
2
+ # Find the zstd compression library and includes
3
+ #
4
+ # zstd_INCLUDE_DIRS - where to find zstd.h, etc.
5
+ # zstd_LIBRARIES - List of libraries when using zstd.
6
+ # zstd_FOUND - True if zstd found.
7
+
8
+ find_path(zstd_INCLUDE_DIRS
9
+ NAMES zstd.h
10
+ HINTS ${zstd_ROOT_DIR}/include)
11
+
12
+ find_library(zstd_LIBRARIES
13
+ NAMES zstd
14
+ HINTS ${zstd_ROOT_DIR}/lib)
15
+
16
+ include(FindPackageHandleStandardArgs)
17
+ find_package_handle_standard_args(zstd DEFAULT_MSG zstd_LIBRARIES zstd_INCLUDE_DIRS)
18
+
19
+ mark_as_advanced(
20
+ zstd_LIBRARIES
21
+ zstd_INCLUDE_DIRS)
22
+
23
+ if(zstd_FOUND AND NOT (TARGET zstd::zstd))
24
+ add_library (zstd::zstd UNKNOWN IMPORTED)
25
+ set_target_properties(zstd::zstd
26
+ PROPERTIES
27
+ IMPORTED_LOCATION ${zstd_LIBRARIES}
28
+ INTERFACE_INCLUDE_DIRECTORIES ${zstd_INCLUDE_DIRS})
29
+ endif()
@@ -0,0 +1,10 @@
1
+ # Read rocksdb version from version.h header file.
2
+
3
+ function(get_rocksdb_version version_var)
4
+ file(READ "${CMAKE_CURRENT_SOURCE_DIR}/include/rocksdb/version.h" version_header_file)
5
+ foreach(component MAJOR MINOR PATCH)
6
+ string(REGEX MATCH "#define ROCKSDB_${component} ([0-9]+)" _ ${version_header_file})
7
+ set(ROCKSDB_VERSION_${component} ${CMAKE_MATCH_1})
8
+ endforeach()
9
+ set(${version_var} "${ROCKSDB_VERSION_MAJOR}.${ROCKSDB_VERSION_MINOR}.${ROCKSDB_VERSION_PATCH}" PARENT_SCOPE)
10
+ endfunction()
@@ -67,7 +67,7 @@
67
67
  "-momit-leaf-frame-pointer",
68
68
  "-fno-builtin-memcmp"
69
69
  ],
70
- "cflags": ["-std=c++17"],
70
+ "cflags": ["-std=c++20"],
71
71
  "cflags!": ["-fno-rtti"],
72
72
  "cflags_cc!": ["-fno-rtti"],
73
73
  "cflags_cc+": ["-frtti"]
@@ -325,13 +325,13 @@
325
325
  "rocksdb/test_util/sync_point_impl.cc",
326
326
  "rocksdb/test_util/testutil.cc",
327
327
  "rocksdb/test_util/transaction_test_util.cc",
328
- "rocksdb/tools/block_cache_analyzer/block_cache_trace_analyzer.cc",
329
- "rocksdb/tools/dump/db_dump_tool.cc",
330
- "rocksdb/tools/io_tracer_parser_tool.cc",
331
- "rocksdb/tools/ldb_cmd.cc",
332
- "rocksdb/tools/ldb_tool.cc",
333
- "rocksdb/tools/sst_dump_tool.cc",
334
- "rocksdb/tools/trace_analyzer_tool.cc",
328
+ # "rocksdb/tools/block_cache_analyzer/block_cache_trace_analyzer.cc",
329
+ # "rocksdb/tools/dump/db_dump_tool.cc",
330
+ # "rocksdb/tools/io_tracer_parser_tool.cc",
331
+ # "rocksdb/tools/ldb_cmd.cc",
332
+ # "rocksdb/tools/ldb_tool.cc",
333
+ # "rocksdb/tools/sst_dump_tool.cc",
334
+ # "rocksdb/tools/trace_analyzer_tool.cc",
335
335
  "rocksdb/trace_replay/block_cache_tracer.cc",
336
336
  "rocksdb/trace_replay/io_tracer.cc",
337
337
  "rocksdb/trace_replay/trace_record_handler.cc",
@@ -361,12 +361,12 @@
361
361
  "rocksdb/util/xxhash.cc",
362
362
  "rocksdb/utilities/agg_merge/agg_merge.cc",
363
363
  "rocksdb/utilities/backup/backup_engine.cc",
364
- "rocksdb/utilities/blob_db/blob_compaction_filter.cc",
365
- "rocksdb/utilities/blob_db/blob_db.cc",
366
- "rocksdb/utilities/blob_db/blob_db_impl.cc",
367
- "rocksdb/utilities/blob_db/blob_db_impl_filesnapshot.cc",
368
- "rocksdb/utilities/blob_db/blob_dump_tool.cc",
369
- "rocksdb/utilities/blob_db/blob_file.cc",
364
+ # "rocksdb/utilities/blob_db/blob_compaction_filter.cc",
365
+ # "rocksdb/utilities/blob_db/blob_db.cc",
366
+ # "rocksdb/utilities/blob_db/blob_db_impl.cc",
367
+ # "rocksdb/utilities/blob_db/blob_db_impl_filesnapshot.cc",
368
+ # "rocksdb/utilities/blob_db/blob_dump_tool.cc",
369
+ # "rocksdb/utilities/blob_db/blob_file.cc",
370
370
  "rocksdb/utilities/cache_dump_load.cc",
371
371
  "rocksdb/utilities/cache_dump_load_impl.cc",
372
372
  "rocksdb/utilities/checkpoint/checkpoint_impl.cc",
@@ -374,11 +374,11 @@
374
374
  "rocksdb/utilities/compaction_filters/remove_emptyvalue_compactionfilter.cc",
375
375
  "rocksdb/utilities/counted_fs.cc",
376
376
  "rocksdb/utilities/debug.cc",
377
- "rocksdb/utilities/env_mirror.cc",
378
- "rocksdb/utilities/env_timed.cc",
379
- "rocksdb/utilities/fault_injection_env.cc",
380
- "rocksdb/utilities/fault_injection_fs.cc",
381
- "rocksdb/utilities/fault_injection_secondary_cache.cc",
377
+ # "rocksdb/utilities/env_mirror.cc",
378
+ # "rocksdb/utilities/env_timed.cc",
379
+ # "rocksdb/utilities/fault_injection_env.cc",
380
+ # "rocksdb/utilities/fault_injection_fs.cc",
381
+ # "rocksdb/utilities/fault_injection_secondary_cache.cc",
382
382
  "rocksdb/utilities/leveldb_options/leveldb_options.cc",
383
383
  "rocksdb/utilities/memory/memory_util.cc",
384
384
  "rocksdb/utilities/merge_operators.cc",
@@ -392,13 +392,13 @@
392
392
  "rocksdb/utilities/object_registry.cc",
393
393
  "rocksdb/utilities/option_change_migration/option_change_migration.cc",
394
394
  "rocksdb/utilities/options/options_util.cc",
395
- "rocksdb/utilities/persistent_cache/block_cache_tier.cc",
396
- "rocksdb/utilities/persistent_cache/block_cache_tier_file.cc",
397
- "rocksdb/utilities/persistent_cache/block_cache_tier_metadata.cc",
398
- "rocksdb/utilities/persistent_cache/persistent_cache_tier.cc",
399
- "rocksdb/utilities/persistent_cache/volatile_tier_impl.cc",
400
- "rocksdb/utilities/simulator_cache/cache_simulator.cc",
401
- "rocksdb/utilities/simulator_cache/sim_cache.cc",
395
+ # "rocksdb/utilities/persistent_cache/block_cache_tier.cc",
396
+ # "rocksdb/utilities/persistent_cache/block_cache_tier_file.cc",
397
+ # "rocksdb/utilities/persistent_cache/block_cache_tier_metadata.cc",
398
+ # "rocksdb/utilities/persistent_cache/persistent_cache_tier.cc",
399
+ # "rocksdb/utilities/persistent_cache/volatile_tier_impl.cc",
400
+ # "rocksdb/utilities/simulator_cache/cache_simulator.cc",
401
+ # "rocksdb/utilities/simulator_cache/sim_cache.cc",
402
402
  "rocksdb/utilities/table_properties_collectors/compact_on_deletion_collector.cc",
403
403
  "rocksdb/utilities/trace/file_trace_reader_writer.cc",
404
404
  "rocksdb/utilities/trace/replayer_impl.cc",
package/index.js CHANGED
@@ -2,13 +2,11 @@
2
2
 
3
3
  const { AbstractLevel } = require('abstract-level')
4
4
  const ModuleError = require('module-error')
5
- const { fromCallback } = require('catering')
6
5
  const fs = require('fs')
7
6
  const binding = require('./binding')
8
7
  const { ChainedBatch } = require('./chained-batch')
9
8
  const { Iterator } = require('./iterator')
10
9
 
11
- const kPromise = Symbol('promise')
12
10
  const kContext = Symbol('context')
13
11
  const kLocation = Symbol('location')
14
12
 
@@ -32,11 +30,7 @@ class RocksLevel extends AbstractLevel {
32
30
  },
33
31
  seek: true,
34
32
  createIfMissing: true,
35
- errorIfExists: true,
36
- additionalMethods: {
37
- approximateSize: true,
38
- compactRange: true
39
- }
33
+ errorIfExists: true
40
34
  }, options)
41
35
 
42
36
  this[kLocation] = location
@@ -63,7 +57,7 @@ class RocksLevel extends AbstractLevel {
63
57
  }
64
58
 
65
59
  _put (key, value, options, callback) {
66
- binding.db_put(this[kContext], key, value, options, callback)
60
+ process.nextTick(callback, binding.db_put(this[kContext], key, value, options))
67
61
  }
68
62
 
69
63
  _get (key, options, callback) {
@@ -75,11 +69,11 @@ class RocksLevel extends AbstractLevel {
75
69
  }
76
70
 
77
71
  _del (key, options, callback) {
78
- binding.db_del(this[kContext], key, options, callback)
72
+ process.nextTick(callback, binding.db_del(this[kContext], key, options))
79
73
  }
80
74
 
81
75
  _clear (options, callback) {
82
- binding.db_clear(this[kContext], options, callback)
76
+ process.nextTick(callback, binding.db_clear(this[kContext], options))
83
77
  }
84
78
 
85
79
  _chainedBatch () {
@@ -87,63 +81,7 @@ class RocksLevel extends AbstractLevel {
87
81
  }
88
82
 
89
83
  _batch (operations, options, callback) {
90
- binding.batch_do(this[kContext], operations, options, callback)
91
- }
92
-
93
- approximateSize (start, end, options, callback) {
94
- if (arguments.length < 2 || typeof start === 'function' || typeof end === 'function') {
95
- throw new TypeError("The arguments 'start' and 'end' are required")
96
- } else if (typeof options === 'function') {
97
- callback = options
98
- options = null
99
- } else if (typeof options !== 'object') {
100
- options = null
101
- }
102
-
103
- callback = fromCallback(callback, kPromise)
104
-
105
- if (this.status === 'opening') {
106
- this.defer(() => this.approximateSize(start, end, options, callback))
107
- } else if (this.status !== 'open') {
108
- this.nextTick(callback, new ModuleError('Database is not open: cannot call approximateSize()', {
109
- code: 'LEVEL_DATABASE_NOT_OPEN'
110
- }))
111
- } else {
112
- const keyEncoding = this.keyEncoding(options && options.keyEncoding)
113
- start = keyEncoding.encode(start)
114
- end = keyEncoding.encode(end)
115
- binding.db_approximate_size(this[kContext], start, end, callback)
116
- }
117
-
118
- return callback[kPromise]
119
- }
120
-
121
- compactRange (start, end, options, callback) {
122
- if (arguments.length < 2 || typeof start === 'function' || typeof end === 'function') {
123
- throw new TypeError("The arguments 'start' and 'end' are required")
124
- } else if (typeof options === 'function') {
125
- callback = options
126
- options = null
127
- } else if (typeof options !== 'object') {
128
- options = null
129
- }
130
-
131
- callback = fromCallback(callback, kPromise)
132
-
133
- if (this.status === 'opening') {
134
- this.defer(() => this.compactRange(start, end, options, callback))
135
- } else if (this.status !== 'open') {
136
- this.nextTick(callback, new ModuleError('Database is not open: cannot call compactRange()', {
137
- code: 'LEVEL_DATABASE_NOT_OPEN'
138
- }))
139
- } else {
140
- const keyEncoding = this.keyEncoding(options && options.keyEncoding)
141
- start = keyEncoding.encode(start)
142
- end = keyEncoding.encode(end)
143
- binding.db_compact_range(this[kContext], start, end, callback)
144
- }
145
-
146
- return callback[kPromise]
84
+ process.nextTick(callback, binding.batch_do(this[kContext], operations, options))
147
85
  }
148
86
 
149
87
  getProperty (property) {
@@ -164,26 +102,6 @@ class RocksLevel extends AbstractLevel {
164
102
  _iterator (options) {
165
103
  return new Iterator(this, this[kContext], options)
166
104
  }
167
-
168
- static destroy (location, callback) {
169
- if (typeof location !== 'string' || location === '') {
170
- throw new TypeError("The first argument 'location' must be a non-empty string")
171
- }
172
-
173
- callback = fromCallback(callback, kPromise)
174
- binding.destroy_db(location, callback)
175
- return callback[kPromise]
176
- }
177
-
178
- static repair (location, callback) {
179
- if (typeof location !== 'string' || location === '') {
180
- throw new TypeError("The first argument 'location' must be a non-empty string")
181
- }
182
-
183
- callback = fromCallback(callback, kPromise)
184
- binding.repair_db(location, callback)
185
- return callback[kPromise]
186
- }
187
105
  }
188
106
 
189
107
  exports.RocksLevel = RocksLevel