|
|
|
@ -17,7 +17,7 @@ use self::libc::c_int; |
|
|
|
|
use std::ffi::CString; |
|
|
|
|
use std::mem; |
|
|
|
|
|
|
|
|
|
use rocksdb_ffi; |
|
|
|
|
use rocksdb_ffi::{self, DBCompressionType}; |
|
|
|
|
use merge_operator::{self, MergeFn, MergeOperatorCallback, |
|
|
|
|
full_merge_callback, partial_merge_callback}; |
|
|
|
|
use comparator::{self, ComparatorCallback, compare_callback}; |
|
|
|
@ -102,6 +102,12 @@ impl Options { |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
pub fn compression(&mut self, t: DBCompressionType) { |
|
|
|
|
unsafe { |
|
|
|
|
rocksdb_ffi::rocksdb_options_set_compression(self.inner, t); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
pub fn add_merge_operator(&mut self, |
|
|
|
|
name: &str, |
|
|
|
|
merge_fn: MergeFn) { |
|
|
|
|