2020-09-03 08:53:13 +02:00
|
|
|
from .slice_ cimport Slice
|
2014-01-19 12:53:57 +01:00
|
|
|
from libcpp.string cimport string
|
|
|
|
from libcpp cimport bool as cpp_bool
|
2020-09-03 08:53:13 +02:00
|
|
|
from .logger cimport Logger
|
|
|
|
from .std_memory cimport shared_ptr
|
2014-01-19 12:53:57 +01:00
|
|
|
|
|
|
|
cdef extern from "rocksdb/slice_transform.h" namespace "rocksdb":
|
|
|
|
cdef cppclass SliceTransform:
|
|
|
|
pass
|
|
|
|
|
2014-01-26 10:45:06 +01:00
|
|
|
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&)
|
2014-01-19 12:53:57 +01:00
|
|
|
|
|
|
|
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+
|
2014-01-26 10:45:06 +01:00
|
|
|
void set_info_log(shared_ptr[Logger]) nogil except+
|