DatasetAccess

How an access policy restricts the rows of a dataset bound to an aggregate (QueryDatasetAccess): by the current access attributes of the aggregate each row is of, never by what the row recorded when it was written. The restriction is one ELEMENT_MATCH on the reserved container FIELD, @access: the aggregate's current access record, none when the storage holds none of it, whose fields are its attributes by name as every record stores them (AccessValues: the built-in owner and space, and each declared one). It reads "the aggregate has a current access record that the predicate holds of":

  • the predicate is the policy's whole read predicate in one node, so a negation or a disjunction keeps its meaning, and a storage compiles it as one semi-join of the dataset's id column on the aggregates' current access records;

  • an aggregate whose access the storage does not hold, or one recorded without attributes, matches nothing, whatever the predicate;

  • only admission appends it (me.ahoo.wow.query.policy.AccessQueryPolicy): a caller cannot name @access, so no filter, sort or projection of a caller's reaches its predicate.

A storage compiles it only where it declares me.ahoo.wow.query.schema.StorageSupport.datasetAccess. Its predicate is in the vocabulary me.ahoo.wow.query.policy.AccessFilters compiles to (requireComparisons): AND, OR, NOR, EQ, IN, case-sensitive STARTS_WITH, CONTAINS_ALL, IS_EMPTY, IS_NULL and IS_NOT_NULL, each on one attribute and each operand a String, a Long or a Boolean.

Properties

Link copied to clipboard

The container of the current access record of the aggregate a row is of.

Functions

Link copied to clipboard
fun fieldOf(attribute: AccessAttribute<*, *>): QueryField<*>

The field attribute is compared on inside FIELD: its name in the access record.

Link copied to clipboard

The predicate of filter when it is a dataset's access restriction; null for any other filter.

Link copied to clipboard

predicate, checked to be in the vocabulary of an access restriction; an IllegalArgumentException if not.

Link copied to clipboard

The restriction of a policy's predicate, compiled on the access record's fields (fieldOf): none for a predicate that grants every aggregate, and nothing for one that grants none, neither reading an access record; otherwise the one ELEMENT_MATCH of the predicate on FIELD.