Row cleanup

This commit is contained in:
Gwendal Roué committed 2015-09-09 13:07:30 +02:00
1 parent 5906469826
commit d19e813e54
1 file changed
+1 -9
+1 -9
View File
@@ -374,17 +374,10 @@ public struct Row: CollectionType {
private struct StatementRowImpl : RowImpl {
let databaseValues: [DatabaseValue]
let columnNames: [String]
let databaseDictionary: [String: DatabaseValue]
init(statement: SelectStatement) {
self.databaseValues = (0..<statement.columnCount).map { index in statement.databaseValue(atIndex: index) }
self.databaseValues = (0..<statement.columnCount).map { statement.databaseValue(atIndex: $0) }
self.columnNames = statement.columnNames
var databaseDictionary = [String: DatabaseValue]()
for (databaseValue, columnName) in zip(databaseValues, columnNames) {
databaseDictionary[columnName] = databaseValue
}
self.databaseDictionary = databaseDictionary
}
var count: Int {
@@ -429,7 +422,6 @@ protocol RowImpl {
func databaseValue(atIndex index: Int) -> DatabaseValue
func columnName(atIndex index: Int) -> String
func indexForColumn(named name: String) -> Int?
var databaseDictionary: [String: DatabaseValue] { get }
}