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-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
|
|
|
|
|
|
|
|
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&)
|