Ditto JS SDK v5.0.0
    Preparing search index...

    Class StoreObserver

    A store observer invokes a given handler whenever results for its query change.

    The store observer will remain active until it is cancelled, or the Ditto instance managing the observer has been closed.

    Create a store observer by calling ditto.store.registerObserver().

    query nor validated against it.

    The type of query arguments.

    Index

    Properties

    ditto: Ditto

    The Ditto instance this store observer is registered with.

    Accessors

    • get isCancelled(): boolean

      Convenience property, returns true once the store observer has been cancelled.

      Returns boolean

    • get queryArguments(): Readonly<any>

      The query arguments of the store observer (as passed when registering it).

      Returns Readonly<any>

    • get queryArgumentsCBORData(): Uint8Array<ArrayBufferLike>

      The query arguments of the store observer, serialized as CBOR, (as passed when adding it to the store).

      Note that any Attachment values passed in as query arguments when creating this store observer will be represented by a serialized version of that attachment.

      Returns Uint8Array<ArrayBufferLike>

    • get queryArgumentsJSONString(): string

      The query arguments of the store observer, serialized as JSON, (as passed when adding it to the store).

      Note that any Attachment values passed in as query arguments when creating this store observer will be represented by a serialized version of that attachment.

      Returns string

    • get queryString(): string

      The query string of the store observer (as passed when registering it).

      Returns string

    Methods

    • Cancels the store observer and unregisters it. No-op if the store observer has already been cancelled.

      Returns void