MongoConnection
Defined in: src/storage/mongodb.ts:62
A lazily connected Mongo database handle (semi-public, ADR 0004).
Methods
Section titled “Methods”close()
Section titled “close()”close(): Promise<void>;Defined in: src/storage/mongodb.ts:66
Close the client if this connection created it.
Returns
Section titled “Returns”Promise<void>
collection()
Section titled “collection()”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 Parameters
Section titled “Type Parameters”| Type Parameter |
|---|
T extends Document |
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
name |
string |
Returns
Section titled “Returns”Promise<Collection<T>>