-
Notifications
You must be signed in to change notification settings - Fork 2
SQLiteUpdatable
Jeff Hurray edited this page Apr 25, 2016
·
1 revision
##Overview
SQLiteUpdatable exposes an interface for updating rows from the database associated with the model.
####Parameters
setters: [Setter] - value to column mapping. All new values will be set in the appropriate rows.
relationshipSetters: [RelationshipSetterSetter] - Model to Relationship column mapping. All new relationships will be set in the appropriate mapping tables.
####Update All
Updates all rows in the table associated with the model.
Executes on current thread and on background thread respectively.
static func updateAll(setters: [Setter], relationshipSetters: [RelationshipSetter]) throws -> Void
static func updateAllInBackground(setters: [Setter], relationshipSetters: [RelationshipSetter], completion: Completion?)####Update Updates rows that satisfy the query in the table associated with the model. Executes on current thread and on background thread respectively.
static func update(query: QueryType, setters: [Setter], relationshipSetters: [RelationshipSetter]) throws -> Void
static func updateInBackground(query: QueryType, setters: [Setter], relationshipSetters: [RelationshipSetter], completion: Completion?)public protocol SQLiteUpdatable {
static func updateAll(setters: [Setter], relationshipSetters: [RelationshipSetter]) throws -> Void
static func updateAllInBackground(setters: [Setter], relationshipSetters: [RelationshipSetter], completion: Completion?)
static func update(query: QueryType, setters: [Setter], relationshipSetters: [RelationshipSetter]) throws -> Void
static func updateInBackground(query: QueryType, setters: [Setter], relationshipSetters: [RelationshipSetter], completion: Completion?)
}SQLiteModel