Table of Contents

Class CompletedQueryGuardSession

Namespace
QueryGuard
Assembly
QueryGuard.Core.dll

A frozen snapshot of everything one session captured.

public sealed class CompletedQueryGuardSession
Inheritance
CompletedQueryGuardSession
Inherited Members

Remarks

Separating this from QueryGuardSession is what makes "a completed session cannot change" a type-level guarantee rather than a convention. Policy evaluation, assertions, and reporters all consume this type, so none of them can accidentally mutate what they are reporting on.

Constructors

CompletedQueryGuardSession(string, Guid, QueryGuardPolicy, DateTimeOffset, TimeSpan, IReadOnlyList<QueryRecord>, int)

Initializes a new instance of the CompletedQueryGuardSession class.

Properties

CountedCommandCount

Gets how many captured commands count toward this session's policy budgets.

DroppedRecordCount

Gets how many records arrived after the session was completed and were therefore dropped.

Elapsed

Gets how long the session was open, measured with a monotonic clock.

FailedCommandCount

Gets how many captured commands failed.

Id

Gets the session identifier.

Name

Gets what the session measured: a route pattern or a test name.

Policy

Gets the policy this session is evaluated against.

Records

Gets the captured commands, in capture order and therefore in sequence order.

StartedAt

Gets when the session opened, in UTC.

TotalDatabaseDuration

Gets the summed duration of every captured command.

Methods

ToString()

Returns a string that represents the current object.