Package-level declarations

Types

Link copied to clipboard
class PostgresEventQueryStorage @JvmOverloads constructor(dataSource: DataSource, val context: String, val options: PostgresQueryOptions = PostgresQueryOptions(), dispatcher: CoroutineDispatcher = VirtualThreads.dispatcher) : CachedQueryBindings<AggregateType>

The events query storage of one bounded context on PostgreSQL: the PostgresQueryBackend of each of its aggregate types over that aggregate's own log table (wow_log__<ctx>__<agg>), which PostgresEventLog appends to, with the facts of PostgresEventStorageAdapter. One record per stream, as stored.

Link copied to clipboard

A query backend of one aggregate type on PostgreSQL: the four primitives over one of the aggregate type's own tables, read as layout says, compiled to parameterized SQL (PostgresSnapshotSqlCompiler, PostgresAggregationCompiler): its snapshot table (on the bindings of PostgresSnapshotStorageAdapter; records of the shape of SnapshotRecord.toQueryRecord(), a row without any kept state field not reading the state at all) or its log table (on the bindings of PostgresEventStorageAdapter; one record per stream, as stored). A projection is applied to each record as it is read.

Link copied to clipboard
data class PostgresQueryIndex(val name: String, val table: String, val ddl: String)

A planned expression index: its physical name, its table (quoted) and the statement that creates it.

Link copied to clipboard

The expression indexes of an aggregate type's snapshot table. Each index the aggregate declares in the Manifest becomes

Link copied to clipboard
data class PostgresQueryIndexReport(val created: List<String> = emptyList(), val missing: List<String> = emptyList(), val invalid: List<String> = emptyList())

What PostgresSnapshotQueryStorage.manageIndexes did: the indexes it created, and the ones it found missing or invalid.

Link copied to clipboard
class PostgresQueryOptions @InternalWowApi constructor(val indexDdl: Ddl = Ddl.AUTO, val fetchSize: Int = DEFAULT_FETCH_SIZE)

The options of the PostgreSQL snapshot query backend. The host maps its configuration onto them. * Fields may be added: Wow builds it from the host's configuration, so the constructor is internal to Wow.

Link copied to clipboard
class PostgresSnapshotQueryStorage @JvmOverloads constructor(dataSource: DataSource, val context: String, val options: PostgresQueryOptions = PostgresQueryOptions(), dispatcher: CoroutineDispatcher = VirtualThreads.dispatcher, ddlDataSource: DataSource = dataSource) : CachedQueryBindings<AggregateType>

The snapshot query storage of one bounded context on PostgreSQL: the PostgresQueryBackend of each of its aggregate types, over that aggregate's own snapshot table, which PostgresSnapshotStore writes, with the facts PostgresQuerySchemaAdapter reads from the table; and the management of the expression indexes its aggregates declare (manageIndexes). The queries and the facts read dataSource; the indexes are created through ddlDataSource, the store's own, so a dataSource of a read replica (query-data-source) never takes DDL.