pub struct RowStore { /* private fields */ }Expand description
Row storage for a single table.
Implementations§
Source§impl RowStore
impl RowStore
Sourcepub fn update(&mut self, row_id: RowId, new_row: Row) -> Result<()>
pub fn update(&mut self, row_id: RowId, new_row: Row) -> Result<()>
Updates a row in the store.
Sourcepub fn get_mut(&mut self, row_id: RowId) -> Option<&mut Row>
pub fn get_mut(&mut self, row_id: RowId) -> Option<&mut Row>
Gets a mutable reference to a row by ID (requires exclusive access). Note: This clones the Rc and returns a new Row if mutation is needed.
Sourcepub fn find_row_id_by_pk(&self, row: &Row) -> Option<RowId>
pub fn find_row_id_by_pk(&self, row: &Row) -> Option<RowId>
Finds existing row ID by primary key.
Sourcepub fn index_scan(
&self,
index_name: &str,
range: Option<&KeyRange<Value>>,
) -> Vec<Rc<Row>>
pub fn index_scan( &self, index_name: &str, range: Option<&KeyRange<Value>>, ) -> Vec<Rc<Row>>
Gets rows by index scan.
Sourcepub fn index_scan_with_limit(
&self,
index_name: &str,
range: Option<&KeyRange<Value>>,
limit: Option<usize>,
) -> Vec<Rc<Row>>
pub fn index_scan_with_limit( &self, index_name: &str, range: Option<&KeyRange<Value>>, limit: Option<usize>, ) -> Vec<Rc<Row>>
Gets rows by index scan with limit.
Sourcepub fn index_scan_with_limit_offset(
&self,
index_name: &str,
range: Option<&KeyRange<Value>>,
limit: Option<usize>,
offset: usize,
) -> Vec<Rc<Row>>
pub fn index_scan_with_limit_offset( &self, index_name: &str, range: Option<&KeyRange<Value>>, limit: Option<usize>, offset: usize, ) -> Vec<Rc<Row>>
Gets rows by index scan with limit and offset. This enables true pushdown of LIMIT/OFFSET to the storage layer.
Sourcepub fn index_scan_with_options(
&self,
index_name: &str,
range: Option<&KeyRange<Value>>,
limit: Option<usize>,
offset: usize,
reverse: bool,
) -> Vec<Rc<Row>>
pub fn index_scan_with_options( &self, index_name: &str, range: Option<&KeyRange<Value>>, limit: Option<usize>, offset: usize, reverse: bool, ) -> Vec<Rc<Row>>
Gets rows by index scan with limit, offset, and reverse option. This enables true pushdown of LIMIT/OFFSET/ORDER to the storage layer.
Sourcepub fn insert_or_replace(&mut self, row: Row) -> Result<(RowId, bool)>
pub fn insert_or_replace(&mut self, row: Row) -> Result<(RowId, bool)>
Inserts a row or replaces an existing row with the same primary key. Returns the row ID and whether it was a replacement.
Sourcepub fn secondary_index_contains(&self, index_name: &str, key: &Value) -> bool
pub fn secondary_index_contains(&self, index_name: &str, key: &Value) -> bool
Checks if a secondary index contains a key (for unique constraint checking).
Sourcepub fn pk_columns(&self) -> &[usize]
pub fn pk_columns(&self) -> &[usize]
Gets the primary key columns indices.
Sourcepub fn extract_pk(&self, row: &Row) -> Option<Value>
pub fn extract_pk(&self, row: &Row) -> Option<Value>
Extracts the primary key value from a row.
Sourcepub fn insert_with_delta(&mut self, row: Row) -> Result<Delta<Row>>
pub fn insert_with_delta(&mut self, row: Row) -> Result<Delta<Row>>
Inserts a row and returns a Delta for IVM propagation.
Sourcepub fn delete_with_delta(&mut self, row_id: RowId) -> Result<Delta<Row>>
pub fn delete_with_delta(&mut self, row_id: RowId) -> Result<Delta<Row>>
Deletes a row and returns a Delta for IVM propagation.
Sourcepub fn update_with_delta(
&mut self,
row_id: RowId,
new_row: Row,
) -> Result<(Delta<Row>, Delta<Row>)>
pub fn update_with_delta( &mut self, row_id: RowId, new_row: Row, ) -> Result<(Delta<Row>, Delta<Row>)>
Updates a row and returns Deltas for IVM propagation (delete old + insert new).
Sourcepub fn gin_index_get_by_key_value(
&self,
index_name: &str,
key: &str,
value: &str,
) -> Vec<Rc<Row>>
pub fn gin_index_get_by_key_value( &self, index_name: &str, key: &str, value: &str, ) -> Vec<Rc<Row>>
Queries the GIN index by key-value pair.