mirror of
https://github.com/groue/GRDB.swift
synced 2026-11-27 04:14:21 +00:00
Layout for Xcode doc reader
This commit is contained in:
1 parent
734d911416
commit
5f013b6ee7
1 file changed
+4
-4
@@ -62,8 +62,8 @@ On insertion, the record should get fresh `creationDate` and `modificationDate`.
|
||||
|
||||
```swift
|
||||
extension Player: Encodable, MutablePersistableRecord {
|
||||
/// Sets both `creationDate` and `modificationDate` to the transaction date,
|
||||
/// if they are not set yet.
|
||||
/// Sets both `creationDate` and `modificationDate` to the
|
||||
/// transaction date, if they are not set yet.
|
||||
mutating func willInsert(_ db: Database) throws {
|
||||
if creationDate == nil {
|
||||
creationDate = try db.transactionDate
|
||||
@@ -316,8 +316,8 @@ extension Player: Encodable, MutablePersistableRecord {
|
||||
id = inserted.rowID
|
||||
}
|
||||
|
||||
/// Sets both `creationDate` and `modificationDate` to the transaction date,
|
||||
/// if they are not set yet.
|
||||
/// Sets both `creationDate` and `modificationDate` to the
|
||||
/// transaction date, if they are not set yet.
|
||||
mutating func willInsert(_ db: Database) throws {
|
||||
if creationDate == nil {
|
||||
creationDate = try db.transactionDate
|
||||
|
||||
Reference in new issue
Block a user