From 9967c32df262ce5faec2b0b7afc07dd5e3fcb862 Mon Sep 17 00:00:00 2001 From: Thomas Middel Date: Tue, 25 Apr 2023 11:34:28 +0200 Subject: [PATCH] Release 1.4.2 --- README.md | 6 +- docs/changelog.md | 14 +- example/pubspec.lock | 24 +-- floor/CHANGELOG.md | 6 + floor/README.md | 11 +- floor/pubspec.lock | 44 ++--- floor/pubspec.yaml | 9 +- floor_annotation/CHANGELOG.md | 296 ++++++++++++++++++++++++++++++---- floor_annotation/pubspec.lock | 2 +- floor_annotation/pubspec.yaml | 2 +- floor_generator/CHANGELOG.md | 6 + floor_generator/pubspec.lock | 13 +- floor_generator/pubspec.yaml | 5 +- 13 files changed, 348 insertions(+), 90 deletions(-) diff --git a/README.md b/README.md index 768746dd..bb040ea3 100644 --- a/README.md +++ b/README.md @@ -37,10 +37,10 @@ The third dependency is `build_runner` which has to be included as a dev depende dependencies: flutter: sdk: flutter - floor: ^1.4.1 + floor: ^1.4.2 dev_dependencies: - floor_generator: ^1.4.1 + floor_generator: ^1.4.2 build_runner: ^2.1.2 ``` @@ -166,7 +166,7 @@ For bugs please use [GitHub Issues](https://github.com/pinchbv/floor/issues). For questions, ideas, and discussions use [GitHub Discussions](https://github.com/pinchbv/floor/discussions). ## License - Copyright 2022 The Floor Project Authors + Copyright 2023 The Floor Project Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/docs/changelog.md b/docs/changelog.md index 65d5c493..6945e64f 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -1,5 +1,11 @@ # Changelog +## 1.4.2 + +* Changed TypeConverters priority +* Ignore ordering of constructors to always take the public, non-factory constructor +* Return result of table modifications through queries + ## 1.4.1 ### Changes @@ -161,12 +167,12 @@ All credits for this release go to mqus. ## 0.13.0 -!!! attention - ### Breaking Change +### ⚠️ Breaking Changes - * Apply camel case to constants +**You need to migrate the explicit usages of `OnConflictStrategy` and `ForeignKeyAction` from snake +case to camel case.** - You need to migrate the explicit usages of `OnConflictStrategy` and `ForeignKeyAction` from snake case to camel case. +* Apply camel case to constants ### Changes diff --git a/example/pubspec.lock b/example/pubspec.lock index e816b3c5..e0d64796 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -215,21 +215,21 @@ packages: path: "../floor" relative: true source: path - version: "1.4.1" + version: "1.4.2" floor_annotation: dependency: transitive description: path: "../floor_annotation" relative: true source: path - version: "1.4.1" + version: "1.4.2" floor_generator: dependency: "direct dev" description: path: "../floor_generator" relative: true source: path - version: "1.4.1" + version: "1.4.2" flutter: dependency: "direct main" description: flutter @@ -292,10 +292,10 @@ packages: dependency: transitive description: name: js - sha256: "5528c2f391ededb7775ec1daa69e65a2d61276f7552de2b5f7b8d34ee9fd4ab7" + sha256: "323b7c70073cccf6b9b8d8b334be418a3293cfb612a560dc2737160a37bf61bd" url: "https://pub.dev" source: hosted - version: "0.6.5" + version: "0.6.6" json_annotation: dependency: transitive description: @@ -324,10 +324,10 @@ packages: dependency: transitive description: name: matcher - sha256: "16db949ceee371e9b99d22f88fa3a73c4e59fd0afed0bd25fc336eb76c198b72" + sha256: c94db23593b89766cda57aab9ac311e3616cf87c6fa4e9749df032f66f30dcb8 url: "https://pub.dev" source: hosted - version: "0.12.13" + version: "0.12.14" material_color_utilities: dependency: transitive description: @@ -364,10 +364,10 @@ packages: dependency: transitive description: name: path - sha256: db9d4f58c908a4ba5953fcee2ae317c94889433e5024c27ce74a37f94267945b + sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917" url: "https://pub.dev" source: hosted - version: "1.8.2" + version: "1.8.3" pool: dependency: transitive description: @@ -529,10 +529,10 @@ packages: dependency: transitive description: name: test_api - sha256: ad540f65f92caa91bf21dfc8ffb8c589d6e4dc0c2267818b4cc2792857706206 + sha256: "6182294da5abf431177fccc1ee02401f6df30f766bc6130a0852c6b6d7ee6b2d" url: "https://pub.dev" source: hosted - version: "0.4.16" + version: "0.4.18" timing: dependency: transitive description: @@ -590,5 +590,5 @@ packages: source: hosted version: "3.1.1" sdks: - dart: ">=2.19.0 <3.0.0" + dart: ">=2.19.0 <4.0.0" flutter: ">=3.3.0" diff --git a/floor/CHANGELOG.md b/floor/CHANGELOG.md index 91681f55..6945e64f 100644 --- a/floor/CHANGELOG.md +++ b/floor/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## 1.4.2 + +* Changed TypeConverters priority +* Ignore ordering of constructors to always take the public, non-factory constructor +* Return result of table modifications through queries + ## 1.4.1 ### Changes diff --git a/floor/README.md b/floor/README.md index a731b59a..bb040ea3 100644 --- a/floor/README.md +++ b/floor/README.md @@ -37,10 +37,10 @@ The third dependency is `build_runner` which has to be included as a dev depende dependencies: flutter: sdk: flutter - floor: ^1.4.1 + floor: ^1.4.2 dev_dependencies: - floor_generator: ^1.4.1 + floor_generator: ^1.4.2 build_runner: ^2.1.2 ``` @@ -86,7 +86,10 @@ import 'package:floor/floor.dart'; @dao abstract class PersonDao { @Query('SELECT * FROM Person') - Future> findAllPersons(); + Future> findAllPeople(); + + @Query('SELECT name FROM Person') + Stream> findAllPeopleName(); @Query('SELECT * FROM Person WHERE id = :id') Stream findPersonById(int id); @@ -163,7 +166,7 @@ For bugs please use [GitHub Issues](https://github.com/pinchbv/floor/issues). For questions, ideas, and discussions use [GitHub Discussions](https://github.com/pinchbv/floor/discussions). ## License - Copyright 2022 The Floor Project Authors + Copyright 2023 The Floor Project Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/floor/pubspec.lock b/floor/pubspec.lock index fb9b76b7..85d4fe9c 100644 --- a/floor/pubspec.lock +++ b/floor/pubspec.lock @@ -146,7 +146,7 @@ packages: source: hosted version: "4.4.0" collection: - dependency: "direct dev" + dependency: "direct main" description: name: collection sha256: cfc915e6923fe5ce6e153b0723c753045de46de1b4d63771530504004a45fae0 @@ -212,17 +212,19 @@ packages: floor_annotation: dependency: "direct main" description: - path: "../floor_annotation" - relative: true - source: path - version: "1.4.1" + name: floor_annotation + sha256: fa3fa4f198cdd1d922a69ceb06e54663fe59256bf1cb3c036eff206b445a6960 + url: "https://pub.dev" + source: hosted + version: "1.4.2" floor_generator: dependency: "direct dev" description: - path: "../floor_generator" - relative: true - source: path - version: "1.4.1" + name: floor_generator + sha256: "40aaf1b619adc03367ce4b7c79161e3198d43b572b5ec9cc99a4a89de27b08d2" + url: "https://pub.dev" + source: hosted + version: "1.4.2" flutter: dependency: "direct main" description: flutter @@ -285,10 +287,10 @@ packages: dependency: transitive description: name: js - sha256: "5528c2f391ededb7775ec1daa69e65a2d61276f7552de2b5f7b8d34ee9fd4ab7" + sha256: "323b7c70073cccf6b9b8d8b334be418a3293cfb612a560dc2737160a37bf61bd" url: "https://pub.dev" source: hosted - version: "0.6.5" + version: "0.6.6" json_annotation: dependency: transitive description: @@ -317,10 +319,10 @@ packages: dependency: "direct dev" description: name: matcher - sha256: "16db949ceee371e9b99d22f88fa3a73c4e59fd0afed0bd25fc336eb76c198b72" + sha256: c94db23593b89766cda57aab9ac311e3616cf87c6fa4e9749df032f66f30dcb8 url: "https://pub.dev" source: hosted - version: "0.12.13" + version: "0.12.14" material_color_utilities: dependency: transitive description: @@ -365,10 +367,10 @@ packages: dependency: "direct main" description: name: path - sha256: db9d4f58c908a4ba5953fcee2ae317c94889433e5024c27ce74a37f94267945b + sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917" url: "https://pub.dev" source: hosted - version: "1.8.2" + version: "1.8.3" pool: dependency: transitive description: @@ -439,13 +441,13 @@ packages: source: hosted version: "2.2.6" sqflite_common: - dependency: transitive + dependency: "direct dev" description: name: sqflite_common - sha256: "963dad8c4aa2f814ce7d2d5b1da2f36f31bd1a439d8f27e3dc189bb9d26bc684" + sha256: "220831bf0bd5333ff2445eee35ec131553b804e6b5d47a4a37ca6f5eb66e282c" url: "https://pub.dev" source: hosted - version: "2.4.3" + version: "2.4.4" sqflite_common_ffi: dependency: "direct main" description: @@ -530,10 +532,10 @@ packages: dependency: transitive description: name: test_api - sha256: ad540f65f92caa91bf21dfc8ffb8c589d6e4dc0c2267818b4cc2792857706206 + sha256: "6182294da5abf431177fccc1ee02401f6df30f766bc6130a0852c6b6d7ee6b2d" url: "https://pub.dev" source: hosted - version: "0.4.16" + version: "0.4.18" timing: dependency: transitive description: @@ -591,5 +593,5 @@ packages: source: hosted version: "3.1.1" sdks: - dart: ">=2.19.0 <3.0.0" + dart: ">=2.19.0 <4.0.0" flutter: ">=3.3.0" diff --git a/floor/pubspec.yaml b/floor/pubspec.yaml index 7e3a38d1..2b1761d4 100644 --- a/floor/pubspec.yaml +++ b/floor/pubspec.yaml @@ -2,7 +2,7 @@ name: floor description: > The typesafe, reactive, and lightweight SQLite abstraction for your Flutter applications. This library is the runtime dependency. -version: 1.4.1 +version: 1.4.2 homepage: https://pinchbv.github.io/floor/ repository: https://github.com/pinchbv/floor issue_tracker: https://github.com/pinchbv/floor/issues @@ -12,8 +12,9 @@ environment: sdk: '>=2.12.0 <3.0.0' dependencies: + collection: ^1.15.0 floor_annotation: - path: ../floor_annotation/ + path: ../floor_annotation flutter: sdk: flutter meta: ^1.7.0 @@ -24,10 +25,10 @@ dependencies: dev_dependencies: build_runner: ^2.1.2 - collection: ^1.15.0 floor_generator: - path: ../floor_generator/ + path: ../floor_generator flutter_test: sdk: flutter matcher: ^0.12.10 mockito: ^5.0.15 + sqflite_common: ^2.4.4 diff --git a/floor_annotation/CHANGELOG.md b/floor_annotation/CHANGELOG.md index 8f2e1cae..6945e64f 100644 --- a/floor_annotation/CHANGELOG.md +++ b/floor_annotation/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## 1.4.2 + +* Changed TypeConverters priority +* Ignore ordering of constructors to always take the public, non-factory constructor +* Return result of table modifications through queries + ## 1.4.1 ### Changes @@ -26,10 +32,49 @@ * Allow release drafter to create GitHub releases * Support latest analyzer -## 1.0.1 +## 1.2.0 + +### Changes + +* Improve escaping by using library + +### 🐛 Bug Fixes + +* Bugfix/nullable transaction return + +### 🛠 Maintenance * Update dependencies +## 1.1.0 + +All credits for this release go to mqus. + +### Changes + +* Update deps +* Increase test coverage +* Bump locked floor_generator version to 1.0.1 + +### 🚀 Features + +* Add onConfigure callback + +### 🐛 Bug Fixes + +* Retain index ordering + +## 1.0.1 + +### Changes + +* Bump mockito to 5.0.3 +* Update dependencies to null-safe versions + +### 🚀 Features + +* Improved Parameter mapping for query methods + ## 1.0.0 ### Changes @@ -40,50 +85,236 @@ * Make floor null-safe +## 0.19.1 + +### Changes + +* Remove floor example to pass static analysis + +## 0.19.0 + +### Changes + +* Update website theme +* Update license with all authors +* Fix getting started syntax highlighting +* Improve FTS documentation +* Introduce tab navigation to website +* Fix typo in doc title +* Improve website +* Slim down README +* Create MkDocs website +* Add isolates section to README +* Run CI only on pushes to develop +* Use GitHub Discussions for ideas and feedback +* Add example to floor package + +### 🚀 Features + +* Add Full-text Search support + +### 🐛 Bug Fixes + +* Fix desktop database path retrieval + +## 0.18.0 + +* Documentation update on DateTimeConverter sample +* Change ForeignKeyAction to enum in the generator +* Add primary key auto increment test + +### 🚀 Features + +* Add support for WITH statements for DatabaseViews + +### 🐛 Bug Fixes + +* More tolerant query with list parameter parsing + +## 0.17.0 + +### 🐛 Bug Fixes + +* Generate distinct type converter instances +* Fix generation of DAO method with list argument using type converters + +## 0.16.0 + +### 🚀 Features + +* Add **experimental** support for type converters + +## 0.15.0 + +### Changes + +* Update dependencies + +### 🚀 Features + +* Add support for WITHOUT ROWID tables +* Check transaction method return types and allow non-void returns + +## 0.14.0 + +### Changes + +* Document entity inheritance and add integration test +* Raise minimum sqflite version to 1.3.0 +* add integration test for transaction rollback +* Mention missing null propagation in streams +* Fix types (integer instead of real) + +## 0.13.0 + +### ⚠️ Breaking Changes + +**You need to migrate the explicit usages of `OnConflictStrategy` and `ForeignKeyAction` from snake +case to camel case.** + +* Apply camel case to constants + +### Changes + +* Mention SQL centricity of Floor in README +* Add banner to README +* Update the description of the library +* Migrate OnConflictStrategy to enum +* Add more precise limitations of entity class and streams to README +* Add DAO inheritance example to README +* Fix database and DAO usage example in the README +* Update README.md +* Assert example app's behavior +* Mention that floor uses first constructor found in entity class +* Remove snapshot version instructions from README + +### 🚀 Features + +* Support Linux, macOS, Windows +* Implement simple Streams on DatabaseViews, fix multi-dao changelistener + +### 🐛 Bug Fixes + +* Await database path retrieval +* Fix boolean conversion issues, add regression test, fix indentation +* Fix wrongly parsed arguments in @Query + ## 0.12.0 -* Add `@Fts3` and `@Fts4` annotations +### Changes + +* Ignore Getters&Setters +* Use Flutter bundled pub to get and upgrade project dependencies +* Generate database implementation on every CI run +* Throw exception when querying for unsupported type +* Add generated code for example app +* Add workflow scripts +* Run real database tests on development machine and CI + +### 🚀 Features + +* Support ByteArrays/Blobs +* Support inherited fields for entities and views +* Support database views +* Support inherited DAO methods +* Support asynchronous migrations + +### 🐛 Bug Fixes + +* Fix failing SQLite installation process on CI +* Fix failing stream query test ## 0.11.0 -* Change `ForeignKeyAction` int constants to enum +### Changes + +* Refactor string utility function into extension function +* Refactor annotation check functions to use extension functions +* Refactor type check functions to use extension functions + +### 🚀 Features + +* Ignore fields of entities by adding ignore annotation +* Handle named constructor parameters and ignore field order +* Exclude static fields from entity mapping ## 0.10.0 -* Add experimental `TypeConverter` abstract class and `TypeConverters` annotation +### Changes + +* Update dependencies +* Update README with correct instructions to initialize in memory database + +### 🐛 Bug Fixes + +* Make in-memory database actually be just in memory ## 0.9.0 -* Update meta package +### 🐛 Bug Fixes + +* Make IN clauses work with strings +* Fix foreign key action string representation ## 0.8.0 -**⚠️ You need to migrate the explicit usages of `OnConflictStrategy` and `ForeignKeyAction` from -snake case to camel case.** +### Changes -* Apply camel case to constants +* Update README with clear package import instructions + +### 🚀 Features + +* Introduce static 'to map' functions +* Add optional callback functions when opening database + +### 🐛 Bug Fixes + +* Allow int and string (composite) primary keys ## 0.7.0 -* Add @DatabaseView annotation +### 🐛 Bug Fixes + +* Retain reactivity when using transactions ## 0.6.0 -* Add @ignore annotation +### 🚀 Features + +* Add support for IN clauses in query statements +* Enable compound primary keys ## 0.5.0 -* Update dependency +### Changes + +* Make tasks deletable in example app -## 0.4.0 +### 🚀 Features + +* Allow multiline string queries +* Allow void-return queries with arguments + +## 0.4.2 + +### 🐛 Bug Fixes -* Add primary key field to @Entity annotation +* Fix query parameter substitution regex -## 0.3.1 +## 0.4.0 ### Changes -* Revert meta package to version 1.1.6 +* Enable coverage report +* Simplify type assertions and add tests + +### 🚀 Features + +* Allow more convenient database initialization + +### 🐛 Bug Fixes + +* Use query argument binding instead of manual binding ## 0.3.0 @@ -101,6 +332,7 @@ snake case to camel case.** ### 🐛 Bug Fixes * Correct mapper instance name referenced by generated query methods +* Fix adapter instances naming ## 0.2.0 @@ -125,20 +357,20 @@ snake case to camel case.** ### 🚀 Features -* Support conflict strategies when inserting and updating records (#67) @vitusortner -* Add support for running queries that return void (#61) @vitusortner -* Add support for foreign keys (#59) @vitusortner -* Add parameter verification for query methods (#57) @vitusortner -* Return deleted row count on delete (#53) @vitusortner -* Return updated rows count on update (#52) @vitusortner -* Return ID/s of inserted item/s (#51) @vitusortner -* Add support for transactions (#49) @vitusortner -* Add support for changing (insert, update, delete) lists (#42) @vitusortner -* Support custom entity name (#41) @vitusortner -* Enable NOT NULL columns (#40) @vitusortner -* Enable custom column name mapping (#39) @vitusortner -* Add delete methods code generation and fix update methods (#22) @vitusortner -* Add update methods code generation (#21) @vitusortner -* Add insert methods code generation (#20) @vitusortner -* Add code generator for query methods (#17) @vitusortner -* Code generation for database creation (#13) @vitusortner +* Support conflict strategies when inserting and updating records +* Add support for running queries that return void +* Add support for foreign keys +* Add parameter verification for query methods +* Return deleted row count on delete +* Return updated rows count on update +* Return ID/s of inserted item/s +* Add support for transactions +* Add support for changing (insert, update, delete) lists +* Support custom entity name +* Enable NOT NULL columns +* Enable custom column name mapping +* Add delete methods code generation and fix update methods +* Add update methods code generation +* Add insert methods code generation +* Add code generator for query methods +* Code generation for database creation diff --git a/floor_annotation/pubspec.lock b/floor_annotation/pubspec.lock index b5c9c7d4..91d69e7d 100644 --- a/floor_annotation/pubspec.lock +++ b/floor_annotation/pubspec.lock @@ -10,4 +10,4 @@ packages: source: hosted version: "1.9.1" sdks: - dart: ">=2.12.0 <3.0.0" + dart: ">=2.12.0 <4.0.0" diff --git a/floor_annotation/pubspec.yaml b/floor_annotation/pubspec.yaml index 16982720..1a5e4062 100644 --- a/floor_annotation/pubspec.yaml +++ b/floor_annotation/pubspec.yaml @@ -2,7 +2,7 @@ name: floor_annotation description: > The typesafe, reactive, and lightweight SQLite abstraction for your Flutter applications. Don't use this package directly. Import the floor package instead. -version: 1.4.1 +version: 1.4.2 homepage: https://pinchbv.github.io/floor/ repository: https://github.com/pinchbv/floor issue_tracker: https://github.com/pinchbv/floor/issues diff --git a/floor_generator/CHANGELOG.md b/floor_generator/CHANGELOG.md index 91681f55..6945e64f 100644 --- a/floor_generator/CHANGELOG.md +++ b/floor_generator/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## 1.4.2 + +* Changed TypeConverters priority +* Ignore ordering of constructors to always take the public, non-factory constructor +* Return result of table modifications through queries + ## 1.4.1 ### Changes diff --git a/floor_generator/pubspec.lock b/floor_generator/pubspec.lock index ef1651a8..3916ef11 100644 --- a/floor_generator/pubspec.lock +++ b/floor_generator/pubspec.lock @@ -180,10 +180,11 @@ packages: floor_annotation: dependency: "direct main" description: - path: "../floor_annotation" - relative: true - source: path - version: "1.4.1" + name: floor_annotation + sha256: fa3fa4f198cdd1d922a69ceb06e54663fe59256bf1cb3c036eff206b445a6960 + url: "https://pub.dev" + source: hosted + version: "1.4.2" frontend_server_client: dependency: transitive description: @@ -337,7 +338,7 @@ packages: source: hosted version: "1.5.1" pub_semver: - dependency: transitive + dependency: "direct dev" description: name: pub_semver sha256: "307de764d305289ff24ad257ad5c5793ce56d04947599ad68b3baa124105fc17" @@ -554,4 +555,4 @@ packages: source: hosted version: "3.1.1" sdks: - dart: ">=2.19.0 <3.0.0" + dart: ">=2.19.0 <=3.3.8" diff --git a/floor_generator/pubspec.yaml b/floor_generator/pubspec.yaml index 7012d64b..e7e95a70 100644 --- a/floor_generator/pubspec.yaml +++ b/floor_generator/pubspec.yaml @@ -2,7 +2,7 @@ name: floor_generator description: > The typesafe, reactive, and lightweight SQLite abstraction for your Flutter applications. This library is the dev dependency. -version: 1.4.1 +version: 1.4.2 homepage: https://pinchbv.github.io/floor/ repository: https://github.com/pinchbv/floor issue_tracker: https://github.com/pinchbv/floor/issues @@ -18,7 +18,7 @@ dependencies: code_builder: ^4.1.0 collection: ^1.15.0 floor_annotation: - path: ../floor_annotation/ + path: ../floor_annotation meta: ^1.7.0 source_gen: ^1.2.2 strings: ^0.2.1 @@ -28,6 +28,7 @@ dev_dependencies: dart_style: ^2.2.3 mockito: ^5.2.0 path: ^1.8.0 + pub_semver: ^2.1.3 test: ^1.21.1 test_cov: git: