You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -148,7 +148,7 @@ Next, use the connection source to create an `EventLoopGroupConnectionPool`. You
148
148
`EventLoopGroupConnectionPool` is a collection of pools for each event loop. When using `EventLoopGroupConnectionPool` directly, random event loops will be chosen as needed.
149
149
150
150
```swift
151
-
pools.withConnection { conn
151
+
pools.withConnection { conn in
152
152
print(conn) // PostgresConnection on randomly chosen event loop
153
153
}
154
154
```
@@ -159,7 +159,7 @@ To get a pool for a specific event loop, use `pool(for:)`. This returns an `Even
159
159
let eventLoop: EventLoop =...
160
160
let pool = pools.pool(for: eventLoop)
161
161
162
-
pool.withConnection { conn
162
+
pool.withConnection { connin
163
163
print(conn) // PostgresConnection on eventLoop
164
164
}
165
165
```
@@ -170,7 +170,7 @@ Both `EventLoopGroupConnectionPool` and `EventLoopConnectionPool` can be used to
170
170
171
171
```swift
172
172
let postgres = pool.database(logger: ...) // PostgresDatabase
173
-
let rows =try postgres.simpleQuery("SELECT version();").wait()
173
+
let rows =tryawaitpostgres.simpleQuery("SELECT version()")
174
174
```
175
175
176
176
Visit [PostgresNIO's docs] for more information on using `PostgresDatabase`.
@@ -181,7 +181,7 @@ A `PostgresDatabase` can be used to create an instance of `SQLDatabase`.
181
181
182
182
```swift
183
183
let sql = postgres.sql() // SQLDatabase
184
-
let planets =try sql.select().column("*").from("planets").all().wait()
184
+
let planets =tryawaitsql.select().column("*").from("planets").all()
185
185
```
186
186
187
187
Visit [SQLKit's docs] for more information on using `SQLDatabase`.
0 commit comments