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
6282068c8d
commit
ce59484512
1 file changed
+2
-2
@@ -524,8 +524,8 @@ struct DatabaseTimestamp: DatabaseValueConvertible {
|
||||
|
||||
/// Create an instance initialized to `databaseValue`.
|
||||
init?(databaseValue: DatabaseValue) {
|
||||
// Why handle the raw DatabaseValue when GRDB built-in Double
|
||||
// conversion does all the job for us?
|
||||
// Double itself adopts DatabaseValueConvertible. So let's avoid
|
||||
// handling the raw DatabaseValue, and use built-in Double conversion:
|
||||
guard let timeInterval = Double(databaseValue: databaseValue) else {
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user