From ea776f8637c664beb067b46296620bc01f730af8 Mon Sep 17 00:00:00 2001 From: Simon Binder Date: Sat, 20 Apr 2019 15:38:15 +0200 Subject: [PATCH] Update docs for 1.3 --- docs/_includes/content/getting_started.md | 6 ++--- docs/_layouts/default.html | 1 + docs/_sass/navigation.scss | 4 +++ docs/index.md | 33 +++++++---------------- moor_generator/pubspec.yaml | 1 + 5 files changed, 19 insertions(+), 26 deletions(-) diff --git a/docs/_includes/content/getting_started.md b/docs/_includes/content/getting_started.md index a0eb68a2..0d3aaf40 100644 --- a/docs/_includes/content/getting_started.md +++ b/docs/_includes/content/getting_started.md @@ -12,7 +12,7 @@ dev_dependencies: ``` We're going to use the `moor_flutter` library to specify tables and access the database. The `moor_generator` library will take care of generating the necessary code so the -library knows how your table structure looks like. +library knows what your table structure looks like. ### Declaring tables Using moor, you can model the structure of your tables with simple dart code: @@ -52,11 +52,11 @@ class MyDatabase { __⚠️ Note:__ The column definitions, the table name and the primary key must be known at compile time. For column definitions and the primary key, the function must use the `=>` -operator and can't contain anything more than what's included in this `readme` and the +operator and can't contain anything more than what's included in the documentation and the examples. Otherwise, the generator won't be able to know what's going on. ### Generating the code -Moor integrates with the dart `build` system, so you can generate all the code needed with +Moor integrates with Dart's `build` system, so you can generate all the code needed with `flutter packages pub run build_runner build`. If you want to continously rebuild the generated code whever you change your code, run `flutter packages pub run build_runner watch` instead. After running either command once, the moor generator will have created a class for your diff --git a/docs/_layouts/default.html b/docs/_layouts/default.html index 555b6451..624caccd 100644 --- a/docs/_layouts/default.html +++ b/docs/_layouts/default.html @@ -30,6 +30,7 @@ {% comment %} Changes from upstream here to include pub badge {% endcomment %} diff --git a/docs/_sass/navigation.scss b/docs/_sass/navigation.scss index 364c569a..200b886f 100644 --- a/docs/_sass/navigation.scss +++ b/docs/_sass/navigation.scss @@ -102,6 +102,10 @@ } } +.aux-nav li { + display: inline-block; +} + .navigation-list-toggle { position: absolute; right: $sp-4; diff --git a/docs/index.md b/docs/index.md index 2b4ccb90..54ddbf86 100644 --- a/docs/index.md +++ b/docs/index.md @@ -29,30 +29,17 @@ now run your queries with fluent Dart code ## [Writing queries]({{"queries" | absolute_url }}) - - -## TODO-List and current limitations +## TODO-List +There are some sql features like `group by` statements which aren't natively supported by moor yet. +However, as moor supports [custom sql queries]({{"queries/custom" | absolute_url}}), there are easy +workarounds for most entries on this list. Custom queries work well together with the regular api, +as they integrate with stream queries and automatic result parsing. ### Limitations (at the moment) -Please note that a workaround for most on this list exists with custom statements. - -- No `group by` or window functions - -### Planned for the future These aren't sorted by priority. If you have more ideas or want some features happening soon, let me know by [creating an issue]({{site.github_link}}/issues/new)! -- Simple `COUNT(*)` operations (group operations will be much more complicated) -- Support Dart VM apps -- References - - DSL API - - Support in generator - - Validations -- Bulk inserts +- No `group by`, count, or window functions +- Support other platforms: + - VM apps + - Web apps via `AlaSQL` or a different engine? +- References (can be expressed via custom constraints, see issue [#14](https://github.com/simolus3/moor/issues/14)) - When inserts / updates fail due to invalid data, explain why that happened -### Interesting stuff that would be nice to have -Implementing this will very likely result in backwards-incompatible changes. - -- Find a way to hide implementation details from users while still making them - accessible for the generated code -- `GROUP BY` grouping functions -- Support for different database engines - - Support webapps via `AlaSQL` or a different engine diff --git a/moor_generator/pubspec.yaml b/moor_generator/pubspec.yaml index 43a638fb..c725ada0 100644 --- a/moor_generator/pubspec.yaml +++ b/moor_generator/pubspec.yaml @@ -18,6 +18,7 @@ dependencies: build_runner: '>=1.1.0 <1.4.0' build_config: ^0.3.1 moor: ^1.3.0 + meta: '>= 1.0.0 <2.0.0' dev_dependencies: test: ^1.6.0