Skip to content

Releases: vapor/fluent-postgres-driver

2.10.0 - Adopt Async Shutdown

06 Oct 01:37
fd57101
Compare
Choose a tag to compare

What's Changed

Adopt Async Shutdown by @0xTim in #221

Fixes an issue where Fluent Postgres would hang, especially when installing the NIO Event Loop executor.

Drops support for Swift 5.8

This patch was released by @0xTim

Full Changelog: 2.9.2...2.10.0

2.9.2 - Shut down the driver's connection pool safely

24 May 10:57
e2988a8
Compare
Choose a tag to compare

What's Changed

Shut down the driver's connection pool safely by @gwynne in #220

Specifically, don’t use the soft-deprecated AsyncKit API that calls EventLoopFuture.wait() internally; use the one that at least does it with Dispatch (best we can do without changing Fluent’s driver interface).

This patch was released by @gwynne

Full Changelog: 2.9.1...2.9.2

2.9.1 - Update required versions of dependencies

16 May 20:12
e44fcc8
Compare
Choose a tag to compare

What's Changed

Update required versions of dependencies by @gwynne in #218

Helps avoid users getting into states where things won’t build. Also fixes a DocC warning.

This patch was released by @gwynne

Full Changelog: 2.9.0...2.9.1

2.9.0 - Update package for Sendable, and other cleanup

01 May 15:57
2cc10e8
Compare
Choose a tag to compare

What's Changed

Update package for Sendable, and other cleanup by @gwynne in #217

Adds Sendable correctness and ExistentialAny compliance, bumps min Swift version to 5.8, leverages the new SQLKit functionality, removes .error-level logging (uses .debug instead), updates CI, modernizes README and docs.

This patch was released by @gwynne

Full Changelog: 2.8.0...2.9.0

2.8.0 - Update for the nested subpath changes in FluentKit

11 Jul 07:47
a538fc6
Compare
Choose a tag to compare
This patch was authored and released by @gwynne.

vapor/fluent-kit#572 takes advantage of the new support added to SQLKit in vapor/sql-kit#169, so remove the obsolete legacy support here.

Also adds back a missing test that was accidentally lost at some point and does some minor tidying.

(Note: Since we now depend on a version of FluentKit that is multiple minor versions newer than before, this must also be semver-minor.) #215

Warn about deprecation of old config methods instead of breaking existing code

11 May 18:37
bb3ab8e
Compare
Choose a tag to compare
This patch was authored and released by @gwynne.

Previously working code which uses the now-deprecated PostgresConfiguration type with the .postgres factory methods (rather than its replacement, SQLPostgresConfiguration) while specifying neither a data encoder or decoder was throwing compiler errors. Such code now issues the intended deprecation warning instead, while continuing to work as before.

Fixes #211

Add missing deprecated method

10 May 13:11
0aa809c
Compare
Choose a tag to compare
This patch was authored and released by @gwynne.

Without this addition, those using the original version of the method receive extremely unhelpful "unable to type-check this expression in reasonable time" errors.

Updated to use new PostgresKit/PostgresNIO APIs

09 May 16:01
8817a61
Compare
Choose a tag to compare
This patch was authored and released by @gwynne.

PostgresKit 2.11.0 heavily revamped PostgresKit to take full (or near to it) advantage of the modern PostgresNIO APIs. These changes do the same for FluentPostgresDriver, including adopting the revisions made to PostgresKit's API. This incidentally results in a significant improvement in the layering of the three packages, with FluentPostgresDriver now relying almost entirely on PostgresKit alone rather than needing to separately know details of PostgresNIO (with one or two exceptions). The end result is much cleaner code and moderate performance improvements.

Swift 5.7 or later is now required.

Users who previously specified custom PostgresDataEncoder and/or PostgresDataDecoder instances in their database configurations will begin receiving deprecation warnings; the replacements are PostgresNIO's PostgresEncodingContext and PostgresDecodingContext:

let postgresEncoder = PostgresDataEncoder(json: JSONEncoder()) // deprecated
let postgresEncodingContext = PostgresEncodingContext(jsonEncoder: JSONEncoder()) // new

let defaultPostgresEncoder = PostgresDataEncoder() // deprecated
let defaultPostgresEncodingContext = PostgresEncodingContext.default // new

let postgresDecoder = PostgresDataDecoder(json: JSONDecoder()) // deprecated
let postgresDecodingContext = PostgresDecodingContext(jsonDecoder: JSONDecoder()) // new

let defaultPostgresDecoder = PostgresDataDecoder() // deprecated
let defaultPostgresDecodingContext = PostgresDecodingContext.default // new

Update PostgresError's DatabaseError conformance for new PostgresNIO behavior

07 May 10:23
c7e3976
Compare
Choose a tag to compare
This patch was authored and released by @gwynne.

This makes DatabaseError.isSyntaxError and .isConstraintFailure work again.

Require PostgresKit 2.10.1 for CVE-2023-31136 fix

04 May 20:24
c7cd020
Compare
Choose a tag to compare
This patch was authored and released by @gwynne.