Skip to content

Releases: vapor/postgres-nio

PostgresNIO 1.21.4

30 May 12:11
ee669e9
Compare
Choose a tag to compare

SemVer Patch

  • Fix crash when recreating minimal connections (#480)

PostgresNIO 1.21.3

29 May 14:51
d379584
Compare
Choose a tag to compare

SemVer Patch

  • Workaround DiscardingTaskGroup non-conformance with nightly compilers (#478)

PostgresNIO 1.21.2

28 May 09:19
e62cc88
Compare
Choose a tag to compare

SemVer Patch

  • Actually use additional parameters (#473, patch credit to @MahdiBM)
  • Make TLS.disable a let instead of a var (#471)

Other Changes

  • [CI] Update code coverage action, attempt fix for Homebrew nonsense (#476)

PostgresNIO 1.21.1

26 Mar 15:46
e345cbb
Compare
Choose a tag to compare

SemVer Patch

Other Changes

PostgresNIO 1.21.0

11 Mar 09:41
6f0fc05
Compare
Choose a tag to compare

SemVer Minor

  • Fix Swift 5.10 warnings (#454)
  • Fix prepared statements that bind values (#455)
  • Run queries directly on PostgresClient (#456)
  • PostgresClient implements ServiceLifecycle's Service (#457)
  • Adds prepared statement support to PostgresClient (#459)
  • Make PostgresClient API (#460)
  • Fix multiple array type mapping mistakes and add missing date and time array types (#463)

SemVer Patch

  • Fix reverseChunked(by:) Method Implementation (#465, patch credit to @jiahan-wu)

Other Changes

  • Improve docs (#461)
  • Package cleanup (#464)

PostgresNIO 1.20.2

31 Jan 15:25
69ccfdf
Compare
Choose a tag to compare

SemVer Patch

  • Be resilient about a read after connection closed (#452)

PostgresNIO 1.20.1

30 Jan 14:30
e9b90b2
Compare
Choose a tag to compare

SemVer Patch

  • Add Sendable conformance to PostgresEncodingContext (#450)
  • Fix mishandling of SASL attribute parsing (#451)

SPI(ConnectionPool) changes

  • Fixes an availability issue for DiscardingTaskGroup on watchOS (#448, patch credit to @lovetodream)

PostgresNIO 1.20.0

12 Dec 17:21
fa3137d
Compare
Choose a tag to compare

SemVer Minor

  • Support additional connection parameters (#361)

SPI(ConnectionPool) changes

  • Add test cancel connection request (#439)
  • Add tests to lease multiple connections at once (#440)
  • Add test to lease connection after shutdown has started (#441)
  • Add support for multiple streams (#442)
  • Fix crash in PoolStateMachine+ConnectionGroup when closing connection while keepAlive is running (#444, patch credit to @lovetodream)

PostgresNIO 1.19.1

10 Nov 18:19
036931d
Compare
Choose a tag to compare

SPI(ConnectionPool) changes

  • Fixes Crash in ConnectionPoolStateMachine (#438)

Other Changes

  • Update README.md (#434)

PostgresNIO 1.19.0

31 Oct 11:40
21473f5
Compare
Choose a tag to compare

What is better than one PostgresConnection? Multiple PostgresConnections! This is why PostgresNIO now features an experimental
PostgresClient that is backed by a new ConnectionPool implementation.

The new PostgresClient and its underlying ConnectionPool implementation are large new features that are in an early experimental stage. We encourage PostgresNIO users to try them and provide feedback. The implementation is so new, and the feature scope so large, that we don't make any API stability promises for PostgresClient yet; it is therefore exposed as an SPI import.

If you want to start playing with the new PostgresClient, start with a pattern like this:

@_spi(ConnectionPool) import PostgresNIO

let client = PostgresClient(configuration: configuration, logger: logger)
await withTaskGroup(of: Void.self) {
  taskGroup.addTask {
    // 🚨 The PostgresClient only works if its `run()` method is executed in a long-running task.
    // This ensures that all background work shall be executed in a way that plays 
    // nicely with structured concurrency.
    client.run()
  }

  taskGroup.addTask {
    client.withConnection { connection in
      do {
        let rows = try await connection.query("SELECT userID, name, age FROM users;")
        for try await (userID, name, age) in rows.decode((UUID, String, Int).self) {
          // do something with the values
        }
      } catch {
        // handle errors
      }
    }
  }
}

We are currently working with the ServiceLifecycle maintainers to enable simple integration (however, we do not intend to depend on ServiceLifecycle directly).

If you run into any problems, please open a new Issue.

SPI(ConnectionPool) changes

SemVer Minor

  • Fix PostgresDecodable inference for RawRepresentable enums (#423, patch credit to @MahdiBM)
  • Remove warn-concurrency warnings (#408)
  • Update minimum Swift requirement to 5.7 (#414)

Other Changes

  • Update SSWG Graduation Level (#409)