formatting

This commit is contained in:
2026-03-04 22:42:23 -06:00
parent 67a1c02543
commit 95765f50a8
30 changed files with 5172 additions and 336 deletions

View File

@@ -332,9 +332,8 @@ impl ExecutionRepository {
.collect::<Vec<_>>()
.join(", ");
let select_clause = format!(
"{prefixed_select}, enf.rule_ref AS rule_ref, enf.trigger_ref AS trigger_ref"
);
let select_clause =
format!("{prefixed_select}, enf.rule_ref AS rule_ref, enf.trigger_ref AS trigger_ref");
let from_clause = "FROM execution e LEFT JOIN enforcement enf ON e.enforcement = enf.id";
@@ -425,10 +424,7 @@ impl ExecutionRepository {
}
// ── COUNT query ──────────────────────────────────────────────────
let total: i64 = count_qb
.build_query_scalar()
.fetch_one(db)
.await?;
let total: i64 = count_qb.build_query_scalar().fetch_one(db).await?;
let total = total.max(0) as u64;
// ── Data query with ORDER BY + pagination ────────────────────────
@@ -438,10 +434,7 @@ impl ExecutionRepository {
qb.push(" OFFSET ");
qb.push_bind(filters.offset as i64);
let rows: Vec<ExecutionWithRefs> = qb
.build_query_as()
.fetch_all(db)
.await?;
let rows: Vec<ExecutionWithRefs> = qb.build_query_as().fetch_all(db).await?;
Ok(ExecutionSearchResult { rows, total })
}