Struct pancake_engine_serial::scnd_idx::SecondaryIndex
source · pub struct SecondaryIndex {
dir_path: PathBuf,
spec: Arc<SubValueSpec>,
lsm: LSMTree<SVPKShared, PVShared>,
}Expand description
A secondary index is an abstraction of a sorted dictionary mapping
(sub-portion of value , primary key) : value.
Clients may query for (primary key, value) entries based on bounds
over sub-portion of value.
Each instance of SecondaryIndex is defined by a [SubValueSpec],
which specifies the sub-portion of value that this SecondaryIndex
indexes on.
Fields§
§dir_path: PathBuf§spec: Arc<SubValueSpec>§lsm: LSMTree<SVPKShared, PVShared>Implementations§
source§impl SecondaryIndex
impl SecondaryIndex
fn spec_file_path<P: AsRef<Path>>(scnd_idx_dir_path: P) -> PathBuf
fn lsm_dir_path<P: AsRef<Path>>(scnd_idx_dir_path: P) -> PathBuf
pub fn load<P: AsRef<Path>>(scnd_idx_dir_path: P) -> Result<Self>
pub fn new<P: AsRef<Path>>( scnd_idx_dir_path: P, spec: Arc<SubValueSpec>, prim_lsm: &LSMTree<PKShared, PVShared> ) -> Result<Self>
pub fn remove_dir(&self) -> Result<()>
pub fn spec(&self) -> &Arc<SubValueSpec>
pub fn put( &mut self, pk: &PKShared, old_pv: Option<&PVShared>, new_pv: Option<&PVShared> ) -> Result<()>
pub fn get_range<'a>( &'a self, sv_lo: Option<&'a SubValue>, sv_hi: Option<&'a SubValue> ) -> impl 'a + Iterator<Item = Entry<'a, PKShared, PVShared>>
Auto Trait Implementations§
impl RefUnwindSafe for SecondaryIndex
impl Send for SecondaryIndex
impl Sync for SecondaryIndex
impl Unpin for SecondaryIndex
impl UnwindSafe for SecondaryIndex
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