QueryFieldCapabilities

The effective capabilities of one field, compiled once from its value definition, the capabilities storage grants it, its sensitivity, its element scopes and the model's storage support (design §5.2, P2). Admission checks each reference against this record, the descriptor publishes it, and it lists each capability with the cost class its spec states, which an entry gate that refuses expensive operations also reads. The value rules of the operator, group and metric specs are decided here, once, so admission and the descriptor cannot disagree about them.

What depends on one request (a value within the field's domain, a relative-time configuration, a dynamic key) is still checked by admission.

Properties

Link copied to clipboard

Whether the field's values are aggregated at all: unprotected, with a terms, numeric or temporal capability.

Link copied to clipboard

Whether any alternative of the value is an array, so storage may hold several values per record.

Link copied to clipboard

How many values one record holds for the field; null when its value is unknown or mixes both.

Link copied to clipboard

Whether the field is a known collection: every non-null alternative is an array.

Link copied to clipboard

Whether callers may compare the field's raw value (filters and paged sorts).

Link copied to clipboard

Whether the field can order a cursor: cursor-sortable storage, single-valued, top level and unprotected.

Link copied to clipboard

Whether the field is an input of arithmetic aggregation expressions.

Link copied to clipboard

The capabilities storage grants the field.

Link copied to clipboard

The group types that may group by the field, in spec order.

Link copied to clipboard

Whether a metric filter may name the field: metric filters test whole values, so no array alternative.

Link copied to clipboard

Whether date groups and date differences can read the field's instants: a date or an epoch encoding.

Link copied to clipboard

The metric types that may read the field, in spec order; COUNT and DERIVED read none.

Link copied to clipboard

Whether TERMS may name a key for records without a value: a single-valued string field.

Link copied to clipboard

The field operators a caller may apply, in operator order: those storage grants whose value rule the field satisfies, on a comparable field inside granted element scopes. A dynamic key's record reads the same checks.

Link copied to clipboard

Whether a sensitivity level protects the field: it is then never aggregated.

Link copied to clipboard

Whether some value of the field is a scalar a comparison value can be checked against.

Link copied to clipboard

Whether the field holds one string per record (or null).

Link copied to clipboard

Whether callers may sort pages by the field.

Link copied to clipboard

How the field stores time: the one temporal semantic type every non-null value shares, or null when its values declare none, or different ones. Relative time resolves against it, and backends read it to decode instants.

Functions

Link copied to clipboard
fun groups(allowExpensive: Boolean): List<GroupSpec>

groups, without the expensive ones unless allowExpensive.

Link copied to clipboard
fun metrics(allowExpensive: Boolean): List<MetricSpec>

metrics, without the expensive ones unless allowExpensive.

Link copied to clipboard
fun operators(allowExpensive: Boolean): List<FilterOperator>

operators, without the expensive ones unless allowExpensive.

Link copied to clipboard

Whether the field satisfies rule, the value rule of a filter operator's spec.