@dxos/client
    Preparing search index...

    Class QueryResult<T>

    Predicate based query.

    Type Parameters

    • T extends BaseObject = any
    Index

    Constructors

    Accessors

    Methods

    Constructors

    • Type Parameters

      • T extends BaseObject = any

      Parameters

      • _queryContext: QueryContext<T>
      • query: Query<T>

      Returns QueryResult<T>

    Accessors

    • get objects(): T[]

      Returns T[]

    • get query(): Query<T>

      Returns Query<T>

    • get results(): QueryResultEntry<T>[]

      Returns QueryResultEntry<T>[]

    Methods

    • Parameters

      • Optionalopts: { timeout?: number }

      Returns Promise<T>

    • Execute the query once and return the results. Does not subscribe to updates.

      Parameters

      • Optionaltimeout: { timeout?: number }

      Returns Promise<OneShotQueryResult<T>>

    • Runs the query synchronously and returns all results. WARNING: This method will only return the data already cached and may return incomplete results. Use this.run() for a complete list of results stored on-disk.

      Returns QueryResultEntry<T>[]

    • Subscribe to query results. Updates only when the identity or the order of the objects changes. Does not update when the object properties change.

      Parameters

      • Optionalcallback: (query: QueryResult<T>) => void
      • Optionalopts: QuerySubscriptionOptions

      Returns CleanupFn