Swiftpack.co - SwifQL/MySQLBridge as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by SwifQL.
SwifQL/MySQLBridge 1.0.0-rc.2.2.0
🐘 Pure SwifQL+NIO bridge to MySQL
⭐️ 2
🕓 4 weeks ago
macOS
.package(url: "https://github.com/SwifQL/MySQLBridge.git", from: "1.0.0-rc.2.2.0")

MIT License Swift 5.2 Github Actions Swift.Stream

Bridge to MySQL

Work with MySQL with SwifQL through its pure NIO driver.

Installation

.package(url: "https://github.com/SwifQL/MySQLBridge.git", from:"1.0.0-rc"),
.package(url: "https://github.com/SwifQL/VaporBridges.git", from:"1.0.0-rc"),
.target(name: "App", dependencies: [
    .product(name: "Vapor", package: "vapor"),
    .product(name: "MySQLBridge", package: "MySQLBridge"),
    .product(name: "VaporBridges", package: "VaporBridges")
]),

For more info please take a look at the Bridges repo.

GitHub

link
Stars: 2
Last commit: 4 weeks ago
Advertisement: IndiePitcher.com - Cold Email Software for Startups

Release Notes

🏀 Implement `requestConnection` method
3 years ago

Thanks to @YorkFieldX now we can use MySQLConnection in tests simply this way

// retrieve a connection
let connection = try application.mysql.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.

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics