Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • Connection

Index

Constructors

constructor

  • new Connection(host: string, defaultDatabase: string, username?: undefined | string, password?: undefined | string): Connection
  • Parameters

    • host: string
    • defaultDatabase: string
    • Optional username: undefined | string
    • Optional password: undefined | string

    Returns Connection

Properties

Protected Optional client

client: MongoClient

defaultDatabase

defaultDatabase: string

host

host: string

Optional password

password: undefined | string

Optional username

username: undefined | string

Methods

close

  • close(force?: undefined | false | true): Promise<void>
  • Parameters

    • Optional force: undefined | false | true

    Returns Promise<void>

connect

  • connect(): Promise<MongoClient>
  • Returns Promise<MongoClient>

getCollection

  • getCollection(classType: ClassType<any>): Promise<Collection>
  • Parameters

    • classType: ClassType<any>

    Returns Promise<Collection>

Generated using TypeDoc