method MongoAdapter.prototype.connect
MongoAdapter.prototype.connect(): Promise<void>

Establishes the database connection, resolving the client and database name.

Nothing is retained until the connection is fully established: a failure leaves #client null, so the #client !== null guard above does not turn a transient outage into a permanently unusable adapter. Assigning the field first made every later connect() a no-op while isReady() stayed false, so the adapter could never recover.

Return Type

Promise<void>

Usage

import { MongoAdapter } from "database-plugin/src/index.ts";