mirror of
https://github.com/groue/GRDB.swift
synced 2026-11-24 04:07:47 +00:00
fix Record getting the default implementation of persistenceConflictPolicy
This commit is contained in:
1 parent
d452a00592
commit
898db8b7d4
1 file changed
+16
@@ -59,6 +59,22 @@ open class Record : RowConvertible, TableMapping, Persistable {
|
||||
fatalError("subclass must override")
|
||||
}
|
||||
|
||||
/// The policy that handles SQLite conflicts when records are inserted
|
||||
/// or updated.
|
||||
///
|
||||
/// This property is optional: its default value uses the ABORT policy
|
||||
/// for both insertions and updates, and has GRDB generate regular
|
||||
/// INSERT and UPDATE queries.
|
||||
///
|
||||
/// If insertions are resolved with .ignore policy, the
|
||||
/// `didInsert(with:for:)` method is not called upon successful insertion,
|
||||
/// even if a row was actually inserted without any conflict.
|
||||
///
|
||||
/// See https://www.sqlite.org/lang_conflict.html
|
||||
open class var persistenceConflictPolicy: PersistenceConflictPolicy {
|
||||
return PersistenceConflictPolicy(insert: .abort, update: .abort)
|
||||
}
|
||||
|
||||
/// This flag tells whether the hidden "rowid" column should be fetched
|
||||
/// with other columns.
|
||||
///
|
||||
|
||||
Reference in new issue
Block a user