Package-level declarations

Types

Link copied to clipboard
data class QueryContext<Q : RewritableFilter<Q>>(val query: Q, val namedAggregate: NamedAggregate, val schema: QueryModelSchema, val queryType: QueryType, val entry: QueryEntry)

What a QueryFilter or me.ahoo.wow.query.QueryPolicy sees of the query being admitted.

Link copied to clipboard
interface QueryFilter

Rewrites a request before mandatory scope and query policy conditions are appended.

Link copied to clipboard

Functions

Link copied to clipboard

Whether this metric evaluates anything other than a bare field: a non-field AggregationExpression (arithmetic or a constant) on NUMERIC / DISTINCT_COUNT / PERCENTILE, or any DERIVED metric. COUNT, ANY, FIRST and LAST never carry an expression.

Link copied to clipboard

Whether this single filter node (children are not inspected) is costly for a backend to evaluate, as the operator's me.ahoo.wow.api.query.spec.FilterOperatorSpec states.

Link copied to clipboard

Whether this filter provably matches every document, as its operator's me.ahoo.wow.api.query.spec.FilterOperatorSpec.matchesAll states: MatchAllFilter, a DeletionFilter for DeletionState.ALL, an AndFilter whose operands all match everything, or an OrFilter with at least one operand that matches everything. Any other filter is treated as restrictive.

Link copied to clipboard

The field a predicate names, or null for filters that name none (logical, system-field, match-all/none and search filters, whose fields are a set). Pairs with me.ahoo.wow.api.query.spec.FilterOperatorSpec: the spec says what the operator needs, FieldPredicate says where the node keeps its field.

Link copied to clipboard

The field capability this node's operator requires, per its me.ahoo.wow.api.query.spec.FilterOperatorSpec.

Link copied to clipboard

The number of literal values carried by a multi-value filter node (IN, NOT_IN, CONTAINS_ALL, IDS, AGGREGATE_IDS: the operators whose value arity is a list), or null for nodes that do not carry a value list.

The number of literal values carried by this having node: one for CONDITION, two for BETWEEN, the list size for IN, and zero for IS_NULL and the logical AND / OR nodes.

Link copied to clipboard

Lazily walks every node of these filter trees (roots included) depth-first without recursion, so arbitrarily deep trees cannot overflow the stack. Nodes are visited last-in-first-out: the last root first, and each node before its children. Consumers can stop early, e.g. once a node budget is exceeded.

Link copied to clipboard

Lazily walks every node of this having tree, the root included, in the same order as walkFilterNodes.

Link copied to clipboard

This predicate naming field instead of its predicateField; filters that name no field are returned unchanged. The inverse of predicateField, used to rewrite a query's field references.