forked from twmht/python-rocksdb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
slice_transform.pxd
37 lines (32 loc) · 915 Bytes
/
slice_transform.pxd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
from slice_ cimport Slice
from libcpp.string cimport string
from libcpp cimport bool as cpp_bool
from logger cimport Logger
from std_memory cimport shared_ptr
cdef extern from "rocksdb/slice_transform.h" namespace "rocksdb":
cdef cppclass SliceTransform:
pass
ctypedef Slice (*transform_func)(
void*,
Logger*,
string&,
const Slice&)
ctypedef cpp_bool (*in_domain_func)(
void*,
Logger*,
string&,
const Slice&)
ctypedef cpp_bool (*in_range_func)(
void*,
Logger*,
string&,
const Slice&)
cdef extern from "cpp/slice_transform_wrapper.hpp" namespace "py_rocks":
cdef cppclass SliceTransformWrapper:
SliceTransformWrapper(
string name,
void*,
transform_func,
in_domain_func,
in_range_func) nogil except+
void set_info_log(shared_ptr[Logger]) nogil except+