From 9ec9d74a1d77e2bde01de22615871f78e4dd0225 Mon Sep 17 00:00:00 2001 From: zhangjinpeng1987 Date: Fri, 26 Aug 2016 20:09:05 +0800 Subject: [PATCH] add set_iterate_upper_bound api for readoptions --- src/rocksdb.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/rocksdb.rs b/src/rocksdb.rs index 62fd506..7489f1a 100644 --- a/src/rocksdb.rs +++ b/src/rocksdb.rs @@ -886,6 +886,14 @@ impl ReadOptions { snapshot.inner); } } + + pub fn set_iterate_upper_bound(&mut self, key: &[u8]) { + unsafe { + rocksdb_ffi::rocksdb_readoptions_set_iterate_upper_bound(self.inner, + key.as_ptr(), + key.len() as size_t); + } + } } impl Default for ReadOptions {