Skip to content

Commit c794dd3

Browse files
authored
beta 1 (#241)
1 parent 03e1e6b commit c794dd3

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

Package.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ let package = Package(
88
],
99
dependencies: [
1010
.package(url: "https://github.com/vapor/mysql-nio.git", from: "1.0.0-alpha"),
11-
.package(url: "https://github.com/vapor/sql-kit.git", from: "3.0.0-alpha"),
12-
.package(url: "https://github.com/vapor/async-kit.git", from: "1.0.0-alpha"),
11+
.package(url: "https://github.com/vapor/sql-kit.git", from: "3.0.0-beta"),
12+
.package(url: "https://github.com/vapor/async-kit.git", from: "1.0.0-beta"),
1313

1414
],
1515
targets: [

Sources/MySQLKit/MySQLDatabase.swift

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,28 +64,26 @@ public struct MySQLConfiguration {
6464
}
6565

6666
public struct MySQLConnectionSource: ConnectionPoolSource {
67-
public var eventLoop: EventLoop
6867
public let configuration: MySQLConfiguration
6968

70-
public init(configuration: MySQLConfiguration, on eventLoop: EventLoop) {
69+
public init(configuration: MySQLConfiguration) {
7170
self.configuration = configuration
72-
self.eventLoop = eventLoop
7371
}
7472

75-
public func makeConnection() -> EventLoopFuture<MySQLConnection> {
73+
public func makeConnection(on eventLoop: EventLoop) -> EventLoopFuture<MySQLConnection> {
7674
let address: SocketAddress
7775
do {
7876
address = try self.configuration.address()
7977
} catch {
80-
return self.eventLoop.makeFailedFuture(error)
78+
return eventLoop.makeFailedFuture(error)
8179
}
8280
return MySQLConnection.connect(
8381
to: address,
8482
username: self.configuration.username,
8583
database: self.configuration.database ?? self.configuration.username,
8684
password: self.configuration.password,
8785
tlsConfiguration: self.configuration.tlsConfiguration,
88-
on: self.eventLoop
86+
on: eventLoop
8987
)
9088
}
9189
}

0 commit comments

Comments
 (0)