NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
pub.dev · #314 most downloaded on pub.dev
Drift is a reactive library to store relational data in Dart and Flutter applications.
Last release 4 days ago
30 Sep 2026
Ships on a steady schedule
a new release about every 4 weeks
Nearly every release is documented
notes for 58 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
5 years old
78 releases · first in 2021
One column per quarter.
Add the JsonTypeConverter2 mixin. It behaves similar to the existing json type converters, but can use a different SQL and JSON type.
JsonTypeConverter2 mixin. It behaves similar to the existing json
type converters, but can use a different SQL and JSON type.isInValues and isNotInValues methods to columns with type converters.
They can be used to compare the column against a list of Dart expressions that
will be mapped through a type converter.TableStatements.insertAll to atomically insert multiple rows.singleClientMode to remote() and DriftIsolate connections to make
the common case with one client more efficient.NativeDatabase.createInBackground as a drop-in replacement for
NativeDatabase. It creates a drift isolate behind the scenes, avoiding all
of the boilerplate usually involved with drift isolates.Always escape column names, avoiding the costs of using a regular expression to check whether they need to be escaped.
operator ~,
bitwiseAnd and bitwiseOr.Improve stack traces when using watchSingle() with a stream emitting a non- singleton list at some point.
watchSingle() with a stream emitting a non-
singleton list at some point.OrderingTerm.nulls to control the NULLS FIRST or NULLS LAST clause
in Dart.Nothing published for this version
Revert the breaking change around QueryRow.read only returning non-nullable values now - it was causing issues with type inference in some cases.
QueryRow.read only returning non-nullable
values now - it was causing issues with type inference in some cases.Fix an error when inserting a null value into a nullable column defined with additional checks in Dart.
💡: More information on how to migrate is available in the documentation.
💡: More information on how to migrate is available in the documentation.
toSql and fromSql.SqlTypeSystem and subtypes of SqlType:
DriftSqlType enumSqlTypes,
reachable via database.options.types.Expressions (including Columns) always have a non-nullable type
parameter now. They are implicitly nullable, so TypedResult.read now returns a
nullable value.QueryRow.read can only read non-nullable values now. To read nullable
values, use readNullable.includeJoinedTableColumns parameter on selectOnly().
The method now behaves as if that parameter was turned off. To use columns from a
joined table, add them with addColumns.fromData factory on generated data classes. Use the
map method on tables instead.BEGIN or COMMIT
across database implementations.writeReturning to update statements; deleteReturning and goAndReturn
to delete statatements.Fix the NativeDatabase not disposing statements if running them threw an exception #1917.
NativeDatabase not disposing statements if running them threw an
exception #1917.Add the int64() column builder to store large integers. These integers are still stored as 64-bit ints in the database, but represented as a BigInt in
int64() column builder to store large integers. These integers are
still stored as 64-bit ints in the database, but represented as a BigInt in
Dart. This enables better web support for integers larger than 2^52.
More details are in the documentation.filter and distinct support to groupConcat.sqflite-based implementation if the first operation
in a transaction is a future backed by a query stream.Add the unique() method to columns and the uniqueKeys override for tables to define unique constraints in Dart tables.
unique() method to columns and the uniqueKeys override for tables
to define unique constraints in Dart tables.check() method to the Dart column builder to generate CHECK column
constraints.JsonTypeConverter.package:drift/wasm.dart library. It uses WebAssembly
to access sqlite3 without any external JavaScript libraries, but requires you to
add a WebAssembly module
to the web/ folder.
Please note that this specific library is not subject to semantic versioning
until it leaves its experimental state. It also isn't suitable for production
use at the moment.package:js to wrap sql.js.Add DataClassName.extending to control the superclass of generated row classes.
DataClassName.extending to control the superclass of generated row
classes.setup parameter to the constructors of WebDatabase too.CREATE VIEW statements.MultiExecutor.withReadPool constructor to load-balance between multiple
reading executors. This can be used in a multi-isolate approach if some
queries are expensive.Deprecate the from(table) API introduced in 1.3.0. Having the methods on the table instances turned out to be even easier!
update(todos).replace(newEntry), you can
now write todos.replaceOne(newEntry).from(table) API introduced in 1.3.0. Having the methods on
the table instances turned out to be even easier!LIST(SELECT ...) as a result column to
get all results of the inner select as a List in the result set.Add the from(table) method to generated databases. It can be used to write common queries more concisely.
from(table) method to generated databases. It can be used to write
common queries more concisely.groupConcat nullable in the Dart API.NativeDatabase when multiple statements are run in
a single call. In previous versions, parts of the SQL string would otherwise
be ignored.Properly support stream update queries on views.
getSingle() or watchSingle() is used on a
query emitting more than one row.Rollback transactions when a commit fails.
serialize parameter to false on the DriftIsolate methods.Add the references method to BuildColumn to reference a column declared in another Dart table.
references method to BuildColumn to reference a column declared
in another Dart table.generateInsertable option to @UseRowClass. When enabled, the generator
will emit an extension to use the row class as an Insertable.
Thanks to @westito.new_sql_code_generation option in specific scenarios..drift files.generatedAs method to declare generated columns for Dart tables.OrderingTerm.random to fetch rows in a random order.Add DoUpdate.withExcluded to refer to the excluded row in an upsert clause.
DoUpdate.withExcluded to refer to the excluded row in an upsert clause.where clause to DoUpdate constructorsThis is the initial release of the drift package (formally known as moor).
For an overview of old moor releases, see its changelog.
Nothing published for this version
Your coding agent can read these notes before it upgrades. Set up the MCP server →