Queryable

Interface for query objects that support comprehensive querying capabilities.

This interface combines condition filtering, field projection, and sorting capabilities to provide a complete query interface for retrieving and filtering data.

Parameters

Q

The type of the query object that implements this interface, enabling method chaining.

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

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

Appends a tenant ID condition to filter results by tenant.

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

Creates a new query with the specified condition.

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

Creates a new query with the specified projection.