pub struct CommandMutationOverlay { /* private fields */ }Implementations§
Source§impl CommandMutationOverlay
impl CommandMutationOverlay
pub fn visit_column_matches_with_catalog( overlays: &mut [Self], table: &str, fields: &[String], values: &[Value], control: &StorageReadControl, catalog: Option<&dyn SQLValueCatalog>, visit: &mut dyn FnMut(DocId) -> Result<(), SQLError>, ) -> Result<DocumentChanges, SQLError>
pub fn column_matches( overlays: &mut [Self], table: &str, fields: &[String], values: &[Value], control: &StorageReadControl, ) -> Result<CommandIndexProbe, SQLError>
pub fn column_matches_with_catalog( overlays: &mut [Self], table: &str, fields: &[String], values: &[Value], control: &StorageReadControl, catalog: Option<&dyn SQLValueCatalog>, ) -> Result<CommandIndexProbe, SQLError>
Sourcepub fn visit_expression_matches_with_catalog(
overlays: &mut [Self],
table: &str,
physical_key: &str,
values: &[Value],
control: &StorageReadControl,
catalog: Option<&dyn SQLValueCatalog>,
visit: &mut dyn FnMut(DocId) -> Result<(), SQLError>,
) -> Result<DocumentChanges, SQLError>
pub fn visit_expression_matches_with_catalog( overlays: &mut [Self], table: &str, physical_key: &str, values: &[Value], control: &StorageReadControl, catalog: Option<&dyn SQLValueCatalog>, visit: &mut dyn FnMut(DocId) -> Result<(), SQLError>, ) -> Result<DocumentChanges, SQLError>
Visit already evaluated tuple keys before retaining the same command mask; the callback captures identities without evaluating row expressions.
pub fn expression_matches( overlays: &mut [Self], table: &str, physical_key: &str, values: &[Value], control: &StorageReadControl, ) -> Result<CommandIndexProbe, SQLError>
pub fn expression_matches_with_catalog( overlays: &mut [Self], table: &str, physical_key: &str, values: &[Value], control: &StorageReadControl, catalog: Option<&dyn SQLValueCatalog>, ) -> Result<CommandIndexProbe, SQLError>
Source§impl CommandMutationOverlay
impl CommandMutationOverlay
Sourcepub fn staged_row_bound(overlays: &[Self], table: &str) -> u64
pub fn staged_row_bound(overlays: &[Self], table: &str) -> u64
At least the number of rows overlays staged for table, without reading them; a row staged by several commands or staged again after it spilled counts more than once.
Sourcepub fn row(
overlays: &[Self],
table: &str,
id: DocId,
control: &StorageReadControl,
) -> Result<Option<Option<CommandStoredDocument>>, SQLError>
pub fn row( overlays: &[Self], table: &str, id: DocId, control: &StorageReadControl, ) -> Result<Option<Option<CommandStoredDocument>>, SQLError>
The row the newest of overlays staged for id in table: its fields, or None for a row the command deleted. None when no command staged the row.
Sourcepub fn stages(
overlays: &[Self],
table: &str,
id: DocId,
control: &StorageReadControl,
) -> Result<bool, SQLError>
pub fn stages( overlays: &[Self], table: &str, id: DocId, control: &StorageReadControl, ) -> Result<bool, SQLError>
Whether one of overlays staged a row for id in table.
Sourcepub fn changes(
overlays: &[Self],
table: &str,
base: DocumentChanges,
control: &StorageReadControl,
) -> Result<DocumentChanges, SQLError>
pub fn changes( overlays: &[Self], table: &str, base: DocumentChanges, control: &StorageReadControl, ) -> Result<DocumentChanges, SQLError>
base with the rows overlays staged for table above it, the newest command’s rows above the others. The rows are not copied; later stages do not change the result.
Sourcepub fn stage(
&mut self,
table: &str,
id: DocId,
document: Option<(Arc<Document>, DocumentMetadata)>,
control: &StorageReadControl,
) -> Result<(), SQLError>
pub fn stage( &mut self, table: &str, id: DocId, document: Option<(Arc<Document>, DocumentMetadata)>, control: &StorageReadControl, ) -> Result<(), SQLError>
Retain an evaluated row and prepare every cached-key change before publishing any row or index mutation.
Sourcepub fn stage_evaluated(
&mut self,
table: &str,
id: DocId,
document: Option<CommandStoredDocument>,
control: &StorageReadControl,
) -> Result<(), SQLError>
pub fn stage_evaluated( &mut self, table: &str, id: DocId, document: Option<CommandStoredDocument>, control: &StorageReadControl, ) -> Result<(), SQLError>
Publish an already evaluated row and its expression keys together.
Sourcepub fn find_match(
overlays: &mut [Self],
table: &str,
fields: &[String],
values: &[Value],
presence: FieldPresence,
control: &StorageReadControl,
) -> Result<Option<DocId>, SQLError>
pub fn find_match( overlays: &mut [Self], table: &str, fields: &[String], values: &[Value], presence: FieldPresence, control: &StorageReadControl, ) -> Result<Option<DocId>, SQLError>
Probe exact canonical keys across command frames; newer replacements and tombstones mask older candidates. Candidate merging retains only the smallest visible identity.
Sourcepub fn find_match_with_catalog(
overlays: &mut [Self],
table: &str,
fields: &[String],
values: &[Value],
presence: FieldPresence,
control: &StorageReadControl,
catalog: Option<&dyn SQLValueCatalog>,
) -> Result<Option<DocId>, SQLError>
pub fn find_match_with_catalog( overlays: &mut [Self], table: &str, fields: &[String], values: &[Value], presence: FieldPresence, control: &StorageReadControl, catalog: Option<&dyn SQLValueCatalog>, ) -> Result<Option<DocId>, SQLError>
Retain catalog-dependent comparison semantics while newer frames mask older rows.
Source§impl CommandMutationOverlay
impl CommandMutationOverlay
pub fn checkpoint(&self) -> CommandOverlayCheckpoint
pub fn restore(&mut self, checkpoint: &CommandOverlayCheckpoint)
Sourcepub fn published(
overlays: &mut [Self],
table: &str,
id: DocId,
document: Option<(Arc<Document>, DocumentMetadata)>,
control: &StorageReadControl,
) -> Result<(), SQLError>
pub fn published( overlays: &mut [Self], table: &str, id: DocId, document: Option<(Arc<Document>, DocumentMetadata)>, control: &StorageReadControl, ) -> Result<(), SQLError>
Replace every enclosing command’s staged image after a nested command writes it. This keeps later callbacks and exact-key probes on the newest version.
Sourcepub fn published_evaluated(
overlays: &mut [Self],
table: &str,
id: DocId,
document: Option<CommandStoredDocument>,
control: &StorageReadControl,
) -> Result<(), SQLError>
pub fn published_evaluated( overlays: &mut [Self], table: &str, id: DocId, document: Option<CommandStoredDocument>, control: &StorageReadControl, ) -> Result<(), SQLError>
Refresh enclosing rows with the keys evaluated for their published image.
Sourcepub fn published_rows(self) -> Option<Self>
pub fn published_rows(self) -> Option<Self>
Retain an ended command only when a nested command changed one of its staged rows.
Sourcepub fn was_published(
&self,
table: &str,
id: DocId,
deleted_supersedes: bool,
cancellation: &CancellationToken,
) -> Result<bool, SQLError>
pub fn was_published( &self, table: &str, id: DocId, deleted_supersedes: bool, cancellation: &CancellationToken, ) -> Result<bool, SQLError>
Whether writing an identity would overwrite a nested command’s published row, including its deletion when deleted_supersedes holds.
Sourcepub fn matches(
overlays: &mut [Self],
table: &str,
fields: &[String],
values: &[Value],
control: &StorageReadControl,
) -> Result<BudgetedVec<DocId>, SQLError>
pub fn matches( overlays: &mut [Self], table: &str, fields: &[String], values: &[Value], control: &StorageReadControl, ) -> Result<BudgetedVec<DocId>, SQLError>
The visible rows overlays staged for table whose fields hold values, the newest command’s first; a missing field holds null.
pub fn matches_with_catalog( overlays: &mut [Self], table: &str, fields: &[String], values: &[Value], control: &StorageReadControl, catalog: Option<&dyn SQLValueCatalog>, ) -> Result<BudgetedVec<DocId>, SQLError>
pub fn visit_matches_with_catalog( overlays: &mut [Self], table: &str, fields: &[String], values: &[Value], control: &StorageReadControl, catalog: Option<&dyn SQLValueCatalog>, visit: &mut dyn FnMut(DocId) -> Result<(), SQLError>, ) -> Result<(), SQLError>
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for CommandMutationOverlay
impl !UnwindSafe for CommandMutationOverlay
impl Freeze for CommandMutationOverlay
impl Send for CommandMutationOverlay
impl Sync for CommandMutationOverlay
impl Unpin for CommandMutationOverlay
impl UnsafeUnpin for CommandMutationOverlay
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
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more