Package-level declarations

Types

Link copied to clipboard
class AfterNowFilter @InternalWowApi constructor(val field: QueryField<*>, val offset: String = ZERO_OFFSET, val zoneId: String? = null, val datePattern: String? = null, val dateFormatter: DateTimeFormatter? = null, val timeUnit: TimeUnit = TimeUnit.MILLISECONDS) : RelativeTimeFilter

The field is after now + offset; see BeforeNowFilter.

Link copied to clipboard
class AggregateIdFilter @InternalWowApi constructor(val value: String) : FilterExpression
Link copied to clipboard
class AggregateIdsFilter @InternalWowApi constructor(val values: List<String>) : FilterExpression
Link copied to clipboard

A calendar part of an instant, with its fixed integer domain [min, max].

Link copied to clipboard
class AggregationElement @InternalWowApi constructor(val path: QueryField<*>, val filter: FilterExpression = MatchAllFilter)
Link copied to clipboard

One numeric contribution per current root or expanded record, for data conforming to its numeric schema. FIELD selects the sole non-null numeric value; missing, empty and multi-valued fields do not contribute. Repeated numeric values remain separate values. BINARY computes finite doubles; it does not pair arrays or preserve arbitrary native numeric precision.

Link copied to clipboard
Link copied to clipboard

Where a group reads its field when the query expands elements; see AggregationGroup.scope.

Link copied to clipboard
Link copied to clipboard
class AggregationQuery @InternalWowApi constructor(val filter: FilterExpression = MatchAllFilter, val elements: List<AggregationElement> = emptyList(), val groupBy: List<AggregationGroup> = emptyList(), val metrics: List<AggregationMetric>, val sort: List<Sort> = emptyList(), val limit: Int = DEFAULT_LIMIT, val having: HavingExpression? = null) : FilterCapable<AggregationQuery> , SortCapable
Link copied to clipboard
class AndFilter @InternalWowApi constructor(val operands: List<FilterExpression>) : FilterExpression
Link copied to clipboard
class BeforeNowFilter @InternalWowApi constructor(val field: QueryField<*>, val offset: String = ZERO_OFFSET, val zoneId: String? = null, val datePattern: String? = null, val dateFormatter: DateTimeFormatter? = null, val timeUnit: TimeUnit = TimeUnit.MILLISECONDS) : RelativeTimeFilter

A moment relative to the server's clock: the field is before now + offset. The server resolves now once per query, so every condition of one query sees the same moment and the client's clock does not matter.

Link copied to clipboard
class BeforeTodayFilter @InternalWowApi constructor(val field: QueryField<*>, val time: String, val zoneId: String? = null, val datePattern: String? = null, val dateFormatter: DateTimeFormatter? = null, val timeUnit: TimeUnit = TimeUnit.MILLISECONDS) : RelativeTimeFilter
Link copied to clipboard
class BetweenFilter @InternalWowApi constructor(val field: QueryField<*>, val lowerBound: Any?, val upperBound: Any?) : FieldPredicate
Link copied to clipboard
class ContainsAllFilter @InternalWowApi constructor(val field: QueryField<*>, val values: List<Any?>) : FieldPredicate
Link copied to clipboard
class ContainsFilter @InternalWowApi constructor(val field: QueryField<*>, val value: String, val stringComparison: StringComparison = StringComparison.CASE_SENSITIVE) : FieldPredicate
Link copied to clipboard
class CountQuery @InternalWowApi constructor(val filter: FilterExpression, val limit: Int? = null) : FilterCapable<CountQuery>

A bounded count of the matches of filter.

Link copied to clipboard
class CountResult @InternalWowApi constructor(val count: Long, val exact: Boolean)

The result of a CountQuery.

Link copied to clipboard
class CrossTenant @InternalWowApi constructor(val tenantIds: Set<String>? = null)

The tenants a cross-tenant query reads: every tenant when tenantIds is null (ALL), else those. Only the HTTP edge states one, for a caller that may act across scopes and names Wow-Scope: tenant=* or tenant=("t1" "t2") while wow.query.allow-cross-tenant is on; trusted in-process code that must read every tenant uses NodeQueryApi.trusted(). A type whose tenant is fixed is still read in that tenant alone, and every cross-tenant query is audited, whether or not a QueryObserver audits.

Link copied to clipboard
class CursorPage<out T> @InternalWowApi constructor(val list: List<T>, val nextCursor: String?)
Link copied to clipboard
class CursorQuery @InternalWowApi constructor(val filter: FilterExpression, val projection: Projection = Projection.ALL, val sort: List<Sort> = emptyList(), val size: Int = DEFAULT_SIZE, val cursor: String? = null) : Queryable<CursorQuery>

A query for the page of results after a cursor, in the order of sort, with filtering and projection (Queryable).

Link copied to clipboard

A fixed-length unit of elapsed time. Calendar units (months, years) have no fixed length and depend on a time zone, so they are not offered; a DAY is exactly 24 hours.

Link copied to clipboard
class DeletionFilter @InternalWowApi constructor(val deletionState: DeletionState) : FilterExpression

Filters by deletion state; deletionState is written as state on the wire.

Link copied to clipboard

Enumeration representing the possible states of deletion for entities in the system.

Link copied to clipboard
Link copied to clipboard
class EarlierDaysFilter @InternalWowApi constructor(val field: QueryField<*>, val days: Int, val zoneId: String? = null, val datePattern: String? = null, val dateFormatter: DateTimeFormatter? = null, val timeUnit: TimeUnit = TimeUnit.MILLISECONDS) : RelativeTimeFilter
Link copied to clipboard
class ElementMatchFilter @InternalWowApi constructor(val field: QueryField<*>, val predicate: FilterExpression) : FieldPredicate
Link copied to clipboard
class EndsWithFilter @InternalWowApi constructor(val field: QueryField<*>, val value: String, val stringComparison: StringComparison = StringComparison.CASE_SENSITIVE) : FieldPredicate
Link copied to clipboard
class EqualFilter @InternalWowApi constructor(val field: QueryField<*>, val value: Any?) : FieldPredicate
Link copied to clipboard
class ExistsFilter @InternalWowApi constructor(val field: QueryField<*>) : FieldPredicate
Link copied to clipboard
class ExpressionFilter @InternalWowApi constructor(val expression: AggregationExpression, val comparison: ComparisonOperator, val value: Double) : FilterExpression

Compares a computed expression, for example the hours from paidAt to shippedAt, with value. A record whose expression has no value (an operand is absent, or a division by zero) does not match, whatever the comparison. The expression is evaluated per record and cannot use an index, so the operator is expensive.

Link copied to clipboard
sealed interface FieldPredicate : FilterExpression

A filter on one field the request names: the comparison, string, membership, presence and relative-time predicates, and ELEMENT_MATCH, whose field is the collection its predicate applies to. System-field, logical, search and expression filters name no single field and are not field predicates.

Link copied to clipboard
Link copied to clipboard

A node of a filter tree. On the wire each node is a JSON object whose op is its operator's name, with the node's own properties beside it.

Link copied to clipboard
Link copied to clipboard
class GreaterThanFilter @InternalWowApi constructor(val field: QueryField<*>, val value: Any?) : FieldPredicate
Link copied to clipboard
class GreaterThanOrEqualFilter @InternalWowApi constructor(val field: QueryField<*>, val value: Any?) : FieldPredicate
Link copied to clipboard
Link copied to clipboard
class IdFilter @InternalWowApi constructor(val value: String) : FilterExpression
Link copied to clipboard
class IdsFilter @InternalWowApi constructor(val values: List<String>) : FilterExpression
Link copied to clipboard
class InFilter @InternalWowApi constructor(val field: QueryField<*>, val values: List<Any?>) : FieldPredicate
Link copied to clipboard
class IsEmptyFilter @InternalWowApi constructor(val field: QueryField<*>) : FieldPredicate
Link copied to clipboard
class IsEmptyStringFilter @InternalWowApi constructor(val field: QueryField<*>) : FieldPredicate
Link copied to clipboard
class IsNotEmptyStringFilter @InternalWowApi constructor(val field: QueryField<*>) : FieldPredicate
Link copied to clipboard
class IsNotNullFilter @InternalWowApi constructor(val field: QueryField<*>) : FieldPredicate
Link copied to clipboard
class IsNullFilter @InternalWowApi constructor(val field: QueryField<*>) : FieldPredicate
Link copied to clipboard
class LastMonthFilter @InternalWowApi constructor(val field: QueryField<*>, val zoneId: String? = null, val datePattern: String? = null, val dateFormatter: DateTimeFormatter? = null, val timeUnit: TimeUnit = TimeUnit.MILLISECONDS) : RelativeTimeFilter
Link copied to clipboard
class LastWeekFilter @InternalWowApi constructor(val field: QueryField<*>, val zoneId: String? = null, val datePattern: String? = null, val dateFormatter: DateTimeFormatter? = null, val timeUnit: TimeUnit = TimeUnit.MILLISECONDS) : RelativeTimeFilter
Link copied to clipboard
class LastYearFilter @InternalWowApi constructor(val field: QueryField<*>, val zoneId: String? = null, val datePattern: String? = null, val dateFormatter: DateTimeFormatter? = null, val timeUnit: TimeUnit = TimeUnit.MILLISECONDS) : RelativeTimeFilter
Link copied to clipboard
class LessThanFilter @InternalWowApi constructor(val field: QueryField<*>, val value: Any?) : FieldPredicate
Link copied to clipboard
class LessThanOrEqualFilter @InternalWowApi constructor(val field: QueryField<*>, val value: Any?) : FieldPredicate
Link copied to clipboard
class ListQuery @InternalWowApi constructor(val filter: FilterExpression, val projection: Projection = Projection.ALL, val sort: List<Sort> = emptyList(), val limit: Int? = null) : Queryable<ListQuery>

Data class representing a query for retrieving a list of items with optional filtering, projection, sorting, and limiting.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
class NextMonthFilter @InternalWowApi constructor(val field: QueryField<*>, val zoneId: String? = null, val datePattern: String? = null, val dateFormatter: DateTimeFormatter? = null, val timeUnit: TimeUnit = TimeUnit.MILLISECONDS) : RelativeTimeFilter
Link copied to clipboard
class NextWeekFilter @InternalWowApi constructor(val field: QueryField<*>, val zoneId: String? = null, val datePattern: String? = null, val dateFormatter: DateTimeFormatter? = null, val timeUnit: TimeUnit = TimeUnit.MILLISECONDS) : RelativeTimeFilter
Link copied to clipboard
class NextYearFilter @InternalWowApi constructor(val field: QueryField<*>, val zoneId: String? = null, val datePattern: String? = null, val dateFormatter: DateTimeFormatter? = null, val timeUnit: TimeUnit = TimeUnit.MILLISECONDS) : RelativeTimeFilter
Link copied to clipboard
class NorFilter @InternalWowApi constructor(val operands: List<FilterExpression>) : FilterExpression
Link copied to clipboard
class NotEqualFilter @InternalWowApi constructor(val field: QueryField<*>, val value: Any?) : FieldPredicate
Link copied to clipboard
class NotExistsFilter @InternalWowApi constructor(val field: QueryField<*>) : FieldPredicate
Link copied to clipboard
class NotInFilter @InternalWowApi constructor(val field: QueryField<*>, val values: List<Any?>) : FieldPredicate
Link copied to clipboard
class OrFilter @InternalWowApi constructor(val operands: List<FilterExpression>) : FilterExpression
Link copied to clipboard
class OwnerIdFilter @InternalWowApi constructor(val value: String) : FilterExpression
Link copied to clipboard
class PagedList<out T> @InternalWowApi constructor(val total: Long?, val list: List<T>, val exact: Boolean = total != null)

Data class implementing a paginated list of items.

Link copied to clipboard
class PagedQuery @InternalWowApi constructor(val filter: FilterExpression, val projection: Projection = Projection.ALL, val sort: List<Sort> = emptyList(), val pagination: Pagination = Pagination.DEFAULT, val total: TotalMode = TotalMode.BOUNDED) : Queryable<PagedQuery>

Data class representing a paginated query with filtering, projection, sorting, and pagination.

Link copied to clipboard
class Pagination @InternalWowApi constructor(val index: Int = 1, val size: Int = 10)

Data class representing pagination settings for queries.

Link copied to clipboard
enum class PagingMode : Enum<PagingMode>

How a query model's records may be read, as its descriptor lists them (record.paging), by wire name (list, paged, cursor): a list of the first records (ListQuery), a page by number (PagedQuery), or a page after a cursor (CursorQuery), which only a model with a unique sort offers.

Link copied to clipboard
class Projection @InternalWowApi constructor(val include: List<QueryField<*>> = emptyList(), val exclude: List<QueryField<*>> = emptyList())

Data class representing field projection settings for queries.

Link copied to clipboard

Interface for query objects that support field projection.

Link copied to clipboard

Interface for query objects that support comprehensive querying capabilities.

Link copied to clipboard

Stable, machine-readable codes of rejected query requests, carried as BindingError.code. A contract: codes are added, never renamed or reused. Clients switch on them instead of on the human text.

Link copied to clipboard
sealed interface QueryField<T>

A logical field of a query model, by its path (state.price, aggregateId, items.0.sku), typed by the values T it holds: the DSL's comparisons take a value of that type, checked at compile time (STATE__PRICE gte BigDecimal("5.00")). The generated <State>Properties and <Context>Contract constants are typed by their state's fields; a dynamic key, named only at run time, is a QueryField<Any?> (QueryField of a path) and takes any value.

Link copied to clipboard

The structure of a query field's value, as a query model's descriptor writes it (kind), by wire name: scalar (a string, a number, a boolean or a time), object, array, union (more than one of these), null (only ever null), or unknown (not described). Schema declarations and storage metadata share it.

Link copied to clipboard
class RecentDaysFilter @InternalWowApi constructor(val field: QueryField<*>, val days: Int, val zoneId: String? = null, val datePattern: String? = null, val dateFormatter: DateTimeFormatter? = null, val timeUnit: TimeUnit = TimeUnit.MILLISECONDS) : RelativeTimeFilter
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Interface for query objects that support projection rewriting and modification.

Link copied to clipboard

What a DerivedExpression.Running window computes over its frame.

Link copied to clipboard
class SearchFilter @InternalWowApi constructor(val query: String, val fields: Set<QueryField<*>> = emptySet(), val mode: SearchMode = SearchMode.TERMS) : FilterExpression
Link copied to clipboard
enum class SearchMode : Enum<SearchMode>
Link copied to clipboard
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.

Link copied to clipboard

The fields of a snapshot record a query names, as QueryFields: the system fields and STATE, under which the aggregate's state lies. Each name is its path in upper snake case, a nested segment after __: OPERATOR__ID is operator.id.

Link copied to clipboard
class Sort @InternalWowApi constructor(val field: QueryField<*>, val direction: Sort.Direction)

Data class representing a sorting criterion for query results.

Link copied to clipboard
interface SortCapable

Interface for query objects that support sorting capabilities.

Link copied to clipboard
class SpaceIdFilter @InternalWowApi constructor(val value: String) : FilterExpression
Link copied to clipboard
class StartsWithFilter @InternalWowApi constructor(val field: QueryField<*>, val value: String, val stringComparison: StringComparison = StringComparison.CASE_SENSITIVE) : FieldPredicate
Link copied to clipboard
Link copied to clipboard
class TenantIdFilter @InternalWowApi constructor(val value: String) : FilterExpression
Link copied to clipboard
class ThisMonthFilter @InternalWowApi constructor(val field: QueryField<*>, val zoneId: String? = null, val datePattern: String? = null, val dateFormatter: DateTimeFormatter? = null, val timeUnit: TimeUnit = TimeUnit.MILLISECONDS) : RelativeTimeFilter
Link copied to clipboard
class ThisWeekFilter @InternalWowApi constructor(val field: QueryField<*>, val zoneId: String? = null, val datePattern: String? = null, val dateFormatter: DateTimeFormatter? = null, val timeUnit: TimeUnit = TimeUnit.MILLISECONDS) : RelativeTimeFilter
Link copied to clipboard
class ThisYearFilter @InternalWowApi constructor(val field: QueryField<*>, val zoneId: String? = null, val datePattern: String? = null, val dateFormatter: DateTimeFormatter? = null, val timeUnit: TimeUnit = TimeUnit.MILLISECONDS) : RelativeTimeFilter
Link copied to clipboard
class TodayFilter @InternalWowApi constructor(val field: QueryField<*>, val zoneId: String? = null, val datePattern: String? = null, val dateFormatter: DateTimeFormatter? = null, val timeUnit: TimeUnit = TimeUnit.MILLISECONDS) : RelativeTimeFilter
Link copied to clipboard
class TomorrowFilter @InternalWowApi constructor(val field: QueryField<*>, val zoneId: String? = null, val datePattern: String? = null, val dateFormatter: DateTimeFormatter? = null, val timeUnit: TimeUnit = TimeUnit.MILLISECONDS) : RelativeTimeFilter
Link copied to clipboard
enum class TotalMode : Enum<TotalMode>

How a paged query counts its total, the PagedList.total it returns.

Link copied to clipboard

The window functions of DerivedExpression.Window, as a storage declares and the descriptor lists them.

Link copied to clipboard
class YesterdayFilter @InternalWowApi constructor(val field: QueryField<*>, val zoneId: String? = null, val datePattern: String? = null, val dateFormatter: DateTimeFormatter? = null, val timeUnit: TimeUnit = TimeUnit.MILLISECONDS) : RelativeTimeFilter

Properties

Link copied to clipboard

The fields an expression reads, in tree order.

Link copied to clipboard

The computed input of a TERMS or HISTOGRAM group in place of its field, or null.

Link copied to clipboard

Functions

Link copied to clipboard

The direct child filters of this node: the operands of AND / OR / NOR and the predicate of ELEMENT_MATCH. Every other node is a leaf and returns an empty list. The one walker of a filter tree: consumers that visit the tree read the children from here instead of matching the logical nodes themselves.

Link copied to clipboard

Checks if this projection has no field filtering (includes all fields).

Link copied to clipboard

The field of path, untyped: a dynamic key, which takes any value.