From f3b1471fc4f67f5391c885501d02a3244d520ca7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gwendal=20Roue=CC=81?= Date: Sun, 6 Sep 2015 18:59:21 +0200 Subject: [PATCH] Documentation --- GRDB/Foundation/NSDate.swift | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/GRDB/Foundation/NSDate.swift b/GRDB/Foundation/NSDate.swift index 84845ce8b..cdfc5d147 100644 --- a/GRDB/Foundation/NSDate.swift +++ b/GRDB/Foundation/NSDate.swift @@ -31,15 +31,10 @@ Usage: override var storedDatabaseDictionary: [String: DatabaseValueConvertible?] { return ["birthDate": birthDate, ...] } - + override func updateFromRow(row: Row) { - for (column, dbv) in row { - switch column { - case "birthDate": birthDate = dbv.value() - case ... - } - } - super.updateFromRow(row) // Subclasses are required to call super. + if let dbv = row["birthDate"] { birthDate = dbv.value() } + ... } }