DatabasePersistable documentation (#12)

This commit is contained in:
Gwendal Roué committed 2015-12-10 13:33:25 +01:00
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
+4
View File
@@ -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
}