From 57b903d76986af68f88ad3410ab8a04e40932c8f Mon Sep 17 00:00:00 2001 From: Elichai Turkel Date: Sun, 17 Mar 2019 16:58:24 +0200 Subject: [PATCH 1/2] Added a function to create iterator with specific CF and ReadOptions --- src/db.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/db.rs b/src/db.rs index d7b26f4..ff95f8b 100644 --- a/src/db.rs +++ b/src/db.rs @@ -1093,6 +1093,15 @@ impl DB { DBIterator::new(self, &readopts, mode) } + pub fn iterator_cf_opt( + &self, + cf_handle: ColumnFamily, + readopts: &ReadOptions, + mode: IteratorMode, + ) -> Result { + DBIterator::new_cf(self, cf_handle, &readopts, mode) + } + /// Opens an interator with `set_total_order_seek` enabled. /// This must be used to iterate across prefixes when `set_memtable_factory` has been called /// with a Hash-based implementation. From a3d0cdd8c77b55ad3a64c540bf82fda33054ee10 Mon Sep 17 00:00:00 2001 From: Elichai Turkel Date: Mon, 18 Mar 2019 10:12:33 +0200 Subject: [PATCH 2/2] Added docs to iterator_cf_opt --- src/db.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/db.rs b/src/db.rs index ff95f8b..3550c3c 100644 --- a/src/db.rs +++ b/src/db.rs @@ -1093,6 +1093,8 @@ impl DB { DBIterator::new(self, &readopts, mode) } + /// Opens an interator using the provided ReadOptions. + /// This is used when you want to iterate over a specific ColumnFamily with a modified ReadOptions pub fn iterator_cf_opt( &self, cf_handle: ColumnFamily,