drivers/sqlite library Independent SQL drivers
SQLite connections with background execution on native platforms and Web.
SqliteOptions.memory works on both platforms. Persistent databases use a native file path or a named browser database through SqliteOptions.persistent.
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.
-
Codec<
T> - Converts a typed Dart value to database storage and decodes it on reads.
- Codecs
- Built-in conversions for SQL scalar values, JSON, and exact numeric types.
- Decimal
- A finite base-ten value, independent of binary floating point.
-
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.
- LocalDate
- A Gregorian calendar date, without a time or timezone. Year 0 is 1 BC; negative years use astronomical numbering.
- LocalDateTime
- Calendar date and wall-clock time, with no timezone or implied UTC instant.
- LocalTime
- A wall-clock time at microsecond resolution, including the endpoint 24:00. The fourth constructor argument is the full fractional second (0..999999).
- Mariadb
- Type marker for MariaDB drivers and sessions.
- Mysql
- Type marker for MySQL drivers and sessions.
- Postgres
- Type marker for PostgreSQL drivers and sessions.
- 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.
- Sqlite
- Type marker for native and browser SQLite drivers and sessions.
- SqliteDriver
- Owns one SQLite connection and serializes complete connection leases.
- SqliteOptions
- Chooses an in-memory, native-file, or browser-persistent SQLite database.
- SqliteWebOptions
- Advanced browser asset overrides. Flutter Web needs no asset configuration.
- SqlJson
- A non-SQL-null JSON document. Its value may itself be JSON null. Drivers use this envelope for parsed JSON, including JSON string scalars.
- SqlReal
- Explicit floating-point SQL input. JavaScript cannot distinguish an integral double from int by runtime type; this preserves the SQL intention.
- SqlResult
- Raw row values and write metadata returned by a completed driver operation.
Enums
- DecimalRounding
- Rounding is explicit; exact rejects a non-zero discarded remainder.
- SqlDialect
- SQL engine used for quoting, parameter syntax, and capability validation.
- SqliteJournal
- Native SQLite journal mode; browser persistence manages its own storage.
Extensions
- InstantPrecision on DateTime
- Explicit precision conversion for resolved UTC instants.
Exceptions / Errors
- OrmException
- An ORM failure with a stable machine-readable code and optional cause.
- SqlFailure
- Adapter classification. Retrying also requires a confirmed rollback and an explicitly repeatable application callback; these flags alone are not enough.
- SqliteFailure
- A SQLite error preserving both the primary and extended result codes.