2023-07-24 12:05:58 -07:00
|
|
|
An experimental mariadb backend for Drift.
|
|
|
|
|
2023-08-03 02:45:51 -07:00
|
|
|
Note that the backend is currently experimental and not fully functional yet.
|
|
|
|
|
2023-07-24 12:05:58 -07:00
|
|
|
## Using this
|
|
|
|
|
|
|
|
For general notes on using drift, see [this guide](https://drift.simonbinder.eu/getting-started/).
|
|
|
|
|
|
|
|
To use drift_mariadb, add this to your `pubspec.yaml`
|
|
|
|
```yaml
|
|
|
|
dependencies:
|
|
|
|
drift: "$latest version"
|
|
|
|
drift_mariadb:
|
|
|
|
git:
|
|
|
|
url: https://github.com/simolus3/drift.git
|
|
|
|
path: extras/drift_mariadb
|
|
|
|
```
|
|
|
|
|
|
|
|
To connect your drift database class to mariadb, use a `MariaDBDatabase` from `package:drift_mariadb/mariadb.dart`.
|
|
|
|
|
|
|
|
## Testing
|
|
|
|
|
|
|
|
To test this package, first run
|
|
|
|
|
|
|
|
```
|
2023-07-27 02:16:58 -07:00
|
|
|
docker run -p 3306:3306 -e MARIADB_ROOT_PASSWORD=password -e MARIADB_DATABASE=database mariadb:latest
|
2023-07-24 12:05:58 -07:00
|
|
|
```
|
|
|
|
|
|
|
|
It can then be tested with `dart test`.
|