QueryIndexPlan

class QueryIndexPlan @InternalWowApi constructor(val logical: LogicalQuerySchema, val indexes: List<QueryIndexPlan.Index>)

The x-wow-index indexes of one aggregate's snapshot query model, planned against the schema its storage's facts compiled to: each declared Index with its keys resolved to where the storage keeps them. The core plans it once, refusing what no storage can index (a key the model does not know, or one the storage neither matches, ranges nor sorts); a backend applies its own rules on top, such as how many keys may hold many values (Key.cardinality), and creates or checks the indexes as its ddl says. logical is the model's logical definition, for a storage that maps the model's values rather than indexing keys.

Constructors

Link copied to clipboard

Types

Link copied to clipboard
Link copied to clipboard
class Index @InternalWowApi constructor(val name: String, val keys: List<QueryIndexPlan.Key>)

One declared index: its name and its keys, in the declared order.

Link copied to clipboard
class Key @InternalWowApi constructor(val field: QueryField<*>, val physicalField: QueryField<*>, val storageTypes: Set<QueryStorageType>?, val cardinality: QueryCardinality?)

One key of an index: the logical field the declaration names, the physicalField the storage keeps it at for a sort, a range or an exact match (in that order of preference), its native storageTypes there (null when the storage does not know them), and whether it holds one value per record or many (cardinality, null when unknown).

Properties

Link copied to clipboard
Link copied to clipboard