ListQuery

class ListQuery @InternalWowApi constructor(val filter: FilterExpression = MatchAllFilter, val projection: Projection = Projection.ALL, sort: List<Sort> = emptyList(), val limit: Int? = null) : Queryable<ListQuery>

A list query: the records its filter matches, in its order, with its projection, at most its limit.

It supports all standard query operations (Queryable) and limits how many items it returns.

Parameters

sort

The order of the results; the query keeps a copy.

Constructors

Link copied to clipboard
constructor(filter: FilterExpression = MatchAllFilter, projection: Projection = Projection.ALL, sort: List<Sort> = emptyList(), limit: Int? = null)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
open override val filter: FilterExpression

The filter expression to apply to the query; MatchAllFilter, every record, by default.

Link copied to clipboard
val limit: Int?

The most items to return, at least 1; null, the default, takes the entry's default list size. Only trusted code that dropped the budget (trusted().unbounded()) lists every match with null; a stream (stream) reads every match in chunks.

Link copied to clipboard
open override val projection: Projection

The field projection to control which fields are included in the results.

Link copied to clipboard
open override val sort: List<Sort>

The sorting criteria to order the results; a copy, so a list its caller changes later changes neither this query nor its hash.

Functions

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
open override fun toString(): String
Link copied to clipboard
open override fun withFilter(newFilter: FilterExpression): ListQuery

Creates a new ListQuery with the specified filter.

Link copied to clipboard
open override fun withProjection(newProjection: Projection): ListQuery

Creates a new ListQuery with the specified projection.