drift/extras/drift_postgres
Simon Binder 8f6878292a
Migrate to `package:lints`
2022-08-13 23:33:05 +02:00
..
lib Change integration tests' dialect to postgres 2022-06-30 19:04:55 +02:00
test Add documentation comments, fix analysis warnings 2022-07-19 23:01:22 +02:00
.gitignore PostgreSQL support (#1507) 2021-11-11 14:40:41 +01:00
README.md Document how to run postgres test 2022-07-02 20:48:51 +02:00
analysis_options.yaml Migrate to `package:lints` 2022-08-13 23:33:05 +02:00
pubspec.yaml Migrate to `package:lints` 2022-08-13 23:33:05 +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.