chore(data-layer): low-severity cleanups — SQLite param chunking, KPI metric catalog, computed-column predicate guard

This commit is contained in:
Joseph Doherty
2026-07-09 09:32:04 -04:00
parent b58d810dbe
commit acd8a6b8b5
6 changed files with 138 additions and 41 deletions
@@ -155,6 +155,12 @@ public class AuditLogEntityTypeConfiguration : IEntityTypeConfiguration<AuditLog
// rejected at CREATE. It is not indexed, so non-persistence costs nothing.
// Routed through the nullable UTC converter so the materialised value
// carries Kind=Utc.
//
// NEVER use IngestedAtUtc in a WHERE predicate — it is non-persisted
// (stored:false), so any filter on it forces a full-table JSON_VALUE parse of
// DetailsJson on every row (no index can back it). Read-side projection only
// (arch-review 04, P7). Filter on OccurredAtUtc (the partition-aligned clustered
// key) instead.
builder.Property(e => e.IngestedAtUtc)
.HasColumnType("datetime2(7)")
.HasConversion(NullableUtcConverter)