driver library Independent SQL drivers
Raw SQL connections, bound commands, results, and execution controls.
A Driver leases a SqlConnection for an awaited callback. SqlCommand keeps SQL text separate from values; SqlResult exposes raw rows without generated model decoding. Capabilities reports the operations the concrete engine and adapter can perform.
Concrete drivers are available from package:orm/sqlite.dart,
package:orm/postgres.dart, package:orm/mysql.dart, and
package:orm/mariadb.dart. Import package:orm/sql.dart when you
also need managed sessions and transactions.
Classes
- AcquisitionOptions
- Limits waiting for a connection, including establishment and initialization. Cancellation after acquisition does not cancel the session callback.
- Backend
- Static engine identity used to constrain driver and transaction APIs.
- CancellationToken
- A cancellation request. Await the operation itself to observe its actual database outcome; completion can win a race with cancellation.
- Capabilities Independent SQL drivers
- Features a concrete driver can execute for its actual engine and platform.
-
Driver<
B extends Backend> Independent SQL drivers -
Owns or borrows connection resources for a specific engine
B. - ExecutionOptions
- Per-operation connection acquisition and statement execution controls.
- SqlCommand
- SQL text and separately bound values. Values are never interpolated into SQL.
- SqlConnection Independent SQL drivers
- Execution port for one physical connection during an active driver lease.
- SqlCursor
- Bounded row retrieval tied to the connection lease that opened it.
- SqlResult
- Raw row values and write metadata returned by a completed driver operation.
Enums
- SqlDialect
- SQL engine used for quoting, parameter syntax, and capability validation.
Exceptions / Errors
- SqlFailure
- Adapter classification. Retrying also requires a confirmed rollback and an explicitly repeatable application callback; these flags alone are not enough.