Creates the adapter.
The 'mongodb' arm options; url is required unless
client is supplied
When neither url nor client is supplied. A typed
caller cannot reach this — MongoAdapterOptions is a union
whose arms each require one of the two — but the plugin builds the bag
through an untyped carry (buildAdapterOptions), so the runtime guard
is the backstop for that cast rather than dead code.
OptionalisThe reachability probe (M95b §3.5), present only when the resolved
client's db() facade can answer a command. A minimal injected client
whose database facade omits command? leaves this unassigned, so the
service reports hasReachabilityProbe: false — the adapter is honest
about having no probe rather than failing readiness for a backend it
never asked.
ReadonlytransactionMongoDB snapshot isolation is not the portable serializable guarantee.
Begin a transaction, returning a handle that can open transaction-scoped data sources as well as commit and roll back.
Optionaloptions: TransactionOptions
Optional transaction settings; omitted preserves the backend default
The transaction handle
Opens the underlying connection (pool).
Open a non-transactional data source for the named entity.
Entity name (for example 'User')
A data source bound to that entity
Closes the underlying connection (pool).
Reports whether the adapter is connected and usable.
true when ready
Execute a raw query in the backend's own dialect.
Expected row shape
The query text
Optional_params: unknown[]
Positional parameters
The result rows
The Mongo adapter — a document-store backend over the native driver.
Constructed by
DatabasePluginfor the'mongodb'arm, and also constructible directly by an application for the'custom'arm.Example
Since
0.2.0