File tree Expand file tree Collapse file tree 1 file changed +12
-20
lines changed Expand file tree Collapse file tree 1 file changed +12
-20
lines changed Original file line number Diff line number Diff line change @@ -58,16 +58,12 @@ To create a connection, first create a connection configuration object:
58
58
import PostgresNIO
59
59
60
60
let config = PostgresConnection.Configuration (
61
- connection : .init (
62
- host : " localhost" ,
63
- port : 5432
64
- ),
65
- authentication : .init (
66
- username : " my_username" ,
67
- database : " my_database" ,
68
- password : " my_password"
69
- ),
70
- tls : .disable
61
+ host : " localhost" ,
62
+ port : 5432 ,
63
+ username : " my_username" ,
64
+ password : " my_password" ,
65
+ database : " my_database" ,
66
+ tls : .disable
71
67
)
72
68
```
73
69
@@ -102,16 +98,12 @@ let eventLoopGroup = MultiThreadedEventLoopGroup(numberOfThreads: 1)
102
98
let logger = Logger (label : " postgres-logger" )
103
99
104
100
let config = PostgresConnection.Configuration (
105
- connection : .init (
106
- host : " localhost" ,
107
- port : 5432
108
- ),
109
- authentication : .init (
110
- username : " my_username" ,
111
- database : " my_database" ,
112
- password : " my_password"
113
- ),
114
- tls : .disable
101
+ host : " localhost" ,
102
+ port : 5432 ,
103
+ username : " my_username" ,
104
+ password : " my_password" ,
105
+ database : " my_database" ,
106
+ tls : .disable
115
107
)
116
108
117
109
let connection = try await PostgresConnection.connect (
You can’t perform that action at this time.
0 commit comments