use crate::{
db::{
data::{DecodedDataStoreKey, RawRow, StorageKey},
index::{IndexEntryValue, IndexReadContract, RawIndexStoreKey},
},
error::InternalError,
types::EntityTag,
};
use std::ops::Bound;
pub(in crate::db) trait IndexPlanReadView {
fn read_primary_row(&self, key: &DecodedDataStoreKey) -> Result<Option<RawRow>, InternalError>;
fn read_index_entry(
&self,
index: IndexReadContract<'_>,
key: &RawIndexStoreKey,
) -> Result<Option<IndexEntryValue>, InternalError>;
fn read_index_keys_in_raw_range(
&self,
entity_path: &'static str,
entity_tag: EntityTag,
index: IndexReadContract<'_>,
bounds: (&Bound<RawIndexStoreKey>, &Bound<RawIndexStoreKey>),
limit: usize,
) -> Result<Vec<StorageKey>, InternalError>;
}