From 6aeee05e8a4b6d2a3ea5602febf552ea864d1391 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gwendal=20Roue=CC=81?= Date: Fri, 22 Jul 2016 08:18:04 +0200 Subject: [PATCH] Code cleanup --- GRDB/Core/Row.swift | 29 +++++------------------------ 1 file changed, 5 insertions(+), 24 deletions(-) diff --git a/GRDB/Core/Row.swift b/GRDB/Core/Row.swift index d1c957a36..70580ea99 100644 --- a/GRDB/Core/Row.swift +++ b/GRDB/Core/Row.swift @@ -647,14 +647,10 @@ extension Row : Collection { // MARK: - Row as a Collection of (ColumnName, DatabaseValue) Pairs - // TODO -// /// The number of columns in the row. -// public var count: Int { -// guard let sqliteStatement = sqliteStatement else { -// return impl.count -// } -// return Int(sqlite3_column_count(sqliteStatement)) -// } + /// The number of columns in the row. + public var count: Int { + return impl.count + } /// The index of the first (ColumnName, DatabaseValue) pair. public var startIndex: RowIndex { @@ -664,7 +660,7 @@ extension Row : Collection { /// The "past-the-end" index, successor of the index of the last /// (ColumnName, DatabaseValue) pair. public var endIndex: RowIndex { - return Index(impl.count) + return Index(count) } /// Accesses the (ColumnName, DatabaseValue) pair at given index. @@ -689,21 +685,6 @@ extension Row : Collection { } } -// TODO -//extension Row : BidirectionalCollection { -// -// /// Returns the position immediately preceding `i`. -// /// -// /// - Precondition: `i > startIndex && i <= endIndex` -// public func index(before i: RowIndex) -> RowIndex { -// return RowIndex(i.index - 1) -// } -//} -// -// TODO -//extension Row : RandomAccessCollection { -// -//} extension Row : Equatable { }