pub struct RegisteredSqlQuery { /* private fields */ }Implementations§
Source§impl RegisteredSqlQuery
impl RegisteredSqlQuery
pub fn id(&self) -> QueryId
pub fn control(&self) -> &ExecutionControl
pub fn phase(&self) -> SqlQueryPhase
pub fn status(&self) -> QueryStatus
pub fn set_sql_metadata(&self, sql: &str)
pub fn transition( &self, expected: SqlQueryPhase, next: SqlQueryPhase, ) -> Result<()>
pub fn enter_commit_critical(&self) -> Result<()>
pub fn exit_commit_critical(&self) -> Result<()>
pub fn begin_serialization(&self) -> Result<()>
Sourcepub fn record_commit(&self, statement_index: usize, epoch: u64)
pub fn record_commit(&self, statement_index: usize, epoch: u64)
Records one statement whose effects are durably published.
pub fn durable_outcome(&self) -> DurableOutcome
pub fn commit_outcome_error( &self, message: impl Into<String>, ) -> MongrelQueryError
pub fn result_limit_error( &self, message: impl Into<String>, ) -> MongrelQueryError
Sourcepub fn outcome_unknown_error(
&self,
message: impl Into<String>,
) -> MongrelQueryError
pub fn outcome_unknown_error( &self, message: impl Into<String>, ) -> MongrelQueryError
A fenced mutation failed without an exact durable receipt. Never claim
committed=false: storage may have changed before the error surfaced.
Sourcepub fn restore_replayed_outcome(
&self,
durable: DurableOutcome,
completed_statements: usize,
statement_index: usize,
serialization: SerializationOutcome,
terminal_error: Option<QueryTerminalError>,
terminal_state: QueryTerminalState,
cancellation_reason: CancellationReason,
phase: SqlQueryPhase,
)
pub fn restore_replayed_outcome( &self, durable: DurableOutcome, completed_statements: usize, statement_index: usize, serialization: SerializationOutcome, terminal_error: Option<QueryTerminalError>, terminal_state: QueryTerminalState, cancellation_reason: CancellationReason, phase: SqlQueryPhase, )
Restore a terminal receipt onto a newly registered idempotent replay so status polling for the replay query ID reports the same durable result.
Sourcepub fn mark_outcome_unknown(&self)
pub fn mark_outcome_unknown(&self)
The daemon found a durable idempotency intent without a receipt. The
previous write may have committed, so committed=false is not known.
pub fn record_terminal_error( &self, code: impl Into<String>, category: QueryTerminalErrorCategory, )
pub fn record_serialization_failure(&self, code: impl Into<String>)
pub fn begin_statement(&self, index: usize)
pub fn complete_statement(&self, index: usize)
pub fn complete_current_statement(&self)
pub fn request_cancel(&self, reason: CancellationReason) -> CancelOutcome
pub fn checkpoint(&self) -> Result<()>
pub fn complete(&self) -> Result<()>
pub fn try_complete(&self) -> Result<()>
pub fn fail(&self)
pub fn fail_result_limit(&self)
pub fn fail_with_error( &self, code: impl Into<String>, category: QueryTerminalErrorCategory, )
pub fn fail_serialization(&self)
Trait Implementations§
Source§impl Clone for RegisteredSqlQuery
impl Clone for RegisteredSqlQuery
Source§fn clone(&self) -> RegisteredSqlQuery
fn clone(&self) -> RegisteredSqlQuery
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for RegisteredSqlQuery
impl !UnwindSafe for RegisteredSqlQuery
impl Freeze for RegisteredSqlQuery
impl Send for RegisteredSqlQuery
impl Sync for RegisteredSqlQuery
impl Unpin for RegisteredSqlQuery
impl UnsafeUnpin for RegisteredSqlQuery
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
Converts
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>
Converts
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