Creates the adapter.
The 'cosmos' arm options
When neither client nor an endpoint/key pair is
supplied, or when database is absent. A typed caller cannot reach
this — CosmosAdapterOptions is a union whose arms each
require one of the two — but the plugin builds the bag through an
untyped carry, so the runtime guard is the backstop for that cast
rather than dead code.
ReadonlytransactionCosmos DB exposes no portable transaction-isolation selector.
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 Cosmos adapter — an Azure Cosmos DB NoSQL-API backend.
Constructed by
DatabasePluginfor the'cosmos'arm, and also constructible directly by an application for the'custom'arm.Example
Since
0.2.0