SingleQuery
class SingleQuery @InternalWowApi constructor(val filter: FilterExpression = MatchAllFilter, val projection: Projection = Projection.ALL, 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.
Parameters
sort
The order of the results; the query keeps a copy.
val query = SingleQuery(
filter = EqualFilter(QueryField("id"), value),
projection = Projection(include = listOf(QueryField("name"), QueryField("email"))),
sort = listOf(Sort(QueryField("createdDate"), Direction.DESC))
)Content copied to clipboard
Constructors
Link copied to clipboard
constructor(filter: FilterExpression = MatchAllFilter, projection: Projection = Projection.ALL, sort: List<Sort> = emptyList())
Properties
Link copied to clipboard
The filter expression to apply to the query; MatchAllFilter, every record, by default.
Link copied to clipboard
The field projection to control which fields are included in the result.