pub(crate) async fn count_by_status(
pool: &PgPool,
) -> Result<StreamStatusCounts, Error>Expand description
Returns aggregated upload-status counts for the streams table.
Runs a single GROUP BY upload_status query so this is cheap even with
millions of rows — the planner uses the idx_streams_upload index.
§Errors
Returns sqlx::Error on query failure.