mirror of https://github.com/AMT-Cheif/drift.git
821d1620cd | ||
---|---|---|
.. | ||
lib | ||
.gitignore | ||
README.md | ||
docker-compose.yaml | ||
pubspec.yaml |
README.md
Experimental support for using Moor with an MySQL server.
Using this
For general notes on using moor, see this guide.
To use the MySQL backend, also add this to your pubspec (you don't need to depend on
moor_flutter
).
dependencies:
moor: "$latest version"
moor_mysql:
git:
url: https://github.com/simolus3/moor.git
path: extras/mysql
Then, instead of using a FlutterQueryExecutor
, use a MySqlBackend
with the
right ConnectionSettings
.
You'll need to import package:moor_mysql/moor_mysql.dart
.
Limitations
We're currently experimenting with other database engines - Moor was mainly designed for sqlite and supporting advanced features of MySQL is not a priority right now.
- No migrations - you'll need to create your tables manually
- Some statements don't work
- Compiled custom queries don't work - we can only parse sqlite. Of course, runtime custom
queries with
customSelect
andcustomUpdate
will work as expected.