From 1159f3198780fe3dc548eccec7ed1d102a553aae Mon Sep 17 00:00:00 2001 From: Renar Narubin Date: Fri, 19 Jul 2019 12:34:53 -0700 Subject: [PATCH] Document the raw_iterator methods --- src/db.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/db.rs b/src/db.rs index d82a8f2..21b8c40 100644 --- a/src/db.rs +++ b/src/db.rs @@ -588,21 +588,25 @@ impl<'a> Snapshot<'a> { DBIterator::new_cf(self.db, cf_handle, &readopts, mode) } + /// Opens a raw iterator over the data in this snapshot, using the default read options. pub fn raw_iterator(&self) -> DBRawIterator { let readopts = ReadOptions::default(); self.raw_iterator_opt(readopts) } + /// Opens a raw iterator over the data in this snapshot under the given column family, using the default read options. pub fn raw_iterator_cf(&self, cf_handle: ColumnFamily) -> Result { let readopts = ReadOptions::default(); self.raw_iterator_cf_opt(cf_handle, readopts) } + /// Opens a raw iterator over the data in this snapshot, using the given read options. pub fn raw_iterator_opt(&self, mut readopts: ReadOptions) -> DBRawIterator { readopts.set_snapshot(self); DBRawIterator::new(self.db, &readopts) } + /// Opens a raw iterator over the data in this snapshot under the given column family, using the given read options. pub fn raw_iterator_cf_opt( &self, cf_handle: ColumnFamily, @@ -1157,16 +1161,24 @@ impl DB { ) } + /// Opens a raw iterator over the database, using the default read options pub fn raw_iterator(&self) -> DBRawIterator { let opts = ReadOptions::default(); DBRawIterator::new(self, &opts) } + /// Opens a raw iterator over the given column family, using the default read options pub fn raw_iterator_cf(&self, cf_handle: ColumnFamily) -> Result { let opts = ReadOptions::default(); DBRawIterator::new_cf(self, cf_handle, &opts) } + /// Opens a raw iterator over the database, using the given read options + pub fn raw_iterator_opt(&self, readopts: &ReadOptions) -> DBRawIterator { + DBRawIterator::new(self, readopts) + } + + /// Opens a raw iterator over the given column family, using the given read options pub fn raw_iterator_cf_opt( &self, cf_handle: ColumnFamily,