SingleQuery

class SingleQuery @InternalWowApi constructor(val filter: FilterExpression, val projection: Projection = Projection.ALL, val sort: List<Sort> = emptyList()) : Queryable<SingleQuery>

Data class representing a query for retrieving a single item with optional filtering, projection, and sorting.

It supports all standard query operations (Queryable) and expects at most one result, or none.

Constructors

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

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.

Link copied to clipboard
open override val projection: Projection

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

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

The sorting criteria to order results (useful when multiple matches exist).

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): SingleQuery

Creates a new SingleQuery with the specified filter.

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

Creates a new SingleQuery with the specified projection.