Skip to main content

get_or_create_tx

Function get_or_create_tx 

Source
pub async fn get_or_create_tx(
    conn: &mut SqliteConnection,
    slate_id: SlateId,
    fantasy_team_id: FantasyTeamId,
    seed: Option<&Lineup>,
) -> Result<DraftEntry, Error>
Expand description

The resume/seed gate: the one draft row per (slate, fantasy team), inserted when absent — seeded from seed, all-empty for None. Runs on the caller’s write connection: the read-only reader rejects INSERTs.