README.md

This commit is contained in:
Gwendal Roué committed 2015-07-05 16:59:33 +02:00
1 parent 40cde62725
commit 2c646e7f42
1 file changed
+2 -4
+2 -4
View File
@@ -515,10 +515,8 @@ class Person : RowModel {
if row.hasColumn("age") { age = row.value(named: "age") } // Int
if row.hasColumn("name") { name = row.value(named: "name") } // String
if row.hasColumn("creationTimestamp") { // NSDate
// The custom type DBDate that we have declared above turns
// out handy:
let dbDate: DBDate? = row.value(named: "creationTimestamp")
creationDate = dbDate?.date
// Use the DBDate custom type declared above:
creationDate = (row.value(named: "creationTimestamp") as DBDate?)?.date
}
}
}