The biggest new feature in this release is the addition of manager APIs, which make it much easier to write common simple queries. The new API has been designed to be easier to use and to avoid boilerplate for common CRUD queries. This feature requires additional code to be generated - if you prefer using the existing APIs exclusively, you can use the generate_manager: false builder option.
Other additions
Drift now supports geopoly tables and queries in .drift files if the extension is enabled.
Add AggregateFunctionExpression to write custom aggregate function invocations in the Dart query builder.
The json_group_array and jsonb_group_array functions now contain an orderBy and filter parameter.
Fixes
Improve finding the correct import alias in generated code for part files.
Drift 2.17.0
Core
Add the TypeConverter.extensionType factory to create type converters for extension types.
Fix invalid SQL syntax being generated for BLOB literals on postgres.
Add a setup parameter to SchemaVerifier. It is called when the verifier creates database connections (similar to the callback on NativeDatabase) and can be used to register custom functions.
Generator
Adds companion entry to DataClassName to override the name of the generated companion class.
Fix drift using the wrong import alias in generated part files.
Add the use_sql_column_name_as_json_key builder option.
Fix parsing binary literals in drift files.
Expand support for IN expressions in drift files, they now support tuples on the left-hand side and the shorthand syntax for table references and table-valued functions.
Allow custom class names for CREATE VIEW statements.
Support the INT64 hint for CREATE TABLE statements.
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.
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Bumps drift_dev and drift. These dependencies needed to be updated together. Updates
drift_dev
from 2.14.1 to 2.18.0Commits
7d1430c
Prepare 2.18 released8b5ff2
Merge pull request #2988 from dickermoshe/refactor-manager-generator0de7615
fix: typoda788c0
refactor: remove small single use snippets from templates8ca18b9
nit: remove extra underscoreaf8dff7
Merge branch 'simolus3:develop' into refactor-manager-generatorc54fdff
Check package names when finding import aliases.f4a2887
Merge branch 'simolus3:develop' into refactor-manager-generator0170918
refactor: refactor manager generator to use readable templates6ba049e
Fix binding bigint values in postgres backendUpdates
drift
from 2.14.1 to 2.18.0Release notes
Sourced from drift's releases.
... (truncated)
Commits
7d1430c
Prepare 2.18 released8b5ff2
Merge pull request #2988 from dickermoshe/refactor-manager-generator0de7615
fix: typoda788c0
refactor: remove small single use snippets from templates8ca18b9
nit: remove extra underscoreaf8dff7
Merge branch 'simolus3:develop' into refactor-manager-generatorc54fdff
Check package names when finding import aliases.f4a2887
Merge branch 'simolus3:develop' into refactor-manager-generator0170918
refactor: refactor manager generator to use readable templates6ba049e
Fix binding bigint values in postgres backendDependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show