Table of Contents

Namespace QueryGuard

Classes

AsyncLocalQueryGuardSessionAccessor

The default IQueryGuardSessionAccessor, backed by AsyncLocal<T>.

CompletedQueryGuardSession

A frozen snapshot of everything one session captured.

QueryBudgetEvaluator

Evaluates a policy's budgets against a completed session's groups and produces findings.

QueryFinding

One piece of evidence produced by evaluating a completed session against a policy.

QueryFingerprint

A stable identity for a normalized SQL statement, together with the normalized text that justifies it.

QueryFingerprintFactory

The default IQueryFingerprintFactory: redact, then hash.

QueryFingerprintGroup

Every command in a completed session that shares one QueryFingerprint, aggregated.

QueryGuardAllowlistEntry

Records that a specific repeated query is intentional, and why.

QueryGuardAnalyzer

Turns a completed session into a QueryGuardResult: groups commands by fingerprint and reports what the evidence supports.

QueryGuardBaseline

What every measured scope cost at a known-good point, so a change can be compared against it.

QueryGuardBaselineComparison

The result of comparing a set of measured scopes against a baseline.

QueryGuardBaselineEntry

What one scope cost when the baseline was recorded.

QueryGuardBaselineFormatException

Thrown when a baseline document cannot be read.

QueryGuardCaptureOptions

Controls exactly how much QueryGuard retains about each observed command.

QueryGuardOrigin

Where a query was executed from: the source file and line, parsed out of a captured stack trace.

QueryGuardPolicy

A named set of query budgets and thresholds evaluated against a completed session.

QueryGuardQueryTag

Recognizes QueryGuard directives that travel with a query as an EF Core tag.

QueryGuardRedactor

The default IQueryGuardRedactor.

QueryGuardResult

The immutable outcome of evaluating one completed session against its policy.

QueryGuardScopeComparison

How one scope compares to what it cost when the baseline was recorded.

QueryGuardSession

The unit QueryGuard measures: one HTTP request, or one integration test.

QueryRecord

One relational command observed inside a QueryGuardSession.

RuleNames

The identifiers of the rules QueryGuard evaluates.

SqlNormalizer

The default ISqlNormalizer: a single conservative pass over the text.

Interfaces

IQueryBudgetEvaluator

Decides whether what a session did is acceptable, given its policy.

IQueryFingerprintFactory

Turns a database command's text into a stable QueryFingerprint.

IQueryGuardRedactor

The single point through which anything QueryGuard is about to retain or emit must pass.

IQueryGuardSessionAccessor

Provides the session that commands observed on the current asynchronous flow belong to.

IQueryGuardSessionActivation

A handle that keeps one session current until it is disposed.

ISqlNormalizer

Reduces provider-generated SQL to a comparable form so that two executions of the same logical query produce the same text.

Enums

QueryCommandKind

The kind of relational command that produced a QueryRecord.

QueryFindingKind

What kind of evidence a QueryFinding reports.

QueryGuardSeverity

How strongly QueryGuard reacts when a rule is not satisfied.