Skip to content

Commit 004d92a

Browse files
authored
Update Readme (#344)
1 parent 98b8e1b commit 004d92a

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

README.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
[![Team Chat](https://img.shields.io/discord/431917998102675485.svg)][Team Chat]
66
[![MIT License](http://img.shields.io/badge/license-MIT-brightgreen.svg)][MIT License]
77
[![Continuous Integration](https://github.com/vapor/postgres-nio/actions/workflows/test.yml/badge.svg)][Continuous Integration]
8-
[![Swift 5.5](http://img.shields.io/badge/swift-5.5-brightgreen.svg)][Swift 5.5]
8+
[![Swift 5.6](http://img.shields.io/badge/swift-5.6-brightgreen.svg)][Swift 5.6]
99
<br>
1010
<br>
1111

@@ -19,6 +19,7 @@ Features:
1919
- Integrated with the Swift server ecosystem, including use of [SwiftLog].
2020
- Designed to run efficiently on all supported platforms (tested extensively on Linux and Darwin systems)
2121
- Support for `Network.framework` when available (e.g. on Apple platforms)
22+
- Supports running on Unix Domain Sockets
2223

2324
PostgresNIO does not provide a `ConnectionPool` as of today, but this is a [feature high on our list](https://github.com/vapor/postgres-nio/issues/256). If you need a `ConnectionPool` today, please have a look at Vapor's [PostgresKit].
2425

@@ -35,7 +36,7 @@ Add `PostgresNIO` as dependency to your `Package.swift`:
3536

3637
```swift
3738
dependencies: [
38-
.package(url: "https://github.com/vapor/postgres-nio.git", from: "1.8.0"),
39+
.package(url: "https://github.com/vapor/postgres-nio.git", from: "1.14.0"),
3940
...
4041
]
4142
```
@@ -79,7 +80,7 @@ import NIOPosix
7980
let eventLoopGroup = MultiThreadedEventLoopGroup(numberOfThreads: 1)
8081

8182
// Much later
82-
try eventLoopGroup.syncShutdown()
83+
try await eventLoopGroup.shutdownGracefully()
8384
```
8485

8586
A [`Logger`] is also required.
@@ -124,7 +125,7 @@ let connection = try await PostgresConnection.connect(
124125
try await connection.close()
125126

126127
// Shutdown the EventLoopGroup, once all connections are closed.
127-
try eventLoopGroup.syncShutdown()
128+
try await eventLoopGroup.shutdownGracefully()
128129
```
129130

130131
#### Querying
@@ -148,7 +149,7 @@ for try await row in rows {
148149
However, in most cases it is much easier to request a row's fields as a set of Swift types:
149150

150151
```swift
151-
for try await (id, username, birthday) in rows.decode((Int, String, Date).self, context: .default) {
152+
for try await (id, username, birthday) in rows.decode((Int, String, Date).self) {
152153
// do something with the datatypes.
153154
}
154155
```
@@ -191,7 +192,7 @@ Please see [SECURITY.md] for details on the security process.
191192
[Team Chat]: https://discord.gg/vapor
192193
[MIT License]: LICENSE
193194
[Continuous Integration]: https://github.com/vapor/postgres-nio/actions
194-
[Swift 5.5]: https://swift.org
195+
[Swift 5.6]: https://swift.org
195196
[Security.md]: https://github.com/vapor/.github/blob/main/SECURITY.md
196197

197198
[`PostgresConnection`]: https://swiftpackageindex.com/vapor/postgres-nio/documentation/postgresnio/postgresconnection/

0 commit comments

Comments
 (0)