DriftConnection class final

A pending connection that can be opened into a OpenedDriftConnection.

DriftConnection instances don't hold any resources before open is called.

Available extensions

Constructors

DriftConnection.withImplementation({required DriftDialectFactory dialect, required Future<OpenedDriftConnection> implementation(DriftDialect)})
A drift connection resolving to the implementation when opened.

Properties

dialect → DriftDialectFactory
The dialect to use when generating SQL statements.
final
hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

interceptWith(QueryInterceptor interceptor, {bool sticky = true}) → DriftConnection

Available on DriftConnection, provided by the ApplyInterceptorConnection extension

Returns a DriftConnection that will use the same stream queries as this, but replaces its executor by wrapping it with the interceptor.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
open([DriftDialect? resolvedDialect]) → Future<OpenedDriftConnection>
Opens the connection.
toString() → String
A string representation of this object.
inherited

Operators

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

Static Methods

delayed(Future<DriftConnection> open(), {required DriftDialectFactory dialect}) → DriftConnection
A drift connection referring to another DriftConnection lazily when opening.