File tree Expand file tree Collapse file tree 2 files changed +9
-8
lines changed
vertx-pg-client/src/main/java/io/vertx/pgclient Expand file tree Collapse file tree 2 files changed +9
-8
lines changed Original file line number Diff line number Diff line change 1717
1818package io .vertx .pgclient ;
1919
20+ import io .vertx .codegen .annotations .Fluent ;
21+ import io .vertx .codegen .annotations .VertxGen ;
22+ import io .vertx .core .AsyncResult ;
23+ import io .vertx .core .Future ;
24+ import io .vertx .core .Handler ;
25+ import io .vertx .core .Vertx ;
2026import io .vertx .core .impl .ContextInternal ;
2127import io .vertx .pgclient .impl .PgConnectionImpl ;
2228import io .vertx .sqlclient .SqlConnection ;
23- import io .vertx .codegen .annotations .Fluent ;
24- import io .vertx .codegen .annotations .VertxGen ;
25- import io .vertx .core .*;
2629
2730/**
2831 * A connection to Postgres.
@@ -52,7 +55,7 @@ public interface PgConnection extends SqlConnection {
5255 * @return a future notified with the connection or the failure
5356 */
5457 static Future <PgConnection > connect (Vertx vertx , PgConnectOptions options ) {
55- return PgConnectionImpl .connect ((ContextInternal ) vertx .getOrCreateContext (), () -> options );
58+ return PgConnectionImpl .connect ((ContextInternal ) vertx .getOrCreateContext (), options );
5659 }
5760
5861 /**
Original file line number Diff line number Diff line change 3030import io .vertx .sqlclient .impl .SocketConnectionBase ;
3131import io .vertx .sqlclient .impl .SqlConnectionBase ;
3232
33- import java .util .function .Supplier ;
34-
3533public class PgConnectionImpl extends SqlConnectionBase <PgConnectionImpl > implements PgConnection {
3634
37- public static Future <PgConnection > connect (ContextInternal context , Supplier < PgConnectOptions > options ) {
35+ public static Future <PgConnection > connect (ContextInternal context , PgConnectOptions options ) {
3836 PgConnectionFactory client ;
3937 try {
4038 client = new PgConnectionFactory (context .owner ());
4139 } catch (Exception e ) {
4240 return context .failedFuture (e );
4341 }
44- return prepareForClose (context , client .connect (context , options . get () )).map (PgConnection ::cast );
42+ return prepareForClose (context , client .connect (context , options )).map (PgConnection ::cast );
4543 }
4644
4745 private volatile Handler <PgNotification > notificationHandler ;
You can’t perform that action at this time.
0 commit comments