forked from martyanov/python-rocksdb
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add types.pxd to make types available to all modules
- Loading branch information
Showing
4 changed files
with
31 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
from libc.stdint cimport uint64_t, uint32_t | ||
from .slice_ cimport Slice | ||
from libcpp.string cimport string | ||
from libcpp cimport bool as cpp_bool | ||
|
||
cdef extern from "rocksdb/types.h" namespace "rocksdb": | ||
ctypedef uint64_t SequenceNumber | ||
|
||
cdef enum EntryType: | ||
kEntryPut | ||
kEntryDelete | ||
kEntrySingleDelete | ||
kEntryMerge | ||
kEntryRangeDeletion | ||
kEntryBlobIndex | ||
kEntryOther | ||
|
||
cdef cppclass FullKey: | ||
Slice user_key | ||
SequenceNumber sequence | ||
EntryType type | ||
|
||
FullKey() except+ | ||
FullKey(const Slice&, const SequenceNumber&, EntryType) except+ | ||
string DebugString(cpp_bool hex) nogil except+ | ||
void clear() nogil except+ | ||
|
||
cpp_bool ParseFullKey(const Slice&, FullKey*) |