MongoQueryIndex

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.

Constructors

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

Properties

Link copied to clipboard
Link copied to clipboard

The collection the index is on: the aggregate's snapshot collection by default.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
fun keyDocument(): Document

The key document of the index: {tenant_id: 1, <key>: 1, ...}.

Link copied to clipboard
fun partialFilter(): Document

The partial filter of the index: {deleted: false} on the snapshots, {version: {$exists: true}} on a log.

Link copied to clipboard
open override fun toString(): String

The createIndexes specification of the index, as listIndexes reports it.