INNER CODE UNIT · TypeScript

MongoClient

denodrivers/mongo · src/client.ts:18

export class MongoClient {
  #cluster?: Cluster;
  #defaultDbName = "admin";
  #buildInfo?: BuildInfo;

  /** Get information about your server's build */
  get buildInfo(): BuildInfo | undefined {
    return this.#buildInfo;
  }

  /** Get the cluster associated with the client */
  getCluster(): Cluster {
    if (!this.#cluster) {
      throw new MongoDriverError(
        "MongoClient is not connected to the Database",
      );
    }

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…