pub struct InMemoryDataSource { /* private fields */ }Expand description
A simple in-memory data source for testing and simple use cases.
Implementations§
Source§impl InMemoryDataSource
impl InMemoryDataSource
Trait Implementations§
Source§impl DataSource for InMemoryDataSource
impl DataSource for InMemoryDataSource
Source§fn get_table_rows(&self, table: &str) -> ExecutionResult<Vec<Rc<Row>>>
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>>>
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>>>
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>>>
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_column_count(&self, table: &str) -> ExecutionResult<usize>
fn get_column_count(&self, table: &str) -> ExecutionResult<usize>
Returns the column count for a table.
Source§fn get_index_point_with_limit(
&self,
table: &str,
index: &str,
key: &Value,
limit: Option<usize>,
) -> ExecutionResult<Vec<Rc<Row>>>
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_gin_index_rows(
&self,
table: &str,
index: &str,
key: &str,
value: &str,
) -> ExecutionResult<Vec<Rc<Row>>>
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>>>
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§impl Default for InMemoryDataSource
impl Default for InMemoryDataSource
Source§fn default() -> InMemoryDataSource
fn default() -> InMemoryDataSource
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for InMemoryDataSource
impl RefUnwindSafe for InMemoryDataSource
impl !Send for InMemoryDataSource
impl !Sync for InMemoryDataSource
impl Unpin for InMemoryDataSource
impl UnwindSafe for InMemoryDataSource
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