query<T extends ZorphyEntityBase<Object?>> method

List<ZfaDocument<T>> query<T extends ZorphyEntityBase<Object?>>(
  1. ZfaQuery<T> query
)

Every document matching query, ordered by its ZfaQuery.orderBy.

The query is evaluated in memory over the documents of the queried type — ZfaQuery.matches then ZfaQuery.compareBy — sorting the documents themselves, never their values alone, so two equal-valued documents keep their cardinality. The sort is stable: documents whose sort keys compare equal keep their insertion order (issue #2223), which a bare List.sort does not guarantee.

Implementation

List<ZfaDocument<T>> query<T extends ZorphyEntityBase<Object?>>(
  ZfaQuery<T> query,
) => _bucket<T>().query(query);