mirror of
https://github.com/groue/GRDB.swift
synced 2026-11-28 04:24:20 +00:00
White space
This commit is contained in:
1 parent
aafb51b9eb
commit
5a9ce3efec
1 file changed
+4
-4
@@ -146,17 +146,17 @@ struct DatabaseDate: DatabaseValue {
|
||||
|
||||
// Write
|
||||
|
||||
let date = NSDate()
|
||||
try db.execute("INSERT INTO dates (timestamp) VALUES (?)", bindings: [DatabaseDate(date)])
|
||||
let dbDate = DatabaseDate(NSDate())
|
||||
try db.execute("INSERT INTO dates (timestamp) VALUES (?)", bindings: [dbDate])
|
||||
|
||||
// Read from row
|
||||
|
||||
let row = db.fetchOneRow("SELECT creationTimestamp FROM stuffs")!
|
||||
let date: DatabaseDate = row.value(atIndex: 0)!
|
||||
let dbDate: DatabaseDate = row.value(atIndex: 0)!
|
||||
|
||||
// Direct read
|
||||
|
||||
let date = db.fetchOne(DatabaseDate.self, "SELECT timestamp FROM stuffs")!
|
||||
let dbDate = db.fetchOne(DatabaseDate.self, "SELECT timestamp FROM stuffs")!
|
||||
```
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user