Skip to main content

plan_sequence_allocation

Function plan_sequence_allocation 

Source
pub fn plan_sequence_allocation(
    adapter: &dyn DatabaseOperations,
    config: &DbBackendConfig,
    schema: &AppSchema,
    request: SequenceAllocation<'_>,
) -> Result<(i64, Vec<Mutation>), DatabaseError>
Expand description

Plans a compare-and-write allocation for inclusion in the consuming transaction. A failed consumer rolls back the counter; concurrent stale plans conflict.