Releases: SwifQL/PostgresBridge
Releases · SwifQL/PostgresBridge
👨🔧Support new version of `postgres-nio`
postgres-nio
doesn't log queries anymore. So now PostgresBridge
printing queries in debug
logger mode.
👨🔧 Temporary stick to `postgres-nio` 1.4.4 cause of bugs in 1.5.0
postgres-nio
1.5.0 which has a lot of changes under the hood and gave us production bugs. I decided to stick PostgresBridge to previous stable version of postgres-nio
to prevent these new unresolved problems.
🏀 Implement `requestConnection` method
Thanks to @YorkFieldX now we can use PostgresConnection
in tests simply this way
// retrieve a connection
let connection = try application.postgres.requestConnection(to: .my_awesome_database).wait()
// execute any queries
let users = try SwifQL.select(User.table.*)
.from(User.table)
.execute(on: connection)
.all(decoding: User.self)
.wait()
// don't forget to close a connection
try connection.close().wait()
⚠️ Use this way only in tests cause you can only close a connection but not return it back to a pool, so it may affect app performance.
Implement PG_SSL environment key
Set PG_SSL=1
or PG_SSL=true
or PG_SSL=require
environment variable to enable SSL for .psqlEnvironment
database identifier.