Unverified Commit f1e3ae36 authored by Connor's avatar Connor Committed by GitHub

add status (#285)

Signed-off-by: 's avatarConnor1996 <zbk602423539@gmail.com>
parent 263b82e8
......@@ -218,6 +218,13 @@ impl<D: Deref<Target = DB>> DBIterator<D> {
unsafe { crocksdb_ffi::crocksdb_iter_valid(self.inner) }
}
pub fn status(&self) -> Result<(), String> {
unsafe {
ffi_try!(crocksdb_iter_get_error(self.inner));
}
Ok(())
}
pub fn new_cf(db: D, cf_handle: &CFHandle, readopts: ReadOptions) -> DBIterator<D> {
unsafe {
let iterator = crocksdb_ffi::crocksdb_create_iterator_cf(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment