Update

class Update(val oldDocuments: List<DittoDocument>, val insertions: List<Int>, val deletions: List<Int>, val updates: List<Int>, val moves: List<DittoLiveQueryMove>) : DittoLiveQueryEvent

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

This type is used every time a live query update is delivered after the initial event.

Constructors

Link copied to clipboard
constructor(oldDocuments: List<DittoDocument>, insertions: List<Int>, deletions: List<Int>, updates: List<Int>, moves: List<DittoLiveQueryMove>)

Properties

Link copied to clipboard

A list of the indexes in the list of old matching documents at which previously matching documents have been removed.

Link copied to clipboard

A list of the indexes in the list of new matching documents at which new matching documents have been inserted.

Link copied to clipboard

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.

Link copied to clipboard

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

Link copied to clipboard

A list of the indexes in the list of new matching documents at which already matching documents have been updated.

Functions

Link copied to clipboard
fun hash(documents: List<DittoDocument>): BigInteger

Returns a hash that represents the set of matching documents.

Link copied to clipboard

Returns a pattern of words that together create a mnemonic, which represents the set of matching documents.