Struct SqlTxn
pub struct SqlTxn {
pub statements: Vec<SqlStatement>,
pub client_id: Option<String>,
pub mid: Option<u64>,
pub producer: Option<ProducerWrite>,
pub guarded: bool,
}Expand description
One approved SQL write transaction — the one-shot (/execute-sql-txn) flavor, i.e. a
mutation session compressed into a single call. A client_id + mid carries the
optimistic-client discipline (≤ lmid absorbed, lmid+1 applies + the co-transactional
lmid upsert, a gap rejects); a foreign write may instead carry a producer watermark, which
runs the SAME rule against its own namespace. The two are mutually exclusive on the wire.
How a txn runs stays per-server (group-commit fold, capture, broadcast) — only the accepted
shape is shared.
Fields§
§statements: Vec<SqlStatement>§client_id: Option<String>The optimistic client this write is attributed to (with mid); None for a foreign
write.
mid: Option<u64>The client’s mutation id (with client_id).
producer: Option<ProducerWrite>The durable dedup watermark for a foreign (non-client) write.
guarded: boolWhether the statements run under the public reserved-object authorizer. The public mutation
facade (/v1/sql/mutations/*) sets this so a mutator’s raw SQL cannot write reserved
_rindle_* tables; the legacy /execute-sql-txn surface leaves it false to preserve its
historically permissive connection-local SQL. Defaults to false.