Skip to content

Commit 263d071

Browse files
authored
Readme update (#345)
1 parent 004d92a commit 263d071

File tree

1 file changed

+12
-20
lines changed

1 file changed

+12
-20
lines changed

README.md

Lines changed: 12 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -58,16 +58,12 @@ To create a connection, first create a connection configuration object:
5858
import PostgresNIO
5959

6060
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
7167
)
7268
```
7369

@@ -102,16 +98,12 @@ let eventLoopGroup = MultiThreadedEventLoopGroup(numberOfThreads: 1)
10298
let logger = Logger(label: "postgres-logger")
10399

104100
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
115107
)
116108

117109
let connection = try await PostgresConnection.connect(

0 commit comments

Comments
 (0)