DittoLiveQueryEvent

public enum DittoLiveQueryEvent
extension DittoLiveQueryEvent: CustomStringConvertible, CustomDebugStringConvertible

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.
  • Undocumented

    Declaration

    Swift

    case initial
  • Undocumented

    Declaration

    Swift

    case update(DittoLiveQueryUpdate)
  • Returns a hash that represents the set of matching documents.

    Declaration

    Swift

    public func hash(documents: [DittoDocument]) -> UInt64

    Parameters

    documents

    The matching documents delivered alongside the live query event.

    Return Value

    A hash that represents the set of matching documents.

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

    Declaration

    Swift

    public func hashMnemonic(documents: [DittoDocument]) -> String

    Parameters

    documents

    The matching documents delivered alongside the live query event.

    Return Value

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

  • Declaration

    Swift

    public var description: String { get }
  • Declaration

    Swift

    public var debugDescription: String { get }