From e38719a1946faebb59da3d3be3001d2c0f287649 Mon Sep 17 00:00:00 2001 From: Simon Binder Date: Thu, 22 Aug 2019 12:27:39 +0200 Subject: [PATCH] Write changelogs, prepare release 1.7 --- .../tests/lib/database/database.dart | 5 +++-- moor/CHANGELOG.md | 2 +- moor/pubspec.yaml | 6 +++--- moor_flutter/CHANGELOG.md | 16 ++++++++++++++++ moor_flutter/pubspec.yaml | 8 ++++---- moor_generator/CHANGELOG.md | 4 ++++ moor_generator/pubspec.yaml | 14 +++++++------- sqlparser/CHANGELOG.md | 4 ++++ sqlparser/pubspec.yaml | 2 +- 9 files changed, 43 insertions(+), 18 deletions(-) diff --git a/extras/integration_tests/tests/lib/database/database.dart b/extras/integration_tests/tests/lib/database/database.dart index e53263ef..c4590641 100644 --- a/extras/integration_tests/tests/lib/database/database.dart +++ b/extras/integration_tests/tests/lib/database/database.dart @@ -110,8 +110,9 @@ class Database extends _$Database { Future deleteUser(User user, {bool fail = false}) { return transaction((_) async { final id = user.id; - delete(friendships) - .where((f) => or(f.firstUser.equals(id), f.secondUser.equals(id))); + await (delete(friendships) + ..where((f) => or(f.firstUser.equals(id), f.secondUser.equals(id)))) + .go(); if (fail) { throw Exception('oh no, the query misteriously failed!'); diff --git a/moor/CHANGELOG.md b/moor/CHANGELOG.md index 277bb79a..629372ff 100644 --- a/moor/CHANGELOG.md +++ b/moor/CHANGELOG.md @@ -1,4 +1,4 @@ -## unreleased +## 1.7.0 - Support custom columns via type converters. See the [docs](https://moor.simonbinder.eu/type_converters) for details on how to use this feature. - Transactions now roll back when not completed successfully, they also rethrow the exception diff --git a/moor/pubspec.yaml b/moor/pubspec.yaml index bea04ddc..165ae7c2 100644 --- a/moor/pubspec.yaml +++ b/moor/pubspec.yaml @@ -1,6 +1,6 @@ name: moor description: Moor is a safe and reactive persistence library for Dart applications -version: 1.6.0 +version: 1.7.0 repository: https://github.com/simolus3/moor homepage: https://moor.simonbinder.eu/ issue_tracker: https://github.com/simolus3/moor/issues @@ -12,8 +12,8 @@ environment: sdk: '>=2.2.2 <3.0.0' dependencies: - meta: '>= 1.0.0 <2.0.0' - collection: '>= 1.0.0 <2.0.0' + meta: ^1.0.0 + collection: ^1.0.0 synchronized: ^2.1.0 pedantic: any diff --git a/moor_flutter/CHANGELOG.md b/moor_flutter/CHANGELOG.md index dceffae6..04986155 100644 --- a/moor_flutter/CHANGELOG.md +++ b/moor_flutter/CHANGELOG.md @@ -1,3 +1,19 @@ +## 1.7.0 +- Support custom columns via type converters. See the [docs](https://moor.simonbinder.eu/type_converters) +for details on how to use this feature. +- Transactions now roll back when not completed successfully, they also rethrow the exception +to make debugging easier. +- New `backends` api, making it easier to write database drivers that work with moor. Apart from +`moor_flutter`, new experimental backends can be checked out from git: + 1. `encrypted_moor`: An encrypted moor database: https://github.com/simolus3/moor/tree/develop/extras/encryption + 2. `moor_mysql`: Work in progress mysql backend for moor. https://github.com/simolus3/moor/tree/develop/extras/mysql +- The compiled sql feature is no longer experimental and will stay stable until a major version bump +- New, experimental support for `.moor` files! Instead of declaring your tables in Dart, you can + choose to declare them with sql by writing the `CREATE TABLE` statement in a `.moor` file. + You can then use these tables in the database and with daos by using the `include` parameter + on `@UseMoor` and `@UseDao`. Again, please notice that this is an experimental api and there + might be some hiccups. Please report any issues you run into. + ## 1.6.0 - Experimental web support! See [the documentation](https://moor.simonbinder.eu/web) for details. - Make transactions easier to use: Thanks to some Dart async magic, you no longer need to run diff --git a/moor_flutter/pubspec.yaml b/moor_flutter/pubspec.yaml index 3fc53ed1..9b55aba3 100644 --- a/moor_flutter/pubspec.yaml +++ b/moor_flutter/pubspec.yaml @@ -1,6 +1,6 @@ name: moor_flutter description: Flutter implementation of moor, a safe and reactive persistence library for Dart applications -version: 1.6.0 +version: 1.7.0 repository: https://github.com/simolus3/moor homepage: https://moor.simonbinder.eu/ issue_tracker: https://github.com/simolus3/moor/issues @@ -12,10 +12,10 @@ environment: sdk: ">=2.0.0-dev.68.0 <3.0.0" dependencies: - moor: ^1.6.0 + moor: ^1.7.0 sqflite: ^1.1.0 - meta: '>=1.0.0 <1.2.0' - path: '>=1.0.0 <2.0.0' + meta: ^1.0.0 + path: ^1.0.0 flutter: sdk: flutter diff --git a/moor_generator/CHANGELOG.md b/moor_generator/CHANGELOG.md index 97e63add..733077f5 100644 --- a/moor_generator/CHANGELOG.md +++ b/moor_generator/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.7.0 +- Support type converters that were introduced in moor 1.7 +- Support parsing and generating code for `.moor` files (see [docs](https://moor.simonbinder.eu/docs/using-sql/custom_tables/)). + ## 1.6.0+2 - Generate code to expand array variables diff --git a/moor_generator/pubspec.yaml b/moor_generator/pubspec.yaml index 1c774a7e..3417e4f5 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: 1.6.0+2 +version: 1.7.0 repository: https://github.com/simolus3/moor homepage: https://moor.simonbinder.eu/ issue_tracker: https://github.com/simolus3/moor/issues @@ -14,21 +14,21 @@ environment: dependencies: analyzer: '>=0.36.0 <0.39.0' recase: ^2.0.1 - built_value: '>=6.3.0 <7.0.0' + built_value: ^6.3.0 source_gen: ^0.9.4 source_span: ^1.5.5 build: ^1.1.0 build_config: '>=0.3.1 <1.0.0' - moor: ^1.6.0 - meta: '>= 1.0.0 <2.0.0' - sqlparser: ^0.1.2 + moor: ^1.7.0 + meta: ^1.1.0 + sqlparser: ^0.2.0 dev_dependencies: test: ^1.6.0 test_api: ^0.2.0 test_core: ^0.2.0 - build_runner: '>=1.1.0 <1.6.0' + build_runner: ^1.6.7 built_value_generator: '>=6.3.0 <7.0.0' - build_test: '>=0.10.0 <0.11.0' + build_test: ^0.10.0 dependency_overrides: sqlparser: diff --git a/sqlparser/CHANGELOG.md b/sqlparser/CHANGELOG.md index c48db485..961eb570 100644 --- a/sqlparser/CHANGELOG.md +++ b/sqlparser/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.2.0 +- Parse `CREATE TABLE` statements +- Extract schema information from parsed create table statements with `SchemaFromCreateTable`. + ## 0.1.2 - parse `COLLATE` expressions - fix wrong order in parsed `LIMIT` clauses diff --git a/sqlparser/pubspec.yaml b/sqlparser/pubspec.yaml index 60d45c55..9ff135fe 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.1.2 +version: 0.2.0 homepage: https://github.com/simolus3/moor/tree/develop/sqlparser #homepage: https://moor.simonbinder.eu/ issue_tracker: https://github.com/simolus3/moor/issues