File tree Expand file tree Collapse file tree 2 files changed +6
-8
lines changed Expand file tree Collapse file tree 2 files changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -8,8 +8,8 @@ let package = Package(
8
8
] ,
9
9
dependencies: [
10
10
. 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 " ) ,
13
13
14
14
] ,
15
15
targets: [
Original file line number Diff line number Diff line change @@ -64,28 +64,26 @@ public struct MySQLConfiguration {
64
64
}
65
65
66
66
public struct MySQLConnectionSource : ConnectionPoolSource {
67
- public var eventLoop : EventLoop
68
67
public let configuration : MySQLConfiguration
69
68
70
- public init ( configuration: MySQLConfiguration , on eventLoop : EventLoop ) {
69
+ public init ( configuration: MySQLConfiguration ) {
71
70
self . configuration = configuration
72
- self . eventLoop = eventLoop
73
71
}
74
72
75
- public func makeConnection( ) -> EventLoopFuture < MySQLConnection > {
73
+ public func makeConnection( on eventLoop : EventLoop ) -> EventLoopFuture < MySQLConnection > {
76
74
let address : SocketAddress
77
75
do {
78
76
address = try self . configuration. address ( )
79
77
} catch {
80
- return self . eventLoop. makeFailedFuture ( error)
78
+ return eventLoop. makeFailedFuture ( error)
81
79
}
82
80
return MySQLConnection . connect (
83
81
to: address,
84
82
username: self . configuration. username,
85
83
database: self . configuration. database ?? self . configuration. username,
86
84
password: self . configuration. password,
87
85
tlsConfiguration: self . configuration. tlsConfiguration,
88
- on: self . eventLoop
86
+ on: eventLoop
89
87
)
90
88
}
91
89
}
You can’t perform that action at this time.
0 commit comments