Function execute_public_batch
pub fn execute_public_batch(
backend: &mut impl OneShotBackend,
statements: &[SqlStatementRequest],
idempotency_key: &str,
aggregate_result_byte_limit: usize,
now_ms: i64,
) -> Result<PublicOperationCommit, WritePlaneError>Expand description
Execute one public SQL batch: validate the idempotency key against the caller’s now_ms
(future skew bounded — the coordinator reads no clock), check for an exact replay, then run
every statement inside one backend transaction while bounding the encoded result array —
the JSON array delimiters (2 bytes) and inter-result separators count toward
aggregate_result_byte_limit — and commit with the outcome row. Any statement or
accounting error rolls the unit back. A commit error is re-read: a concurrent request
carrying the same identity may have won while this attempt was open, and its
co-transactional outcome is authoritative — the exact stored bytes are returned instead of
a duplicate-key/conflict error.