ISingleQuery

Interface for single-item queries that retrieve at most one result.

This interface extends Queryable and is designed for queries that expect to return a single item or null, rather than a collection of items.

Inheritors

Properties

Link copied to clipboard
abstract val condition: Condition

The condition currently applied to this query.

Link copied to clipboard
abstract val projection: Projection

The projection settings that control which fields are included in or excluded from the query results.

Link copied to clipboard
abstract val sort: List<Sort>

The list of sort criteria to apply to the query results. Each sort criterion specifies a field and direction (ascending/descending). Sorts are applied in the order they appear in the list.

Functions

Link copied to clipboard
open override fun appendCondition(append: Condition): ISingleQuery

Appends a condition to the existing condition using logical AND. This method combines the current condition with the appended condition.

Link copied to clipboard
open fun appendTenantId(tenantId: String): ISingleQuery

Appends a tenant ID condition to filter results by tenant.

Link copied to clipboard
abstract fun withCondition(newCondition: Condition): ISingleQuery

Creates a new query with the specified condition.

Link copied to clipboard
abstract fun withProjection(newProjection: Projection): ISingleQuery

Creates a new query with the specified projection.