Table of Contents

Class QueryFingerprint

Namespace
QueryGuard
Assembly
QueryGuard.Core.dll

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

public sealed class QueryFingerprint : IEquatable<QueryFingerprint>
Inheritance
QueryFingerprint
Implements
Inherited Members

Remarks

The identifier is what appears in allowlist configuration, in issue reports, and in CI output, so it must be identical across processes, runs, and target frameworks. The normalized text travels with it because a fingerprint a developer cannot read is not evidence.

Fingerprints group textually equivalent SQL. They are deliberately conservative: grouping two genuinely different statements would make a report actively misleading, while failing to group two equivalent ones only makes QueryGuard quieter. See docs/decisions/0005-sql-fingerprints.md.

Constructors

QueryFingerprint(string, string)

Initializes a new instance of the QueryFingerprint class.

Fields

IdPrefix

The prefix on every fingerprint identifier, making it recognizable in logs and issue text.

Properties

Id

Gets the stable identifier, for example QG-FP-1A2B3C4D.

NormalizedSql

Gets the normalized and redacted SQL this fingerprint was derived from.

Methods

Equals(QueryFingerprint?)

Indicates whether the current object is equal to another object of the same type.

Equals(object?)

Determines whether the specified object is equal to the current object.

GetHashCode()

Serves as the default hash function.

ToString()

Returns a string that represents the current object.