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