Skip to content

Commit

Permalink
feat: add new init to table.swift
Browse files Browse the repository at this point in the history
  • Loading branch information
EnriqueL8 authored Feb 2, 2018
2 parents d74cff2 + e55533c commit 3bbaacc
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion Sources/SwiftKuery/Table.swift
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,17 @@ open class Table: Buildable {
syntaxError += "Table name not set. "
}
}


/// Initialize an instance of Table with an array of columns

public required init(tableName: String, columns: [Column]) {
self._name = tableName
self.columns = columns
for column in columns {
column._table = self
}
}

/// Build the table using `QueryBuilder`.
///
/// - Parameter queryBuilder: The QueryBuilder to use.
Expand Down

0 comments on commit 3bbaacc

Please sign in to comment.