drift/extras/drift_postgres
Simon Binder 18946f5580
Scaffold MariaDb integration tests
2023-07-24 21:44:43 +02:00
..
example Fix postgres tests 2023-02-09 10:53:41 +01:00
lib nested transaction support in PgDatabase 2023-02-09 11:17:03 +01:00
test Merge branch 'postgres3' into develop 2023-02-25 13:16:33 +01:00
.gitignore PostgreSQL support (#1507) 2021-11-11 14:40:41 +01:00
README.md Merge branch 'postgres3' into develop 2023-02-25 13:16:33 +01:00
analysis_options.yaml Fix lints and warnings added in Dart 3.0 2023-05-12 22:42:21 +02:00
pubspec.yaml Scaffold MariaDb integration tests 2023-07-24 21:44:43 +02:00

README.md

An experimental postgres backend for Drift.

Using this

For general notes on using drift, see this guide.

To use drift_postgres, add this to your pubspec.yaml

dependencies:
  drift: "$latest version"
  drift_postgres:
   git:
    url: https://github.com/simolus3/drift.git
    path: extras/drift_postgres

To connect your drift database class to postgres, use a PgDatabase from package:drift_postgres/postgres.dart.

Testing

To test this package, first run

docker run -p 5432:5432 -e POSTGRES_USER=postgres -e POSTGRES_PASSWORD=postgres postgres

It can then be tested with dart test.