SectionedResultsChange
@frozen
public enum SectionedResultsChange<Collection>
A SectionedResultsChange
value encapsulates information about changes to
sectioned results that are reported by Realm notifications.
The first time a notification is delivered it will be .initial
, and all
subsequent notifications will be .change()
with information about what has
changed since the last time the callback was invoked.
}
-
.initial
indicates that the initial run of the query has completed (if applicable), and the collection can now be used without performing any blocking work.Declaration
Swift
case initial(Collection)
-
.update
indicates that a write transaction has been committed which either changed which objects are in the collection, and/or modified one or more of the objects in the collection.All three of the change arrays are always sorted in ascending order.
Declaration
Swift
case update(Collection, deletions: [IndexPath], insertions: [IndexPath], modifications: [IndexPath], sectionsToInsert: IndexSet, sectionsToDelete: IndexSet)
Parameters
deletions
The indexPaths in the previous version of the collection which were removed from this one.
insertions
The indexPaths in the new collection which were added in this version.
modifications
The indexPaths of the objects which were modified in the previous version of this collection.
sectionsToInsert
The indexSet of the sections which were newly inserted into the sectioned results collection.
sectionsToDelete
The indexSet of the sections which were recently deleted from the previous sectioned results collection.