Skip to main content

TableCacheDataSource

Struct TableCacheDataSource 

Source
pub struct TableCacheDataSource<'a> { /* private fields */ }
Expand description

DataSource implementation for TableCache.

This allows the query engine to access table data and indexes.

Implementations§

Source§

impl<'a> TableCacheDataSource<'a>

Source

pub fn new(cache: &'a TableCache) -> Self

Creates a new data source from a TableCache reference.

Trait Implementations§

Source§

impl<'a> DataSource for TableCacheDataSource<'a>

Source§

fn get_table_rows(&self, table: &str) -> ExecutionResult<Vec<Rc<Row>>>

Returns all rows from a table.
Source§

fn get_index_range( &self, table: &str, index: &str, range_start: Option<&Value>, range_end: Option<&Value>, include_start: bool, include_end: bool, ) -> ExecutionResult<Vec<Rc<Row>>>

Returns rows from an index scan with a key range.
Source§

fn get_index_range_with_limit( &self, table: &str, index: &str, range_start: Option<&Value>, range_end: Option<&Value>, include_start: bool, include_end: bool, limit: Option<usize>, offset: usize, reverse: bool, ) -> ExecutionResult<Vec<Rc<Row>>>

Returns rows from an index scan with a key range, limit, offset, and reverse option. This enables true pushdown of LIMIT to the storage layer.
Source§

fn get_index_point( &self, table: &str, index: &str, key: &Value, ) -> ExecutionResult<Vec<Rc<Row>>>

Returns rows from an index point lookup.
Source§

fn get_index_point_with_limit( &self, table: &str, index: &str, key: &Value, limit: Option<usize>, ) -> ExecutionResult<Vec<Rc<Row>>>

Returns rows from an index point lookup with limit.
Source§

fn get_column_count(&self, table: &str) -> ExecutionResult<usize>

Returns the column count for a table.
Source§

fn get_gin_index_rows( &self, table: &str, index: &str, key: &str, value: &str, ) -> ExecutionResult<Vec<Rc<Row>>>

Returns rows from a GIN index lookup by key-value pair. Used for JSONB path equality queries like $.category = 'Electronics'.
Source§

fn get_gin_index_rows_by_key( &self, table: &str, index: &str, key: &str, ) -> ExecutionResult<Vec<Rc<Row>>>

Returns rows from a GIN index lookup by key existence. Used for JSONB key existence queries.
Source§

fn get_gin_index_rows_multi( &self, table: &str, index: &str, pairs: &[(&str, &str)], ) -> ExecutionResult<Vec<Rc<Row>>>

Returns rows from a GIN index lookup by multiple key-value pairs (AND query). Used for combined JSONB path equality queries like $.category = 'A' AND $.status = 'active'.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.