Skip to content

Commit 355fdc8

Browse files
authored
Merge pull request #214 from vapor/sql-2-1
sql 2.1 updates
2 parents fa2e9b8 + 65585f8 commit 355fdc8

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

Sources/MySQL/SQL/MySQLAlterTable.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ public struct MySQLAlterTable: SQLAlterTable {
7272
}
7373
}
7474

75-
extension SQLAlterTableBuilder where Connection.Query.AlterTable == MySQLAlterTable {
75+
extension SQLAlterTableBuilder where Connectable.Connection.Query.AlterTable == MySQLAlterTable {
7676
/// Specifies the position of a newly added column in a table relative to an existing column.
7777
///
7878
/// conn.alter(table: User.self)

Sources/MySQL/SQL/MySQLDropIndex.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,24 +18,24 @@ public struct MySQLDropIndex: SQLDropIndex {
1818
}
1919

2020
/// Builds `MySQLDropIndex` queries.
21-
public final class MySQLDropIndexBuilder<Connection>: SQLQueryBuilder
22-
where Connection: SQLConnection, Connection.Query == MySQLQuery
21+
public final class MySQLDropIndexBuilder<Connectable>: SQLQueryBuilder
22+
where Connectable: SQLConnection, Connectable.Connection.Query == MySQLQuery
2323
{
2424
/// `AlterTable` query being built.
2525
public var dropIndex: MySQLDropIndex
2626

2727
/// See `SQLQueryBuilder`.
28-
public var connection: Connection
28+
public var connectable: Connectable
2929

3030
/// See `SQLQueryBuilder`.
3131
public var query: MySQLQuery {
3232
return .dropIndex(dropIndex)
3333
}
3434

3535
/// Creates a new `SQLCreateIndexBuilder`.
36-
public init(_ dropIndex: MySQLDropIndex, on connection: Connection) {
36+
public init(_ dropIndex: MySQLDropIndex, on connectable: Connectable) {
3737
self.dropIndex = dropIndex
38-
self.connection = connection
38+
self.connectable = connectable
3939
}
4040
}
4141

Sources/MySQL/SQL/MySQLUpsert.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public struct MySQLUpsert: SQLSerializable {
2323
}
2424
}
2525

26-
extension SQLInsertBuilder where Connection.Query.Insert == MySQLInsert {
26+
extension SQLInsertBuilder where Connectable.Connection.Query.Insert == MySQLInsert {
2727
/// Adds an `ON DUPLICATE KEY UPDATE` or "upsert" clause to the query.
2828
///
2929
/// conn.insert(into: Planet.self).value(earth)

0 commit comments

Comments
 (0)