DBConnectionProvider<C extends DBConnection> class
abstract
Base class for DBConnection providers.
- Implementers
Constructors
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
-
close(
) → FutureOr< int> - Closes the provider and it's connections.
-
getConnection(
) → FutureOr< C> - Returns a DBConnection to execute commands.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
releaseConnection(
C connection) → FutureOr< bool> - Releases a DBConnection to be reused.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
getProvider(
String type, DBConnectionCredential credential, {Duration retryInterval = const Duration(seconds: 1), int maxRetries = 10, int maxConnections = 1}) → FutureOr< DBConnectionProvider< DBConnection> ?> -
Gets a DBConnectionProvider for
type
withcredential
. -
registerProvider(
String type, DBConnectionProviderInstantiator providerInstantiator) → void - Registers a DBConnectionProvider.