diff --git a/Sources/SQLite/SQL/SQLiteAlterTableBuilder.swift b/Sources/SQLite/SQL/SQLiteAlterTableBuilder.swift index f5d0239..f294542 100644 --- a/Sources/SQLite/SQL/SQLiteAlterTableBuilder.swift +++ b/Sources/SQLite/SQL/SQLiteAlterTableBuilder.swift @@ -1,4 +1,4 @@ -extension SQLAlterTableBuilder where Connection.Query.AlterTable == SQLiteAlterTable { +extension SQLAlterTableBuilder where Connectable.Connection.Query.AlterTable == SQLiteAlterTable { /// Renames the table. /// /// conn.alter(table: Bar.self).rename(to: "foo").run() diff --git a/Sources/SQLite/SQL/SQLiteCreateTable.swift b/Sources/SQLite/SQL/SQLiteCreateTable.swift index 99a5cda..d8a01df 100644 --- a/Sources/SQLite/SQL/SQLiteCreateTable.swift +++ b/Sources/SQLite/SQL/SQLiteCreateTable.swift @@ -1,4 +1,4 @@ -extension SQLCreateTableBuilder where Connection.Query.CreateTable == SQLiteCreateTable { +extension SQLCreateTableBuilder where Connectable.Connection.Query.CreateTable == SQLiteCreateTable { /// By default, every row in SQLite has a special column, usually called the "rowid", that uniquely identifies that row within /// the table. However if the phrase "WITHOUT ROWID" is added to the end of a CREATE TABLE statement, then the special "rowid" /// column is omitted. There are sometimes space and performance advantages to omitting the rowid. diff --git a/Sources/SQLite/SQL/SQLiteDropIndex.swift b/Sources/SQLite/SQL/SQLiteDropIndex.swift index a69f78e..3ef791e 100644 --- a/Sources/SQLite/SQL/SQLiteDropIndex.swift +++ b/Sources/SQLite/SQL/SQLiteDropIndex.swift @@ -13,14 +13,14 @@ public struct SQLiteDropIndex: SQLDropIndex { } /// SQLite specific drop index builder. -public final class SQLiteDropIndexBuilder: SQLQueryBuilder - where Connection: SQLConnection, Connection.Query == SQLiteQuery +public final class SQLiteDropIndexBuilder: SQLQueryBuilder + where Connectable: SQLConnectable, Connectable.Connection.Query == SQLiteQuery { /// `AlterTable` query being built. public var dropIndex: SQLiteDropIndex /// See `SQLQueryBuilder`. - public var connection: Connection + public var connectable: Connectable /// See `SQLQueryBuilder`. public var query: SQLiteQuery { @@ -28,14 +28,14 @@ public final class SQLiteDropIndexBuilder: SQLQueryBuilder } /// Creates a new `SQLCreateIndexBuilder`. - public init(_ dropIndex: SQLiteDropIndex, on connection: Connection) { + public init(_ dropIndex: SQLiteDropIndex, on connectable: Connectable) { self.dropIndex = dropIndex - self.connection = connection + self.connectable = connectable } } -extension SQLConnection where Query == SQLiteQuery { +extension SQLConnectable where Connection.Query == SQLiteQuery { /// Drops an index from a SQLite database. public func drop(index identifier: SQLiteIdentifier) -> SQLiteDropIndexBuilder { return .init(SQLiteDropIndex(identifier: identifier), on: self)