DittoCollectionsEvent

data class DittoCollectionsEvent(isInitial: Boolean, collections: List<DittoCollection>, oldCollections: List<DittoCollection>, insertions: List<Int>, deletions: List<Int>, updates: List<Int>, moves: List<DittoLiveQueryMove>)

Provides information about the changes that have occurred in relation to an event delivered when observing the collections in a DittoStore. It contains information about the collections that are known as well as the collections that were previously known in the previous event, along with information about what collections have been inserted, deleted, updated, or moved since the last event.

Constructors

DittoCollectionsEvent
Link copied to clipboard
fun DittoCollectionsEvent(isInitial: Boolean, collections: List<DittoCollection>, oldCollections: List<DittoCollection>, insertions: List<Int>, deletions: List<Int>, updates: List<Int>, moves: List<DittoLiveQueryMove>)

Properties

collections
Link copied to clipboard
val collections: List<DittoCollection>

A list of all known collections.

deletions
Link copied to clipboard
val deletions: List<Int>

A list of the indexes in the list of previously known collections at which collections have been removed.

insertions
Link copied to clipboard
val insertions: List<Int>

A list of the indexes in the list of currently known collections at which new collections have been inserted.

isInitial
Link copied to clipboard
val isInitial: Boolean

Indicates whether or not this is the first event to be delivered when observing collections in the store.

moves
Link copied to clipboard
val moves: List<DittoLiveQueryMove>

A list of the tuples that provides the indexes, in relation to the list of previously known about collections, that already known collections have moved from and the indexes, in relation to the list of currently known collections, that the collections have moved to.

oldCollections
Link copied to clipboard
val oldCollections: List<DittoCollection>

A list of all known collections at the time the previous event was delivered.

updates
Link copied to clipboard
val updates: List<Int>

A list of the indexes in the list of currently known collections at which pre-existing collections have been updated.