mirror of https://github.com/AMT-Cheif/drift.git
Improve docs related to builders and alternatives
This commit is contained in:
parent
821a1009cf
commit
4394dceffc
|
@ -128,21 +128,18 @@ and minor code changes. Put this content in a file called `build.yaml` next to y
|
||||||
targets:
|
targets:
|
||||||
$default:
|
$default:
|
||||||
builders:
|
builders:
|
||||||
# disable the default generator and enable the one emitting a .moor.dart file
|
# disable the default generators, we'll only use the non-shared moor generator here
|
||||||
moor_generator:
|
auto_apply_builders: false
|
||||||
enabled: false
|
|
||||||
moor_generator|moor_generator_not_shared:
|
moor_generator|moor_generator_not_shared:
|
||||||
enabled: true
|
enabled: true
|
||||||
# If needed, you can configure the builder like this:
|
# If needed, you can configure the builder like this:
|
||||||
# options:
|
# options:
|
||||||
# skip_verification_code: true
|
# skip_verification_code: true
|
||||||
# use_experimental_inference: true
|
# use_experimental_inference: true
|
||||||
|
# This builder is necessary for moor-file preprocessing. You can disable it if you're not
|
||||||
# Run built_value_generator when moor is done, which is not in this target.
|
# using .moor files with type converters.
|
||||||
built_value_generator|built_value:
|
moor_generator|preparing_builder:
|
||||||
enabled: false
|
enabled: true
|
||||||
# all other builders that need to work on moor classes should be disabled here
|
|
||||||
# as well
|
|
||||||
|
|
||||||
run_built_value:
|
run_built_value:
|
||||||
dependencies: ['your_package_name']
|
dependencies: ['your_package_name']
|
||||||
|
|
|
@ -73,9 +73,10 @@ That said, here's an incomplete (and obviously biased) list of great libraries a
|
||||||
If you have experience with any of these (or other) libraries and want to share how they compare to moor, please
|
If you have experience with any of these (or other) libraries and want to share how they compare to moor, please
|
||||||
feel invited to contribute to this page.
|
feel invited to contribute to this page.
|
||||||
|
|
||||||
## sqflite
|
## sqflite, sqlite3
|
||||||
|
|
||||||
Sqflite is a Flutter package that provides bindings to the sqlite api for both iOS and Android. It's well maintained
|
Sqflite is a Flutter package that provides bindings to the sqlite api for both iOS and Android. It's well maintained
|
||||||
and has stable api. In fact, moor is built on top of sqflite to send queries to the database. But even though sqflite
|
and has stable api. In fact, the `moor_flutter` variant is built on top of sqflite. But even though sqflite
|
||||||
has an api to construct some simple queries in Dart, moor goes a bit further by
|
has an api to construct some simple queries in Dart, moor goes a bit further by
|
||||||
|
|
||||||
* Generating typesafe mapping code for your queries
|
* Generating typesafe mapping code for your queries
|
||||||
|
@ -85,6 +86,9 @@ has an api to construct some simple queries in Dart, moor goes a bit further by
|
||||||
|
|
||||||
Still, for most apps that don't need these features, sqflite can be a very fitting persistence library.
|
Still, for most apps that don't need these features, sqflite can be a very fitting persistence library.
|
||||||
|
|
||||||
|
The same thing applies to the `sqlite3` package - `package:moor/ffi.dart` uses that library, but provides
|
||||||
|
additional services on top.
|
||||||
|
|
||||||
### sqlcool
|
### sqlcool
|
||||||
Sqlcool is a lightweight library around sqflite that makes writing queries and schema management easier, it also has
|
Sqlcool is a lightweight library around sqflite that makes writing queries and schema management easier, it also has
|
||||||
auto-updating streams. It can be a decent alternative to moor if you don't want/need generated code to parse the
|
auto-updating streams. It can be a decent alternative to moor if you don't want/need generated code to parse the
|
||||||
|
|
Loading…
Reference in New Issue