rocksdb-native 3.2.1 → 3.3.0

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/CMakeLists.txt CHANGED
@@ -13,7 +13,7 @@ if(target MATCHES "win32")
13
13
  add_compile_options(/MT$<$<CONFIG:Debug>:d>)
14
14
  endif()
15
15
 
16
- fetch_package("github:holepunchto/librocksdb#da2deb5")
16
+ fetch_package("github:holepunchto/librocksdb#2b388ab")
17
17
 
18
18
  add_bare_module(rocksdb_native_bare)
19
19
 
package/binding.c CHANGED
@@ -28,6 +28,8 @@ typedef struct {
28
28
  rocksdb_native_uint64_t table_block_size;
29
29
  uint32_t table_cache_index_and_filter_blocks;
30
30
  uint32_t table_format_version;
31
+ uint32_t optimize_filters_for_memory;
32
+ uint32_t no_block_cache;
31
33
  } rocksdb_native_column_family_options_t;
32
34
 
33
35
  typedef struct {
@@ -719,7 +721,7 @@ rocksdb_native_column_family_init(js_env_t *env, js_callback_info_t *info) {
719
721
  column_family->descriptor = (rocksdb_column_family_descriptor_t) {
720
722
  (const char *) name,
721
723
  {
722
- 0,
724
+ 1,
723
725
  options->compation_style,
724
726
  options->enable_blob_files,
725
727
  rocksdb_native__to_uint64(options->min_blob_size),
@@ -728,6 +730,8 @@ rocksdb_native_column_family_init(js_env_t *env, js_callback_info_t *info) {
728
730
  rocksdb_native__to_uint64(options->table_block_size),
729
731
  options->table_cache_index_and_filter_blocks,
730
732
  options->table_format_version,
733
+ options->optimize_filters_for_memory,
734
+ options->no_block_cache,
731
735
  }
732
736
  };
733
737
 
@@ -12,6 +12,8 @@ class RocksDBColumnFamily {
12
12
  tableBlockSize = 8192,
13
13
  tableCacheIndexAndFilterBlocks = true,
14
14
  tableFormatVersion = 6,
15
+ optimizeFiltersForMemory = false,
16
+ blockCache = true,
15
17
  // In case we are cloning
16
18
  settings = null
17
19
  } = opts
@@ -30,7 +32,9 @@ class RocksDBColumnFamily {
30
32
  tableBlockSize & 0xffffffff,
31
33
  Math.floor(tableBlockSize / 0x100000000),
32
34
  tableCacheIndexAndFilterBlocks ? 1 : 0,
33
- tableFormatVersion
35
+ tableFormatVersion,
36
+ optimizeFiltersForMemory ? 1 : 0,
37
+ blockCache ? 0 : 1
34
38
  ])
35
39
 
36
40
  this._handle = binding.columnFamilyInit(name, this._settings)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rocksdb-native",
3
- "version": "3.2.1",
3
+ "version": "3.3.0",
4
4
  "description": "librocksdb bindings for JavaScript",
5
5
  "exports": {
6
6
  ".": "./index.js",