RealmMapChange

@frozen
public enum RealmMapChange<Collection> where Collection : RealmKeyedCollection

A RealmMapChange value encapsulates information about changes to dictionaries that are reported by Realm notifications.

  • .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 keys are in the collection, or the values of the objects for those keys in the collection, and/or modified one or more of the objects in the collection.

    Declaration

    Swift

    case update(Collection, deletions: [Collection.Key], insertions: [Collection.Key], modifications: [Collection.Key])

    Parameters

    deletions

    The keys in the previous version of the collection which were removed from this one.

    insertions

    The keys in the new collection which were added in this version.

    modifications

    The keys of the objects in the new collection which were modified in this version.

  • Errors can no longer occur. This case is unused and will be removed in the next major version.

    Declaration

    Swift

    case error(Error)