Package-level declarations

Types

Link copied to clipboard
class MongoEventQueryStorage @JvmOverloads constructor(client: MongoClient, databaseName: String, val context: String, val options: MongoQueryOptions = MongoQueryOptions(), dispatcher: CoroutineDispatcher = VirtualThreads.dispatcher, readPreference: ReadPreference? = null, partitions: () -> Int? = { null }) : CachedQueryBindings<AggregateType>

The events query storage of one bounded context on MongoDB: the MongoSnapshotQueryBackend of each of its aggregate types over that aggregate's own log collection (wow_log__<ctx>__<agg>), which MongoEventLog appends to, its documents read as streams (MongoEventDocuments), with the facts of MongoEventStorageAdapter. One record per stream, as stored.

Link copied to clipboard
data class MongoQueryIndex(val context: String, val aggregate: String, val name: String, val keys: List<String>, val collection: String = MongoSnapshotStore.collectionName(context, aggregate), partial: Document = MongoSnapshotStore.notDeleted())

A planned query index of aggregate in context: its name, unique within its collection, and its keys in order, each ascending, over the documents its partial filter keeps: on the snapshot collection, the snapshots that are not deleted; on the log collection (MongoQueryIndexes.planLog), the streams.

Link copied to clipboard

The query indexes of an aggregate type's snapshot collection:

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

What MongoSnapshotQueryStorage.manageIndexes did: the indexes it created, and the ones it found missing or different.

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

The options of the MongoDB 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

A query backend of one aggregate type on MongoDB: the four primitives over one of the aggregate type's own collections, compiled by the 9.x filter, sort and aggregation compilers (MongoMatchCompiler, MongoAggregationCompiler) on the bindings of MongoQuerySchemaAdapter, its documents read as documents says: its snapshot collection, which MongoSnapshotStore writes, records of the shape of SnapshotRecord.toQueryRecord() (MongoSnapshotDocuments); or its log collection, one record per stream (MongoEventDocuments). Records are projected as MongoProjections says.

Link copied to clipboard
class MongoSnapshotQueryStorage @JvmOverloads constructor(client: MongoClient, databaseName: String, val context: String, val options: MongoQueryOptions = MongoQueryOptions(), dispatcher: CoroutineDispatcher = VirtualThreads.dispatcher, readPreference: ReadPreference? = null) : CachedQueryBindings<AggregateType>

The snapshot query storage of one bounded context on MongoDB: the MongoSnapshotQueryBackend of each of its aggregate types, over that aggregate's own snapshot collection, which MongoSnapshotStore writes, with the facts MongoQuerySchemaAdapter reads from the collection; and the management of its query indexes (manageIndexes). readPreference moves the queries off the primary (secondaryPreferred, say), at the cost of reading snapshots a little behind the ones a command's default wait waited for; the primary's by default. The indexes are managed on the primary.