Skip to content

MongoConnection

Defined in: src/storage/mongodb.ts:62

A lazily connected Mongo database handle (semi-public, ADR 0004).

close(): Promise<void>;

Defined in: src/storage/mongodb.ts:66

Close the client if this connection created it.

Promise<void>


collection<T>(name): Promise<Collection<T>>;

Defined in: src/storage/mongodb.ts:64

Resolve a collection, creating and connecting the client on first use (retried after a failure).

Type Parameter
T extends Document
Parameter Type
name string

Promise<Collection<T>>