|
|
@ -49,27 +49,27 @@ unsafe impl Sync for DB {} |
|
|
|
|
|
|
|
|
|
|
|
#[derive(Debug, Copy, Clone, PartialEq)] |
|
|
|
#[derive(Debug, Copy, Clone, PartialEq)] |
|
|
|
pub enum DBCompressionType { |
|
|
|
pub enum DBCompressionType { |
|
|
|
None = 0, |
|
|
|
None = ffi::rocksdb_no_compression as isize, |
|
|
|
Snappy = 1, |
|
|
|
Snappy = ffi::rocksdb_snappy_compression as isize, |
|
|
|
Zlib = 2, |
|
|
|
Zlib = ffi::rocksdb_zlib_compression as isize, |
|
|
|
Bz2 = 3, |
|
|
|
Bz2 = ffi::rocksdb_bz2_compression as isize, |
|
|
|
Lz4 = 4, |
|
|
|
Lz4 = ffi::rocksdb_lz4_compression as isize, |
|
|
|
Lz4hc = 5, |
|
|
|
Lz4hc = ffi::rocksdb_lz4hc_compression as isize, |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
#[derive(Debug, Copy, Clone, PartialEq)] |
|
|
|
#[derive(Debug, Copy, Clone, PartialEq)] |
|
|
|
pub enum DBCompactionStyle { |
|
|
|
pub enum DBCompactionStyle { |
|
|
|
Level = 0, |
|
|
|
Level = ffi::rocksdb_level_compaction as isize, |
|
|
|
Universal = 1, |
|
|
|
Universal = ffi::rocksdb_universal_compaction as isize, |
|
|
|
Fifo = 2, |
|
|
|
Fifo = ffi::rocksdb_fifo_compaction as isize, |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
#[derive(Debug, Copy, Clone, PartialEq)] |
|
|
|
#[derive(Debug, Copy, Clone, PartialEq)] |
|
|
|
pub enum DBRecoveryMode { |
|
|
|
pub enum DBRecoveryMode { |
|
|
|
TolerateCorruptedTailRecords = 0, |
|
|
|
TolerateCorruptedTailRecords = ffi::rocksdb_recovery_mode_tolerate_corrupted_tail_records as isize, |
|
|
|
AbsoluteConsistency = 1, |
|
|
|
AbsoluteConsistency = ffi::rocksdb_recovery_mode_absolute_consistency as isize, |
|
|
|
PointInTime = 2, |
|
|
|
PointInTime = ffi::rocksdb_recovery_mode_point_in_time as isize, |
|
|
|
SkipAnyCorruptedRecords = 3, |
|
|
|
SkipAnyCorruptedRecord = ffi::rocksdb_recovery_mode_skip_any_corrupted_record as isize, |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/// An atomic batch of write operations.
|
|
|
|
/// An atomic batch of write operations.
|
|
|
|