Package-level declarations

Types

Link copied to clipboard
abstract class AccessFilterSpec

The access filter contract: every snapshot query backend answers an access policy's filter (AccessFilters) as the kernel evaluates the policy (AccessPredicate.allows), so a policy grants the same aggregates whether a query, a point read or a command asks. A backend's test extends it, stores the records each test gives in store, and supplies its binding of an aggregate type in binding; on the in-memory backend it is the matrix that holds the kernel's evaluator to the point reads', on the others the access attributes' push-down.

Link copied to clipboard
abstract class DatasetAccessSpec

The access restriction of a dataset bound to an aggregate (DatasetAccess) on a dataset backend: each row is read by the current access attributes of the aggregate it is of, as the kernel's AccessPredicate.allows decides on them, over every predicate of AccessFilterSpec's matrix and its documents.

Link copied to clipboard

The aggregation cases of the dataset contract: groups, FIRST and LAST, histograms, HAVING, windows, PREVIOUS and value metrics. They read only DatasetQueryFixtures's fixtures and hooks; see DatasetQueryFixtures for the chain of families it is part of.

Link copied to clipboard
class DatasetColumn @InternalWowApi constructor(val name: String, val type: DatasetColumn.Type, val nullable: Boolean = false)

A column of a TCK dataset table, in storage-neutral terms; each backend maps it to a native type.

Link copied to clipboard

The cases of the dataset contract (DatasetQueryBackendSpec, which extends this class and is the one a backend's test extends) on date buckets across a zone's offset changes. They hold the bucket rule (DateBuckets) at daylight saving's transitions, in a half-hour zone, at a half-hour change (Australia/Lord_Howe), at a change by seconds (Africa/Monrovia) and on the day of a change before 1970 (Asia/Shanghai's switch from local mean time). They read their table, ZONED, through aggregateZoned, over DatasetQueryFixtures' fixtures and hooks; see there for the chain of families this class is part of.

Link copied to clipboard

The dataset backend contract (the 9.x DatasetQueryBackendSpec of wow-tck): every dataset query backend passes it over a flat table: the filter semantics matrix, records (sort, projection, offset and keyset pages, counts), aggregation, the dataset's tenant column, and the gateway's scope over it. A backend's test supplies its bindings (createDatasetBindings) and loads each table in createTable.

Link copied to clipboard
abstract class DatasetQueryFixtures

The fixtures and hooks of the dataset contract (DatasetQueryBackendSpec, the class a backend's test extends): the backend's hooks (createDatasetBindings, createTable, semanticDivergences), the Target a test queries, the orders every test reads, and the dataset a table compiles to (target).

Link copied to clipboard

The record cases of the dataset contract: the semantics matrix, records, the tenant column, single, offset and keyset pages, counts, streams, NOR and expressions. They read only DatasetQueryFixtures's fixtures and hooks; see DatasetQueryFixtures for the chain of families it is part of.

Link copied to clipboard
class DatasetTable @InternalWowApi constructor(val name: String, val columns: List<DatasetColumn>, val rows: List<Map<String, Any?>>)

A table the spec loads: its columns and rows, each value a String, Long, BigDecimal, Instant, a List of strings or null as its column's type says. A row without a column's key leaves the value missing; a table stores it as its storage stores a missing value (NULL, or an empty array).

Link copied to clipboard

The per-event analytics cases of the events contract: aggregations that expand the events. They read only EventQueryFixtures's fixtures and hooks; see EventQueryFixtures for the chain of families it is part of.

Link copied to clipboard

The contract of an events query backend: every events backend passes it. A backend's test extends it, stores the streams each test gives in store, and supplies its binding of an aggregate type in binding.

Link copied to clipboard
abstract class EventQueryFixtures

The fixtures and hooks of the events contract (EventQueryBackendSpec, the class a backend's test extends): the backend's hooks (store, binding), the test's own aggregate type and manifest, the Fixture a test queries, and the streams it stores (stream, event, streams, stampedStreams).

Link copied to clipboard

The semantic specification of the field filter operators (ported from 9.x wow-tck): how each operator treats a missing field, an explicit null, array elements and letter case. The expected matches are the MongoDB behavior, which is canonical; every backend must reproduce them, and QueryBackendSpec runs every case.

Link copied to clipboard

The query backend contract (the 9.x SnapshotQueryBackendSpec of wow-tck, ported to the 10.x snapshot model): every snapshot query backend passes it. A backend's test extends it, stores the snapshots each test gives in store, and supplies its binding of an aggregate type in binding.

Link copied to clipboard
class SemanticCase(val id: String, val shape: SemanticShape, val matches: Set<String>, filter: (QueryField<*>) -> FilterExpression)

One cell of the semantic matrix: filter, applied to a field of shape, matches exactly the probes named in matches. id is stable and unique, so a backend's test can name the cells it is known to diverge on.

Link copied to clipboard

One stored value of a SemanticShape, as the JSON text of the state property: json is null when the field is absent from the stored record, and "null" when the record stores an explicit null.

Link copied to clipboard

The shape of the field a SemanticCase runs against. Each shape comes with a fixed set of SemanticProbes: stored values that cover a missing field, an explicit null, and the ordinary and edge values of that shape.

Link copied to clipboard

The aggregation cases of the snapshot contract. They read only SnapshotQueryFixtures's fixtures and hooks; see SnapshotQueryFixtures for the chain of families it is part of.

Link copied to clipboard

The cases of the snapshot contract (QueryBackendSpec, which extends this class and is the one a backend's test extends) on date buckets across a zone's offset changes. They hold the bucket rule (DateBuckets) at daylight saving's transitions, in a half-hour zone, at a half-hour change (Australia/Lord_Howe) and where a change skipped a unit's local start (Africa/Monrovia's 1972 change). They read through createdAtBuckets, over SnapshotQueryFixtures' fixtures and hooks; see there for the chain of families this class is part of.

Link copied to clipboard

The filter cases of the snapshot contract: the semantics matrix, system fields, logical filters, element match, relative time and expressions. They read only SnapshotQueryFixtures's fixtures and hooks; see SnapshotQueryFixtures for the chain of families it is part of.

Link copied to clipboard

The keyset cases of the snapshot contract: cursors and streams. They read only SnapshotQueryFixtures's fixtures and hooks; see SnapshotQueryFixtures for the chain of families it is part of.

Link copied to clipboard
abstract class SnapshotQueryFixtures

The fixtures and hooks of the snapshot contract (QueryBackendSpec, the class a backend's test extends): the backend's hooks (store, binding, semanticDivergences), the test's own aggregate type, the Fixture a test queries, and the snapshots it stores (snapshot, orders).

Link copied to clipboard

The record cases of the snapshot contract: sort, list, single and projection, offset pages and counts. They read only SnapshotQueryFixtures's fixtures and hooks; see SnapshotQueryFixtures for the chain of families it is part of.

Functions

Link copied to clipboard
fun assumeBound(binding: Any?, field: String, capability: QueryCapability, feature: String)

Skips the test unless the storage binds capability to field: binding is that binding, null when it binds none. The skip names the field and the capability, as assumeSupported names a storage fact.

Link copied to clipboard
fun assumeSupported(mode: SupportMode, fact: String, feature: String)

Skips the test unless the storage supports feature: mode is what it declares for it, at fact (such as storage.paging.keyset). The skip says the fact and its value, so a report shows which declaration declined it, and a backend that declined a feature by mistake sees it.