SingleQuery
data class SingleQuery(val condition: Condition, val projection: Projection = Projection.ALL, val sort: List<Sort> = emptyList()) : ISingleQuery
Data class representing a query for retrieving a single item with optional filtering, projection, and sorting.
This class implements ISingleQuery and provides a concrete implementation for single-item queries. It supports all standard query operations but is optimized for scenarios where only one result is expected.
Samples
Constructors
Link copied to clipboard
constructor(condition: Condition, projection: Projection = Projection.ALL, sort: List<Sort> = emptyList())
Properties
Functions
Link copied to clipboard
Appends a condition to the existing condition using logical AND. This method combines the current condition with the appended condition.
Link copied to clipboard
Appends a tenant ID condition to filter results by tenant.
Link copied to clipboard
Creates a new SingleQuery with the specified condition.
Link copied to clipboard
Creates a new SingleQuery with the specified projection.