QueryEvent class final Observe and inspect

Timing and outcome of one SQL statement or cursor operation.

Parameter values are deliberately absent. Observer exceptions are isolated from the operation and cannot turn a successful commit into a failed result.

Constructors

QueryEvent({QueryOperation operation = QueryOperation.execute, required String sql, required int parameterCount, required Duration elapsed, int? rowCount, Object? error})
Records a measured operation without retaining bound parameter values.
const

Properties

elapsed Duration
Elapsed driver execution time, excluding connection acquisition.
final
error Object?
Failure raised by the operation, or null on success.
final
hashCode int
The hash code for this object.
no setterinherited
operation QueryOperation
Kind of statement or cursor operation measured.
final
parameterCount int
Bound value count; cursor fetch and close operations report zero.
final
rowCount int?
Number of returned rows, or null if no result was produced.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sql String
Parameterized command text; cursor events retain their source query SQL.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited