diff --git a/moor/CHANGELOG.md b/moor/CHANGELOG.md index c01fbe12..4d86e978 100644 --- a/moor/CHANGELOG.md +++ b/moor/CHANGELOG.md @@ -1,6 +1,6 @@ -## 4.4.0-dev +## 4.4.0 -- Add `Value.ofNullable` constructor to easily wrap nullable values +- Add `Value.ofNullable` constructor to easily wrap nullable values. - Support selecting views declared in a moor file in Dart (with `select`, `join` and similar methods) - Add the `scoped_dart_components` builder option to generate a function for @@ -11,6 +11,11 @@ - Add the `closeUnderlyingOnClose` argument to `VmDatabase.opened` as an option to keep the underlying instance opened when closing the `VmDatabase`. - The `tableUpdates` stream now emits the relevant updates instead of `null`. +- Reflect type converters in generated columns. The `equalsValue` method can be used + as an equals with a value mapped by a type converter. +- Improve nullability analysis for SQL queries. +- __Note__: You have to re-generate sources with `moor_generator` version 4.4.0 after + upgrading to this version. Apologies for the inconvenience. ## 4.3.2 diff --git a/moor_generator/lib/src/writer/tables/update_companion_writer.dart b/moor_generator/lib/src/writer/tables/update_companion_writer.dart index 2a73067b..702170af 100644 --- a/moor_generator/lib/src/writer/tables/update_companion_writer.dart +++ b/moor_generator/lib/src/writer/tables/update_companion_writer.dart @@ -112,6 +112,7 @@ class UpdateCompanionWriter { ..write('({'); for (final column in table.columns) { + // todo (breaking change): This should not consider type converters. final typeName = column.dartTypeCode(scope.generationOptions); final type = scope.nullableType('Expression<$typeName>'); _buffer.write('$type ${column.dartGetterName}, \n'); diff --git a/moor_generator/pubspec.yaml b/moor_generator/pubspec.yaml index 5a21e76c..e9420255 100644 --- a/moor_generator/pubspec.yaml +++ b/moor_generator/pubspec.yaml @@ -1,6 +1,6 @@ name: moor_generator description: Dev-dependency to generate table and dataclasses together with the moor package. -version: 4.3.2 +version: 4.4.0 repository: https://github.com/simolus3/moor homepage: https://moor.simonbinder.eu/ issue_tracker: https://github.com/simolus3/moor/issues @@ -23,7 +23,7 @@ dependencies: cli_util: '>=0.2.0 <0.4.0' # Moor-specific analysis and apis - moor: ^4.1.0 + moor: ^4.4.0 sqlite3: '>=0.1.6 <2.0.0' sqlparser: ^0.17.0 diff --git a/sqlparser/pubspec.yaml b/sqlparser/pubspec.yaml index 56e9c6aa..e049984d 100644 --- a/sqlparser/pubspec.yaml +++ b/sqlparser/pubspec.yaml @@ -1,6 +1,6 @@ name: sqlparser description: Parses sqlite statements and performs static analysis on them -version: 0.17.0-dev +version: 0.17.0 homepage: https://github.com/simolus3/moor/tree/develop/sqlparser #homepage: https://moor.simonbinder.eu/ issue_tracker: https://github.com/simolus3/moor/issues