pub struct ColumnFamilyMetaDataOptions { /* private fields */ }Expand description
Filters applied when collecting column family metadata.
Both filters narrow which SST files are reported:
levelpicks a single LSM level. The default,-1, reports every level.start_keyandend_keybound a user key range. A file is reported when its key range overlaps the bound, so a file that merely straddles the boundary is included. An unset bound is open-ended on that side.
The filtered query also drops levels that end up with no files, so the
resulting Vec<LevelMetaData> is not indexed by level number. Read
LevelMetaData::level to find out which level a value describes.
The reported size and file_count cover only the files that passed the
filter, not the whole column family.
Implementations§
Source§impl ColumnFamilyMetaDataOptions
impl ColumnFamilyMetaDataOptions
Sourcepub fn set_level(&mut self, level: i32)
pub fn set_level(&mut self, level: i32)
Restricts the query to a single level. Pass -1 to report every level.
Sourcepub fn set_start_key(&mut self, key: impl AsRef<[u8]>)
pub fn set_start_key(&mut self, key: impl AsRef<[u8]>)
Sets the inclusive lower bound of the user key range to report.
Sourcepub fn clear_start_key(&mut self)
pub fn clear_start_key(&mut self)
Removes the lower bound, leaving the range open on that side.
Sourcepub fn get_start_key(&self) -> Option<Vec<u8>>
pub fn get_start_key(&self) -> Option<Vec<u8>>
Returns the lower bound, or None if unset.
The C API hands back a borrowed pointer into a std::string owned by the
options object, so the bytes are copied here rather than freed.
Sourcepub fn set_end_key(&mut self, key: impl AsRef<[u8]>)
pub fn set_end_key(&mut self, key: impl AsRef<[u8]>)
Sets the inclusive upper bound of the user key range to report.
Sourcepub fn clear_end_key(&mut self)
pub fn clear_end_key(&mut self)
Removes the upper bound, leaving the range open on that side.
Sourcepub fn get_end_key(&self) -> Option<Vec<u8>>
pub fn get_end_key(&self) -> Option<Vec<u8>>
Returns the upper bound, or None if unset.
The C API hands back a borrowed pointer into a std::string owned by the
options object, so the bytes are copied here rather than freed.