Types

Link copied to clipboard
Link copied to clipboard
data class ArrayEquality(val field: QueryField) : QueryViolation

EQ / NE on field names an array operand, and the storage cannot compare a whole array.

Link copied to clipboard
object Companion
Link copied to clipboard
data class CountRequiresFilter(val label: String) : QueryViolation

A counting query (count, paged total) matches every record, and the entry does not allow expensive operators.

Link copied to clipboard
data class CursorNotAllowed(val field: QueryField) : QueryViolation
Link copied to clipboard

A cursor sort names field twice once the identity tie-breaker is appended.

Link copied to clipboard
data class CursorSortTooMany(val max: Int) : QueryViolation

A cursor sort has more than max fields once the identity tie-breaker is appended.

Link copied to clipboard

Two sort fields (field is the later one) are bound to the same physical field, so one of them sorts nothing.

Link copied to clipboard
Link copied to clipboard

An event projection that keeps payloads must keep their type, so each payload can be read.

Link copied to clipboard
data class ExpensiveOperatorDisabled(val label: String, val construct: String, val plural: Boolean = false, val location: String) : QueryViolation

construct (e.g. query operator[CONTAINS]) is expensive, and the entry does not allow expensive operators.

Link copied to clipboard

The gateway requires every query to state its entry, and this one ran under UNSPECIFIED.

Link copied to clipboard
data class FilterTooLarge(val label: String, val subject: String, val value: Int, val max: Int, val location: String) : QueryViolation

The filter (and HAVING) of a query has more nodes or values (subject) than the entry allows.

Link copied to clipboard

A FIRST / LAST metric inside an element, or on a model without an event time, names no orderBy.

Link copied to clipboard

FIRST / LAST need a single value per record, both for the value and for its ordering field.

Link copied to clipboard

An identity filter or a cursor (whose tie-breaker is the identity) on a model that defines no identity.

Link copied to clipboard
Link copied to clipboard

A cursor token that does not decode for this model and effective sort.

Link copied to clipboard

Which error a violation renders as.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
data class NotCollection(val field: QueryField) : QueryViolation
Link copied to clipboard
data class NotProjectable(val field: QueryField) : QueryViolation
Link copied to clipboard
data class NotSingleString(val field: QueryField) : QueryViolation
Link copied to clipboard
data class ParallelArraySort(val field: QueryField, val other: QueryField) : QueryViolation

field and other are independent arrays, and the storage cannot sort by both.

Link copied to clipboard
Link copied to clipboard

A filter or sort compares a sensitive field whose raw value must not be compared.

Link copied to clipboard
data class ResidualGroupsExceeded(val label: String, val max: Int) : QueryViolation

An aggregation whose HAVING or metric sort the core computes read more than max groups, dense fill rows included. Metered while the rows arrive, so it can fail after the response started streaming.

Link copied to clipboard
data class SizeOutOfRange(val label: String, val subject: String, val value: Long, val min: Long?, val max: Long?, val location: String) : QueryViolation

A size the entry bounds (subject: a list or aggregation limit, a page index, size, window or offset, a cursor size) is value, outside min..max; a null bound is open.

Link copied to clipboard
data class SortTooMany(val max: Int) : QueryViolation

A sort names more fields than any storage supports.

Link copied to clipboard
data class StorageUnsupported(val feature: String, val field: QueryField? = null) : QueryViolation

The storage cannot run feature: it declares the feature unsupported, or its native language cannot express the query (a backend's native check). field is the field involved, when there is one.

Link copied to clipboard

A date group or date difference names a field whose values do not store instants as a date or an epoch, so no backend can read them as instants.

Link copied to clipboard
Link copied to clipboard
data class UnknownField(val field: QueryField) : QueryViolation
Link copied to clipboard
data class UnsupportedCapability(val field: QueryField, val capabilities: Set<QueryCapability>) : QueryViolation

The field grants none of capabilities.

Link copied to clipboard
data class ValueMismatch(val field: QueryField) : QueryViolation

A filter value falls outside the field's declared domain; field is the name as the request wrote it.

Properties

Link copied to clipboard
abstract val code: String

A stable, machine-readable code; a contract: codes are added, never renamed.

Link copied to clipboard
open val field: QueryField?

The logical field the violation is about, or null for model-level violations.

Link copied to clipboard
Link copied to clipboard
open val location: String

What the binding error names: the absolute logical field (or "") for a model rule, a request part otherwise.

Link copied to clipboard
abstract val message: String

Functions

Link copied to clipboard

The error this violation is rejected with; the one place a violation is rendered.