QueryInterceptor class abstract base

An interceptor for SQL queries.

This wraps an existing DriftSession implemented by drift, and by default does nothing. However, specific methods can be overriden to customize the behavior of an existing database session implementation.

To apply an interceptor to a session, use ApplyInterceptor.interceptWith. This returns a new DriftSession which can be used as a replacement when opening the database.

For an example on how interceptors may be used and installed, see this documentation page: https://drift.simonbinder.eu/docs/examples/tracing/

Constructors

QueryInterceptor()

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

begin(DriftTransactionParent parent, TransactionOptions options) → Future<DriftSession>
Intercept DriftTransactionParent.begin calls.
close(DriftSession session) → Future<void>
Intercept DriftSession.close calls.
commit(DriftTransactionSession transaction) → Future<void>
Intercept DriftTransactionSession.commit calls.
execute(DriftSession session, StatementInfo statement) → Future<QueryResult>
Intercept DriftSession.execute calls.
executeBatch(DriftSession session, StatementBatch batch) → Future<List<QueryResult>>
Intercept DriftSession.executeBatch calls.
getSchemaVersion(PersistentSchemaVersion session) → Future<int>
Intercept DriftRootSession.schemaVersion calls.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
rollback(DriftTransactionSession transaction) → Future<void>
Intercept DriftTransactionSession.rollback calls.
toString() → String
A string representation of this object.
inherited
writeSchemaVersion(PersistentSchemaVersion session, int version) → Future<void>
Intercept DriftRootSession.writeSchemaVersion calls.

Operators

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