Class Query
Query
Class Declared in packages/core/echo/echo-db/dist/types/src/query/query.d.ts:72
Predicate based query.
Constructors
constructor(_queryContext, filter)
Returns: Query<T>
Arguments:
_queryContext
: QueryContext
filter
: Filter<any>
Properties
filter
Type: Filter<any>
objects
Type: T[]
results
Type: QueryResult<T>[]
Methods
run([timeout])
Execute the query once and return the results. Does not subscribe to updates.
Returns: Promise<OneShotQueryResult<T>>
Arguments:
timeout
: object
subscribe([callback], [opts])
Subscribe to query results. Queries that have at least one subscriber are updated reactively when the underlying data changes.
Returns: Subscription
Arguments:
callback
: function
opts
: QuerySubscriptionOptions