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 today
07 Oct 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
79 releases · first in 2021
One column per quarter.
Web: Fix OPFS file systems not supporting nested transactions (a regression introduced in version 2.34.3).
Web: Properly release transactions held by closing tabs.
drift 2.35.1
RETURNING statements not being persisted to IndexedDB (#3864).MultiExecutor (#3867).Breaking change (web): Remove PortToChannel extension on dart:html types. Use WebPortToChannel extension on MessagePort from package:web instead.
match, matchExp, highlight, snippet, bm25 and rank are now available as extension methods on FTS5 tables from package:drift/extensions/fts5.dart (#3843). Thanks to @minhqdao!PortToChannel extension on dart:html types. Use WebPortToChannel extension on MessagePort from package:web instead.@DriftDatabase instead of silentlyAllow using rowid extension on virtual tables, as they usually provide rowids as well.
rowid extension on virtual tables, as they usually provide rowids as well.moor from drift.drift_dev command not completing when spawning a schema isolate fails.Web: Use navigator locks around OPFS access to avoid file locking issues.
Web: Flush IndexedDB writes after statements, making writes more reliable.
sqlite3.wasm files are now attached to drift releases directly, making it easier to download compatible workers and WebAssembly files.
Fix reads queued in a MultiExecutor connection pool being resumed in the wrong zone once an executor became available. Because Drift's cancellation to
MultiExecutor connection pool being resumed in the wrong zone once an executor became available. Because Drift's cancellation tokens are zone-scoped, this could cause queries to be cancelled or observed in the wrong zone (#3824).update statements to reference companions.RIGHT or FULL join as nullable (#3812).CaseInsensitiveMap.containsKey to be case-insensitive.Use BEGIN IMMEDIATE to start transactions.
BEGIN IMMEDIATE to start transactions.TableInfo's == and hashCode take into account the database its attached to.Add length extension for blob expressions.
length extension for blob expressions.SqlDialect.duckdb for use with the drift_duckdb package.DevTools extension: Make error messages selectable.
__Potentially breaking change__ Migrate to version 3.x of the sqlite3 package. To upgrade:
sqlite3 package.
To upgrade:
sqlite3.wasm from a 3.x release.sqlcipher_flutter_libs, see this for encryption support and note that SQLite3MultipleCiphers requires additional pragmas to be compatible with SQLCipher databases.serializableConnection(), json1 and TableMigration are no longer marked
as experimental.In step-by-step migrations, automatically throw an error if a database downgrade is attempted. This has always been unsupported, but could lead to the
user_version.Web: Fix databases being moved from IndexedDB to OPFS even if moveExistingIndexedDbToOpfs is disabled.
moveExistingIndexedDbToOpfs is disabled.Add rightOuterJoin and fullOuterJoin.
rightOuterJoin and fullOuterJoin.WasmProbeResult.moveFromIndexedDBToOpfs() method and the
moveExistingIndexedDbToOpfs parameter on WasmDatabase.open. They can be
used to move an existing database stored in IndexedDB to OPFS.Allow specifying ordering for columns in @TableIndex annotation.
@TableIndex annotation.DelegatedDatabase.externalExecutor, allowing transactions started
externally to be used with drift.Batch.insertFromSelect to insert rows from a select statement in a batch.Legacy wasm database: Fix cast issue when compiling with dart2wasm.
dart2wasm.NativeDatabase.createBackground: Allow enabling isolateDebugLog.Add escapeChar argument to like() to generate an ESCAPE clause.
escapeChar argument to like() to generate an ESCAPE clause.Query delegates: Support nested transactions in SupportedTransactionDelegate.
SupportedTransactionDelegate.WasmProbeResult.exportDatabase to export an existing web database as a Uint8List.Allow passing sqlite3 callback to NativeDatabase to customize how SQLite bindings are obtained.
sqlite3 callback to NativeDatabase to customize how SQLite
bindings are obtained.Add isNotNull() column filter for the manager APIs.
isNotNull() column filter for the manager APIs.orderBy parameter to more aggregate function extension.Add support for window functions with WindowFunctionExpression.
WindowFunctionExpression.Fix shared worker feature detection when the main app is compiled with dart2wasm.
dart2wasm.Report SqliteExceptions occurring on workers as SqliteException instances. Previously, they were sent as strings only.
SqliteExceptions occurring on workers as SqliteException
instances. Previously, they were sent as strings only.LazyDatabase being closed without ever being used potentially leaking
resources.Deprecate TypeConverter.json utility in favor of TypeConverter.json2. The new method avoids encoding values twice when mapping drift row classes to JS…
TypeConverter.jsonb to directly store values in the JSONB format used
by SQLite.TypeConverter.json utility in favor of TypeConverter.json2. The
new method avoids encoding values twice when mapping drift row classes to
JSON.runWithInterceptor method to databases to only apply interceptors in
a restricted block.Fix TableStatements.insertAll to only apply a database-specific pragma for SQLite databases.
TableStatements.insertAll to only apply a database-specific pragma for
SQLite databases.fake_async Zone and then
closed outside that zone.Allow building compound select statements in Dart.
NULLS FIRST and NULLS LAST in manager API.Fix generated SQL for insertFromSelect statements with upserts.
insertFromSelect statements with upserts.alterTable for databases where legacy_alter_table is not writable.package:drift/web.dart to be imported into Dart apps compiled with
dart2wasm.Add sqliteAny() method to tables to declare ANY columns.
sqliteAny() method to tables to declare ANY columns.STRICT and WITHOUT ROWID.To infer whether serialization is required for inter-isolate communication, drift now sends a test message instead serializing by default.
View.from is now declared to return a JoinedSelectStatement, the type it
returns at runtime.Nothing published for this version
Fix upcoming unreachable_switch_default lint.
unreachable_switch_default lint.Migrate legacy package:drift/web.dart to the new JS interop SDK libraries. For backwards compatibility, the channel() extension on the MessagePort cla
package:drift/web.dart to the new JS interop SDK libraries.
For backwards compatibility, the channel() extension on the MessagePort
class in dart:html has been kept.
Once dart:html is removed from the Dart SDK, that extension will have to
be removed from drift as well.dart2wasm.drift_worker.js.Mark legacy package:drift/web.dart as deprecated. Users should migrate to package:drift/wasm.dart.
readPool parameter to NativeDatabase. It will spawn an additional
pool of isolates used to serve multiple reads in parallel, which can improve
performance in some specific workloads.TableIndex.sql, allowing database indexes to be defined in SQL without
using drift files.DataClassName.implementing, which can be used to make drift-generated
row classes implement existing interfaces.package:drift/web.dart as deprecated. Users should migrate to
package:drift/wasm.dart.Support version 1.x of package:web.
1.x of package:web.Nothing published for this version
Fix exclusively breaking the database connection on the web. Please note that this requires an updated drift_worker.js to fix.
exclusively breaking the database connection on the web. Please note
that this requires an updated drift_worker.js to fix.Add exclusively method to database classes, allowing a block to temporarily take exclusive control over a database connection without starting a trans
exclusively method to database classes, allowing a block to temporarily
take exclusive control over a database connection without starting a
transaction.enableMigrations parameter to WasmDatabase to control whether drift
migrations are enabled on that database.initiallyDeferred option to references() column builder for foreign
key constraints.dropColumn method to Migrator.selectExpressions method to build select statements without a FROM
clause.BigInt arguments in batched statements sent to web workers.
Note that the fix also requires the latest drift_worker.js to be effective.transaction and exclusively will wait for the transaction or the
exclusive lock to be set up before invoking their callback now.Adds a new interface for writing most simple statements without manually creating select statements and expressions. For a detailed description, see t
generate_manager: false builder optionAggregateFunctionExpression to write custom aggregate function
invocations in the Dart query builder.json_group_array and jsonb_group_array functions now contain an orderBy
and filter parameter.Adds companion entry to DataClassName to override the name of the generated companion class.
companion entry to DataClassName to override the name of the
generated companion class.TypeConverter.extensionType factory to create type converters for
extension types.BLOB literals on postgres.Deprecate Value.ofNullable in favor of Value.absentIfNull, which is more explicit about its behavior and allows nullable types too.
UpdateStatement with
database.update outside of a transaction and then calling
UpdateStatement.write inside of a transaction will now perform the update
inside of the transaction, instead of causing a deadlock.NativeDatabase.createInBackground).EXPLAIN statements, avoiding schema locks.Value.ofNullable in favor of Value.absentIfNull, which is more
explicit about its behavior and allows nullable types too.WasmDatabase to dart:js_interop and package:web.Methods in the query builder API now respect custom types.
DialectAwareSqlType, custom types that depend on the dialect of the
active database connection. This can be used to use native types not
supported by drift (like UUIDs) on databases that support it while falling
back to a text type on sqlite3.enableMigrations parameter to NativeDatabase which can be used to
optionally disable database migrations when opening databases.jsonb functions in the Dart query builder.Fix WasmProbeResult.open ignoring the ìnitializeDatabase callback.
WasmProbeResult.open ignoring the ìnitializeDatabase callback.Add the QueryInterceptor API to easily monitor or transform all database calls made by drift.
QueryInterceptor API to easily monitor or transform all database
calls made by drift.count() extension on tables to easily count rows in tables or views.Fix a race condition causing query streams to not emit new data around some transaction setups.
Fix a bug when running batches over serialized communication channels.
Add APIs to setup Wasm databases with custom drift workers.
Expression.and and Expression.or to create disjunctions and conjunctions
of sub-predicates.Fix readWithConverter throwing an exception for null values in non- nullable columns.
readWithConverter throwing an exception for null values in non-
nullable columns.Add support for table-valued functions in the Dart query builder.
@TableIndex annotation for table classes to add an index to the
table.json_each and json_tree.TypeConverter.json method to define type converters storing JSON
values more easily.TypedResult.readWithConverter to read a column with a type converter
from a join result row.Allow using .read() for a column added to a join from the table, fixing a regression in drift 2.11.0.
.read() for a column added to a join from the table, fixing a
regression in drift 2.11.0.Migrator.runMigrationSteps.Add support for subqueries in the Dart query builder.
isInExp and isNotInExp to construct IS IN expressions with arbitrary
expressions.substr extension on Expression<String> to call the sqlite3 function from
the Dart API.isolateSetup to NativeDatabase.createInBackground() to override native libraries
or perform other database-unrelated setup work.WasmDatabase.probe(), a method probing for available implementations and existing
databases on the web without opening one directly.Adds the schema steps command to drift_dev. It generates an API making it easier to write safe schema migrations (docs).
schema steps command to drift_dev. It generates an API making it
easier to write safe schema migrations (docs).Forbid schemaVersion returning 0, as this causes issues in the migrator.
schemaVersion returning 0, as this causes issues in the migrator.WasmDatabase.open factory as
described in https://drift.simonbinder.eu/web/, you can run a drift database
in modern browsers!Fix prepared statements leaking when the statement cache is disabled.
Performance improvement: Cache and re-use prepared statements - thanks to @davidmartos96
connectToDriftWorker.Don't keep databases in an unusable state if the setup callback throws an exception. Instead, drift will retry the next time the database is used.
setup callback throws an
exception. Instead, drift will retry the next time the database is used.DoUpdate (#2394)computeWithDatabase is called inside a transaction().Add support for CASE expressions without a base in the Dart API with the CaseWhenExpression class.
CASE expressions without a base in the Dart API with the
CaseWhenExpression class.package:drift/web/workers.dart library which makes it easier to
create web workers for drift.Add insertReturningOrNull for potentially empty inserts.
insertReturningOrNull for potentially empty inserts.insertFromSelect to InsertStatement to run INSERT INTO SELECT
statements.rowid parameter to companions for tables with rowids that don't have a
visible alias for the rowid.DriftRemoteException.DO NOTHING during upsert operations with constraint violationsAdd isExp, isValue, isNotExp and isNotValue methods to Expression to generate the IS operator in SQL.
isExp, isValue, isNotExp and isNotValue methods to Expression
to generate the IS operator in SQL.all() extension on tables and views to quickly query all rows.serializableConnection() and computeWithDatabase() as extensions on
databases. The methods allow sharing any drift database between isolates,
regardless of how the database has been set up.DatabaseConnection class now implements QueryExecutor, meaning that
you no longer need a special .connect() constructor to use it.Fix an exception when a client disconnects from a drift remote server while processing a pending table update.
Fix DriftIsolate leaking resources for closed connections.
DriftIsolate leaking resources for closed connections.Your coding agent can read these notes before it upgrades. Set up the MCP server →