Table of Contents

Enum QueryCommandKind

Namespace
QueryGuard
Assembly
QueryGuard.Core.dll

The kind of relational command that produced a QueryRecord.

public enum QueryCommandKind

Fields

Unknown = 0

The kind could not be determined. Treated as excluded from every budget.

Reader = 1

A command executed for its result set, such as the SQL behind ToList or FirstOrDefault. This is the kind repeated-query detection targets.

Scalar = 2

A command executed for a single scalar result, such as the SQL behind Count or Any.

NonQuery = 3

A command executed for its affected-row count, such as the SQL behind SaveChanges or ExecuteUpdate.

Remarks

Budgets are configured per kind. A budget of ten read queries that silently counted SaveChanges writes as well would mean something different on every endpoint, so the kind is captured and the detector only analyses the kinds a policy opts into.