PostgresNIO 1.18.0
🚀 This PostgresNIO release adds a number of changes that allow users to fully embrace structured concurrency:
- Prepared statement async/await support
- Notification listen async/await support
- Users don't need to provide EventLoops when creating a connection
🚨 This release changes the behavior of PostgresConnection.close()
. Before this release a call to close()
triggered a graceful shutdown of the connection. This means that all previously enqueued queries got executed before the connection was closed. Starting with 1.18.0
close()
leads to a direct connection closure cancelling the running and all queued queries. This change is necessary to get rid of connections to servers where the server stopped responding. The previous behavior can be achieved using the new closeGracefully()
function on PostgresConnection.
SemVer Minor
- Add async listen; Refactor all listen code (#264, #392)
- Add
PostgresDynamicTypeThrowingEncodable
andPostgresDynamicTypeEncodable
(#365, patch credit to @marius-se) - Use
EventLoop
provided by SwiftNIO'sMultiThreadedEventLoopGroup.singleton
(#389, patch credit to @tkrajacic) async
/await
prepared statement API (#390, patch credit to @mariosangiorgio)close()
closes immediately; Add newcloseGracefully()
(#383, #397, #400)
SemVer Patch
- Use variadic generics in Swift 5.9 (#341)
- Crash fix: Multiple bad messages could trigger reentrancy issue (#379)
- Move
PostgresFrontendMessage
to tests (#381, #395, #399) PostgresBackendMessage.ID
should be backed by UInt8 directly (#386)- Remove
PrepareStatementStateMachine
(#391) - Fix a few inaccurate or confusing precondition failure messages (#398)