From d53a58c528ba7b79542c0e4bbdccdb597f44c9c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gwendal=20Roue=CC=81?= Date: Sun, 5 Jul 2015 22:54:55 +0200 Subject: [PATCH] README.md --- README.md | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 04560fc4f..87e46a12c 100644 --- a/README.md +++ b/README.md @@ -527,7 +527,7 @@ class Person : RowModel { if let v = row["age"] { age = v.value() } // String if let v = row["creationTimestamp"] { // NSDate // Use the DBDate custom type declared above: - let dbDate: DBDate? = v.value() + let dbDate = v.value() as DBDate? creationDate = dbDate?.date } } @@ -564,15 +564,8 @@ Declare a **Primary Key** and a **Table name** in order to fetch row models by p ```swift class Person : RowModel { - ... - - override class var databaseTableName: String? { - return "persons" - } - - override class var databasePrimaryKey: PrimaryKey { - return .RowID("id") - } + override class var databaseTableName: String? { return "persons" } + override class var databasePrimaryKey: PrimaryKey { return .RowID("id") } } dbQueue.inDatabase { db in @@ -666,8 +659,6 @@ Those operations require one more method: ```swift class Person : RowModel { - ... - // The values stored in the database: override var databaseDictionary: [String: SQLiteValueConvertible?] { return [