mirror of
https://github.com/groue/GRDB.swift
synced 2026-11-27 04:14:21 +00:00
README.md
This commit is contained in:
1 parent
40cde62725
commit
2c646e7f42
1 file changed
+2
-4
@@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user