mirror of
https://github.com/groue/GRDB.swift
synced 2026-11-26 04:07:50 +00:00
DatabasePersistable documentation (#12)
This commit is contained in:
1 parent
cfd5abc1a7
commit
39ff90474c
2 files changed
+7
No files matched your search
@@ -54,6 +54,9 @@ public protocol DatabasePersistable : DatabaseTableMapping {
|
||||
/// self.id = rowID
|
||||
/// }
|
||||
/// }
|
||||
///
|
||||
/// - parameter rowID: The inserted rowID.
|
||||
/// - parameter name: The name of the eventual INTEGER PRIMARY KEY column.
|
||||
mutating func didInsertWithRowID(rowID: Int64, forColumn name: String?)
|
||||
|
||||
// MARK: - CRUD
|
||||
|
||||
@@ -1620,6 +1620,10 @@ Your type may store its rowID after a successful insertion:
|
||||
|
||||
```swift
|
||||
struct Person {
|
||||
/// Optional method that is called upon successful insertion.
|
||||
///
|
||||
/// - parameter rowID: The inserted rowID.
|
||||
/// - parameter name: The name of the eventual INTEGER PRIMARY KEY column.
|
||||
mutating func didInsertWithRowID(rowID: Int64, forColumn name: String?) {
|
||||
self.id = rowID
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user