DatabaseModule class final

Installs one SQL database with explicit resource ownership.

Inheritance

Constructors

DatabaseModule.borrowed(SqlDatabase database)
Installs a caller-owned database without closing it on context disposal.
DatabaseModule.owned(SqlDatabase database)
Installs a database that closes when the application context is disposed.

Properties

database → SqlDatabase
The database registered by this module.
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

dispose(AppContext context) → FutureOr<void>
Releases resources owned by this module.
override
initialize(AppContext context) → FutureOr<void>
Starts work after every module has registered its values.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
register(ModuleRegistry registry) → void
Registers the values and bindings owned by this module.
override
toString() → String
A string representation of this object.
inherited

Operators

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