DittoLiveQueryUpdate

public struct DittoLiveQueryUpdate

Provides information about the changes that have occurred in relation to a live query for a given update event.

This type is returned in the update case of the DittoLiveQueryEvent enum.

  • A list of all of the documents that matched the live query as part of the previous update.

    Declaration

    Swift

    public let oldDocuments: [DittoDocument]
  • A list of the indexes in the list of new matching documents at which new matching documents have been inserted.

    Declaration

    Swift

    public let insertions: [Int]
  • A list of the indexes in the list of old matching documents at which previously matching documents have been removed.

    Declaration

    Swift

    public let deletions: [Int]
  • A list of the indexes in the list of new matching documents at which already matching documents have been updated.

    Declaration

    Swift

    public let updates: [Int]
  • A list of the tuples that provides the indexes, in relation to the list of old matching documents, that already matching documents have moved from and the indexes, in relation to the list of new matching documents, that the documents have moved to.

    Declaration

    Swift

    public let moves: [(from: Int, to: Int)]