diff --git a/docs/pages/docs/Dart API/manager.md b/docs/pages/docs/Dart API/manager.md index 022143f7f..c8127ddbf 100644 --- a/docs/pages/docs/Dart API/manager.md +++ b/docs/pages/docs/Dart API/manager.md @@ -5,7 +5,7 @@ data: weight: 1 template: layouts/docs/single -path: /docs/getting-started/manager/ +path: /docs/manager/ --- {% assign snippets = 'package:drift_docs/snippets/dart_api/manager.dart.excerpt.json' | readString | json_decode %} diff --git a/docs/pages/docs/setup.md b/docs/pages/docs/setup.md index d1660c91c..3f0672364 100644 --- a/docs/pages/docs/setup.md +++ b/docs/pages/docs/setup.md @@ -120,6 +120,9 @@ started with drift: - [Dart tables]({{ 'Dart API/tables.md' | pageUrl }}): This page describes how to write your own Dart tables and which classes drift generates for them. +- For new drift users or users not familiar with SQL, the [manager]({{ 'Dart API/manager.md' | pageUrl }}) APIs + for tables allows writing most queries with a syntax you're likely familiar with from ORMs or other + packages. - Writing queries: Drift-generated classes support writing the most common SQL statements, like [selects]({{ 'Dart API/select.md' | pageUrl }}) or [inserts, updates and deletes]({{ 'Dart API/writes.md' | pageUrl }}). - Something to keep in mind for later: When changing the database, for instance by adding new columns diff --git a/drift/CHANGELOG.md b/drift/CHANGELOG.md index 3bc2d499c..4638a5cec 100644 --- a/drift/CHANGELOG.md +++ b/drift/CHANGELOG.md @@ -1,8 +1,10 @@ -## 2.18.0-dev +## 2.18.0 - Adds a new interface for writing most simple statements without manually creating select statements and expressions. - For a detailed description, see the [documentation website](https://drift.simonbinder.eu/docs/getting-started/manager/). + For a detailed description, see the [documentation website](https://drift.simonbinder.eu/docs/manager/). + 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](https://drift.simonbinder.eu/docs/advanced-features/builder_options/) - Add `AggregateFunctionExpression` to write custom [aggregate function](https://www.sqlite.org/lang_aggfunc.html) invocations in the Dart query builder. - The `json_group_array` and `jsonb_group_array` functions now contain an `orderBy` diff --git a/drift/lib/src/runtime/manager/manager.dart b/drift/lib/src/runtime/manager/manager.dart index 4edf9abf3..c81f153ed 100644 --- a/drift/lib/src/runtime/manager/manager.dart +++ b/drift/lib/src/runtime/manager/manager.dart @@ -405,7 +405,7 @@ abstract class BaseTableManager< Stream