drift/extras/drift_postgres
Simon Binder cc16156c84
Merge branch 'postgres3' into develop
2023-02-25 13:16:33 +01: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 Migrate to `package:lints` 2022-08-13 23:33:05 +02:00
pubspec.yaml Experiment with postgres v3 package 2023-02-01 22:44:12 +01: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.