Skip to main content

assert_batch_is_atomic

Function assert_batch_is_atomic 

Source
pub async fn assert_batch_is_atomic(db: &dyn Database)
Expand description

Proves db’s batch_atomic is all-or-nothing: a committed batch is fully visible, a failing batch is invisible. Runs its own probe table, so it can be called against any adapter with a writable connection.

An adapter that cannot honour the contract fails loudly here — the port’s answer to “atomic where supported” (issue #126).

§Panics

Panics when the batch contract is violated: a valid batch fails, a failed batch leaves rows behind, or the probe table cannot be created on the given connection.