Skip to content

Commit 5fe62d3

Browse files
committed
Fixup docs a bit more
1 parent 80bd77f commit 5fe62d3

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ Next, use the connection source to create an `EventLoopGroupConnectionPool`. You
148148
`EventLoopGroupConnectionPool` is a collection of pools for each event loop. When using `EventLoopGroupConnectionPool` directly, random event loops will be chosen as needed.
149149

150150
```swift
151-
pools.withConnection { conn
151+
pools.withConnection { conn in
152152
print(conn) // PostgresConnection on randomly chosen event loop
153153
}
154154
```
@@ -159,7 +159,7 @@ To get a pool for a specific event loop, use `pool(for:)`. This returns an `Even
159159
let eventLoop: EventLoop = ...
160160
let pool = pools.pool(for: eventLoop)
161161

162-
pool.withConnection { conn
162+
pool.withConnection { conn in
163163
print(conn) // PostgresConnection on eventLoop
164164
}
165165
```
@@ -170,7 +170,7 @@ Both `EventLoopGroupConnectionPool` and `EventLoopConnectionPool` can be used to
170170

171171
```swift
172172
let postgres = pool.database(logger: ...) // PostgresDatabase
173-
let rows = try postgres.simpleQuery("SELECT version();").wait()
173+
let rows = try await postgres.simpleQuery("SELECT version()")
174174
```
175175

176176
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`.
181181

182182
```swift
183183
let sql = postgres.sql() // SQLDatabase
184-
let planets = try sql.select().column("*").from("planets").all().wait()
184+
let planets = try await sql.select().column("*").from("planets").all()
185185
```
186186

187187
Visit [SQLKit's docs] for more information on using `SQLDatabase`.

Sources/PostgresKit/Docs.docc/PostgresKit.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ To get a pool for a specific event loop, use `pool(for:)`. This returns an `Even
149149
let eventLoop: EventLoop = ...
150150
let pool = pools.pool(for: eventLoop)
151151

152-
pool.withConnection { conn
152+
pool.withConnection { conn in
153153
print(conn) // PostgresConnection on eventLoop
154154
}
155155
```
@@ -160,7 +160,7 @@ Both `EventLoopGroupConnectionPool` and `EventLoopConnectionPool` can be used to
160160

161161
```swift
162162
let postgres = pool.database(logger: ...) // PostgresDatabase
163-
let rows = try postgres.simpleQuery("SELECT version();").wait()
163+
let rows = try await postgres.simpleQuery("SELECT version()")
164164
```
165165

166166
Visit [PostgresNIO's docs] for more information on using `PostgresDatabase`.
@@ -171,7 +171,7 @@ A `PostgresDatabase` can be used to create an instance of `SQLDatabase`.
171171

172172
```swift
173173
let sql = postgres.sql() // SQLDatabase
174-
let planets = try sql.select().column("*").from("planets").all().wait()
174+
let planets = try await sql.select().column("*").from("planets").all()
175175
```
176176

177177
Visit [SQLKit's docs] for more information on using `SQLDatabase`.

0 commit comments

Comments
 (0)