DittoLiveQueryEvent

sealed class DittoLiveQueryEvent

Describes the different types of event that you can receive when dealing with live queries.

  • Initial: The first event that will be delivered and it will only be delivered once.

  • Update: This event will be delivered each time the results of the provided query change. It contains information about the set of documents that previously matched the query before the update, along with information about what documents have been inserted, deleted, updated, or moved, as part of the set of matching documents.

Constructors

Link copied to clipboard
protected fun DittoLiveQueryEvent()

Types

Link copied to clipboard
object Initial : DittoLiveQueryEvent

This type of event is delivered alongside the initial set matching documents for the live query. It is only delivered the first time that a live query event is delivered, for each live query.

Link copied to clipboard
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.

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
fun hashMnemonic(documents: List<DittoDocument>): String

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

Inheritors

Link copied to clipboard
Link copied to clipboard