2014-04-27 19:20:30 +02:00
|
|
|
from libc.stdint cimport uint32_t
|
2014-08-22 19:58:17 +02:00
|
|
|
from libcpp cimport bool as cpp_bool
|
2014-10-22 09:41:33 +02:00
|
|
|
from std_memory cimport shared_ptr
|
|
|
|
|
|
|
|
from cache cimport Cache
|
2014-10-22 09:43:47 +02:00
|
|
|
from filter_policy cimport FilterPolicy
|
2014-04-27 19:20:30 +02:00
|
|
|
|
|
|
|
cdef extern from "rocksdb/table.h" namespace "rocksdb":
|
|
|
|
cdef cppclass TableFactory:
|
|
|
|
TableFactory()
|
|
|
|
|
2014-08-22 19:58:17 +02:00
|
|
|
ctypedef enum BlockBasedTableIndexType:
|
|
|
|
kBinarySearch "rocksdb::BlockBasedTableOptions::IndexType::kBinarySearch"
|
|
|
|
kHashSearch "rocksdb::BlockBasedTableOptions::IndexType::kHashSearch"
|
|
|
|
|
|
|
|
ctypedef enum ChecksumType:
|
|
|
|
kCRC32c
|
|
|
|
kxxHash
|
|
|
|
|
|
|
|
cdef cppclass BlockBasedTableOptions:
|
|
|
|
BlockBasedTableOptions()
|
|
|
|
BlockBasedTableIndexType index_type
|
|
|
|
cpp_bool hash_index_allow_collision
|
|
|
|
ChecksumType checksum
|
2014-10-22 09:35:17 +02:00
|
|
|
cpp_bool no_block_cache
|
|
|
|
size_t block_size
|
|
|
|
int block_size_deviation
|
|
|
|
int block_restart_interval
|
|
|
|
cpp_bool whole_key_filtering
|
2014-10-22 09:41:33 +02:00
|
|
|
shared_ptr[Cache] block_cache
|
|
|
|
shared_ptr[Cache] block_cache_compressed
|
2014-10-22 09:43:47 +02:00
|
|
|
shared_ptr[FilterPolicy] filter_policy
|
2020-03-12 20:51:28 +01:00
|
|
|
cpp_bool enable_index_compression
|
2020-05-18 17:51:39 +02:00
|
|
|
cpp_bool cache_index_and_filter_blocks
|
2020-08-31 11:31:48 +02:00
|
|
|
int format_version
|
2014-08-22 19:58:17 +02:00
|
|
|
|
|
|
|
cdef TableFactory* NewBlockBasedTableFactory(const BlockBasedTableOptions&)
|
|
|
|
|
|
|
|
ctypedef enum EncodingType:
|
|
|
|
kPlain
|
|
|
|
kPrefix
|
|
|
|
|
|
|
|
cdef cppclass PlainTableOptions:
|
|
|
|
uint32_t user_key_len
|
|
|
|
int bloom_bits_per_key
|
|
|
|
double hash_table_ratio
|
|
|
|
size_t index_sparseness
|
|
|
|
size_t huge_page_tlb_size
|
|
|
|
EncodingType encoding_type
|
|
|
|
cpp_bool full_scan_mode
|
|
|
|
cpp_bool store_index_in_file
|
|
|
|
|
|
|
|
cdef TableFactory* NewPlainTableFactory(const PlainTableOptions&)
|