Skip to main content

get_live_by_states

Function get_live_by_states 

Source
pub async fn get_live_by_states(
    conn: &mut PgConnection,
    states: &[CreditRegistrationState],
    limit_per_state: i64,
) -> ModelResult<Vec<CreditRegistration>>
Expand description

Live rows in each of the given states, newest activity first within each state, for the Reconciliation lists. limit_per_state caps every state independently, via ROW_NUMBER, so one state with many rows cannot crowd another out of a shared LIMIT.