Package-level declarations

Types

Link copied to clipboard

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":

Link copied to clipboard

The query gateway of one dataset: the QueryGateway operations (single, list, paged, cursor, count, aggregate, describe), each with its explicit QueryCaller, admitted against the dataset's schema with the same filters, policies, budgets and masking as an aggregate's snapshots. Its aggregateType is the dataset's name.

Link copied to clipboard

The gateways of the datasets a node serves, by dataset name, following QueryDatasets: a dataset that joins or changes gets a new gateway, one that leaves loses its own.

Link copied to clipboard

The record layout of one QueryDataset: the whole record is payload, its fields are the dataset's declaration, and the system fields are the columns the dataset names. A dataset has no aggregate id and no deletion flag, so a filter on either is an unknown field, and no default scope.

Link copied to clipboard

Which datasets a caller sees: those GET /wow/dataset lists, and those whose routes answer it; the routes of a dataset the caller does not see are a 404, as if it did not exist. It hides only what the caller could not read anyway, and every query is still restricted by the gateway's policies.

Link copied to clipboard
class DefaultDatasetQueryGateway(val dataset: QueryDataset, backend: QueryBackend, schemaProvider: QueryModelSchemaProvider, filters: List<QueryFilter> = emptyList(), policies: List<QueryPolicy> = emptyList(), observer: QueryObserver = QueryObserver.NONE, entryPolicy: QueryEntryPolicy = QueryEntryPolicy.DEFAULT, authorizer: ReadAuthorizer = ReadAuthorizer.ALLOW_ALL) : DatasetQueryGateway, QueryGateway

A DatasetQueryGateway over backend, admitting against the schema schemaProvider compiles.

Link copied to clipboard
class QueryDataset @InternalWowApi constructor(val name: AggregateType, val scope: QueryDatasetScope, val declaration: QuerySchemaDeclaration, val identity: QueryField<*>? = null, val eventTime: QueryField<*>? = null, val title: String? = null, val storage: ObjectNode = WowJson.mapper.createObjectNode(), val unavailable: String? = null, val lineage: QueryDatasetLineage = QueryDatasetLineage.SOURCE)

A dataset (the DATASET query model): a table-like record set, such as a BI wide table or the ClickHouse Sink's _state_flat view, declared at runtime or in a file rather than in the Manifest. Its fields are its declaration, at the record root; its record layout is its profile.

Link copied to clipboard
class QueryDatasetAccess @InternalWowApi constructor(val aggregate: AggregateType, val id: QueryField<*>)

The aggregate whose access policy decides which of a dataset's rows a caller reads: each row is of one aggregate, the one whose id its id column holds. The rows are read as the aggregate's current access attributes let the caller read it, whatever the row recorded when it was written.

Link copied to clipboard

Declares a QueryDataset in code: its profile columns, its fields and their sensitivity.

Link copied to clipboard

One change to the QueryDatasets: a dataset joined, was replaced by a new declaration, or left.

Link copied to clipboard
class QueryDatasetConfig @InternalWowApi constructor(val type: String, options: Map<String, String> = emptyMap(), val resources: StoreResources = StoreResources.NONE)

What a QueryDatasetProvider opens from: its type, its settings (settings, wow.<type>.* relative to it) and the application's resources. Fields may be added: the host builds it, so the constructor is internal to Wow; a provider's test builds one with of.

Link copied to clipboard
class QueryDatasetFiles @JvmOverloads constructor(configDirectory: Path = Path.of("config"), classLoader: ClassLoader = Thread.currentThread().contextClassLoader ?: QueryDatasetFiles::class.java.classLoader)

Reads the dataset files (datasets are declared in files, not in the Manifest), one per dataset, named {context}.{dataset}.json in the QueryDatasetProperties format: from the working directory's <configDirectory>/wow/dataset/, which takes precedence, else from the classpath's META-INF/wow/dataset/.

Link copied to clipboard

Where a dataset's protection comes from (QueryDataset.lineage).

Link copied to clipboard

Follows the changes of QueryDatasets: every listener validates a change before any applys it, so a listener that cannot follow a change (a gateway that cannot be built, a name an aggregate takes) refuses it for all of them.

Link copied to clipboard

A dataset backend (the ClickHouse one, say): the QueryBindings of the datasets it serves, opened from its settings and the application's resources. The host finds it with ServiceLoader (META-INF/services) and opens the one that is available; with several it refuses the start, naming them, and an application's own QueryBindings<QueryDataset> bean takes the place of any.

Link copied to clipboard

The runtime catalog of the datasets this node serves: declared in code, read from files (QueryDatasetFiles) or registered while the node runs, as dataset-registry does. The schema Catalog, the dataset gateways and the storages follow it through listen.

Link copied to clipboard
class QueryDatasetScope @InternalWowApi constructor(val tenant: QueryField<*>? = null, val owner: QueryField<*>? = null, val space: QueryField<*>? = null, val tenantless: Boolean = false, val access: QueryDatasetAccess? = null)

Which columns of a dataset hold its caller scope: the tenant (or, for a tenantless dataset, none), the owner and the space; and, when its rows are an aggregate's, the access of that aggregate. A dataset either names its tenant column or declares that it is tenantless, never both.

Link copied to clipboard
class QueryDatasetSource @InternalWowApi constructor(val description: String, val columns: Map<String, QueryDatasetSource.Column> = emptyMap(), val aggregate: AggregateType? = null, val id: String? = null, val declaresAccess: Boolean = false, val tenant: String? = null)

The source of a dataset's table: what it is (description, for a message), and each of its columns that holds a value a state marks sensitive. A column it does not name holds none. When the backend knows more of the table, as of a table its Sink writes, it says whose rows it holds (aggregate, each row's id in id, and whether that aggregate declares access attributes, declaresAccess) and where each row's tenant is (tenant), which the engine holds the dataset's scope to.

Link copied to clipboard

What a dataset backend knows of the tables its datasets read: implemented by its QueryBindings, the engine asks it for the source of each dataset whose lineage is QueryDatasetLineage.SOURCE or QueryDatasetLineage.NONE, when the dataset is served and each time one joins. Bindings that do not implement it know no source: each such dataset of QueryDatasetLineage.SOURCE is served unavailable.