Skip to main content

claim_send_slots

pub async fn claim_send_slots(
    conn: &mut PgConnection,
    new: &[NewAccountLinkingEmail],
    token_ids: &[Uuid],
) -> ModelResult<HashSet<Uuid>>
Expand description

Batched form of claim_send_slot, keyed by token: returns the student_number_verification_token_id of every row actually inserted, so the caller can tell which candidates lost the race to the unique index.

token_ids[i] is the token already minted for new[i], taken separately rather than read from new[i].student_number_verification_token_id: that field stays Option because it really can be absent on the single-row claim_send_slot, but a batched claim always has one.