Перейти к содержимому
Русский

MongoStoreConfig

Это содержимое пока не доступно на вашем языке.

Defined in: src/persistence/journals/MongoStore.ts:5

Wiring every MongoDB store needs, independent of which contract it implements.

readonly optional autoCreateIndexes?: boolean

Defined in: src/persistence/journals/MongoStore.ts:7

Create this store’s indexes on first use. Default true.


readonly ownsClient: boolean

Defined in: src/persistence/journals/MongoStore.ts:14

Whether this store opened the client itself. An injected client — shared across the journal, snapshot and durable-state stores by registerMongoPlugins, or a fake in tests — is owned by the caller, and closing it here would tear it out from under the siblings.


readonly storeName: string

Defined in: src/persistence/LazyStore.ts:11

Concrete store name ('PostgresJournal', 'MongoJournal'), used to prefix every error message. Errors name the store the caller actually constructed rather than the shared base, which is what makes a stack-free log line useful.

Omit.storeName

openClient(): Promise<MongoResource>

Defined in: src/persistence/journals/MongoStore.ts:16

Open the client and database handle. Called once, lazily, on first use.

Promise<MongoResource>