DittoSingleDocumentLiveQueryEvent

public struct DittoSingleDocumentLiveQueryEvent

Provides information about a live query event relating to a single document live query.

  • States whether the event is an initial event or not.

    Declaration

    Swift

    public let isInitial: Bool
  • The document’s previous state.

    This will always be nil if isInitial is true. It will also be nil if the document was removed or evicted and isInitial is false.

    Declaration

    Swift

    public let oldDocument: DittoDocument?
  • Returns a hash that represents the document.

    Declaration

    Swift

    public func hash(document: DittoDocument?) -> UInt64

    Parameters

    document

    The document delivered alongside the live query event.

    Return Value

    A hash that represents the document.

  • Returns a pattern of words that together create a mnemonic, which represents the document.

    Declaration

    Swift

    public func hashMnemonic(document: DittoDocument?) -> String

    Parameters

    document

    The document delivered alongside the live query event.

    Return Value

    A pattern of words that together create a mnemonic, which represents the document.