From b129e01484e71f85e2c2e7e8bcc9ac61c828d227 Mon Sep 17 00:00:00 2001 From: baileympearson Date: Tue, 15 Nov 2022 20:27:21 +0000 Subject: [PATCH] [create-pull-request] automated change --- docs/Next/classes/Admin.html | 64 +++---- docs/Next/classes/AggregationCursor.html | 11 +- docs/Next/classes/ClientSession.html | 6 +- docs/Next/classes/Collection.html | 211 +++++++++++------------ docs/Next/classes/Db.html | 76 ++++---- docs/Next/classes/FindCursor.html | 14 +- docs/Next/classes/Logger.html | 29 ++-- docs/Next/classes/MongoClient.html | 12 +- 8 files changed, 212 insertions(+), 211 deletions(-) diff --git a/docs/Next/classes/Admin.html b/docs/Next/classes/Admin.html index b4bb1e76fb..d59899c079 100644 --- a/docs/Next/classes/Admin.html +++ b/docs/Next/classes/Admin.html @@ -4,54 +4,54 @@

ADMIN Cannot directly be instantiated

example
import { MongoClient } from 'mongodb';

const client = new MongoClient('mongodb://localhost:27017');
const admin = client.db().admin();
const dbInfo = await admin.listDatabases();
for (const db of dbInfo.databases) {
console.log(db.name);
}
-

Hierarchy

Index

Methods

Hierarchy

  • Admin

Index

Methods

Returns Promise<Document>

  • Parameters

    • username: string
    • password: string

    Returns Promise<Document>

  • Parameters

    Returns Promise<Document>

  • Parameters

    Returns Promise<Document>

  • deprecated

    Callbacks are deprecated and will be removed in the next major version. See mongodb-legacy for migration assistance

    +

    Parameters

    Returns void

  • deprecated

    Callbacks are deprecated and will be removed in the next major version. See mongodb-legacy for migration assistance

    +

    Parameters

    Returns void

  • deprecated

    Callbacks are deprecated and will be removed in the next major version. See mongodb-legacy for migration assistance

    +

    Parameters

    Returns void

  • deprecated

    Callbacks are deprecated and will be removed in the next major version. See mongodb-legacy for migration assistance

    +

    Parameters

    Returns void

  • Returns Promise<Document>

  • Parameters

    Returns Promise<Document>

  • deprecated

    Callbacks are deprecated and will be removed in the next major version. See mongodb-legacy for migration assistance

    +

    Parameters

    Returns void

  • deprecated

    Callbacks are deprecated and will be removed in the next major version. See mongodb-legacy for migration assistance

    +

    Parameters

    Returns void

  • Returns Promise<boolean>

  • Parameters

    Returns Promise<boolean>

  • deprecated

    Callbacks are deprecated and will be removed in the next major version. See mongodb-legacy for migration assistance

    +

    Parameters

    • username: string
    • callback: Callback<boolean>

    Returns void

  • deprecated

    Callbacks are deprecated and will be removed in the next major version. See mongodb-legacy for migration assistance

    +

    Parameters

    Returns void

  • Returns Promise<Document>

  • Parameters

    Returns Promise<Document>

  • deprecated

    Callbacks are deprecated and will be removed in the next major version. See mongodb-legacy for migration assistance

    +

    Parameters

    Returns void

  • deprecated

    Callbacks are deprecated and will be removed in the next major version. See mongodb-legacy for migration assistance

    Parameters

    Returns void

  • Legend

    • Constructor
    • Property
    • Method
    • Accessor
    • Constructor
    • Property
    • Method
    • Inherited constructor
    • Inherited property
    • Inherited method
    • Static property
    • Static method

    Settings

    Theme

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/Next/classes/AggregationCursor.html b/docs/Next/classes/AggregationCursor.html index 24433f5b22..7c9dc91a7d 100644 --- a/docs/Next/classes/AggregationCursor.html +++ b/docs/Next/classes/AggregationCursor.html @@ -29,17 +29,18 @@

    Returns AggregationCursor<TSchema>

    Returns void

    Methods

    Methods

    Returns AggregationCursor<T>

    Returns Promise<BulkWriteResult>

  • Parameters

    Returns Promise<BulkWriteResult>

  • deprecated

    Callbacks are deprecated and will be removed in the next major version. See mongodb-legacy for migration assistance

    +

    Parameters

    Returns void

  • deprecated

    Callbacks are deprecated and will be removed in the next major version. See mongodb-legacy for migration assistance

    +

    Parameters

    Returns void

    • An estimated count of matching documents in the db to a filter.

      NOTE: This method has been deprecated, since it does not provide an accurate count of the documents in a collection. To obtain an accurate count of documents in the collection, use {@link Collection#countDocuments| countDocuments}. To obtain an estimated count of all documents in the collection, use {@link Collection#estimatedDocumentCount| estimatedDocumentCount}.

      deprecated

      use {@link Collection#countDocuments| countDocuments} or {@link Collection#estimatedDocumentCount| estimatedDocumentCount} instead

      -

      Returns Promise<number>

    • deprecated

      Callbacks are deprecated and will be removed in the next major version. See mongodb-legacy for migration assistance

      -

      Parameters

      Returns void

    • Parameters

      Returns Promise<number>

    • deprecated

      Callbacks are deprecated and will be removed in the next major version. See mongodb-legacy for migration assistance

      -

      Parameters

      Returns void

    • Parameters

      Returns Promise<number>

    • deprecated

      Callbacks are deprecated and will be removed in the next major version. See mongodb-legacy for migration assistance

      -

      Parameters

      Returns void | Promise<number>

    • Creates an index on the db and collection collection.

      example
      const collection = client.db('foo').collection('bar');

      await collection.createIndex({ a: 1, b: -1 });

      // Alternate syntax for { c: 1, d: -1 } that ensures order of indexes
      await collection.createIndex([ [c, 1], [d, -1] ]);

      // Equivalent to { e: 1 }
      await collection.createIndex('e');

      // Equivalent to { f: 1, g: 1 }
      await collection.createIndex(['f', 'g'])

      // Equivalent to { h: 1, i: -1 }
      await collection.createIndex([ { h: 1 }, { i: -1 } ]);

      // Equivalent to { j: 1, k: -1, l: 2d }
      await collection.createIndex(['j', ['k', -1], { l: '2d' }])

      Parameters

      • indexSpec: IndexSpecification

        The field name or index specification to create an index for

        -

      Returns Promise<string>

    • deprecated

      Callbacks are deprecated and will be removed in the next major version. See mongodb-legacy for migration assistance

      -

      Parameters

      Returns void

    • Parameters

      Returns Promise<string>

    • deprecated

      Callbacks are deprecated and will be removed in the next major version. See mongodb-legacy for migration assistance

      -

      Parameters

      Returns void

    Returns Promise<string>

  • Parameters

    Returns Promise<string>

  • deprecated

    Callbacks are deprecated and will be removed in the next major version. See mongodb-legacy for migration assistance

    +

    Parameters

    Returns void

  • deprecated

    Callbacks are deprecated and will be removed in the next major version. See mongodb-legacy for migration assistance

    +

    Parameters

    Returns void

  • Returns Promise<string[]>

  • Parameters

    Returns Promise<string[]>

  • deprecated

    Callbacks are deprecated and will be removed in the next major version. See mongodb-legacy for migration assistance

    +

    Parameters

    Returns void

  • deprecated

    Callbacks are deprecated and will be removed in the next major version. See mongodb-legacy for migration assistance

    +

    Parameters

    Returns void

  • Returns Promise<DeleteResult>

  • Parameters

    Returns Promise<DeleteResult>

  • deprecated

    Callbacks are deprecated and will be removed in the next major version. See mongodb-legacy for migration assistance

    +

    Parameters

    Returns void

  • deprecated

    Callbacks are deprecated and will be removed in the next major version. See mongodb-legacy for migration assistance

    +

    Parameters

    Returns void

  • Returns Promise<DeleteResult>

  • Parameters

    Returns Promise<DeleteResult>

  • deprecated

    Callbacks are deprecated and will be removed in the next major version. See mongodb-legacy for migration assistance

    +

    Parameters

    Returns void

  • deprecated

    Callbacks are deprecated and will be removed in the next major version. See mongodb-legacy for migration assistance

    +

    Parameters

    Returns void

  • Returns Promise<Flatten<WithId<TSchema>[Key]>[]>

  • Type parameters

    • Key: string | number | symbol

    Parameters

    • key: Key
    • filter: Filter<TSchema>

    Returns Promise<Flatten<WithId<TSchema>[Key]>[]>

  • Type parameters

    • Key: string | number | symbol

    Parameters

    Returns Promise<Flatten<WithId<TSchema>[Key]>[]>

  • deprecated

    Callbacks are deprecated and will be removed in the next major version. See mongodb-legacy for migration assistance

    +

    Type parameters

    • Key: string | number | symbol

    Parameters

    Returns void

  • deprecated

    Callbacks are deprecated and will be removed in the next major version. See mongodb-legacy for migration assistance

    +

    Type parameters

    • Key: string | number | symbol

    Parameters

    Returns void

  • deprecated

    Callbacks are deprecated and will be removed in the next major version. See mongodb-legacy for migration assistance

    +

    Type parameters

    • Key: string | number | symbol

    Parameters

    Returns void

  • Parameters

    • key: string

    Returns Promise<any[]>

  • Parameters

    • key: string
    • filter: Filter<TSchema>

    Returns Promise<any[]>

  • Parameters

    Returns Promise<any[]>

  • deprecated

    Callbacks are deprecated and will be removed in the next major version. See mongodb-legacy for migration assistance

    +

    Parameters

    Returns void

  • deprecated

    Callbacks are deprecated and will be removed in the next major version. See mongodb-legacy for migration assistance

    +

    Parameters

    Returns void

  • deprecated

    Callbacks are deprecated and will be removed in the next major version. See mongodb-legacy for migration assistance

    +

    Parameters

    Returns void

  • Returns Promise<Document>

  • Parameters

    Returns Promise<Document>

  • deprecated

    Callbacks are deprecated and will be removed in the next major version. See mongodb-legacy for migration assistance

    +

    Parameters

    Returns void

  • deprecated

    Callbacks are deprecated and will be removed in the next major version. See mongodb-legacy for migration assistance

    +

    Parameters

    Returns void

  • Returns Promise<ModifyResult<TSchema>>

  • Parameters

    Returns Promise<ModifyResult<TSchema>>

  • deprecated

    Callbacks are deprecated and will be removed in the next major version. See mongodb-legacy for migration assistance

    +

    Parameters

    Returns void

  • deprecated

    Callbacks are deprecated and will be removed in the next major version. See mongodb-legacy for migration assistance

    +

    Parameters

    Returns void

  • Returns Promise<ModifyResult<TSchema>>

  • Parameters

    Returns Promise<ModifyResult<TSchema>>

  • deprecated

    Callbacks are deprecated and will be removed in the next major version. See mongodb-legacy for migration assistance

    +

    Parameters

    Returns void

  • deprecated

    Callbacks are deprecated and will be removed in the next major version. See mongodb-legacy for migration assistance

    +

    Parameters

    Returns void

  • Returns Promise<ModifyResult<TSchema>>

  • Parameters

    Returns Promise<ModifyResult<TSchema>>

  • deprecated

    Callbacks are deprecated and will be removed in the next major version. See mongodb-legacy for migration assistance

    +

    Parameters

    Returns void

  • deprecated

    Callbacks are deprecated and will be removed in the next major version. See mongodb-legacy for migration assistance

    +

    Parameters

    Returns void

    • indexExists(indexes: string | string[]): Promise<boolean>
    • indexExists(indexes: string | string[], callback: Callback<boolean>): void
    • indexExists(indexes: string | string[], options: IndexInformationOptions): Promise<boolean>
    • indexExists(indexes: string | string[], options: IndexInformationOptions, callback: Callback<boolean>): void
    • indexExists(indexes: string | string[]): Promise<boolean>
    • indexExists(indexes: string | string[], options: IndexInformationOptions): Promise<boolean>
    • indexExists(indexes: string | string[], callback: Callback<boolean>): void
    • indexExists(indexes: string | string[], options: IndexInformationOptions, callback: Callback<boolean>): void

    Returns Promise<boolean>

  • Parameters

    Returns Promise<boolean>

  • deprecated

    Callbacks are deprecated and will be removed in the next major version. See mongodb-legacy for migration assistance

    +

    Parameters

    • indexes: string | string[]
    • callback: Callback<boolean>

    Returns void

  • deprecated

    Callbacks are deprecated and will be removed in the next major version. See mongodb-legacy for migration assistance

    +

    Parameters

    Returns void

    • Initiate an In order bulk write operation. Operations will be serially executed in the order they are added, creating a new operation for each switch in types.

      throws

      MongoNotConnectedError

      remarks

      NOTE: MongoClient must be connected prior to calling this method due to a known limitation in this legacy implementation. However, collection.bulkWrite() provides an equivalent API that does not require prior connecting.

      -

      Parameters

      Returns OrderedBulkOperation

    • Initiate an Out of order batch write operation. All operations will be buffered into insert/update/remove commands executed out of order.

      throws

      MongoNotConnectedError

      remarks

      NOTE: MongoClient must be connected prior to calling this method due to a known limitation in this legacy implementation. However, collection.bulkWrite() provides an equivalent API that does not require prior connecting.

      -

      Parameters

      Returns UnorderedBulkOperation

    • Inserts a single document or a an array of documents into MongoDB. If documents passed in do not contain the _id field, one will be added to each of the documents missing it by the driver, mutating the document. This behavior can be overridden by setting the forceServerObjectId flag.

      @@ -226,44 +225,44 @@

      Optional settings for the command

    • callback: Callback<InsertManyResult<TSchema>>

      An optional callback, a Promise will be returned if none is provided

      -

    Returns void | Promise<InsertManyResult<TSchema>>

    Returns void | Promise<InsertManyResult<TSchema>>

    Returns Promise<InsertManyResult<TSchema>>

  • Parameters

    Returns Promise<InsertManyResult<TSchema>>

  • deprecated

    Callbacks are deprecated and will be removed in the next major version. See mongodb-legacy for migration assistance

    +

    Parameters

    Returns void

  • deprecated

    Callbacks are deprecated and will be removed in the next major version. See mongodb-legacy for migration assistance

    +

    Parameters

    Returns void

  • Returns Promise<InsertOneResult<TSchema>>

  • Parameters

    Returns Promise<InsertOneResult<TSchema>>

  • deprecated

    Callbacks are deprecated and will be removed in the next major version. See mongodb-legacy for migration assistance

    +

    Parameters

    Returns void

  • deprecated

    Callbacks are deprecated and will be removed in the next major version. See mongodb-legacy for migration assistance

    +

    Parameters

    Returns void

  • Returns ListIndexesCursor

    Returns Promise<Document | Document[]>

  • Type parameters

    • TKey = any

    • TValue = any

    Parameters

    Returns Promise<Document | Document[]>

  • deprecated

    Callbacks are deprecated and will be removed in the next major version. See mongodb-legacy for migration assistance

    +

    Type parameters

    • TKey = any

    • TValue = any

    Parameters

    Returns void

  • deprecated

    Callbacks are deprecated and will be removed in the next major version. See mongodb-legacy for migration assistance

    +

    Type parameters

    • TKey = any

    • TValue = any

    Parameters

    Returns void

    • Remove documents.

      deprecated

      use deleteOne, deleteMany or bulkWrite. Callbacks are deprecated and will be removed in the next major version. See mongodb-legacy for migration assistance

      Parameters

      • filter: Filter<TSchema>
        @@ -272,26 +271,26 @@

        Optional settings for the command

      • callback: Callback<any>

        An optional callback, a Promise will be returned if none is provided

        -

      Returns void | Promise<DeleteResult>

    Returns void | Promise<DeleteResult>

    Returns Promise<Collection<Document>>

  • Parameters

    Returns Promise<Collection<Document>>

  • deprecated

    Callbacks are deprecated and will be removed in the next major version. See mongodb-legacy for migration assistance

    +

    Parameters

    Returns void

  • deprecated

    Callbacks are deprecated and will be removed in the next major version. See mongodb-legacy for migration assistance

    +

    Parameters

    Returns void

  • Returns Promise<Document | UpdateResult>

  • Parameters

    Returns Promise<Document | UpdateResult>

  • deprecated

    Callbacks are deprecated and will be removed in the next major version. See mongodb-legacy for migration assistance

    +

    Parameters

    Returns void

  • deprecated

    Callbacks are deprecated and will be removed in the next major version. See mongodb-legacy for migration assistance

    +

    Parameters

    Returns void

    • Updates documents.

      deprecated

      use updateOne, updateMany or bulkWrite. Callbacks are deprecated and will be removed in the next major version. See mongodb-legacy for migration assistance

      Parameters

      • filter: Filter<TSchema>
        @@ -302,23 +301,23 @@

        Optional settings for the command

      • callback: Callback<Document>

        An optional callback, a Promise will be returned if none is provided

        -

      Returns void | Promise<UpdateResult>

    Returns void | Promise<UpdateResult>

    Returns Promise<Document | UpdateResult>

  • Parameters

    Returns Promise<Document | UpdateResult>

  • deprecated

    Callbacks are deprecated and will be removed in the next major version. See mongodb-legacy for migration assistance

    +

    Parameters

    Returns void

  • deprecated

    Callbacks are deprecated and will be removed in the next major version. See mongodb-legacy for migration assistance

    +

    Parameters

    Returns void

  • Returns Promise<UpdateResult>

  • Parameters

    Returns Promise<UpdateResult>

  • deprecated

    Callbacks are deprecated and will be removed in the next major version. See mongodb-legacy for migration assistance

    +

    Parameters

    Returns void

  • deprecated

    Callbacks are deprecated and will be removed in the next major version. See mongodb-legacy for migration assistance

    +

    Parameters

    Returns void

    • Create a new Change Stream, watching for new changes (insertions, updates, replacements, deletions, and invalidations) in this collection.

      remarks

      watch() accepts two generic arguments for distinct use cases:

        diff --git a/docs/Next/classes/Db.html b/docs/Next/classes/Db.html index 98d3b3ddc3..f4e606996a 100644 --- a/docs/Next/classes/Db.html +++ b/docs/Next/classes/Db.html @@ -18,14 +18,14 @@

      Returns boolean

    • get slaveOk(): boolean
    • slaveOk specified

      deprecated

      Use secondaryOk instead

      -

      Returns boolean

    Methods

    Methods

    Returns Promise<Document>

  • Parameters

    • username: string
    • password: string

    Returns Promise<Document>

  • Parameters

    Returns Promise<Document>

  • Parameters

    Returns Promise<Document>

  • deprecated

    Callbacks are deprecated and will be removed in the next major version. See mongodb-legacy for migration assistance

    +

    Parameters

    Returns void

  • deprecated

    Callbacks are deprecated and will be removed in the next major version. See mongodb-legacy for migration assistance

    +

    Parameters

    Returns void

  • deprecated

    Callbacks are deprecated and will be removed in the next major version. See mongodb-legacy for migration assistance

    +

    Parameters

    Returns void

  • deprecated

    Callbacks are deprecated and will be removed in the next major version. See mongodb-legacy for migration assistance

    Parameters

    Returns void

  • Returns Promise<Document>

  • Parameters

    Returns Promise<Document>

  • deprecated

    Callbacks are deprecated and will be removed in the next major version. See mongodb-legacy for migration assistance

    +

    Parameters

    Returns void

  • deprecated

    Callbacks are deprecated and will be removed in the next major version. See mongodb-legacy for migration assistance

    Parameters

    Returns void

  • Returns Promise<Collection<TSchema>>

  • deprecated

    Callbacks are deprecated and will be removed in the next major version. See mongodb-legacy for migration assistance

    Type parameters

    Parameters

    Returns void

  • deprecated

    Callbacks are deprecated and will be removed in the next major version. See mongodb-legacy for migration assistance

    -

    Type parameters

    Parameters

    Returns void

  • Returns Promise<string>

  • Parameters

    Returns Promise<string>

  • deprecated

    Callbacks are deprecated and will be removed in the next major version. See mongodb-legacy for migration assistance

    +

    Parameters

    Returns void

  • deprecated

    Callbacks are deprecated and will be removed in the next major version. See mongodb-legacy for migration assistance

    +

    Parameters

    Returns void

    • Drop a collection from the database, removing it permanently. New accesses will create a new collection.

      Parameters

      • name: string

        Name of collection to drop

        -

      Returns Promise<boolean>

    • deprecated

      Callbacks are deprecated and will be removed in the next major version. See mongodb-legacy for migration assistance

      -

      Parameters

      Returns void

    • Parameters

      Returns Promise<boolean>

    • deprecated

      Callbacks are deprecated and will be removed in the next major version. See mongodb-legacy for migration assistance

      -

      Parameters

      Returns void

    Returns Promise<boolean>

  • Parameters

    Returns Promise<boolean>

  • deprecated

    Callbacks are deprecated and will be removed in the next major version. See mongodb-legacy for migration assistance

    +

    Parameters

    Returns void

  • deprecated

    Callbacks are deprecated and will be removed in the next major version. See mongodb-legacy for migration assistance

    +

    Parameters

    Returns void

  • Returns Promise<Document>

  • Parameters

    Returns Promise<Document>

  • deprecated

    Callbacks are deprecated and will be removed in the next major version. See mongodb-legacy for migration assistance

    +

    Parameters

    Returns void

  • deprecated

    Callbacks are deprecated and will be removed in the next major version. See mongodb-legacy for migration assistance

    Parameters

    Returns void

  • Returns ListCollectionsCursor<Pick<CollectionInfo, "type" | "name">>

  • Parameters

    Returns ListCollectionsCursor<CollectionInfo>

  • Type parameters

    Parameters

    Returns ListCollectionsCursor<T>

    • renameCollection<TSchema>(fromCollection: string, toCollection: string): Promise<Collection<TSchema>>
    • renameCollection<TSchema>(fromCollection: string, toCollection: string, callback: Callback<Collection<TSchema>>): void
    • renameCollection<TSchema>(fromCollection: string, toCollection: string, options: RenameOptions): Promise<Collection<TSchema>>
    • renameCollection<TSchema>(fromCollection: string, toCollection: string, options: RenameOptions, callback: Callback<Collection<TSchema>>): void

    Returns Promise<boolean>

  • Parameters

    Returns Promise<boolean>

  • deprecated

    Callbacks are deprecated and will be removed in the next major version. See mongodb-legacy for migration assistance

    +

    Parameters

    • username: string
    • callback: Callback<boolean>

    Returns void

  • deprecated

    Callbacks are deprecated and will be removed in the next major version. See mongodb-legacy for migration assistance

    +

    Parameters

    Returns void

    • renameCollection<TSchema>(fromCollection: string, toCollection: string): Promise<Collection<TSchema>>
    • renameCollection<TSchema>(fromCollection: string, toCollection: string, options: RenameOptions): Promise<Collection<TSchema>>
    • renameCollection<TSchema>(fromCollection: string, toCollection: string, callback: Callback<Collection<TSchema>>): void
    • renameCollection<TSchema>(fromCollection: string, toCollection: string, options: RenameOptions, callback: Callback<Collection<TSchema>>): void

    Returns Promise<Collection<TSchema>>

  • Type parameters

    Parameters

    Returns Promise<Collection<TSchema>>

  • deprecated

    Callbacks are deprecated and will be removed in the next major version. See mongodb-legacy for migration assistance

    +

    Type parameters

    Parameters

    Returns void

  • deprecated

    Callbacks are deprecated and will be removed in the next major version. See mongodb-legacy for migration assistance

    +

    Type parameters

    Parameters

    Returns void

  • Returns Promise<ProfilingLevel>

  • Parameters

    Returns Promise<ProfilingLevel>

  • deprecated

    Callbacks are deprecated and will be removed in the next major version. See mongodb-legacy for migration assistance

    +

    Parameters

    Returns void

  • deprecated

    Callbacks are deprecated and will be removed in the next major version. See mongodb-legacy for migration assistance

    +

    Parameters

    Returns void

    • unref(): void
    • Unref all sockets

      deprecated

      This function is deprecated and will be removed in the next major version.

      diff --git a/docs/Next/classes/FindCursor.html b/docs/Next/classes/FindCursor.html index 46b6508cae..717abbff4d 100644 --- a/docs/Next/classes/FindCursor.html +++ b/docs/Next/classes/FindCursor.html @@ -41,16 +41,16 @@

      Add a comment to the cursor query allowing for tracking the comment in the log.

      Parameters

      • value: string

        The comment attached to this query.

        -

      Returns FindCursor<TSchema>

    Returns FindCursor<TSchema>

    • Get the count of documents for this cursor

      deprecated

      Use collection.estimatedDocumentCount or collection.countDocuments instead

      -

      Returns Promise<number>

    • deprecated

      Use collection.estimatedDocumentCount or collection.countDocuments instead. Callbacks are deprecated and will be removed in the next major version. See mongodb-legacy for migration assistance

      -

      Parameters

      Returns void

    • deprecated

      Use collection.estimatedDocumentCount or collection.countDocuments instead.

      -

      Parameters

      Returns Promise<number>

    • deprecated

      Use collection.estimatedDocumentCount or collection.countDocuments instead. Callbacks are deprecated and will be removed in the next major version. See mongodb-legacy for migration assistance

      -

      Parameters

      Returns void

    • emit<EventKey>(event: symbol | EventKey, ...args: Parameters<AbstractCursorEvents[EventKey]>): boolean
    • eventNames(): string[]
    • emit<EventKey>(event: symbol | EventKey, ...args: Parameters<AbstractCursorEvents[EventKey]>): boolean
    • eventNames(): string[]
    • forEach(iterator: (doc: TSchema) => boolean | void): Promise<void>
    • forEach(iterator: (doc: TSchema) => boolean | void, callback: Callback<void>): void
    • error(message: string, object?: unknown): void
    • Log a message at the error level

      Parameters

      • message: string

        The message to log

      • Optional object: unknown

        Additional meta data to log

        -

      Returns void

    • info(message: string, object?: unknown): void

    Returns void

    • info(message: string, object?: unknown): void
    • Log a message at the info level

      Parameters

      • message: string

        The message to log

      • Optional object: unknown

        Additional meta data to log

        -

      Returns void

    • isDebug(): boolean

    Returns void

    • isDebug(): boolean
    • isError(): boolean
    • isError(): boolean
    • isInfo(): boolean
    • isInfo(): boolean
    • isWarn(): boolean
    • isWarn(): boolean
    • warn(message: string, object?: unknown): void
    • warn(message: string, object?: unknown): void
    • Log a message at the warn level

      Parameters

      • message: string

        The message to log

      • Optional object: unknown

        Additional meta data to log

        -

      Returns void

    Returns void

    • filter(type: string, values: string[]): void
    • filter(type: string, values: string[]): void
    • Filter log messages for a particular class

      Parameters

      • type: string

        The type of filter (currently only class)

      • values: string[]

        The filters to apply

        -

      Returns void

    • reset(): void

    Returns void

    • reset(): void
    • Resets the logger to default settings, error and no filtered classes

      -

      Returns void

    Returns void

    • Set the current log level

      Parameters

      • newLevel: LoggerLevel

        Set current log level (debug, warn, info, error)

        diff --git a/docs/Next/classes/MongoClient.html b/docs/Next/classes/MongoClient.html index 1bef9cb695..4db0a7f422 100644 --- a/docs/Next/classes/MongoClient.html +++ b/docs/Next/classes/MongoClient.html @@ -12,10 +12,10 @@

        Installing a listener using this symbol does not change the behavior once an 'error' event is emitted, therefore the process will still crash if no regular 'error' listener is installed.

        -

    Accessors

    • get serverApi(): Readonly<undefined | ServerApi>

    Methods

    • close(): Promise<void>
    • close(callback: Callback<void>): void
    • close(force: boolean): Promise<void>
    • close(force: boolean, callback: Callback<void>): void

    Accessors

    • get serverApi(): Readonly<undefined | ServerApi>

    Methods

    • close(): Promise<void>
    • close(force: boolean): Promise<void>
    • close(callback: Callback<void>): void
    • close(force: boolean, callback: Callback<void>): void

    Returns Promise<void>

  • Parameters

    Returns Promise<void>

    • getEventListeners(emitter: EventEmitter | _DOMEventTarget, name: string | symbol): Function[]
    • Returns a copy of the array of listeners for the event named eventName.

      For EventEmitters this behaves exactly the same as calling .listeners on