routier-collection / plugins/mongodb/src / MongoScope
Interface: MongoScope
Defined in: plugins/mongodb/src/driver.ts:47
Collections bound to one atomic unit of work.
A collection taken from here carries the session; one taken from the driver does not, and would run outside the transaction while looking identical at the call site. That is the easiest bug to write here, which is why the scope is a separate object rather than a flag.
Methods
collection()
collection(
name):Promise<MongoCollection>
Defined in: plugins/mongodb/src/driver.ts:48
Parameters
name
string
Returns
Promise<MongoCollection>