Skip to main content

transition_batch

Function transition_batch 

Source
pub async fn transition_batch(
    conn: &mut PgConnection,
    moves: &[BatchMove],
) -> ModelResult<i64>
Expand description

transition for a whole batch: one lock, one update, one insert of events, whatever the size.

For the phases that decide many rows from one query and have no per-row exchange to record. Same edge table and policy as transition, and the same event rows; the one difference is that a row whose state no longer matches expected_from_state is left alone rather than refused, since a batch has no single caller to hand the refusal to. Returns how many moved.