drift/extras/mysql
Simon Binder 42f66679f1
Publish a simple encrypted version for moor
2019-07-24 19:23:25 +02:00
..
lib Make mysql example a sub-library that we won't publish 2019-07-24 18:25:59 +02:00
.gitignore Make mysql example a sub-library that we won't publish 2019-07-24 18:25:59 +02:00
README.md Make mysql example a sub-library that we won't publish 2019-07-24 18:25:59 +02:00
docker-compose.yaml Make mysql example a sub-library that we won't publish 2019-07-24 18:25:59 +02:00
pubspec.yaml Publish a simple encrypted version for moor 2019-07-24 19:23:25 +02:00

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
  • Some statements don't work
  • Compiled custom queries don't work - we can only parse sqlite. Of course, runtime custom queries with customSelect and customUpdate will work as expected.