Rindle docs and package mapSkip to main content

ClusterMutationWrite

Struct ClusterMutationWrite 

Source
pub struct ClusterMutationWrite { /* private fields */ }
Expand description

One server-side mutation’s open cluster transaction (see ClusterConsumer::begin_mutation). Dropping without committing rolls back.

Implementations§

Source§

impl ClusterMutationWrite

Source

pub fn exec( &mut self, sql: &str, params: &[OwnedValue], ) -> Result<usize, ReplicaError>

Run one statement with positional parameters (the mutator’s write path).

Source

pub fn exec_bounded( &mut self, sql: &str, params: &[OwnedValue], guarded: bool, ) -> Result<usize, StatementRunError>

Run one mutation statement under the shared writer time/VM budget. guarded additionally installs the public reserved-object authorizer for the statement.

Source

pub fn public_statement( &mut self, statement: &SqlStatementRequest, preserve_on_error: bool, result_byte_limit: usize, ) -> Result<StatementResult, StatementRunError>

Run one statement on the public v1 surface. Interactive transactions preserve the outer transaction on ordinary statement errors; one-shot batches set preserve_on_error=false and let the shared coordinator roll the complete unit back.

Source

pub fn public_transaction_open(&self) -> bool

Source

pub fn query( &mut self, sql: &str, params: &[OwnedValue], ) -> Result<Vec<Vec<OwnedValue>>, ReplicaError>

Run a read through the open transaction (sees its own uncommitted writes, §4.1).

Source

pub fn query_with_cols( &mut self, sql: &str, params: &[OwnedValue], ) -> Result<(Vec<String>, Vec<Vec<OwnedValue>>), ReplicaError>

query plus ordered column names, enforcing SQLite’s read-only verdict for the shared mutation-session contract.

Source

pub fn upsert_producer_seq( &mut self, producer: &str, seq: u64, ) -> Result<(), BookkeepingError>

Advance a foreign writer’s producer watermark inside this open transaction, so the receipt commits with the effects it deduplicates or not at all.

Written through the capture-aware exec — NOT the connection-only helper — because the watermark is replicated data (design 306 §3.3): an uncaptured row is absent from the journal, so a restored store would come back holding every effect and no dedup state, and the first retry after the restore would re-apply. The SQL itself is the shared one, so this cannot drift from writeplane::upsert_producer_seq.

Source

pub fn journal_data_migration( &mut self, id: &str, content_checksum: &str, applied_at: i64, ) -> Result<(), BookkeepingError>

Append the captured apply-once marker at the tail of a standalone data migration.

Source

pub fn commit_with_lmid( &mut self, client_id: &str, mid: u64, ) -> Result<u64, ReplicaError>

Upsert last_mutation_id = mid for client_id in this transaction, commit, and return the commit version cv synchronously. The lmid row is ordinary captured data: it derives through the client’s own system query and is released by the same cv_min as the commit’s effects.

Source

pub fn commit(&mut self) -> Result<u64, ReplicaError>

Commit WITHOUT an lmid advance (a foreign/system write: confirms no client mutation), returning the commit version cv.

Source

pub fn commit_public_outcome( &mut self, outcome_key: &str, request_identity: Option<&str>, result_json: &str, now_ms: i64, ) -> Result<Option<String>, DdlMigrationError>

Store one public batch/transaction terminal outcome in the same SQLite transaction as its application effects. A captured unit renders the predicted next TxId into cursor before COMMIT; a zero-effect unit commits only the outcome metadata and does not advance TxId.

Source

pub fn rollback(&mut self)

Roll back: effects discarded, nothing delivered.

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> Same for T

Source§

type Output = T

Should always be Self
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.
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,