Skip to content

Drift 2.16.0

Compare
Choose a tag to compare
@simolus3 simolus3 released this 24 Feb 22:45
· 559 commits to develop since this release
drift-2.16.0
417c2c1

Drift 2.16.0 mostly contains performance and stability improvements:

  • When a migration throws, the database will now block subsequent operations instead of potentially allowing them to operate on a database in an inconsistent state.
  • Improve stack traces for errors happening on drift isolates (which includes usages of NativeDatabase.createInBackground).
  • Statements built through the Dart query builder will now run in the context active while they are running, instead of the context active at the time they were created. For instance, creating an 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.
  • Improve performance when reading results from joined statements with many rows.
  • Don't cache EXPLAIN statements, avoiding schema locks.
  • Deprecate Value.ofNullable in favor of Value.absentIfNull, which is more explicit about its behavior and allows nullable types too.
  • Migrate WasmDatabase to dart:js_interop and package:web.

Improvements to the generator

  • Allow selecting from virtual tables using the table-valued function syntax.
  • Keep import alias when referencing existing elements in generated code (#2845).

Improvements to drift_postgres

  • Drift's comparable expression operators are now available for expressions using postgres-specific date or timestamp types.