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
b2f537a876
commit
83f9a98bf5
1 file changed
+6
@@ -1159,6 +1159,12 @@ CREATE TABLE persons (
|
||||
|
||||
```swift
|
||||
class Person : RowModel {
|
||||
var creationDate: NSDate?
|
||||
|
||||
override var storedDatabaseDictionary: [String: DatabaseValueConvertible?] {
|
||||
return ["creationDate": creationDate, ...]
|
||||
}
|
||||
|
||||
override func insert(db: Database) throws {
|
||||
if creationDate == nil {
|
||||
creationDate = NSDate()
|
||||
|
||||
Reference in new issue
Block a user