database library

Connection, session and transaction contracts shared by ORM modules.

Classes

Capabilities
Driver capabilities are checked before executing dependent operations.
Connection
One acquired physical connection. Ownership belongs to the driver callback.
Database
Owns a driver. Closing waits for active work and invalidates all scopes.
DatabaseEvent
Observable statement and transaction boundaries. Values are not exposed.
Driver
Engines own connection acquisition and release; runtime owns transactions.
QueryResult
A complete result from one database statement.
Session
An explicit execution scope. Transaction scopes expire after their callback.

Enums

Engine
The fixed database engine used by a connection and migration history.
Isolation
Transaction isolation. Drivers reject levels their engine cannot provide.

Functions

openDatabase(Driver driver, {DatabaseObserver? observer}) → Database
Takes ownership of driver and creates an explicit database scope.

Typedefs

DatabaseObserver = void Function(DatabaseEvent event)