DVDatabase class

The database facade behind DV.Database.

Lives in core, not the Flutter layer: it wraps only DVDatabaseAdapter, and a backend isolate needs it as much as a widget does.

Constructors

DVDatabase()
const

Properties

adapter → DVDatabaseAdapter
The configured adapter.
no setter
configuredAdapter → DVDatabaseAdapter?
The adapter configure was given, or null when nothing configured one.
no setter
hashCode → int
The hash code for this object.
no setterinherited
records → DVRecordAdapter
The record operations for the configured database: the adapter itself when it is a record engine, as a document database is, and otherwise the operations compiled to SQL through this facade, tenant checks and all. Framework code persists through this rather than query.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

acrossTenants<R>(R body()) → R
Runs body with the tenant check off.
configure(DVDatabaseAdapter adapter) → void
configureTenantDatabases(DVDatabaseAdapter open(String tenant)) → void
How to open the database for one tenant, under DVTenantIsolation.databasePerTenant.
execute(String sql, [List<Object?>? params]) → Future<int>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
query(String sql, [List<Object?>? params]) → Future<List<Map<String, Object?>>>
toString() → String
A string representation of this object.
inherited
unconfigure() → void
Forgets the configured adapter. Intended for tests.

Operators

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