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
impl ClusterMutationWrite
Sourcepub fn exec(
&mut self,
sql: &str,
params: &[OwnedValue],
) -> Result<usize, ReplicaError>
pub fn exec( &mut self, sql: &str, params: &[OwnedValue], ) -> Result<usize, ReplicaError>
Run one statement with positional parameters (the mutator’s write path).
Sourcepub fn exec_bounded(
&mut self,
sql: &str,
params: &[OwnedValue],
guarded: bool,
) -> Result<usize, StatementRunError>
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.
Sourcepub fn public_statement(
&mut self,
statement: &SqlStatementRequest,
preserve_on_error: bool,
result_byte_limit: usize,
) -> Result<StatementResult, StatementRunError>
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.
pub fn public_transaction_open(&self) -> bool
Sourcepub fn query(
&mut self,
sql: &str,
params: &[OwnedValue],
) -> Result<Vec<Vec<OwnedValue>>, ReplicaError>
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).
Sourcepub fn query_with_cols(
&mut self,
sql: &str,
params: &[OwnedValue],
) -> Result<(Vec<String>, Vec<Vec<OwnedValue>>), ReplicaError>
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.
Sourcepub fn upsert_producer_seq(
&mut self,
producer: &str,
seq: u64,
) -> Result<(), BookkeepingError>
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.
Sourcepub fn journal_data_migration(
&mut self,
id: &str,
content_checksum: &str,
applied_at: i64,
) -> Result<(), BookkeepingError>
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.
Sourcepub fn commit_with_lmid(
&mut self,
client_id: &str,
mid: u64,
) -> Result<u64, ReplicaError>
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.
Sourcepub fn commit(&mut self) -> Result<u64, ReplicaError>
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.
Sourcepub fn commit_public_outcome(
&mut self,
outcome_key: &str,
request_identity: Option<&str>,
result_json: &str,
now_ms: i64,
) -> Result<Option<String>, DdlMigrationError>
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.