pub struct Reader { /* private fields */ }
Expand description
Read and filter keys from a single transaction file
Implementations§
source§impl Reader
impl Reader
sourcepub fn new(r: File) -> Result<Either<Reader, DeleteMarker>>
pub fn new(r: File) -> Result<Either<Reader, DeleteMarker>>
Open a single transaction file
If instead you want to read from an entire database,
use DatabaseReader
which provides a similar API.
sourcepub fn get<'rdr, 'k>(&'rdr self, key: &'k str) -> StringKeyRangeReader<'rdr, 'k> ⓘ
pub fn get<'rdr, 'k>(&'rdr self, key: &'k str) -> StringKeyRangeReader<'rdr, 'k> ⓘ
Get a reader for only a single key
Returns an object that will read all of the records for only one key.
sourcepub fn get_range<'rdr, 'k>(
&'rdr self,
range: impl RangeBounds<&'k str> + 'k + Clone
) -> StringKeyRangeReader<'rdr, 'k> ⓘ
pub fn get_range<'rdr, 'k>( &'rdr self, range: impl RangeBounds<&'k str> + 'k + Clone ) -> StringKeyRangeReader<'rdr, 'k> ⓘ
Get a reader for a lexicographic range of keys
Use inclusive or exclusive range syntax to select a range.
Example: rdr.get_range("chimpan-ay" ..= "chimpan-zee")
Range queries are always efficient and readahead may occur.
sourcepub fn get_filter<'rdr, 'k>(
&'rdr self,
wildcard: &'k Wildcard
) -> StringKeyRangeReader<'rdr, 'k> ⓘ
pub fn get_filter<'rdr, 'k>( &'rdr self, wildcard: &'k Wildcard ) -> StringKeyRangeReader<'rdr, 'k> ⓘ
Get a reader that filters on SQL’s “LIKE”-like syntax.
A wildcard filter that has a fixed prefix, such as
"chimp%"
is always efficient.
Auto Trait Implementations§
impl RefUnwindSafe for Reader
impl Send for Reader
impl Sync for Reader
impl Unpin for Reader
impl UnwindSafe for Reader
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more