Enum QueryFindingKind
- Namespace
- QueryGuard
- Assembly
- QueryGuard.Core.dll
What kind of evidence a QueryFinding reports.
public enum QueryFindingKind
Fields
RepeatedQueryCandidate = 0The same normalized SQL was executed repeatedly inside one scope.
This is evidence of a potential N+1 pattern, not proof of one. QueryGuard observes SQL text, so it can prove repetition and nothing more. Bounded lookups, retries, and deliberate per-tenant fan-out all produce repeated SQL legitimately. See
docs/decisions/0003-detector-terminology.md.TotalQueryBudget = 1The session executed more read commands than its budget allows.
FingerprintOccurrenceBudget = 2A single fingerprint occurred more times than its budget allows.
This is the rule that actually catches an N+1 regression: a total-count budget can stay satisfied while one query quietly repeats.
DuplicateGroupBudget = 3More fingerprints exceeded the repetition threshold than the budget allows.
One repeated group is usually a single bug. Five repeated groups in one endpoint is a structural problem, and a policy should be able to say so.
TotalDurationBudget = 4The summed duration of captured commands exceeded the budget.
Disabled by default. CI machines are noisy, and a duration budget that fires intermittently teaches users to distrust every other finding.
SlowQuery = 5A single command took longer than the configured threshold.
CommandFailure = 6A database command failed. Recorded as evidence alongside the original exception, which is never replaced or hidden.