Drift 2.16.0
simolus3
released this
24 Feb 22:45
·
615 commits
to develop
since this release
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
withdatabase.update
outside of a transaction and then callingUpdateStatement.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 ofValue.absentIfNull
, which is more explicit about its behavior and allows nullable types too. - Migrate
WasmDatabase
todart:js_interop
andpackage: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
ortimestamp
types.