From 7106dfc519fc7b4d981b722f2bfa16534dbdcf70 Mon Sep 17 00:00:00 2001 From: Simon Binder Date: Tue, 31 Oct 2023 22:10:51 +0100 Subject: [PATCH] Update to postgres 3.0 beta --- docs/lib/snippets/platforms/postgres.dart | 2 +- extras/drift_postgres/example/main.dart | 2 +- extras/drift_postgres/lib/src/pg_database.dart | 4 ++-- extras/drift_postgres/pubspec.yaml | 2 +- extras/drift_postgres/test/drift_postgres_test.dart | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/lib/snippets/platforms/postgres.dart b/docs/lib/snippets/platforms/postgres.dart index b7060003..24365e4e 100644 --- a/docs/lib/snippets/platforms/postgres.dart +++ b/docs/lib/snippets/platforms/postgres.dart @@ -26,7 +26,7 @@ void main() async { username: 'postgres', password: 'postgres', ), - sessionSettings: SessionSettings( + settings: ConnectionSettings( // If you expect to talk to a Postgres database over a public connection, // please use SslMode.verifyFull instead. sslMode: SslMode.disable, diff --git a/extras/drift_postgres/example/main.dart b/extras/drift_postgres/example/main.dart index b21447e8..4927c4d5 100644 --- a/extras/drift_postgres/example/main.dart +++ b/extras/drift_postgres/example/main.dart @@ -26,7 +26,7 @@ void main() async { username: 'postgres', password: 'postgres', ), - sessionSettings: pg.SessionSettings( + settings: pg.ConnectionSettings( // If you expect to talk to a Postgres database over a public connection, // please use SslMode.verifyFull instead. sslMode: pg.SslMode.disable, diff --git a/extras/drift_postgres/lib/src/pg_database.dart b/extras/drift_postgres/lib/src/pg_database.dart index bdebb372..afc30f14 100644 --- a/extras/drift_postgres/lib/src/pg_database.dart +++ b/extras/drift_postgres/lib/src/pg_database.dart @@ -8,12 +8,12 @@ import 'package:postgres/postgres.dart'; class PgDatabase extends DelegatedDatabase { PgDatabase({ required Endpoint endpoint, - SessionSettings? sessionSettings, + ConnectionSettings? settings, bool logStatements = false, bool enableMigrations = true, }) : super( _PgDelegate( - () => Connection.open(endpoint, sessionSettings: sessionSettings), + () => Connection.open(endpoint, settings: settings), true, enableMigrations, ), diff --git a/extras/drift_postgres/pubspec.yaml b/extras/drift_postgres/pubspec.yaml index 7a2e270a..a5241a3e 100644 --- a/extras/drift_postgres/pubspec.yaml +++ b/extras/drift_postgres/pubspec.yaml @@ -11,7 +11,7 @@ environment: dependencies: collection: ^1.16.0 drift: ^2.0.0 - postgres: ^3.0.0-0 + postgres: ^3.0.0-beta.1 meta: ^1.8.0 uuid: ^4.1.0 diff --git a/extras/drift_postgres/test/drift_postgres_test.dart b/extras/drift_postgres/test/drift_postgres_test.dart index 1f416a94..44474ac4 100644 --- a/extras/drift_postgres/test/drift_postgres_test.dart +++ b/extras/drift_postgres/test/drift_postgres_test.dart @@ -18,7 +18,7 @@ class PgExecutor extends TestExecutor { username: 'postgres', password: 'postgres', ), - sessionSettings: pg.SessionSettings(sslMode: pg.SslMode.disable), + settings: pg.ConnectionSettings(sslMode: pg.SslMode.disable), )); }