Releases: vapor/fluent-postgres-driver
2.10.0 - Adopt Async Shutdown
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
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
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
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
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
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
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
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
This patch was authored and released by @gwynne.
This makes DatabaseError.isSyntaxError
and .isConstraintFailure
work again.