From ff899a2a70ab1b95c835b249332b88799ce76648 Mon Sep 17 00:00:00 2001 From: johnmtll <286711055+johnmtll@users.noreply.github.com> Date: Tue, 17 Nov 2026 00:00:35 +0000 Subject: [PATCH] [create-pull-request] automated change --- docs/Next/assets/navigation.js | 2 +- docs/Next/classes/AbstractCursor.html | 60 ++++++---- docs/Next/classes/AggregationCursor.html | 49 +++++---- docs/Next/classes/Collection.html | 104 +++++++++--------- docs/Next/classes/ExplainableCursor.html | 53 +++++---- docs/Next/classes/FindCursor.html | 47 ++++---- docs/Next/classes/ListCollectionsCursor.html | 51 +++++---- docs/Next/classes/ListIndexesCursor.html | 51 +++++---- .../Next/classes/ListSearchIndexesCursor.html | 49 +++++---- docs/Next/classes/MongoAPIError.html | 10 +- docs/Next/classes/MongoAWSError.html | 10 +- docs/Next/classes/MongoAzureError.html | 10 +- .../classes/MongoBatchReExecutionError.html | 10 +- docs/Next/classes/MongoBulkWriteError.html | 12 +- docs/Next/classes/MongoChangeStreamError.html | 10 +- .../MongoClientBulkWriteCursorError.html | 10 +- .../classes/MongoClientBulkWriteError.html | 18 +-- .../MongoClientBulkWriteExecutionError.html | 10 +- docs/Next/classes/MongoClientClosedError.html | 10 +- .../Next/classes/MongoCompatibilityError.html | 10 +- docs/Next/classes/MongoCredentials.html | 2 +- .../MongoCryptAzureKMSRequestError.html | 8 +- .../classes/MongoCryptCreateDataKeyError.html | 8 +- ...goCryptCreateEncryptedCollectionError.html | 8 +- docs/Next/classes/MongoCryptError.html | 8 +- .../MongoCryptInvalidArgumentError.html | 8 +- ...ngoCryptKMSRequestNetworkTimeoutError.html | 8 +- .../classes/MongoCursorExhaustedError.html | 10 +- docs/Next/classes/MongoCursorInUseError.html | 10 +- .../Next/classes/MongoDecompressionError.html | 10 +- docs/Next/classes/MongoDriverError.html | 10 +- docs/Next/classes/MongoError.html | 10 +- .../classes/MongoExpiredSessionError.html | 10 +- docs/Next/classes/MongoGCPError.html | 10 +- docs/Next/classes/MongoGridFSChunkError.html | 10 +- docs/Next/classes/MongoGridFSStreamError.html | 10 +- .../classes/MongoInvalidArgumentError.html | 10 +- docs/Next/classes/MongoKerberosError.html | 10 +- .../classes/MongoMissingCredentialsError.html | 10 +- .../classes/MongoMissingDependencyError.html | 12 +- docs/Next/classes/MongoNetworkError.html | 10 +- .../classes/MongoNetworkTimeoutError.html | 10 +- docs/Next/classes/MongoNotConnectedError.html | 10 +- docs/Next/classes/MongoOIDCError.html | 10 +- .../classes/MongoOperationTimeoutError.html | 10 +- docs/Next/classes/MongoParseError.html | 10 +- docs/Next/classes/MongoRuntimeError.html | 10 +- docs/Next/classes/MongoServerClosedError.html | 10 +- docs/Next/classes/MongoServerError.html | 12 +- .../classes/MongoServerSelectionError.html | 12 +- docs/Next/classes/MongoStalePrimaryError.html | 10 +- docs/Next/classes/MongoSystemError.html | 12 +- .../classes/MongoTailableCursorError.html | 10 +- .../classes/MongoTopologyClosedError.html | 10 +- docs/Next/classes/MongoTransactionError.html | 10 +- .../MongoUnexpectedServerResponseError.html | 10 +- docs/Next/classes/MongoWriteConcernError.html | 14 +-- docs/Next/classes/RunCommandCursor.html | 43 +++++--- docs/Next/interfaces/CollectionOptions.html | 8 +- .../interfaces/CountDocumentsOptions.html | 6 +- docs/Next/interfaces/ErrorDescription.html | 4 +- docs/Next/interfaces/ModifyResult.html | 4 +- .../interfaces/MongoNetworkErrorOptions.html | 4 +- docs/Next/interfaces/SelectServerOptions.html | 14 ++- .../interfaces/WriteConcernErrorResult.html | 4 +- docs/Next/modules.html | 2 +- docs/Next/types/DropDatabaseOptions.html | 2 +- docs/Next/types/MongoErrorLabel.html | 2 +- docs/Next/types/TopologyEvents.html | 2 +- docs/Next/variables/MongoErrorLabel-1.html | 2 +- 70 files changed, 554 insertions(+), 491 deletions(-) diff --git a/docs/Next/assets/navigation.js b/docs/Next/assets/navigation.js index 716fb3ab6c4..10904e6bfba 100644 --- a/docs/Next/assets/navigation.js +++ b/docs/Next/assets/navigation.js @@ -1 +1 @@ -window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evysaaeRjchRm5vF1/ObH48X9z/Wq4vrxeOP1f3jcnUHFnlKS+Nv1nx8pEXwt6u7r6sfFzfLxd3jj8W3xd0jSAZkGDQ1eO0AfQlawtTodUCNlCg8NZg1Qn0FCkuPpoy4UEMCU4MVPtJXEVD4Sd4FugoUln6kHXGhhgFMPYuGUF/HAKcq5jFKQMCnM5fjCFAU3JMZSW4cAP39/wHbG+77jqoAAA==" \ No newline at end of file +window.navigationData = "data:application/octet-stream;base64,H4sIAAAAAAAAA62d2XLjOpKGX2XCc3tqpqvOMt1157LlOmov8lh21UVHRwVEwhLGFKgBIR+rO+bdJ7hjSWQm6b5TKH98PwiSAIiF/Ns/z6x8s2efz74oLczp7Kezg7C7s89n+zI/FrL6j53dF/8+BF+Uzs8+//LxL7/8/Kdf/u+nMfV6dfcgt4u3Q4rgCjDK+rTflAVCGQQY5fF0kAijC6cIF2WeSt2FUikvvzzI50TSPpZMKzO1F8XHT39OAVxBipLLSholCvWP1CH4imRuyuy4l9qm8jKG04TjpkhlYgimUi+1/flTInEfS6W9KfU2kbQLpVLeirdrmboLhmAytdJI6j6YSr3a/I/M7DJPpHfCKQJ15jnn/VHtZWXFPnUju/EU4+lpeZlI3oWwezdK+Z/1v03yMeVPZ1khqurs85mt8g+q+iDfrDRa1JJsp4rcSH32+W/J6q1J3aPboO/w8dOf0x5BjhfGlCbF7uPz8avn50paysRRzbcK6/DIpRW8w+CordpL6mBc2XyzsC2JbFrBfINvojhKhN/E34GXplKlpgrLlc0z8xs8z6AOzYMGbaFHbWIzsUAz6bMHwUyDoN3y4U1wHjho0jxuE5uH9Vs7j1qH5kHDhtDDtsGZ4KCN9MFNcB44bj49dB+eBwdaRY8+xOfh/QbTI9ehmTVI06ot3qzUuXSKRWkrzbPI/Nav1/len379bYbXjdyK7MR1bNUzfYcmiXGckfZf5UkebyLFfP+24eIds6+d51m3ArSbq5rn07QLN+pFpk0GyUyHoXWgjyfWzvUcet6rg1WlrjDPUDvTM3p+i5w6xVx+3R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PCKjb78WbNPwxIPMWJdyChkHJ4FNu1jO709l8yrXyz8ALYjhLEZ01Z9UtE4YbKj5IZ7tRQM+DGKA52W0y5Ib6Hib+TKZTdxW1h+y8nbXm0cPImwCF0LW5qHBCQcKjOsl2MDMhmrpl6FUbVQ1XBuqkPH33ezwGKWtDkYWExagGsBhqRQxBFQIsLRsYYxSFPD+vVw4+rm/OvaxDjxDFMelrbYYWiOGdUJZGe6xxtQg16/Kxpp5GNyFGbm8XX85sfjxf3P9ari+vF44/V/eNydQcWeUpL42/WfHykRfC3q7uvqx8XN8vF3eOPxbfF3SNIBmQYNDV47QB9CVrC1Oh1QI2UKDw1mDVCfQUKS4+mjLhQQwJTgxU+0lcRUPhJ3gW6ChSWfqQdcaGGAUw9i4ZQX8cApyrmMUpAwKczl+MIUBTckxlJbhwA/f3/AcDV++ajqgAA" \ No newline at end of file diff --git a/docs/Next/classes/AbstractCursor.html b/docs/Next/classes/AbstractCursor.html index bbbd1282c30..4ee48716a03 100644 --- a/docs/Next/classes/AbstractCursor.html +++ b/docs/Next/classes/AbstractCursor.html @@ -1,4 +1,9 @@ -AbstractCursor | mongodb

Class AbstractCursor<TSchema, CursorEvents>Abstract

Type Parameters

Hierarchy (view full)

Implements

  • AsyncDisposable

Properties

signal +AbstractCursor | mongodb

Class AbstractCursor<TSchema, CursorEvents>Abstract

Base class for all cursors.

+

A cursor does not support overlapping calls to any method that reads from the cursor, such as +hasNext(), next() or tryNext(). Wait for each call to settle before making the next one on +the same cursor. Calls that overlap can result in undefined behaviour, which could produce +unpredictable or incorrect results.

+

Type Parameters

Hierarchy (view full)

Implements

  • AsyncDisposable

Properties

signal: undefined | AbortSignal
captureRejections: boolean

Value: boolean

+

Properties

signal: undefined | AbortSignal
captureRejections: boolean

Value: boolean

Change the default captureRejections option on all new EventEmitter objects.

v13.4.0, v12.16.0

captureRejectionSymbol: typeof captureRejectionSymbol

Value: Symbol.for('nodejs.rejection')

See how to write a custom rejection handler.

v13.4.0, v12.16.0

-
CLOSE: "close" = ...
defaultMaxListeners: number

By default, a maximum of 10 listeners can be registered for any single +

CLOSE: "close" = ...
defaultMaxListeners: number

By default, a maximum of 10 listeners can be registered for any single event. This limit can be changed for individual EventEmitter instances using the emitter.setMaxListeners(n) method. To change the default for allEventEmitter instances, the events.defaultMaxListeners property @@ -90,16 +95,16 @@ regular 'error' listener is installed.

v13.6.0, v12.17.0

Accessors

  • get closed(): boolean
  • The cursor is closed and all remaining locally buffered documents have been iterated.

    -

    Returns boolean

  • get id(): undefined | Long
  • The cursor has no id until it receives a response from the initial cursor creating command.

    It is non-zero for as long as the database has an open cursor.

    The initiating command may receive a zero id if the entire result is in the firstBatch.

    -

    Returns undefined | Long

  • get killed(): boolean
  • A killCursors command was attempted on this cursor. This is performed if the cursor id is non zero.

    -

    Returns boolean

Methods

  • An alias for AbstractCursor.close|AbstractCursor.close().

    -

    Returns Promise<void>

  • Type Parameters

    • K

    Parameters

    • error: Error
    • event: string | symbol
    • Rest...args: AnyRest

    Returns void

Methods

  • An alias for AbstractCursor.close|AbstractCursor.close().

    +

    Returns Promise<void>

  • Type Parameters

    • K

    Parameters

    • error: Error
    • event: string | symbol
    • Rest...args: AnyRest

    Returns void

  • Add a cursor flag to the cursor

    Parameters

    • flag:
          | "tailable"
          | "oplogReplay"
          | "noCursorTimeout"
          | "awaitData"
          | "exhaust"
          | "partial"

      The flag to set, must be one of following ['tailable', 'oplogReplay', 'noCursorTimeout', 'awaitData', 'partial' -.

    • value: boolean

      The flag boolean value.

      -

    Returns this

  • Alias for emitter.on(eventName, listener).

    +

Returns this

Returns this

Returns Promise<void>

Returns Promise<void>

-

Returns this

Returns this

Properties

pipeline: Document[]
signal: undefined | AbortSignal
captureRejections: boolean

Value: boolean

+

Properties

pipeline: Document[]
signal: undefined | AbortSignal
captureRejections: boolean

Value: boolean

Change the default captureRejections option on all new EventEmitter objects.

v13.4.0, v12.16.0

captureRejectionSymbol: typeof captureRejectionSymbol

Value: Symbol.for('nodejs.rejection')

See how to write a custom rejection handler.

v13.4.0, v12.16.0

-
CLOSE: "close" = ...
defaultMaxListeners: number

By default, a maximum of 10 listeners can be registered for any single +

CLOSE: "close" = ...
defaultMaxListeners: number

By default, a maximum of 10 listeners can be registered for any single event. This limit can be changed for individual EventEmitter instances using the emitter.setMaxListeners(n) method. To change the default for allEventEmitter instances, the events.defaultMaxListeners property @@ -109,16 +109,16 @@ regular 'error' listener is installed.

v13.6.0, v12.17.0

Accessors

  • get closed(): boolean
  • The cursor is closed and all remaining locally buffered documents have been iterated.

    -

    Returns boolean

  • get id(): undefined | Long
  • The cursor has no id until it receives a response from the initial cursor creating command.

    +

    Returns boolean

  • get id(): undefined | Long
  • The cursor has no id until it receives a response from the initial cursor creating command.

    It is non-zero for as long as the database has an open cursor.

    The initiating command may receive a zero id if the entire result is in the firstBatch.

    -

    Returns undefined | Long

  • get killed(): boolean
  • A killCursors command was attempted on this cursor. This is performed if the cursor id is non zero.

    -

    Returns boolean

Methods

  • Type Parameters

    • K

    Parameters

    • error: Error
    • event: string | symbol
    • Rest...args: AnyRest

    Returns void

Methods

  • Type Parameters

    • K

    Parameters

    • error: Error
    • event: string | symbol
    • Rest...args: AnyRest

    Returns void

  • Add a cursor flag to the cursor

    Parameters

    • flag:
          | "tailable"
          | "oplogReplay"
          | "noCursorTimeout"
          | "awaitData"
          | "exhaust"
          | "partial"

      The flag to set, must be one of following ['tailable', 'oplogReplay', 'noCursorTimeout', 'awaitData', 'partial' -.

    • value: boolean

      The flag boolean value.

      -

    Returns this

  • Alias for emitter.on(eventName, listener).

    +

Returns this

  • Returns a new uninitialized copy of this cursor, with options matching those that have been set on the current instance

    +

Returns this

  • Frees any client-side resources used by the cursor.

    Parameters

    • Optional_options: {
          timeoutMS?: number;
      }

      timeoutMS is deprecated and has no effect

      • OptionaltimeoutMS?: number

        timeoutMS has no effect and will be removed in a future release.

        -

    Returns Promise<void>

  • Synchronously calls each of the listeners registered for the event named eventName, in the order they were registered, passing the supplied arguments +

Returns Promise<void>

  • Synchronously calls each of the listeners registered for the event named eventName, in the order they were registered, passing the supplied arguments to each.

    Returns true if the event had listeners, false otherwise.

    import { EventEmitter } from 'node:events';
    const myEmitter = new EventEmitter();

    // First listener
    myEmitter.on('event', function firstListener() {
    console.log('Helloooo! first listener');
    });
    // Second listener
    myEmitter.on('event', function secondListener(arg1, arg2) {
    console.log(`event with parameters ${arg1}, ${arg2} in second listener`);
    });
    // Third listener
    myEmitter.on('event', function thirdListener(...args) {
    const parameters = args.join(', ');
    console.log(`event with parameters ${parameters} in third listener`);
    });

    console.log(myEmitter.listeners('event'));

    myEmitter.emit('event', 1, 2, 3, 4, 5);

    // Prints:
    // [
    // [Function: firstListener],
    // [Function: secondListener],
    // [Function: thirdListener]
    // ]
    // Helloooo! first listener
    // event with parameters 1, 2 in second listener
    // event with parameters 1, 2, 3, 4, 5 in third listener @@ -161,12 +161,15 @@

Returns Promise<void>

  • Will be removed in a future release. Use for await...of instead.
-
  • Check if there is any document still available in the cursor.

    +

    Do not call this method while a previous hasNext(), next() or tryNext() call on the same +cursor is still pending. Overlapping calls are not supported.

    +

    Returns Promise<boolean>

  • Set a maxTimeMS on the cursor query, allowing for hard timeout limits on queries (Only supported on MongoDB 2.6 or higher)

    Parameters

    • value: number

      Number of milliseconds to wait before aborting the query.

      -

    Returns this

  • Alias for emitter.removeListener().

    +

Returns this

  • Get the next available document from the cursor, returns null if no more documents are available.

    +

    Do not call this method while a previous hasNext(), next() or tryNext() call on the same +cursor is still pending. Overlapping calls are not supported.

    +

    Returns Promise<null | TSchema>

  • Rewind this cursor to its uninitialized state. Any options that are present on the cursor will remain in effect. Iterating this cursor will cause new queries to be sent to the server, even if the resultant data has already been retrieved by this cursor.

    -

    Returns void

  • By default EventEmitters will print a warning if more than 10 listeners are added for a particular event. This is a useful default that helps finding memory leaks. The emitter.setMaxListeners() method allows the limit to be modified for this specific EventEmitter instance. The value can be set to Infinity (or 0) to indicate an unlimited number of listeners.

    @@ -464,16 +469,18 @@
  • Returns an array of documents. The caller is responsible for making sure that there is enough memory to store the results. Note that the array only contains partial results when this cursor had been previously accessed. In that case, cursor.rewind() can be used to reset the cursor.

    -

    Returns Promise<TSchema[]>

  • Try to get the next available document from the cursor or null if an empty batch is returned

    +

    Do not call this method while a previous hasNext(), next() or tryNext() call on the same +cursor is still pending. Overlapping calls are not supported.

    +

    Returns Promise<null | TSchema>

  • Listens once to the abort event on the provided signal.

    +

Returns this

  • Listens once to the abort event on the provided signal.

    Listening to the abort event on abort signals is unsafe and may lead to resource leaks since another third party with the signal can call e.stopImmediatePropagation(). Unfortunately Node.js cannot change diff --git a/docs/Next/classes/Collection.html b/docs/Next/classes/Collection.html index 14e192787a2..8429ee3eff6 100644 --- a/docs/Next/classes/Collection.html +++ b/docs/Next/classes/Collection.html @@ -4,7 +4,7 @@

    import { MongoClient } from 'mongodb';

    interface Pet {
    name: string;
    kind: 'dog' | 'cat' | 'fish';
    }

    const client = new MongoClient('mongodb://localhost:27017');
    const pets = client.db().collection<Pet>('pets');

    const petCursor = pets.find();

    for await (const pet of petCursor) {
    console.log(`${pet.name} is a ${pet.kind}!`);
    }
    -

Type Parameters

Properties

db +

Type Parameters

Properties

Accessors

Properties

db: Db

Get the database object for the collection.

-

Accessors

  • get dbName(): string
  • The name of the database this collection belongs to

    -

    Returns string

  • get namespace(): string
  • The namespace of this collection, in the format ${this.dbName}.${this.collectionName}

    -

    Returns string

Accessors

  • get dbName(): string
  • The name of the database this collection belongs to

    +

    Returns string

  • get namespace(): string
  • The namespace of this collection, in the format ${this.dbName}.${this.collectionName}

    +

    Returns string

  • get readConcern(): undefined | ReadConcern
  • The current readConcern of the collection. If not explicitly defined for this collection, will be inherited from the parent DB

    -

    Returns undefined | ReadConcern

  • get readPreference(): undefined | ReadPreference
  • The current readPreference of the collection. If not explicitly defined for this collection, will be inherited from the parent DB

    -

    Returns undefined | ReadPreference

  • get timeoutMS(): undefined | number
  • Returns undefined | number

    timeoutMS has no effect and will be removed in a future release.

    -
  • get timeoutMS(): undefined | number
  • Returns undefined | number

    timeoutMS has no effect and will be removed in a future release.

    +
  • get writeConcern(): undefined | WriteConcern
  • The current writeConcern of the collection. If not explicitly defined for this collection, will be inherited from the parent DB

    -

    Returns undefined | WriteConcern

Methods

Methods

  • Perform a bulkWrite operation without a fluent API

    +

Returns AggregationCursor<T>

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

    +
  • 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 Collection#countDocuments| countDocuments. To obtain an estimated count of all documents in the collection, use Collection#estimatedDocumentCount| estimatedDocumentCount.

    Parameters

    Returns Promise<number>

    use Collection#countDocuments| countDocuments or Collection#estimatedDocumentCount| estimatedDocumentCount instead

    -
  • Gets the number of documents matching the filter. +

-
  • Creates an index on the db and collection collection.

    +
  • Creates an index on the db and collection collection.

    Parameters

    • indexSpec: IndexSpecification

      The field name or index specification to create an index for

    Returns Promise<string>

    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' }])
    -
  • Creates an index on the db and collection collection.

    +
  • Creates an index on the db and collection collection.

    Parameters

    • indexSpec: IndexSpecification

      The field name or index specification to create an index for

    • options: undefined | CreateIndexesOptions

      Settings for the index and the createIndexes command combined

    Returns Promise<string>

    Use the three parameter overload, which separates index options from command options. This overload will be removed in a future major release.

    -
  • Creates an index on the db and collection collection.

    +
  • Creates an index on the db and collection collection.

    Options for the index itself are given in indexOptions, and options for the createIndexes command are given separately in commandOptions. Unknown fields in indexOptions are passed through to the server for validation rather than being dropped.

    Parameters

    • keys: IndexSpecification

      The field name or index specification to create an index for

    • indexOptions: undefined | IndexOptions

      Settings for the index, or undefined if there are none

    • commandOptions: undefined | CreateIndexOptions

      Settings for the createIndexes command, or undefined if there are none

      -

    Returns Promise<string>

  • Creates multiple indexes in the collection, this method is only supported for +

Returns Promise<string>

  • Creates multiple indexes in the collection, this method is only supported for MongoDB 2.6 or higher. Earlier version of MongoDB will throw a command not supported error.

    Note: Unlike Collection#createIndex| createIndex, this function takes in raw index specifications. @@ -152,7 +152,7 @@

Returns Promise<string[]>

const collection = client.db('foo').collection('bar');
await collection.createIndexes([
// Simple index on field fizz
{
key: { fizz: 1 },
}
// wildcard index
{
key: { '$**': 1 }
},
// named index on darmok and jalad
{
key: { darmok: 1, jalad: -1 }
name: 'tanagra'
}
]);
-
  • Creates multiple indexes in the collection, opting into "pass through" behavior for index +

  • Creates multiple indexes in the collection, opting into "pass through" behavior for index options the driver does not recognise.

    Parameters

    • indexSpecs: IndexDescription[]

      An array of index specifications to be created

    • commandOptions: undefined | CreateIndexesOptions

      Optional settings for the createIndexes command

      @@ -161,33 +161,33 @@

    Returns Promise<string[]>

    Used to opt into "pass through" behavior, where options will be validated by the server rather than the driver. In a future release this overload will be removed and the default behavior will change from false to true.

    -
    • Creates a single search index for the collection.

      +
    • Creates a single search index for the collection.

      Parameters

      Returns Promise<string>

      A promise that resolves to the name of the new search index.

      Only available when used against a 7.0+ Atlas cluster.

      -
    • Creates multiple search indexes for the current collection.

      +
    • Creates multiple search indexes for the current collection.

      Parameters

      Returns Promise<string[]>

      A promise that resolves to an array of the newly created search index names.

      Only available when used against a 7.0+ Atlas cluster.

      -
    • Delete a document from a collection

      +

    Returns Promise<DeleteResult>

    • The distinct command returns a list of distinct values for the given key across a collection.

      +

    Returns Promise<DeleteResult>

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

      +

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

  • Type Parameters

    • Key extends string | number | symbol

    Parameters

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

  • Type Parameters

    • Key extends string | number | symbol

    Parameters

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

  • Type Parameters

    • Key extends string | number | symbol

    Parameters

    Returns Promise<Document>

  • Parameters

    • key: string

    Returns Promise<any[]>

  • Parameters

    Returns Promise<any[]>

  • Parameters

    Returns Promise<any[]>

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

      Parameters

      Returns Promise<boolean>

    • Drops an index from this collection.

      +

    Returns Promise<boolean>

    • Drops all indexes from this collection.

      +

    Returns Promise<Document>

    • Drops all indexes from this collection.

      Parameters

      Returns Promise<boolean>

    • Deletes a search index by index name.

      +

    Returns Promise<boolean>

    • Deletes a search index by index name.

      Parameters

      • name: string

        The name of the search index to be deleted.

      Returns Promise<void>

      Only available when used against a 7.0+ Atlas cluster.

      -
    • Gets an estimate of the count of documents in a collection using collection metadata. +

    • Gets an estimate of the count of documents in a collection using collection metadata. This will always run a count command on all server versions.

      due to an oversight in versions 5.0.0-5.0.8 of MongoDB, the count command, which estimatedDocumentCount uses in its implementation, was not included in v1 of @@ -196,16 +196,16 @@ encountering errors.

      Parameters

      Returns Promise<number>

    • Find a document and delete it in one atomic operation. Requires a write lock for the duration of the operation.

      +
    • Find a document and replace it in one atomic operation. Requires a write lock for the duration of the operation.

      +

    Returns Promise<ModifyResult<TSchema>>

  • Parameters

    Returns Promise<null | WithId<TSchema>>

  • Parameters

    Returns Promise<null | WithId<TSchema>>

  • Parameters

    Returns Promise<null | WithId<TSchema>>

    • Find a document and update it in one atomic operation. Requires a write lock for the duration of the operation.

      +

    Returns Promise<ModifyResult<TSchema>>

  • Parameters

    Returns Promise<null | WithId<TSchema>>

  • Parameters

    Returns Promise<null | WithId<TSchema>>

  • Parameters

    Returns Promise<null | WithId<TSchema>>

  • Returns Promise<ModifyResult<TSchema>>

  • Parameters

    Returns Promise<null | WithId<TSchema>>

  • Parameters

    Returns Promise<null | WithId<TSchema>>

  • Parameters

    Returns Promise<null | WithId<TSchema>>

    • Checks if one or more indexes exist on the collection, fails on first non-existing index

      +

    Returns Promise<IndexDescriptionInfo[]>

  • Parameters

    Returns Promise<IndexDescriptionCompact>

  • Parameters

    Returns Promise<IndexDescriptionCompact | IndexDescriptionInfo[]>

  • Parameters

    Returns Promise<IndexDescriptionInfo[]>

    • Checks if one or more indexes exist on the collection, fails on first non-existing index

      Parameters

      • indexes: string | string[]

        One or more index names to check.

      • Optionaloptions: ListIndexesOptions

        Optional settings for the command

        -

      Returns Promise<boolean>

    Returns Promise<boolean>

    • 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.

      +

    Returns Promise<IndexDescriptionInfo[]>

  • Parameters

    Returns Promise<IndexDescriptionCompact>

  • Parameters

    Returns Promise<IndexDescriptionCompact | IndexDescriptionInfo[]>

  • Returns Promise<IndexDescriptionCompact>

    • 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.

      Parameters

      Returns OrderedBulkOperation

      MongoNotConnectedError

      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.

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

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

      Parameters

      Returns UnorderedBulkOperation

      MongoNotConnectedError

      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.

      -
    • Inserts a single document into MongoDB. If documents passed in do not contain the _id field, +

    Returns Promise<InsertManyResult<TSchema>>

    • Returns if the collection is a capped collection

      +

    Returns Promise<InsertOneResult<TSchema>>

    • Returns if the collection is a capped collection

      Parameters

      Returns Promise<boolean>

    • Get the list of all indexes information for the collection.

      +

    Returns Promise<boolean>

    Returns ListIndexesCursor

    Returns Promise<Document>

    • Update multiple documents in a collection

      +

    Returns Promise<UpdateResult<TSchema>>

    • Update a single document in a collection

      +

    Returns Promise<UpdateResult<TSchema>>

    • Updates a search index by replacing the existing index definition with the provided definition.

      +

    Returns Promise<UpdateResult<TSchema>>

    • Updates a search index by replacing the existing index definition with the provided definition.

      Parameters

      • name: string

        The name of the search index to update.

      • definition: Document

        The new search index definition.

      Returns Promise<void>

      Only available when used against a 7.0+ Atlas cluster.

      -
    +
    diff --git a/docs/Next/classes/ExplainableCursor.html b/docs/Next/classes/ExplainableCursor.html index 22f91074772..6fb856369db 100644 --- a/docs/Next/classes/ExplainableCursor.html +++ b/docs/Next/classes/ExplainableCursor.html @@ -57,13 +57,13 @@ on once setMaxListeners -

    Properties

    signal: undefined | AbortSignal
    captureRejections: boolean

    Value: boolean

    +

    Properties

    signal: undefined | AbortSignal
    captureRejections: boolean

    Value: boolean

    Change the default captureRejections option on all new EventEmitter objects.

    v13.4.0, v12.16.0

    captureRejectionSymbol: typeof captureRejectionSymbol

    Value: Symbol.for('nodejs.rejection')

    See how to write a custom rejection handler.

    v13.4.0, v12.16.0

    -
    CLOSE: "close" = ...
    defaultMaxListeners: number

    By default, a maximum of 10 listeners can be registered for any single +

    CLOSE: "close" = ...
    defaultMaxListeners: number

    By default, a maximum of 10 listeners can be registered for any single event. This limit can be changed for individual EventEmitter instances using the emitter.setMaxListeners(n) method. To change the default for allEventEmitter instances, the events.defaultMaxListeners property @@ -93,16 +93,16 @@ regular 'error' listener is installed.

    v13.6.0, v12.17.0

    Accessors

    • get closed(): boolean
    • The cursor is closed and all remaining locally buffered documents have been iterated.

      -

      Returns boolean

    • get id(): undefined | Long
    • The cursor has no id until it receives a response from the initial cursor creating command.

      +

      Returns boolean

    • get id(): undefined | Long
    • The cursor has no id until it receives a response from the initial cursor creating command.

      It is non-zero for as long as the database has an open cursor.

      The initiating command may receive a zero id if the entire result is in the firstBatch.

      -

      Returns undefined | Long

    • get killed(): boolean
    • A killCursors command was attempted on this cursor. This is performed if the cursor id is non zero.

      -

      Returns boolean

    Methods

    • Type Parameters

      • K

      Parameters

      • error: Error
      • event: string | symbol
      • Rest...args: AnyRest

      Returns void

    Methods

    • Type Parameters

      • K

      Parameters

      • error: Error
      • event: string | symbol
      • Rest...args: AnyRest

      Returns void

    • Add a cursor flag to the cursor

      Parameters

      • flag:
            | "tailable"
            | "oplogReplay"
            | "noCursorTimeout"
            | "awaitData"
            | "exhaust"
            | "partial"

        The flag to set, must be one of following ['tailable', 'oplogReplay', 'noCursorTimeout', 'awaitData', 'partial' -.

      • value: boolean

        The flag boolean value.

        -

      Returns this

    • Alias for emitter.on(eventName, listener).

      +

    Returns this

    • Frees any client-side resources used by the cursor.

      +

    Returns this

    • Frees any client-side resources used by the cursor.

      Parameters

      • Optional_options: {
            timeoutMS?: number;
        }

        timeoutMS is deprecated and has no effect

        • OptionaltimeoutMS?: number

          timeoutMS has no effect and will be removed in a future release.

          -

      Returns Promise<void>

    • Synchronously calls each of the listeners registered for the event named eventName, in the order they were registered, passing the supplied arguments +

    Returns Promise<void>

    • Synchronously calls each of the listeners registered for the event named eventName, in the order they were registered, passing the supplied arguments to each.

      Returns true if the event had listeners, false otherwise.

      import { EventEmitter } from 'node:events';
      const myEmitter = new EventEmitter();

      // First listener
      myEmitter.on('event', function firstListener() {
      console.log('Helloooo! first listener');
      });
      // Second listener
      myEmitter.on('event', function secondListener(arg1, arg2) {
      console.log(`event with parameters ${arg1}, ${arg2} in second listener`);
      });
      // Third listener
      myEmitter.on('event', function thirdListener(...args) {
      const parameters = args.join(', ');
      console.log(`event with parameters ${parameters} in third listener`);
      });

      console.log(myEmitter.listeners('event'));

      myEmitter.emit('event', 1, 2, 3, 4, 5);

      // Prints:
      // [
      // [Function: firstListener],
      // [Function: secondListener],
      // [Function: thirdListener]
      // ]
      // Helloooo! first listener
      // event with parameters 1, 2 in second listener
      // event with parameters 1, 2, 3, 4, 5 in third listener @@ -135,10 +135,13 @@
        • (doc): boolean | void
        • Parameters

          Returns boolean | void

    Returns Promise<void>

    • Will be removed in a future release. Use for await...of instead.
    -
    • Check if there is any document still available in the cursor.

      +

      Do not call this method while a previous hasNext(), next() or tryNext() call on the same +cursor is still pending. Overlapping calls are not supported.

      +

      Returns Promise<boolean>

    • Returns the number of listeners listening for the event named eventName. If listener is provided, it will return how many times the listener is found in the list of the listeners of the event.

      Type Parameters

      • EventKey extends "close"

      Parameters

      Returns number

      v3.2.0

      @@ -168,10 +171,12 @@
      const cursor: FindCursor<Document> = coll.find();
      const mappedCursor: FindCursor<number> = cursor.map(doc => Object.keys(doc).length);
      const keyCounts: number[] = await mappedCursor.toArray(); // cursor.toArray() still returns Document[]
      -
    • Set a maxTimeMS on the cursor query, allowing for hard timeout limits on queries (Only supported on MongoDB 2.6 or higher)

      Parameters

      • value: number

        Number of milliseconds to wait before aborting the query.

        -

      Returns this

    • Alias for emitter.removeListener().

      +

    Returns this

    • Get the next available document from the cursor, returns null if no more documents are available.

      +

      Do not call this method while a previous hasNext(), next() or tryNext() call on the same +cursor is still pending. Overlapping calls are not supported.

      +

      Returns Promise<null | TSchema>

    • Removes all listeners, or those of the specified eventName.

      It is bad practice to remove listeners added elsewhere in the code, particularly when the EventEmitter instance was created by some other component or module (e.g. sockets or file streams).

      @@ -412,21 +417,23 @@
    • Rewind this cursor to its uninitialized state. Any options that are present on the cursor will remain in effect. Iterating this cursor will cause new queries to be sent to the server, even if the resultant data has already been retrieved by this cursor.

      -

      Returns void

    • By default EventEmitters will print a warning if more than 10 listeners are added for a particular event. This is a useful default that helps finding memory leaks. The emitter.setMaxListeners() method allows the limit to be modified for this specific EventEmitter instance. The value can be set to Infinity (or 0) to indicate an unlimited number of listeners.

      Returns a reference to the EventEmitter, so that calls can be chained.

      Parameters

      • n: number

      Returns this

      v0.3.5

      -
    • Returns an array of documents. The caller is responsible for making sure that there is enough memory to store the results. Note that the array only contains partial results when this cursor had been previously accessed. In that case, cursor.rewind() can be used to reset the cursor.

      -

      Returns Promise<TSchema[]>

    • Try to get the next available document from the cursor or null if an empty batch is returned

      +

      Do not call this method while a previous hasNext(), next() or tryNext() call on the same +cursor is still pending. Overlapping calls are not supported.

      +

      Returns Promise<null | TSchema>

    • Listens once to the abort event on the provided signal.

      +

    Returns this

    • Listens once to the abort event on the provided signal.

      Listening to the abort event on abort signals is unsafe and may lead to resource leaks since another third party with the signal can call e.stopImmediatePropagation(). Unfortunately Node.js cannot change diff --git a/docs/Next/classes/FindCursor.html b/docs/Next/classes/FindCursor.html index 28aaa3b5759..b3882340cdd 100644 --- a/docs/Next/classes/FindCursor.html +++ b/docs/Next/classes/FindCursor.html @@ -72,13 +72,13 @@ on once setMaxListeners -

    Properties

    signal: undefined | AbortSignal
    captureRejections: boolean

    Value: boolean

    +

    Properties

    signal: undefined | AbortSignal
    captureRejections: boolean

    Value: boolean

    Change the default captureRejections option on all new EventEmitter objects.

    v13.4.0, v12.16.0

    captureRejectionSymbol: typeof captureRejectionSymbol

    Value: Symbol.for('nodejs.rejection')

    See how to write a custom rejection handler.

    v13.4.0, v12.16.0

    -
    CLOSE: "close" = ...
    defaultMaxListeners: number

    By default, a maximum of 10 listeners can be registered for any single +

    CLOSE: "close" = ...
    defaultMaxListeners: number

    By default, a maximum of 10 listeners can be registered for any single event. This limit can be changed for individual EventEmitter instances using the emitter.setMaxListeners(n) method. To change the default for allEventEmitter instances, the events.defaultMaxListeners property @@ -108,16 +108,16 @@ regular 'error' listener is installed.

    v13.6.0, v12.17.0

    Accessors

    • get closed(): boolean
    • The cursor is closed and all remaining locally buffered documents have been iterated.

      -

      Returns boolean

    • get id(): undefined | Long
    • The cursor has no id until it receives a response from the initial cursor creating command.

      +

      Returns boolean

    • get id(): undefined | Long
    • The cursor has no id until it receives a response from the initial cursor creating command.

      It is non-zero for as long as the database has an open cursor.

      The initiating command may receive a zero id if the entire result is in the firstBatch.

      -

      Returns undefined | Long

    • get killed(): boolean
    • A killCursors command was attempted on this cursor. This is performed if the cursor id is non zero.

      -

      Returns boolean

    Methods

    • Type Parameters

      • K

      Parameters

      • error: Error
      • event: string | symbol
      • Rest...args: AnyRest

      Returns void

    Methods

    • Type Parameters

      • K

      Parameters

      • error: Error
      • event: string | symbol
      • Rest...args: AnyRest

      Returns void

    • Add a cursor flag to the cursor

      Parameters

      • flag:
            | "tailable"
            | "oplogReplay"
            | "noCursorTimeout"
            | "awaitData"
            | "exhaust"
            | "partial"

        The flag to set, must be one of following ['tailable', 'oplogReplay', 'noCursorTimeout', 'awaitData', 'partial' -.

      • value: boolean

        The flag boolean value.

        -

      Returns this

    • Alias for emitter.on(eventName, listener).

      +

    Returns this

    • Returns a new uninitialized copy of this cursor, with options matching those that have been set on the current instance

      +

    Returns this

    • Frees any client-side resources used by the cursor.

      Parameters

      • Optional_options: {
            timeoutMS?: number;
        }

        timeoutMS is deprecated and has no effect

        • OptionaltimeoutMS?: number

          timeoutMS has no effect and will be removed in a future release.

          -

      Returns Promise<void>

    • Set the collation options for the cursor.

      +

    Returns Promise<void>

    • Set the collation options for the cursor.

      Parameters

      • value: CollationOptions

        The cursor collation options (MongoDB 3.4 or higher) settings for update operation (see 3.4 documentation for available fields).

      Returns this

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

      Parameters

      • value: string

        The comment attached to this query.

        @@ -165,10 +165,13 @@
          • (doc): boolean | void
          • Parameters

            Returns boolean | void

      Returns Promise<void>

      • Will be removed in a future release. Use for await...of instead.
      -
    • Check if there is any document still available in the cursor.

      +

      Do not call this method while a previous hasNext(), next() or tryNext() call on the same +cursor is still pending. Overlapping calls are not supported.

      +

      Returns Promise<boolean>

    • Set the cursor hint

      Parameters

      • hint: Hint

        If specified, then the query system will only consider plans using the hinted index.

      Returns this

    • Set the cursor min

      Parameters

      • min: Document

        Specify a $min value to specify the inclusive lower bound for a specific index in order to constrain the results of find(). The $min specifies the lower bound for all keys of a specific index in order.

      Returns this

    • Removes all listeners, or those of the specified eventName.

      It is bad practice to remove listeners added elsewhere in the code, particularly when the EventEmitter instance was created by some other component or module (e.g. sockets or file streams).

      @@ -468,7 +473,7 @@

    Returns this

    • Rewind this cursor to its uninitialized state. Any options that are present on the cursor will remain in effect. Iterating this cursor will cause new queries to be sent to the server, even if the resultant data has already been retrieved by this cursor.

      -

      Returns void

    • By default EventEmitters will print a warning if more than 10 listeners are added for a particular event. This is a useful default that helps finding memory leaks. The emitter.setMaxListeners() method allows the limit to be modified for this specific EventEmitter instance. The value can be set to Infinity (or 0) to indicate an unlimited number of listeners.

      @@ -481,15 +486,17 @@

    Returns this

    • Sets the sort order of the cursor query.

      Parameters

      • sort: Sort

        The key or keys set for the sort.

      • Optionaldirection: SortDirection

        The direction of the sorting (1 or -1).

        -

      Returns this

    • Returns an array of documents. The caller is responsible for making sure that there +

    Returns this

    • Returns an array of documents. The caller is responsible for making sure that there is enough memory to store the results. Note that the array only contains partial results when this cursor had been previously accessed. In that case, cursor.rewind() can be used to reset the cursor.

      -

      Returns Promise<TSchema[]>

    • Try to get the next available document from the cursor or null if an empty batch is returned

      +

      Do not call this method while a previous hasNext(), next() or tryNext() call on the same +cursor is still pending. Overlapping calls are not supported.

      +

      Returns Promise<null | TSchema>

    • Listens once to the abort event on the provided signal.

      +

    Returns this

    • Listens once to the abort event on the provided signal.

      Listening to the abort event on abort signals is unsafe and may lead to resource leaks since another third party with the signal can call e.stopImmediatePropagation(). Unfortunately Node.js cannot change diff --git a/docs/Next/classes/ListCollectionsCursor.html b/docs/Next/classes/ListCollectionsCursor.html index e0d3090f7e6..d88564ac1bd 100644 --- a/docs/Next/classes/ListCollectionsCursor.html +++ b/docs/Next/classes/ListCollectionsCursor.html @@ -58,13 +58,13 @@ on once setMaxListeners -

    Constructors

    Properties

    filter: Document
    parent: Db
    signal: undefined | AbortSignal
    captureRejections: boolean

    Value: boolean

    +

    Constructors

    Properties

    filter: Document
    parent: Db
    signal: undefined | AbortSignal
    captureRejections: boolean

    Value: boolean

    Change the default captureRejections option on all new EventEmitter objects.

    v13.4.0, v12.16.0

    captureRejectionSymbol: typeof captureRejectionSymbol

    Value: Symbol.for('nodejs.rejection')

    See how to write a custom rejection handler.

    v13.4.0, v12.16.0

    -
    CLOSE: "close" = ...
    defaultMaxListeners: number

    By default, a maximum of 10 listeners can be registered for any single +

    CLOSE: "close" = ...
    defaultMaxListeners: number

    By default, a maximum of 10 listeners can be registered for any single event. This limit can be changed for individual EventEmitter instances using the emitter.setMaxListeners(n) method. To change the default for allEventEmitter instances, the events.defaultMaxListeners property @@ -94,16 +94,16 @@ regular 'error' listener is installed.

    v13.6.0, v12.17.0

    Accessors

    • get closed(): boolean
    • The cursor is closed and all remaining locally buffered documents have been iterated.

      -

      Returns boolean

    • get id(): undefined | Long
    • The cursor has no id until it receives a response from the initial cursor creating command.

      +

      Returns boolean

    • get id(): undefined | Long
    • The cursor has no id until it receives a response from the initial cursor creating command.

      It is non-zero for as long as the database has an open cursor.

      The initiating command may receive a zero id if the entire result is in the firstBatch.

      -

      Returns undefined | Long

    • get killed(): boolean
    • A killCursors command was attempted on this cursor. This is performed if the cursor id is non zero.

      -

      Returns boolean

    Methods

    • Type Parameters

      • K

      Parameters

      • error: Error
      • event: string | symbol
      • Rest...args: AnyRest

      Returns void

    Methods

    • Type Parameters

      • K

      Parameters

      • error: Error
      • event: string | symbol
      • Rest...args: AnyRest

      Returns void

    • Add a cursor flag to the cursor

      Parameters

      • flag:
            | "tailable"
            | "oplogReplay"
            | "noCursorTimeout"
            | "awaitData"
            | "exhaust"
            | "partial"

        The flag to set, must be one of following ['tailable', 'oplogReplay', 'noCursorTimeout', 'awaitData', 'partial' -.

      • value: boolean

        The flag boolean value.

        -

      Returns this

    • Alias for emitter.on(eventName, listener).

      +

    Returns this

    • Returns a new uninitialized copy of this cursor, with options matching those that have been set on the current instance

      +

    Returns this

    • Frees any client-side resources used by the cursor.

      Parameters

      • Optional_options: {
            timeoutMS?: number;
        }

        timeoutMS is deprecated and has no effect

        • OptionaltimeoutMS?: number

          timeoutMS has no effect and will be removed in a future release.

          -

      Returns Promise<void>

    • Synchronously calls each of the listeners registered for the event named eventName, in the order they were registered, passing the supplied arguments +

    Returns Promise<void>

    • Synchronously calls each of the listeners registered for the event named eventName, in the order they were registered, passing the supplied arguments to each.

      Returns true if the event had listeners, false otherwise.

      import { EventEmitter } from 'node:events';
      const myEmitter = new EventEmitter();

      // First listener
      myEmitter.on('event', function firstListener() {
      console.log('Helloooo! first listener');
      });
      // Second listener
      myEmitter.on('event', function secondListener(arg1, arg2) {
      console.log(`event with parameters ${arg1}, ${arg2} in second listener`);
      });
      // Third listener
      myEmitter.on('event', function thirdListener(...args) {
      const parameters = args.join(', ');
      console.log(`event with parameters ${parameters} in third listener`);
      });

      console.log(myEmitter.listeners('event'));

      myEmitter.emit('event', 1, 2, 3, 4, 5);

      // Prints:
      // [
      // [Function: firstListener],
      // [Function: secondListener],
      // [Function: thirdListener]
      // ]
      // Helloooo! first listener
      // event with parameters 1, 2 in second listener
      // event with parameters 1, 2, 3, 4, 5 in third listener @@ -135,10 +135,13 @@
        • (doc): boolean | void
        • Parameters

          • doc: T

          Returns boolean | void

    Returns Promise<void>

    • Will be removed in a future release. Use for await...of instead.
    -
    • Check if there is any document still available in the cursor.

      +

      Do not call this method while a previous hasNext(), next() or tryNext() call on the same +cursor is still pending. Overlapping calls are not supported.

      +

      Returns Promise<boolean>

    • Returns the number of listeners listening for the event named eventName. If listener is provided, it will return how many times the listener is found in the list of the listeners of the event.

      Type Parameters

      • EventKey extends "close"

      Parameters

      Returns number

      v3.2.0

      @@ -168,10 +171,12 @@
      const cursor: FindCursor<Document> = coll.find();
      const mappedCursor: FindCursor<number> = cursor.map(doc => Object.keys(doc).length);
      const keyCounts: number[] = await mappedCursor.toArray(); // cursor.toArray() still returns Document[]
      -
    • Set a maxTimeMS on the cursor query, allowing for hard timeout limits on queries (Only supported on MongoDB 2.6 or higher)

      Parameters

      • value: number

        Number of milliseconds to wait before aborting the query.

        -

      Returns this

    • Alias for emitter.removeListener().

      +

    Returns this

    • Get the next available document from the cursor, returns null if no more documents are available.

      +

      Do not call this method while a previous hasNext(), next() or tryNext() call on the same +cursor is still pending. Overlapping calls are not supported.

      +

      Returns Promise<null | T>

    • Removes all listeners, or those of the specified eventName.

      It is bad practice to remove listeners added elsewhere in the code, particularly when the EventEmitter instance was created by some other component or module (e.g. sockets or file streams).

      @@ -412,21 +417,23 @@
    • Rewind this cursor to its uninitialized state. Any options that are present on the cursor will remain in effect. Iterating this cursor will cause new queries to be sent to the server, even if the resultant data has already been retrieved by this cursor.

      -

      Returns void

    • By default EventEmitters will print a warning if more than 10 listeners are added for a particular event. This is a useful default that helps finding memory leaks. The emitter.setMaxListeners() method allows the limit to be modified for this specific EventEmitter instance. The value can be set to Infinity (or 0) to indicate an unlimited number of listeners.

      Returns a reference to the EventEmitter, so that calls can be chained.

      Parameters

      • n: number

      Returns this

      v0.3.5

      -
    • Returns an array of documents. The caller is responsible for making sure that there is enough memory to store the results. Note that the array only contains partial results when this cursor had been previously accessed. In that case, cursor.rewind() can be used to reset the cursor.

      -

      Returns Promise<T[]>

    • Try to get the next available document from the cursor or null if an empty batch is returned

      +

      Do not call this method while a previous hasNext(), next() or tryNext() call on the same +cursor is still pending. Overlapping calls are not supported.

      +

      Returns Promise<null | T>

    • Listens once to the abort event on the provided signal.

      +

    Returns this

    • Listens once to the abort event on the provided signal.

      Listening to the abort event on abort signals is unsafe and may lead to resource leaks since another third party with the signal can call e.stopImmediatePropagation(). Unfortunately Node.js cannot change diff --git a/docs/Next/classes/ListIndexesCursor.html b/docs/Next/classes/ListIndexesCursor.html index 29c05903e66..a4e40d5c6db 100644 --- a/docs/Next/classes/ListIndexesCursor.html +++ b/docs/Next/classes/ListIndexesCursor.html @@ -57,13 +57,13 @@ on once setMaxListeners -

    Constructors

    Properties

    signal: undefined | AbortSignal
    captureRejections: boolean

    Value: boolean

    +

    Constructors

    Properties

    signal: undefined | AbortSignal
    captureRejections: boolean

    Value: boolean

    Change the default captureRejections option on all new EventEmitter objects.

    v13.4.0, v12.16.0

    captureRejectionSymbol: typeof captureRejectionSymbol

    Value: Symbol.for('nodejs.rejection')

    See how to write a custom rejection handler.

    v13.4.0, v12.16.0

    -
    CLOSE: "close" = ...
    defaultMaxListeners: number

    By default, a maximum of 10 listeners can be registered for any single +

    CLOSE: "close" = ...
    defaultMaxListeners: number

    By default, a maximum of 10 listeners can be registered for any single event. This limit can be changed for individual EventEmitter instances using the emitter.setMaxListeners(n) method. To change the default for allEventEmitter instances, the events.defaultMaxListeners property @@ -93,16 +93,16 @@ regular 'error' listener is installed.

    v13.6.0, v12.17.0

    Accessors

    • get closed(): boolean
    • The cursor is closed and all remaining locally buffered documents have been iterated.

      -

      Returns boolean

    • get id(): undefined | Long
    • The cursor has no id until it receives a response from the initial cursor creating command.

      +

      Returns boolean

    • get id(): undefined | Long
    • The cursor has no id until it receives a response from the initial cursor creating command.

      It is non-zero for as long as the database has an open cursor.

      The initiating command may receive a zero id if the entire result is in the firstBatch.

      -

      Returns undefined | Long

    • get killed(): boolean
    • A killCursors command was attempted on this cursor. This is performed if the cursor id is non zero.

      -

      Returns boolean

    Methods

    • Type Parameters

      • K

      Parameters

      • error: Error
      • event: string | symbol
      • Rest...args: AnyRest

      Returns void

    Methods

    • Type Parameters

      • K

      Parameters

      • error: Error
      • event: string | symbol
      • Rest...args: AnyRest

      Returns void

    • Add a cursor flag to the cursor

      Parameters

      • flag:
            | "tailable"
            | "oplogReplay"
            | "noCursorTimeout"
            | "awaitData"
            | "exhaust"
            | "partial"

        The flag to set, must be one of following ['tailable', 'oplogReplay', 'noCursorTimeout', 'awaitData', 'partial' -.

      • value: boolean

        The flag boolean value.

        -

      Returns this

    • Alias for emitter.on(eventName, listener).

      +

    Returns this

    • Returns a new uninitialized copy of this cursor, with options matching those that have been set on the current instance

      +

    Returns this

    • Frees any client-side resources used by the cursor.

      Parameters

      • Optional_options: {
            timeoutMS?: number;
        }

        timeoutMS is deprecated and has no effect

        • OptionaltimeoutMS?: number

          timeoutMS has no effect and will be removed in a future release.

          -

      Returns Promise<void>

    • Synchronously calls each of the listeners registered for the event named eventName, in the order they were registered, passing the supplied arguments +

    Returns Promise<void>

    • Synchronously calls each of the listeners registered for the event named eventName, in the order they were registered, passing the supplied arguments to each.

      Returns true if the event had listeners, false otherwise.

      import { EventEmitter } from 'node:events';
      const myEmitter = new EventEmitter();

      // First listener
      myEmitter.on('event', function firstListener() {
      console.log('Helloooo! first listener');
      });
      // Second listener
      myEmitter.on('event', function secondListener(arg1, arg2) {
      console.log(`event with parameters ${arg1}, ${arg2} in second listener`);
      });
      // Third listener
      myEmitter.on('event', function thirdListener(...args) {
      const parameters = args.join(', ');
      console.log(`event with parameters ${parameters} in third listener`);
      });

      console.log(myEmitter.listeners('event'));

      myEmitter.emit('event', 1, 2, 3, 4, 5);

      // Prints:
      // [
      // [Function: firstListener],
      // [Function: secondListener],
      // [Function: thirdListener]
      // ]
      // Helloooo! first listener
      // event with parameters 1, 2 in second listener
      // event with parameters 1, 2, 3, 4, 5 in third listener @@ -134,10 +134,13 @@
        • (doc): boolean | void
        • Parameters

          • doc: any

          Returns boolean | void

    Returns Promise<void>

    • Will be removed in a future release. Use for await...of instead.
    -
    • Check if there is any document still available in the cursor.

      +

      Do not call this method while a previous hasNext(), next() or tryNext() call on the same +cursor is still pending. Overlapping calls are not supported.

      +

      Returns Promise<boolean>

    • Returns the number of listeners listening for the event named eventName. If listener is provided, it will return how many times the listener is found in the list of the listeners of the event.

      Type Parameters

      • EventKey extends "close"

      Parameters

      Returns number

      v3.2.0

      @@ -167,10 +170,12 @@
      const cursor: FindCursor<Document> = coll.find();
      const mappedCursor: FindCursor<number> = cursor.map(doc => Object.keys(doc).length);
      const keyCounts: number[] = await mappedCursor.toArray(); // cursor.toArray() still returns Document[]
      -
    • Set a maxTimeMS on the cursor query, allowing for hard timeout limits on queries (Only supported on MongoDB 2.6 or higher)

      Parameters

      • value: number

        Number of milliseconds to wait before aborting the query.

        -

      Returns this

    • Alias for emitter.removeListener().

      +

    Returns this

    • Get the next available document from the cursor, returns null if no more documents are available.

      +

      Do not call this method while a previous hasNext(), next() or tryNext() call on the same +cursor is still pending. Overlapping calls are not supported.

      +

      Returns Promise<any>

    • Removes all listeners, or those of the specified eventName.

      It is bad practice to remove listeners added elsewhere in the code, particularly when the EventEmitter instance was created by some other component or module (e.g. sockets or file streams).

      @@ -411,21 +416,23 @@
    • Rewind this cursor to its uninitialized state. Any options that are present on the cursor will remain in effect. Iterating this cursor will cause new queries to be sent to the server, even if the resultant data has already been retrieved by this cursor.

      -

      Returns void

    • By default EventEmitters will print a warning if more than 10 listeners are added for a particular event. This is a useful default that helps finding memory leaks. The emitter.setMaxListeners() method allows the limit to be modified for this specific EventEmitter instance. The value can be set to Infinity (or 0) to indicate an unlimited number of listeners.

      Returns a reference to the EventEmitter, so that calls can be chained.

      Parameters

      • n: number

      Returns this

      v0.3.5

      -
    • Returns an array of documents. The caller is responsible for making sure that there is enough memory to store the results. Note that the array only contains partial results when this cursor had been previously accessed. In that case, cursor.rewind() can be used to reset the cursor.

      -

      Returns Promise<any[]>

    • Try to get the next available document from the cursor or null if an empty batch is returned

      +

      Do not call this method while a previous hasNext(), next() or tryNext() call on the same +cursor is still pending. Overlapping calls are not supported.

      +

      Returns Promise<any>

    • Listens once to the abort event on the provided signal.

      +

    Returns this

    • Listens once to the abort event on the provided signal.

      Listening to the abort event on abort signals is unsafe and may lead to resource leaks since another third party with the signal can call e.stopImmediatePropagation(). Unfortunately Node.js cannot change diff --git a/docs/Next/classes/ListSearchIndexesCursor.html b/docs/Next/classes/ListSearchIndexesCursor.html index 78b8cd77fab..ff0b8d23b93 100644 --- a/docs/Next/classes/ListSearchIndexesCursor.html +++ b/docs/Next/classes/ListSearchIndexesCursor.html @@ -69,13 +69,13 @@ on once setMaxListeners -

    Properties

    pipeline: Document[]
    signal: undefined | AbortSignal
    captureRejections: boolean

    Value: boolean

    +

    Properties

    pipeline: Document[]
    signal: undefined | AbortSignal
    captureRejections: boolean

    Value: boolean

    Change the default captureRejections option on all new EventEmitter objects.

    v13.4.0, v12.16.0

    captureRejectionSymbol: typeof captureRejectionSymbol

    Value: Symbol.for('nodejs.rejection')

    See how to write a custom rejection handler.

    v13.4.0, v12.16.0

    -
    CLOSE: "close" = ...
    defaultMaxListeners: number

    By default, a maximum of 10 listeners can be registered for any single +

    CLOSE: "close" = ...
    defaultMaxListeners: number

    By default, a maximum of 10 listeners can be registered for any single event. This limit can be changed for individual EventEmitter instances using the emitter.setMaxListeners(n) method. To change the default for allEventEmitter instances, the events.defaultMaxListeners property @@ -105,16 +105,16 @@ regular 'error' listener is installed.

    v13.6.0, v12.17.0

    Accessors

    • get closed(): boolean
    • The cursor is closed and all remaining locally buffered documents have been iterated.

      -

      Returns boolean

    • get id(): undefined | Long
    • The cursor has no id until it receives a response from the initial cursor creating command.

      +

      Returns boolean

    • get id(): undefined | Long
    • The cursor has no id until it receives a response from the initial cursor creating command.

      It is non-zero for as long as the database has an open cursor.

      The initiating command may receive a zero id if the entire result is in the firstBatch.

      -

      Returns undefined | Long

    • get killed(): boolean
    • A killCursors command was attempted on this cursor. This is performed if the cursor id is non zero.

      -

      Returns boolean

    Methods

    • Type Parameters

      • K

      Parameters

      • error: Error
      • event: string | symbol
      • Rest...args: AnyRest

      Returns void

    Methods

    • Type Parameters

      • K

      Parameters

      • error: Error
      • event: string | symbol
      • Rest...args: AnyRest

      Returns void

    • Add a cursor flag to the cursor

      Parameters

      • flag:
            | "tailable"
            | "oplogReplay"
            | "noCursorTimeout"
            | "awaitData"
            | "exhaust"
            | "partial"

        The flag to set, must be one of following ['tailable', 'oplogReplay', 'noCursorTimeout', 'awaitData', 'partial' -.

      • value: boolean

        The flag boolean value.

        -

      Returns this

    • Alias for emitter.on(eventName, listener).

      +

    Returns this

    • Returns a new uninitialized copy of this cursor, with options matching those that have been set on the current instance

      +

    Returns this

    • Frees any client-side resources used by the cursor.

      Parameters

      • Optional_options: {
            timeoutMS?: number;
        }

        timeoutMS is deprecated and has no effect

        • OptionaltimeoutMS?: number

          timeoutMS has no effect and will be removed in a future release.

          -

      Returns Promise<void>

    • Synchronously calls each of the listeners registered for the event named eventName, in the order they were registered, passing the supplied arguments +

    Returns Promise<void>

    • Synchronously calls each of the listeners registered for the event named eventName, in the order they were registered, passing the supplied arguments to each.

      Returns true if the event had listeners, false otherwise.

      import { EventEmitter } from 'node:events';
      const myEmitter = new EventEmitter();

      // First listener
      myEmitter.on('event', function firstListener() {
      console.log('Helloooo! first listener');
      });
      // Second listener
      myEmitter.on('event', function secondListener(arg1, arg2) {
      console.log(`event with parameters ${arg1}, ${arg2} in second listener`);
      });
      // Third listener
      myEmitter.on('event', function thirdListener(...args) {
      const parameters = args.join(', ');
      console.log(`event with parameters ${parameters} in third listener`);
      });

      console.log(myEmitter.listeners('event'));

      myEmitter.emit('event', 1, 2, 3, 4, 5);

      // Prints:
      // [
      // [Function: firstListener],
      // [Function: secondListener],
      // [Function: thirdListener]
      // ]
      // Helloooo! first listener
      // event with parameters 1, 2 in second listener
      // event with parameters 1, 2, 3, 4, 5 in third listener @@ -157,12 +157,15 @@

    Returns Promise<void>

    • Will be removed in a future release. Use for await...of instead.
    -
    • Check if there is any document still available in the cursor.

      +

      Do not call this method while a previous hasNext(), next() or tryNext() call on the same +cursor is still pending. Overlapping calls are not supported.

      +

      Returns Promise<boolean>

    • Set a maxTimeMS on the cursor query, allowing for hard timeout limits on queries (Only supported on MongoDB 2.6 or higher)

      Parameters

      • value: number

        Number of milliseconds to wait before aborting the query.

        -

      Returns this

    • Get the next available document from the cursor, returns null if no more documents are available.

      -

      Returns Promise<null | {
          name: string;
      }>

    • Alias for emitter.removeListener().

      +

    Returns this

    • Get the next available document from the cursor, returns null if no more documents are available.

      +

      Do not call this method while a previous hasNext(), next() or tryNext() call on the same +cursor is still pending. Overlapping calls are not supported.

      +

      Returns Promise<null | {
          name: string;
      }>

    • Rewind this cursor to its uninitialized state. Any options that are present on the cursor will remain in effect. Iterating this cursor will cause new queries to be sent to the server, even if the resultant data has already been retrieved by this cursor.

      -

      Returns void

    • By default EventEmitters will print a warning if more than 10 listeners are added for a particular event. This is a useful default that helps finding memory leaks. The emitter.setMaxListeners() method allows the limit to be modified for this specific EventEmitter instance. The value can be set to Infinity (or 0) to indicate an unlimited number of listeners.

      @@ -460,16 +465,18 @@
    • Returns an array of documents. The caller is responsible for making sure that there is enough memory to store the results. Note that the array only contains partial results when this cursor had been previously accessed. In that case, cursor.rewind() can be used to reset the cursor.

      -

      Returns Promise<{
          name: string;
      }[]>

    • Try to get the next available document from the cursor or null if an empty batch is returned

      +

      Do not call this method while a previous hasNext(), next() or tryNext() call on the same +cursor is still pending. Overlapping calls are not supported.

      +

      Returns Promise<null | {
          name: string;
      }>

    • Listens once to the abort event on the provided signal.

      +

    Returns this

    Properties

    cause?: Error
    code?: string | number

    This is a number in MongoServerError and a string in MongoDriverError

    -
    connectionGeneration?: number
    message: string
    stack?: string
    topologyVersion?: TopologyVersion
    stackTraceLimit: number

    The Error.stackTraceLimit property specifies the number of stack frames +

    Properties

    cause?: Error
    code?: string | number

    This is a number in MongoServerError and a string in MongoDriverError

    +
    connectionGeneration?: number
    message: string
    stack?: string
    topologyVersion?: TopologyVersion
    stackTraceLimit: number

    The Error.stackTraceLimit property specifies the number of stack frames collected by a stack trace (whether generated by new Error().stack or Error.captureStackTrace(obj)).

    The default value is 10 but may be set to any valid JavaScript number. Changes @@ -27,10 +27,10 @@

    If set to a non-number value, or set to a negative number, stack traces will not capture any frames.

    Accessors

    • get errmsg(): string
    • Legacy name for server error responses

      -

      Returns string

    • get errorLabels(): string[]
    • Returns string[]

    • get name(): string
    • Returns string

    Methods

    • Checks the error to see if it has an error label

      +

      Returns string

    • get errorLabels(): string[]
    • Returns string[]

    • get name(): string
    • Returns string

    Methods

    • Checks the error to see if it has an error label

      Parameters

      • label: string

        The error label to check for

      Returns boolean

      returns true if the error has the provided error label

      -
    • Creates a .stack property on targetObject, which when accessed returns a string representing the location in the code at which Error.captureStackTrace() was called.

      const myObject = {};
      Error.captureStackTrace(myObject);
      myObject.stack; // Similar to `new Error().stack` diff --git a/docs/Next/classes/MongoAWSError.html b/docs/Next/classes/MongoAWSError.html index 8dbcaaf947b..1abcd5e5a17 100644 --- a/docs/Next/classes/MongoAWSError.html +++ b/docs/Next/classes/MongoAWSError.html @@ -1,6 +1,6 @@ MongoAWSError | mongodb

      Class MongoAWSError

      A error generated when the user attempts to authenticate via AWS, but fails

      -

      Hierarchy (view full)

      Constructors

      Hierarchy (view full)

      Constructors

      Properties

      cause? code? connectionGeneration? @@ -19,8 +19,8 @@

      Meant for internal use only.

      Parameters

      • message: string
      • Optionaloptions: {
            cause?: Error;
        }
        • Optionalcause?: Error

      Returns MongoAWSError

      This class is only meant to be constructed within the driver. This constructor is not subject to semantic versioning compatibility guarantees and may change at any time.

      -

    Properties

    cause?: Error
    code?: string | number

    This is a number in MongoServerError and a string in MongoDriverError

    -
    connectionGeneration?: number
    message: string
    stack?: string
    topologyVersion?: TopologyVersion
    stackTraceLimit: number

    The Error.stackTraceLimit property specifies the number of stack frames +

    Properties

    cause?: Error
    code?: string | number

    This is a number in MongoServerError and a string in MongoDriverError

    +
    connectionGeneration?: number
    message: string
    stack?: string
    topologyVersion?: TopologyVersion
    stackTraceLimit: number

    The Error.stackTraceLimit property specifies the number of stack frames collected by a stack trace (whether generated by new Error().stack or Error.captureStackTrace(obj)).

    The default value is 10 but may be set to any valid JavaScript number. Changes @@ -28,10 +28,10 @@

    If set to a non-number value, or set to a negative number, stack traces will not capture any frames.

    Accessors

    • get errmsg(): string
    • Legacy name for server error responses

      -

      Returns string

    • get errorLabels(): string[]
    • Returns string[]

    • get name(): string
    • Returns string

    Methods

    • Checks the error to see if it has an error label

      +

      Returns string

    • get errorLabels(): string[]
    • Returns string[]

    • get name(): string
    • Returns string

    Methods

    • Checks the error to see if it has an error label

      Parameters

      • label: string

        The error label to check for

      Returns boolean

      returns true if the error has the provided error label

      -
    • Creates a .stack property on targetObject, which when accessed returns a string representing the location in the code at which Error.captureStackTrace() was called.

      const myObject = {};
      Error.captureStackTrace(myObject);
      myObject.stack; // Similar to `new Error().stack` diff --git a/docs/Next/classes/MongoAzureError.html b/docs/Next/classes/MongoAzureError.html index fe9af0d73c4..e962f43e9aa 100644 --- a/docs/Next/classes/MongoAzureError.html +++ b/docs/Next/classes/MongoAzureError.html @@ -1,6 +1,6 @@ MongoAzureError | mongodb

      Class MongoAzureError

      A error generated when the user attempts to authenticate via Azure, but fails.

      -

      Hierarchy (view full)

      Constructors

      Hierarchy (view full)

      Constructors

      Properties

      cause? code? connectionGeneration? @@ -19,8 +19,8 @@

      Meant for internal use only.

      Parameters

      • message: string

      Returns MongoAzureError

      This class is only meant to be constructed within the driver. This constructor is not subject to semantic versioning compatibility guarantees and may change at any time.

      -

    Properties

    cause?: Error
    code?: string | number

    This is a number in MongoServerError and a string in MongoDriverError

    -
    connectionGeneration?: number
    message: string
    stack?: string
    topologyVersion?: TopologyVersion
    stackTraceLimit: number

    The Error.stackTraceLimit property specifies the number of stack frames +

    Properties

    cause?: Error
    code?: string | number

    This is a number in MongoServerError and a string in MongoDriverError

    +
    connectionGeneration?: number
    message: string
    stack?: string
    topologyVersion?: TopologyVersion
    stackTraceLimit: number

    The Error.stackTraceLimit property specifies the number of stack frames collected by a stack trace (whether generated by new Error().stack or Error.captureStackTrace(obj)).

    The default value is 10 but may be set to any valid JavaScript number. Changes @@ -28,10 +28,10 @@

    If set to a non-number value, or set to a negative number, stack traces will not capture any frames.

    Accessors

    • get errmsg(): string
    • Legacy name for server error responses

      -

      Returns string

    • get errorLabels(): string[]
    • Returns string[]

    • get name(): string
    • Returns string

    Methods

    • Checks the error to see if it has an error label

      +

      Returns string

    • get errorLabels(): string[]
    • Returns string[]

    • get name(): string
    • Returns string

    Methods

    • Checks the error to see if it has an error label

      Parameters

      • label: string

        The error label to check for

      Returns boolean

      returns true if the error has the provided error label

      -
    • Creates a .stack property on targetObject, which when accessed returns a string representing the location in the code at which Error.captureStackTrace() was called.

      const myObject = {};
      Error.captureStackTrace(myObject);
      myObject.stack; // Similar to `new Error().stack` diff --git a/docs/Next/classes/MongoBatchReExecutionError.html b/docs/Next/classes/MongoBatchReExecutionError.html index 68128177d85..c5d2eb196a3 100644 --- a/docs/Next/classes/MongoBatchReExecutionError.html +++ b/docs/Next/classes/MongoBatchReExecutionError.html @@ -1,6 +1,6 @@ MongoBatchReExecutionError | mongodb

      Class MongoBatchReExecutionError

      An error generated when a batch command is re-executed after one of the commands in the batch has failed

      -

      Hierarchy (view full)

      Constructors

      Hierarchy (view full)

      Constructors

      Properties

      cause? code? connectionGeneration? @@ -19,8 +19,8 @@

      Meant for internal use only.

      Parameters

      • message: string = 'This batch has already been executed, create new batch to execute'

      Returns MongoBatchReExecutionError

      This class is only meant to be constructed within the driver. This constructor is not subject to semantic versioning compatibility guarantees and may change at any time.

      -

    Properties

    cause?: Error
    code?: string | number

    This is a number in MongoServerError and a string in MongoDriverError

    -
    connectionGeneration?: number
    message: string
    stack?: string
    topologyVersion?: TopologyVersion
    stackTraceLimit: number

    The Error.stackTraceLimit property specifies the number of stack frames +

    Properties

    cause?: Error
    code?: string | number

    This is a number in MongoServerError and a string in MongoDriverError

    +
    connectionGeneration?: number
    message: string
    stack?: string
    topologyVersion?: TopologyVersion
    stackTraceLimit: number

    The Error.stackTraceLimit property specifies the number of stack frames collected by a stack trace (whether generated by new Error().stack or Error.captureStackTrace(obj)).

    The default value is 10 but may be set to any valid JavaScript number. Changes @@ -28,10 +28,10 @@

    If set to a non-number value, or set to a negative number, stack traces will not capture any frames.

    Accessors

    • get errmsg(): string
    • Legacy name for server error responses

      -

      Returns string

    • get errorLabels(): string[]
    • Returns string[]

    • get name(): string
    • Returns string

    Methods

    • Checks the error to see if it has an error label

      +

      Returns string

    • get errorLabels(): string[]
    • Returns string[]

    • get name(): string
    • Returns string

    Methods

    • Checks the error to see if it has an error label

      Parameters

      • label: string

        The error label to check for

      Returns boolean

      returns true if the error has the provided error label

      -
    • Creates a .stack property on targetObject, which when accessed returns a string representing the location in the code at which Error.captureStackTrace() was called.

      const myObject = {};
      Error.captureStackTrace(myObject);
      myObject.stack; // Similar to `new Error().stack` diff --git a/docs/Next/classes/MongoBulkWriteError.html b/docs/Next/classes/MongoBulkWriteError.html index ff82ca675ff..8e73e1209f1 100644 --- a/docs/Next/classes/MongoBulkWriteError.html +++ b/docs/Next/classes/MongoBulkWriteError.html @@ -33,9 +33,9 @@

      Meant for internal use only.

      Parameters

      Returns MongoBulkWriteError

      This class is only meant to be constructed within the driver. This constructor is not subject to semantic versioning compatibility guarantees and may change at any time.

      -

    Properties

    cause?: Error
    code?: string | number

    This is a number in MongoServerError and a string in MongoDriverError

    -
    codeName?: string
    connectionGeneration?: number
    errInfo?: Document
    errorResponse: ErrorDescription

    Raw error result document returned by server.

    -
    message: string
    ok?: number
    stack?: string
    topologyVersion?: TopologyVersion
    writeConcernError?: Document
    writeErrors: OneOrMore<WriteError> = []
    stackTraceLimit: number

    The Error.stackTraceLimit property specifies the number of stack frames +

    Properties

    cause?: Error
    code?: string | number

    This is a number in MongoServerError and a string in MongoDriverError

    +
    codeName?: string
    connectionGeneration?: number
    errInfo?: Document
    errorResponse: ErrorDescription

    Raw error result document returned by server.

    +
    message: string
    ok?: number
    stack?: string
    topologyVersion?: TopologyVersion
    writeConcernError?: Document
    writeErrors: OneOrMore<WriteError> = []
    stackTraceLimit: number

    The Error.stackTraceLimit property specifies the number of stack frames collected by a stack trace (whether generated by new Error().stack or Error.captureStackTrace(obj)).

    The default value is 10 but may be set to any valid JavaScript number. Changes @@ -44,16 +44,16 @@ not capture any frames.

    Accessors

    • get errmsg(): string
    • Legacy name for server error responses

      -

      Returns string

    • get errorLabels(): string[]
    • Returns string[]

    • get insertedCount(): number
    • Number of documents inserted.

      +

      Returns string

    • get errorLabels(): string[]
    • Returns string[]

    • get insertedIds(): {
          [key: number]: any;
      }
    • Inserted document generated Id's, hash key is the index of the originating operation

      Returns {
          [key: number]: any;
      }

      • [key: number]: any
    • get matchedCount(): number
    • Number of documents matched for update.

      Returns number

    • get upsertedIds(): {
          [key: number]: any;
      }
    • Upserted document generated Id's, hash key is the index of the originating operation

      -

      Returns {
          [key: number]: any;
      }

      • [key: number]: any

    Methods

    • Checks the error to see if it has an error label

      +

      Returns {
          [key: number]: any;
      }

      • [key: number]: any

    Methods

    • Checks the error to see if it has an error label

      Parameters

      • label: string

        The error label to check for

      Returns boolean

      returns true if the error has the provided error label

      -
    • Creates a .stack property on targetObject, which when accessed returns a string representing the location in the code at which Error.captureStackTrace() was called.

      const myObject = {};
      Error.captureStackTrace(myObject);
      myObject.stack; // Similar to `new Error().stack` diff --git a/docs/Next/classes/MongoChangeStreamError.html b/docs/Next/classes/MongoChangeStreamError.html index cee57fca2b8..205961eeb53 100644 --- a/docs/Next/classes/MongoChangeStreamError.html +++ b/docs/Next/classes/MongoChangeStreamError.html @@ -1,5 +1,5 @@ MongoChangeStreamError | mongodb

      Class MongoChangeStreamError

      An error generated when a ChangeStream operation fails to execute.

      -

      Hierarchy (view full)

      Constructors

      Hierarchy (view full)

      Constructors

      Properties

      cause? code? connectionGeneration? @@ -18,8 +18,8 @@

      Meant for internal use only.

      Parameters

      • message: string

      Returns MongoChangeStreamError

      This class is only meant to be constructed within the driver. This constructor is not subject to semantic versioning compatibility guarantees and may change at any time.

      -

    Properties

    cause?: Error
    code?: string | number

    This is a number in MongoServerError and a string in MongoDriverError

    -
    connectionGeneration?: number
    message: string
    stack?: string
    topologyVersion?: TopologyVersion
    stackTraceLimit: number

    The Error.stackTraceLimit property specifies the number of stack frames +

    Properties

    cause?: Error
    code?: string | number

    This is a number in MongoServerError and a string in MongoDriverError

    +
    connectionGeneration?: number
    message: string
    stack?: string
    topologyVersion?: TopologyVersion
    stackTraceLimit: number

    The Error.stackTraceLimit property specifies the number of stack frames collected by a stack trace (whether generated by new Error().stack or Error.captureStackTrace(obj)).

    The default value is 10 but may be set to any valid JavaScript number. Changes @@ -27,10 +27,10 @@

    If set to a non-number value, or set to a negative number, stack traces will not capture any frames.

    Accessors

    • get errmsg(): string
    • Legacy name for server error responses

      -

      Returns string

    • get errorLabels(): string[]
    • Returns string[]

    • get name(): string
    • Returns string

    Methods

    • Checks the error to see if it has an error label

      +

      Returns string

    • get errorLabels(): string[]
    • Returns string[]

    • get name(): string
    • Returns string

    Methods

    • Checks the error to see if it has an error label

      Parameters

      • label: string

        The error label to check for

      Returns boolean

      returns true if the error has the provided error label

      -
    • Creates a .stack property on targetObject, which when accessed returns a string representing the location in the code at which Error.captureStackTrace() was called.

      const myObject = {};
      Error.captureStackTrace(myObject);
      myObject.stack; // Similar to `new Error().stack` diff --git a/docs/Next/classes/MongoClientBulkWriteCursorError.html b/docs/Next/classes/MongoClientBulkWriteCursorError.html index 927f2eab281..825e9f671c7 100644 --- a/docs/Next/classes/MongoClientBulkWriteCursorError.html +++ b/docs/Next/classes/MongoClientBulkWriteCursorError.html @@ -1,5 +1,5 @@ MongoClientBulkWriteCursorError | mongodb

      Class MongoClientBulkWriteCursorError

      An error indicating that an error occurred when processing bulk write results.

      -

      Hierarchy (view full)

      Constructors

      Hierarchy (view full)

      Constructors

      Properties

      cause? code? connectionGeneration? @@ -18,8 +18,8 @@

      Meant for internal use only.

      Parameters

      • message: string

      Returns MongoClientBulkWriteCursorError

      This class is only meant to be constructed within the driver. This constructor is not subject to semantic versioning compatibility guarantees and may change at any time.

      -

    Properties

    cause?: Error
    code?: string | number

    This is a number in MongoServerError and a string in MongoDriverError

    -
    connectionGeneration?: number
    message: string
    stack?: string
    topologyVersion?: TopologyVersion
    stackTraceLimit: number

    The Error.stackTraceLimit property specifies the number of stack frames +

    Properties

    cause?: Error
    code?: string | number

    This is a number in MongoServerError and a string in MongoDriverError

    +
    connectionGeneration?: number
    message: string
    stack?: string
    topologyVersion?: TopologyVersion
    stackTraceLimit: number

    The Error.stackTraceLimit property specifies the number of stack frames collected by a stack trace (whether generated by new Error().stack or Error.captureStackTrace(obj)).

    The default value is 10 but may be set to any valid JavaScript number. Changes @@ -27,10 +27,10 @@

    If set to a non-number value, or set to a negative number, stack traces will not capture any frames.

    Accessors

    • get errmsg(): string
    • Legacy name for server error responses

      -

      Returns string

    • get errorLabels(): string[]
    • Returns string[]

    • get name(): string
    • Returns string

    Methods

    • Checks the error to see if it has an error label

      +

      Returns string

    • get errorLabels(): string[]
    • Returns string[]

    • get name(): string
    • Returns string

    Methods

    • Checks the error to see if it has an error label

      Parameters

      • label: string

        The error label to check for

      Returns boolean

      returns true if the error has the provided error label

      -

    Returns MongoClientBulkWriteError

    Properties

    cause?: Error
    code?: string | number

    This is a number in MongoServerError and a string in MongoDriverError

    +
    codeName?: string
    connectionGeneration?: number
    errInfo?: Document
    errorResponse: ErrorDescription

    Raw error result document returned by server.

    +
    message: string
    ok?: number
    partialResult?: ClientBulkWriteResult

    The results of any successful operations that were performed before the error was encountered.

    -
    stack?: string
    topologyVersion?: TopologyVersion
    writeConcernError?: Document
    writeConcernErrors: Document[]

    Write concern errors that occurred while executing the bulk write. This list may have +

    stack?: string
    topologyVersion?: TopologyVersion
    writeConcernError?: Document
    writeConcernErrors: Document[]

    Write concern errors that occurred while executing the bulk write. This list may have multiple items if more than one server command was required to execute the bulk write.

    -
    writeErrors: Map<number, ClientBulkWriteError>

    Errors that occurred during the execution of individual write operations. This map will +

    writeErrors: Map<number, ClientBulkWriteError>

    Errors that occurred during the execution of individual write operations. This map will contain at most one entry if the bulk write was ordered.

    -
    stackTraceLimit: number

    The Error.stackTraceLimit property specifies the number of stack frames +

    stackTraceLimit: number

    The Error.stackTraceLimit property specifies the number of stack frames collected by a stack trace (whether generated by new Error().stack or Error.captureStackTrace(obj)).

    The default value is 10 but may be set to any valid JavaScript number. Changes @@ -40,10 +40,10 @@

    If set to a non-number value, or set to a negative number, stack traces will not capture any frames.

    Accessors

    • get errmsg(): string
    • Legacy name for server error responses

      -

      Returns string

    • get errorLabels(): string[]
    • Returns string[]

    • get name(): string
    • Returns string

    Methods

    • Checks the error to see if it has an error label

      +

      Returns string

    • get errorLabels(): string[]
    • Returns string[]

    • get name(): string
    • Returns string

    Methods

    • Checks the error to see if it has an error label

      Parameters

      • label: string

        The error label to check for

      Returns boolean

      returns true if the error has the provided error label

      -
    • Creates a .stack property on targetObject, which when accessed returns a string representing the location in the code at which Error.captureStackTrace() was called.

      const myObject = {};
      Error.captureStackTrace(myObject);
      myObject.stack; // Similar to `new Error().stack` diff --git a/docs/Next/classes/MongoClientBulkWriteExecutionError.html b/docs/Next/classes/MongoClientBulkWriteExecutionError.html index 1a4d1ae1b74..b80838cfca0 100644 --- a/docs/Next/classes/MongoClientBulkWriteExecutionError.html +++ b/docs/Next/classes/MongoClientBulkWriteExecutionError.html @@ -1,5 +1,5 @@ MongoClientBulkWriteExecutionError | mongodb

      Class MongoClientBulkWriteExecutionError

      An error indicating that an error occurred on the client when executing a client bulk write.

      -

      Hierarchy (view full)

      Constructors

      Hierarchy (view full)

      Constructors

      Properties

      cause? code? connectionGeneration? @@ -18,8 +18,8 @@

      Meant for internal use only.

      Parameters

      • message: string

      Returns MongoClientBulkWriteExecutionError

      This class is only meant to be constructed within the driver. This constructor is not subject to semantic versioning compatibility guarantees and may change at any time.

      -

    Properties

    cause?: Error
    code?: string | number

    This is a number in MongoServerError and a string in MongoDriverError

    -
    connectionGeneration?: number
    message: string
    stack?: string
    topologyVersion?: TopologyVersion
    stackTraceLimit: number

    The Error.stackTraceLimit property specifies the number of stack frames +

    Properties

    cause?: Error
    code?: string | number

    This is a number in MongoServerError and a string in MongoDriverError

    +
    connectionGeneration?: number
    message: string
    stack?: string
    topologyVersion?: TopologyVersion
    stackTraceLimit: number

    The Error.stackTraceLimit property specifies the number of stack frames collected by a stack trace (whether generated by new Error().stack or Error.captureStackTrace(obj)).

    The default value is 10 but may be set to any valid JavaScript number. Changes @@ -27,10 +27,10 @@

    If set to a non-number value, or set to a negative number, stack traces will not capture any frames.

    Accessors

    • get errmsg(): string
    • Legacy name for server error responses

      -

      Returns string

    • get errorLabels(): string[]
    • Returns string[]

    • get name(): string
    • Returns string

    Methods

    • Checks the error to see if it has an error label

      +

      Returns string

    • get errorLabels(): string[]
    • Returns string[]

    • get name(): string
    • Returns string

    Methods

    • Checks the error to see if it has an error label

      Parameters

      • label: string

        The error label to check for

      Returns boolean

      returns true if the error has the provided error label

      -
    • Creates a .stack property on targetObject, which when accessed returns a string representing the location in the code at which Error.captureStackTrace() was called.

      const myObject = {};
      Error.captureStackTrace(myObject);
      myObject.stack; // Similar to `new Error().stack` diff --git a/docs/Next/classes/MongoClientClosedError.html b/docs/Next/classes/MongoClientClosedError.html index 504fb6dcd4f..83b9abac212 100644 --- a/docs/Next/classes/MongoClientClosedError.html +++ b/docs/Next/classes/MongoClientClosedError.html @@ -1,6 +1,6 @@ MongoClientClosedError | mongodb

      Class MongoClientClosedError

      An error generated when the MongoClient is closed and async operations are interrupted.

      -

      Hierarchy (view full)

      Constructors

      Hierarchy (view full)

      Constructors

      Properties

      cause? code? connectionGeneration? @@ -19,8 +19,8 @@

      Meant for internal use only.

      Returns MongoClientClosedError

      This class is only meant to be constructed within the driver. This constructor is not subject to semantic versioning compatibility guarantees and may change at any time.

      -

    Properties

    cause?: Error
    code?: string | number

    This is a number in MongoServerError and a string in MongoDriverError

    -
    connectionGeneration?: number
    message: string
    stack?: string
    topologyVersion?: TopologyVersion
    stackTraceLimit: number

    The Error.stackTraceLimit property specifies the number of stack frames +

    Properties

    cause?: Error
    code?: string | number

    This is a number in MongoServerError and a string in MongoDriverError

    +
    connectionGeneration?: number
    message: string
    stack?: string
    topologyVersion?: TopologyVersion
    stackTraceLimit: number

    The Error.stackTraceLimit property specifies the number of stack frames collected by a stack trace (whether generated by new Error().stack or Error.captureStackTrace(obj)).

    The default value is 10 but may be set to any valid JavaScript number. Changes @@ -28,10 +28,10 @@

    If set to a non-number value, or set to a negative number, stack traces will not capture any frames.

    Accessors

    • get errmsg(): string
    • Legacy name for server error responses

      -

      Returns string

    • get errorLabels(): string[]
    • Returns string[]

    • get name(): string
    • Returns string

    Methods

    • Checks the error to see if it has an error label

      +

      Returns string

    • get errorLabels(): string[]
    • Returns string[]

    • get name(): string
    • Returns string

    Methods

    • Checks the error to see if it has an error label

      Parameters

      • label: string

        The error label to check for

      Returns boolean

      returns true if the error has the provided error label

      -
    • Creates a .stack property on targetObject, which when accessed returns a string representing the location in the code at which Error.captureStackTrace() was called.

      const myObject = {};
      Error.captureStackTrace(myObject);
      myObject.stack; // Similar to `new Error().stack` diff --git a/docs/Next/classes/MongoCompatibilityError.html b/docs/Next/classes/MongoCompatibilityError.html index 9d4ebaf305d..1e51f98527b 100644 --- a/docs/Next/classes/MongoCompatibilityError.html +++ b/docs/Next/classes/MongoCompatibilityError.html @@ -1,6 +1,6 @@ MongoCompatibilityError | mongodb

      Class MongoCompatibilityError

      An error generated when a feature that is not enabled or allowed for the current server configuration is used

      -

      Hierarchy (view full)

      Constructors

      Hierarchy (view full)

      Constructors

      Properties

      cause? code? connectionGeneration? @@ -19,8 +19,8 @@

      Meant for internal use only.

      Parameters

      • message: string

      Returns MongoCompatibilityError

      This class is only meant to be constructed within the driver. This constructor is not subject to semantic versioning compatibility guarantees and may change at any time.

      -

    Properties

    cause?: Error
    code?: string | number

    This is a number in MongoServerError and a string in MongoDriverError

    -
    connectionGeneration?: number
    message: string
    stack?: string
    topologyVersion?: TopologyVersion
    stackTraceLimit: number

    The Error.stackTraceLimit property specifies the number of stack frames +

    Properties

    cause?: Error
    code?: string | number

    This is a number in MongoServerError and a string in MongoDriverError

    +
    connectionGeneration?: number
    message: string
    stack?: string
    topologyVersion?: TopologyVersion
    stackTraceLimit: number

    The Error.stackTraceLimit property specifies the number of stack frames collected by a stack trace (whether generated by new Error().stack or Error.captureStackTrace(obj)).

    The default value is 10 but may be set to any valid JavaScript number. Changes @@ -28,10 +28,10 @@

    If set to a non-number value, or set to a negative number, stack traces will not capture any frames.

    Accessors

    • get errmsg(): string
    • Legacy name for server error responses

      -

      Returns string

    • get errorLabels(): string[]
    • Returns string[]

    • get name(): string
    • Returns string

    Methods

    • Checks the error to see if it has an error label

      +

      Returns string

    • get errorLabels(): string[]
    • Returns string[]

    • get name(): string
    • Returns string

    Methods

    • Checks the error to see if it has an error label

      Parameters

      • label: string

        The error label to check for

      Returns boolean

      returns true if the error has the provided error label

      -
    • Creates a .stack property on targetObject, which when accessed returns a string representing the location in the code at which Error.captureStackTrace() was called.

      const myObject = {};
      Error.captureStackTrace(myObject);
      myObject.stack; // Similar to `new Error().stack` diff --git a/docs/Next/classes/MongoCredentials.html b/docs/Next/classes/MongoCredentials.html index f59bfa71817..d0d2c546e49 100644 --- a/docs/Next/classes/MongoCredentials.html +++ b/docs/Next/classes/MongoCredentials.html @@ -18,4 +18,4 @@

      Parameters

      Returns boolean

    +

    Returns MongoCredentials

    diff --git a/docs/Next/classes/MongoCryptAzureKMSRequestError.html b/docs/Next/classes/MongoCryptAzureKMSRequestError.html index d6f5ddeedec..9cc83e09117 100644 --- a/docs/Next/classes/MongoCryptAzureKMSRequestError.html +++ b/docs/Next/classes/MongoCryptAzureKMSRequestError.html @@ -20,8 +20,8 @@

    Parameters

    Returns MongoCryptAzureKMSRequestError

    This class is only meant to be constructed within the driver. This constructor is not subject to semantic versioning compatibility guarantees and may change at any time.

    Properties

    body?: Document

    The body of the http response that failed, if present.

    -
    cause?: Error
    code?: string | number

    This is a number in MongoServerError and a string in MongoDriverError

    -
    connectionGeneration?: number
    message: string
    stack?: string
    topologyVersion?: TopologyVersion
    stackTraceLimit: number

    The Error.stackTraceLimit property specifies the number of stack frames +

    cause?: Error
    code?: string | number

    This is a number in MongoServerError and a string in MongoDriverError

    +
    connectionGeneration?: number
    message: string
    stack?: string
    topologyVersion?: TopologyVersion
    stackTraceLimit: number

    The Error.stackTraceLimit property specifies the number of stack frames collected by a stack trace (whether generated by new Error().stack or Error.captureStackTrace(obj)).

    The default value is 10 but may be set to any valid JavaScript number. Changes @@ -29,10 +29,10 @@

    If set to a non-number value, or set to a negative number, stack traces will not capture any frames.

    Accessors

    • get errmsg(): string
    • Legacy name for server error responses

      -

      Returns string

    • get errorLabels(): string[]
    • Returns string[]

    Methods

    • Checks the error to see if it has an error label

      +

      Returns string

    • get errorLabels(): string[]
    • Returns string[]

    Methods

    • Checks the error to see if it has an error label

      Parameters

      • label: string

        The error label to check for

      Returns boolean

      returns true if the error has the provided error label

      -
    • Creates a .stack property on targetObject, which when accessed returns a string representing the location in the code at which Error.captureStackTrace() was called.

      const myObject = {};
      Error.captureStackTrace(myObject);
      myObject.stack; // Similar to `new Error().stack` diff --git a/docs/Next/classes/MongoCryptCreateDataKeyError.html b/docs/Next/classes/MongoCryptCreateDataKeyError.html index 14a569ed451..df1d01e317f 100644 --- a/docs/Next/classes/MongoCryptCreateDataKeyError.html +++ b/docs/Next/classes/MongoCryptCreateDataKeyError.html @@ -19,8 +19,8 @@

      Meant for internal use only.

      Parameters

      • encryptedFields: Document
      • __namedParameters: {
            cause: Error;
        }
        • cause: Error

      Returns MongoCryptCreateDataKeyError

      This class is only meant to be constructed within the driver. This constructor is not subject to semantic versioning compatibility guarantees and may change at any time.

      -

    Properties

    cause?: Error
    code?: string | number

    This is a number in MongoServerError and a string in MongoDriverError

    -
    connectionGeneration?: number
    encryptedFields: Document
    message: string
    stack?: string
    topologyVersion?: TopologyVersion
    stackTraceLimit: number

    The Error.stackTraceLimit property specifies the number of stack frames +

    Properties

    cause?: Error
    code?: string | number

    This is a number in MongoServerError and a string in MongoDriverError

    +
    connectionGeneration?: number
    encryptedFields: Document
    message: string
    stack?: string
    topologyVersion?: TopologyVersion
    stackTraceLimit: number

    The Error.stackTraceLimit property specifies the number of stack frames collected by a stack trace (whether generated by new Error().stack or Error.captureStackTrace(obj)).

    The default value is 10 but may be set to any valid JavaScript number. Changes @@ -28,10 +28,10 @@

    If set to a non-number value, or set to a negative number, stack traces will not capture any frames.

    Accessors

    • get errmsg(): string
    • Legacy name for server error responses

      -

      Returns string

    • get errorLabels(): string[]
    • Returns string[]

    Methods

    • Checks the error to see if it has an error label

      +

      Returns string

    • get errorLabels(): string[]
    • Returns string[]

    Methods

    • Checks the error to see if it has an error label

      Parameters

      • label: string

        The error label to check for

      Returns boolean

      returns true if the error has the provided error label

      -
    • Creates a .stack property on targetObject, which when accessed returns a string representing the location in the code at which Error.captureStackTrace() was called.

      const myObject = {};
      Error.captureStackTrace(myObject);
      myObject.stack; // Similar to `new Error().stack` diff --git a/docs/Next/classes/MongoCryptCreateEncryptedCollectionError.html b/docs/Next/classes/MongoCryptCreateEncryptedCollectionError.html index 70e7ee23923..84fb946af04 100644 --- a/docs/Next/classes/MongoCryptCreateEncryptedCollectionError.html +++ b/docs/Next/classes/MongoCryptCreateEncryptedCollectionError.html @@ -19,8 +19,8 @@

      Meant for internal use only.

      Parameters

      • encryptedFields: Document
      • __namedParameters: {
            cause: Error;
        }
        • cause: Error

      Returns MongoCryptCreateEncryptedCollectionError

      This class is only meant to be constructed within the driver. This constructor is not subject to semantic versioning compatibility guarantees and may change at any time.

      -

    Properties

    cause?: Error
    code?: string | number

    This is a number in MongoServerError and a string in MongoDriverError

    -
    connectionGeneration?: number
    encryptedFields: Document
    message: string
    stack?: string
    topologyVersion?: TopologyVersion
    stackTraceLimit: number

    The Error.stackTraceLimit property specifies the number of stack frames +

    Properties

    cause?: Error
    code?: string | number

    This is a number in MongoServerError and a string in MongoDriverError

    +
    connectionGeneration?: number
    encryptedFields: Document
    message: string
    stack?: string
    topologyVersion?: TopologyVersion
    stackTraceLimit: number

    The Error.stackTraceLimit property specifies the number of stack frames collected by a stack trace (whether generated by new Error().stack or Error.captureStackTrace(obj)).

    The default value is 10 but may be set to any valid JavaScript number. Changes @@ -28,10 +28,10 @@

    If set to a non-number value, or set to a negative number, stack traces will not capture any frames.

    Accessors

    • get errmsg(): string
    • Legacy name for server error responses

      -

      Returns string

    • get errorLabels(): string[]
    • Returns string[]

    Methods

    • Checks the error to see if it has an error label

      +

      Returns string

    • get errorLabels(): string[]
    • Returns string[]

    Methods

    • Checks the error to see if it has an error label

      Parameters

      • label: string

        The error label to check for

      Returns boolean

      returns true if the error has the provided error label

      -
    • Creates a .stack property on targetObject, which when accessed returns a string representing the location in the code at which Error.captureStackTrace() was called.

      const myObject = {};
      Error.captureStackTrace(myObject);
      myObject.stack; // Similar to `new Error().stack` diff --git a/docs/Next/classes/MongoCryptError.html b/docs/Next/classes/MongoCryptError.html index 3a760007d3a..f85498c2f5a 100644 --- a/docs/Next/classes/MongoCryptError.html +++ b/docs/Next/classes/MongoCryptError.html @@ -18,8 +18,8 @@

      Meant for internal use only.

      Parameters

      • message: string
      • options: {
            cause?: Error;
        } = {}
        • Optionalcause?: Error

      Returns MongoCryptError

      This class is only meant to be constructed within the driver. This constructor is not subject to semantic versioning compatibility guarantees and may change at any time.

      -

    Properties

    cause?: Error
    code?: string | number

    This is a number in MongoServerError and a string in MongoDriverError

    -
    connectionGeneration?: number
    message: string
    stack?: string
    topologyVersion?: TopologyVersion
    stackTraceLimit: number

    The Error.stackTraceLimit property specifies the number of stack frames +

    Properties

    cause?: Error
    code?: string | number

    This is a number in MongoServerError and a string in MongoDriverError

    +
    connectionGeneration?: number
    message: string
    stack?: string
    topologyVersion?: TopologyVersion
    stackTraceLimit: number

    The Error.stackTraceLimit property specifies the number of stack frames collected by a stack trace (whether generated by new Error().stack or Error.captureStackTrace(obj)).

    The default value is 10 but may be set to any valid JavaScript number. Changes @@ -27,10 +27,10 @@

    If set to a non-number value, or set to a negative number, stack traces will not capture any frames.

    Accessors

    • get errmsg(): string
    • Legacy name for server error responses

      -

      Returns string

    • get errorLabels(): string[]
    • Returns string[]

    Methods

    • Checks the error to see if it has an error label

      +

      Returns string

    • get errorLabels(): string[]
    • Returns string[]

    Methods

    • Checks the error to see if it has an error label

      Parameters

      • label: string

        The error label to check for

      Returns boolean

      returns true if the error has the provided error label

      -
    • Creates a .stack property on targetObject, which when accessed returns a string representing the location in the code at which Error.captureStackTrace() was called.

      const myObject = {};
      Error.captureStackTrace(myObject);
      myObject.stack; // Similar to `new Error().stack` diff --git a/docs/Next/classes/MongoCryptInvalidArgumentError.html b/docs/Next/classes/MongoCryptInvalidArgumentError.html index faa1a017f4d..a5a82384393 100644 --- a/docs/Next/classes/MongoCryptInvalidArgumentError.html +++ b/docs/Next/classes/MongoCryptInvalidArgumentError.html @@ -18,8 +18,8 @@

      Meant for internal use only.

      Parameters

      • message: string

      Returns MongoCryptInvalidArgumentError

      This class is only meant to be constructed within the driver. This constructor is not subject to semantic versioning compatibility guarantees and may change at any time.

      -

    Properties

    cause?: Error
    code?: string | number

    This is a number in MongoServerError and a string in MongoDriverError

    -
    connectionGeneration?: number
    message: string
    stack?: string
    topologyVersion?: TopologyVersion
    stackTraceLimit: number

    The Error.stackTraceLimit property specifies the number of stack frames +

    Properties

    cause?: Error
    code?: string | number

    This is a number in MongoServerError and a string in MongoDriverError

    +
    connectionGeneration?: number
    message: string
    stack?: string
    topologyVersion?: TopologyVersion
    stackTraceLimit: number

    The Error.stackTraceLimit property specifies the number of stack frames collected by a stack trace (whether generated by new Error().stack or Error.captureStackTrace(obj)).

    The default value is 10 but may be set to any valid JavaScript number. Changes @@ -27,10 +27,10 @@

    If set to a non-number value, or set to a negative number, stack traces will not capture any frames.

    Accessors

    • get errmsg(): string
    • Legacy name for server error responses

      -

      Returns string

    • get errorLabels(): string[]
    • Returns string[]

    Methods

    • Checks the error to see if it has an error label

      +

      Returns string

    • get errorLabels(): string[]
    • Returns string[]

    Methods

    • Checks the error to see if it has an error label

      Parameters

      • label: string

        The error label to check for

      Returns boolean

      returns true if the error has the provided error label

      -
    • Creates a .stack property on targetObject, which when accessed returns a string representing the location in the code at which Error.captureStackTrace() was called.

      const myObject = {};
      Error.captureStackTrace(myObject);
      myObject.stack; // Similar to `new Error().stack` diff --git a/docs/Next/classes/MongoCryptKMSRequestNetworkTimeoutError.html b/docs/Next/classes/MongoCryptKMSRequestNetworkTimeoutError.html index edc82debf3a..76ce09c8bbd 100644 --- a/docs/Next/classes/MongoCryptKMSRequestNetworkTimeoutError.html +++ b/docs/Next/classes/MongoCryptKMSRequestNetworkTimeoutError.html @@ -17,8 +17,8 @@

      Meant for internal use only.

      Parameters

      • message: string
      • options: {
            cause?: Error;
        } = {}
        • Optionalcause?: Error

      Returns MongoCryptKMSRequestNetworkTimeoutError

      This class is only meant to be constructed within the driver. This constructor is not subject to semantic versioning compatibility guarantees and may change at any time.

      -

    Properties

    cause?: Error
    code?: string | number

    This is a number in MongoServerError and a string in MongoDriverError

    -
    connectionGeneration?: number
    message: string
    stack?: string
    topologyVersion?: TopologyVersion
    stackTraceLimit: number

    The Error.stackTraceLimit property specifies the number of stack frames +

    Properties

    cause?: Error
    code?: string | number

    This is a number in MongoServerError and a string in MongoDriverError

    +
    connectionGeneration?: number
    message: string
    stack?: string
    topologyVersion?: TopologyVersion
    stackTraceLimit: number

    The Error.stackTraceLimit property specifies the number of stack frames collected by a stack trace (whether generated by new Error().stack or Error.captureStackTrace(obj)).

    The default value is 10 but may be set to any valid JavaScript number. Changes @@ -26,10 +26,10 @@

    If set to a non-number value, or set to a negative number, stack traces will not capture any frames.

    Accessors

    • get errmsg(): string
    • Legacy name for server error responses

      -

      Returns string

    • get errorLabels(): string[]
    • Returns string[]

    Methods

    • Checks the error to see if it has an error label

      +

      Returns string

    • get errorLabels(): string[]
    • Returns string[]

    Methods

    • Checks the error to see if it has an error label

      Parameters

      • label: string

        The error label to check for

      Returns boolean

      returns true if the error has the provided error label

      -
    • Creates a .stack property on targetObject, which when accessed returns a string representing the location in the code at which Error.captureStackTrace() was called.

      const myObject = {};
      Error.captureStackTrace(myObject);
      myObject.stack; // Similar to `new Error().stack` diff --git a/docs/Next/classes/MongoCursorExhaustedError.html b/docs/Next/classes/MongoCursorExhaustedError.html index 8c193e28532..eba7f72d5e7 100644 --- a/docs/Next/classes/MongoCursorExhaustedError.html +++ b/docs/Next/classes/MongoCursorExhaustedError.html @@ -1,5 +1,5 @@ MongoCursorExhaustedError | mongodb

      Class MongoCursorExhaustedError

      An error thrown when an attempt is made to read from a cursor that has been exhausted

      -

      Hierarchy (view full)

      Constructors

      Hierarchy (view full)

      Constructors

      Properties

      cause? code? connectionGeneration? @@ -18,8 +18,8 @@

      Meant for internal use only.

      Parameters

      • Optionalmessage: string

      Returns MongoCursorExhaustedError

      This class is only meant to be constructed within the driver. This constructor is not subject to semantic versioning compatibility guarantees and may change at any time.

      -

    Properties

    cause?: Error
    code?: string | number

    This is a number in MongoServerError and a string in MongoDriverError

    -
    connectionGeneration?: number
    message: string
    stack?: string
    topologyVersion?: TopologyVersion
    stackTraceLimit: number

    The Error.stackTraceLimit property specifies the number of stack frames +

    Properties

    cause?: Error
    code?: string | number

    This is a number in MongoServerError and a string in MongoDriverError

    +
    connectionGeneration?: number
    message: string
    stack?: string
    topologyVersion?: TopologyVersion
    stackTraceLimit: number

    The Error.stackTraceLimit property specifies the number of stack frames collected by a stack trace (whether generated by new Error().stack or Error.captureStackTrace(obj)).

    The default value is 10 but may be set to any valid JavaScript number. Changes @@ -27,10 +27,10 @@

    If set to a non-number value, or set to a negative number, stack traces will not capture any frames.

    Accessors

    • get errmsg(): string
    • Legacy name for server error responses

      -

      Returns string

    • get errorLabels(): string[]
    • Returns string[]

    • get name(): string
    • Returns string

    Methods

    • Checks the error to see if it has an error label

      +

      Returns string

    • get errorLabels(): string[]
    • Returns string[]

    • get name(): string
    • Returns string

    Methods

    • Checks the error to see if it has an error label

      Parameters

      • label: string

        The error label to check for

      Returns boolean

      returns true if the error has the provided error label

      -
    • Creates a .stack property on targetObject, which when accessed returns a string representing the location in the code at which Error.captureStackTrace() was called.

      const myObject = {};
      Error.captureStackTrace(myObject);
      myObject.stack; // Similar to `new Error().stack` diff --git a/docs/Next/classes/MongoCursorInUseError.html b/docs/Next/classes/MongoCursorInUseError.html index a6b99ac03ea..3cb383e5b10 100644 --- a/docs/Next/classes/MongoCursorInUseError.html +++ b/docs/Next/classes/MongoCursorInUseError.html @@ -1,6 +1,6 @@ MongoCursorInUseError | mongodb

      Class MongoCursorInUseError

      An error thrown when the user attempts to add options to a cursor that has already been initialized

      -

      Hierarchy (view full)

      Constructors

      Hierarchy (view full)

      Constructors

      Properties

      cause? code? connectionGeneration? @@ -19,8 +19,8 @@

      Meant for internal use only.

      Parameters

      • message: string = 'Cursor is already initialized'

      Returns MongoCursorInUseError

      This class is only meant to be constructed within the driver. This constructor is not subject to semantic versioning compatibility guarantees and may change at any time.

      -

    Properties

    cause?: Error
    code?: string | number

    This is a number in MongoServerError and a string in MongoDriverError

    -
    connectionGeneration?: number
    message: string
    stack?: string
    topologyVersion?: TopologyVersion
    stackTraceLimit: number

    The Error.stackTraceLimit property specifies the number of stack frames +

    Properties

    cause?: Error
    code?: string | number

    This is a number in MongoServerError and a string in MongoDriverError

    +
    connectionGeneration?: number
    message: string
    stack?: string
    topologyVersion?: TopologyVersion
    stackTraceLimit: number

    The Error.stackTraceLimit property specifies the number of stack frames collected by a stack trace (whether generated by new Error().stack or Error.captureStackTrace(obj)).

    The default value is 10 but may be set to any valid JavaScript number. Changes @@ -28,10 +28,10 @@

    If set to a non-number value, or set to a negative number, stack traces will not capture any frames.

    Accessors

    • get errmsg(): string
    • Legacy name for server error responses

      -

      Returns string

    • get errorLabels(): string[]
    • Returns string[]

    • get name(): string
    • Returns string

    Methods

    • Checks the error to see if it has an error label

      +

      Returns string

    • get errorLabels(): string[]
    • Returns string[]

    • get name(): string
    • Returns string

    Methods

    • Checks the error to see if it has an error label

      Parameters

      • label: string

        The error label to check for

      Returns boolean

      returns true if the error has the provided error label

      -
    • Creates a .stack property on targetObject, which when accessed returns a string representing the location in the code at which Error.captureStackTrace() was called.

      const myObject = {};
      Error.captureStackTrace(myObject);
      myObject.stack; // Similar to `new Error().stack` diff --git a/docs/Next/classes/MongoDecompressionError.html b/docs/Next/classes/MongoDecompressionError.html index bee3cd97b5d..8ef6799d090 100644 --- a/docs/Next/classes/MongoDecompressionError.html +++ b/docs/Next/classes/MongoDecompressionError.html @@ -1,6 +1,6 @@ MongoDecompressionError | mongodb

      Class MongoDecompressionError

      An error generated when the driver fails to decompress data received from the server.

      -

      Hierarchy (view full)

      Constructors

      Hierarchy (view full)

      Constructors

      Properties

      cause? code? connectionGeneration? @@ -19,8 +19,8 @@

      Meant for internal use only.

      Parameters

      • message: string

      Returns MongoDecompressionError

      This class is only meant to be constructed within the driver. This constructor is not subject to semantic versioning compatibility guarantees and may change at any time.

      -

    Properties

    cause?: Error
    code?: string | number

    This is a number in MongoServerError and a string in MongoDriverError

    -
    connectionGeneration?: number
    message: string
    stack?: string
    topologyVersion?: TopologyVersion
    stackTraceLimit: number

    The Error.stackTraceLimit property specifies the number of stack frames +

    Properties

    cause?: Error
    code?: string | number

    This is a number in MongoServerError and a string in MongoDriverError

    +
    connectionGeneration?: number
    message: string
    stack?: string
    topologyVersion?: TopologyVersion
    stackTraceLimit: number

    The Error.stackTraceLimit property specifies the number of stack frames collected by a stack trace (whether generated by new Error().stack or Error.captureStackTrace(obj)).

    The default value is 10 but may be set to any valid JavaScript number. Changes @@ -28,10 +28,10 @@

    If set to a non-number value, or set to a negative number, stack traces will not capture any frames.

    Accessors

    • get errmsg(): string
    • Legacy name for server error responses

      -

      Returns string

    • get errorLabels(): string[]
    • Returns string[]

    • get name(): string
    • Returns string

    Methods

    • Checks the error to see if it has an error label

      +

      Returns string

    • get errorLabels(): string[]
    • Returns string[]

    • get name(): string
    • Returns string

    Methods

    • Checks the error to see if it has an error label

      Parameters

      • label: string

        The error label to check for

      Returns boolean

      returns true if the error has the provided error label

      -

    Properties

    cause?: Error
    code?: string | number

    This is a number in MongoServerError and a string in MongoDriverError

    -
    connectionGeneration?: number
    message: string
    stack?: string
    topologyVersion?: TopologyVersion
    stackTraceLimit: number

    The Error.stackTraceLimit property specifies the number of stack frames +

    Properties

    cause?: Error
    code?: string | number

    This is a number in MongoServerError and a string in MongoDriverError

    +
    connectionGeneration?: number
    message: string
    stack?: string
    topologyVersion?: TopologyVersion
    stackTraceLimit: number

    The Error.stackTraceLimit property specifies the number of stack frames collected by a stack trace (whether generated by new Error().stack or Error.captureStackTrace(obj)).

    The default value is 10 but may be set to any valid JavaScript number. Changes @@ -27,10 +27,10 @@

    If set to a non-number value, or set to a negative number, stack traces will not capture any frames.

    Accessors

    • get errmsg(): string
    • Legacy name for server error responses

      -

      Returns string

    • get errorLabels(): string[]
    • Returns string[]

    • get name(): string
    • Returns string

    Methods

    • Checks the error to see if it has an error label

      +

      Returns string

    • get errorLabels(): string[]
    • Returns string[]

    • get name(): string
    • Returns string

    Methods

    • Checks the error to see if it has an error label

      Parameters

      • label: string

        The error label to check for

      Returns boolean

      returns true if the error has the provided error label

      -
    • Creates a .stack property on targetObject, which when accessed returns a string representing the location in the code at which Error.captureStackTrace() was called.

      const myObject = {};
      Error.captureStackTrace(myObject);
      myObject.stack; // Similar to `new Error().stack` diff --git a/docs/Next/classes/MongoError.html b/docs/Next/classes/MongoError.html index 6bf14dec1f0..05388367134 100644 --- a/docs/Next/classes/MongoError.html +++ b/docs/Next/classes/MongoError.html @@ -1,4 +1,4 @@ -MongoError | mongodb

      Class MongoError

      Hierarchy (view full)

      Constructors

      constructor +MongoError | mongodb

      Class MongoError

      Hierarchy (view full)

      Constructors

      Properties

      cause? code? connectionGeneration? @@ -17,8 +17,8 @@

      Meant for internal use only.

      Parameters

      • message: string
      • Optionaloptions: {
            cause?: Error;
        }
        • Optionalcause?: Error

      Returns MongoError

      This class is only meant to be constructed within the driver. This constructor is not subject to semantic versioning compatibility guarantees and may change at any time.

      -

    Properties

    cause?: Error
    code?: string | number

    This is a number in MongoServerError and a string in MongoDriverError

    -
    connectionGeneration?: number
    message: string
    stack?: string
    topologyVersion?: TopologyVersion
    stackTraceLimit: number

    The Error.stackTraceLimit property specifies the number of stack frames +

    Properties

    cause?: Error
    code?: string | number

    This is a number in MongoServerError and a string in MongoDriverError

    +
    connectionGeneration?: number
    message: string
    stack?: string
    topologyVersion?: TopologyVersion
    stackTraceLimit: number

    The Error.stackTraceLimit property specifies the number of stack frames collected by a stack trace (whether generated by new Error().stack or Error.captureStackTrace(obj)).

    The default value is 10 but may be set to any valid JavaScript number. Changes @@ -26,10 +26,10 @@

    If set to a non-number value, or set to a negative number, stack traces will not capture any frames.

    Accessors

    • get errmsg(): string
    • Legacy name for server error responses

      -

      Returns string

    Methods

    • Parameters

      • label: string

      Returns void

    • Checks the error to see if it has an error label

      +

      Returns string

    Methods

    • Parameters

      • label: string

      Returns void

    • Checks the error to see if it has an error label

      Parameters

      • label: string

        The error label to check for

      Returns boolean

      returns true if the error has the provided error label

      -
    • Creates a .stack property on targetObject, which when accessed returns +

    • Creates a .stack property on targetObject, which when accessed returns a string representing the location in the code at which Error.captureStackTrace() was called.

      const myObject = {};
      Error.captureStackTrace(myObject);
      myObject.stack; // Similar to `new Error().stack` diff --git a/docs/Next/classes/MongoExpiredSessionError.html b/docs/Next/classes/MongoExpiredSessionError.html index f1e56c919e1..3822a4ae719 100644 --- a/docs/Next/classes/MongoExpiredSessionError.html +++ b/docs/Next/classes/MongoExpiredSessionError.html @@ -1,6 +1,6 @@ MongoExpiredSessionError | mongodb

      Class MongoExpiredSessionError

      An error generated when the user attempts to operate on a session that has expired or has been closed.

      -

      Hierarchy (view full)

      Constructors

      Hierarchy (view full)

      Constructors

      Properties

      cause? code? connectionGeneration? @@ -19,8 +19,8 @@

      Meant for internal use only.

      Parameters

      • message: string = 'Cannot use a session that has ended'

      Returns MongoExpiredSessionError

      This class is only meant to be constructed within the driver. This constructor is not subject to semantic versioning compatibility guarantees and may change at any time.

      -

    Properties

    cause?: Error
    code?: string | number

    This is a number in MongoServerError and a string in MongoDriverError

    -
    connectionGeneration?: number
    message: string
    stack?: string
    topologyVersion?: TopologyVersion
    stackTraceLimit: number

    The Error.stackTraceLimit property specifies the number of stack frames +

    Properties

    cause?: Error
    code?: string | number

    This is a number in MongoServerError and a string in MongoDriverError

    +
    connectionGeneration?: number
    message: string
    stack?: string
    topologyVersion?: TopologyVersion
    stackTraceLimit: number

    The Error.stackTraceLimit property specifies the number of stack frames collected by a stack trace (whether generated by new Error().stack or Error.captureStackTrace(obj)).

    The default value is 10 but may be set to any valid JavaScript number. Changes @@ -28,10 +28,10 @@

    If set to a non-number value, or set to a negative number, stack traces will not capture any frames.

    Accessors

    • get errmsg(): string
    • Legacy name for server error responses

      -

      Returns string

    • get errorLabels(): string[]
    • Returns string[]

    • get name(): string
    • Returns string

    Methods

    • Checks the error to see if it has an error label

      +

      Returns string

    • get errorLabels(): string[]
    • Returns string[]

    • get name(): string
    • Returns string

    Methods

    • Checks the error to see if it has an error label

      Parameters

      • label: string

        The error label to check for

      Returns boolean

      returns true if the error has the provided error label

      -
    • Creates a .stack property on targetObject, which when accessed returns a string representing the location in the code at which Error.captureStackTrace() was called.

      const myObject = {};
      Error.captureStackTrace(myObject);
      myObject.stack; // Similar to `new Error().stack` diff --git a/docs/Next/classes/MongoGCPError.html b/docs/Next/classes/MongoGCPError.html index 96b7e24b459..4da6acaa941 100644 --- a/docs/Next/classes/MongoGCPError.html +++ b/docs/Next/classes/MongoGCPError.html @@ -1,6 +1,6 @@ MongoGCPError | mongodb

      Class MongoGCPError

      A error generated when the user attempts to authenticate via GCP, but fails.

      -

      Hierarchy (view full)

      Constructors

      Hierarchy (view full)

      Constructors

      Properties

      cause? code? connectionGeneration? @@ -19,8 +19,8 @@

      Meant for internal use only.

      Parameters

      • message: string

      Returns MongoGCPError

      This class is only meant to be constructed within the driver. This constructor is not subject to semantic versioning compatibility guarantees and may change at any time.

      -

    Properties

    cause?: Error
    code?: string | number

    This is a number in MongoServerError and a string in MongoDriverError

    -
    connectionGeneration?: number
    message: string
    stack?: string
    topologyVersion?: TopologyVersion
    stackTraceLimit: number

    The Error.stackTraceLimit property specifies the number of stack frames +

    Properties

    cause?: Error
    code?: string | number

    This is a number in MongoServerError and a string in MongoDriverError

    +
    connectionGeneration?: number
    message: string
    stack?: string
    topologyVersion?: TopologyVersion
    stackTraceLimit: number

    The Error.stackTraceLimit property specifies the number of stack frames collected by a stack trace (whether generated by new Error().stack or Error.captureStackTrace(obj)).

    The default value is 10 but may be set to any valid JavaScript number. Changes @@ -28,10 +28,10 @@

    If set to a non-number value, or set to a negative number, stack traces will not capture any frames.

    Accessors

    • get errmsg(): string
    • Legacy name for server error responses

      -

      Returns string

    • get errorLabels(): string[]
    • Returns string[]

    • get name(): string
    • Returns string

    Methods

    • Checks the error to see if it has an error label

      +

      Returns string

    • get errorLabels(): string[]
    • Returns string[]

    • get name(): string
    • Returns string

    Methods

    • Checks the error to see if it has an error label

      Parameters

      • label: string

        The error label to check for

      Returns boolean

      returns true if the error has the provided error label

      -
    • Creates a .stack property on targetObject, which when accessed returns a string representing the location in the code at which Error.captureStackTrace() was called.

      const myObject = {};
      Error.captureStackTrace(myObject);
      myObject.stack; // Similar to `new Error().stack` diff --git a/docs/Next/classes/MongoGridFSChunkError.html b/docs/Next/classes/MongoGridFSChunkError.html index 28d3d2caf61..705a20d967a 100644 --- a/docs/Next/classes/MongoGridFSChunkError.html +++ b/docs/Next/classes/MongoGridFSChunkError.html @@ -1,6 +1,6 @@ MongoGridFSChunkError | mongodb

      Class MongoGridFSChunkError

      An error generated when a malformed or invalid chunk is encountered when reading from a GridFSStream.

      -

      Hierarchy (view full)

      Constructors

      Hierarchy (view full)

      Constructors

      Properties

      cause? code? connectionGeneration? @@ -19,8 +19,8 @@

      Meant for internal use only.

      Parameters

      • message: string

      Returns MongoGridFSChunkError

      This class is only meant to be constructed within the driver. This constructor is not subject to semantic versioning compatibility guarantees and may change at any time.

      -

    Properties

    cause?: Error
    code?: string | number

    This is a number in MongoServerError and a string in MongoDriverError

    -
    connectionGeneration?: number
    message: string
    stack?: string
    topologyVersion?: TopologyVersion
    stackTraceLimit: number

    The Error.stackTraceLimit property specifies the number of stack frames +

    Properties

    cause?: Error
    code?: string | number

    This is a number in MongoServerError and a string in MongoDriverError

    +
    connectionGeneration?: number
    message: string
    stack?: string
    topologyVersion?: TopologyVersion
    stackTraceLimit: number

    The Error.stackTraceLimit property specifies the number of stack frames collected by a stack trace (whether generated by new Error().stack or Error.captureStackTrace(obj)).

    The default value is 10 but may be set to any valid JavaScript number. Changes @@ -28,10 +28,10 @@

    If set to a non-number value, or set to a negative number, stack traces will not capture any frames.

    Accessors

    • get errmsg(): string
    • Legacy name for server error responses

      -

      Returns string

    • get errorLabels(): string[]
    • Returns string[]

    • get name(): string
    • Returns string

    Methods

    • Checks the error to see if it has an error label

      +

      Returns string

    • get errorLabels(): string[]
    • Returns string[]

    • get name(): string
    • Returns string

    Methods

    • Checks the error to see if it has an error label

      Parameters

      • label: string

        The error label to check for

      Returns boolean

      returns true if the error has the provided error label

      -
    • Creates a .stack property on targetObject, which when accessed returns a string representing the location in the code at which Error.captureStackTrace() was called.

      const myObject = {};
      Error.captureStackTrace(myObject);
      myObject.stack; // Similar to `new Error().stack` diff --git a/docs/Next/classes/MongoGridFSStreamError.html b/docs/Next/classes/MongoGridFSStreamError.html index e11ec17f513..28f1a7b171c 100644 --- a/docs/Next/classes/MongoGridFSStreamError.html +++ b/docs/Next/classes/MongoGridFSStreamError.html @@ -1,5 +1,5 @@ MongoGridFSStreamError | mongodb

      Class MongoGridFSStreamError

      An error generated when a GridFSStream operation fails to execute.

      -

      Hierarchy (view full)

      Constructors

      Hierarchy (view full)

      Constructors

      Properties

      cause? code? connectionGeneration? @@ -18,8 +18,8 @@

      Meant for internal use only.

      Parameters

      • message: string

      Returns MongoGridFSStreamError

      This class is only meant to be constructed within the driver. This constructor is not subject to semantic versioning compatibility guarantees and may change at any time.

      -

    Properties

    cause?: Error
    code?: string | number

    This is a number in MongoServerError and a string in MongoDriverError

    -
    connectionGeneration?: number
    message: string
    stack?: string
    topologyVersion?: TopologyVersion
    stackTraceLimit: number

    The Error.stackTraceLimit property specifies the number of stack frames +

    Properties

    cause?: Error
    code?: string | number

    This is a number in MongoServerError and a string in MongoDriverError

    +
    connectionGeneration?: number
    message: string
    stack?: string
    topologyVersion?: TopologyVersion
    stackTraceLimit: number

    The Error.stackTraceLimit property specifies the number of stack frames collected by a stack trace (whether generated by new Error().stack or Error.captureStackTrace(obj)).

    The default value is 10 but may be set to any valid JavaScript number. Changes @@ -27,10 +27,10 @@

    If set to a non-number value, or set to a negative number, stack traces will not capture any frames.

    Accessors

    • get errmsg(): string
    • Legacy name for server error responses

      -

      Returns string

    • get errorLabels(): string[]
    • Returns string[]

    • get name(): string
    • Returns string

    Methods

    • Checks the error to see if it has an error label

      +

      Returns string

    • get errorLabels(): string[]
    • Returns string[]

    • get name(): string
    • Returns string

    Methods

    • Checks the error to see if it has an error label

      Parameters

      • label: string

        The error label to check for

      Returns boolean

      returns true if the error has the provided error label

      -
    • Creates a .stack property on targetObject, which when accessed returns a string representing the location in the code at which Error.captureStackTrace() was called.

      const myObject = {};
      Error.captureStackTrace(myObject);
      myObject.stack; // Similar to `new Error().stack` diff --git a/docs/Next/classes/MongoInvalidArgumentError.html b/docs/Next/classes/MongoInvalidArgumentError.html index 553f6b8a74e..927031b3f8b 100644 --- a/docs/Next/classes/MongoInvalidArgumentError.html +++ b/docs/Next/classes/MongoInvalidArgumentError.html @@ -1,6 +1,6 @@ MongoInvalidArgumentError | mongodb

      Class MongoInvalidArgumentError

      An error generated when the user supplies malformed or unexpected arguments or when a required argument or field is not provided.

      -

      Hierarchy (view full)

      Constructors

      Hierarchy (view full)

      Constructors

      Properties

      cause? code? connectionGeneration? @@ -19,8 +19,8 @@

      Meant for internal use only.

      Parameters

      • message: string
      • Optionaloptions: {
            cause?: Error;
        }
        • Optionalcause?: Error

      Returns MongoInvalidArgumentError

      This class is only meant to be constructed within the driver. This constructor is not subject to semantic versioning compatibility guarantees and may change at any time.

      -

    Properties

    cause?: Error
    code?: string | number

    This is a number in MongoServerError and a string in MongoDriverError

    -
    connectionGeneration?: number
    message: string
    stack?: string
    topologyVersion?: TopologyVersion
    stackTraceLimit: number

    The Error.stackTraceLimit property specifies the number of stack frames +

    Properties

    cause?: Error
    code?: string | number

    This is a number in MongoServerError and a string in MongoDriverError

    +
    connectionGeneration?: number
    message: string
    stack?: string
    topologyVersion?: TopologyVersion
    stackTraceLimit: number

    The Error.stackTraceLimit property specifies the number of stack frames collected by a stack trace (whether generated by new Error().stack or Error.captureStackTrace(obj)).

    The default value is 10 but may be set to any valid JavaScript number. Changes @@ -28,10 +28,10 @@

    If set to a non-number value, or set to a negative number, stack traces will not capture any frames.

    Accessors

    • get errmsg(): string
    • Legacy name for server error responses

      -

      Returns string

    • get errorLabels(): string[]
    • Returns string[]

    • get name(): string
    • Returns string

    Methods

    • Checks the error to see if it has an error label

      +

      Returns string

    • get errorLabels(): string[]
    • Returns string[]

    • get name(): string
    • Returns string

    Methods

    • Checks the error to see if it has an error label

      Parameters

      • label: string

        The error label to check for

      Returns boolean

      returns true if the error has the provided error label

      -
    • Creates a .stack property on targetObject, which when accessed returns a string representing the location in the code at which Error.captureStackTrace() was called.

      const myObject = {};
      Error.captureStackTrace(myObject);
      myObject.stack; // Similar to `new Error().stack` diff --git a/docs/Next/classes/MongoKerberosError.html b/docs/Next/classes/MongoKerberosError.html index 707732e983f..c47773fdb3b 100644 --- a/docs/Next/classes/MongoKerberosError.html +++ b/docs/Next/classes/MongoKerberosError.html @@ -1,6 +1,6 @@ MongoKerberosError | mongodb

      Class MongoKerberosError

      A error generated when the user attempts to authenticate via Kerberos, but fails to connect to the Kerberos client.

      -

      Hierarchy (view full)

      Constructors

      Hierarchy (view full)

      Constructors

      Properties

      cause? code? connectionGeneration? @@ -19,8 +19,8 @@

      Meant for internal use only.

      Parameters

      • message: string

      Returns MongoKerberosError

      This class is only meant to be constructed within the driver. This constructor is not subject to semantic versioning compatibility guarantees and may change at any time.

      -

    Properties

    cause?: Error
    code?: string | number

    This is a number in MongoServerError and a string in MongoDriverError

    -
    connectionGeneration?: number
    message: string
    stack?: string
    topologyVersion?: TopologyVersion
    stackTraceLimit: number

    The Error.stackTraceLimit property specifies the number of stack frames +

    Properties

    cause?: Error
    code?: string | number

    This is a number in MongoServerError and a string in MongoDriverError

    +
    connectionGeneration?: number
    message: string
    stack?: string
    topologyVersion?: TopologyVersion
    stackTraceLimit: number

    The Error.stackTraceLimit property specifies the number of stack frames collected by a stack trace (whether generated by new Error().stack or Error.captureStackTrace(obj)).

    The default value is 10 but may be set to any valid JavaScript number. Changes @@ -28,10 +28,10 @@

    If set to a non-number value, or set to a negative number, stack traces will not capture any frames.

    Accessors

    • get errmsg(): string
    • Legacy name for server error responses

      -

      Returns string

    • get errorLabels(): string[]
    • Returns string[]

    • get name(): string
    • Returns string

    Methods

    • Checks the error to see if it has an error label

      +

      Returns string

    • get errorLabels(): string[]
    • Returns string[]

    • get name(): string
    • Returns string

    Methods

    • Checks the error to see if it has an error label

      Parameters

      • label: string

        The error label to check for

      Returns boolean

      returns true if the error has the provided error label

      -
    • Creates a .stack property on targetObject, which when accessed returns a string representing the location in the code at which Error.captureStackTrace() was called.

      const myObject = {};
      Error.captureStackTrace(myObject);
      myObject.stack; // Similar to `new Error().stack` diff --git a/docs/Next/classes/MongoMissingCredentialsError.html b/docs/Next/classes/MongoMissingCredentialsError.html index 2d165ca444f..3366a6961cd 100644 --- a/docs/Next/classes/MongoMissingCredentialsError.html +++ b/docs/Next/classes/MongoMissingCredentialsError.html @@ -1,6 +1,6 @@ MongoMissingCredentialsError | mongodb

      Class MongoMissingCredentialsError

      An error generated when the user fails to provide authentication credentials before attempting to connect to a mongo server instance.

      -

      Hierarchy (view full)

      Constructors

      Hierarchy (view full)

      Constructors

      Properties

      cause? code? connectionGeneration? @@ -19,8 +19,8 @@

      Meant for internal use only.

      Parameters

      • message: string

      Returns MongoMissingCredentialsError

      This class is only meant to be constructed within the driver. This constructor is not subject to semantic versioning compatibility guarantees and may change at any time.

      -

    Properties

    cause?: Error
    code?: string | number

    This is a number in MongoServerError and a string in MongoDriverError

    -
    connectionGeneration?: number
    message: string
    stack?: string
    topologyVersion?: TopologyVersion
    stackTraceLimit: number

    The Error.stackTraceLimit property specifies the number of stack frames +

    Properties

    cause?: Error
    code?: string | number

    This is a number in MongoServerError and a string in MongoDriverError

    +
    connectionGeneration?: number
    message: string
    stack?: string
    topologyVersion?: TopologyVersion
    stackTraceLimit: number

    The Error.stackTraceLimit property specifies the number of stack frames collected by a stack trace (whether generated by new Error().stack or Error.captureStackTrace(obj)).

    The default value is 10 but may be set to any valid JavaScript number. Changes @@ -28,10 +28,10 @@

    If set to a non-number value, or set to a negative number, stack traces will not capture any frames.

    Accessors

    • get errmsg(): string
    • Legacy name for server error responses

      -

      Returns string

    • get errorLabels(): string[]
    • Returns string[]

    • get name(): string
    • Returns string

    Methods

    • Checks the error to see if it has an error label

      +

      Returns string

    • get errorLabels(): string[]
    • Returns string[]

    • get name(): string
    • Returns string

    Methods

    • Checks the error to see if it has an error label

      Parameters

      • label: string

        The error label to check for

      Returns boolean

      returns true if the error has the provided error label

      -
    • Creates a .stack property on targetObject, which when accessed returns a string representing the location in the code at which Error.captureStackTrace() was called.

      const myObject = {};
      Error.captureStackTrace(myObject);
      myObject.stack; // Similar to `new Error().stack` diff --git a/docs/Next/classes/MongoMissingDependencyError.html b/docs/Next/classes/MongoMissingDependencyError.html index 46646f8b731..146b50ca42a 100644 --- a/docs/Next/classes/MongoMissingDependencyError.html +++ b/docs/Next/classes/MongoMissingDependencyError.html @@ -1,5 +1,5 @@ MongoMissingDependencyError | mongodb

      Class MongoMissingDependencyError

      An error generated when a required module or dependency is not present in the local environment

      -

      Hierarchy (view full)

      Constructors

      Hierarchy (view full)

      Constructors

      Properties

      cause code? connectionGeneration? @@ -19,9 +19,9 @@

      Meant for internal use only.

      Parameters

      • message: string
      • options: {
            cause: Error;
            dependencyName: string;
        }
        • cause: Error
        • dependencyName: string

      Returns MongoMissingDependencyError

      This class is only meant to be constructed within the driver. This constructor is not subject to semantic versioning compatibility guarantees and may change at any time.

      -

    Properties

    cause: Error

    This property is assigned in the Error constructor.

    -
    code?: string | number

    This is a number in MongoServerError and a string in MongoDriverError

    -
    connectionGeneration?: number
    dependencyName: string
    message: string
    stack?: string
    topologyVersion?: TopologyVersion
    stackTraceLimit: number

    The Error.stackTraceLimit property specifies the number of stack frames +

    Properties

    cause: Error

    This property is assigned in the Error constructor.

    +
    code?: string | number

    This is a number in MongoServerError and a string in MongoDriverError

    +
    connectionGeneration?: number
    dependencyName: string
    message: string
    stack?: string
    topologyVersion?: TopologyVersion
    stackTraceLimit: number

    The Error.stackTraceLimit property specifies the number of stack frames collected by a stack trace (whether generated by new Error().stack or Error.captureStackTrace(obj)).

    The default value is 10 but may be set to any valid JavaScript number. Changes @@ -29,10 +29,10 @@

    If set to a non-number value, or set to a negative number, stack traces will not capture any frames.

    Accessors

    • get errmsg(): string
    • Legacy name for server error responses

      -

      Returns string

    • get errorLabels(): string[]
    • Returns string[]

    • get name(): string
    • Returns string

    Methods

    • Checks the error to see if it has an error label

      +

      Returns string

    • get errorLabels(): string[]
    • Returns string[]

    • get name(): string
    • Returns string

    Methods

    • Checks the error to see if it has an error label

      Parameters

      • label: string

        The error label to check for

      Returns boolean

      returns true if the error has the provided error label

      -
    • Creates a .stack property on targetObject, which when accessed returns a string representing the location in the code at which Error.captureStackTrace() was called.

      const myObject = {};
      Error.captureStackTrace(myObject);
      myObject.stack; // Similar to `new Error().stack` diff --git a/docs/Next/classes/MongoNetworkError.html b/docs/Next/classes/MongoNetworkError.html index 3a879ea361f..d81405de5b3 100644 --- a/docs/Next/classes/MongoNetworkError.html +++ b/docs/Next/classes/MongoNetworkError.html @@ -1,5 +1,5 @@ MongoNetworkError | mongodb

      Class MongoNetworkError

      An error indicating an issue with the network, including TCP errors and timeouts.

      -

      Hierarchy (view full)

      Constructors

      Hierarchy (view full)

      Constructors

      Properties

      cause? code? connectionGeneration? @@ -18,8 +18,8 @@

      Meant for internal use only.

      Parameters

      Returns MongoNetworkError

      This class is only meant to be constructed within the driver. This constructor is not subject to semantic versioning compatibility guarantees and may change at any time.

      -

    Properties

    cause?: Error
    code?: string | number

    This is a number in MongoServerError and a string in MongoDriverError

    -
    connectionGeneration?: number
    message: string
    stack?: string
    topologyVersion?: TopologyVersion
    stackTraceLimit: number

    The Error.stackTraceLimit property specifies the number of stack frames +

    Properties

    cause?: Error
    code?: string | number

    This is a number in MongoServerError and a string in MongoDriverError

    +
    connectionGeneration?: number
    message: string
    stack?: string
    topologyVersion?: TopologyVersion
    stackTraceLimit: number

    The Error.stackTraceLimit property specifies the number of stack frames collected by a stack trace (whether generated by new Error().stack or Error.captureStackTrace(obj)).

    The default value is 10 but may be set to any valid JavaScript number. Changes @@ -27,10 +27,10 @@

    If set to a non-number value, or set to a negative number, stack traces will not capture any frames.

    Accessors

    • get errmsg(): string
    • Legacy name for server error responses

      -

      Returns string

    • get errorLabels(): string[]
    • Returns string[]

    • get name(): string
    • Returns string

    Methods

    • Checks the error to see if it has an error label

      +

      Returns string

    • get errorLabels(): string[]
    • Returns string[]

    • get name(): string
    • Returns string

    Methods

    • Checks the error to see if it has an error label

      Parameters

      • label: string

        The error label to check for

      Returns boolean

      returns true if the error has the provided error label

      -
    • Creates a .stack property on targetObject, which when accessed returns a string representing the location in the code at which Error.captureStackTrace() was called.

      const myObject = {};
      Error.captureStackTrace(myObject);
      myObject.stack; // Similar to `new Error().stack` diff --git a/docs/Next/classes/MongoNetworkTimeoutError.html b/docs/Next/classes/MongoNetworkTimeoutError.html index e9c717f1763..53b6cc9751d 100644 --- a/docs/Next/classes/MongoNetworkTimeoutError.html +++ b/docs/Next/classes/MongoNetworkTimeoutError.html @@ -1,5 +1,5 @@ MongoNetworkTimeoutError | mongodb

      Class MongoNetworkTimeoutError

      An error indicating a network timeout occurred

      -

      Hierarchy (view full)

      Constructors

      Hierarchy (view full)

      Constructors

      Properties

      cause? code? connectionGeneration? @@ -18,8 +18,8 @@

      Meant for internal use only.

      Parameters

      Returns MongoNetworkTimeoutError

      This class is only meant to be constructed within the driver. This constructor is not subject to semantic versioning compatibility guarantees and may change at any time.

      -

    Properties

    cause?: Error
    code?: string | number

    This is a number in MongoServerError and a string in MongoDriverError

    -
    connectionGeneration?: number
    message: string
    stack?: string
    topologyVersion?: TopologyVersion
    stackTraceLimit: number

    The Error.stackTraceLimit property specifies the number of stack frames +

    Properties

    cause?: Error
    code?: string | number

    This is a number in MongoServerError and a string in MongoDriverError

    +
    connectionGeneration?: number
    message: string
    stack?: string
    topologyVersion?: TopologyVersion
    stackTraceLimit: number

    The Error.stackTraceLimit property specifies the number of stack frames collected by a stack trace (whether generated by new Error().stack or Error.captureStackTrace(obj)).

    The default value is 10 but may be set to any valid JavaScript number. Changes @@ -27,10 +27,10 @@

    If set to a non-number value, or set to a negative number, stack traces will not capture any frames.

    Accessors

    • get errmsg(): string
    • Legacy name for server error responses

      -

      Returns string

    • get errorLabels(): string[]
    • Returns string[]

    • get name(): string
    • Returns string

    Methods

    • Checks the error to see if it has an error label

      +

      Returns string

    • get errorLabels(): string[]
    • Returns string[]

    • get name(): string
    • Returns string

    Methods

    • Checks the error to see if it has an error label

      Parameters

      • label: string

        The error label to check for

      Returns boolean

      returns true if the error has the provided error label

      -
    • Creates a .stack property on targetObject, which when accessed returns a string representing the location in the code at which Error.captureStackTrace() was called.

      const myObject = {};
      Error.captureStackTrace(myObject);
      myObject.stack; // Similar to `new Error().stack` diff --git a/docs/Next/classes/MongoNotConnectedError.html b/docs/Next/classes/MongoNotConnectedError.html index e0e760c976c..59f9306d5ea 100644 --- a/docs/Next/classes/MongoNotConnectedError.html +++ b/docs/Next/classes/MongoNotConnectedError.html @@ -1,6 +1,6 @@ MongoNotConnectedError | mongodb

      Class MongoNotConnectedError

      An error thrown when the user attempts to operate on a database or collection through a MongoClient that has not yet successfully called the "connect" method

      -

      Hierarchy (view full)

      Constructors

      Hierarchy (view full)

      Constructors

      Properties

      cause? code? connectionGeneration? @@ -19,8 +19,8 @@

      Meant for internal use only.

      Parameters

      • message: string

      Returns MongoNotConnectedError

      This class is only meant to be constructed within the driver. This constructor is not subject to semantic versioning compatibility guarantees and may change at any time.

      -

    Properties

    cause?: Error
    code?: string | number

    This is a number in MongoServerError and a string in MongoDriverError

    -
    connectionGeneration?: number
    message: string
    stack?: string
    topologyVersion?: TopologyVersion
    stackTraceLimit: number

    The Error.stackTraceLimit property specifies the number of stack frames +

    Properties

    cause?: Error
    code?: string | number

    This is a number in MongoServerError and a string in MongoDriverError

    +
    connectionGeneration?: number
    message: string
    stack?: string
    topologyVersion?: TopologyVersion
    stackTraceLimit: number

    The Error.stackTraceLimit property specifies the number of stack frames collected by a stack trace (whether generated by new Error().stack or Error.captureStackTrace(obj)).

    The default value is 10 but may be set to any valid JavaScript number. Changes @@ -28,10 +28,10 @@

    If set to a non-number value, or set to a negative number, stack traces will not capture any frames.

    Accessors

    • get errmsg(): string
    • Legacy name for server error responses

      -

      Returns string

    • get errorLabels(): string[]
    • Returns string[]

    • get name(): string
    • Returns string

    Methods

    • Checks the error to see if it has an error label

      +

      Returns string

    • get errorLabels(): string[]
    • Returns string[]

    • get name(): string
    • Returns string

    Methods

    • Checks the error to see if it has an error label

      Parameters

      • label: string

        The error label to check for

      Returns boolean

      returns true if the error has the provided error label

      -
    • Creates a .stack property on targetObject, which when accessed returns a string representing the location in the code at which Error.captureStackTrace() was called.

      const myObject = {};
      Error.captureStackTrace(myObject);
      myObject.stack; // Similar to `new Error().stack` diff --git a/docs/Next/classes/MongoOIDCError.html b/docs/Next/classes/MongoOIDCError.html index a795df35b8b..de520946373 100644 --- a/docs/Next/classes/MongoOIDCError.html +++ b/docs/Next/classes/MongoOIDCError.html @@ -1,6 +1,6 @@ MongoOIDCError | mongodb

      Class MongoOIDCError

      A error generated when the user attempts to authenticate via OIDC callbacks, but fails.

      -

      Hierarchy (view full)

      Constructors

      Hierarchy (view full)

      Constructors

      Properties

      cause? code? connectionGeneration? @@ -19,8 +19,8 @@

      Meant for internal use only.

      Parameters

      • message: string

      Returns MongoOIDCError

      This class is only meant to be constructed within the driver. This constructor is not subject to semantic versioning compatibility guarantees and may change at any time.

      -

    Properties

    cause?: Error
    code?: string | number

    This is a number in MongoServerError and a string in MongoDriverError

    -
    connectionGeneration?: number
    message: string
    stack?: string
    topologyVersion?: TopologyVersion
    stackTraceLimit: number

    The Error.stackTraceLimit property specifies the number of stack frames +

    Properties

    cause?: Error
    code?: string | number

    This is a number in MongoServerError and a string in MongoDriverError

    +
    connectionGeneration?: number
    message: string
    stack?: string
    topologyVersion?: TopologyVersion
    stackTraceLimit: number

    The Error.stackTraceLimit property specifies the number of stack frames collected by a stack trace (whether generated by new Error().stack or Error.captureStackTrace(obj)).

    The default value is 10 but may be set to any valid JavaScript number. Changes @@ -28,10 +28,10 @@

    If set to a non-number value, or set to a negative number, stack traces will not capture any frames.

    Accessors

    • get errmsg(): string
    • Legacy name for server error responses

      -

      Returns string

    • get errorLabels(): string[]
    • Returns string[]

    • get name(): string
    • Returns string

    Methods

    • Checks the error to see if it has an error label

      +

      Returns string

    • get errorLabels(): string[]
    • Returns string[]

    • get name(): string
    • Returns string

    Methods

    • Checks the error to see if it has an error label

      Parameters

      • label: string

        The error label to check for

      Returns boolean

      returns true if the error has the provided error label

      -
    • Creates a .stack property on targetObject, which when accessed returns a string representing the location in the code at which Error.captureStackTrace() was called.

      const myObject = {};
      Error.captureStackTrace(myObject);
      myObject.stack; // Similar to `new Error().stack` diff --git a/docs/Next/classes/MongoOperationTimeoutError.html b/docs/Next/classes/MongoOperationTimeoutError.html index 4cc08911b4f..1dd28036fbc 100644 --- a/docs/Next/classes/MongoOperationTimeoutError.html +++ b/docs/Next/classes/MongoOperationTimeoutError.html @@ -1,7 +1,7 @@ MongoOperationTimeoutError | mongodb

      Class MongoOperationTimeoutError

      try {
      await blogs.insertOne(blogPost, { timeoutMS: 60_000 })
      } catch (error) {
      if (error instanceof MongoOperationTimeoutError) {
      console.log(`Oh no! writer's block!`, error);
      }
      }
      -

      Hierarchy (view full)

      Constructors

      Hierarchy (view full)

      Constructors

      Properties

      cause? code? connectionGeneration? @@ -20,8 +20,8 @@

      Meant for internal use only.

      Parameters

      • message: string
      • Optionaloptions: {
            cause?: Error;
        }
        • Optionalcause?: Error

      Returns MongoOperationTimeoutError

      This class is only meant to be constructed within the driver. This constructor is not subject to semantic versioning compatibility guarantees and may change at any time.

      -

    Properties

    cause?: Error
    code?: string | number

    This is a number in MongoServerError and a string in MongoDriverError

    -
    connectionGeneration?: number
    message: string
    stack?: string
    topologyVersion?: TopologyVersion
    stackTraceLimit: number

    The Error.stackTraceLimit property specifies the number of stack frames +

    Properties

    cause?: Error
    code?: string | number

    This is a number in MongoServerError and a string in MongoDriverError

    +
    connectionGeneration?: number
    message: string
    stack?: string
    topologyVersion?: TopologyVersion
    stackTraceLimit: number

    The Error.stackTraceLimit property specifies the number of stack frames collected by a stack trace (whether generated by new Error().stack or Error.captureStackTrace(obj)).

    The default value is 10 but may be set to any valid JavaScript number. Changes @@ -29,10 +29,10 @@

    If set to a non-number value, or set to a negative number, stack traces will not capture any frames.

    Accessors

    • get errmsg(): string
    • Legacy name for server error responses

      -

      Returns string

    • get errorLabels(): string[]
    • Returns string[]

    • get name(): string
    • Returns string

    Methods

    • Checks the error to see if it has an error label

      +

      Returns string

    • get errorLabels(): string[]
    • Returns string[]

    • get name(): string
    • Returns string

    Methods

    • Checks the error to see if it has an error label

      Parameters

      • label: string

        The error label to check for

      Returns boolean

      returns true if the error has the provided error label

      -
    • Creates a .stack property on targetObject, which when accessed returns a string representing the location in the code at which Error.captureStackTrace() was called.

      const myObject = {};
      Error.captureStackTrace(myObject);
      myObject.stack; // Similar to `new Error().stack` diff --git a/docs/Next/classes/MongoParseError.html b/docs/Next/classes/MongoParseError.html index 916aa5376af..1a6db5af1e8 100644 --- a/docs/Next/classes/MongoParseError.html +++ b/docs/Next/classes/MongoParseError.html @@ -1,5 +1,5 @@ MongoParseError | mongodb

      Class MongoParseError

      An error used when attempting to parse a value (like a connection string)

      -

      Hierarchy (view full)

      Constructors

      Hierarchy (view full)

      Constructors

      Properties

      cause? code? connectionGeneration? @@ -18,8 +18,8 @@

      Meant for internal use only.

      Parameters

      • message: string

      Returns MongoParseError

      This class is only meant to be constructed within the driver. This constructor is not subject to semantic versioning compatibility guarantees and may change at any time.

      -

    Properties

    cause?: Error
    code?: string | number

    This is a number in MongoServerError and a string in MongoDriverError

    -
    connectionGeneration?: number
    message: string
    stack?: string
    topologyVersion?: TopologyVersion
    stackTraceLimit: number

    The Error.stackTraceLimit property specifies the number of stack frames +

    Properties

    cause?: Error
    code?: string | number

    This is a number in MongoServerError and a string in MongoDriverError

    +
    connectionGeneration?: number
    message: string
    stack?: string
    topologyVersion?: TopologyVersion
    stackTraceLimit: number

    The Error.stackTraceLimit property specifies the number of stack frames collected by a stack trace (whether generated by new Error().stack or Error.captureStackTrace(obj)).

    The default value is 10 but may be set to any valid JavaScript number. Changes @@ -27,10 +27,10 @@

    If set to a non-number value, or set to a negative number, stack traces will not capture any frames.

    Accessors

    • get errmsg(): string
    • Legacy name for server error responses

      -

      Returns string

    • get errorLabels(): string[]
    • Returns string[]

    • get name(): string
    • Returns string

    Methods

    • Checks the error to see if it has an error label

      +

      Returns string

    • get errorLabels(): string[]
    • Returns string[]

    • get name(): string
    • Returns string

    Methods

    • Checks the error to see if it has an error label

      Parameters

      • label: string

        The error label to check for

      Returns boolean

      returns true if the error has the provided error label

      -

    Properties

    cause?: Error
    code?: string | number

    This is a number in MongoServerError and a string in MongoDriverError

    -
    connectionGeneration?: number
    message: string
    stack?: string
    topologyVersion?: TopologyVersion
    stackTraceLimit: number

    The Error.stackTraceLimit property specifies the number of stack frames +

    Properties

    cause?: Error
    code?: string | number

    This is a number in MongoServerError and a string in MongoDriverError

    +
    connectionGeneration?: number
    message: string
    stack?: string
    topologyVersion?: TopologyVersion
    stackTraceLimit: number

    The Error.stackTraceLimit property specifies the number of stack frames collected by a stack trace (whether generated by new Error().stack or Error.captureStackTrace(obj)).

    The default value is 10 but may be set to any valid JavaScript number. Changes @@ -28,10 +28,10 @@

    If set to a non-number value, or set to a negative number, stack traces will not capture any frames.

    Accessors

    • get errmsg(): string
    • Legacy name for server error responses

      -

      Returns string

    • get errorLabels(): string[]
    • Returns string[]

    • get name(): string
    • Returns string

    Methods

    • Checks the error to see if it has an error label

      +

      Returns string

    • get errorLabels(): string[]
    • Returns string[]

    • get name(): string
    • Returns string

    Methods

    • Checks the error to see if it has an error label

      Parameters

      • label: string

        The error label to check for

      Returns boolean

      returns true if the error has the provided error label

      -
    • Creates a .stack property on targetObject, which when accessed returns a string representing the location in the code at which Error.captureStackTrace() was called.

      const myObject = {};
      Error.captureStackTrace(myObject);
      myObject.stack; // Similar to `new Error().stack` diff --git a/docs/Next/classes/MongoServerClosedError.html b/docs/Next/classes/MongoServerClosedError.html index 48daa42a89f..3e47dfb0675 100644 --- a/docs/Next/classes/MongoServerClosedError.html +++ b/docs/Next/classes/MongoServerClosedError.html @@ -1,6 +1,6 @@ MongoServerClosedError | mongodb

      Class MongoServerClosedError

      An error generated when an attempt is made to operate on a closed/closing server.

      -

      Hierarchy (view full)

      Constructors

      Hierarchy (view full)

      Constructors

      Properties

      cause? code? connectionGeneration? @@ -19,8 +19,8 @@

      Meant for internal use only.

      Parameters

      • message: string = 'Server is closed'

      Returns MongoServerClosedError

      This class is only meant to be constructed within the driver. This constructor is not subject to semantic versioning compatibility guarantees and may change at any time.

      -

    Properties

    cause?: Error
    code?: string | number

    This is a number in MongoServerError and a string in MongoDriverError

    -
    connectionGeneration?: number
    message: string
    stack?: string
    topologyVersion?: TopologyVersion
    stackTraceLimit: number

    The Error.stackTraceLimit property specifies the number of stack frames +

    Properties

    cause?: Error
    code?: string | number

    This is a number in MongoServerError and a string in MongoDriverError

    +
    connectionGeneration?: number
    message: string
    stack?: string
    topologyVersion?: TopologyVersion
    stackTraceLimit: number

    The Error.stackTraceLimit property specifies the number of stack frames collected by a stack trace (whether generated by new Error().stack or Error.captureStackTrace(obj)).

    The default value is 10 but may be set to any valid JavaScript number. Changes @@ -28,10 +28,10 @@

    If set to a non-number value, or set to a negative number, stack traces will not capture any frames.

    Accessors

    • get errmsg(): string
    • Legacy name for server error responses

      -

      Returns string

    • get errorLabels(): string[]
    • Returns string[]

    • get name(): string
    • Returns string

    Methods

    • Checks the error to see if it has an error label

      +

      Returns string

    • get errorLabels(): string[]
    • Returns string[]

    • get name(): string
    • Returns string

    Methods

    • Checks the error to see if it has an error label

      Parameters

      • label: string

        The error label to check for

      Returns boolean

      returns true if the error has the provided error label

      -

    Properties

    cause?: Error
    code?: string | number

    This is a number in MongoServerError and a string in MongoDriverError

    -
    codeName?: string
    connectionGeneration?: number
    errInfo?: Document
    errorResponse: ErrorDescription

    Raw error result document returned by server.

    -
    message: string
    ok?: number
    stack?: string
    topologyVersion?: TopologyVersion
    writeConcernError?: Document
    stackTraceLimit: number

    The Error.stackTraceLimit property specifies the number of stack frames +

    Properties

    cause?: Error
    code?: string | number

    This is a number in MongoServerError and a string in MongoDriverError

    +
    codeName?: string
    connectionGeneration?: number
    errInfo?: Document
    errorResponse: ErrorDescription

    Raw error result document returned by server.

    +
    message: string
    ok?: number
    stack?: string
    topologyVersion?: TopologyVersion
    writeConcernError?: Document
    stackTraceLimit: number

    The Error.stackTraceLimit property specifies the number of stack frames collected by a stack trace (whether generated by new Error().stack or Error.captureStackTrace(obj)).

    The default value is 10 but may be set to any valid JavaScript number. Changes @@ -33,10 +33,10 @@

    If set to a non-number value, or set to a negative number, stack traces will not capture any frames.

    Accessors

    • get errmsg(): string
    • Legacy name for server error responses

      -

      Returns string

    • get errorLabels(): string[]
    • Returns string[]

    • get name(): string
    • Returns string

    Methods

    • Checks the error to see if it has an error label

      +

      Returns string

    • get errorLabels(): string[]
    • Returns string[]

    • get name(): string
    • Returns string

    Methods

    • Checks the error to see if it has an error label

      Parameters

      • label: string

        The error label to check for

      Returns boolean

      returns true if the error has the provided error label

      -
    • Creates a .stack property on targetObject, which when accessed returns a string representing the location in the code at which Error.captureStackTrace() was called.

      const myObject = {};
      Error.captureStackTrace(myObject);
      myObject.stack; // Similar to `new Error().stack` diff --git a/docs/Next/classes/MongoServerSelectionError.html b/docs/Next/classes/MongoServerSelectionError.html index beab10e527a..925f158d74b 100644 --- a/docs/Next/classes/MongoServerSelectionError.html +++ b/docs/Next/classes/MongoServerSelectionError.html @@ -1,5 +1,5 @@ MongoServerSelectionError | mongodb

      Class MongoServerSelectionError

      An error signifying a client-side server selection error

      -

      Hierarchy (view full)

      Constructors

      Hierarchy (view full)

      Constructors

      Properties

      cause? code? connectionGeneration? @@ -19,9 +19,9 @@

      Meant for internal use only.

      Parameters

      Returns MongoServerSelectionError

      This class is only meant to be constructed within the driver. This constructor is not subject to semantic versioning compatibility guarantees and may change at any time.

      -

    Properties

    cause?: Error
    code?: string | number

    This is a number in MongoServerError and a string in MongoDriverError

    -
    connectionGeneration?: number
    message: string

    An optional reason context, such as an error saved during flow of monitoring and selecting servers

    -
    stack?: string
    topologyVersion?: TopologyVersion
    stackTraceLimit: number

    The Error.stackTraceLimit property specifies the number of stack frames +

    Properties

    cause?: Error
    code?: string | number

    This is a number in MongoServerError and a string in MongoDriverError

    +
    connectionGeneration?: number
    message: string

    An optional reason context, such as an error saved during flow of monitoring and selecting servers

    +
    stack?: string
    topologyVersion?: TopologyVersion
    stackTraceLimit: number

    The Error.stackTraceLimit property specifies the number of stack frames collected by a stack trace (whether generated by new Error().stack or Error.captureStackTrace(obj)).

    The default value is 10 but may be set to any valid JavaScript number. Changes @@ -29,10 +29,10 @@

    If set to a non-number value, or set to a negative number, stack traces will not capture any frames.

    Accessors

    • get errmsg(): string
    • Legacy name for server error responses

      -

      Returns string

    • get errorLabels(): string[]
    • Returns string[]

    • get name(): string
    • Returns string

    Methods

    • Checks the error to see if it has an error label

      +

      Returns string

    • get errorLabels(): string[]
    • Returns string[]

    • get name(): string
    • Returns string

    Methods

    • Checks the error to see if it has an error label

      Parameters

      • label: string

        The error label to check for

      Returns boolean

      returns true if the error has the provided error label

      -
    • Creates a .stack property on targetObject, which when accessed returns a string representing the location in the code at which Error.captureStackTrace() was called.

      const myObject = {};
      Error.captureStackTrace(myObject);
      myObject.stack; // Similar to `new Error().stack` diff --git a/docs/Next/classes/MongoStalePrimaryError.html b/docs/Next/classes/MongoStalePrimaryError.html index e5d3826f140..a42855a09f3 100644 --- a/docs/Next/classes/MongoStalePrimaryError.html +++ b/docs/Next/classes/MongoStalePrimaryError.html @@ -1,5 +1,5 @@ MongoStalePrimaryError | mongodb

      Class MongoStalePrimaryError

      An error generated when a primary server is marked stale, never directly thrown

      -

      Hierarchy (view full)

      Constructors

      Hierarchy (view full)

      Constructors

      Properties

      cause? code? connectionGeneration? @@ -18,8 +18,8 @@

      Meant for internal use only.

      Parameters

      • message: string
      • Optionaloptions: {
            cause?: Error;
        }
        • Optionalcause?: Error

      Returns MongoStalePrimaryError

      This class is only meant to be constructed within the driver. This constructor is not subject to semantic versioning compatibility guarantees and may change at any time.

      -

    Properties

    cause?: Error
    code?: string | number

    This is a number in MongoServerError and a string in MongoDriverError

    -
    connectionGeneration?: number
    message: string
    stack?: string
    topologyVersion?: TopologyVersion
    stackTraceLimit: number

    The Error.stackTraceLimit property specifies the number of stack frames +

    Properties

    cause?: Error
    code?: string | number

    This is a number in MongoServerError and a string in MongoDriverError

    +
    connectionGeneration?: number
    message: string
    stack?: string
    topologyVersion?: TopologyVersion
    stackTraceLimit: number

    The Error.stackTraceLimit property specifies the number of stack frames collected by a stack trace (whether generated by new Error().stack or Error.captureStackTrace(obj)).

    The default value is 10 but may be set to any valid JavaScript number. Changes @@ -27,10 +27,10 @@

    If set to a non-number value, or set to a negative number, stack traces will not capture any frames.

    Accessors

    • get errmsg(): string
    • Legacy name for server error responses

      -

      Returns string

    • get errorLabels(): string[]
    • Returns string[]

    • get name(): string
    • Returns string

    Methods

    • Checks the error to see if it has an error label

      +

      Returns string

    • get errorLabels(): string[]
    • Returns string[]

    • get name(): string
    • Returns string

    Methods

    • Checks the error to see if it has an error label

      Parameters

      • label: string

        The error label to check for

      Returns boolean

      returns true if the error has the provided error label

      -
    • Creates a .stack property on targetObject, which when accessed returns a string representing the location in the code at which Error.captureStackTrace() was called.

      const myObject = {};
      Error.captureStackTrace(myObject);
      myObject.stack; // Similar to `new Error().stack` diff --git a/docs/Next/classes/MongoSystemError.html b/docs/Next/classes/MongoSystemError.html index 6e738fe3b9d..c14b8bfebd3 100644 --- a/docs/Next/classes/MongoSystemError.html +++ b/docs/Next/classes/MongoSystemError.html @@ -1,5 +1,5 @@ MongoSystemError | mongodb

      Class MongoSystemError

      An error signifying a general system issue

      -

      Hierarchy (view full)

      Constructors

      Hierarchy (view full)

      Constructors

      Properties

      cause? code? connectionGeneration? @@ -19,9 +19,9 @@

      Meant for internal use only.

      Parameters

      Returns MongoSystemError

      This class is only meant to be constructed within the driver. This constructor is not subject to semantic versioning compatibility guarantees and may change at any time.

      -

    Properties

    cause?: Error
    code?: string | number

    This is a number in MongoServerError and a string in MongoDriverError

    -
    connectionGeneration?: number
    message: string

    An optional reason context, such as an error saved during flow of monitoring and selecting servers

    -
    stack?: string
    topologyVersion?: TopologyVersion
    stackTraceLimit: number

    The Error.stackTraceLimit property specifies the number of stack frames +

    Properties

    cause?: Error
    code?: string | number

    This is a number in MongoServerError and a string in MongoDriverError

    +
    connectionGeneration?: number
    message: string

    An optional reason context, such as an error saved during flow of monitoring and selecting servers

    +
    stack?: string
    topologyVersion?: TopologyVersion
    stackTraceLimit: number

    The Error.stackTraceLimit property specifies the number of stack frames collected by a stack trace (whether generated by new Error().stack or Error.captureStackTrace(obj)).

    The default value is 10 but may be set to any valid JavaScript number. Changes @@ -29,10 +29,10 @@

    If set to a non-number value, or set to a negative number, stack traces will not capture any frames.

    Accessors

    • get errmsg(): string
    • Legacy name for server error responses

      -

      Returns string

    • get errorLabels(): string[]
    • Returns string[]

    • get name(): string
    • Returns string

    Methods

    • Checks the error to see if it has an error label

      +

      Returns string

    • get errorLabels(): string[]
    • Returns string[]

    • get name(): string
    • Returns string

    Methods

    • Checks the error to see if it has an error label

      Parameters

      • label: string

        The error label to check for

      Returns boolean

      returns true if the error has the provided error label

      -
    • Creates a .stack property on targetObject, which when accessed returns a string representing the location in the code at which Error.captureStackTrace() was called.

      const myObject = {};
      Error.captureStackTrace(myObject);
      myObject.stack; // Similar to `new Error().stack` diff --git a/docs/Next/classes/MongoTailableCursorError.html b/docs/Next/classes/MongoTailableCursorError.html index 56c52dc1a7b..ea70cca07c9 100644 --- a/docs/Next/classes/MongoTailableCursorError.html +++ b/docs/Next/classes/MongoTailableCursorError.html @@ -1,5 +1,5 @@ MongoTailableCursorError | mongodb

      Class MongoTailableCursorError

      An error thrown when the user calls a function or method not supported on a tailable cursor

      -

      Hierarchy (view full)

      Constructors

      Hierarchy (view full)

      Constructors

      Properties

      cause? code? connectionGeneration? @@ -18,8 +18,8 @@

      Meant for internal use only.

      Parameters

      • message: string = 'Tailable cursor does not support this operation'

      Returns MongoTailableCursorError

      This class is only meant to be constructed within the driver. This constructor is not subject to semantic versioning compatibility guarantees and may change at any time.

      -

    Properties

    cause?: Error
    code?: string | number

    This is a number in MongoServerError and a string in MongoDriverError

    -
    connectionGeneration?: number
    message: string
    stack?: string
    topologyVersion?: TopologyVersion
    stackTraceLimit: number

    The Error.stackTraceLimit property specifies the number of stack frames +

    Properties

    cause?: Error
    code?: string | number

    This is a number in MongoServerError and a string in MongoDriverError

    +
    connectionGeneration?: number
    message: string
    stack?: string
    topologyVersion?: TopologyVersion
    stackTraceLimit: number

    The Error.stackTraceLimit property specifies the number of stack frames collected by a stack trace (whether generated by new Error().stack or Error.captureStackTrace(obj)).

    The default value is 10 but may be set to any valid JavaScript number. Changes @@ -27,10 +27,10 @@

    If set to a non-number value, or set to a negative number, stack traces will not capture any frames.

    Accessors

    • get errmsg(): string
    • Legacy name for server error responses

      -

      Returns string

    • get errorLabels(): string[]
    • Returns string[]

    • get name(): string
    • Returns string

    Methods

    • Checks the error to see if it has an error label

      +

      Returns string

    • get errorLabels(): string[]
    • Returns string[]

    • get name(): string
    • Returns string

    Methods

    • Checks the error to see if it has an error label

      Parameters

      • label: string

        The error label to check for

      Returns boolean

      returns true if the error has the provided error label

      -
    • Creates a .stack property on targetObject, which when accessed returns a string representing the location in the code at which Error.captureStackTrace() was called.

      const myObject = {};
      Error.captureStackTrace(myObject);
      myObject.stack; // Similar to `new Error().stack` diff --git a/docs/Next/classes/MongoTopologyClosedError.html b/docs/Next/classes/MongoTopologyClosedError.html index 01da504ec64..95f4c855141 100644 --- a/docs/Next/classes/MongoTopologyClosedError.html +++ b/docs/Next/classes/MongoTopologyClosedError.html @@ -1,6 +1,6 @@ MongoTopologyClosedError | mongodb

      Class MongoTopologyClosedError

      An error generated when an attempt is made to operate on a dropped, or otherwise unavailable, database.

      -

      Hierarchy (view full)

      Constructors

      Hierarchy (view full)

      Constructors

      Properties

      cause? code? connectionGeneration? @@ -19,8 +19,8 @@

      Meant for internal use only.

      Parameters

      • message: string = 'Topology is closed'

      Returns MongoTopologyClosedError

      This class is only meant to be constructed within the driver. This constructor is not subject to semantic versioning compatibility guarantees and may change at any time.

      -

    Properties

    cause?: Error
    code?: string | number

    This is a number in MongoServerError and a string in MongoDriverError

    -
    connectionGeneration?: number
    message: string
    stack?: string
    topologyVersion?: TopologyVersion
    stackTraceLimit: number

    The Error.stackTraceLimit property specifies the number of stack frames +

    Properties

    cause?: Error
    code?: string | number

    This is a number in MongoServerError and a string in MongoDriverError

    +
    connectionGeneration?: number
    message: string
    stack?: string
    topologyVersion?: TopologyVersion
    stackTraceLimit: number

    The Error.stackTraceLimit property specifies the number of stack frames collected by a stack trace (whether generated by new Error().stack or Error.captureStackTrace(obj)).

    The default value is 10 but may be set to any valid JavaScript number. Changes @@ -28,10 +28,10 @@

    If set to a non-number value, or set to a negative number, stack traces will not capture any frames.

    Accessors

    • get errmsg(): string
    • Legacy name for server error responses

      -

      Returns string

    • get errorLabels(): string[]
    • Returns string[]

    • get name(): string
    • Returns string

    Methods

    • Checks the error to see if it has an error label

      +

      Returns string

    • get errorLabels(): string[]
    • Returns string[]

    • get name(): string
    • Returns string

    Methods

    • Checks the error to see if it has an error label

      Parameters

      • label: string

        The error label to check for

      Returns boolean

      returns true if the error has the provided error label

      -
    • Creates a .stack property on targetObject, which when accessed returns a string representing the location in the code at which Error.captureStackTrace() was called.

      const myObject = {};
      Error.captureStackTrace(myObject);
      myObject.stack; // Similar to `new Error().stack` diff --git a/docs/Next/classes/MongoTransactionError.html b/docs/Next/classes/MongoTransactionError.html index fd6db5928dd..769f9a3e073 100644 --- a/docs/Next/classes/MongoTransactionError.html +++ b/docs/Next/classes/MongoTransactionError.html @@ -1,6 +1,6 @@ MongoTransactionError | mongodb

      Class MongoTransactionError

      An error generated when the user makes a mistake in the usage of transactions. (e.g. attempting to commit a transaction with a readPreference other than primary)

      -

      Hierarchy (view full)

      Constructors

      Hierarchy (view full)

      Constructors

      Properties

      cause? code? connectionGeneration? @@ -19,8 +19,8 @@

      Meant for internal use only.

      Parameters

      • message: string

      Returns MongoTransactionError

      This class is only meant to be constructed within the driver. This constructor is not subject to semantic versioning compatibility guarantees and may change at any time.

      -

    Properties

    cause?: Error
    code?: string | number

    This is a number in MongoServerError and a string in MongoDriverError

    -
    connectionGeneration?: number
    message: string
    stack?: string
    topologyVersion?: TopologyVersion
    stackTraceLimit: number

    The Error.stackTraceLimit property specifies the number of stack frames +

    Properties

    cause?: Error
    code?: string | number

    This is a number in MongoServerError and a string in MongoDriverError

    +
    connectionGeneration?: number
    message: string
    stack?: string
    topologyVersion?: TopologyVersion
    stackTraceLimit: number

    The Error.stackTraceLimit property specifies the number of stack frames collected by a stack trace (whether generated by new Error().stack or Error.captureStackTrace(obj)).

    The default value is 10 but may be set to any valid JavaScript number. Changes @@ -28,10 +28,10 @@

    If set to a non-number value, or set to a negative number, stack traces will not capture any frames.

    Accessors

    • get errmsg(): string
    • Legacy name for server error responses

      -

      Returns string

    • get errorLabels(): string[]
    • Returns string[]

    • get name(): string
    • Returns string

    Methods

    • Checks the error to see if it has an error label

      +

      Returns string

    • get errorLabels(): string[]
    • Returns string[]

    • get name(): string
    • Returns string

    Methods

    • Checks the error to see if it has an error label

      Parameters

      • label: string

        The error label to check for

      Returns boolean

      returns true if the error has the provided error label

      -
    • Creates a .stack property on targetObject, which when accessed returns a string representing the location in the code at which Error.captureStackTrace() was called.

      const myObject = {};
      Error.captureStackTrace(myObject);
      myObject.stack; // Similar to `new Error().stack` diff --git a/docs/Next/classes/MongoUnexpectedServerResponseError.html b/docs/Next/classes/MongoUnexpectedServerResponseError.html index 77f702a6848..56fe79bbfb3 100644 --- a/docs/Next/classes/MongoUnexpectedServerResponseError.html +++ b/docs/Next/classes/MongoUnexpectedServerResponseError.html @@ -7,7 +7,7 @@ selection returns a server that does not support retryable operations, this error is used. This scenario is unlikely as retryable support would also have been determined on the first attempt but it is possible the state change could report a selectable server that does not support retries.

      -

    Hierarchy (view full)

    Constructors

    Hierarchy (view full)

    Constructors

    Properties

    cause? code? connectionGeneration? @@ -26,8 +26,8 @@

    Meant for internal use only.

    Parameters

    • message: string
    • Optionaloptions: {
          cause?: Error;
      }
      • Optionalcause?: Error

    Returns MongoUnexpectedServerResponseError

    This class is only meant to be constructed within the driver. This constructor is not subject to semantic versioning compatibility guarantees and may change at any time.

    -

    Properties

    cause?: Error
    code?: string | number

    This is a number in MongoServerError and a string in MongoDriverError

    -
    connectionGeneration?: number
    message: string
    stack?: string
    topologyVersion?: TopologyVersion
    stackTraceLimit: number

    The Error.stackTraceLimit property specifies the number of stack frames +

    Properties

    cause?: Error
    code?: string | number

    This is a number in MongoServerError and a string in MongoDriverError

    +
    connectionGeneration?: number
    message: string
    stack?: string
    topologyVersion?: TopologyVersion
    stackTraceLimit: number

    The Error.stackTraceLimit property specifies the number of stack frames collected by a stack trace (whether generated by new Error().stack or Error.captureStackTrace(obj)).

    The default value is 10 but may be set to any valid JavaScript number. Changes @@ -35,10 +35,10 @@

    If set to a non-number value, or set to a negative number, stack traces will not capture any frames.

    Accessors

    • get errmsg(): string
    • Legacy name for server error responses

      -

      Returns string

    • get errorLabels(): string[]
    • Returns string[]

    • get name(): string
    • Returns string

    Methods

    • Checks the error to see if it has an error label

      +

      Returns string

    • get errorLabels(): string[]
    • Returns string[]

    • get name(): string
    • Returns string

    Methods

    • Checks the error to see if it has an error label

      Parameters

      • label: string

        The error label to check for

      Returns boolean

      returns true if the error has the provided error label

      -
    • Creates a .stack property on targetObject, which when accessed returns a string representing the location in the code at which Error.captureStackTrace() was called.

      const myObject = {};
      Error.captureStackTrace(myObject);
      myObject.stack; // Similar to `new Error().stack` diff --git a/docs/Next/classes/MongoWriteConcernError.html b/docs/Next/classes/MongoWriteConcernError.html index 8642413b9c3..4730c2e6c40 100644 --- a/docs/Next/classes/MongoWriteConcernError.html +++ b/docs/Next/classes/MongoWriteConcernError.html @@ -1,5 +1,5 @@ MongoWriteConcernError | mongodb

      Class MongoWriteConcernError

      An error thrown when the server reports a writeConcernError

      -

      Hierarchy (view full)

      Constructors

      Hierarchy (view full)

      Constructors

      Properties

      cause? code? codeName? @@ -24,10 +24,10 @@

      Meant for internal use only.

      Parameters

      Returns MongoWriteConcernError

      This class is only meant to be constructed within the driver. This constructor is not subject to semantic versioning compatibility guarantees and may change at any time.

      -

    Properties

    cause?: Error
    code?: string | number

    This is a number in MongoServerError and a string in MongoDriverError

    -
    codeName?: string
    connectionGeneration?: number
    errInfo?: Document
    errorResponse: ErrorDescription

    Raw error result document returned by server.

    -
    message: string
    ok?: number
    result: Document

    The result document

    -
    stack?: string
    topologyVersion?: TopologyVersion
    writeConcernError?: Document
    stackTraceLimit: number

    The Error.stackTraceLimit property specifies the number of stack frames +

    Properties

    cause?: Error
    code?: string | number

    This is a number in MongoServerError and a string in MongoDriverError

    +
    codeName?: string
    connectionGeneration?: number
    errInfo?: Document
    errorResponse: ErrorDescription

    Raw error result document returned by server.

    +
    message: string
    ok?: number
    result: Document

    The result document

    +
    stack?: string
    topologyVersion?: TopologyVersion
    writeConcernError?: Document
    stackTraceLimit: number

    The Error.stackTraceLimit property specifies the number of stack frames collected by a stack trace (whether generated by new Error().stack or Error.captureStackTrace(obj)).

    The default value is 10 but may be set to any valid JavaScript number. Changes @@ -35,10 +35,10 @@

    If set to a non-number value, or set to a negative number, stack traces will not capture any frames.

    Accessors

    • get errmsg(): string
    • Legacy name for server error responses

      -

      Returns string

    • get errorLabels(): string[]
    • Returns string[]

    • get name(): string
    • Returns string

    Methods

    • Checks the error to see if it has an error label

      +

      Returns string

    • get errorLabels(): string[]
    • Returns string[]

    • get name(): string
    • Returns string

    Methods

    • Checks the error to see if it has an error label

      Parameters

      • label: string

        The error label to check for

      Returns boolean

      returns true if the error has the provided error label

      -
    • Creates a .stack property on targetObject, which when accessed returns a string representing the location in the code at which Error.captureStackTrace() was called.

      const myObject = {};
      Error.captureStackTrace(myObject);
      myObject.stack; // Similar to `new Error().stack` diff --git a/docs/Next/classes/RunCommandCursor.html b/docs/Next/classes/RunCommandCursor.html index 33ef1bc8575..c1193b362a6 100644 --- a/docs/Next/classes/RunCommandCursor.html +++ b/docs/Next/classes/RunCommandCursor.html @@ -59,13 +59,13 @@ on once setMaxListeners -

    Properties

    command: Readonly<Record<string, any>>
    getMoreOptions: {
        batchSize?: number;
        comment?: any;
        maxAwaitTimeMS?: number;
    } = {}
    signal: undefined | AbortSignal
    captureRejections: boolean

    Value: boolean

    +

    Properties

    command: Readonly<Record<string, any>>
    getMoreOptions: {
        batchSize?: number;
        comment?: any;
        maxAwaitTimeMS?: number;
    } = {}
    signal: undefined | AbortSignal
    captureRejections: boolean

    Value: boolean

    Change the default captureRejections option on all new EventEmitter objects.

    v13.4.0, v12.16.0

    captureRejectionSymbol: typeof captureRejectionSymbol

    Value: Symbol.for('nodejs.rejection')

    See how to write a custom rejection handler.

    v13.4.0, v12.16.0

    -
    CLOSE: "close" = ...
    defaultMaxListeners: number

    By default, a maximum of 10 listeners can be registered for any single +

    CLOSE: "close" = ...
    defaultMaxListeners: number

    By default, a maximum of 10 listeners can be registered for any single event. This limit can be changed for individual EventEmitter instances using the emitter.setMaxListeners(n) method. To change the default for allEventEmitter instances, the events.defaultMaxListeners property @@ -95,13 +95,13 @@ regular 'error' listener is installed.

    v13.6.0, v12.17.0

    Accessors

    • get closed(): boolean
    • The cursor is closed and all remaining locally buffered documents have been iterated.

      -

      Returns boolean

    • get id(): undefined | Long
    • The cursor has no id until it receives a response from the initial cursor creating command.

      +

      Returns boolean

    • get id(): undefined | Long
    • The cursor has no id until it receives a response from the initial cursor creating command.

      It is non-zero for as long as the database has an open cursor.

      The initiating command may receive a zero id if the entire result is in the firstBatch.

      -

      Returns undefined | Long

    • get killed(): boolean
    • A killCursors command was attempted on this cursor. This is performed if the cursor id is non zero.

      -

      Returns boolean

    Methods

    • Type Parameters

      • K

      Parameters

      • error: Error
      • event: string | symbol
      • Rest...args: AnyRest

      Returns void

    • Unsupported for RunCommandCursor: various cursor flags must be configured directly on command document

      +

      Returns boolean

    Methods

    • Type Parameters

      • K

      Parameters

      • error: Error
      • event: string | symbol
      • Rest...args: AnyRest

      Returns void

    • Frees any client-side resources used by the cursor.

      Parameters

      • Optional_options: {
            timeoutMS?: number;
        }

        timeoutMS is deprecated and has no effect

        • OptionaltimeoutMS?: number

          timeoutMS has no effect and will be removed in a future release.

          -

      Returns Promise<void>

    • Synchronously calls each of the listeners registered for the event named eventName, in the order they were registered, passing the supplied arguments +

    Returns Promise<void>

    • Synchronously calls each of the listeners registered for the event named eventName, in the order they were registered, passing the supplied arguments to each.

      Returns true if the event had listeners, false otherwise.

      import { EventEmitter } from 'node:events';
      const myEmitter = new EventEmitter();

      // First listener
      myEmitter.on('event', function firstListener() {
      console.log('Helloooo! first listener');
      });
      // Second listener
      myEmitter.on('event', function secondListener(arg1, arg2) {
      console.log(`event with parameters ${arg1}, ${arg2} in second listener`);
      });
      // Third listener
      myEmitter.on('event', function thirdListener(...args) {
      const parameters = args.join(', ');
      console.log(`event with parameters ${parameters} in third listener`);
      });

      console.log(myEmitter.listeners('event'));

      myEmitter.emit('event', 1, 2, 3, 4, 5);

      // Prints:
      // [
      // [Function: firstListener],
      // [Function: secondListener],
      // [Function: thirdListener]
      // ]
      // Helloooo! first listener
      // event with parameters 1, 2 in second listener
      // event with parameters 1, 2, 3, 4, 5 in third listener @@ -133,10 +133,13 @@
        • (doc): boolean | void
        • Parameters

          • doc: any

          Returns boolean | void

    Returns Promise<void>

    • Will be removed in a future release. Use for await...of instead.
    -
    • Check if there is any document still available in the cursor.

      +

      Do not call this method while a previous hasNext(), next() or tryNext() call on the same +cursor is still pending. Overlapping calls are not supported.

      +

      Returns Promise<boolean>

    • Returns the number of listeners listening for the event named eventName. If listener is provided, it will return how many times the listener is found in the list of the listeners of the event.

      Type Parameters

      • EventKey extends "close"

      Parameters

      Returns number

      v3.2.0

      @@ -166,9 +169,11 @@
      const cursor: FindCursor<Document> = coll.find();
      const mappedCursor: FindCursor<number> = cursor.map(doc => Object.keys(doc).length);
      const keyCounts: number[] = await mappedCursor.toArray(); // cursor.toArray() still returns Document[]
      -
    • Alias for emitter.removeListener().

      +

      Do not call this method while a previous hasNext(), next() or tryNext() call on the same +cursor is still pending. Overlapping calls are not supported.

      +

      Returns Promise<any>

    • Removes all listeners, or those of the specified eventName.

      It is bad practice to remove listeners added elsewhere in the code, particularly when the EventEmitter instance was created by some other component or module (e.g. sockets or file streams).

      @@ -409,7 +414,7 @@
    • Rewind this cursor to its uninitialized state. Any options that are present on the cursor will remain in effect. Iterating this cursor will cause new queries to be sent to the server, even if the resultant data has already been retrieved by this cursor.

      -

      Returns void

    • Controls the getMore.batchSize field

      Parameters

      • batchSize: number

        the number documents to return in the nextBatch

      Returns this

    • Controls the getMore.maxTimeMS field. Only valid when cursor is tailable await

      Parameters

      • maxTimeMS: number

        the number of milliseconds to wait for new data

        -

      Returns this

    • Returns an array of documents. The caller is responsible for making sure that there +

    Returns this

    • Returns an array of documents. The caller is responsible for making sure that there is enough memory to store the results. Note that the array only contains partial results when this cursor had been previously accessed. In that case, cursor.rewind() can be used to reset the cursor.

      -

      Returns Promise<any[]>

    • Try to get the next available document from the cursor or null if an empty batch is returned

      +

      Do not call this method while a previous hasNext(), next() or tryNext() call on the same +cursor is still pending. Overlapping calls are not supported.

      +

      Returns Promise<any>

    • Listens once to the abort event on the provided signal.

      +

    Returns this