diff --git a/docs/Next/classes/AbstractCursor.html b/docs/Next/classes/AbstractCursor.html index eee81cb00a8..05f42d05804 100644 --- a/docs/Next/classes/AbstractCursor.html +++ b/docs/Next/classes/AbstractCursor.html @@ -1,4 +1,4 @@ -AbstractCursor | mongodb

Class AbstractCursor<TSchema, CursorEvents>Abstract

Type Parameters

Hierarchy (view full)

Implements

Properties

[asyncDispose] +AbstractCursor | mongodb

Class AbstractCursor<TSchema, CursorEvents>Abstract

Type Parameters

Hierarchy (view full)

Implements

Properties

[asyncDispose]: (() => Promise<void>)

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

-
signal: undefined | AbortSignal
captureRejections: boolean

Value: boolean

+
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 @@ -91,57 +91,57 @@ 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

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

    -

    Parameters

    • Optionaloptions: {
          timeoutMS?: number;
      }
      • OptionaltimeoutMS?: number

    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 this

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

    +

    Parameters

    • Optionaloptions: {
          timeoutMS?: number;
      }
      • OptionaltimeoutMS?: number

    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

    Type Parameters

    • EventKey extends string | number | symbol

    Parameters

    Returns boolean

    v0.1.26

    -
  • Returns an array listing the events for which the emitter has registered listeners. The values in the array are strings or Symbols.

    import { EventEmitter } from 'node:events';

    const myEE = new EventEmitter();
    myEE.on('foo', () => {});
    myEE.on('bar', () => {});

    const sym = Symbol('symbol');
    myEE.on(sym, () => {});

    console.log(myEE.eventNames());
    // Prints: [ 'foo', 'bar', Symbol(symbol) ]

    Returns string[]

    v6.0.0

    -
  • Iterates over all the documents for this cursor using the iterator, callback pattern.

    If the iterator returns false, iteration will stop.

    Parameters

    • iterator: ((doc: TSchema) => boolean | void)

      The iteration callback.

        • (doc): boolean | void
        • Parameters

          Returns boolean | void

    Returns Promise<void>

    • Will be removed in a future release. Use for await...of instead.
    -
  • 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 string | number | symbol

    Parameters

    Returns number

    v3.2.0

    -
  • Map all documents using the provided function If there is a transform set on the cursor, that will be called first and the result passed to this function's transform.

    Type Parameters

    • T = any

    Parameters

    • transform: ((doc: TSchema) => T)

      The mapping transformation method.

      @@ -162,16 +162,16 @@
      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)

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

Returns this

Methods

Methods

  • Execute a command

    +

Returns Promise<Document>

Returns Promise<Document>

Returns Promise<ListDatabasesResult>

Returns Promise<Document>

Returns Promise<boolean>

Returns Promise<Document>

Returns Promise<Document>

Returns Promise<Document>

+

Returns Promise<Document>

diff --git a/docs/Next/classes/AggregationCursor.html b/docs/Next/classes/AggregationCursor.html index 38d92adf5c8..a54e43ed938 100644 --- a/docs/Next/classes/AggregationCursor.html +++ b/docs/Next/classes/AggregationCursor.html @@ -2,7 +2,7 @@ allowing for iteration over the results returned from the underlying query. It supports one by one document iteration, conversion to an array or can be iterated as a Node 4.X or higher stream

-

Type Parameters

Hierarchy (view full)

Properties

Type Parameters

  • TSchema = any

Hierarchy (view full)

Properties

[asyncDispose]: (() => Promise<void>)

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

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

Value: boolean

+
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 @@ -110,72 +110,72 @@ 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 this

Returns this

Returns this

Constructors

Properties

batchType: BatchType
currentIndex: number
operations: T[]
originalIndexes: number[]
originalZeroIndex: number
size: number
sizeBytes: number
diff --git a/docs/Next/classes/BulkOperationBase.html b/docs/Next/classes/BulkOperationBase.html index 83ff329b0d8..47521b93516 100644 --- a/docs/Next/classes/BulkOperationBase.html +++ b/docs/Next/classes/BulkOperationBase.html @@ -1,4 +1,4 @@ -BulkOperationBase | mongodb

Class BulkOperationBaseAbstract

Hierarchy (view full)

Properties

isOrdered +BulkOperationBase | mongodb

Class BulkOperationBaseAbstract

Hierarchy (view full)

Properties

Accessors

batches bsonOptions @@ -9,14 +9,14 @@ find insert raw -

Properties

isOrdered: boolean
operationId?: number

Accessors

Methods

  • Builds a find operation for an update/updateOne/delete/deleteOne/replaceOne. +

Properties

isOrdered: boolean
operationId?: number

Accessors

Methods

  • Builds a find operation for an update/updateOne/delete/deleteOne/replaceOne. Returns a builder object used to complete the definition of the operation.

    Parameters

    Returns FindOperators

    const bulkOp = collection.initializeOrderedBulkOp();

    // Add an updateOne to the bulkOp
    bulkOp.find({ a: 1 }).updateOne({ $set: { b: 2 } });

    // Add an updateMany to the bulkOp
    bulkOp.find({ c: 3 }).update({ $set: { d: 4 } });

    // Add an upsert
    bulkOp.find({ e: 5 }).upsert().updateOne({ $set: { f: 6 } });

    // Add a deletion
    bulkOp.find({ g: 7 }).deleteOne();

    // Add a multi deletion
    bulkOp.find({ h: 8 }).delete();

    // Add a replaceOne
    bulkOp.find({ i: 9 }).replaceOne({writeConcern: { j: 10 }});

    // Update using a pipeline (requires Mongodb 4.2 or higher)
    bulk.find({ k: 11, y: { $exists: true }, z: { $exists: true } }).updateOne([
    { $set: { total: { $sum: [ '$y', '$z' ] } } }
    ]);

    // All of the ops will now be executed
    await bulkOp.execute();
    -
  • Add a single insert document to the bulk operation

    Parameters

    Returns BulkOperationBase

    const bulkOp = collection.initializeOrderedBulkOp();

    // Adds three inserts to the bulkOp.
    bulkOp
    .insert({ a: 1 })
    .insert({ b: 2 })
    .insert({ c: 3 });
    await bulkOp.execute();
    -
+
diff --git a/docs/Next/classes/BulkWriteResult.html b/docs/Next/classes/BulkWriteResult.html index 61ee40576c8..fec81cf3686 100644 --- a/docs/Next/classes/BulkWriteResult.html +++ b/docs/Next/classes/BulkWriteResult.html @@ -1,5 +1,5 @@ BulkWriteResult | mongodb

Class BulkWriteResult

The result of a bulk write.

-

Properties

Properties

deletedCount: number

Number of documents deleted.

-
insertedCount: number

Number of documents inserted.

-
insertedIds: {
    [key: number]: any;
}

Inserted document generated Id's, hash key is the index of the originating operation

-
matchedCount: number

Number of documents matched for update.

-
modifiedCount: number

Number of documents modified.

-
upsertedCount: number

Number of documents upserted.

-
upsertedIds: {
    [key: number]: any;
}

Upserted document generated Id's, hash key is the index of the originating operation

-

Accessors

  • get ok(): number
  • Evaluates to true if the bulk operation correctly executes

    -

    Returns number

Methods

  • Returns the number of write errors from the bulk operation

    -

    Returns number

  • Returns true if the bulk operation contains a write error

    -

    Returns boolean

+
insertedCount: number

Number of documents inserted.

+
insertedIds: {
    [key: number]: any;
}

Inserted document generated Id's, hash key is the index of the originating operation

+
matchedCount: number

Number of documents matched for update.

+
modifiedCount: number

Number of documents modified.

+
upsertedCount: number

Number of documents upserted.

+
upsertedIds: {
    [key: number]: any;
}

Upserted document generated Id's, hash key is the index of the originating operation

+

Accessors

  • get ok(): number
  • Evaluates to true if the bulk operation correctly executes

    +

    Returns number

Methods

  • Returns the number of write errors from the bulk operation

    +

    Returns number

  • Returns true if the bulk operation contains a write error

    +

    Returns boolean

diff --git a/docs/Next/classes/CancellationToken.html b/docs/Next/classes/CancellationToken.html index 859734b1a50..5cd5e7ff4d0 100644 --- a/docs/Next/classes/CancellationToken.html +++ b/docs/Next/classes/CancellationToken.html @@ -1,5 +1,5 @@ CancellationToken | mongodb

Class CancellationToken

Will be removed in favor of AbortSignal in the next major release.

-

Hierarchy (view full)

Constructors

Hierarchy (view full)

Constructors

Properties

captureRejections: boolean

Value: boolean

+

Constructors

Properties

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')

@@ -64,42 +64,42 @@

v13.6.0, v12.17.0

Methods

  • Type Parameters

    • K

    Parameters

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

    Returns 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

    Type Parameters

    • EventKey extends "cancel"

    Parameters

    • event: symbol | EventKey
    • Rest...args: Parameters<{
          cancel(): void;
      }[EventKey]>

    Returns boolean

    v0.1.26

    -
  • Returns an array listing the events for which the emitter has registered listeners. The values in the array are strings or Symbols.

    import { EventEmitter } from 'node:events';

    const myEE = new EventEmitter();
    myEE.on('foo', () => {});
    myEE.on('bar', () => {});

    const sym = Symbol('symbol');
    myEE.on(sym, () => {});

    console.log(myEE.eventNames());
    // Prints: [ 'foo', 'bar', Symbol(symbol) ]

    Returns string[]

    v6.0.0

    -
  • 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 "cancel"

    Parameters

    Returns number

    v3.2.0

    -
  • Returns a copy of the array of listeners for the event named eventName.

    server.on('connection', (stream) => {
    console.log('someone connected!');
    });
    console.log(util.inspect(server.listeners('connection')));
    // Prints: [ [Function] ]

    Type Parameters

    • EventKey extends "cancel"

    Parameters

    Returns {
        cancel(): void;
    }[EventKey][]

    v0.1.26

    -
  • Adds the listener function to the end of the listeners array for the event named eventName. No checks are made to see if the listener has already been added. Multiple calls passing the same combination of eventName and listener will result in the listener being added, and called, multiple times.

    @@ -114,7 +114,7 @@

    Type Parameters

    • EventKey extends "cancel"

    Parameters

    • event: EventKey
    • listener: {
          cancel(): void;
      }[EventKey]

      The callback function

    Returns this

    v0.1.101

    -
  • Adds the listener function to the end of the listeners array for the event +

  • Adds the listener function to the end of the listeners array for the event named eventName. No checks are made to see if the listener has already been added. Multiple calls passing the same combination of eventName and listener will result in the listener being added, and called, multiple times.

    @@ -129,7 +129,7 @@

    Parameters

    • event: CommonEvents
    • listener: ((eventName: string | symbol, listener: GenericListener) => void)

      The callback function

        • (eventName, listener): void
        • Parameters

          Returns void

    Returns this

    v0.1.101

    -
  • Adds the listener function to the end of the listeners array for the event +

  • Adds the listener function to the end of the listeners array for the event named eventName. No checks are made to see if the listener has already been added. Multiple calls passing the same combination of eventName and listener will result in the listener being added, and called, multiple times.

    @@ -144,7 +144,7 @@

    Parameters

    Returns this

    v0.1.101

    -
  • Adds a one-time listener function for the event named eventName. The next time eventName is triggered, this listener is removed and then invoked.

    server.once('connection', (stream) => {
    console.log('Ah, we have our first user!');
    });
    @@ -157,7 +157,7 @@

    Type Parameters

    • EventKey extends "cancel"

    Parameters

    • event: EventKey
    • listener: {
          cancel(): void;
      }[EventKey]

      The callback function

    Returns this

    v0.3.0

    -
  • Adds a one-time listener function for the event named eventName. The +

  • Adds a one-time listener function for the event named eventName. The next time eventName is triggered, this listener is removed and then invoked.

    server.once('connection', (stream) => {
    console.log('Ah, we have our first user!');
    });
    @@ -170,7 +170,7 @@

    Parameters

    • event: CommonEvents
    • listener: ((eventName: string | symbol, listener: GenericListener) => void)

      The callback function

        • (eventName, listener): void
        • Parameters

          Returns void

    Returns this

    v0.3.0

    -
  • Adds a one-time listener function for the event named eventName. The +

  • Adds a one-time listener function for the event named eventName. The next time eventName is triggered, this listener is removed and then invoked.

    server.once('connection', (stream) => {
    console.log('Ah, we have our first user!');
    });
    @@ -183,7 +183,7 @@

    Parameters

    Returns this

    v0.3.0

    -
  • Adds the listener function to the beginning of the listeners array for the event named eventName. No checks are made to see if the listener has already been added. Multiple calls passing the same combination of eventName and listener will result in the listener being added, and called, multiple times.

    @@ -193,7 +193,7 @@

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

    Type Parameters

    • EventKey extends "cancel"

    Parameters

    • event: EventKey
    • listener: {
          cancel(): void;
      }[EventKey]

      The callback function

    Returns this

    v6.0.0

    -
  • Adds the listener function to the beginning of the listeners array for the +

  • Adds the listener function to the beginning of the listeners array for the event named eventName. No checks are made to see if the listener has already been added. Multiple calls passing the same combination of eventName and listener will result in the listener being added, and called, multiple times.

    @@ -203,7 +203,7 @@

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

    Parameters

    • event: CommonEvents
    • listener: ((eventName: string | symbol, listener: GenericListener) => void)

      The callback function

        • (eventName, listener): void
        • Parameters

          Returns void

    Returns this

    v6.0.0

    -
  • Adds the listener function to the beginning of the listeners array for the +

  • Adds the listener function to the beginning of the listeners array for the event named eventName. No checks are made to see if the listener has already been added. Multiple calls passing the same combination of eventName and listener will result in the listener being added, and called, multiple times.

    @@ -213,7 +213,7 @@

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

    Parameters

    Returns this

    v6.0.0

    -
  • Adds a one-timelistener function for the event named eventName to the beginning of the listeners array. The next time eventName is triggered, this listener is removed, and then invoked.

    server.prependOnceListener('connection', (stream) => {
    console.log('Ah, we have our first user!');
    });
    @@ -221,7 +221,7 @@

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

    Type Parameters

    • EventKey extends "cancel"

    Parameters

    • event: EventKey
    • listener: {
          cancel(): void;
      }[EventKey]

      The callback function

    Returns this

    v6.0.0

    -
  • Adds a one-timelistener function for the event named eventName to the beginning of the listeners array. The next time eventName is triggered, this +

  • Adds a one-timelistener function for the event named eventName to the beginning of the listeners array. The next time eventName is triggered, this listener is removed, and then invoked.

    server.prependOnceListener('connection', (stream) => {
    console.log('Ah, we have our first user!');
    });
    @@ -229,7 +229,7 @@

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

    Parameters

    • event: CommonEvents
    • listener: ((eventName: string | symbol, listener: GenericListener) => void)

      The callback function

        • (eventName, listener): void
        • Parameters

          Returns void

    Returns this

    v6.0.0

    -
  • Adds a one-timelistener function for the event named eventName to the beginning of the listeners array. The next time eventName is triggered, this +

  • Adds a one-timelistener function for the event named eventName to the beginning of the listeners array. The next time eventName is triggered, this listener is removed, and then invoked.

    server.prependOnceListener('connection', (stream) => {
    console.log('Ah, we have our first user!');
    });
    @@ -237,19 +237,19 @@

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

    Parameters

    Returns this

    v6.0.0

    -
  • Returns a copy of the array of listeners for the event named eventName, including any wrappers (such as those created by .once()).

    import { EventEmitter } from 'node:events';
    const emitter = new EventEmitter();
    emitter.once('log', () => console.log('log once'));

    // Returns a new Array with a function `onceWrapper` which has a property
    // `listener` which contains the original listener bound above
    const listeners = emitter.rawListeners('log');
    const logFnWrapper = listeners[0];

    // Logs "log once" to the console and does not unbind the `once` event
    logFnWrapper.listener();

    // Logs "log once" to the console and removes the listener
    logFnWrapper();

    emitter.on('log', () => console.log('log persistently'));
    // Will return a new Array with a single function bound by `.on()` above
    const newListeners = emitter.rawListeners('log');

    // Logs "log persistently" twice
    newListeners[0]();
    emitter.emit('log');

    Type Parameters

    • EventKey extends "cancel"

    Parameters

    Returns {
        cancel(): void;
    }[EventKey][]

    v9.4.0

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

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

    Type Parameters

    • EventKey extends "cancel"

    Parameters

    • Optionalevent: string | symbol | EventKey

    Returns this

    v0.1.26

    -
  • Removes the specified listener from the listener array for the event named eventName.

    const callback = (stream) => {
    console.log('someone connected!');
    };
    server.on('connection', callback);
    // ...
    server.removeListener('connection', callback);
    @@ -276,7 +276,7 @@

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

    Type Parameters

    • EventKey extends "cancel"

    Parameters

    Returns this

    v0.1.26

    -
  • Removes the specified listener from the listener array for the event named eventName.

    +
  • Removes the specified listener from the listener array for the event named eventName.

    const callback = (stream) => {
    console.log('someone connected!');
    };
    server.on('connection', callback);
    // ...
    server.removeListener('connection', callback);
    @@ -303,7 +303,7 @@

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

    Parameters

    Returns this

    v0.1.26

    -
  • Removes the specified listener from the listener array for the event named eventName.

    +
  • Removes the specified listener from the listener array for the event named eventName.

    const callback = (stream) => {
    console.log('someone connected!');
    };
    server.on('connection', callback);
    // ...
    server.removeListener('connection', callback);
    @@ -330,13 +330,13 @@

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

    Parameters

    Returns this

    v0.1.26

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

    -
  • Experimental

    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/ChangeStream.html b/docs/Next/classes/ChangeStream.html index e4c1d304b0f..bce95b6b0c9 100644 --- a/docs/Next/classes/ChangeStream.html +++ b/docs/Next/classes/ChangeStream.html @@ -1,5 +1,5 @@ ChangeStream | mongodb

    Class ChangeStream<TSchema, TChange>

    Creates a new Change Stream instance. Normally created using Collection.watch().

    -

    Type Parameters

    Hierarchy (view full)

    Implements

    Properties

    Type Parameters

    Hierarchy (view full)

    Implements

    Properties

    [asyncDispose]: (() => Promise<void>)

    An alias for ChangeStream.close|ChangeStream.close().

    -
    namespace: MongoDBNamespace
    options: ChangeStreamOptions & {
        writeConcern?: undefined;
    }

    WriteConcern can still be present on the options because +

    namespace: MongoDBNamespace
    options: ChangeStreamOptions & {
        writeConcern?: undefined;
    }

    WriteConcern can still be present on the options because we inherit options from the client/db/collection. The key must be present on the options in order to delete it. This allows typescript to delete the key but will not allow a writeConcern to be assigned as a property on options.

    -
    pipeline: Document[]
    streamOptions?: CursorStreamOptions
    type: symbol
    captureRejections: boolean

    Value: boolean

    +
    pipeline: Document[]
    streamOptions?: CursorStreamOptions
    type: symbol
    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')

    @@ -64,7 +64,7 @@
    CHANGE: "change" = CHANGE

    Fired for each new matching change in the specified namespace. Attaching a change event listener to a Change Stream will switch the stream into flowing mode. Data will then be passed as soon as it is available.

    -
    CLOSE: "close" = CLOSE
    defaultMaxListeners: number

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

    CLOSE: "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 @@ -89,54 +89,54 @@ listeners, respectively. Its name property is set to 'MaxListenersExceededWarning'.

    v0.11.2

    -
    END: "end" = END
    ERROR: "error" = ERROR
    errorMonitor: typeof errorMonitor

    This symbol shall be used to install a listener for only monitoring 'error' events. Listeners installed using this symbol are called before the regular 'error' listeners are called.

    +
    END: "end" = END
    ERROR: "error" = ERROR
    errorMonitor: typeof errorMonitor

    This symbol shall be used to install a listener for only monitoring 'error' events. Listeners installed using this symbol are called before the regular 'error' listeners are called.

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

    v13.6.0, v12.17.0

    -
    INIT: "init" = INIT
    MORE: "more" = MORE
    RESPONSE: "response" = RESPONSE
    RESUME_TOKEN_CHANGED: "resumeTokenChanged" = RESUME_TOKEN_CHANGED

    Emitted each time the change stream stores a new resume token.

    -

    Accessors

    • get resumeToken(): unknown
    • The cached resume token that is used to resume after the most recently returned change.

      -

      Returns unknown

    Methods

    • Type Parameters

      • K

      Parameters

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

      Returns void

    INIT: "init" = INIT
    MORE: "more" = MORE
    RESPONSE: "response" = RESPONSE
    RESUME_TOKEN_CHANGED: "resumeTokenChanged" = RESUME_TOKEN_CHANGED

    Emitted each time the change stream stores a new resume token.

    +

    Accessors

    • get resumeToken(): unknown
    • The cached resume token that is used to resume after the most recently returned change.

      +

      Returns unknown

    Methods

    • Type Parameters

      • K

      Parameters

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

      Returns void

    • Frees the internal resources used by the change stream.

      -

      Returns Promise<void>

    • Frees the internal resources used by the change stream.

      +

      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

      Type Parameters

      Parameters

      Returns boolean

      v0.1.26

      -
    • Returns an array listing the events for which the emitter has registered listeners. The values in the array are strings or Symbols.

      import { EventEmitter } from 'node:events';

      const myEE = new EventEmitter();
      myEE.on('foo', () => {});
      myEE.on('bar', () => {});

      const sym = Symbol('symbol');
      myEE.on(sym, () => {});

      console.log(myEE.eventNames());
      // Prints: [ 'foo', 'bar', Symbol(symbol) ]

      Returns string[]

      v6.0.0

      -
    • Check if there is any document still available in the Change Stream

      -

      Returns Promise<boolean>

    • Check if there is any document still available in the Change Stream

      +

      Returns Promise<boolean>

    • Adds the listener function to the end of the listeners array for the event named eventName. No checks are made to see if the listener has already been added. Multiple calls passing the same combination of eventName and listener will result in the listener being added, and called, multiple times.

      @@ -151,7 +151,7 @@

      Type Parameters

      Parameters

      Returns this

      v0.1.101

      -
    • Adds the listener function to the end of the listeners array for the event +

    • Adds the listener function to the end of the listeners array for the event named eventName. No checks are made to see if the listener has already been added. Multiple calls passing the same combination of eventName and listener will result in the listener being added, and called, multiple times.

      @@ -166,7 +166,7 @@

      Parameters

      • event: CommonEvents
      • listener: ((eventName: string | symbol, listener: GenericListener) => void)

        The callback function

          • (eventName, listener): void
          • Parameters

            Returns void

      Returns this

      v0.1.101

      -
    • Adds the listener function to the end of the listeners array for the event +

    • Adds the listener function to the end of the listeners array for the event named eventName. No checks are made to see if the listener has already been added. Multiple calls passing the same combination of eventName and listener will result in the listener being added, and called, multiple times.

      @@ -181,7 +181,7 @@

      Parameters

      Returns this

      v0.1.101

      -
    • Adds a one-time listener function for the event named eventName. The next time eventName is triggered, this listener is removed and then invoked.

      server.once('connection', (stream) => {
      console.log('Ah, we have our first user!');
      });
      @@ -194,7 +194,7 @@

      Type Parameters

      Parameters

      Returns this

      v0.3.0

      -
    • Adds a one-time listener function for the event named eventName. The +

    • Adds a one-time listener function for the event named eventName. The next time eventName is triggered, this listener is removed and then invoked.

      server.once('connection', (stream) => {
      console.log('Ah, we have our first user!');
      });
      @@ -207,7 +207,7 @@

      Parameters

      • event: CommonEvents
      • listener: ((eventName: string | symbol, listener: GenericListener) => void)

        The callback function

          • (eventName, listener): void
          • Parameters

            Returns void

      Returns this

      v0.3.0

      -
    • Adds a one-time listener function for the event named eventName. The +

    • Adds a one-time listener function for the event named eventName. The next time eventName is triggered, this listener is removed and then invoked.

      server.once('connection', (stream) => {
      console.log('Ah, we have our first user!');
      });
      @@ -220,7 +220,7 @@

      Parameters

      Returns this

      v0.3.0

      -
    • Adds the listener function to the beginning of the listeners array for the event named eventName. No checks are made to see if the listener has already been added. Multiple calls passing the same combination of eventName and listener will result in the listener being added, and called, multiple times.

      @@ -230,7 +230,7 @@

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

      Type Parameters

      Parameters

      Returns this

      v6.0.0

      -
    • Adds the listener function to the beginning of the listeners array for the +

    • Adds the listener function to the beginning of the listeners array for the event named eventName. No checks are made to see if the listener has already been added. Multiple calls passing the same combination of eventName and listener will result in the listener being added, and called, multiple times.

      @@ -240,7 +240,7 @@

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

      Parameters

      • event: CommonEvents
      • listener: ((eventName: string | symbol, listener: GenericListener) => void)

        The callback function

          • (eventName, listener): void
          • Parameters

            Returns void

      Returns this

      v6.0.0

      -
    • Adds the listener function to the beginning of the listeners array for the +

    • Adds the listener function to the beginning of the listeners array for the event named eventName. No checks are made to see if the listener has already been added. Multiple calls passing the same combination of eventName and listener will result in the listener being added, and called, multiple times.

      @@ -250,7 +250,7 @@

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

      Parameters

      Returns this

      v6.0.0

      -
    • Adds a one-timelistener function for the event named eventName to the beginning of the listeners array. The next time eventName is triggered, this listener is removed, and then invoked.

      server.prependOnceListener('connection', (stream) => {
      console.log('Ah, we have our first user!');
      });
      @@ -258,7 +258,7 @@

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

      Type Parameters

      Parameters

      Returns this

      v6.0.0

      -
    • Adds a one-timelistener function for the event named eventName to the beginning of the listeners array. The next time eventName is triggered, this +

    • Adds a one-timelistener function for the event named eventName to the beginning of the listeners array. The next time eventName is triggered, this listener is removed, and then invoked.

      server.prependOnceListener('connection', (stream) => {
      console.log('Ah, we have our first user!');
      });
      @@ -266,7 +266,7 @@

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

      Parameters

      • event: CommonEvents
      • listener: ((eventName: string | symbol, listener: GenericListener) => void)

        The callback function

          • (eventName, listener): void
          • Parameters

            Returns void

      Returns this

      v6.0.0

      -
    • Adds a one-timelistener function for the event named eventName to the beginning of the listeners array. The next time eventName is triggered, this +

    • Adds a one-timelistener function for the event named eventName to the beginning of the listeners array. The next time eventName is triggered, this listener is removed, and then invoked.

      server.prependOnceListener('connection', (stream) => {
      console.log('Ah, we have our first user!');
      });
      @@ -274,19 +274,19 @@

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

      Parameters

      Returns this

      v6.0.0

      -
    • Returns a copy of the array of listeners for the event named eventName, including any wrappers (such as those created by .once()).

      import { EventEmitter } from 'node:events';
      const emitter = new EventEmitter();
      emitter.once('log', () => console.log('log once'));

      // Returns a new Array with a function `onceWrapper` which has a property
      // `listener` which contains the original listener bound above
      const listeners = emitter.rawListeners('log');
      const logFnWrapper = listeners[0];

      // Logs "log once" to the console and does not unbind the `once` event
      logFnWrapper.listener();

      // Logs "log once" to the console and removes the listener
      logFnWrapper();

      emitter.on('log', () => console.log('log persistently'));
      // Will return a new Array with a single function bound by `.on()` above
      const newListeners = emitter.rawListeners('log');

      // Logs "log persistently" twice
      newListeners[0]();
      emitter.emit('log');

      Type Parameters

      Parameters

      Returns ChangeStreamEvents<TSchema, TChange>[EventKey][]

      v9.4.0

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

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

      Type Parameters

      Parameters

      • Optionalevent: string | symbol | EventKey

      Returns this

      v0.1.26

      -
    • Removes the specified listener from the listener array for the event named eventName.

      const callback = (stream) => {
      console.log('someone connected!');
      };
      server.on('connection', callback);
      // ...
      server.removeListener('connection', callback);
      @@ -313,7 +313,7 @@

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

      Type Parameters

      Parameters

      Returns this

      v0.1.26

      -
    • Removes the specified listener from the listener array for the event named eventName.

      +
    • Removes the specified listener from the listener array for the event named eventName.

      const callback = (stream) => {
      console.log('someone connected!');
      };
      server.on('connection', callback);
      // ...
      server.removeListener('connection', callback);
      @@ -340,7 +340,7 @@

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

      Parameters

      Returns this

      v0.1.26

      -
    • Removes the specified listener from the listener array for the event named eventName.

      +
    • Removes the specified listener from the listener array for the event named eventName.

      const callback = (stream) => {
      console.log('someone connected!');
      };
      server.on('connection', callback);
      // ...
      server.removeListener('connection', callback);
      @@ -367,18 +367,18 @@

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

      Parameters

      Returns this

      v0.1.26

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

      -
    • Return a modified Readable stream including a possible transform method.

      NOTE: When using a Stream to process change stream events, the stream will NOT automatically resume in the case a resumable error is encountered.

      Parameters

      Returns Readable & AsyncIterable<TChange, any, any>

      MongoChangeStreamError if the underlying cursor or the change stream is closed

      -
    • Try to get the next available document from the Change Stream's cursor or null if an empty batch is returned

      -

      Returns Promise<null | TChange>

    • Experimental

      Listens once to the abort event on the provided signal.

      +
    • Try to get the next available document from the Change Stream's cursor or null if an empty batch is returned

      +

      Returns Promise<null | TChange>

    • Experimental

      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/ClientEncryption.html b/docs/Next/classes/ClientEncryption.html index f54a6ae9b0d..7dcc60848cd 100644 --- a/docs/Next/classes/ClientEncryption.html +++ b/docs/Next/classes/ClientEncryption.html @@ -1,5 +1,5 @@ ClientEncryption | mongodb

      Class ClientEncryption

      The public interface for explicit in-use encryption

      -

      Constructors

      Constructors

      Accessors

      Methods

      addKeyAltName createDataKey @@ -20,7 +20,7 @@
      new ClientEncryption(mongoClient, {
      keyVaultNamespace: 'client.encryption',
      kmsProviders: {
      aws: {
      accessKeyId: AWS_ACCESS_KEY,
      secretAccessKey: AWS_SECRET_KEY
      }
      }
      });
      -

    Accessors

    Methods

    Accessors

    Methods

    • Adds a keyAltName to a key identified by the provided _id.

      This method resolves to/returns the old key value (prior to adding the new altKeyName).

      Parameters

      • _id: Binary

        The id of the document to update.

      • keyAltName: string

        a keyAltName to search for a key

        @@ -29,7 +29,7 @@
    • Creates a data key used for explicit encryption and inserts it into the key vault namespace

      Parameters

      Returns Promise<UUID>

      // Using async/await to create a local key
      const dataKeyId = await clientEncryption.createDataKey('local');
      @@ -39,7 +39,7 @@
      // Using async/await to create an aws key with a keyAltName
      const dataKeyId = await clientEncryption.createDataKey('aws', {
      masterKey: {
      region: 'us-east-1',
      key: 'xxxxxxxxxxxxxx' // CMK ARN here
      },
      keyAltNames: [ 'mySpecialKey' ]
      });
      -
    • Explicitly decrypt a provided encrypted value

      Type Parameters

      • T = any

      Parameters

      • value: Binary

        An encrypted value

      Returns Promise<T>

      a Promise that either resolves with the decrypted value, or rejects with an error

      // Decrypting value with async/await API
      async function decryptMyValue(value) {
      return clientEncryption.decrypt(value);
      }
      -
    • Deletes the key with the provided id from the keyvault, if it exists.

      Parameters

      Returns Promise<DeleteResult>

      // delete a key by _id
      const id = new Binary(); // id is a bson binary subtype 4 object
      const { deletedCount } = await clientEncryption.deleteKey(id);

      if (deletedCount != null && deletedCount > 0) {
      // successful deletion
      }
      -
    • Explicitly encrypt a provided value. Note that either options.keyId or options.keyAltName must be specified. Specifying both options.keyId and options.keyAltName is considered an error.

      Parameters

      Returns Promise<Binary>

      a Promise that either resolves with the encrypted value, or rejects with an error.

      @@ -68,7 +68,7 @@
      // Encryption using a keyAltName
      async function encryptMyData(value) {
      await clientEncryption.createDataKey('local', { keyAltNames: 'mySpecialKey' });
      return clientEncryption.encrypt(value, { keyAltName: 'mySpecialKey', algorithm: 'AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic' });
      }
      -
  • Finds a key in the keyvault with the specified _id.

    Returns a promise that either resolves to a DataKey if a document matches the key or null if no documents match the id. The promise rejects with an error if an error is thrown.

    Parameters

    Returns Promise<null | DataKey>

    // getting a key by id
    const id = new Binary(); // id is a bson binary subtype 4 object
    const key = await clientEncryption.getKey(id);
    if (!key) {
    // key is null if there was no matching key
    }
    -
  • Finds a key in the keyvault which has the specified keyAltName.

    Parameters

    • keyAltName: string

      a keyAltName to search for a key

    Returns Promise<null | WithId<DataKey>>

    Returns a promise that either resolves to a DataKey if a document matches the key or null if no documents match the keyAltName. The promise rejects with an error if an error is thrown.

    // get a key by alt name
    const keyAltName = 'keyAltName';
    const key = await clientEncryption.getKeyByAltName(keyAltName);
    if (!key) {
    // key is null if there is no matching key
    }
    -
  • Adds a keyAltName to a key identified by the provided _id.

    This method resolves to/returns the old key value (prior to removing the new altKeyName).

    If the removed keyAltName is the last keyAltName for that key, the altKeyNames property is unset from the document.

    Parameters

    • _id: Binary

      The id of the document to update.

      @@ -108,7 +108,7 @@
  • Searches the keyvault for any data keys matching the provided filter. If there are matches, rewrapManyDataKey then attempts to re-wrap the data keys using the provided options.

    +
  • Searches the keyvault for any data keys matching the provided filter. If there are matches, rewrapManyDataKey then attempts to re-wrap the data keys using the provided options.

    If no matches are found, then no bulk write is performed.

    Returns Promise<{
        bulkWriteResult?: BulkWriteResult;
    }>

    // rewrapping all data data keys (using a filter that matches all documents)
    const filter = {};

    const result = await clientEncryption.rewrapManyDataKey(filter);
    if (result.bulkWriteResult != null) {
    // keys were re-wrapped, results will be available in the bulkWrite object.
    }
    @@ -116,4 +116,4 @@
    // attempting to rewrap all data keys with no matches
    const filter = { _id: new Binary() } // assume _id matches no documents in the database
    const result = await clientEncryption.rewrapManyDataKey(filter);

    if (result.bulkWriteResult == null) {
    // no keys matched, `bulkWriteResult` does not exist on the result object
    }
    -
+
diff --git a/docs/Next/classes/ClientSession.html b/docs/Next/classes/ClientSession.html index 556740f36a0..5a02010d011 100644 --- a/docs/Next/classes/ClientSession.html +++ b/docs/Next/classes/ClientSession.html @@ -1,6 +1,6 @@ ClientSession | mongodb

Class ClientSession

A class representing a client session on the server

NOTE: not meant to be instantiated directly.

-

Hierarchy (view full)

Implements

Properties

Hierarchy (view full)

Implements

Properties

[asyncDispose]: (() => Promise<void>)
clientOptions: MongoOptions
clusterTime?: ClusterTime
defaultTransactionOptions: TransactionOptions
explicit: boolean
hasEnded: boolean
operationTime?: Timestamp
snapshotEnabled: boolean
supports: {
    causalConsistency: boolean;
}
timeoutMS?: number

Specifies the time an operation in a given ClientSession will run until it throws a timeout error

-
transaction: Transaction
    +
clientOptions: MongoOptions
clusterTime?: ClusterTime
defaultTransactionOptions: TransactionOptions
explicit: boolean
hasEnded: boolean
operationTime?: Timestamp
snapshotEnabled: boolean
supports: {
    causalConsistency: boolean;
}
timeoutMS?: number

Specifies the time an operation in a given ClientSession will run until it throws a timeout error

+
transaction: Transaction
  • Will be made internal in the next major release
-
captureRejections: boolean

Value: boolean

+
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')

@@ -94,60 +94,60 @@ regular 'error' listener is installed.

v13.6.0, v12.17.0

Accessors

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

  • Aborts the currently active transaction in this session.

    Parameters

    • Optionaloptions: {
          timeoutMS?: number;
      }

      Optional options, can be used to override defaultTimeoutMS.

      -
      • OptionaltimeoutMS?: number

    Returns Promise<void>

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

    +
    • OptionaltimeoutMS?: number

Returns Promise<void>

  • Advances the clusterTime for a ClientSession to the provided clusterTime of another ClientSession

    Parameters

    • clusterTime: ClusterTime

      the $clusterTime returned by the server from another session in the form of a document containing the BSON.Timestamp clusterTime and signature

      -

    Returns void

  • Advances the operationTime for a ClientSession.

    +

Returns void

Returns void

Returns Promise<void>

Returns Promise<void>

Returns boolean

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

-

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'
}
]);
-

Returns Promise<DeleteResult>

Returns Promise<DeleteResult>

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[]>

  • Returns Promise<boolean>

    Returns Promise<Document>

    Returns Promise<boolean>

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

  • Returns Promise<ModifyResult<TSchema>>

  • Parameters

    Returns Promise<null | WithId<TSchema>>

  • Parameters

    Returns Promise<null | WithId<TSchema>>

  • Parameters

    Returns Promise<null | WithId<TSchema>>

  • Returns Promise<IndexDescriptionInfo[]>

  • Parameters

    Returns Promise<IndexDescriptionCompact>

  • Parameters

    Returns Promise<IndexDescriptionCompact | IndexDescriptionInfo[]>

  • Parameters

    Returns Promise<IndexDescriptionInfo[]>

  • Returns Promise<boolean>

    Returns Promise<IndexDescriptionInfo[]>

  • Parameters

    Returns Promise<IndexDescriptionCompact>

  • Parameters

    Returns Promise<IndexDescriptionCompact | IndexDescriptionInfo[]>

  • Returns Promise<IndexDescriptionCompact>

  • Returns Promise<InsertManyResult<TSchema>>

    Returns Promise<InsertOneResult<TSchema>>

    Returns Promise<boolean>

    Returns ListIndexesCursor

    Returns Promise<Document>

    Returns Promise<UpdateResult<TSchema>>

    Returns Promise<UpdateResult<TSchema>>

    Returns Promise<UpdateResult<TSchema>>

    +
    diff --git a/docs/Next/classes/CommandFailedEvent.html b/docs/Next/classes/CommandFailedEvent.html index ddd05136357..42f4ad0f35d 100644 --- a/docs/Next/classes/CommandFailedEvent.html +++ b/docs/Next/classes/CommandFailedEvent.html @@ -1,5 +1,5 @@ CommandFailedEvent | mongodb

    Class CommandFailedEvent

    An event indicating the failure of a given command

    -

    Properties

    Properties

    address: string
    commandName: string
    connectionId?: string | number

    Driver generated connection id

    -
    databaseName: string
    duration: number
    failure: Error
    requestId: number
    serverConnectionId: null | bigint

    Server generated connection id +

    Properties

    address: string
    commandName: string
    connectionId?: string | number

    Driver generated connection id

    +
    databaseName: string
    duration: number
    failure: Error
    requestId: number
    serverConnectionId: null | bigint

    Server generated connection id Distinct from the connection id and is returned by the hello or legacy hello response as "connectionId" from the server on 4.2+.

    -
    serviceId?: ObjectId

    Accessors

    +
    serviceId?: ObjectId

    Accessors

    diff --git a/docs/Next/classes/CommandStartedEvent.html b/docs/Next/classes/CommandStartedEvent.html index a3349b2c63d..5c31e55d6b6 100644 --- a/docs/Next/classes/CommandStartedEvent.html +++ b/docs/Next/classes/CommandStartedEvent.html @@ -1,5 +1,5 @@ CommandStartedEvent | mongodb

    Class CommandStartedEvent

    An event indicating the start of a given command

    -

    Properties

    Properties

    address: string
    command: Document
    commandName: string
    commandObj?: Document
    connectionId?: string | number

    Driver generated connection id

    -
    databaseName: string
    requestId: number
    serverConnectionId: null | bigint

    Server generated connection id +

    Properties

    address: string
    command: Document
    commandName: string
    commandObj?: Document
    connectionId?: string | number

    Driver generated connection id

    +
    databaseName: string
    requestId: number
    serverConnectionId: null | bigint

    Server generated connection id Distinct from the connection id and is returned by the hello or legacy hello response as "connectionId" from the server on 4.2+.

    -
    serviceId?: ObjectId

    Accessors

    +
    serviceId?: ObjectId

    Accessors

    diff --git a/docs/Next/classes/CommandSucceededEvent.html b/docs/Next/classes/CommandSucceededEvent.html index 8c2d9e9bdf9..e918028b2b9 100644 --- a/docs/Next/classes/CommandSucceededEvent.html +++ b/docs/Next/classes/CommandSucceededEvent.html @@ -1,5 +1,5 @@ CommandSucceededEvent | mongodb

    Class CommandSucceededEvent

    An event indicating the success of a given command

    -

    Properties

    Properties

    address: string
    commandName: string
    connectionId?: string | number

    Driver generated connection id

    -
    databaseName: string
    duration: number
    reply: unknown
    requestId: number
    serverConnectionId: null | bigint

    Server generated connection id +

    Properties

    address: string
    commandName: string
    connectionId?: string | number

    Driver generated connection id

    +
    databaseName: string
    duration: number
    reply: unknown
    requestId: number
    serverConnectionId: null | bigint

    Server generated connection id Distinct from the connection id and is returned by the hello or legacy hello response as "connectionId" from the server on 4.2+.

    -
    serviceId?: ObjectId

    Accessors

    +
    serviceId?: ObjectId

    Accessors

    diff --git a/docs/Next/classes/ConnectionCheckOutFailedEvent.html b/docs/Next/classes/ConnectionCheckOutFailedEvent.html index bbff4d7e69f..5ad905911b6 100644 --- a/docs/Next/classes/ConnectionCheckOutFailedEvent.html +++ b/docs/Next/classes/ConnectionCheckOutFailedEvent.html @@ -1,13 +1,13 @@ ConnectionCheckOutFailedEvent | mongodb

    Class ConnectionCheckOutFailedEvent

    An event published when a request to check a connection out fails

    -

    Hierarchy (view full)

    Properties

    Hierarchy (view full)

    Properties

    address: string

    The address (host/port pair) of the pool

    -
    durationMS: number

    The time it took to check out the connection. +

    durationMS: number

    The time it took to check out the connection. More specifically, the time elapsed between emitting a ConnectionCheckOutStartedEvent and emitting this event as part of the same check out.

    -
    reason: string

    The reason the attempt to check out failed

    -
    time: Date

    A timestamp when the event was created

    -
    +
    reason: string

    The reason the attempt to check out failed

    +
    time: Date

    A timestamp when the event was created

    +
    diff --git a/docs/Next/classes/ConnectionCheckOutStartedEvent.html b/docs/Next/classes/ConnectionCheckOutStartedEvent.html index fed6005d5a6..e0e32e857ed 100644 --- a/docs/Next/classes/ConnectionCheckOutStartedEvent.html +++ b/docs/Next/classes/ConnectionCheckOutStartedEvent.html @@ -1,6 +1,6 @@ ConnectionCheckOutStartedEvent | mongodb

    Class ConnectionCheckOutStartedEvent

    An event published when a request to check a connection out begins

    -

    Hierarchy (view full)

    Properties

    Hierarchy (view full)

    Properties

    Properties

    address: string

    The address (host/port pair) of the pool

    -
    time: Date

    A timestamp when the event was created

    -
    +
    time: Date

    A timestamp when the event was created

    +
    diff --git a/docs/Next/classes/ConnectionCheckedInEvent.html b/docs/Next/classes/ConnectionCheckedInEvent.html index 6777ccf9755..2352196b930 100644 --- a/docs/Next/classes/ConnectionCheckedInEvent.html +++ b/docs/Next/classes/ConnectionCheckedInEvent.html @@ -1,8 +1,8 @@ ConnectionCheckedInEvent | mongodb

    Class ConnectionCheckedInEvent

    An event published when a connection is checked into the connection pool

    -

    Hierarchy (view full)

    Properties

    Hierarchy (view full)

    Properties

    address: string

    The address (host/port pair) of the pool

    -
    connectionId: number | "<monitor>"

    The id of the connection

    -
    time: Date

    A timestamp when the event was created

    -
    +
    connectionId: number | "<monitor>"

    The id of the connection

    +
    time: Date

    A timestamp when the event was created

    +
    diff --git a/docs/Next/classes/ConnectionCheckedOutEvent.html b/docs/Next/classes/ConnectionCheckedOutEvent.html index cbcf0b2fb3e..fef379eb407 100644 --- a/docs/Next/classes/ConnectionCheckedOutEvent.html +++ b/docs/Next/classes/ConnectionCheckedOutEvent.html @@ -1,13 +1,13 @@ ConnectionCheckedOutEvent | mongodb

    Class ConnectionCheckedOutEvent

    An event published when a connection is checked out of the connection pool

    -

    Hierarchy (view full)

    Properties

    Hierarchy (view full)

    Properties

    address: string

    The address (host/port pair) of the pool

    -
    connectionId: number | "<monitor>"

    The id of the connection

    -
    durationMS: number

    The time it took to check out the connection. +

    connectionId: number | "<monitor>"

    The id of the connection

    +
    durationMS: number

    The time it took to check out the connection. More specifically, the time elapsed between emitting a ConnectionCheckOutStartedEvent and emitting this event as part of the same checking out.

    -
    time: Date

    A timestamp when the event was created

    -
    +
    time: Date

    A timestamp when the event was created

    +
    diff --git a/docs/Next/classes/ConnectionClosedEvent.html b/docs/Next/classes/ConnectionClosedEvent.html index 3221bb64c9a..61656f963ba 100644 --- a/docs/Next/classes/ConnectionClosedEvent.html +++ b/docs/Next/classes/ConnectionClosedEvent.html @@ -1,11 +1,11 @@ ConnectionClosedEvent | mongodb

    Class ConnectionClosedEvent

    An event published when a connection is closed

    -

    Hierarchy (view full)

    Properties

    Hierarchy (view full)

    Properties

    address: string

    The address (host/port pair) of the pool

    -
    connectionId: number | "<monitor>"

    The id of the connection

    -
    reason: string

    The reason the connection was closed

    -
    serviceId?: ObjectId
    time: Date

    A timestamp when the event was created

    -
    +
    connectionId: number | "<monitor>"

    The id of the connection

    +
    reason: string

    The reason the connection was closed

    +
    serviceId?: ObjectId
    time: Date

    A timestamp when the event was created

    +
    diff --git a/docs/Next/classes/ConnectionCreatedEvent.html b/docs/Next/classes/ConnectionCreatedEvent.html index 0e2936cd7f2..921a4fa0c74 100644 --- a/docs/Next/classes/ConnectionCreatedEvent.html +++ b/docs/Next/classes/ConnectionCreatedEvent.html @@ -1,8 +1,8 @@ ConnectionCreatedEvent | mongodb

    Class ConnectionCreatedEvent

    An event published when a connection pool creates a new connection

    -

    Hierarchy (view full)

    Properties

    Hierarchy (view full)

    Properties

    address: string

    The address (host/port pair) of the pool

    -
    connectionId: number | "<monitor>"

    A monotonically increasing, per-pool id for the newly created connection

    -
    time: Date

    A timestamp when the event was created

    -
    +
    connectionId: number | "<monitor>"

    A monotonically increasing, per-pool id for the newly created connection

    +
    time: Date

    A timestamp when the event was created

    +
    diff --git a/docs/Next/classes/ConnectionPoolClearedEvent.html b/docs/Next/classes/ConnectionPoolClearedEvent.html index d5c4e9b9c1b..1ae262f9ca4 100644 --- a/docs/Next/classes/ConnectionPoolClearedEvent.html +++ b/docs/Next/classes/ConnectionPoolClearedEvent.html @@ -1,7 +1,7 @@ ConnectionPoolClearedEvent | mongodb

    Class ConnectionPoolClearedEvent

    An event published when a connection pool is cleared

    -

    Hierarchy (view full)

    Properties

    Hierarchy (view full)

    Properties

    address: string

    The address (host/port pair) of the pool

    -
    interruptInUseConnections?: boolean
    time: Date

    A timestamp when the event was created

    -
    +
    interruptInUseConnections?: boolean
    time: Date

    A timestamp when the event was created

    +
    diff --git a/docs/Next/classes/ConnectionPoolClosedEvent.html b/docs/Next/classes/ConnectionPoolClosedEvent.html index 1ed7db397bc..3de5a8a6d0e 100644 --- a/docs/Next/classes/ConnectionPoolClosedEvent.html +++ b/docs/Next/classes/ConnectionPoolClosedEvent.html @@ -1,6 +1,6 @@ ConnectionPoolClosedEvent | mongodb

    Class ConnectionPoolClosedEvent

    An event published when a connection pool is closed

    -

    Hierarchy (view full)

    Properties

    Hierarchy (view full)

    Properties

    Properties

    address: string

    The address (host/port pair) of the pool

    -
    time: Date

    A timestamp when the event was created

    -
    +
    time: Date

    A timestamp when the event was created

    +
    diff --git a/docs/Next/classes/ConnectionPoolCreatedEvent.html b/docs/Next/classes/ConnectionPoolCreatedEvent.html index d4f07d65232..35082861ee0 100644 --- a/docs/Next/classes/ConnectionPoolCreatedEvent.html +++ b/docs/Next/classes/ConnectionPoolCreatedEvent.html @@ -1,8 +1,8 @@ ConnectionPoolCreatedEvent | mongodb

    Class ConnectionPoolCreatedEvent

    An event published when a connection pool is created

    -

    Hierarchy (view full)

    Properties

    Hierarchy (view full)

    Properties

    Properties

    address: string

    The address (host/port pair) of the pool

    -
    options: Pick<ConnectionPoolOptions,
        | "waitQueueTimeoutMS"
        | "maxConnecting"
        | "maxIdleTimeMS"
        | "maxPoolSize"
        | "minPoolSize">

    The options used to create this connection pool

    -
    time: Date

    A timestamp when the event was created

    -
    +
    options: Pick<ConnectionPoolOptions,
        | "waitQueueTimeoutMS"
        | "maxConnecting"
        | "maxIdleTimeMS"
        | "maxPoolSize"
        | "minPoolSize">

    The options used to create this connection pool

    +
    time: Date

    A timestamp when the event was created

    +
    diff --git a/docs/Next/classes/ConnectionPoolMonitoringEvent.html b/docs/Next/classes/ConnectionPoolMonitoringEvent.html index 78adef5b6ac..513d2a6119d 100644 --- a/docs/Next/classes/ConnectionPoolMonitoringEvent.html +++ b/docs/Next/classes/ConnectionPoolMonitoringEvent.html @@ -1,6 +1,6 @@ ConnectionPoolMonitoringEvent | mongodb

    Class ConnectionPoolMonitoringEventAbstract

    The base export class for all monitoring events published from the connection pool

    -

    Hierarchy (view full)

    +
    time: Date

    A timestamp when the event was created

    +
    diff --git a/docs/Next/classes/ConnectionPoolReadyEvent.html b/docs/Next/classes/ConnectionPoolReadyEvent.html index b720796b49f..c6bba41bd32 100644 --- a/docs/Next/classes/ConnectionPoolReadyEvent.html +++ b/docs/Next/classes/ConnectionPoolReadyEvent.html @@ -1,6 +1,6 @@ ConnectionPoolReadyEvent | mongodb

    Class ConnectionPoolReadyEvent

    An event published when a connection pool is ready

    -

    Hierarchy (view full)

    Properties

    Hierarchy (view full)

    Properties

    Properties

    address: string

    The address (host/port pair) of the pool

    -
    time: Date

    A timestamp when the event was created

    -
    +
    time: Date

    A timestamp when the event was created

    +
    diff --git a/docs/Next/classes/ConnectionReadyEvent.html b/docs/Next/classes/ConnectionReadyEvent.html index f9d4449c656..05c545b0fcb 100644 --- a/docs/Next/classes/ConnectionReadyEvent.html +++ b/docs/Next/classes/ConnectionReadyEvent.html @@ -1,11 +1,11 @@ ConnectionReadyEvent | mongodb

    Class ConnectionReadyEvent

    An event published when a connection is ready for use

    -

    Hierarchy (view full)

    Properties

    Hierarchy (view full)

    Properties

    address: string

    The address (host/port pair) of the pool

    -
    connectionId: number | "<monitor>"

    The id of the connection

    -
    durationMS: number

    The time it took to establish the connection. +

    connectionId: number | "<monitor>"

    The id of the connection

    +
    durationMS: number

    The time it took to establish the connection. In accordance with the definition of establishment of a connection specified by ConnectionPoolOptions.maxConnecting, it is the time elapsed between emitting a ConnectionCreatedEvent @@ -13,5 +13,5 @@

    Naturally, when establishing a connection is part of checking out, this duration is not greater than ConnectionCheckedOutEvent.duration.

    -
    time: Date

    A timestamp when the event was created

    -
    +
    time: Date

    A timestamp when the event was created

    +
    diff --git a/docs/Next/classes/Db.html b/docs/Next/classes/Db.html index 3aa8e6ad9a6..69fa80f3c77 100644 --- a/docs/Next/classes/Db.html +++ b/docs/Next/classes/Db.html @@ -2,7 +2,7 @@
    import { MongoClient } from 'mongodb';

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

    const client = new MongoClient('mongodb://localhost:27017');
    const db = client.db();

    // Create a collection that validates our union
    await db.createCollection<Pet>('pets', {
    validator: { $expr: { $in: ['$kind', ['dog', 'cat', 'fish']] } }
    })
    -

    Constructors

    Constructors

    Properties

    Parameters

    • client: MongoClient

      The MongoClient for the database.

    • databaseName: string

      The name of the database this instance represents.

    • Optionaloptions: DbOptions

      Optional settings for Db construction.

      -

    Returns Db

    Properties

    client: MongoClient

    Gets the MongoClient associated with the Db.

    -
    SYSTEM_COMMAND_COLLECTION: string = CONSTANTS.SYSTEM_COMMAND_COLLECTION
    SYSTEM_INDEX_COLLECTION: string = CONSTANTS.SYSTEM_INDEX_COLLECTION
    SYSTEM_JS_COLLECTION: string = CONSTANTS.SYSTEM_JS_COLLECTION
    SYSTEM_NAMESPACE_COLLECTION: string = CONSTANTS.SYSTEM_NAMESPACE_COLLECTION
    SYSTEM_PROFILE_COLLECTION: string = CONSTANTS.SYSTEM_PROFILE_COLLECTION
    SYSTEM_USER_COLLECTION: string = CONSTANTS.SYSTEM_USER_COLLECTION

    Accessors

    • get readPreference(): ReadPreference
    • The current readPreference of the Db. If not explicitly defined for +

    Returns Db

    Properties

    client: MongoClient

    Gets the MongoClient associated with the Db.

    +
    SYSTEM_COMMAND_COLLECTION: string = CONSTANTS.SYSTEM_COMMAND_COLLECTION
    SYSTEM_INDEX_COLLECTION: string = CONSTANTS.SYSTEM_INDEX_COLLECTION
    SYSTEM_JS_COLLECTION: string = CONSTANTS.SYSTEM_JS_COLLECTION
    SYSTEM_NAMESPACE_COLLECTION: string = CONSTANTS.SYSTEM_NAMESPACE_COLLECTION
    SYSTEM_PROFILE_COLLECTION: string = CONSTANTS.SYSTEM_PROFILE_COLLECTION
    SYSTEM_USER_COLLECTION: string = CONSTANTS.SYSTEM_USER_COLLECTION

    Accessors

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

      -

      Returns ReadPreference

    • get secondaryOk(): boolean
    • Check if a secondary can be used (because the read preference is not set to primary)

      -

      Returns boolean

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

    Methods

    • get secondaryOk(): boolean
    • Check if a secondary can be used (because the read preference is not set to primary)

      +

      Returns boolean

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

    Methods

    • Returns a reference to a MongoDB Collection. If it does not exist it will be created implicitly.

      +

    Returns AggregationCursor<T>

    • Returns a reference to a MongoDB Collection. If it does not exist it will be created implicitly.

      Collection namespace validation is performed server-side.

      Type Parameters

      Parameters

      Returns Collection<TSchema>

      return the new Collection instance

      -
    • Execute a command

      +

    Returns Promise<Collection<Document>[]>

    • Execute a command

      Parameters

      Returns Promise<Document>

      This command does not inherit options from the MongoClient.

      @@ -78,37 +78,37 @@
    • writeConcern - sourced from writeConcern set on the TransactionOptions

    Attaching any of the above fields to the command will have no effect as the driver will overwrite the value.

    -
    • Create a new collection on a server with the specified options. Use this to create capped collections. +

    • Creates an index on the db and collection.

      +

    Returns Promise<Collection<TSchema>>

    • Creates an index on the db and collection.

      Parameters

      • name: string

        Name of the collection to create the index on.

      • indexSpec: IndexSpecification

        Specify the field to index, or an index specification

      • Optionaloptions: CreateIndexesOptions

        Optional settings for the command

        -

      Returns Promise<string>

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

      +

    Returns Promise<string>

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

      Parameters

      • name: string

        Name of collection to drop

      • Optionaloptions: DropCollectionOptions

        Optional settings for the command

        -

      Returns Promise<boolean>

    • Drop a database, removing it permanently from the server.

      +

    Returns Promise<boolean>

    • Drop a database, removing it permanently from the server.

      Parameters

      Returns Promise<boolean>

    • Retrieves this collections index info.

      +

    Returns Promise<boolean>

    Returns Promise<IndexDescriptionInfo[]>

  • Parameters

    Returns Promise<IndexDescriptionCompact>

  • Parameters

    Returns Promise<IndexDescriptionCompact | IndexDescriptionInfo[]>

  • Parameters

    • name: string

    Returns Promise<IndexDescriptionCompact>

    • Retrieve the current profiling Level for MongoDB

      +

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

  • Parameters

    Returns ListCollectionsCursor<CollectionInfo>

  • Type Parameters

    Parameters

    Returns ListCollectionsCursor<T>

    • Retrieve the current profiling Level for MongoDB

      Parameters

      Returns Promise<string>

    • Remove a user from a database

      +

    Returns Promise<string>

    • Remove a user from a database

      Parameters

      • username: string

        The username to remove

      • Optionaloptions: RemoveUserOptions

        Optional settings for the command

        -

      Returns Promise<boolean>

    Returns Promise<boolean>

    • Rename a collection.

      Type Parameters

      Parameters

      • fromCollection: string

        Name of current collection to rename

      • toCollection: string

        New name of of the collection

      • Optionaloptions: RenameOptions

        Optional settings for the command

      Returns Promise<Collection<TSchema>>

      This operation does not inherit options from the MongoClient.

      -
    • A low level cursor API providing basic driver functionality:

      • ClientSession management
      • ReadPreference for server selection
      • @@ -116,12 +116,12 @@

      Parameters

      • command: Document

        The command that will start a cursor on the server.

      • Optionaloptions: RunCursorCommandOptions

        Configurations for running the command, bson options will apply to getMores

        -

      Returns RunCommandCursor

    • Set the current profiling level of MongoDB

      +

    Returns RunCommandCursor

    • Get all the db statistics.

      +

    Returns Promise<ProfilingLevel>

    Returns Promise<Document>

    +
    diff --git a/docs/Next/classes/ExplainableCursor.html b/docs/Next/classes/ExplainableCursor.html index 750b25608a2..ae2f1f655c1 100644 --- a/docs/Next/classes/ExplainableCursor.html +++ b/docs/Next/classes/ExplainableCursor.html @@ -1,5 +1,5 @@ ExplainableCursor | mongodb

    Class ExplainableCursor<TSchema>Abstract

    A base class for any cursors that have explain() methods.

    -

    Type Parameters

    • TSchema

    Hierarchy (view full)

    Properties

    Type Parameters

    • TSchema

    Hierarchy (view full)

    Properties

    [asyncDispose]: (() => Promise<void>)

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

    -
    signal: undefined | AbortSignal
    captureRejections: boolean

    Value: boolean

    +
    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,58 +94,58 @@ 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.

      -

      Parameters

      • Optionaloptions: {
            timeoutMS?: number;
        }
        • OptionaltimeoutMS?: number

      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 this

    Returns this

    Returns this

    Returns this

    Returns this

    Returns this

    Returns this

    Returns this

    Returns this

    Returns this

    Returns this

    Returns this

    Returns this

    Returns this

    Returns this

    Returns this

    Returns this

    Returns this

    Properties

    bulkOperation: BulkOperationBase

    Methods

    • Specifies arrayFilters for UpdateOne or UpdateMany bulk operations.

      +

      Parameters

      Returns this

    • Upsert modifier for update bulk operation, noting that this operation is an upsert.

      +

      Returns this

    diff --git a/docs/Next/classes/GridFSBucket.html b/docs/Next/classes/GridFSBucket.html index 8651aaaefd1..a5afb2f25d7 100644 --- a/docs/Next/classes/GridFSBucket.html +++ b/docs/Next/classes/GridFSBucket.html @@ -1,5 +1,5 @@ GridFSBucket | mongodb

    Class GridFSBucket

    Constructor for a streaming GridFS interface

    -

    Hierarchy (view full)

    Constructors

    Hierarchy (view full)

    Constructors

    Properties

    captureRejections: boolean

    Value: boolean

    +

    Constructors

    Properties

    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')

    @@ -76,48 +76,48 @@ files collections. This event is fired either when 1) it determines that no index creation is necessary, 2) when it successfully creates the necessary indexes.

    -

    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

    • Deletes a file with the given id

      Parameters

      • id: ObjectId

        The id of the file doc

        -
      • Optionaloptions: {
            timeoutMS: number;
        }
        • timeoutMS: number

      Returns Promise<void>

    • Removes this bucket's files collection, followed by its chunks collection.

      -

      Parameters

      • Optionaloptions: {
            timeoutMS: number;
        }
        • timeoutMS: number

      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 +

    • Optionaloptions: {
          timeoutMS: number;
      }
      • timeoutMS: number

    Returns Promise<void>

    Returns GridFSBucketWriteStream

    Returns Promise<void>

    Returns this

    writable: boolean

    Is true if it is safe to call writable.write(), which means the stream has not been destroyed, errored, or ended.

    v11.4.0

    writableCorked: number

    Number of times writable.uncork() needs to be @@ -116,7 +116,7 @@

    writableObjectMode: boolean

    Getter for the property objectMode of a given Writable stream.

    v12.3.0

    writeConcern?: WriteConcern

    The write concern setting to be used with every insert operation

    -
    captureRejections: boolean

    Value: boolean

    +
    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')

    @@ -153,7 +153,7 @@

    v13.6.0, v12.17.0

    Methods

    • Parameters

      • error: null | Error
      • callback: ((error?: null | Error) => void)
          • (error?): void
          • Parameters

            • Optionalerror: null | Error

            Returns void

      Returns void

    • Parameters

      • chunks: {
            chunk: any;
            encoding: BufferEncoding;
        }[]
      • callback: ((error?: null | Error) => void)
          • (error?): void
          • Parameters

            • Optionalerror: null | Error

            Returns void

      Returns void

    • Type Parameters

      • K

      Parameters

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

      Returns void

    • Places this write stream into an aborted state (all future writes fail) and deletes all chunks that have already been written.

      -

      Returns Promise<void>

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

      -

      Parameters

      • Optionaloptions: {
            timeoutMS?: number;
        }
        • OptionaltimeoutMS?: number

      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 this

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

      +

      Parameters

      • Optionaloptions: {
            timeoutMS?: number;
        }
        • OptionaltimeoutMS?: number

      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

      Type Parameters

      • EventKey extends "close"

      Parameters

      Returns boolean

      v0.1.26

      -
    • Returns an array listing the events for which the emitter has registered listeners. The values in the array are strings or Symbols.

      import { EventEmitter } from 'node:events';

      const myEE = new EventEmitter();
      myEE.on('foo', () => {});
      myEE.on('bar', () => {});

      const sym = Symbol('symbol');
      myEE.on(sym, () => {});

      console.log(myEE.eventNames());
      // Prints: [ 'foo', 'bar', Symbol(symbol) ]

      Returns string[]

      v6.0.0

      -
    • Iterates over all the documents for this cursor using the iterator, callback pattern.

      If the iterator returns false, iteration will stop.

      Parameters

      • iterator: ((doc: T) => boolean | void)

        The iteration callback.

          • (doc): boolean | void
          • Parameters

            • doc: T

            Returns boolean | void

      Returns Promise<void>

      • Will be removed in a future release. Use for await...of instead.
      -
    • 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

      -
    • Map all documents using the provided function If there is a transform set on the cursor, that will be called first and the result passed to this function's transform.

      Type Parameters

      • T = any

      Parameters

      • transform: ((doc: T) => T)

        The mapping transformation method.

        @@ -166,16 +166,16 @@
        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

    • Adds the listener function to the end of the listeners array for the event named eventName. No checks are made to see if the listener has already been added. Multiple calls passing the same combination of eventName and listener will result in the listener being added, and called, multiple times.

      @@ -190,7 +190,7 @@

      Returns this

      v0.1.101

      -
    • Adds the listener function to the end of the listeners array for the event +

    • Adds the listener function to the end of the listeners array for the event named eventName. No checks are made to see if the listener has already been added. Multiple calls passing the same combination of eventName and listener will result in the listener being added, and called, multiple times.

      @@ -205,7 +205,7 @@

      Returns this

      v0.1.101

      -
    • Adds the listener function to the end of the listeners array for the event +

    • Adds the listener function to the end of the listeners array for the event named eventName. No checks are made to see if the listener has already been added. Multiple calls passing the same combination of eventName and listener will result in the listener being added, and called, multiple times.

      @@ -220,7 +220,7 @@

      Returns this

      v0.1.101

      -
    • Adds a one-time listener function for the event named eventName. The next time eventName is triggered, this listener is removed and then invoked.

      server.once('connection', (stream) => {
      console.log('Ah, we have our first user!');
      });
      @@ -233,7 +233,7 @@

      Returns this

      v0.3.0

      -
    • Adds a one-time listener function for the event named eventName. The +

    • Adds a one-time listener function for the event named eventName. The next time eventName is triggered, this listener is removed and then invoked.

      server.once('connection', (stream) => {
      console.log('Ah, we have our first user!');
      });
      @@ -246,7 +246,7 @@

      Returns this

      v0.3.0

      -
    • Adds a one-time listener function for the event named eventName. The +

    • Adds a one-time listener function for the event named eventName. The next time eventName is triggered, this listener is removed and then invoked.

      server.once('connection', (stream) => {
      console.log('Ah, we have our first user!');
      });
      @@ -259,7 +259,7 @@

      Returns this

      v0.3.0

      -
    • Returns a copy of the array of listeners for the event named eventName, including any wrappers (such as those created by .once()).

      import { EventEmitter } from 'node:events';
      const emitter = new EventEmitter();
      emitter.once('log', () => console.log('log once'));

      // Returns a new Array with a function `onceWrapper` which has a property
      // `listener` which contains the original listener bound above
      const listeners = emitter.rawListeners('log');
      const logFnWrapper = listeners[0];

      // Logs "log once" to the console and does not unbind the `once` event
      logFnWrapper.listener();

      // Logs "log once" to the console and removes the listener
      logFnWrapper();

      emitter.on('log', () => console.log('log persistently'));
      // Will return a new Array with a single function bound by `.on()` above
      const newListeners = emitter.rawListeners('log');

      // Logs "log persistently" twice
      newListeners[0]();
      emitter.emit('log');

      Type Parameters

      • EventKey extends "close"

      Parameters

      Returns AbstractCursorEvents[EventKey][]

      v9.4.0

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

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

      Type Parameters

      • EventKey extends "close"

      Parameters

      • Optionalevent: string | symbol | EventKey

      Returns this

      v0.1.26

      -
    • 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[]>

    • Experimental

      Listens once to the abort event on the provided signal.

      +

    Returns this

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

      -

      Parameters

      • Optionaloptions: {
            timeoutMS?: number;
        }
        • OptionaltimeoutMS?: number

      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 this

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

      +

      Parameters

      • Optionaloptions: {
            timeoutMS?: number;
        }
        • OptionaltimeoutMS?: number

      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

      Type Parameters

      • EventKey extends "close"

      Parameters

      Returns boolean

      v0.1.26

      -
    • Returns an array listing the events for which the emitter has registered listeners. The values in the array are strings or Symbols.

      import { EventEmitter } from 'node:events';

      const myEE = new EventEmitter();
      myEE.on('foo', () => {});
      myEE.on('bar', () => {});

      const sym = Symbol('symbol');
      myEE.on(sym, () => {});

      console.log(myEE.eventNames());
      // Prints: [ 'foo', 'bar', Symbol(symbol) ]

      Returns string[]

      v6.0.0

      -
    • Iterates over all the documents for this cursor using the iterator, callback pattern.

      If the iterator returns false, iteration will stop.

      Parameters

      • iterator: ((doc: any) => boolean | void)

        The iteration callback.

          • (doc): boolean | void
          • Parameters

            • doc: any

            Returns boolean | void

      Returns Promise<void>

      • Will be removed in a future release. Use for await...of instead.
      -
    • 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

      -
    • Map all documents using the provided function If there is a transform set on the cursor, that will be called first and the result passed to this function's transform.

      Type Parameters

      • T = any

      Parameters

      • transform: ((doc: any) => T)

        The mapping transformation method.

        @@ -165,16 +165,16 @@
        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

    • Adds the listener function to the end of the listeners array for the event named eventName. No checks are made to see if the listener has already been added. Multiple calls passing the same combination of eventName and listener will result in the listener being added, and called, multiple times.

      @@ -189,7 +189,7 @@

      Returns this

      v0.1.101

      -
    • Adds the listener function to the end of the listeners array for the event +

    • Adds the listener function to the end of the listeners array for the event named eventName. No checks are made to see if the listener has already been added. Multiple calls passing the same combination of eventName and listener will result in the listener being added, and called, multiple times.

      @@ -204,7 +204,7 @@

      Returns this

      v0.1.101

      -
    • Adds the listener function to the end of the listeners array for the event +

    • Adds the listener function to the end of the listeners array for the event named eventName. No checks are made to see if the listener has already been added. Multiple calls passing the same combination of eventName and listener will result in the listener being added, and called, multiple times.

      @@ -219,7 +219,7 @@

      Returns this

      v0.1.101

      -
    • Adds a one-time listener function for the event named eventName. The next time eventName is triggered, this listener is removed and then invoked.

      server.once('connection', (stream) => {
      console.log('Ah, we have our first user!');
      });
      @@ -232,7 +232,7 @@

      Returns this

      v0.3.0

      -
    • Adds a one-time listener function for the event named eventName. The +

    • Adds a one-time listener function for the event named eventName. The next time eventName is triggered, this listener is removed and then invoked.

      server.once('connection', (stream) => {
      console.log('Ah, we have our first user!');
      });
      @@ -245,7 +245,7 @@

      Returns this

      v0.3.0

      -
    • Adds a one-time listener function for the event named eventName. The +

    • Adds a one-time listener function for the event named eventName. The next time eventName is triggered, this listener is removed and then invoked.

      server.once('connection', (stream) => {
      console.log('Ah, we have our first user!');
      });
      @@ -258,7 +258,7 @@

      Returns this

      v0.3.0

      -
    • Returns a copy of the array of listeners for the event named eventName, including any wrappers (such as those created by .once()).

      import { EventEmitter } from 'node:events';
      const emitter = new EventEmitter();
      emitter.once('log', () => console.log('log once'));

      // Returns a new Array with a function `onceWrapper` which has a property
      // `listener` which contains the original listener bound above
      const listeners = emitter.rawListeners('log');
      const logFnWrapper = listeners[0];

      // Logs "log once" to the console and does not unbind the `once` event
      logFnWrapper.listener();

      // Logs "log once" to the console and removes the listener
      logFnWrapper();

      emitter.on('log', () => console.log('log persistently'));
      // Will return a new Array with a single function bound by `.on()` above
      const newListeners = emitter.rawListeners('log');

      // Logs "log persistently" twice
      newListeners[0]();
      emitter.emit('log');

      Type Parameters

      • EventKey extends "close"

      Parameters

      Returns AbstractCursorEvents[EventKey][]

      v9.4.0

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

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

      Type Parameters

      • EventKey extends "close"

      Parameters

      • Optionalevent: string | symbol | EventKey

      Returns this

      v0.1.26

      -
    • 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[]>

    • Experimental

      Listens once to the abort event on the provided signal.

      +

    Returns this

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

    Returns this

    • 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

      Type Parameters

      • EventKey extends "close"

      Parameters

      Returns boolean

      v0.1.26

      -
    • Returns an array listing the events for which the emitter has registered listeners. The values in the array are strings or Symbols.

      import { EventEmitter } from 'node:events';

      const myEE = new EventEmitter();
      myEE.on('foo', () => {});
      myEE.on('bar', () => {});

      const sym = Symbol('symbol');
      myEE.on(sym, () => {});

      console.log(myEE.eventNames());
      // Prints: [ 'foo', 'bar', Symbol(symbol) ]

      Returns string[]

      v6.0.0

      -
    • Iterates over all the documents for this cursor using the iterator, callback pattern.

      If the iterator returns false, iteration will stop.

      Parameters

      • iterator: ((doc: {
            name: string;
        }) => boolean | void)

        The iteration callback.

          • (doc): boolean | void
          • Parameters

            • doc: {
                  name: string;
              }
              • name: string

            Returns boolean | void

      Returns Promise<void>

      • Will be removed in a future release. Use for await...of instead.
      -
    • 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

      -
    • Map all documents using the provided function If there is a transform set on the cursor, that will be called first and the result passed to this function's transform.

      Type Parameters

      • T

      Parameters

      • transform: ((doc: {
            name: string;
        }) => T)

        The mapping transformation method.

        @@ -192,17 +192,17 @@
        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

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

      +

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

    • Adds the listener function to the end of the listeners array for the event named eventName. No checks are made to see if the listener has already been added. Multiple calls passing the same combination of eventName and listener will result in the listener being added, and called, multiple times.

      @@ -217,7 +217,7 @@

      Returns this

      v0.1.101

      -
    • Adds the listener function to the end of the listeners array for the event +

    • Adds the listener function to the end of the listeners array for the event named eventName. No checks are made to see if the listener has already been added. Multiple calls passing the same combination of eventName and listener will result in the listener being added, and called, multiple times.

      @@ -232,7 +232,7 @@

      Returns this

      v0.1.101

      -
    • Adds the listener function to the end of the listeners array for the event +

    • Adds the listener function to the end of the listeners array for the event named eventName. No checks are made to see if the listener has already been added. Multiple calls passing the same combination of eventName and listener will result in the listener being added, and called, multiple times.

      @@ -247,7 +247,7 @@

      Returns this

      v0.1.101

      -
    • Add a project stage to the aggregation pipeline

      Type Parameters

      Parameters

      Returns AggregationCursor<T>

      In order to strictly type this function you must provide an interface that represents the effect of your projection on the result documents.

      By default chaining a projection to your cursor changes the returned type to the generic Document type. @@ -352,21 +352,21 @@

      const cursor: AggregationCursor<{ a: number; b: string }> = coll.aggregate([]);
      const projectCursor = cursor.project<{ a: number }>({ _id: 0, a: true });
      const aPropOnlyArray: {a: number}[] = await projectCursor.toArray();

      // or always use chaining and save the final cursor

      const cursor = coll.aggregate().project<{ a: string }>({
      _id: 0,
      a: { $convert: { input: '$a', to: 'string' }
      }});
      -
    • Returns a copy of the array of listeners for the event named eventName, including any wrappers (such as those created by .once()).

      import { EventEmitter } from 'node:events';
      const emitter = new EventEmitter();
      emitter.once('log', () => console.log('log once'));

      // Returns a new Array with a function `onceWrapper` which has a property
      // `listener` which contains the original listener bound above
      const listeners = emitter.rawListeners('log');
      const logFnWrapper = listeners[0];

      // Logs "log once" to the console and does not unbind the `once` event
      logFnWrapper.listener();

      // Logs "log once" to the console and removes the listener
      logFnWrapper();

      emitter.on('log', () => console.log('log persistently'));
      // Will return a new Array with a single function bound by `.on()` above
      const newListeners = emitter.rawListeners('log');

      // Logs "log persistently" twice
      newListeners[0]();
      emitter.emit('log');

      Type Parameters

      • EventKey extends "close"

      Parameters

      Returns AbstractCursorEvents[EventKey][]

      v9.4.0

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

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

      Type Parameters

      • EventKey extends "close"

      Parameters

      • Optionalevent: string | symbol | EventKey

      Returns this

      v0.1.26

      -
    • 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<{
          name: string;
      }[]>

    • Experimental

      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
    prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

    Optional override for formatting stack traces

    +

    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
    prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

    Optional override for formatting stack traces

    stackTraceLimit: number

    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

      -
    • Create .stack property on a target object

      Parameters

      • targetObject: object
      • OptionalconstructorOpt: Function

      Returns void

    diff --git a/docs/Next/classes/MongoAWSError.html b/docs/Next/classes/MongoAWSError.html index 55dab98ee92..581c1c0c116 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,12 +19,12 @@

    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
    prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

    Optional override for formatting stack traces

    +

    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
    prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

    Optional override for formatting stack traces

    stackTraceLimit: number

    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

      -
    • Create .stack property on a target object

      Parameters

      • targetObject: object
      • OptionalconstructorOpt: Function

      Returns void

    diff --git a/docs/Next/classes/MongoAzureError.html b/docs/Next/classes/MongoAzureError.html index c7621c86866..db70acdf776 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,12 +19,12 @@

    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
    prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

    Optional override for formatting stack traces

    +

    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
    prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

    Optional override for formatting stack traces

    stackTraceLimit: number

    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

      -
    • Create .stack property on a target object

      Parameters

      • targetObject: object
      • OptionalconstructorOpt: Function

      Returns void

    diff --git a/docs/Next/classes/MongoBatchReExecutionError.html b/docs/Next/classes/MongoBatchReExecutionError.html index 49d90b7ffe2..2d738e3021e 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,12 +19,12 @@

    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
    prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

    Optional override for formatting stack traces

    +

    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
    prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

    Optional override for formatting stack traces

    stackTraceLimit: number

    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

      -
    • Create .stack property on a target object

      Parameters

      • targetObject: object
      • OptionalconstructorOpt: Function

      Returns void

    diff --git a/docs/Next/classes/MongoBulkWriteError.html b/docs/Next/classes/MongoBulkWriteError.html index 0010fb06f9f..bb516c111c1 100644 --- a/docs/Next/classes/MongoBulkWriteError.html +++ b/docs/Next/classes/MongoBulkWriteError.html @@ -1,5 +1,5 @@ MongoBulkWriteError | mongodb

    Class MongoBulkWriteError

    An error indicating an unsuccessful Bulk Write

    -

    Hierarchy (view full)

    Constructors

    Hierarchy (view full)

    Constructors

    Properties

    cause? code? codeName? @@ -33,20 +33,20 @@

    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> = []
    prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

    Optional override for formatting stack traces

    +

    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> = []
    prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

    Optional override for formatting stack traces

    stackTraceLimit: number

    Accessors

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

      -

      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 number

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

      +

      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

      Parameters

      • label: string

        The error label to check for

      Returns boolean

      returns true if the error has the provided error label

      -
    • Create .stack property on a target object

      Parameters

      • targetObject: object
      • OptionalconstructorOpt: Function

      Returns void

    diff --git a/docs/Next/classes/MongoChangeStreamError.html b/docs/Next/classes/MongoChangeStreamError.html index b1ef7fa0c5a..bfed06bdccb 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,12 +18,12 @@

    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
    prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

    Optional override for formatting stack traces

    +

    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
    prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

    Optional override for formatting stack traces

    stackTraceLimit: number

    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

      -
    • Create .stack property on a target object

      Parameters

      • targetObject: object
      • OptionalconstructorOpt: Function

      Returns void

    diff --git a/docs/Next/classes/MongoClient.html b/docs/Next/classes/MongoClient.html index 72b9e4d18e8..5b31b7de434 100644 --- a/docs/Next/classes/MongoClient.html +++ b/docs/Next/classes/MongoClient.html @@ -17,7 +17,7 @@
    import { MongoClient } from 'mongodb';
    // Enable command monitoring for debugging
    const client = new MongoClient('mongodb://localhost:27017?appName=mflix', { monitorCommands: true });
    -

    Hierarchy (view full)

    Implements

    Constructors

    Hierarchy (view full)

    Implements

    Constructors

    Properties

    Constructors

    Properties

    [asyncDispose]: (() => Promise<void>)

    An alias for MongoClient.close().

    -
    options: Readonly<Omit<MongoOptions,
        | "ca"
        | "cert"
        | "crl"
        | "key"
        | "driverInfo"
        | "monitorCommands"
        | "metadata"
        | "extendedMetadata"
        | "additionalDriverInfo">> & Pick<MongoOptions,
        | "ca"
        | "cert"
        | "crl"
        | "key"
        | "driverInfo"
        | "monitorCommands"
        | "metadata"
        | "extendedMetadata"
        | "additionalDriverInfo">

    The consolidate, parsed, transformed and merged options.

    -
    captureRejections: boolean

    Value: boolean

    +

    Constructors

    Properties

    [asyncDispose]: (() => Promise<void>)

    An alias for MongoClient.close().

    +
    options: Readonly<Omit<MongoOptions,
        | "ca"
        | "cert"
        | "crl"
        | "key"
        | "driverInfo"
        | "monitorCommands"
        | "metadata"
        | "extendedMetadata"
        | "additionalDriverInfo">> & Pick<MongoOptions,
        | "ca"
        | "cert"
        | "crl"
        | "key"
        | "driverInfo"
        | "monitorCommands"
        | "metadata"
        | "extendedMetadata"
        | "additionalDriverInfo">

    The consolidate, parsed, transformed and merged options.

    +
    captureRejections: boolean

    Value: boolean

    Change the default captureRejections option on all new EventEmitter objects.

    v13.4.0, v12.16.0

    captureRejectionSymbol: typeof captureRejectionSymbol

    v13.6.0, v12.17.0

    -

    Accessors

    Methods

    • Type Parameters

      • K

      Parameters

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

      Returns void

    Accessors

    Methods

    • Type Parameters

      • K

      Parameters

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

      Returns void

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

      Type Parameters

      • EventKey extends
            | "error"
            | "timeout"
            | "close"
            | "open"
            | "serverOpening"
            | "serverClosed"
            | "serverDescriptionChanged"
            | "topologyOpening"
            | "topologyClosed"
            | "topologyDescriptionChanged"
            | "connectionPoolCreated"
            | "connectionPoolClosed"
            | "connectionPoolCleared"
            | "connectionPoolReady"
            | "connectionCreated"
            | "connectionReady"
            | "connectionClosed"
            | "connectionCheckOutStarted"
            | "connectionCheckOutFailed"
            | "connectionCheckedOut"
            | "connectionCheckedIn"
            | "commandStarted"
            | "commandSucceeded"
            | "commandFailed"
            | "serverHeartbeatStarted"
            | "serverHeartbeatSucceeded"
            | "serverHeartbeatFailed"

      Parameters

      Returns this

      v0.1.26

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

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

      Parameters

      Returns this

      v0.1.26

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

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

      Parameters

      Returns this

      v0.1.26

      -
    • Append metadata to the client metadata after instantiation.

      Parameters

      • driverInfo: DriverInfo

        Information about the application or library.

        -

      Returns void

    Returns void

    • Cleans up resources managed by the MongoClient.

      The close method clears and closes all resources whose lifetimes are managed by the MongoClient. Please refer to the MongoClient class documentation for a high level overview of the client's key features and responsibilities.

      However, the close method does not handle the cleanup of resources explicitly created by the user. @@ -172,48 +172,48 @@

      Parameters

      • _force: boolean = false

        currently an unused flag that has no effect. Defaults to false.

        -

      Returns Promise<void>

    • Connect to MongoDB using a url

      +

    Returns Promise<void>

    • Connect to MongoDB using a url

      Returns Promise<MongoClient>

      Calling connect is optional since the first operation you perform will call connect if it's needed. timeoutMS will bound the time any operation can take before throwing a timeout error. However, when the operation being run is automatically connecting your MongoClient the timeoutMS will not apply to the time taken to connect the MongoClient. This means the time to setup the MongoClient does not count against timeoutMS. If you are using timeoutMS we recommend connecting your client explicitly in advance of any operation to avoid this inconsistent execution time.

      docs.mongodb.org/manual/reference/connection-string/

      -
    • Create a new Db instance sharing the current socket connections.

      +
    • Create a new Db instance sharing the current socket connections.

      Parameters

      • OptionaldbName: string

        The name of the database we want to use. If not provided, use database name from connection string.

      • Optionaloptions: DbOptions

        Optional settings for Db construction

        -

      Returns Db

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

    Returns Db

    • 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

      Type Parameters

      • EventKey extends
            | "error"
            | "timeout"
            | "close"
            | "open"
            | "serverOpening"
            | "serverClosed"
            | "serverDescriptionChanged"
            | "topologyOpening"
            | "topologyClosed"
            | "topologyDescriptionChanged"
            | "connectionPoolCreated"
            | "connectionPoolClosed"
            | "connectionPoolCleared"
            | "connectionPoolReady"
            | "connectionCreated"
            | "connectionReady"
            | "connectionClosed"
            | "connectionCheckOutStarted"
            | "connectionCheckOutFailed"
            | "connectionCheckedOut"
            | "connectionCheckedIn"
            | "commandStarted"
            | "commandSucceeded"
            | "commandFailed"
            | "serverHeartbeatStarted"
            | "serverHeartbeatSucceeded"
            | "serverHeartbeatFailed"

      Parameters

      Returns boolean

      v0.1.26

      -
    • Returns an array listing the events for which the emitter has registered listeners. The values in the array are strings or Symbols.

      import { EventEmitter } from 'node:events';

      const myEE = new EventEmitter();
      myEE.on('foo', () => {});
      myEE.on('bar', () => {});

      const sym = Symbol('symbol');
      myEE.on(sym, () => {});

      console.log(myEE.eventNames());
      // Prints: [ 'foo', 'bar', Symbol(symbol) ]

      Returns string[]

      v6.0.0

      -
    • 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
            | "error"
            | "timeout"
            | "close"
            | "open"
            | "serverOpening"
            | "serverClosed"
            | "serverDescriptionChanged"
            | "topologyOpening"
            | "topologyClosed"
            | "topologyDescriptionChanged"
            | "connectionPoolCreated"
            | "connectionPoolClosed"
            | "connectionPoolCleared"
            | "connectionPoolReady"
            | "connectionCreated"
            | "connectionReady"
            | "connectionClosed"
            | "connectionCheckOutStarted"
            | "connectionCheckOutFailed"
            | "connectionCheckedOut"
            | "connectionCheckedIn"
            | "commandStarted"
            | "commandSucceeded"
            | "commandFailed"
            | "serverHeartbeatStarted"
            | "serverHeartbeatSucceeded"
            | "serverHeartbeatFailed"

      Parameters

      Returns number

      v3.2.0

      -
    • Returns a copy of the array of listeners for the event named eventName.

      server.on('connection', (stream) => {
      console.log('someone connected!');
      });
      console.log(util.inspect(server.listeners('connection')));
      // Prints: [ [Function] ]

      Type Parameters

      • EventKey extends
            | "error"
            | "timeout"
            | "close"
            | "open"
            | "serverOpening"
            | "serverClosed"
            | "serverDescriptionChanged"
            | "topologyOpening"
            | "topologyClosed"
            | "topologyDescriptionChanged"
            | "connectionPoolCreated"
            | "connectionPoolClosed"
            | "connectionPoolCleared"
            | "connectionPoolReady"
            | "connectionCreated"
            | "connectionReady"
            | "connectionClosed"
            | "connectionCheckOutStarted"
            | "connectionCheckOutFailed"
            | "connectionCheckedOut"
            | "connectionCheckedIn"
            | "commandStarted"
            | "commandSucceeded"
            | "commandFailed"
            | "serverHeartbeatStarted"
            | "serverHeartbeatSucceeded"
            | "serverHeartbeatFailed"

      Parameters

      Returns MongoClientEvents[EventKey][]

      v0.1.26

      -
    • Alias for emitter.removeListener().

      Type Parameters

      • EventKey extends
            | "error"
            | "timeout"
            | "close"
            | "open"
            | "serverOpening"
            | "serverClosed"
            | "serverDescriptionChanged"
            | "topologyOpening"
            | "topologyClosed"
            | "topologyDescriptionChanged"
            | "connectionPoolCreated"
            | "connectionPoolClosed"
            | "connectionPoolCleared"
            | "connectionPoolReady"
            | "connectionCreated"
            | "connectionReady"
            | "connectionClosed"
            | "connectionCheckOutStarted"
            | "connectionCheckOutFailed"
            | "connectionCheckedOut"
            | "connectionCheckedIn"
            | "commandStarted"
            | "commandSucceeded"
            | "commandFailed"
            | "serverHeartbeatStarted"
            | "serverHeartbeatSucceeded"
            | "serverHeartbeatFailed"

      Parameters

      Returns this

      v10.0.0

      -
    • Alias for emitter.removeListener().

      +
    • Alias for emitter.removeListener().

      Parameters

      Returns this

      v10.0.0

      -
    • Alias for emitter.removeListener().

      +
    • Alias for emitter.removeListener().

      Parameters

      Returns this

      v10.0.0

      -
    • Adds the listener function to the end of the listeners array for the event named eventName. No checks are made to see if the listener has already been added. Multiple calls passing the same combination of eventName and listener will result in the listener being added, and called, multiple times.

      @@ -228,7 +228,7 @@

      Returns this

      v0.1.101

      -
    • Adds the listener function to the end of the listeners array for the event +

    • Adds the listener function to the end of the listeners array for the event named eventName. No checks are made to see if the listener has already been added. Multiple calls passing the same combination of eventName and listener will result in the listener being added, and called, multiple times.

      @@ -243,7 +243,7 @@

      Returns this

      v0.1.101

      -
    • Adds the listener function to the end of the listeners array for the event +

    • Adds the listener function to the end of the listeners array for the event named eventName. No checks are made to see if the listener has already been added. Multiple calls passing the same combination of eventName and listener will result in the listener being added, and called, multiple times.

      @@ -258,7 +258,7 @@

      Returns this

      v0.1.101

      -
    • Adds a one-time listener function for the event named eventName. The next time eventName is triggered, this listener is removed and then invoked.

      server.once('connection', (stream) => {
      console.log('Ah, we have our first user!');
      });
      @@ -271,7 +271,7 @@

      Returns this

      v0.3.0

      -
    • Adds a one-time listener function for the event named eventName. The +

    • Adds a one-time listener function for the event named eventName. The next time eventName is triggered, this listener is removed and then invoked.

      server.once('connection', (stream) => {
      console.log('Ah, we have our first user!');
      });
      @@ -284,7 +284,7 @@

      Returns this

      v0.3.0

      -
    • Adds a one-time listener function for the event named eventName. The +

    • Adds a one-time listener function for the event named eventName. The next time eventName is triggered, this listener is removed and then invoked.

      server.once('connection', (stream) => {
      console.log('Ah, we have our first user!');
      });
      @@ -297,7 +297,7 @@

      Returns this

      v0.3.0

      -
    • Adds a one-timelistener function for the event named eventName to the beginning of the listeners array. The next time eventName is triggered, this listener is removed, and then invoked.

      server.prependOnceListener('connection', (stream) => {
      console.log('Ah, we have our first user!');
      });
      @@ -335,7 +335,7 @@

      Type Parameters

      • EventKey extends
            | "error"
            | "timeout"
            | "close"
            | "open"
            | "serverOpening"
            | "serverClosed"
            | "serverDescriptionChanged"
            | "topologyOpening"
            | "topologyClosed"
            | "topologyDescriptionChanged"
            | "connectionPoolCreated"
            | "connectionPoolClosed"
            | "connectionPoolCleared"
            | "connectionPoolReady"
            | "connectionCreated"
            | "connectionReady"
            | "connectionClosed"
            | "connectionCheckOutStarted"
            | "connectionCheckOutFailed"
            | "connectionCheckedOut"
            | "connectionCheckedIn"
            | "commandStarted"
            | "commandSucceeded"
            | "commandFailed"
            | "serverHeartbeatStarted"
            | "serverHeartbeatSucceeded"
            | "serverHeartbeatFailed"

      Parameters

      Returns this

      v6.0.0

      -
    • Adds a one-timelistener function for the event named eventName to the beginning of the listeners array. The next time eventName is triggered, this +

    • Adds a one-timelistener function for the event named eventName to the beginning of the listeners array. The next time eventName is triggered, this listener is removed, and then invoked.

      server.prependOnceListener('connection', (stream) => {
      console.log('Ah, we have our first user!');
      });
      @@ -343,7 +343,7 @@

      Parameters

      Returns this

      v6.0.0

      -
    • Adds a one-timelistener function for the event named eventName to the beginning of the listeners array. The next time eventName is triggered, this +

    • Adds a one-timelistener function for the event named eventName to the beginning of the listeners array. The next time eventName is triggered, this listener is removed, and then invoked.

      server.prependOnceListener('connection', (stream) => {
      console.log('Ah, we have our first user!');
      });
      @@ -351,19 +351,19 @@

      Returns this

      v6.0.0

      -
    • Returns a copy of the array of listeners for the event named eventName, including any wrappers (such as those created by .once()).

      import { EventEmitter } from 'node:events';
      const emitter = new EventEmitter();
      emitter.once('log', () => console.log('log once'));

      // Returns a new Array with a function `onceWrapper` which has a property
      // `listener` which contains the original listener bound above
      const listeners = emitter.rawListeners('log');
      const logFnWrapper = listeners[0];

      // Logs "log once" to the console and does not unbind the `once` event
      logFnWrapper.listener();

      // Logs "log once" to the console and removes the listener
      logFnWrapper();

      emitter.on('log', () => console.log('log persistently'));
      // Will return a new Array with a single function bound by `.on()` above
      const newListeners = emitter.rawListeners('log');

      // Logs "log persistently" twice
      newListeners[0]();
      emitter.emit('log');

      Type Parameters

      • EventKey extends
            | "error"
            | "timeout"
            | "close"
            | "open"
            | "serverOpening"
            | "serverClosed"
            | "serverDescriptionChanged"
            | "topologyOpening"
            | "topologyClosed"
            | "topologyDescriptionChanged"
            | "connectionPoolCreated"
            | "connectionPoolClosed"
            | "connectionPoolCleared"
            | "connectionPoolReady"
            | "connectionCreated"
            | "connectionReady"
            | "connectionClosed"
            | "connectionCheckOutStarted"
            | "connectionCheckOutFailed"
            | "connectionCheckedOut"
            | "connectionCheckedIn"
            | "commandStarted"
            | "commandSucceeded"
            | "commandFailed"
            | "serverHeartbeatStarted"
            | "serverHeartbeatSucceeded"
            | "serverHeartbeatFailed"

      Parameters

      Returns MongoClientEvents[EventKey][]

      v9.4.0

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

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

      Type Parameters

      • EventKey extends
            | "error"
            | "timeout"
            | "close"
            | "open"
            | "serverOpening"
            | "serverClosed"
            | "serverDescriptionChanged"
            | "topologyOpening"
            | "topologyClosed"
            | "topologyDescriptionChanged"
            | "connectionPoolCreated"
            | "connectionPoolClosed"
            | "connectionPoolCleared"
            | "connectionPoolReady"
            | "connectionCreated"
            | "connectionReady"
            | "connectionClosed"
            | "connectionCheckOutStarted"
            | "connectionCheckOutFailed"
            | "connectionCheckedOut"
            | "connectionCheckedIn"
            | "commandStarted"
            | "commandSucceeded"
            | "commandFailed"
            | "serverHeartbeatStarted"
            | "serverHeartbeatSucceeded"
            | "serverHeartbeatFailed"

      Parameters

      • Optionalevent: string | symbol | EventKey

      Returns this

      v0.1.26

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

      -
    • Creates a new ClientSession. When using the returned session in an operation a corresponding ServerSession will be created.

      Parameters

      Returns ClientSession

      A ClientSession instance may only be passed to operations being performed on the same MongoClient it was started from.

      -
    • Returns a copy of the array of listeners for the event named eventName.

      +
    • Returns a copy of the array of listeners for the event named eventName.

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

      For EventTargets this is the only way to get the event listeners for the diff --git a/docs/Next/classes/MongoClientBulkWriteCursorError.html b/docs/Next/classes/MongoClientBulkWriteCursorError.html index f7955edbfd9..a44ffcab480 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,12 +18,12 @@

      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
    prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

    Optional override for formatting stack traces

    +

    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
    prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

    Optional override for formatting stack traces

    stackTraceLimit: number

    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

      -
    • Create .stack property on a target object

      Parameters

      • targetObject: object
      • OptionalconstructorOpt: Function

      Returns void

    diff --git a/docs/Next/classes/MongoClientBulkWriteError.html b/docs/Next/classes/MongoClientBulkWriteError.html index 02fd88d7a3f..e5e32ef7421 100644 --- a/docs/Next/classes/MongoClientBulkWriteError.html +++ b/docs/Next/classes/MongoClientBulkWriteError.html @@ -1,5 +1,5 @@ MongoClientBulkWriteError | mongodb

    Class MongoClientBulkWriteError

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

    -

    Hierarchy (view full)

    Constructors

    Hierarchy (view full)

    Constructors

    Properties

    Constructors

    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 +

    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.

    -
    prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

    Optional override for formatting stack traces

    +
    prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

    Optional override for formatting stack traces

    stackTraceLimit: number

    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

      -
    • Create .stack property on a target object

      Parameters

      • targetObject: object
      • OptionalconstructorOpt: Function

      Returns void

    diff --git a/docs/Next/classes/MongoClientBulkWriteExecutionError.html b/docs/Next/classes/MongoClientBulkWriteExecutionError.html index 02c675463a3..d0b4228bb4c 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,12 +18,12 @@

    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
    prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

    Optional override for formatting stack traces

    +

    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
    prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

    Optional override for formatting stack traces

    stackTraceLimit: number

    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

      -
    • Create .stack property on a target object

      Parameters

      • targetObject: object
      • OptionalconstructorOpt: Function

      Returns void

    diff --git a/docs/Next/classes/MongoClientClosedError.html b/docs/Next/classes/MongoClientClosedError.html index 1045e0955f6..586fb5ea7a2 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,12 +19,12 @@

    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
    prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

    Optional override for formatting stack traces

    +

    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
    prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

    Optional override for formatting stack traces

    stackTraceLimit: number

    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

      -
    • Create .stack property on a target object

      Parameters

      • targetObject: object
      • OptionalconstructorOpt: Function

      Returns void

    diff --git a/docs/Next/classes/MongoCompatibilityError.html b/docs/Next/classes/MongoCompatibilityError.html index 00b0c40b7ae..5551b1d276d 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,12 +19,12 @@

    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
    prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

    Optional override for formatting stack traces

    +

    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
    prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

    Optional override for formatting stack traces

    stackTraceLimit: number

    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

      -
    • Create .stack property on a target object

      Parameters

      • targetObject: object
      • OptionalconstructorOpt: Function

      Returns void

    diff --git a/docs/Next/classes/MongoCredentials.html b/docs/Next/classes/MongoCredentials.html index be1e154a3bd..0b9d15f2dd9 100644 --- a/docs/Next/classes/MongoCredentials.html +++ b/docs/Next/classes/MongoCredentials.html @@ -1,5 +1,5 @@ MongoCredentials | mongodb

    Class MongoCredentials

    A representation of the credentials used by MongoDB

    -

    Constructors

    Constructors

    Properties

    mechanism: AuthMechanism

    The method used to authenticate

    -
    mechanismProperties: AuthMechanismProperties

    Special properties used by some types of auth mechanisms

    -
    password: string

    The password used for authentication

    -
    source: string

    The database that the user should authenticate against

    -
    username: string

    The username used for authentication

    -

    Methods

    • If the authentication mechanism is set to "default", resolves the authMechanism +

    Constructors

    Properties

    mechanism: AuthMechanism

    The method used to authenticate

    +
    mechanismProperties: AuthMechanismProperties

    Special properties used by some types of auth mechanisms

    +
    password: string

    The password used for authentication

    +
    source: string

    The database that the user should authenticate against

    +
    username: string

    The username used for authentication

    +

    Methods

    +

    Returns MongoCredentials

    diff --git a/docs/Next/classes/MongoCryptAzureKMSRequestError.html b/docs/Next/classes/MongoCryptAzureKMSRequestError.html index 63a626c68ce..49f1b5ced67 100644 --- a/docs/Next/classes/MongoCryptAzureKMSRequestError.html +++ b/docs/Next/classes/MongoCryptAzureKMSRequestError.html @@ -1,5 +1,5 @@ MongoCryptAzureKMSRequestError | mongodb

    Class MongoCryptAzureKMSRequestError

    An error indicating that mongodb-client-encryption failed to auto-refresh Azure KMS credentials.

    -

    Hierarchy (view full)

    Constructors

    Hierarchy (view full)

    Constructors

    Properties

    body? cause? code? @@ -19,13 +19,13 @@

    Meant for internal use only.

    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
    prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

    Optional override for formatting stack traces

    +

    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
    prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

    Optional override for formatting stack traces

    stackTraceLimit: number

    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

      -
    • Create .stack property on a target object

      Parameters

      • targetObject: object
      • OptionalconstructorOpt: Function

      Returns void

    diff --git a/docs/Next/classes/MongoCryptCreateDataKeyError.html b/docs/Next/classes/MongoCryptCreateDataKeyError.html index 3c038d63684..dc0d3c97ee4 100644 --- a/docs/Next/classes/MongoCryptCreateDataKeyError.html +++ b/docs/Next/classes/MongoCryptCreateDataKeyError.html @@ -1,5 +1,5 @@ MongoCryptCreateDataKeyError | mongodb

    Class MongoCryptCreateDataKeyError

    An error indicating that ClientEncryption.createEncryptedCollection() failed to create data keys

    -

    Hierarchy (view full)

    Constructors

    Hierarchy (view full)

    Constructors

    Properties

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

    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
    prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

    Optional override for formatting stack traces

    +

    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
    prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

    Optional override for formatting stack traces

    stackTraceLimit: number

    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

      -
    • Create .stack property on a target object

      Parameters

      • targetObject: object
      • OptionalconstructorOpt: Function

      Returns void

    diff --git a/docs/Next/classes/MongoCryptCreateEncryptedCollectionError.html b/docs/Next/classes/MongoCryptCreateEncryptedCollectionError.html index 9f97d1d46e3..769a80d19ab 100644 --- a/docs/Next/classes/MongoCryptCreateEncryptedCollectionError.html +++ b/docs/Next/classes/MongoCryptCreateEncryptedCollectionError.html @@ -1,5 +1,5 @@ MongoCryptCreateEncryptedCollectionError | mongodb

    Class MongoCryptCreateEncryptedCollectionError

    An error indicating that ClientEncryption.createEncryptedCollection() failed to create a collection

    -

    Hierarchy (view full)

    Constructors

    Hierarchy (view full)

    Constructors

    Properties

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

    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
    prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

    Optional override for formatting stack traces

    +

    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
    prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

    Optional override for formatting stack traces

    stackTraceLimit: number

    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

      -
    • Create .stack property on a target object

      Parameters

      • targetObject: object
      • OptionalconstructorOpt: Function

      Returns void

    diff --git a/docs/Next/classes/MongoCryptError.html b/docs/Next/classes/MongoCryptError.html index 94078417985..40414ea56bd 100644 --- a/docs/Next/classes/MongoCryptError.html +++ b/docs/Next/classes/MongoCryptError.html @@ -1,5 +1,5 @@ MongoCryptError | mongodb

    Class MongoCryptError

    An error indicating that something went wrong specifically with MongoDB Client Encryption

    -

    Hierarchy (view full)

    Constructors

    Hierarchy (view full)

    Constructors

    Properties

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

    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
    prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

    Optional override for formatting stack traces

    +

    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
    prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

    Optional override for formatting stack traces

    stackTraceLimit: number

    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

      -
    • Create .stack property on a target object

      Parameters

      • targetObject: object
      • OptionalconstructorOpt: Function

      Returns void

    diff --git a/docs/Next/classes/MongoCryptInvalidArgumentError.html b/docs/Next/classes/MongoCryptInvalidArgumentError.html index 1dfe4650a6d..d622c71a450 100644 --- a/docs/Next/classes/MongoCryptInvalidArgumentError.html +++ b/docs/Next/classes/MongoCryptInvalidArgumentError.html @@ -1,5 +1,5 @@ MongoCryptInvalidArgumentError | mongodb

    Class MongoCryptInvalidArgumentError

    An error indicating an invalid argument was provided to an encryption API.

    -

    Hierarchy (view full)

    Constructors

    Hierarchy (view full)

    Constructors

    Properties

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

    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
    prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

    Optional override for formatting stack traces

    +

    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
    prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

    Optional override for formatting stack traces

    stackTraceLimit: number

    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

      -
    • Create .stack property on a target object

      Parameters

      • targetObject: object
      • OptionalconstructorOpt: Function

      Returns void

    diff --git a/docs/Next/classes/MongoCryptKMSRequestNetworkTimeoutError.html b/docs/Next/classes/MongoCryptKMSRequestNetworkTimeoutError.html index 7ccf061f7d4..2f028666ec1 100644 --- a/docs/Next/classes/MongoCryptKMSRequestNetworkTimeoutError.html +++ b/docs/Next/classes/MongoCryptKMSRequestNetworkTimeoutError.html @@ -1,4 +1,4 @@ -MongoCryptKMSRequestNetworkTimeoutError | mongodb

    Class MongoCryptKMSRequestNetworkTimeoutError

    Hierarchy (view full)

    Constructors

    constructor +MongoCryptKMSRequestNetworkTimeoutError | mongodb

    Class MongoCryptKMSRequestNetworkTimeoutError

    Hierarchy (view full)

    Constructors

    Properties

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

    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
    prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

    Optional override for formatting stack traces

    +

    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
    prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

    Optional override for formatting stack traces

    stackTraceLimit: number

    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

      -
    • Create .stack property on a target object

      Parameters

      • targetObject: object
      • OptionalconstructorOpt: Function

      Returns void

    diff --git a/docs/Next/classes/MongoCursorExhaustedError.html b/docs/Next/classes/MongoCursorExhaustedError.html index 33e5ca521c7..61ed6760f77 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,12 +18,12 @@

    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
    prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

    Optional override for formatting stack traces

    +

    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
    prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

    Optional override for formatting stack traces

    stackTraceLimit: number

    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

      -
    • Create .stack property on a target object

      Parameters

      • targetObject: object
      • OptionalconstructorOpt: Function

      Returns void

    diff --git a/docs/Next/classes/MongoCursorInUseError.html b/docs/Next/classes/MongoCursorInUseError.html index 8aa6a7ead7c..9753263994a 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,12 +19,12 @@

    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
    prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

    Optional override for formatting stack traces

    +

    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
    prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

    Optional override for formatting stack traces

    stackTraceLimit: number

    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

      -
    • Create .stack property on a target object

      Parameters

      • targetObject: object
      • OptionalconstructorOpt: Function

      Returns void

    diff --git a/docs/Next/classes/MongoDBCollectionNamespace.html b/docs/Next/classes/MongoDBCollectionNamespace.html index efcc103368e..1923477f8eb 100644 --- a/docs/Next/classes/MongoDBCollectionNamespace.html +++ b/docs/Next/classes/MongoDBCollectionNamespace.html @@ -1,10 +1,10 @@ MongoDBCollectionNamespace | mongodb

    Class MongoDBCollectionNamespace

    A class representing a collection's namespace. This class enforces (through Typescript) that the collection portion of the namespace is defined and should only be used in scenarios where this can be guaranteed.

    -

    Hierarchy (view full)

    Constructors

    Hierarchy (view full)

    Constructors

    Properties

    collection: string
    db: string

    Methods

    +

    Constructors

    Properties

    collection: string
    db: string

    Methods

    diff --git a/docs/Next/classes/MongoDBNamespace.html b/docs/Next/classes/MongoDBNamespace.html index db342a1e2c2..95a9aa2a164 100644 --- a/docs/Next/classes/MongoDBNamespace.html +++ b/docs/Next/classes/MongoDBNamespace.html @@ -1,4 +1,4 @@ -MongoDBNamespace | mongodb

    Class MongoDBNamespace

    Hierarchy (view full)

    Constructors

    constructor +MongoDBNamespace | mongodb

    Class MongoDBNamespace

    Hierarchy (view full)

    Constructors

    Properties

    Methods

    toString @@ -7,4 +7,4 @@

    Constructors

    Properties

    collection?: string
    db: string

    Methods

    +

    Returns MongoDBNamespace

    Properties

    collection?: string
    db: string

    Methods

    diff --git a/docs/Next/classes/MongoDecompressionError.html b/docs/Next/classes/MongoDecompressionError.html index d7e2ce3607b..337f9b5dd62 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,12 +19,12 @@

    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
    prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

    Optional override for formatting stack traces

    +

    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
    prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

    Optional override for formatting stack traces

    stackTraceLimit: number

    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

      -
    • Create .stack property on a target object

      Parameters

      • targetObject: object
      • OptionalconstructorOpt: Function

      Returns void

    diff --git a/docs/Next/classes/MongoDriverError.html b/docs/Next/classes/MongoDriverError.html index 57bc97b1adf..60f0284735e 100644 --- a/docs/Next/classes/MongoDriverError.html +++ b/docs/Next/classes/MongoDriverError.html @@ -1,5 +1,5 @@ MongoDriverError | mongodb

    Class MongoDriverError

    An error generated by the driver

    -

    Hierarchy (view full)

    Constructors

    Hierarchy (view full)

    Constructors

    Properties

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

    Meant for internal use only.

    Parameters

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

    Returns MongoDriverError

    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
    prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

    Optional override for formatting stack traces

    +

    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
    prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

    Optional override for formatting stack traces

    stackTraceLimit: number

    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

      -
    • Create .stack property on a target object

      Parameters

      • targetObject: object
      • OptionalconstructorOpt: Function

      Returns void

    diff --git a/docs/Next/classes/MongoError.html b/docs/Next/classes/MongoError.html index ad9bbf220c1..69d4f82ff2e 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,12 +17,12 @@

    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
    prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

    Optional override for formatting stack traces

    +

    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
    prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

    Optional override for formatting stack traces

    stackTraceLimit: number

    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

      -
    • Create .stack property on a target object

      +
    • Create .stack property on a target object

      Parameters

      • targetObject: object
      • OptionalconstructorOpt: Function

      Returns void

    diff --git a/docs/Next/classes/MongoExpiredSessionError.html b/docs/Next/classes/MongoExpiredSessionError.html index 1c4cce09952..b4c44436b54 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,12 +19,12 @@

    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
    prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

    Optional override for formatting stack traces

    +

    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
    prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

    Optional override for formatting stack traces

    stackTraceLimit: number

    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

      -
    • Create .stack property on a target object

      Parameters

      • targetObject: object
      • OptionalconstructorOpt: Function

      Returns void

    diff --git a/docs/Next/classes/MongoGCPError.html b/docs/Next/classes/MongoGCPError.html index e4c5599fea0..697a2befc61 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,12 +19,12 @@

    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
    prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

    Optional override for formatting stack traces

    +

    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
    prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

    Optional override for formatting stack traces

    stackTraceLimit: number

    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

      -
    • Create .stack property on a target object

      Parameters

      • targetObject: object
      • OptionalconstructorOpt: Function

      Returns void

    diff --git a/docs/Next/classes/MongoGridFSChunkError.html b/docs/Next/classes/MongoGridFSChunkError.html index 44396050f97..97876edf103 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,12 +19,12 @@

    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
    prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

    Optional override for formatting stack traces

    +

    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
    prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

    Optional override for formatting stack traces

    stackTraceLimit: number

    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

      -
    • Create .stack property on a target object

      Parameters

      • targetObject: object
      • OptionalconstructorOpt: Function

      Returns void

    diff --git a/docs/Next/classes/MongoGridFSStreamError.html b/docs/Next/classes/MongoGridFSStreamError.html index 12a21abc7ab..2d01d78f2ff 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,12 +18,12 @@

    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
    prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

    Optional override for formatting stack traces

    +

    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
    prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

    Optional override for formatting stack traces

    stackTraceLimit: number

    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

      -
    • Create .stack property on a target object

      Parameters

      • targetObject: object
      • OptionalconstructorOpt: Function

      Returns void

    diff --git a/docs/Next/classes/MongoInvalidArgumentError.html b/docs/Next/classes/MongoInvalidArgumentError.html index 0dc69a2662a..e36d3cd5404 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,12 +19,12 @@

    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
    prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

    Optional override for formatting stack traces

    +

    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
    prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

    Optional override for formatting stack traces

    stackTraceLimit: number

    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

      -
    • Create .stack property on a target object

      Parameters

      • targetObject: object
      • OptionalconstructorOpt: Function

      Returns void

    diff --git a/docs/Next/classes/MongoKerberosError.html b/docs/Next/classes/MongoKerberosError.html index 584a47edf06..d905c6112df 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,12 +19,12 @@

    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
    prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

    Optional override for formatting stack traces

    +

    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
    prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

    Optional override for formatting stack traces

    stackTraceLimit: number

    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

      -
    • Create .stack property on a target object

      Parameters

      • targetObject: object
      • OptionalconstructorOpt: Function

      Returns void

    diff --git a/docs/Next/classes/MongoMissingCredentialsError.html b/docs/Next/classes/MongoMissingCredentialsError.html index 919f8064fde..4df8bebf175 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,12 +19,12 @@

    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
    prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

    Optional override for formatting stack traces

    +

    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
    prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

    Optional override for formatting stack traces

    stackTraceLimit: number

    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

      -
    • Create .stack property on a target object

      Parameters

      • targetObject: object
      • OptionalconstructorOpt: Function

      Returns void

    diff --git a/docs/Next/classes/MongoMissingDependencyError.html b/docs/Next/classes/MongoMissingDependencyError.html index 33866487fa4..c5ce3fdbada 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,13 +19,13 @@

    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
    prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

    Optional override for formatting stack traces

    +

    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
    prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

    Optional override for formatting stack traces

    stackTraceLimit: number

    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

      -
    • Create .stack property on a target object

      Parameters

      • targetObject: object
      • OptionalconstructorOpt: Function

      Returns void

    diff --git a/docs/Next/classes/MongoNetworkError.html b/docs/Next/classes/MongoNetworkError.html index 1746318d85f..2977c48ae34 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,12 +18,12 @@

    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
    prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

    Optional override for formatting stack traces

    +

    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
    prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

    Optional override for formatting stack traces

    stackTraceLimit: number

    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

      -
    • Create .stack property on a target object

      Parameters

      • targetObject: object
      • OptionalconstructorOpt: Function

      Returns void

    diff --git a/docs/Next/classes/MongoNetworkTimeoutError.html b/docs/Next/classes/MongoNetworkTimeoutError.html index 90b1b131eda..5b37b5775b6 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,12 +18,12 @@

    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
    prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

    Optional override for formatting stack traces

    +

    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
    prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

    Optional override for formatting stack traces

    stackTraceLimit: number

    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

      -
    • Create .stack property on a target object

      Parameters

      • targetObject: object
      • OptionalconstructorOpt: Function

      Returns void

    diff --git a/docs/Next/classes/MongoNotConnectedError.html b/docs/Next/classes/MongoNotConnectedError.html index c8696703b0a..b528f4f8a7f 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,12 +19,12 @@

    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
    prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

    Optional override for formatting stack traces

    +

    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
    prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

    Optional override for formatting stack traces

    stackTraceLimit: number

    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

      -
    • Create .stack property on a target object

      Parameters

      • targetObject: object
      • OptionalconstructorOpt: Function

      Returns void

    diff --git a/docs/Next/classes/MongoOIDCError.html b/docs/Next/classes/MongoOIDCError.html index 4e4386ab347..f7b46678af7 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,12 +19,12 @@

    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
    prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

    Optional override for formatting stack traces

    +

    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
    prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

    Optional override for formatting stack traces

    stackTraceLimit: number

    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

      -
    • Create .stack property on a target object

      Parameters

      • targetObject: object
      • OptionalconstructorOpt: Function

      Returns void

    diff --git a/docs/Next/classes/MongoOperationTimeoutError.html b/docs/Next/classes/MongoOperationTimeoutError.html index 0cacd27ad9d..c464864ca94 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,12 +20,12 @@

    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
    prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

    Optional override for formatting stack traces

    +

    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
    prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

    Optional override for formatting stack traces

    stackTraceLimit: number

    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

      -
    • Create .stack property on a target object

      Parameters

      • targetObject: object
      • OptionalconstructorOpt: Function

      Returns void

    diff --git a/docs/Next/classes/MongoParseError.html b/docs/Next/classes/MongoParseError.html index eb18fabf120..77f642eba32 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,12 +18,12 @@

    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
    prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

    Optional override for formatting stack traces

    +

    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
    prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

    Optional override for formatting stack traces

    stackTraceLimit: number

    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

      -
    • Create .stack property on a target object

      Parameters

      • targetObject: object
      • OptionalconstructorOpt: Function

      Returns void

    diff --git a/docs/Next/classes/MongoRuntimeError.html b/docs/Next/classes/MongoRuntimeError.html index e34053e509b..3f39e5d1391 100644 --- a/docs/Next/classes/MongoRuntimeError.html +++ b/docs/Next/classes/MongoRuntimeError.html @@ -1,6 +1,6 @@ MongoRuntimeError | mongodb

    Class MongoRuntimeError

    An error generated when the driver encounters unexpected input or reaches an unexpected/invalid internal state.

    -

    Hierarchy (view full)

    Constructors

    Hierarchy (view full)

    Constructors

    Properties

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

    Meant for internal use only.

    Parameters

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

    Returns MongoRuntimeError

    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
    prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

    Optional override for formatting stack traces

    +

    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
    prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

    Optional override for formatting stack traces

    stackTraceLimit: number

    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

      -
    • Create .stack property on a target object

      Parameters

      • targetObject: object
      • OptionalconstructorOpt: Function

      Returns void

    diff --git a/docs/Next/classes/MongoServerClosedError.html b/docs/Next/classes/MongoServerClosedError.html index 66ab428ecb2..8bb0312b022 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,12 +19,12 @@

    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
    prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

    Optional override for formatting stack traces

    +

    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
    prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

    Optional override for formatting stack traces

    stackTraceLimit: number

    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

      -
    • Create .stack property on a target object

      Parameters

      • targetObject: object
      • OptionalconstructorOpt: Function

      Returns void

    diff --git a/docs/Next/classes/MongoServerError.html b/docs/Next/classes/MongoServerError.html index 98a487c8631..1948a333466 100644 --- a/docs/Next/classes/MongoServerError.html +++ b/docs/Next/classes/MongoServerError.html @@ -1,5 +1,5 @@ MongoServerError | mongodb

    Class MongoServerError

    An error coming from the mongo server

    -

    Hierarchy (view full)

    Indexable

    • [key: string]: any

    Constructors

    Hierarchy (view full)

    Indexable

    • [key: string]: any

    Constructors

    Properties

    cause? code? codeName? @@ -23,13 +23,13 @@

    Meant for internal use only.

    Parameters

    Returns MongoServerError

    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
    prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

    Optional override for formatting stack traces

    +

    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
    prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

    Optional override for formatting stack traces

    stackTraceLimit: number

    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

      -
    • Create .stack property on a target object

      Parameters

      • targetObject: object
      • OptionalconstructorOpt: Function

      Returns void

    diff --git a/docs/Next/classes/MongoServerSelectionError.html b/docs/Next/classes/MongoServerSelectionError.html index 46a89af772f..3882fdcb707 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,13 +19,13 @@

    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
    prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

    Optional override for formatting stack traces

    +

    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
    prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

    Optional override for formatting stack traces

    stackTraceLimit: number

    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

      -
    • Create .stack property on a target object

      Parameters

      • targetObject: object
      • OptionalconstructorOpt: Function

      Returns void

    diff --git a/docs/Next/classes/MongoStalePrimaryError.html b/docs/Next/classes/MongoStalePrimaryError.html index e7e01c4c205..f77d0f12c21 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,12 +18,12 @@

    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
    prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

    Optional override for formatting stack traces

    +

    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
    prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

    Optional override for formatting stack traces

    stackTraceLimit: number

    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

      -
    • Create .stack property on a target object

      Parameters

      • targetObject: object
      • OptionalconstructorOpt: Function

      Returns void

    diff --git a/docs/Next/classes/MongoSystemError.html b/docs/Next/classes/MongoSystemError.html index 4127dd9df9c..f3f51dbfe47 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,13 +19,13 @@

    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
    prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

    Optional override for formatting stack traces

    +

    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
    prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

    Optional override for formatting stack traces

    stackTraceLimit: number

    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

      -
    • Create .stack property on a target object

      Parameters

      • targetObject: object
      • OptionalconstructorOpt: Function

      Returns void

    diff --git a/docs/Next/classes/MongoTailableCursorError.html b/docs/Next/classes/MongoTailableCursorError.html index b687273bba4..9bfeaa51181 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,12 +18,12 @@

    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
    prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

    Optional override for formatting stack traces

    +

    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
    prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

    Optional override for formatting stack traces

    stackTraceLimit: number

    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

      -
    • Create .stack property on a target object

      Parameters

      • targetObject: object
      • OptionalconstructorOpt: Function

      Returns void

    diff --git a/docs/Next/classes/MongoTopologyClosedError.html b/docs/Next/classes/MongoTopologyClosedError.html index 11b15780e76..aec4fe397ca 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,12 +19,12 @@

    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
    prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

    Optional override for formatting stack traces

    +

    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
    prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

    Optional override for formatting stack traces

    stackTraceLimit: number

    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

      -
    • Create .stack property on a target object

      Parameters

      • targetObject: object
      • OptionalconstructorOpt: Function

      Returns void

    diff --git a/docs/Next/classes/MongoTransactionError.html b/docs/Next/classes/MongoTransactionError.html index b5c450d8439..3bb52415004 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,12 +19,12 @@

    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
    prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

    Optional override for formatting stack traces

    +

    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
    prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

    Optional override for formatting stack traces

    stackTraceLimit: number

    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

      -
    • Create .stack property on a target object

      Parameters

      • targetObject: object
      • OptionalconstructorOpt: Function

      Returns void

    diff --git a/docs/Next/classes/MongoUnexpectedServerResponseError.html b/docs/Next/classes/MongoUnexpectedServerResponseError.html index abd47378530..8689ef81799 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,12 +26,12 @@

    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
    prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

    Optional override for formatting stack traces

    +

    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
    prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

    Optional override for formatting stack traces

    stackTraceLimit: number

    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

      -
    • Create .stack property on a target object

      Parameters

      • targetObject: object
      • OptionalconstructorOpt: Function

      Returns void

    diff --git a/docs/Next/classes/MongoWriteConcernError.html b/docs/Next/classes/MongoWriteConcernError.html index 399cdf5340a..5f2f590799f 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,14 +24,14 @@

    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
    prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

    Optional override for formatting stack traces

    +

    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
    prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

    Optional override for formatting stack traces

    stackTraceLimit: number

    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

      -
    • Create .stack property on a target object

      Parameters

      • targetObject: object
      • OptionalconstructorOpt: Function

      Returns void

    diff --git a/docs/Next/classes/OrderedBulkOperation.html b/docs/Next/classes/OrderedBulkOperation.html index 90ae787cb82..dc7807edced 100644 --- a/docs/Next/classes/OrderedBulkOperation.html +++ b/docs/Next/classes/OrderedBulkOperation.html @@ -1,4 +1,4 @@ -OrderedBulkOperation | mongodb

    Class OrderedBulkOperation

    Hierarchy (view full)

    Properties

    isOrdered +OrderedBulkOperation | mongodb

    Class OrderedBulkOperation

    Hierarchy (view full)

    Properties

    Accessors

    batches bsonOptions @@ -9,14 +9,14 @@ find insert raw -

    Properties

    isOrdered: boolean
    operationId?: number

    Accessors

    Methods

    • Builds a find operation for an update/updateOne/delete/deleteOne/replaceOne. +

    Properties

    isOrdered: boolean
    operationId?: number

    Accessors

    Methods

    • Builds a find operation for an update/updateOne/delete/deleteOne/replaceOne. Returns a builder object used to complete the definition of the operation.

      Parameters

      Returns FindOperators

      const bulkOp = collection.initializeOrderedBulkOp();

      // Add an updateOne to the bulkOp
      bulkOp.find({ a: 1 }).updateOne({ $set: { b: 2 } });

      // Add an updateMany to the bulkOp
      bulkOp.find({ c: 3 }).update({ $set: { d: 4 } });

      // Add an upsert
      bulkOp.find({ e: 5 }).upsert().updateOne({ $set: { f: 6 } });

      // Add a deletion
      bulkOp.find({ g: 7 }).deleteOne();

      // Add a multi deletion
      bulkOp.find({ h: 8 }).delete();

      // Add a replaceOne
      bulkOp.find({ i: 9 }).replaceOne({writeConcern: { j: 10 }});

      // Update using a pipeline (requires Mongodb 4.2 or higher)
      bulk.find({ k: 11, y: { $exists: true }, z: { $exists: true } }).updateOne([
      { $set: { total: { $sum: [ '$y', '$z' ] } } }
      ]);

      // All of the ops will now be executed
      await bulkOp.execute();
      -
    +
    diff --git a/docs/Next/classes/ReadConcern.html b/docs/Next/classes/ReadConcern.html index 527dd370a93..a4a6c31c208 100644 --- a/docs/Next/classes/ReadConcern.html +++ b/docs/Next/classes/ReadConcern.html @@ -1,7 +1,7 @@ ReadConcern | mongodb

    Class ReadConcern

    The MongoDB ReadConcern, which allows for control of the consistency and isolation properties of the data read from replica sets and replica set shards.

    Constructors

    Constructors

    Properties

    Accessors

    AVAILABLE LINEARIZABLE @@ -10,6 +10,6 @@

    Methods

    Constructors

    Properties

    level: string

    Accessors

    Methods

    Properties

    level: string

    Accessors

    Methods

    +

    Returns undefined | ReadConcern

    diff --git a/docs/Next/classes/ReadPreference.html b/docs/Next/classes/ReadPreference.html index d2d4ff9a7e3..0d177dab006 100644 --- a/docs/Next/classes/ReadPreference.html +++ b/docs/Next/classes/ReadPreference.html @@ -1,7 +1,7 @@ ReadPreference | mongodb

    Class ReadPreference

    The ReadPreference class is a class that represents a MongoDB ReadPreference and is used to construct connections.

    Constructors

    Constructors

    Properties

    Constructors

    Properties

    hedge?: HedgeOptions
    maxStalenessSeconds?: number
    minWireVersion?: number

    This will be removed as dead code in the next major version.

    -
    tags?: TagSet[]
    nearest: ReadPreference = ...
    NEAREST: "nearest" = ReadPreferenceMode.nearest
    primary: ReadPreference = ...
    PRIMARY: "primary" = ReadPreferenceMode.primary
    PRIMARY_PREFERRED: "primaryPreferred" = ReadPreferenceMode.primaryPreferred
    primaryPreferred: ReadPreference = ...
    secondary: ReadPreference = ...
    SECONDARY: "secondary" = ReadPreferenceMode.secondary
    SECONDARY_PREFERRED: "secondaryPreferred" = ReadPreferenceMode.secondaryPreferred
    secondaryPreferred: ReadPreference = ...

    Accessors

    Methods

    • Check if the two ReadPreferences are equivalent

      +

    Returns ReadPreference

    Properties

    hedge?: HedgeOptions
    maxStalenessSeconds?: number
    minWireVersion?: number

    This will be removed as dead code in the next major version.

    +
    tags?: TagSet[]
    nearest: ReadPreference = ...
    NEAREST: "nearest" = ReadPreferenceMode.nearest
    primary: ReadPreference = ...
    PRIMARY: "primary" = ReadPreferenceMode.primary
    PRIMARY_PREFERRED: "primaryPreferred" = ReadPreferenceMode.primaryPreferred
    primaryPreferred: ReadPreference = ...
    secondary: ReadPreference = ...
    SECONDARY: "secondary" = ReadPreferenceMode.secondary
    SECONDARY_PREFERRED: "secondaryPreferred" = ReadPreferenceMode.secondaryPreferred
    secondaryPreferred: ReadPreference = ...

    Accessors

    Methods

    • Check if the two ReadPreferences are equivalent

      Parameters

      • readPreference: ReadPreference

        The read preference with which to check equality

        -

      Returns boolean

    • Validate if a mode is legal

      +

    Returns boolean

    Returns boolean

    Returns undefined | ReadPreference

    +

    Returns boolean

    diff --git a/docs/Next/classes/RunCommandCursor.html b/docs/Next/classes/RunCommandCursor.html index 2711450927c..57f94862f35 100644 --- a/docs/Next/classes/RunCommandCursor.html +++ b/docs/Next/classes/RunCommandCursor.html @@ -1,4 +1,4 @@ -RunCommandCursor | mongodb

    Class RunCommandCursor

    Hierarchy (view full)

    Properties

    [asyncDispose] +RunCommandCursor | mongodb

    Class RunCommandCursor

    Hierarchy (view full)

    Properties

    [asyncDispose]: (() => Promise<void>)

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

    -
    command: Readonly<Record<string, any>>
    getMoreOptions: {
        batchSize?: number;
        comment?: any;
        maxAwaitTimeMS?: number;
    } = {}
    signal: undefined | AbortSignal
    captureRejections: boolean

    Value: boolean

    +
    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 @@ -96,54 +96,54 @@ 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

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

      -

      Parameters

      • Optionaloptions: {
            timeoutMS?: number;
        }
        • OptionaltimeoutMS?: number

      Returns Promise<void>

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

      +

      Parameters

      • Optionaloptions: {
            timeoutMS?: number;
        }
        • OptionaltimeoutMS?: number

      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

      Type Parameters

      • EventKey extends "close"

      Parameters

      Returns boolean

      v0.1.26

      -
    • Returns an array listing the events for which the emitter has registered listeners. The values in the array are strings or Symbols.

      import { EventEmitter } from 'node:events';

      const myEE = new EventEmitter();
      myEE.on('foo', () => {});
      myEE.on('bar', () => {});

      const sym = Symbol('symbol');
      myEE.on(sym, () => {});

      console.log(myEE.eventNames());
      // Prints: [ 'foo', 'bar', Symbol(symbol) ]

      Returns string[]

      v6.0.0

      -
    • Iterates over all the documents for this cursor using the iterator, callback pattern.

      If the iterator returns false, iteration will stop.

      Parameters

      • iterator: ((doc: any) => boolean | void)

        The iteration callback.

          • (doc): boolean | void
          • Parameters

            • doc: any

            Returns boolean | void

      Returns Promise<void>

      • Will be removed in a future release. Use for await...of instead.
      -
    • 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

      -
    • Map all documents using the provided function If there is a transform set on the cursor, that will be called first and the result passed to this function's transform.

      Type Parameters

      • T = any

      Parameters

      • transform: ((doc: any) => T)

        The mapping transformation method.

        @@ -164,15 +164,15 @@
        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[]
        -
    • Adds the listener function to the end of the listeners array for the event named eventName. No checks are made to see if the listener has already been added. Multiple calls passing the same combination of eventName and listener will result in the listener being added, and called, multiple times.

      @@ -187,7 +187,7 @@

      Returns this

      v0.1.101

      -
    • Adds the listener function to the end of the listeners array for the event +

    • Adds the listener function to the end of the listeners array for the event named eventName. No checks are made to see if the listener has already been added. Multiple calls passing the same combination of eventName and listener will result in the listener being added, and called, multiple times.

      @@ -202,7 +202,7 @@

      Returns this

      v0.1.101

      -
    • Adds the listener function to the end of the listeners array for the event +

    • Adds the listener function to the end of the listeners array for the event named eventName. No checks are made to see if the listener has already been added. Multiple calls passing the same combination of eventName and listener will result in the listener being added, and called, multiple times.

      @@ -217,7 +217,7 @@

      Returns this

      v0.1.101

      -
    • Adds a one-time listener function for the event named eventName. The next time eventName is triggered, this listener is removed and then invoked.

      server.once('connection', (stream) => {
      console.log('Ah, we have our first user!');
      });
      @@ -230,7 +230,7 @@

      Returns this

      v0.3.0

      -
    • Adds a one-time listener function for the event named eventName. The +

    • Adds a one-time listener function for the event named eventName. The next time eventName is triggered, this listener is removed and then invoked.

      server.once('connection', (stream) => {
      console.log('Ah, we have our first user!');
      });
      @@ -243,7 +243,7 @@

      Returns this

      v0.3.0

      -
    • Adds a one-time listener function for the event named eventName. The +

    • Adds a one-time listener function for the event named eventName. The next time eventName is triggered, this listener is removed and then invoked.

      server.once('connection', (stream) => {
      console.log('Ah, we have our first user!');
      });
      @@ -256,7 +256,7 @@

      Returns this

      v0.3.0

      -
    • Returns a copy of the array of listeners for the event named eventName, including any wrappers (such as those created by .once()).

      import { EventEmitter } from 'node:events';
      const emitter = new EventEmitter();
      emitter.once('log', () => console.log('log once'));

      // Returns a new Array with a function `onceWrapper` which has a property
      // `listener` which contains the original listener bound above
      const listeners = emitter.rawListeners('log');
      const logFnWrapper = listeners[0];

      // Logs "log once" to the console and does not unbind the `once` event
      logFnWrapper.listener();

      // Logs "log once" to the console and removes the listener
      logFnWrapper();

      emitter.on('log', () => console.log('log persistently'));
      // Will return a new Array with a single function bound by `.on()` above
      const newListeners = emitter.rawListeners('log');

      // Logs "log persistently" twice
      newListeners[0]();
      emitter.emit('log');

      Type Parameters

      • EventKey extends "close"

      Parameters

      Returns AbstractCursorEvents[EventKey][]

      v9.4.0

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

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

      Type Parameters

      • EventKey extends "close"

      Parameters

      • Optionalevent: string | symbol | EventKey

      Returns this

      v0.1.26

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

      +

    Returns this

    • By default EventEmitters will print a warning if more than 10 listeners are +

    Returns this

    • 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

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

    Constructors

    Properties

    maxWireVersion: number
    minWireVersion: number

    Accessors

    diff --git a/docs/Next/classes/ServerClosedEvent.html b/docs/Next/classes/ServerClosedEvent.html index 541bf77aa2a..c1434c728ce 100644 --- a/docs/Next/classes/ServerClosedEvent.html +++ b/docs/Next/classes/ServerClosedEvent.html @@ -1,6 +1,6 @@ ServerClosedEvent | mongodb

    Class ServerClosedEvent

    Emitted when server is closed.

    -

    Properties

    Properties

    Properties

    address: string

    The address (host/port pair) of the server

    -
    topologyId: number

    A unique identifier for the topology

    -
    +
    topologyId: number

    A unique identifier for the topology

    +
    diff --git a/docs/Next/classes/ServerDescription.html b/docs/Next/classes/ServerDescription.html index c056d166954..3e90194a305 100644 --- a/docs/Next/classes/ServerDescription.html +++ b/docs/Next/classes/ServerDescription.html @@ -1,6 +1,6 @@ ServerDescription | mongodb

    Class ServerDescription

    The client's view of a single server, based on the most recent hello outcome.

    Internal type, not meant to be directly instantiated

    -

    Properties

    Properties

    Methods

    Properties

    $clusterTime?: ClusterTime
    address: string
    arbiters: string[]
    electionId: null | ObjectId
    error: null | MongoError
    hosts: string[]
    iscryptd: boolean

    Indicates server is a mongocryptd instance.

    -
    lastUpdateTime: number
    lastWriteDate: number
    logicalSessionTimeoutMinutes: null | number
    maxBsonObjectSize: null | number

    The max bson object size.

    -
    maxMessageSizeBytes: null | number

    The max message size in bytes for the server.

    -
    maxWireVersion: number
    maxWriteBatchSize: null | number

    The max number of writes in a bulk write command.

    -
    me: null | string
    minRoundTripTime: number

    The minimum measurement of the last 10 measurements of roundTripTime that have been collected

    -
    minWireVersion: number
    passives: string[]
    primary: null | string
    roundTripTime: number
    setName: null | string
    setVersion: null | number
    tags: TagSet
    topologyVersion: null | TopologyVersion

    Accessors

    Methods

    • Determines if another ServerDescription is equal to this one per the rules defined in the SDAM specification.

      +

    Properties

    $clusterTime?: ClusterTime
    address: string
    arbiters: string[]
    electionId: null | ObjectId
    error: null | MongoError
    hosts: string[]
    iscryptd: boolean

    Indicates server is a mongocryptd instance.

    +
    lastUpdateTime: number
    lastWriteDate: number
    logicalSessionTimeoutMinutes: null | number
    maxBsonObjectSize: null | number

    The max bson object size.

    +
    maxMessageSizeBytes: null | number

    The max message size in bytes for the server.

    +
    maxWireVersion: number
    maxWriteBatchSize: null | number

    The max number of writes in a bulk write command.

    +
    me: null | string
    minRoundTripTime: number

    The minimum measurement of the last 10 measurements of roundTripTime that have been collected

    +
    minWireVersion: number
    passives: string[]
    primary: null | string
    roundTripTime: number
    setName: null | string
    setVersion: null | number
    tags: TagSet
    topologyVersion: null | TopologyVersion

    Accessors

    Methods

    +
    diff --git a/docs/Next/classes/ServerDescriptionChangedEvent.html b/docs/Next/classes/ServerDescriptionChangedEvent.html index 0cdcf2e54de..26bdbed79a1 100644 --- a/docs/Next/classes/ServerDescriptionChangedEvent.html +++ b/docs/Next/classes/ServerDescriptionChangedEvent.html @@ -1,11 +1,11 @@ ServerDescriptionChangedEvent | mongodb

    Class ServerDescriptionChangedEvent

    Emitted when server description changes, but does NOT include changes to the RTT.

    -

    Properties

    Properties

    address: string

    The address (host/port pair) of the server

    -
    name: "serverDescriptionChanged" = SERVER_DESCRIPTION_CHANGED
    newDescription: ServerDescription

    The new server description

    -
    previousDescription: ServerDescription

    The previous server description

    -
    topologyId: number

    A unique identifier for the topology

    -
    +
    name: "serverDescriptionChanged" = SERVER_DESCRIPTION_CHANGED
    newDescription: ServerDescription

    The new server description

    +
    previousDescription: ServerDescription

    The previous server description

    +
    topologyId: number

    A unique identifier for the topology

    +
    diff --git a/docs/Next/classes/ServerHeartbeatFailedEvent.html b/docs/Next/classes/ServerHeartbeatFailedEvent.html index 033292afba6..7a5c8bb33ea 100644 --- a/docs/Next/classes/ServerHeartbeatFailedEvent.html +++ b/docs/Next/classes/ServerHeartbeatFailedEvent.html @@ -1,10 +1,10 @@ ServerHeartbeatFailedEvent | mongodb

    Class ServerHeartbeatFailedEvent

    Emitted when the server monitor’s hello fails, either with an “ok: 0” or a socket exception.

    -

    Properties

    Properties

    awaited: boolean

    Is true when using the streaming protocol

    -
    connectionId: string

    The connection id for the command

    -
    duration: number

    The execution time of the event in ms

    -
    failure: Error

    The command failure

    -
    +
    connectionId: string

    The connection id for the command

    +
    duration: number

    The execution time of the event in ms

    +
    failure: Error

    The command failure

    +
    diff --git a/docs/Next/classes/ServerHeartbeatStartedEvent.html b/docs/Next/classes/ServerHeartbeatStartedEvent.html index df854895f6f..9965051aa7c 100644 --- a/docs/Next/classes/ServerHeartbeatStartedEvent.html +++ b/docs/Next/classes/ServerHeartbeatStartedEvent.html @@ -1,7 +1,7 @@ ServerHeartbeatStartedEvent | mongodb

    Class ServerHeartbeatStartedEvent

    Emitted when the server monitor’s hello command is started - immediately before the hello command is serialized into raw BSON and written to the socket.

    -

    Properties

    Properties

    awaited: boolean

    Is true when using the streaming protocol

    -
    connectionId: string

    The connection id for the command

    -
    +
    connectionId: string

    The connection id for the command

    +
    diff --git a/docs/Next/classes/ServerHeartbeatSucceededEvent.html b/docs/Next/classes/ServerHeartbeatSucceededEvent.html index 3711aedb1db..4aa25049794 100644 --- a/docs/Next/classes/ServerHeartbeatSucceededEvent.html +++ b/docs/Next/classes/ServerHeartbeatSucceededEvent.html @@ -1,10 +1,10 @@ ServerHeartbeatSucceededEvent | mongodb

    Class ServerHeartbeatSucceededEvent

    Emitted when the server monitor’s hello succeeds.

    -

    Properties

    Properties

    awaited: boolean

    Is true when using the streaming protocol

    -
    connectionId: string

    The connection id for the command

    -
    duration: number

    The execution time of the event in ms

    -
    reply: Document

    The command reply

    -
    +
    connectionId: string

    The connection id for the command

    +
    duration: number

    The execution time of the event in ms

    +
    reply: Document

    The command reply

    +
    diff --git a/docs/Next/classes/ServerOpeningEvent.html b/docs/Next/classes/ServerOpeningEvent.html index 0190a69fb76..7e22644ad5f 100644 --- a/docs/Next/classes/ServerOpeningEvent.html +++ b/docs/Next/classes/ServerOpeningEvent.html @@ -1,6 +1,6 @@ ServerOpeningEvent | mongodb

    Class ServerOpeningEvent

    Emitted when server is initialized.

    -

    Properties

    Properties

    Properties

    address: string

    The address (host/port pair) of the server

    -
    topologyId: number

    A unique identifier for the topology

    -
    +
    topologyId: number

    A unique identifier for the topology

    +
    diff --git a/docs/Next/classes/ServerSession.html b/docs/Next/classes/ServerSession.html index ddc52099d89..cf57754789a 100644 --- a/docs/Next/classes/ServerSession.html +++ b/docs/Next/classes/ServerSession.html @@ -1,10 +1,10 @@ ServerSession | mongodb

    Class ServerSession

    Reflects the existence of a session on the server. Can be reused by the session pool. WARNING: not meant to be instantiated directly. For internal use only.

    -

    Properties

    id +

    Properties

    isDirty: boolean
    lastUse: number
    txnNumber: number

    Methods

    • Determines if the server session has timed out.

      +

    Properties

    isDirty: boolean
    lastUse: number
    txnNumber: number

    Methods

    • Determines if the server session has timed out.

      Parameters

      • sessionTimeoutMinutes: number

        The server's "logicalSessionTimeoutMinutes"

        -

      Returns boolean

    +

    Returns boolean

    diff --git a/docs/Next/classes/StreamDescription.html b/docs/Next/classes/StreamDescription.html index baff81121b5..3d88c52bb71 100644 --- a/docs/Next/classes/StreamDescription.html +++ b/docs/Next/classes/StreamDescription.html @@ -1,4 +1,4 @@ -StreamDescription | mongodb

    Class StreamDescription

    Constructors

    constructor +StreamDescription | mongodb

    Class StreamDescription

    Constructors

    Properties

    __nodejs_mock_server__?: boolean
    address: string
    compressor?:
        | "none"
        | "snappy"
        | "zlib"
        | "zstd"
    compressors: (
        | "none"
        | "snappy"
        | "zlib"
        | "zstd")[]
    hello: null | Document = null
    loadBalanced: boolean
    logicalSessionTimeoutMinutes?: number
    maxBsonObjectSize: number
    maxMessageSizeBytes: number
    maxWireVersion?: number
    maxWriteBatchSize: number
    minWireVersion?: number
    serverConnectionId: null | bigint
    zlibCompressionLevel?: number

    Methods

    +

    Constructors

    Properties

    __nodejs_mock_server__?: boolean
    address: string
    compressor?:
        | "none"
        | "snappy"
        | "zlib"
        | "zstd"
    compressors: (
        | "none"
        | "snappy"
        | "zlib"
        | "zstd")[]
    hello: null | Document = null
    loadBalanced: boolean
    logicalSessionTimeoutMinutes?: number
    maxBsonObjectSize: number
    maxMessageSizeBytes: number
    maxWireVersion?: number
    maxWriteBatchSize: number
    minWireVersion?: number
    serverConnectionId: null | bigint
    zlibCompressionLevel?: number

    Methods

    diff --git a/docs/Next/classes/TopologyClosedEvent.html b/docs/Next/classes/TopologyClosedEvent.html index e44435a5a3b..ddf8a2f587d 100644 --- a/docs/Next/classes/TopologyClosedEvent.html +++ b/docs/Next/classes/TopologyClosedEvent.html @@ -1,4 +1,4 @@ TopologyClosedEvent | mongodb

    Class TopologyClosedEvent

    Emitted when topology is closed.

    -

    Properties

    Properties

    Properties

    topologyId: number

    A unique identifier for the topology

    -
    +
    diff --git a/docs/Next/classes/TopologyDescription.html b/docs/Next/classes/TopologyDescription.html index 105e8cd794b..c0b90202d77 100644 --- a/docs/Next/classes/TopologyDescription.html +++ b/docs/Next/classes/TopologyDescription.html @@ -1,5 +1,5 @@ TopologyDescription | mongodb

    Class TopologyDescription

    Representation of a deployment of servers

    -

    Constructors

    Constructors

    Properties

    Methods

    Constructors

    Properties

    commonWireVersion: number
    compatibilityError?: string
    compatible: boolean
    heartbeatFrequencyMS: number
    localThresholdMS: number
    logicalSessionTimeoutMinutes: null | number
    maxElectionId: null | ObjectId
    maxSetVersion: null | number
    servers: Map<string, ServerDescription>
    setName: null | string
    stale: boolean

    Accessors

    Methods

    Properties

    commonWireVersion: number
    compatibilityError?: string
    compatible: boolean
    heartbeatFrequencyMS: number
    localThresholdMS: number
    logicalSessionTimeoutMinutes: null | number
    maxElectionId: null | ObjectId
    maxSetVersion: null | number
    servers: Map<string, ServerDescription>
    setName: null | string
    stale: boolean

    Accessors

    Methods

    +

    Returns Document

    diff --git a/docs/Next/classes/TopologyDescriptionChangedEvent.html b/docs/Next/classes/TopologyDescriptionChangedEvent.html index 25af8baf9f4..3b4e1cafd74 100644 --- a/docs/Next/classes/TopologyDescriptionChangedEvent.html +++ b/docs/Next/classes/TopologyDescriptionChangedEvent.html @@ -1,8 +1,8 @@ TopologyDescriptionChangedEvent | mongodb

    Class TopologyDescriptionChangedEvent

    Emitted when topology description changes.

    -

    Properties

    Properties

    newDescription: TopologyDescription

    The new topology description

    -
    previousDescription: TopologyDescription

    The old topology description

    -
    topologyId: number

    A unique identifier for the topology

    -
    +
    previousDescription: TopologyDescription

    The old topology description

    +
    topologyId: number

    A unique identifier for the topology

    +
    diff --git a/docs/Next/classes/TopologyOpeningEvent.html b/docs/Next/classes/TopologyOpeningEvent.html index 142016842f6..8a3d05e8b79 100644 --- a/docs/Next/classes/TopologyOpeningEvent.html +++ b/docs/Next/classes/TopologyOpeningEvent.html @@ -1,4 +1,4 @@ TopologyOpeningEvent | mongodb

    Class TopologyOpeningEvent

    Emitted when topology is initialized.

    -

    Properties

    Properties

    Properties

    topologyId: number

    A unique identifier for the topology

    -
    +
    diff --git a/docs/Next/classes/Transaction.html b/docs/Next/classes/Transaction.html index ab7c635b1e8..baae2b305cd 100644 --- a/docs/Next/classes/Transaction.html +++ b/docs/Next/classes/Transaction.html @@ -2,7 +2,7 @@
  • Will be made internal in a future major release. A class maintaining state related to a server transaction. Internal Only
  • -

    Properties

    Properties

    Accessors

    isActive isCommitted isPinned @@ -11,21 +11,21 @@

    Properties

    • Will be made internal in a future major release.
    -

    Accessors

    • get isActive(): boolean
    • Returns boolean

      Whether this session is presently in a transaction

      +

    Accessors

    • get isActive(): boolean
    • Returns boolean

      Whether this session is presently in a transaction

      • Will be made internal in a future major release.
      -
    • get isCommitted(): boolean
    • Returns boolean

      • Will be made internal in a future major release.
      -
    • get isPinned(): boolean
    • Returns boolean

      • Will be made internal in a future major release.
      -
    • get isStarting(): boolean
    • Returns boolean

      Whether the transaction has started

      • Will be made internal in a future major release.
      -
    +
    diff --git a/docs/Next/classes/TypedEventEmitter.html b/docs/Next/classes/TypedEventEmitter.html index e125ae50ed3..a78777ff335 100644 --- a/docs/Next/classes/TypedEventEmitter.html +++ b/docs/Next/classes/TypedEventEmitter.html @@ -1,5 +1,5 @@ TypedEventEmitter | mongodb

    Class TypedEventEmitter<Events>

    Typescript type safe event emitter

    -

    Type Parameters

    Hierarchy (view full)

    Constructors

    Type Parameters

    Hierarchy (view full)

    Constructors

    Properties

    v13.6.0, v12.17.0

    Methods

    • Type Parameters

      • K

      Parameters

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

      Returns void

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

      Type Parameters

      • EventKey extends string | number | symbol

      Parameters

      Returns this

      v0.1.26

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

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

      Parameters

      Returns this

      v0.1.26

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

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

      Parameters

      Returns this

      v0.1.26

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

    • 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

      Type Parameters

      • EventKey extends string | number | symbol

      Parameters

      Returns boolean

      v0.1.26

      -
    • Returns an array listing the events for which the emitter has registered +

    • Returns an array listing the events for which the emitter has registered listeners. The values in the array are strings or Symbols.

      import { EventEmitter } from 'node:events';

      const myEE = new EventEmitter();
      myEE.on('foo', () => {});
      myEE.on('bar', () => {});

      const sym = Symbol('symbol');
      myEE.on(sym, () => {});

      console.log(myEE.eventNames());
      // Prints: [ 'foo', 'bar', Symbol(symbol) ]

      Returns string[]

      v6.0.0

      -
    • Returns the current max listener value for the EventEmitter which is either +

    • Returns the current max listener value for the EventEmitter which is either set by emitter.setMaxListeners(n) or defaults to EventEmitter.defaultMaxListeners.

      Returns number

      v1.0.0

      -
    • Returns the number of listeners listening for the event named eventName. +

    • 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 string | number | symbol

      Parameters

      Returns number

      v3.2.0

      -
    • Returns a copy of the array of listeners for the event named eventName.

      server.on('connection', (stream) => {
      console.log('someone connected!');
      });
      console.log(util.inspect(server.listeners('connection')));
      // Prints: [ [Function] ]

      Type Parameters

      • EventKey extends string | number | symbol

      Parameters

      Returns Events[EventKey][]

      v0.1.26

      -
    • Alias for emitter.removeListener().

      Type Parameters

      • EventKey extends string | number | symbol

      Parameters

      Returns this

      v10.0.0

      -
    • Alias for emitter.removeListener().

      +
    • Alias for emitter.removeListener().

      Parameters

      Returns this

      v10.0.0

      -
    • Alias for emitter.removeListener().

      +
    • Alias for emitter.removeListener().

      Parameters

      Returns this

      v10.0.0

      -
    • Adds the listener function to the end of the listeners array for the event +

    • Adds the listener function to the end of the listeners array for the event named eventName. No checks are made to see if the listener has already been added. Multiple calls passing the same combination of eventName and listener will result in the listener being added, and called, multiple times.

      @@ -114,7 +114,7 @@

      Type Parameters

      • EventKey extends string | number | symbol

      Parameters

      Returns this

      v0.1.101

      -
    • Adds the listener function to the end of the listeners array for the event +

    • Adds the listener function to the end of the listeners array for the event named eventName. No checks are made to see if the listener has already been added. Multiple calls passing the same combination of eventName and listener will result in the listener being added, and called, multiple times.

      @@ -129,7 +129,7 @@

      Parameters

      • event: CommonEvents
      • listener: ((eventName: string | symbol, listener: GenericListener) => void)

        The callback function

          • (eventName, listener): void
          • Parameters

            Returns void

      Returns this

      v0.1.101

      -
    • Adds the listener function to the end of the listeners array for the event +

    • Adds the listener function to the end of the listeners array for the event named eventName. No checks are made to see if the listener has already been added. Multiple calls passing the same combination of eventName and listener will result in the listener being added, and called, multiple times.

      @@ -144,7 +144,7 @@

      Parameters

      Returns this

      v0.1.101

      -
    • Adds a one-time listener function for the event named eventName. The +

    • Adds a one-time listener function for the event named eventName. The next time eventName is triggered, this listener is removed and then invoked.

      server.once('connection', (stream) => {
      console.log('Ah, we have our first user!');
      });
      @@ -157,7 +157,7 @@

      Type Parameters

      • EventKey extends string | number | symbol

      Parameters

      Returns this

      v0.3.0

      -
    • Adds a one-time listener function for the event named eventName. The +

    • Adds a one-time listener function for the event named eventName. The next time eventName is triggered, this listener is removed and then invoked.

      server.once('connection', (stream) => {
      console.log('Ah, we have our first user!');
      });
      @@ -170,7 +170,7 @@

      Parameters

      • event: CommonEvents
      • listener: ((eventName: string | symbol, listener: GenericListener) => void)

        The callback function

          • (eventName, listener): void
          • Parameters

            Returns void

      Returns this

      v0.3.0

      -
    • Adds a one-time listener function for the event named eventName. The +

    • Adds a one-time listener function for the event named eventName. The next time eventName is triggered, this listener is removed and then invoked.

      server.once('connection', (stream) => {
      console.log('Ah, we have our first user!');
      });
      @@ -183,7 +183,7 @@

      Parameters

      Returns this

      v0.3.0

      -
    • Adds the listener function to the beginning of the listeners array for the +

    • Adds the listener function to the beginning of the listeners array for the event named eventName. No checks are made to see if the listener has already been added. Multiple calls passing the same combination of eventName and listener will result in the listener being added, and called, multiple times.

      @@ -193,7 +193,7 @@

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

      Type Parameters

      • EventKey extends string | number | symbol

      Parameters

      Returns this

      v6.0.0

      -
    • Adds the listener function to the beginning of the listeners array for the +

    • Adds the listener function to the beginning of the listeners array for the event named eventName. No checks are made to see if the listener has already been added. Multiple calls passing the same combination of eventName and listener will result in the listener being added, and called, multiple times.

      @@ -203,7 +203,7 @@

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

      Parameters

      • event: CommonEvents
      • listener: ((eventName: string | symbol, listener: GenericListener) => void)

        The callback function

          • (eventName, listener): void
          • Parameters

            Returns void

      Returns this

      v6.0.0

      -
    • Adds the listener function to the beginning of the listeners array for the +

    • Adds the listener function to the beginning of the listeners array for the event named eventName. No checks are made to see if the listener has already been added. Multiple calls passing the same combination of eventName and listener will result in the listener being added, and called, multiple times.

      @@ -213,7 +213,7 @@

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

      Parameters

      Returns this

      v6.0.0

      -
    • Adds a one-timelistener function for the event named eventName to the beginning of the listeners array. The next time eventName is triggered, this +

    • Adds a one-timelistener function for the event named eventName to the beginning of the listeners array. The next time eventName is triggered, this listener is removed, and then invoked.

      server.prependOnceListener('connection', (stream) => {
      console.log('Ah, we have our first user!');
      });
      @@ -221,7 +221,7 @@

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

      Type Parameters

      • EventKey extends string | number | symbol

      Parameters

      Returns this

      v6.0.0

      -
    • Adds a one-timelistener function for the event named eventName to the beginning of the listeners array. The next time eventName is triggered, this +

    • Adds a one-timelistener function for the event named eventName to the beginning of the listeners array. The next time eventName is triggered, this listener is removed, and then invoked.

      server.prependOnceListener('connection', (stream) => {
      console.log('Ah, we have our first user!');
      });
      @@ -229,7 +229,7 @@

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

      Parameters

      • event: CommonEvents
      • listener: ((eventName: string | symbol, listener: GenericListener) => void)

        The callback function

          • (eventName, listener): void
          • Parameters

            Returns void

      Returns this

      v6.0.0

      -
    • Adds a one-timelistener function for the event named eventName to the beginning of the listeners array. The next time eventName is triggered, this +

    • Adds a one-timelistener function for the event named eventName to the beginning of the listeners array. The next time eventName is triggered, this listener is removed, and then invoked.

      server.prependOnceListener('connection', (stream) => {
      console.log('Ah, we have our first user!');
      });
      @@ -237,19 +237,19 @@

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

      Parameters

      Returns this

      v6.0.0

      -
    • Returns a copy of the array of listeners for the event named eventName, including any wrappers (such as those created by .once()).

      import { EventEmitter } from 'node:events';
      const emitter = new EventEmitter();
      emitter.once('log', () => console.log('log once'));

      // Returns a new Array with a function `onceWrapper` which has a property
      // `listener` which contains the original listener bound above
      const listeners = emitter.rawListeners('log');
      const logFnWrapper = listeners[0];

      // Logs "log once" to the console and does not unbind the `once` event
      logFnWrapper.listener();

      // Logs "log once" to the console and removes the listener
      logFnWrapper();

      emitter.on('log', () => console.log('log persistently'));
      // Will return a new Array with a single function bound by `.on()` above
      const newListeners = emitter.rawListeners('log');

      // Logs "log persistently" twice
      newListeners[0]();
      emitter.emit('log');

      Type Parameters

      • EventKey extends string | number | symbol

      Parameters

      Returns Events[EventKey][]

      v9.4.0

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

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

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

      Type Parameters

      • EventKey extends string | number | symbol

      Parameters

      • Optionalevent: string | symbol | EventKey

      Returns this

      v0.1.26

      -
    • Removes the specified listener from the listener array for the event named eventName.

      +
    • Removes the specified listener from the listener array for the event named eventName.

      const callback = (stream) => {
      console.log('someone connected!');
      };
      server.on('connection', callback);
      // ...
      server.removeListener('connection', callback);
      @@ -276,7 +276,7 @@

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

      Type Parameters

      • EventKey extends string | number | symbol

      Parameters

      Returns this

      v0.1.26

      -
    • Removes the specified listener from the listener array for the event named eventName.

      +
    • Removes the specified listener from the listener array for the event named eventName.

      const callback = (stream) => {
      console.log('someone connected!');
      };
      server.on('connection', callback);
      // ...
      server.removeListener('connection', callback);
      @@ -303,7 +303,7 @@

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

      Parameters

      Returns this

      v0.1.26

      -
    • Removes the specified listener from the listener array for the event named eventName.

      +
    • Removes the specified listener from the listener array for the event named eventName.

      const callback = (stream) => {
      console.log('someone connected!');
      };
      server.on('connection', callback);
      // ...
      server.removeListener('connection', callback);
      @@ -330,13 +330,13 @@

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

      Parameters

      Returns this

      v0.1.26

      -
    • By default EventEmitters will print a warning if more than 10 listeners are +

    • 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

      -
    • Experimental

      Listens once to the abort event on the provided signal.

      +
    diff --git a/docs/Next/classes/WriteConcern.html b/docs/Next/classes/WriteConcern.html index 9a3c475c23d..5ee91457a6c 100644 --- a/docs/Next/classes/WriteConcern.html +++ b/docs/Next/classes/WriteConcern.html @@ -1,7 +1,7 @@ WriteConcern | mongodb

    Class WriteConcern

    A MongoDB WriteConcern, which describes the level of acknowledgement requested from MongoDB for write operations.

    Constructors

    Constructors

    Properties

    fsync? j? journal? @@ -15,16 +15,16 @@
  • OptionalwtimeoutMS: number

    specify a time limit to prevent write operations from blocking indefinitely

  • Optionaljournal: boolean

    request acknowledgment that the write operation has been written to the on-disk journal

  • Optionalfsync: boolean | 1

    equivalent to the j option. Is deprecated and will be removed in the next major version.

    -
  • Returns WriteConcern

    Properties

    fsync?: boolean | 1

    Equivalent to the j option.

    +

    Returns WriteConcern

    Properties

    fsync?: boolean | 1

    Equivalent to the j option.

    Will be removed in the next major version. Please use journal.

    -
    j?: boolean

    Request acknowledgment that the write operation has been written to the on-disk journal.

    +
    j?: boolean

    Request acknowledgment that the write operation has been written to the on-disk journal.

    Will be removed in the next major version. Please use journal.

    -
    journal?: boolean

    Request acknowledgment that the write operation has been written to the on-disk journal

    -
    w?: W

    Request acknowledgment that the write operation has propagated to a specified number of mongod instances or to mongod instances with specified tags. +

    journal?: boolean

    Request acknowledgment that the write operation has been written to the on-disk journal

    +
    w?: W

    Request acknowledgment that the write operation has propagated to a specified number of mongod instances or to mongod instances with specified tags. If w is 0 and is set on a write operation, the server will not send a response.

    -
    wtimeout?: number

    Specify a time limit to prevent write operations from blocking indefinitely.

    +
    wtimeout?: number

    Specify a time limit to prevent write operations from blocking indefinitely.

    Will be removed in the next major version. Please use wtimeoutMS.

    -
    wtimeoutMS?: number

    Specify a time limit to prevent write operations from blocking indefinitely.

    -

    Methods

    +
    wtimeoutMS?: number

    Specify a time limit to prevent write operations from blocking indefinitely.

    +

    Methods

    diff --git a/docs/Next/classes/WriteConcernError.html b/docs/Next/classes/WriteConcernError.html index 6501193bd75..a94b02dd340 100644 --- a/docs/Next/classes/WriteConcernError.html +++ b/docs/Next/classes/WriteConcernError.html @@ -1,11 +1,11 @@ WriteConcernError | mongodb

    Class WriteConcernError

    An error representing a failure by the server to apply the requested write concern to the bulk operation.

    -

    Constructors

    Constructors

    Accessors

    Methods

    Constructors

    Accessors

    • get code(): undefined | number
    • Write concern error code.

      -

      Returns undefined | number

    • get errmsg(): undefined | string
    • Write concern error message.

      -

      Returns undefined | string

    Methods

    +

    Constructors

    Accessors

    • get code(): undefined | number
    • Write concern error code.

      +

      Returns undefined | number

    • get errmsg(): undefined | string
    • Write concern error message.

      +

      Returns undefined | string

    Methods

    diff --git a/docs/Next/classes/WriteError.html b/docs/Next/classes/WriteError.html index 7582ca27081..1f63c145617 100644 --- a/docs/Next/classes/WriteError.html +++ b/docs/Next/classes/WriteError.html @@ -1,5 +1,5 @@ WriteError | mongodb

    Class WriteError

    An error that occurred during a BulkWrite on the server.

    -

    Constructors

    Constructors

    Properties

    Accessors

    code errInfo @@ -8,9 +8,9 @@

    Methods

    Constructors

    Properties

    Accessors

    • get errmsg(): undefined | string
    • WriteError message.

      -

      Returns undefined | string

    Methods

    • Returns {
          code: number;
          errmsg?: string;
          index: number;
          op: Document;
      }

      • code: number
      • Optionalerrmsg?: string
      • index: number
      • op: Document
    +

    Constructors

    Properties

    Accessors

    • get errmsg(): undefined | string
    • WriteError message.

      +

      Returns undefined | string

    Methods

    • Returns {
          code: number;
          errmsg?: string;
          index: number;
          op: Document;
      }

      • code: number
      • Optionalerrmsg?: string
      • index: number
      • op: Document
    diff --git a/docs/Next/functions/configureExplicitResourceManagement.html b/docs/Next/functions/configureExplicitResourceManagement.html index c480185578e..3edfe8d23d4 100644 --- a/docs/Next/functions/configureExplicitResourceManagement.html +++ b/docs/Next/functions/configureExplicitResourceManagement.html @@ -8,4 +8,4 @@
    import { configureExplicitResourceManagement, MongoClient } from 'mongodb/lib/beta';

    Symbol.asyncDispose ??= Symbol('dispose');
    load();

    await using client = new MongoClient(...);
    -

    Returns void

    +

    Returns void

    diff --git a/docs/Next/index.html b/docs/Next/index.html index d6bdc681cbe..5b7752e9b6f 100644 --- a/docs/Next/index.html +++ b/docs/Next/index.html @@ -154,12 +154,12 @@ -

    We recommend using the latest version of typescript, however we currently ensure the driver's public types compile against typescript@4.4.0. +

    We recommend using the latest version of typescript, however we currently ensure the driver's public types compile against typescript@5.6.0. This is the lowest typescript version guaranteed to work with our driver: older versions may or may not work - use at your own risk. Since typescript does not restrict breaking changes to major versions, we consider this support best effort. If you run into any unexpected compiler failures against our supported TypeScript versions, please let us know by filing an issue on our JIRA.

    -

    Additionally, our Typescript types are compatible with the ECMAScript standard for our minimum supported Node version. Currently, our Typescript targets es2021.

    -

    The recommended way to get started using the Node.js 5.x driver is by using the npm (Node Package Manager) to install the dependency in your project.

    +

    Additionally, our Typescript types are compatible with the ECMAScript standard for our minimum supported Node version. Currently, our Typescript targets es2023.

    +

    The recommended way to get started using the Node.js driver is by using the npm (Node Package Manager) to install the dependency in your project.

    After you've created your own project using npm init, you can run:

    npm install mongodb
     
    diff --git a/docs/Next/interfaces/AWSCredentials.html b/docs/Next/interfaces/AWSCredentials.html index 99f269593da..f8bbb2a5224 100644 --- a/docs/Next/interfaces/AWSCredentials.html +++ b/docs/Next/interfaces/AWSCredentials.html @@ -1,7 +1,7 @@ AWSCredentials | mongodb

    Interface AWSCredentials

    Copy of the AwsCredentialIdentityProvider interface from smithy/types, the return type of the aws-sdk's fromNodeProviderChain().provider().

    -
    interface AWSCredentials {
        accessKeyId: string;
        expiration?: Date;
        secretAccessKey: string;
        sessionToken?: string;
    }

    Properties

    interface AWSCredentials {
        accessKeyId: string;
        expiration?: Date;
        secretAccessKey: string;
        sessionToken?: string;
    }

    Properties

    accessKeyId: string
    expiration?: Date
    secretAccessKey: string
    sessionToken?: string
    +

    Properties

    accessKeyId: string
    expiration?: Date
    secretAccessKey: string
    sessionToken?: string
    diff --git a/docs/Next/interfaces/AWSEncryptionKeyOptions.html b/docs/Next/interfaces/AWSEncryptionKeyOptions.html index 19c889b3342..cb5f0783555 100644 --- a/docs/Next/interfaces/AWSEncryptionKeyOptions.html +++ b/docs/Next/interfaces/AWSEncryptionKeyOptions.html @@ -1,8 +1,8 @@ AWSEncryptionKeyOptions | mongodb

    Interface AWSEncryptionKeyOptions

    Configuration options for making an AWS encryption key

    -
    interface AWSEncryptionKeyOptions {
        endpoint?: string;
        key: string;
        region: string;
    }

    Properties

    interface AWSEncryptionKeyOptions {
        endpoint?: string;
        key: string;
        region: string;
    }

    Properties

    Properties

    endpoint?: string

    An alternate host to send KMS requests to. May include port number.

    -
    key: string

    The Amazon Resource Name (ARN) to the AWS customer master key (CMK)

    -
    region: string

    The AWS region of the KMS

    -
    +
    key: string

    The Amazon Resource Name (ARN) to the AWS customer master key (CMK)

    +
    region: string

    The AWS region of the KMS

    +
    diff --git a/docs/Next/interfaces/AWSKMSProviderConfiguration.html b/docs/Next/interfaces/AWSKMSProviderConfiguration.html index b3c25009742..7ead3acf34c 100644 --- a/docs/Next/interfaces/AWSKMSProviderConfiguration.html +++ b/docs/Next/interfaces/AWSKMSProviderConfiguration.html @@ -1,8 +1,8 @@ -AWSKMSProviderConfiguration | mongodb

    Interface AWSKMSProviderConfiguration

    interface AWSKMSProviderConfiguration {
        accessKeyId: string;
        secretAccessKey: string;
        sessionToken?: string;
    }

    Properties

    accessKeyId +AWSKMSProviderConfiguration | mongodb

    Interface AWSKMSProviderConfiguration

    interface AWSKMSProviderConfiguration {
        accessKeyId: string;
        secretAccessKey: string;
        sessionToken?: string;
    }

    Properties

    accessKeyId: string

    The access key used for the AWS KMS provider

    -
    secretAccessKey: string

    The secret access key used for the AWS KMS provider

    -
    sessionToken?: string

    An optional AWS session token that will be used as the +

    secretAccessKey: string

    The secret access key used for the AWS KMS provider

    +
    sessionToken?: string

    An optional AWS session token that will be used as the X-Amz-Security-Token header for AWS requests.

    -
    +
    diff --git a/docs/Next/interfaces/AbstractCursorOptions.html b/docs/Next/interfaces/AbstractCursorOptions.html index 02a5a97688b..e59318da784 100644 --- a/docs/Next/interfaces/AbstractCursorOptions.html +++ b/docs/Next/interfaces/AbstractCursorOptions.html @@ -1,4 +1,4 @@ -AbstractCursorOptions | mongodb

    Interface AbstractCursorOptions

    interface AbstractCursorOptions {
        awaitData?: boolean;
        batchSize?: number;
        bsonRegExp?: boolean;
        checkKeys?: boolean;
        comment?: unknown;
        enableUtf8Validation?: boolean;
        fieldsAsRaw?: Document;
        ignoreUndefined?: boolean;
        maxAwaitTimeMS?: number;
        maxTimeMS?: number;
        noCursorTimeout?: boolean;
        promoteBuffers?: boolean;
        promoteLongs?: boolean;
        promoteValues?: boolean;
        raw?: boolean;
        readConcern?: ReadConcernLike;
        readPreference?: ReadPreferenceLike;
        serializeFunctions?: boolean;
        session?: ClientSession;
        tailable?: boolean;
        timeoutMode?: CursorTimeoutMode;
        timeoutMS?: number;
        useBigInt64?: boolean;
    }

    Hierarchy (view full)

    Properties

    awaitData? +AbstractCursorOptions | mongodb

    Interface AbstractCursorOptions

    interface AbstractCursorOptions {
        awaitData?: boolean;
        batchSize?: number;
        bsonRegExp?: boolean;
        checkKeys?: boolean;
        comment?: unknown;
        enableUtf8Validation?: boolean;
        fieldsAsRaw?: Document;
        ignoreUndefined?: boolean;
        maxAwaitTimeMS?: number;
        maxTimeMS?: number;
        noCursorTimeout?: boolean;
        promoteBuffers?: boolean;
        promoteLongs?: boolean;
        promoteValues?: boolean;
        raw?: boolean;
        readConcern?: ReadConcernLike;
        readPreference?: ReadPreferenceLike;
        serializeFunctions?: boolean;
        session?: ClientSession;
        tailable?: boolean;
        timeoutMode?: CursorTimeoutMode;
        timeoutMS?: number;
        useBigInt64?: boolean;
    }

    Hierarchy (view full)

    Properties

    awaitData? batchSize? bsonRegExp? checkKeys? @@ -25,8 +25,8 @@ MongoDB blocks the query thread for a period of time waiting for new data to arrive. When new data is inserted into the capped collection, the blocked thread is signaled to wake up and return the next batch to the client.

    -
    batchSize?: number

    Specifies the number of documents to return in each response from MongoDB

    -
    bsonRegExp?: boolean

    return BSON regular expressions as BSONRegExp instances.

    +
    batchSize?: number

    Specifies the number of documents to return in each response from MongoDB

    +
    bsonRegExp?: boolean

    return BSON regular expressions as BSONRegExp instances.

    false

    checkKeys?: boolean

    the serializer will check if keys are valid.

    false

    @@ -34,17 +34,17 @@

    In server versions pre-4.4, 'comment' must be string. A server error will be thrown if any other type is provided.

    In server versions 4.4 and above, 'comment' can be any valid BSON type.

    -
    enableUtf8Validation?: boolean

    Enable utf8 validation when deserializing BSON documents. Defaults to true.

    -
    fieldsAsRaw?: Document

    allow to specify if there what fields we wish to return as unserialized raw buffer.

    +
    enableUtf8Validation?: boolean

    Enable utf8 validation when deserializing BSON documents. Defaults to true.

    +
    fieldsAsRaw?: Document

    allow to specify if there what fields we wish to return as unserialized raw buffer.

    null

    ignoreUndefined?: boolean

    serialize will not emit undefined fields note that the driver sets this to false

    true

    maxAwaitTimeMS?: number

    When applicable maxAwaitTimeMS controls the amount of time subsequent getMores that a cursor uses to fetch more data should take. (ex. cursor.next())

    -
    maxTimeMS?: number

    When applicable maxTimeMS controls the amount of time the initial command +

    maxTimeMS?: number

    When applicable maxTimeMS controls the amount of time the initial command that constructs a cursor should take. (ex. find, aggregate, listCollections)

    -
    noCursorTimeout?: boolean
    promoteBuffers?: boolean

    when deserializing a Binary will return it as a node.js Buffer instance.

    +
    noCursorTimeout?: boolean
    promoteBuffers?: boolean

    when deserializing a Binary will return it as a node.js Buffer instance.

    false

    promoteLongs?: boolean

    when deserializing a Long will fit it into a Number if it's smaller than 53 bits.

    true

    @@ -61,13 +61,13 @@

    Please note there is a known limitation where this option cannot be used at the MongoClient level (see NODE-3946). It does correctly work at Db, Collection, and per operation the same as other BSON options work.

    -
    readConcern?: ReadConcernLike
    readPreference?: ReadPreferenceLike
    serializeFunctions?: boolean

    serialize the javascript functions

    +
    readConcern?: ReadConcernLike
    readPreference?: ReadPreferenceLike
    serializeFunctions?: boolean

    serialize the javascript functions

    false

    -
    session?: ClientSession
    tailable?: boolean

    By default, MongoDB will automatically close a cursor when the +

    session?: ClientSession
    tailable?: boolean

    By default, MongoDB will automatically close a cursor when the client has exhausted all results in the cursor. However, for capped collections you may use a Tailable Cursor that remains open after the client exhausts the results in the initial cursor.

    -
    timeoutMode?: CursorTimeoutMode

    Specifies how timeoutMS is applied to the cursor. Can be either 'cursorLifeTime' or 'iteration' +

    timeoutMode?: CursorTimeoutMode

    Specifies how timeoutMS is applied to the cursor. Can be either 'cursorLifeTime' or 'iteration' When set to 'iteration', the deadline specified by timeoutMS applies to each call of cursor.next(). When set to 'cursorLifetime', the deadline applies to the life of the entire cursor.

    @@ -81,7 +81,7 @@
    const cursor = collection.find({}, { timeoutMS: 1000, timeoutMode: 'cursorLifetime' });
    const docs = await cursor.toArray(); // This entire line will throw a timeout error if all batches are not fetched and returned within 1000ms.
    -
    timeoutMS?: number

    Specifies the time an operation will run until it throws a timeout error. See AbstractCursorOptions.timeoutMode for more details on how this option applies to cursors.

    -
    useBigInt64?: boolean

    when deserializing a Long return as a BigInt.

    +
    timeoutMS?: number

    Specifies the time an operation will run until it throws a timeout error. See AbstractCursorOptions.timeoutMode for more details on how this option applies to cursors.

    +
    useBigInt64?: boolean

    when deserializing a Long return as a BigInt.

    false

    diff --git a/docs/Next/interfaces/AggregateOptions.html b/docs/Next/interfaces/AggregateOptions.html index efd55fc9528..756747add9e 100644 --- a/docs/Next/interfaces/AggregateOptions.html +++ b/docs/Next/interfaces/AggregateOptions.html @@ -1,4 +1,4 @@ -AggregateOptions | mongodb

    Interface AggregateOptions

    interface AggregateOptions {
        allowDiskUse?: boolean;
        authdb?: string;
        batchSize?: number;
        bsonRegExp?: boolean;
        bypassDocumentValidation?: boolean;
        checkKeys?: boolean;
        collation?: CollationOptions;
        comment?: unknown;
        cursor?: Document;
        dbName?: string;
        enableUtf8Validation?: boolean;
        explain?: ExplainVerbosityLike | ExplainCommandOptions;
        fieldsAsRaw?: Document;
        hint?: Hint;
        ignoreUndefined?: boolean;
        let?: Document;
        maxAwaitTimeMS?: number;
        maxTimeMS?: number;
        noResponse?: boolean;
        out?: string;
        promoteBuffers?: boolean;
        promoteLongs?: boolean;
        promoteValues?: boolean;
        raw?: boolean;
        readConcern?: ReadConcernLike;
        readPreference?: ReadPreferenceLike;
        retryWrites?: boolean;
        serializeFunctions?: boolean;
        session?: ClientSession;
        timeoutMS?: number;
        useBigInt64?: boolean;
        willRetryWrite?: boolean;
        writeConcern?: WriteConcern | WriteConcernSettings;
    }

    Hierarchy (view full)

    Properties

    allowDiskUse? +AggregateOptions | mongodb

    Interface AggregateOptions

    interface AggregateOptions {
        allowDiskUse?: boolean;
        authdb?: string;
        batchSize?: number;
        bsonRegExp?: boolean;
        bypassDocumentValidation?: boolean;
        checkKeys?: boolean;
        collation?: CollationOptions;
        comment?: unknown;
        cursor?: Document;
        dbName?: string;
        enableUtf8Validation?: boolean;
        explain?: ExplainVerbosityLike | ExplainCommandOptions;
        fieldsAsRaw?: Document;
        hint?: Hint;
        ignoreUndefined?: boolean;
        let?: Document;
        maxAwaitTimeMS?: number;
        maxTimeMS?: number;
        noResponse?: boolean;
        out?: string;
        promoteBuffers?: boolean;
        promoteLongs?: boolean;
        promoteValues?: boolean;
        raw?: boolean;
        readConcern?: ReadConcernLike;
        readPreference?: ReadPreferenceLike;
        retryWrites?: boolean;
        serializeFunctions?: boolean;
        session?: ClientSession;
        timeoutMS?: number;
        useBigInt64?: boolean;
        willRetryWrite?: boolean;
        writeConcern?: WriteConcern | WriteConcernSettings;
    }

    Hierarchy (view full)

    Properties

    allowDiskUse?: boolean

    allowDiskUse lets the server know if it can use disk to store temporary results for the aggregation (requires mongodb 2.6 >).

    -
    authdb?: string
    batchSize?: number

    The number of documents to return per batch. See aggregation documentation.

    -
    bsonRegExp?: boolean

    return BSON regular expressions as BSONRegExp instances.

    +
    authdb?: string
    batchSize?: number

    The number of documents to return per batch. See aggregation documentation.

    +
    bsonRegExp?: boolean

    return BSON regular expressions as BSONRegExp instances.

    false

    bypassDocumentValidation?: boolean

    Allow driver to bypass schema validation.

    -
    checkKeys?: boolean

    the serializer will check if keys are valid.

    +
    checkKeys?: boolean

    the serializer will check if keys are valid.

    false

    collation?: CollationOptions

    Specify collation.

    -
    comment?: unknown

    Comment to apply to the operation.

    +
    comment?: unknown

    Comment to apply to the operation.

    In server versions pre-4.4, 'comment' must be string. A server error will be thrown if any other type is provided.

    In server versions 4.4 and above, 'comment' can be any valid BSON type.

    -
    cursor?: Document

    Return the query as cursor, on 2.6 > it returns as a real cursor on pre 2.6 it returns as an emulated cursor.

    -
    dbName?: string
    enableUtf8Validation?: boolean

    Enable utf8 validation when deserializing BSON documents. Defaults to true.

    -

    Specifies the verbosity mode for the explain output.

    +
    cursor?: Document

    Return the query as cursor, on 2.6 > it returns as a real cursor on pre 2.6 it returns as an emulated cursor.

    +
    dbName?: string
    enableUtf8Validation?: boolean

    Enable utf8 validation when deserializing BSON documents. Defaults to true.

    +

    Specifies the verbosity mode for the explain output.

    This API is deprecated in favor of collection.aggregate().explain() or db.aggregate().explain().

    -
    fieldsAsRaw?: Document

    allow to specify if there what fields we wish to return as unserialized raw buffer.

    +
    fieldsAsRaw?: Document

    allow to specify if there what fields we wish to return as unserialized raw buffer.

    null

    hint?: Hint

    Add an index selection hint to an aggregation command

    -
    ignoreUndefined?: boolean

    serialize will not emit undefined fields +

    ignoreUndefined?: boolean

    serialize will not emit undefined fields note that the driver sets this to false

    true

    let?: Document

    Map of parameter names and values that can be accessed using $$var (requires MongoDB 5.0).

    -
    maxAwaitTimeMS?: number

    The maximum amount of time for the server to wait on new documents to satisfy a tailable cursor query.

    -
    maxTimeMS?: number

    Specifies a cumulative time limit in milliseconds for processing operations on the cursor. MongoDB interrupts the operation at the earliest following interrupt point.

    -
    noResponse?: boolean

    This option is deprecated and will be removed in an upcoming major version.

    -
    out?: string
    promoteBuffers?: boolean

    when deserializing a Binary will return it as a node.js Buffer instance.

    +
    maxAwaitTimeMS?: number

    The maximum amount of time for the server to wait on new documents to satisfy a tailable cursor query.

    +
    maxTimeMS?: number

    Specifies a cumulative time limit in milliseconds for processing operations on the cursor. MongoDB interrupts the operation at the earliest following interrupt point.

    +
    noResponse?: boolean

    This option is deprecated and will be removed in an upcoming major version.

    +
    out?: string
    promoteBuffers?: boolean

    when deserializing a Binary will return it as a node.js Buffer instance.

    false

    promoteLongs?: boolean

    when deserializing a Long will fit it into a Number if it's smaller than 53 bits.

    true

    @@ -75,15 +75,15 @@

    Please note there is a known limitation where this option cannot be used at the MongoClient level (see NODE-3946). It does correctly work at Db, Collection, and per operation the same as other BSON options work.

    -
    readConcern?: ReadConcernLike

    Specify a read concern and level for the collection. (only MongoDB 3.2 or higher supported)

    -
    readPreference?: ReadPreferenceLike

    The preferred read preference (ReadPreference.primary, ReadPreference.primary_preferred, ReadPreference.secondary, ReadPreference.secondary_preferred, ReadPreference.nearest).

    -
    retryWrites?: boolean

    This option is deprecated and will be removed in a future release as it is not used +

    readConcern?: ReadConcernLike

    Specify a read concern and level for the collection. (only MongoDB 3.2 or higher supported)

    +
    readPreference?: ReadPreferenceLike

    The preferred read preference (ReadPreference.primary, ReadPreference.primary_preferred, ReadPreference.secondary, ReadPreference.secondary_preferred, ReadPreference.nearest).

    +
    retryWrites?: boolean

    This option is deprecated and will be removed in a future release as it is not used in the driver. Use MongoClientOptions or connection string parameters instead.

    -
    serializeFunctions?: boolean

    serialize the javascript functions

    +
    serializeFunctions?: boolean

    serialize the javascript functions

    false

    session?: ClientSession

    Specify ClientSession for this command

    -
    timeoutMS?: number

    Specifies the time an operation will run until it throws a timeout error

    -
    useBigInt64?: boolean

    when deserializing a Long return as a BigInt.

    +
    timeoutMS?: number

    Specifies the time an operation will run until it throws a timeout error

    +
    useBigInt64?: boolean

    when deserializing a Long return as a BigInt.

    false

    -
    willRetryWrite?: boolean

    Write Concern as an object

    -
    +
    willRetryWrite?: boolean

    Write Concern as an object

    +
    diff --git a/docs/Next/interfaces/AggregationCursorOptions.html b/docs/Next/interfaces/AggregationCursorOptions.html index a7eae544b5c..08e0cf7dc7b 100644 --- a/docs/Next/interfaces/AggregationCursorOptions.html +++ b/docs/Next/interfaces/AggregationCursorOptions.html @@ -1,4 +1,4 @@ -AggregationCursorOptions | mongodb

    Interface AggregationCursorOptions

    interface AggregationCursorOptions {
        allowDiskUse?: boolean;
        authdb?: string;
        awaitData?: boolean;
        batchSize?: number;
        bsonRegExp?: boolean;
        bypassDocumentValidation?: boolean;
        checkKeys?: boolean;
        collation?: CollationOptions;
        comment?: unknown;
        cursor?: Document;
        dbName?: string;
        enableUtf8Validation?: boolean;
        explain?: ExplainVerbosityLike | ExplainCommandOptions;
        fieldsAsRaw?: Document;
        hint?: Hint;
        ignoreUndefined?: boolean;
        let?: Document;
        maxAwaitTimeMS?: number;
        maxTimeMS?: number;
        noCursorTimeout?: boolean;
        noResponse?: boolean;
        out?: string;
        promoteBuffers?: boolean;
        promoteLongs?: boolean;
        promoteValues?: boolean;
        raw?: boolean;
        readConcern?: ReadConcernLike;
        readPreference?: ReadPreferenceLike;
        retryWrites?: boolean;
        serializeFunctions?: boolean;
        session?: ClientSession;
        tailable?: boolean;
        timeoutMode?: CursorTimeoutMode;
        timeoutMS?: number;
        useBigInt64?: boolean;
        willRetryWrite?: boolean;
        writeConcern?: WriteConcern | WriteConcernSettings;
    }

    Hierarchy (view full)

    Properties

    allowDiskUse? +AggregationCursorOptions | mongodb

    Interface AggregationCursorOptions

    interface AggregationCursorOptions {
        allowDiskUse?: boolean;
        authdb?: string;
        awaitData?: boolean;
        batchSize?: number;
        bsonRegExp?: boolean;
        bypassDocumentValidation?: boolean;
        checkKeys?: boolean;
        collation?: CollationOptions;
        comment?: unknown;
        cursor?: Document;
        dbName?: string;
        enableUtf8Validation?: boolean;
        explain?: ExplainVerbosityLike | ExplainCommandOptions;
        fieldsAsRaw?: Document;
        hint?: Hint;
        ignoreUndefined?: boolean;
        let?: Document;
        maxAwaitTimeMS?: number;
        maxTimeMS?: number;
        noCursorTimeout?: boolean;
        noResponse?: boolean;
        out?: string;
        promoteBuffers?: boolean;
        promoteLongs?: boolean;
        promoteValues?: boolean;
        raw?: boolean;
        readConcern?: ReadConcernLike;
        readPreference?: ReadPreferenceLike;
        retryWrites?: boolean;
        serializeFunctions?: boolean;
        session?: ClientSession;
        tailable?: boolean;
        timeoutMode?: CursorTimeoutMode;
        timeoutMS?: number;
        useBigInt64?: boolean;
        willRetryWrite?: boolean;
        writeConcern?: WriteConcern | WriteConcernSettings;
    }

    Hierarchy (view full)

    Properties

    allowDiskUse?: boolean

    allowDiskUse lets the server know if it can use disk to store temporary results for the aggregation (requires mongodb 2.6 >).

    -
    authdb?: string
    awaitData?: boolean

    If awaitData is set to true, when the cursor reaches the end of the capped collection, +

    authdb?: string
    awaitData?: boolean

    If awaitData is set to true, when the cursor reaches the end of the capped collection, MongoDB blocks the query thread for a period of time waiting for new data to arrive. When new data is inserted into the capped collection, the blocked thread is signaled to wake up and return the next batch to the client.

    -
    batchSize?: number

    Specifies the number of documents to return in each response from MongoDB

    -
    bsonRegExp?: boolean

    return BSON regular expressions as BSONRegExp instances.

    +
    batchSize?: number

    Specifies the number of documents to return in each response from MongoDB

    +
    bsonRegExp?: boolean

    return BSON regular expressions as BSONRegExp instances.

    false

    bypassDocumentValidation?: boolean

    Allow driver to bypass schema validation.

    -
    checkKeys?: boolean

    the serializer will check if keys are valid.

    +
    checkKeys?: boolean

    the serializer will check if keys are valid.

    false

    collation?: CollationOptions

    Specify collation.

    -
    comment?: unknown

    Comment to apply to the operation.

    +
    comment?: unknown

    Comment to apply to the operation.

    In server versions pre-4.4, 'comment' must be string. A server error will be thrown if any other type is provided.

    In server versions 4.4 and above, 'comment' can be any valid BSON type.

    -
    cursor?: Document

    Return the query as cursor, on 2.6 > it returns as a real cursor on pre 2.6 it returns as an emulated cursor.

    -
    dbName?: string
    enableUtf8Validation?: boolean

    Enable utf8 validation when deserializing BSON documents. Defaults to true.

    -

    Specifies the verbosity mode for the explain output.

    +
    cursor?: Document

    Return the query as cursor, on 2.6 > it returns as a real cursor on pre 2.6 it returns as an emulated cursor.

    +
    dbName?: string
    enableUtf8Validation?: boolean

    Enable utf8 validation when deserializing BSON documents. Defaults to true.

    +

    Specifies the verbosity mode for the explain output.

    This API is deprecated in favor of collection.aggregate().explain() or db.aggregate().explain().

    -
    fieldsAsRaw?: Document

    allow to specify if there what fields we wish to return as unserialized raw buffer.

    +
    fieldsAsRaw?: Document

    allow to specify if there what fields we wish to return as unserialized raw buffer.

    null

    hint?: Hint

    Add an index selection hint to an aggregation command

    -
    ignoreUndefined?: boolean

    serialize will not emit undefined fields +

    ignoreUndefined?: boolean

    serialize will not emit undefined fields note that the driver sets this to false

    true

    let?: Document

    Map of parameter names and values that can be accessed using $$var (requires MongoDB 5.0).

    -
    maxAwaitTimeMS?: number

    When applicable maxAwaitTimeMS controls the amount of time subsequent getMores +

    maxAwaitTimeMS?: number

    When applicable maxAwaitTimeMS controls the amount of time subsequent getMores that a cursor uses to fetch more data should take. (ex. cursor.next())

    -
    maxTimeMS?: number

    When applicable maxTimeMS controls the amount of time the initial command +

    maxTimeMS?: number

    When applicable maxTimeMS controls the amount of time the initial command that constructs a cursor should take. (ex. find, aggregate, listCollections)

    -
    noCursorTimeout?: boolean
    noResponse?: boolean

    This option is deprecated and will be removed in an upcoming major version.

    -
    out?: string
    promoteBuffers?: boolean

    when deserializing a Binary will return it as a node.js Buffer instance.

    +
    noCursorTimeout?: boolean
    noResponse?: boolean

    This option is deprecated and will be removed in an upcoming major version.

    +
    out?: string
    promoteBuffers?: boolean

    when deserializing a Binary will return it as a node.js Buffer instance.

    false

    promoteLongs?: boolean

    when deserializing a Long will fit it into a Number if it's smaller than 53 bits.

    true

    @@ -85,18 +85,18 @@

    Please note there is a known limitation where this option cannot be used at the MongoClient level (see NODE-3946). It does correctly work at Db, Collection, and per operation the same as other BSON options work.

    -
    readConcern?: ReadConcernLike

    Specify a read concern and level for the collection. (only MongoDB 3.2 or higher supported)

    -
    readPreference?: ReadPreferenceLike

    The preferred read preference (ReadPreference.primary, ReadPreference.primary_preferred, ReadPreference.secondary, ReadPreference.secondary_preferred, ReadPreference.nearest).

    -
    retryWrites?: boolean

    This option is deprecated and will be removed in a future release as it is not used +

    readConcern?: ReadConcernLike

    Specify a read concern and level for the collection. (only MongoDB 3.2 or higher supported)

    +
    readPreference?: ReadPreferenceLike

    The preferred read preference (ReadPreference.primary, ReadPreference.primary_preferred, ReadPreference.secondary, ReadPreference.secondary_preferred, ReadPreference.nearest).

    +
    retryWrites?: boolean

    This option is deprecated and will be removed in a future release as it is not used in the driver. Use MongoClientOptions or connection string parameters instead.

    -
    serializeFunctions?: boolean

    serialize the javascript functions

    +
    serializeFunctions?: boolean

    serialize the javascript functions

    false

    session?: ClientSession

    Specify ClientSession for this command

    -
    tailable?: boolean

    By default, MongoDB will automatically close a cursor when the +

    tailable?: boolean

    By default, MongoDB will automatically close a cursor when the client has exhausted all results in the cursor. However, for capped collections you may use a Tailable Cursor that remains open after the client exhausts the results in the initial cursor.

    -
    timeoutMode?: CursorTimeoutMode

    Specifies how timeoutMS is applied to the cursor. Can be either 'cursorLifeTime' or 'iteration' +

    timeoutMode?: CursorTimeoutMode

    Specifies how timeoutMS is applied to the cursor. Can be either 'cursorLifeTime' or 'iteration' When set to 'iteration', the deadline specified by timeoutMS applies to each call of cursor.next(). When set to 'cursorLifetime', the deadline applies to the life of the entire cursor.

    @@ -110,8 +110,8 @@
    const cursor = collection.find({}, { timeoutMS: 1000, timeoutMode: 'cursorLifetime' });
    const docs = await cursor.toArray(); // This entire line will throw a timeout error if all batches are not fetched and returned within 1000ms.
    -
    timeoutMS?: number

    Specifies the time an operation will run until it throws a timeout error. See AbstractCursorOptions.timeoutMode for more details on how this option applies to cursors.

    -
    useBigInt64?: boolean

    when deserializing a Long return as a BigInt.

    +
    timeoutMS?: number

    Specifies the time an operation will run until it throws a timeout error. See AbstractCursorOptions.timeoutMode for more details on how this option applies to cursors.

    +
    useBigInt64?: boolean

    when deserializing a Long return as a BigInt.

    false

    -
    willRetryWrite?: boolean

    Write Concern as an object

    -
    +
    willRetryWrite?: boolean

    Write Concern as an object

    +
    diff --git a/docs/Next/interfaces/AsyncDisposable.html b/docs/Next/interfaces/AsyncDisposable.html index 2da35056646..79addfa287c 100644 --- a/docs/Next/interfaces/AsyncDisposable.html +++ b/docs/Next/interfaces/AsyncDisposable.html @@ -1,2 +1,2 @@ -AsyncDisposable | mongodb

    Interface AsyncDisposable

    interface AsyncDisposable {
        [asyncDispose](): Promise<void>;
    }

    Implemented by

    Methods

    +AsyncDisposable | mongodb

    Interface AsyncDisposable

    interface AsyncDisposable {
        [asyncDispose](): Promise<void>;
    }

    Implemented by

    Methods

    diff --git a/docs/Next/interfaces/Auth.html b/docs/Next/interfaces/Auth.html index 9dee3940cc7..f74085eb0e9 100644 --- a/docs/Next/interfaces/Auth.html +++ b/docs/Next/interfaces/Auth.html @@ -1,5 +1,5 @@ -Auth | mongodb

    Interface Auth

    interface Auth {
        password?: string;
        username?: string;
    }

    Properties

    password? +Auth | mongodb

    Interface Auth

    interface Auth {
        password?: string;
        username?: string;
    }

    Properties

    Properties

    password?: string

    The password for auth

    -
    username?: string

    The username for auth

    -
    +
    username?: string

    The username for auth

    +
    diff --git a/docs/Next/interfaces/AuthMechanismProperties.html b/docs/Next/interfaces/AuthMechanismProperties.html index cd7283cc7e0..9b1a4251abb 100644 --- a/docs/Next/interfaces/AuthMechanismProperties.html +++ b/docs/Next/interfaces/AuthMechanismProperties.html @@ -1,4 +1,4 @@ -AuthMechanismProperties | mongodb

    Interface AuthMechanismProperties

    interface AuthMechanismProperties {
        ALLOWED_HOSTS?: string[];
        AWS_CREDENTIAL_PROVIDER?: AWSCredentialProvider;
        AWS_SESSION_TOKEN?: string;
        CANONICALIZE_HOST_NAME?: GSSAPICanonicalizationValue;
        ENVIRONMENT?:
            | "azure"
            | "gcp"
            | "test"
            | "k8s";
        OIDC_CALLBACK?: OIDCCallbackFunction;
        OIDC_HUMAN_CALLBACK?: OIDCCallbackFunction;
        SERVICE_HOST?: string;
        SERVICE_NAME?: string;
        SERVICE_REALM?: string;
        TOKEN_RESOURCE?: string;
    }

    Hierarchy (view full)

    Properties

    ALLOWED_HOSTS? +AuthMechanismProperties | mongodb

    Interface AuthMechanismProperties

    interface AuthMechanismProperties {
        ALLOWED_HOSTS?: string[];
        AWS_CREDENTIAL_PROVIDER?: AWSCredentialProvider;
        AWS_SESSION_TOKEN?: string;
        CANONICALIZE_HOST_NAME?: GSSAPICanonicalizationValue;
        ENVIRONMENT?:
            | "azure"
            | "gcp"
            | "test"
            | "k8s";
        OIDC_CALLBACK?: OIDCCallbackFunction;
        OIDC_HUMAN_CALLBACK?: OIDCCallbackFunction;
        SERVICE_HOST?: string;
        SERVICE_NAME?: string;
        SERVICE_REALM?: string;
        TOKEN_RESOURCE?: string;
    }

    Hierarchy (view full)

    Properties

    ALLOWED_HOSTS?: string[]

    Allowed hosts that OIDC auth can connect to.

    -
    AWS_CREDENTIAL_PROVIDER?: AWSCredentialProvider

    A custom AWS credential provider to use. An example using the AWS SDK default provider chain:

    +
    AWS_CREDENTIAL_PROVIDER?: AWSCredentialProvider

    A custom AWS credential provider to use. An example using the AWS SDK default provider chain:

    const client = new MongoClient(process.env.MONGODB_URI, {
    authMechanismProperties: {
    AWS_CREDENTIAL_PROVIDER: fromNodeProviderChain()
    }
    });
    @@ -18,8 +18,8 @@
    const client = new MongoClient(process.env.MONGODB_URI, {
    authMechanismProperties: {
    AWS_CREDENTIAL_PROVIDER: async () => {
    return {
    accessKeyId: process.env.ACCESS_KEY_ID,
    secretAccessKey: process.env.SECRET_ACCESS_KEY
    }
    }
    }
    });
    -
    AWS_SESSION_TOKEN?: string
    CANONICALIZE_HOST_NAME?: GSSAPICanonicalizationValue
    ENVIRONMENT?:
        | "azure"
        | "gcp"
        | "test"
        | "k8s"

    The OIDC environment. Note that 'test' is for internal use only.

    -
    OIDC_CALLBACK?: OIDCCallbackFunction

    A user provided OIDC machine callback function.

    -
    OIDC_HUMAN_CALLBACK?: OIDCCallbackFunction

    A user provided OIDC human interacted callback function.

    -
    SERVICE_HOST?: string
    SERVICE_NAME?: string
    SERVICE_REALM?: string
    TOKEN_RESOURCE?: string

    The resource token for OIDC auth in Azure and GCP.

    -
    +
    AWS_SESSION_TOKEN?: string
    CANONICALIZE_HOST_NAME?: GSSAPICanonicalizationValue
    ENVIRONMENT?:
        | "azure"
        | "gcp"
        | "test"
        | "k8s"

    The OIDC environment. Note that 'test' is for internal use only.

    +
    OIDC_CALLBACK?: OIDCCallbackFunction

    A user provided OIDC machine callback function.

    +
    OIDC_HUMAN_CALLBACK?: OIDCCallbackFunction

    A user provided OIDC human interacted callback function.

    +
    SERVICE_HOST?: string
    SERVICE_NAME?: string
    SERVICE_REALM?: string
    TOKEN_RESOURCE?: string

    The resource token for OIDC auth in Azure and GCP.

    +
    diff --git a/docs/Next/interfaces/AutoEncryptionOptions.html b/docs/Next/interfaces/AutoEncryptionOptions.html index 7dc6233718b..467a9e4ba99 100644 --- a/docs/Next/interfaces/AutoEncryptionOptions.html +++ b/docs/Next/interfaces/AutoEncryptionOptions.html @@ -1,4 +1,4 @@ -AutoEncryptionOptions | mongodb

    Interface AutoEncryptionOptions

    interface AutoEncryptionOptions {
        bypassAutoEncryption?: boolean;
        bypassQueryAnalysis?: boolean;
        credentialProviders?: CredentialProviders;
        encryptedFieldsMap?: Document;
        extraOptions?: {
            cryptSharedLibPath?: string;
            cryptSharedLibRequired?: boolean;
            mongocryptdBypassSpawn?: boolean;
            mongocryptdSpawnArgs?: string[];
            mongocryptdSpawnPath?: string;
            mongocryptdURI?: string;
        };
        keyExpirationMS?: number;
        keyVaultClient?: MongoClient;
        keyVaultNamespace?: string;
        kmsProviders?: KMSProviders;
        options?: {
            logger?: ((level: AutoEncryptionLoggerLevel, message: string) => void);
        };
        proxyOptions?: ProxyOptions;
        schemaMap?: Document;
        tlsOptions?: CSFLEKMSTlsOptions;
    }

    Properties

    bypassAutoEncryption? +AutoEncryptionOptions | mongodb

    Interface AutoEncryptionOptions

    interface AutoEncryptionOptions {
        bypassAutoEncryption?: boolean;
        bypassQueryAnalysis?: boolean;
        credentialProviders?: CredentialProviders;
        encryptedFieldsMap?: Document;
        extraOptions?: {
            cryptSharedLibPath?: `${string}mongo_crypt_v${number}.so` | `${string}mongo_crypt_v${number}.dll` | `${string}mongo_crypt_v${number}.dylib`;
            cryptSharedLibRequired?: boolean;
            mongocryptdBypassSpawn?: boolean;
            mongocryptdSpawnArgs?: string[];
            mongocryptdSpawnPath?: `${string}mongocryptd` | `${string}mongocryptd.exe`;
            mongocryptdURI?: string;
        };
        keyExpirationMS?: number;
        keyVaultClient?: MongoClient;
        keyVaultNamespace?: string;
        kmsProviders?: KMSProviders;
        options?: {
            logger?: ((level: AutoEncryptionLoggerLevel, message: string) => void);
        };
        proxyOptions?: ProxyOptions;
        schemaMap?: Document;
        tlsOptions?: CSFLEKMSTlsOptions;
    }

    Properties

    bypassAutoEncryption?: boolean

    Allows the user to bypass auto encryption, maintaining implicit decryption

    -
    bypassQueryAnalysis?: boolean

    Allows users to bypass query analysis

    -
    credentialProviders?: CredentialProviders

    Configuration options for custom credential providers.

    -
    encryptedFieldsMap?: Document

    Supply a schema for the encrypted fields in the document

    -
    extraOptions?: {
        cryptSharedLibPath?: string;
        cryptSharedLibRequired?: boolean;
        mongocryptdBypassSpawn?: boolean;
        mongocryptdSpawnArgs?: string[];
        mongocryptdSpawnPath?: string;
        mongocryptdURI?: string;
    }

    Type declaration

    bypassQueryAnalysis?: boolean

    Allows users to bypass query analysis

    +
    credentialProviders?: CredentialProviders

    Configuration options for custom credential providers.

    +
    encryptedFieldsMap?: Document

    Supply a schema for the encrypted fields in the document

    +
    extraOptions?: {
        cryptSharedLibPath?: `${string}mongo_crypt_v${number}.so` | `${string}mongo_crypt_v${number}.dll` | `${string}mongo_crypt_v${number}.dylib`;
        cryptSharedLibRequired?: boolean;
        mongocryptdBypassSpawn?: boolean;
        mongocryptdSpawnArgs?: string[];
        mongocryptdSpawnPath?: `${string}mongocryptd` | `${string}mongocryptd.exe`;
        mongocryptdURI?: string;
    }

    Type declaration

    • OptionalcryptSharedLibPath?: `${string}mongo_crypt_v${number}.so` | `${string}mongo_crypt_v${number}.dll` | `${string}mongo_crypt_v${number}.dylib`

      Full path to a MongoDB Crypt shared library to be used (instead of mongocryptd).

      This needs to be the path to the file itself, not a directory. It can be an absolute or relative path. If the path is relative and its first component is $ORIGIN, it will be replaced by the directory @@ -36,18 +36,18 @@

      Requires the MongoDB Crypt shared library, available in MongoDB 6.0 or higher.

    • OptionalmongocryptdBypassSpawn?: boolean

      If true, autoEncryption will not attempt to spawn a mongocryptd before connecting

    • OptionalmongocryptdSpawnArgs?: string[]

      Command line arguments to use when auto-spawning a mongocryptd

      -
    • OptionalmongocryptdSpawnPath?: string

      The path to the mongocryptd executable on the system

      +
    • OptionalmongocryptdSpawnPath?: `${string}mongocryptd` | `${string}mongocryptd.exe`

      The path to the mongocryptd executable on the system

    • OptionalmongocryptdURI?: string

      A local process the driver communicates with to determine how to encrypt values in a command. Defaults to "mongodb://%2Fvar%2Fmongocryptd.sock" if domain sockets are available or "mongodb://localhost:27020" otherwise

      -
    keyExpirationMS?: number

    Sets the expiration time for the DEK in the cache in milliseconds. Defaults to 60000. 0 means no timeout.

    -
    keyVaultClient?: MongoClient

    A MongoClient used to fetch keys from a key vault

    -
    keyVaultNamespace?: string

    The namespace where keys are stored in the key vault

    -
    kmsProviders?: KMSProviders

    Configuration options that are used by specific KMS providers during key generation, encryption, and decryption.

    -
    options?: {
        logger?: ((level: AutoEncryptionLoggerLevel, message: string) => void);
    }

    Type declaration

    • Optionallogger?: ((level: AutoEncryptionLoggerLevel, message: string) => void)

      An optional hook to catch logging messages from the underlying encryption engine

      -
    proxyOptions?: ProxyOptions
    schemaMap?: Document

    A map of namespaces to a local JSON schema for encryption

    +
    keyExpirationMS?: number

    Sets the expiration time for the DEK in the cache in milliseconds. Defaults to 60000. 0 means no timeout.

    +
    keyVaultClient?: MongoClient

    A MongoClient used to fetch keys from a key vault

    +
    keyVaultNamespace?: string

    The namespace where keys are stored in the key vault

    +
    kmsProviders?: KMSProviders

    Configuration options that are used by specific KMS providers during key generation, encryption, and decryption.

    +
    options?: {
        logger?: ((level: AutoEncryptionLoggerLevel, message: string) => void);
    }

    Type declaration

    • Optionallogger?: ((level: AutoEncryptionLoggerLevel, message: string) => void)

      An optional hook to catch logging messages from the underlying encryption engine

      +
    proxyOptions?: ProxyOptions
    schemaMap?: Document

    A map of namespaces to a local JSON schema for encryption

    NOTE: Supplying options.schemaMap provides more security than relying on JSON Schemas obtained from the server. It protects against a malicious server advertising a false JSON Schema, which could trick the client into sending decrypted data that should be encrypted. Schemas supplied in the schemaMap only apply to configuring automatic encryption for Client-Side Field Level Encryption. Other validation rules in the JSON schema will not be enforced by the driver and will result in an error.

    -
    tlsOptions?: CSFLEKMSTlsOptions

    The TLS options to use connecting to the KMS provider

    -
    +
    tlsOptions?: CSFLEKMSTlsOptions

    The TLS options to use connecting to the KMS provider

    +
    diff --git a/docs/Next/interfaces/AzureEncryptionKeyOptions.html b/docs/Next/interfaces/AzureEncryptionKeyOptions.html index d5fd0c94d61..66fb4e27e43 100644 --- a/docs/Next/interfaces/AzureEncryptionKeyOptions.html +++ b/docs/Next/interfaces/AzureEncryptionKeyOptions.html @@ -1,8 +1,8 @@ AzureEncryptionKeyOptions | mongodb

    Interface AzureEncryptionKeyOptions

    Configuration options for making an Azure encryption key

    -
    interface AzureEncryptionKeyOptions {
        keyName: string;
        keyVaultEndpoint: string;
        keyVersion?: string;
    }

    Properties

    interface AzureEncryptionKeyOptions {
        keyName: string;
        keyVaultEndpoint: string;
        keyVersion?: string;
    }

    Properties

    keyName: string

    Key name

    -
    keyVaultEndpoint: string

    Key vault URL, typically <name>.vault.azure.net

    -
    keyVersion?: string

    Key version

    -
    +
    keyVaultEndpoint: string

    Key vault URL, typically <name>.vault.azure.net

    +
    keyVersion?: string

    Key version

    +
    diff --git a/docs/Next/interfaces/BSONSerializeOptions.html b/docs/Next/interfaces/BSONSerializeOptions.html index a127afd3e28..e5decc4529b 100644 --- a/docs/Next/interfaces/BSONSerializeOptions.html +++ b/docs/Next/interfaces/BSONSerializeOptions.html @@ -1,5 +1,5 @@ BSONSerializeOptions | mongodb

    Interface BSONSerializeOptions

    BSON Serialization options.

    -
    interface BSONSerializeOptions {
        bsonRegExp?: boolean;
        checkKeys?: boolean;
        enableUtf8Validation?: boolean;
        fieldsAsRaw?: Document;
        ignoreUndefined?: boolean;
        promoteBuffers?: boolean;
        promoteLongs?: boolean;
        promoteValues?: boolean;
        raw?: boolean;
        serializeFunctions?: boolean;
        useBigInt64?: boolean;
    }

    Hierarchy (view full)

    Properties

    interface BSONSerializeOptions {
        bsonRegExp?: boolean;
        checkKeys?: boolean;
        enableUtf8Validation?: boolean;
        fieldsAsRaw?: Document;
        ignoreUndefined?: boolean;
        promoteBuffers?: boolean;
        promoteLongs?: boolean;
        promoteValues?: boolean;
        raw?: boolean;
        serializeFunctions?: boolean;
        useBigInt64?: boolean;
    }

    Hierarchy (view full)

    Properties

    checkKeys?: boolean

    the serializer will check if keys are valid.

    false

    enableUtf8Validation?: boolean

    Enable utf8 validation when deserializing BSON documents. Defaults to true.

    -
    fieldsAsRaw?: Document

    allow to specify if there what fields we wish to return as unserialized raw buffer.

    +
    fieldsAsRaw?: Document

    allow to specify if there what fields we wish to return as unserialized raw buffer.

    null

    ignoreUndefined?: boolean

    serialize will not emit undefined fields note that the driver sets this to false

    @@ -37,7 +37,7 @@

    Please note there is a known limitation where this option cannot be used at the MongoClient level (see NODE-3946). It does correctly work at Db, Collection, and per operation the same as other BSON options work.

    -
    serializeFunctions?: boolean

    serialize the javascript functions

    +
    serializeFunctions?: boolean

    serialize the javascript functions

    false

    useBigInt64?: boolean

    when deserializing a Long return as a BigInt.

    false

    diff --git a/docs/Next/interfaces/BulkWriteOperationError.html b/docs/Next/interfaces/BulkWriteOperationError.html index 4a47b40fee6..b18e7e7a11e 100644 --- a/docs/Next/interfaces/BulkWriteOperationError.html +++ b/docs/Next/interfaces/BulkWriteOperationError.html @@ -1,6 +1,6 @@ -BulkWriteOperationError | mongodb

    Interface BulkWriteOperationError

    interface BulkWriteOperationError {
        code: number;
        errInfo: Document;
        errmsg: string;
        index: number;
        op: Document | DeleteStatement | UpdateStatement;
    }

    Properties

    code +BulkWriteOperationError | mongodb

    Interface BulkWriteOperationError

    interface BulkWriteOperationError {
        code: number;
        errInfo: Document;
        errmsg: string;
        index: number;
        op: Document | DeleteStatement | UpdateStatement;
    }

    Properties

    Properties

    code: number
    errInfo: Document
    errmsg: string
    index: number
    +

    Properties

    code: number
    errInfo: Document
    errmsg: string
    index: number
    diff --git a/docs/Next/interfaces/BulkWriteOptions.html b/docs/Next/interfaces/BulkWriteOptions.html index ee87aa96a15..438949b8a74 100644 --- a/docs/Next/interfaces/BulkWriteOptions.html +++ b/docs/Next/interfaces/BulkWriteOptions.html @@ -1,4 +1,4 @@ -BulkWriteOptions | mongodb

    Interface BulkWriteOptions

    interface BulkWriteOptions {
        authdb?: string;
        bsonRegExp?: boolean;
        bypassDocumentValidation?: boolean;
        checkKeys?: boolean;
        collation?: CollationOptions;
        comment?: unknown;
        dbName?: string;
        enableUtf8Validation?: boolean;
        explain?: ExplainVerbosityLike | ExplainCommandOptions;
        fieldsAsRaw?: Document;
        forceServerObjectId?: boolean;
        ignoreUndefined?: boolean;
        let?: Document;
        maxTimeMS?: number;
        noResponse?: boolean;
        ordered?: boolean;
        promoteBuffers?: boolean;
        promoteLongs?: boolean;
        promoteValues?: boolean;
        raw?: boolean;
        readConcern?: ReadConcernLike;
        readPreference?: ReadPreferenceLike;
        retryWrites?: boolean;
        serializeFunctions?: boolean;
        session?: ClientSession;
        timeoutMS?: number;
        useBigInt64?: boolean;
        willRetryWrite?: boolean;
        writeConcern?: WriteConcern | WriteConcernSettings;
    }

    Hierarchy (view full)

    Properties

    authdb? +BulkWriteOptions | mongodb

    Interface BulkWriteOptions

    interface BulkWriteOptions {
        authdb?: string;
        bsonRegExp?: boolean;
        bypassDocumentValidation?: boolean;
        checkKeys?: boolean;
        collation?: CollationOptions;
        comment?: unknown;
        dbName?: string;
        enableUtf8Validation?: boolean;
        explain?: ExplainVerbosityLike | ExplainCommandOptions;
        fieldsAsRaw?: Document;
        forceServerObjectId?: boolean;
        ignoreUndefined?: boolean;
        let?: Document;
        maxTimeMS?: number;
        noResponse?: boolean;
        ordered?: boolean;
        promoteBuffers?: boolean;
        promoteLongs?: boolean;
        promoteValues?: boolean;
        raw?: boolean;
        readConcern?: ReadConcernLike;
        readPreference?: ReadPreferenceLike;
        retryWrites?: boolean;
        serializeFunctions?: boolean;
        session?: ClientSession;
        timeoutMS?: number;
        useBigInt64?: boolean;
        willRetryWrite?: boolean;
        writeConcern?: WriteConcern | WriteConcernSettings;
    }

    Hierarchy (view full)

    Properties

    authdb?: string
    bsonRegExp?: boolean

    return BSON regular expressions as BSONRegExp instances.

    +

    Properties

    authdb?: string
    bsonRegExp?: boolean

    return BSON regular expressions as BSONRegExp instances.

    false

    bypassDocumentValidation?: boolean

    Allow driver to bypass schema validation.

    false - documents will be validated by default

    -
    checkKeys?: boolean

    the serializer will check if keys are valid.

    +
    checkKeys?: boolean

    the serializer will check if keys are valid.

    false

    collation?: CollationOptions

    Collation

    -
    comment?: unknown

    Comment to apply to the operation.

    +
    comment?: unknown

    Comment to apply to the operation.

    In server versions pre-4.4, 'comment' must be string. A server error will be thrown if any other type is provided.

    In server versions 4.4 and above, 'comment' can be any valid BSON type.

    -
    dbName?: string
    enableUtf8Validation?: boolean

    Enable utf8 validation when deserializing BSON documents. Defaults to true.

    -

    Specifies the verbosity mode for the explain output.

    -
    fieldsAsRaw?: Document

    allow to specify if there what fields we wish to return as unserialized raw buffer.

    +
    dbName?: string
    enableUtf8Validation?: boolean

    Enable utf8 validation when deserializing BSON documents. Defaults to true.

    +

    Specifies the verbosity mode for the explain output.

    +
    fieldsAsRaw?: Document

    allow to specify if there what fields we wish to return as unserialized raw buffer.

    null

    forceServerObjectId?: boolean

    Force server to assign _id values instead of driver.

    false - the driver generates _id fields by default

    -
    ignoreUndefined?: boolean

    serialize will not emit undefined fields +

    ignoreUndefined?: boolean

    serialize will not emit undefined fields note that the driver sets this to false

    true

    let?: Document

    Map of parameter names and values that can be accessed using $$var (requires MongoDB 5.0).

    -
    maxTimeMS?: number

    maxTimeMS is a server-side time limit in milliseconds for processing an operation.

    -
    noResponse?: boolean

    This option is deprecated and will be removed in an upcoming major version.

    -
    ordered?: boolean

    If true, when an insert fails, don't execute the remaining writes. +

    maxTimeMS?: number

    maxTimeMS is a server-side time limit in milliseconds for processing an operation.

    +
    noResponse?: boolean

    This option is deprecated and will be removed in an upcoming major version.

    +
    ordered?: boolean

    If true, when an insert fails, don't execute the remaining writes. If false, continue with remaining inserts when one fails.

    true - inserts are ordered by default

    -
    promoteBuffers?: boolean

    when deserializing a Binary will return it as a node.js Buffer instance.

    +
    promoteBuffers?: boolean

    when deserializing a Binary will return it as a node.js Buffer instance.

    false

    promoteLongs?: boolean

    when deserializing a Long will fit it into a Number if it's smaller than 53 bits.

    true

    @@ -70,15 +70,15 @@

    Please note there is a known limitation where this option cannot be used at the MongoClient level (see NODE-3946). It does correctly work at Db, Collection, and per operation the same as other BSON options work.

    -
    readConcern?: ReadConcernLike

    Specify a read concern and level for the collection. (only MongoDB 3.2 or higher supported)

    -
    readPreference?: ReadPreferenceLike

    The preferred read preference (ReadPreference.primary, ReadPreference.primary_preferred, ReadPreference.secondary, ReadPreference.secondary_preferred, ReadPreference.nearest).

    -
    retryWrites?: boolean

    This option is deprecated and will be removed in a future release as it is not used +

    readConcern?: ReadConcernLike

    Specify a read concern and level for the collection. (only MongoDB 3.2 or higher supported)

    +
    readPreference?: ReadPreferenceLike

    The preferred read preference (ReadPreference.primary, ReadPreference.primary_preferred, ReadPreference.secondary, ReadPreference.secondary_preferred, ReadPreference.nearest).

    +
    retryWrites?: boolean

    This option is deprecated and will be removed in a future release as it is not used in the driver. Use MongoClientOptions or connection string parameters instead.

    -
    serializeFunctions?: boolean

    serialize the javascript functions

    +
    serializeFunctions?: boolean

    serialize the javascript functions

    false

    session?: ClientSession

    Specify ClientSession for this command

    -
    timeoutMS?: number

    Specifies the time an operation will run until it throws a timeout error

    -
    useBigInt64?: boolean

    when deserializing a Long return as a BigInt.

    +
    timeoutMS?: number

    Specifies the time an operation will run until it throws a timeout error

    +
    useBigInt64?: boolean

    when deserializing a Long return as a BigInt.

    false

    -
    willRetryWrite?: boolean

    Write Concern as an object

    -
    +
    willRetryWrite?: boolean

    Write Concern as an object

    +
    diff --git a/docs/Next/interfaces/ChangeStreamCollModDocument.html b/docs/Next/interfaces/ChangeStreamCollModDocument.html index 78df64fc538..99aa92e4318 100644 --- a/docs/Next/interfaces/ChangeStreamCollModDocument.html +++ b/docs/Next/interfaces/ChangeStreamCollModDocument.html @@ -1,6 +1,6 @@ ChangeStreamCollModDocument | mongodb

    Interface ChangeStreamCollModDocument

    Only present when the showExpandedEvents flag is enabled.

    interface ChangeStreamCollModDocument {
        _id: unknown;
        clusterTime?: Timestamp;
        collectionUUID: Binary;
        lsid?: ServerSessionId;
        operationType: "modify";
        splitEvent?: ChangeStreamSplitEvent;
        txnNumber?: number;
        wallTime?: Date;
    }

    Hierarchy (view full)

    Properties

    _id +
    interface ChangeStreamCollModDocument {
        _id: unknown;
        clusterTime?: Timestamp;
        collectionUUID: Binary;
        lsid?: ServerSessionId;
        operationType: "modify";
        splitEvent?: ChangeStreamSplitEvent;
        txnNumber?: number;
        wallTime?: Date;
    }

    Hierarchy (view full)

    Properties

    Properties

    _id: unknown

    The id functions as an opaque token for use when resuming an interrupted change stream.

    -
    clusterTime?: Timestamp

    The timestamp from the oplog entry associated with the event. +

    clusterTime?: Timestamp

    The timestamp from the oplog entry associated with the event. For events that happened as part of a multi-document transaction, the associated change stream notifications will have the same clusterTime value, namely the time when the transaction was committed. On a sharded cluster, events that occur on different shards can have the same clusterTime but be associated with different transactions or even not be associated with any transaction. To identify events for a single transaction, you can use the combination of lsid and txnNumber in the change stream event document.

    -
    collectionUUID: Binary

    The UUID (Binary subtype 4) of the collection that the operation was performed on.

    +
    collectionUUID: Binary

    The UUID (Binary subtype 4) of the collection that the operation was performed on.

    Only present when the showExpandedEvents flag is enabled.

    NOTE: collectionUUID will be converted to a NodeJS Buffer if the promoteBuffers flag is enabled.

    6.1.0

    -

    The identifier for the session associated with the transaction. +

    The identifier for the session associated with the transaction. Only present if the operation is part of a multi-document transaction.

    -
    operationType: "modify"

    Describes the type of operation represented in this change notification

    -

    When the change stream's backing aggregation pipeline contains the $changeStreamSplitLargeEvent +

    operationType: "modify"

    Describes the type of operation represented in this change notification

    +

    When the change stream's backing aggregation pipeline contains the $changeStreamSplitLargeEvent stage, events larger than 16MB will be split into multiple events and contain the following information about which fragment the current event is.

    -
    txnNumber?: number

    The transaction number. +

    txnNumber?: number

    The transaction number. Only present if the operation is part of a multi-document transaction.

    NOTE: txnNumber can be a Long if promoteLongs is set to false

    -
    wallTime?: Date

    The server date and time of the database operation. +

    wallTime?: Date

    The server date and time of the database operation. wallTime differs from clusterTime in that clusterTime is a timestamp taken from the oplog entry associated with the database operation event.

    6.0.0

    -
    +
    diff --git a/docs/Next/interfaces/ChangeStreamCreateDocument.html b/docs/Next/interfaces/ChangeStreamCreateDocument.html index 81ab752e71f..815e100ed06 100644 --- a/docs/Next/interfaces/ChangeStreamCreateDocument.html +++ b/docs/Next/interfaces/ChangeStreamCreateDocument.html @@ -1,5 +1,5 @@ ChangeStreamCreateDocument | mongodb

    Interface ChangeStreamCreateDocument

    interface ChangeStreamCreateDocument {
        _id: unknown;
        clusterTime?: Timestamp;
        collectionUUID: Binary;
        lsid?: ServerSessionId;
        nsType?: "timeseries" | "collection" | "view";
        operationType: "create";
        splitEvent?: ChangeStreamSplitEvent;
        txnNumber?: number;
        wallTime?: Date;
    }

    Hierarchy (view full)

    Properties

    _id +
    interface ChangeStreamCreateDocument {
        _id: unknown;
        clusterTime?: Timestamp;
        collectionUUID: Binary;
        lsid?: ServerSessionId;
        nsType?: "timeseries" | "collection" | "view";
        operationType: "create";
        splitEvent?: ChangeStreamSplitEvent;
        txnNumber?: number;
        wallTime?: Date;
    }

    Hierarchy (view full)

    Properties

    Properties

    _id: unknown

    The id functions as an opaque token for use when resuming an interrupted change stream.

    -
    clusterTime?: Timestamp

    The timestamp from the oplog entry associated with the event. +

    clusterTime?: Timestamp

    The timestamp from the oplog entry associated with the event. For events that happened as part of a multi-document transaction, the associated change stream notifications will have the same clusterTime value, namely the time when the transaction was committed. On a sharded cluster, events that occur on different shards can have the same clusterTime but be associated with different transactions or even not be associated with any transaction. To identify events for a single transaction, you can use the combination of lsid and txnNumber in the change stream event document.

    -
    collectionUUID: Binary

    The UUID (Binary subtype 4) of the collection that the operation was performed on.

    +
    collectionUUID: Binary

    The UUID (Binary subtype 4) of the collection that the operation was performed on.

    Only present when the showExpandedEvents flag is enabled.

    NOTE: collectionUUID will be converted to a NodeJS Buffer if the promoteBuffers flag is enabled.

    6.1.0

    -

    The identifier for the session associated with the transaction. +

    The identifier for the session associated with the transaction. Only present if the operation is part of a multi-document transaction.

    -
    nsType?: "timeseries" | "collection" | "view"

    The type of the newly created object.

    +
    nsType?: "timeseries" | "collection" | "view"

    The type of the newly created object.

    8.1.0

    -
    operationType: "create"

    Describes the type of operation represented in this change notification

    -

    When the change stream's backing aggregation pipeline contains the $changeStreamSplitLargeEvent +

    operationType: "create"

    Describes the type of operation represented in this change notification

    +

    When the change stream's backing aggregation pipeline contains the $changeStreamSplitLargeEvent stage, events larger than 16MB will be split into multiple events and contain the following information about which fragment the current event is.

    -
    txnNumber?: number

    The transaction number. +

    txnNumber?: number

    The transaction number. Only present if the operation is part of a multi-document transaction.

    NOTE: txnNumber can be a Long if promoteLongs is set to false

    -
    wallTime?: Date

    The server date and time of the database operation. +

    wallTime?: Date

    The server date and time of the database operation. wallTime differs from clusterTime in that clusterTime is a timestamp taken from the oplog entry associated with the database operation event.

    6.0.0

    -
    +
    diff --git a/docs/Next/interfaces/ChangeStreamCreateIndexDocument.html b/docs/Next/interfaces/ChangeStreamCreateIndexDocument.html index c61fda0e805..ca2f1e9f633 100644 --- a/docs/Next/interfaces/ChangeStreamCreateIndexDocument.html +++ b/docs/Next/interfaces/ChangeStreamCreateIndexDocument.html @@ -1,6 +1,6 @@ ChangeStreamCreateIndexDocument | mongodb

    Interface ChangeStreamCreateIndexDocument

    Only present when the showExpandedEvents flag is enabled.

    interface ChangeStreamCreateIndexDocument {
        _id: unknown;
        clusterTime?: Timestamp;
        collectionUUID: Binary;
        lsid?: ServerSessionId;
        operationDescription?: Document;
        operationType: "createIndexes";
        splitEvent?: ChangeStreamSplitEvent;
        txnNumber?: number;
        wallTime?: Date;
    }

    Hierarchy (view full)

    Properties

    _id +
    interface ChangeStreamCreateIndexDocument {
        _id: unknown;
        clusterTime?: Timestamp;
        collectionUUID: Binary;
        lsid?: ServerSessionId;
        operationDescription?: Document;
        operationType: "createIndexes";
        splitEvent?: ChangeStreamSplitEvent;
        txnNumber?: number;
        wallTime?: Date;
    }

    Hierarchy (view full)

    Properties

    Properties

    _id: unknown

    The id functions as an opaque token for use when resuming an interrupted change stream.

    -
    clusterTime?: Timestamp

    The timestamp from the oplog entry associated with the event. +

    clusterTime?: Timestamp

    The timestamp from the oplog entry associated with the event. For events that happened as part of a multi-document transaction, the associated change stream notifications will have the same clusterTime value, namely the time when the transaction was committed. On a sharded cluster, events that occur on different shards can have the same clusterTime but be associated with different transactions or even not be associated with any transaction. To identify events for a single transaction, you can use the combination of lsid and txnNumber in the change stream event document.

    -
    collectionUUID: Binary

    The UUID (Binary subtype 4) of the collection that the operation was performed on.

    +
    collectionUUID: Binary

    The UUID (Binary subtype 4) of the collection that the operation was performed on.

    Only present when the showExpandedEvents flag is enabled.

    NOTE: collectionUUID will be converted to a NodeJS Buffer if the promoteBuffers flag is enabled.

    6.1.0

    -

    The identifier for the session associated with the transaction. +

    The identifier for the session associated with the transaction. Only present if the operation is part of a multi-document transaction.

    -
    operationDescription?: Document

    An description of the operation.

    +
    operationDescription?: Document

    An description of the operation.

    Only present when the showExpandedEvents flag is enabled.

    6.1.0

    -
    operationType: "createIndexes"

    Describes the type of operation represented in this change notification

    -

    When the change stream's backing aggregation pipeline contains the $changeStreamSplitLargeEvent +

    operationType: "createIndexes"

    Describes the type of operation represented in this change notification

    +

    When the change stream's backing aggregation pipeline contains the $changeStreamSplitLargeEvent stage, events larger than 16MB will be split into multiple events and contain the following information about which fragment the current event is.

    -
    txnNumber?: number

    The transaction number. +

    txnNumber?: number

    The transaction number. Only present if the operation is part of a multi-document transaction.

    NOTE: txnNumber can be a Long if promoteLongs is set to false

    -
    wallTime?: Date

    The server date and time of the database operation. +

    wallTime?: Date

    The server date and time of the database operation. wallTime differs from clusterTime in that clusterTime is a timestamp taken from the oplog entry associated with the database operation event.

    6.0.0

    -
    +
    diff --git a/docs/Next/interfaces/ChangeStreamDeleteDocument.html b/docs/Next/interfaces/ChangeStreamDeleteDocument.html index a0a66e1d955..94a70f44e68 100644 --- a/docs/Next/interfaces/ChangeStreamDeleteDocument.html +++ b/docs/Next/interfaces/ChangeStreamDeleteDocument.html @@ -1,5 +1,5 @@ ChangeStreamDeleteDocument | mongodb

    Interface ChangeStreamDeleteDocument<TSchema>

    interface ChangeStreamDeleteDocument<TSchema> {
        _id: unknown;
        clusterTime?: Timestamp;
        collectionUUID: Binary;
        documentKey: {
            _id: InferIdType<TSchema>;
            [shardKey: string]: any;
        };
        fullDocumentBeforeChange?: TSchema;
        lsid?: ServerSessionId;
        ns: ChangeStreamNameSpace;
        operationType: "delete";
        splitEvent?: ChangeStreamSplitEvent;
        txnNumber?: number;
        wallTime?: Date;
    }

    Type Parameters

    Hierarchy (view full)

    Properties

    _id +
    interface ChangeStreamDeleteDocument<TSchema> {
        _id: unknown;
        clusterTime?: Timestamp;
        collectionUUID: Binary;
        documentKey: {
            _id: InferIdType<TSchema>;
            [shardKey: string]: any;
        };
        fullDocumentBeforeChange?: TSchema;
        lsid?: ServerSessionId;
        ns: ChangeStreamNameSpace;
        operationType: "delete";
        splitEvent?: ChangeStreamSplitEvent;
        txnNumber?: number;
        wallTime?: Date;
    }

    Type Parameters

    Hierarchy (view full)

    Properties

    Properties

    _id: unknown

    The id functions as an opaque token for use when resuming an interrupted change stream.

    -
    clusterTime?: Timestamp

    The timestamp from the oplog entry associated with the event. +

    clusterTime?: Timestamp

    The timestamp from the oplog entry associated with the event. For events that happened as part of a multi-document transaction, the associated change stream notifications will have the same clusterTime value, namely the time when the transaction was committed. On a sharded cluster, events that occur on different shards can have the same clusterTime but be associated with different transactions or even not be associated with any transaction. To identify events for a single transaction, you can use the combination of lsid and txnNumber in the change stream event document.

    -
    collectionUUID: Binary

    The UUID (Binary subtype 4) of the collection that the operation was performed on.

    +
    collectionUUID: Binary

    The UUID (Binary subtype 4) of the collection that the operation was performed on.

    Only present when the showExpandedEvents flag is enabled.

    NOTE: collectionUUID will be converted to a NodeJS Buffer if the promoteBuffers flag is enabled.

    6.1.0

    -
    documentKey: {
        _id: InferIdType<TSchema>;
        [shardKey: string]: any;
    }

    For unsharded collections this contains a single field _id. +

    documentKey: {
        _id: InferIdType<TSchema>;
        [shardKey: string]: any;
    }

    For unsharded collections this contains a single field _id. For sharded collections, this will contain all the components of the shard key

    -
    fullDocumentBeforeChange?: TSchema

    Contains the pre-image of the modified or deleted document if the +

    fullDocumentBeforeChange?: TSchema

    Contains the pre-image of the modified or deleted document if the pre-image is available for the change event and either 'required' or 'whenAvailable' was specified for the 'fullDocumentBeforeChange' option when creating the change stream. If 'whenAvailable' was specified but the pre-image is unavailable, this will be explicitly set to null.

    -

    The identifier for the session associated with the transaction. +

    The identifier for the session associated with the transaction. Only present if the operation is part of a multi-document transaction.

    -

    Namespace the delete event occurred on

    -
    operationType: "delete"

    Describes the type of operation represented in this change notification

    -

    When the change stream's backing aggregation pipeline contains the $changeStreamSplitLargeEvent +

    Namespace the delete event occurred on

    +
    operationType: "delete"

    Describes the type of operation represented in this change notification

    +

    When the change stream's backing aggregation pipeline contains the $changeStreamSplitLargeEvent stage, events larger than 16MB will be split into multiple events and contain the following information about which fragment the current event is.

    -
    txnNumber?: number

    The transaction number. +

    txnNumber?: number

    The transaction number. Only present if the operation is part of a multi-document transaction.

    NOTE: txnNumber can be a Long if promoteLongs is set to false

    -
    wallTime?: Date

    The server date and time of the database operation. +

    wallTime?: Date

    The server date and time of the database operation. wallTime differs from clusterTime in that clusterTime is a timestamp taken from the oplog entry associated with the database operation event.

    6.0.0

    -
    +
    diff --git a/docs/Next/interfaces/ChangeStreamDocumentCollectionUUID.html b/docs/Next/interfaces/ChangeStreamDocumentCollectionUUID.html index 4d44299a9b5..f71a86e8d10 100644 --- a/docs/Next/interfaces/ChangeStreamDocumentCollectionUUID.html +++ b/docs/Next/interfaces/ChangeStreamDocumentCollectionUUID.html @@ -1,7 +1,7 @@ -ChangeStreamDocumentCollectionUUID | mongodb

    Interface ChangeStreamDocumentCollectionUUID

    interface ChangeStreamDocumentCollectionUUID {
        collectionUUID: Binary;
    }

    Hierarchy (view full)

    Properties

    collectionUUID +ChangeStreamDocumentCollectionUUID | mongodb

    Interface ChangeStreamDocumentCollectionUUID

    interface ChangeStreamDocumentCollectionUUID {
        collectionUUID: Binary;
    }

    Hierarchy (view full)

    Properties

    Properties

    collectionUUID: Binary

    The UUID (Binary subtype 4) of the collection that the operation was performed on.

    Only present when the showExpandedEvents flag is enabled.

    NOTE: collectionUUID will be converted to a NodeJS Buffer if the promoteBuffers flag is enabled.

    6.1.0

    -
    +
    diff --git a/docs/Next/interfaces/ChangeStreamDocumentCommon.html b/docs/Next/interfaces/ChangeStreamDocumentCommon.html index 286be194fc7..7b9e838bce2 100644 --- a/docs/Next/interfaces/ChangeStreamDocumentCommon.html +++ b/docs/Next/interfaces/ChangeStreamDocumentCommon.html @@ -1,22 +1,22 @@ -ChangeStreamDocumentCommon | mongodb

    Interface ChangeStreamDocumentCommon

    interface ChangeStreamDocumentCommon {
        _id: unknown;
        clusterTime?: Timestamp;
        lsid?: ServerSessionId;
        splitEvent?: ChangeStreamSplitEvent;
        txnNumber?: number;
    }

    Hierarchy (view full)

    Properties

    _id +ChangeStreamDocumentCommon | mongodb

    Interface ChangeStreamDocumentCommon

    interface ChangeStreamDocumentCommon {
        _id: unknown;
        clusterTime?: Timestamp;
        lsid?: ServerSessionId;
        splitEvent?: ChangeStreamSplitEvent;
        txnNumber?: number;
    }

    Hierarchy (view full)

    Properties

    _id: unknown

    The id functions as an opaque token for use when resuming an interrupted change stream.

    -
    clusterTime?: Timestamp

    The timestamp from the oplog entry associated with the event. +

    clusterTime?: Timestamp

    The timestamp from the oplog entry associated with the event. For events that happened as part of a multi-document transaction, the associated change stream notifications will have the same clusterTime value, namely the time when the transaction was committed. On a sharded cluster, events that occur on different shards can have the same clusterTime but be associated with different transactions or even not be associated with any transaction. To identify events for a single transaction, you can use the combination of lsid and txnNumber in the change stream event document.

    -

    The identifier for the session associated with the transaction. +

    The identifier for the session associated with the transaction. Only present if the operation is part of a multi-document transaction.

    -

    When the change stream's backing aggregation pipeline contains the $changeStreamSplitLargeEvent +

    When the change stream's backing aggregation pipeline contains the $changeStreamSplitLargeEvent stage, events larger than 16MB will be split into multiple events and contain the following information about which fragment the current event is.

    -
    txnNumber?: number

    The transaction number. +

    txnNumber?: number

    The transaction number. Only present if the operation is part of a multi-document transaction.

    NOTE: txnNumber can be a Long if promoteLongs is set to false

    -
    +
    diff --git a/docs/Next/interfaces/ChangeStreamDocumentKey.html b/docs/Next/interfaces/ChangeStreamDocumentKey.html index 99b01ad446c..a03448f6a7d 100644 --- a/docs/Next/interfaces/ChangeStreamDocumentKey.html +++ b/docs/Next/interfaces/ChangeStreamDocumentKey.html @@ -1,4 +1,4 @@ -ChangeStreamDocumentKey | mongodb

    Interface ChangeStreamDocumentKey<TSchema>

    interface ChangeStreamDocumentKey<TSchema> {
        documentKey: {
            _id: InferIdType<TSchema>;
            [shardKey: string]: any;
        };
    }

    Type Parameters

    Hierarchy (view full)

    Properties

    documentKey +ChangeStreamDocumentKey | mongodb

    Interface ChangeStreamDocumentKey<TSchema>

    interface ChangeStreamDocumentKey<TSchema> {
        documentKey: {
            _id: InferIdType<TSchema>;
            [shardKey: string]: any;
        };
    }

    Type Parameters

    Hierarchy (view full)

    Properties

    Properties

    documentKey: {
        _id: InferIdType<TSchema>;
        [shardKey: string]: any;
    }

    For unsharded collections this contains a single field _id. For sharded collections, this will contain all the components of the shard key

    -
    +
    diff --git a/docs/Next/interfaces/ChangeStreamDocumentOperationDescription.html b/docs/Next/interfaces/ChangeStreamDocumentOperationDescription.html index de490fffc25..ab0c782c6f3 100644 --- a/docs/Next/interfaces/ChangeStreamDocumentOperationDescription.html +++ b/docs/Next/interfaces/ChangeStreamDocumentOperationDescription.html @@ -1,5 +1,5 @@ -ChangeStreamDocumentOperationDescription | mongodb

    Interface ChangeStreamDocumentOperationDescription

    interface ChangeStreamDocumentOperationDescription {
        operationDescription?: Document;
    }

    Hierarchy (view full)

    Properties

    operationDescription? +ChangeStreamDocumentOperationDescription | mongodb

    Interface ChangeStreamDocumentOperationDescription

    interface ChangeStreamDocumentOperationDescription {
        operationDescription?: Document;
    }

    Hierarchy (view full)

    Properties

    operationDescription?: Document

    An description of the operation.

    Only present when the showExpandedEvents flag is enabled.

    6.1.0

    -
    +
    diff --git a/docs/Next/interfaces/ChangeStreamDocumentWallTime.html b/docs/Next/interfaces/ChangeStreamDocumentWallTime.html index dd8f639dd89..89b33b480f4 100644 --- a/docs/Next/interfaces/ChangeStreamDocumentWallTime.html +++ b/docs/Next/interfaces/ChangeStreamDocumentWallTime.html @@ -1,5 +1,5 @@ -ChangeStreamDocumentWallTime | mongodb

    Interface ChangeStreamDocumentWallTime

    interface ChangeStreamDocumentWallTime {
        wallTime?: Date;
    }

    Hierarchy (view full)

    Properties

    wallTime? +ChangeStreamDocumentWallTime | mongodb

    Interface ChangeStreamDocumentWallTime

    interface ChangeStreamDocumentWallTime {
        wallTime?: Date;
    }

    Hierarchy (view full)

    Properties

    Properties

    wallTime?: Date

    The server date and time of the database operation. wallTime differs from clusterTime in that clusterTime is a timestamp taken from the oplog entry associated with the database operation event.

    6.0.0

    -
    +
    diff --git a/docs/Next/interfaces/ChangeStreamDropDatabaseDocument.html b/docs/Next/interfaces/ChangeStreamDropDatabaseDocument.html index 1c2f9a54ace..9417957f590 100644 --- a/docs/Next/interfaces/ChangeStreamDropDatabaseDocument.html +++ b/docs/Next/interfaces/ChangeStreamDropDatabaseDocument.html @@ -1,5 +1,5 @@ ChangeStreamDropDatabaseDocument | mongodb

    Interface ChangeStreamDropDatabaseDocument

    interface ChangeStreamDropDatabaseDocument {
        _id: unknown;
        clusterTime?: Timestamp;
        lsid?: ServerSessionId;
        ns: {
            db: string;
        };
        operationType: "dropDatabase";
        splitEvent?: ChangeStreamSplitEvent;
        txnNumber?: number;
        wallTime?: Date;
    }

    Hierarchy (view full)

    Properties

    _id +
    interface ChangeStreamDropDatabaseDocument {
        _id: unknown;
        clusterTime?: Timestamp;
        lsid?: ServerSessionId;
        ns: {
            db: string;
        };
        operationType: "dropDatabase";
        splitEvent?: ChangeStreamSplitEvent;
        txnNumber?: number;
        wallTime?: Date;
    }

    Hierarchy (view full)

    Properties

    _id clusterTime? lsid? ns @@ -9,23 +9,23 @@ wallTime?

    Properties

    _id: unknown

    The id functions as an opaque token for use when resuming an interrupted change stream.

    -
    clusterTime?: Timestamp

    The timestamp from the oplog entry associated with the event. +

    clusterTime?: Timestamp

    The timestamp from the oplog entry associated with the event. For events that happened as part of a multi-document transaction, the associated change stream notifications will have the same clusterTime value, namely the time when the transaction was committed. On a sharded cluster, events that occur on different shards can have the same clusterTime but be associated with different transactions or even not be associated with any transaction. To identify events for a single transaction, you can use the combination of lsid and txnNumber in the change stream event document.

    -

    The identifier for the session associated with the transaction. +

    The identifier for the session associated with the transaction. Only present if the operation is part of a multi-document transaction.

    -
    ns: {
        db: string;
    }

    The database dropped

    -
    operationType: "dropDatabase"

    Describes the type of operation represented in this change notification

    -

    When the change stream's backing aggregation pipeline contains the $changeStreamSplitLargeEvent +

    ns: {
        db: string;
    }

    The database dropped

    +
    operationType: "dropDatabase"

    Describes the type of operation represented in this change notification

    +

    When the change stream's backing aggregation pipeline contains the $changeStreamSplitLargeEvent stage, events larger than 16MB will be split into multiple events and contain the following information about which fragment the current event is.

    -
    txnNumber?: number

    The transaction number. +

    txnNumber?: number

    The transaction number. Only present if the operation is part of a multi-document transaction.

    NOTE: txnNumber can be a Long if promoteLongs is set to false

    -
    wallTime?: Date

    The server date and time of the database operation. +

    wallTime?: Date

    The server date and time of the database operation. wallTime differs from clusterTime in that clusterTime is a timestamp taken from the oplog entry associated with the database operation event.

    6.0.0

    -
    +
    diff --git a/docs/Next/interfaces/ChangeStreamDropDocument.html b/docs/Next/interfaces/ChangeStreamDropDocument.html index 718c07f7d22..6770a0bf3d2 100644 --- a/docs/Next/interfaces/ChangeStreamDropDocument.html +++ b/docs/Next/interfaces/ChangeStreamDropDocument.html @@ -1,5 +1,5 @@ ChangeStreamDropDocument | mongodb

    Interface ChangeStreamDropDocument

    interface ChangeStreamDropDocument {
        _id: unknown;
        clusterTime?: Timestamp;
        collectionUUID: Binary;
        lsid?: ServerSessionId;
        ns: ChangeStreamNameSpace;
        operationType: "drop";
        splitEvent?: ChangeStreamSplitEvent;
        txnNumber?: number;
        wallTime?: Date;
    }

    Hierarchy (view full)

    Properties

    _id +
    interface ChangeStreamDropDocument {
        _id: unknown;
        clusterTime?: Timestamp;
        collectionUUID: Binary;
        lsid?: ServerSessionId;
        ns: ChangeStreamNameSpace;
        operationType: "drop";
        splitEvent?: ChangeStreamSplitEvent;
        txnNumber?: number;
        wallTime?: Date;
    }

    Hierarchy (view full)

    Properties

    Properties

    _id: unknown

    The id functions as an opaque token for use when resuming an interrupted change stream.

    -
    clusterTime?: Timestamp

    The timestamp from the oplog entry associated with the event. +

    clusterTime?: Timestamp

    The timestamp from the oplog entry associated with the event. For events that happened as part of a multi-document transaction, the associated change stream notifications will have the same clusterTime value, namely the time when the transaction was committed. On a sharded cluster, events that occur on different shards can have the same clusterTime but be associated with different transactions or even not be associated with any transaction. To identify events for a single transaction, you can use the combination of lsid and txnNumber in the change stream event document.

    -
    collectionUUID: Binary

    The UUID (Binary subtype 4) of the collection that the operation was performed on.

    +
    collectionUUID: Binary

    The UUID (Binary subtype 4) of the collection that the operation was performed on.

    Only present when the showExpandedEvents flag is enabled.

    NOTE: collectionUUID will be converted to a NodeJS Buffer if the promoteBuffers flag is enabled.

    6.1.0

    -

    The identifier for the session associated with the transaction. +

    The identifier for the session associated with the transaction. Only present if the operation is part of a multi-document transaction.

    -

    Namespace the drop event occurred on

    -
    operationType: "drop"

    Describes the type of operation represented in this change notification

    -

    When the change stream's backing aggregation pipeline contains the $changeStreamSplitLargeEvent +

    Namespace the drop event occurred on

    +
    operationType: "drop"

    Describes the type of operation represented in this change notification

    +

    When the change stream's backing aggregation pipeline contains the $changeStreamSplitLargeEvent stage, events larger than 16MB will be split into multiple events and contain the following information about which fragment the current event is.

    -
    txnNumber?: number

    The transaction number. +

    txnNumber?: number

    The transaction number. Only present if the operation is part of a multi-document transaction.

    NOTE: txnNumber can be a Long if promoteLongs is set to false

    -
    wallTime?: Date

    The server date and time of the database operation. +

    wallTime?: Date

    The server date and time of the database operation. wallTime differs from clusterTime in that clusterTime is a timestamp taken from the oplog entry associated with the database operation event.

    6.0.0

    -
    +
    diff --git a/docs/Next/interfaces/ChangeStreamDropIndexDocument.html b/docs/Next/interfaces/ChangeStreamDropIndexDocument.html index e69c2781855..087009e1924 100644 --- a/docs/Next/interfaces/ChangeStreamDropIndexDocument.html +++ b/docs/Next/interfaces/ChangeStreamDropIndexDocument.html @@ -1,6 +1,6 @@ ChangeStreamDropIndexDocument | mongodb

    Interface ChangeStreamDropIndexDocument

    Only present when the showExpandedEvents flag is enabled.

    interface ChangeStreamDropIndexDocument {
        _id: unknown;
        clusterTime?: Timestamp;
        collectionUUID: Binary;
        lsid?: ServerSessionId;
        operationDescription?: Document;
        operationType: "dropIndexes";
        splitEvent?: ChangeStreamSplitEvent;
        txnNumber?: number;
        wallTime?: Date;
    }

    Hierarchy (view full)

    Properties

    _id +
    interface ChangeStreamDropIndexDocument {
        _id: unknown;
        clusterTime?: Timestamp;
        collectionUUID: Binary;
        lsid?: ServerSessionId;
        operationDescription?: Document;
        operationType: "dropIndexes";
        splitEvent?: ChangeStreamSplitEvent;
        txnNumber?: number;
        wallTime?: Date;
    }

    Hierarchy (view full)

    Properties

    Properties

    _id: unknown

    The id functions as an opaque token for use when resuming an interrupted change stream.

    -
    clusterTime?: Timestamp

    The timestamp from the oplog entry associated with the event. +

    clusterTime?: Timestamp

    The timestamp from the oplog entry associated with the event. For events that happened as part of a multi-document transaction, the associated change stream notifications will have the same clusterTime value, namely the time when the transaction was committed. On a sharded cluster, events that occur on different shards can have the same clusterTime but be associated with different transactions or even not be associated with any transaction. To identify events for a single transaction, you can use the combination of lsid and txnNumber in the change stream event document.

    -
    collectionUUID: Binary

    The UUID (Binary subtype 4) of the collection that the operation was performed on.

    +
    collectionUUID: Binary

    The UUID (Binary subtype 4) of the collection that the operation was performed on.

    Only present when the showExpandedEvents flag is enabled.

    NOTE: collectionUUID will be converted to a NodeJS Buffer if the promoteBuffers flag is enabled.

    6.1.0

    -

    The identifier for the session associated with the transaction. +

    The identifier for the session associated with the transaction. Only present if the operation is part of a multi-document transaction.

    -
    operationDescription?: Document

    An description of the operation.

    +
    operationDescription?: Document

    An description of the operation.

    Only present when the showExpandedEvents flag is enabled.

    6.1.0

    -
    operationType: "dropIndexes"

    Describes the type of operation represented in this change notification

    -

    When the change stream's backing aggregation pipeline contains the $changeStreamSplitLargeEvent +

    operationType: "dropIndexes"

    Describes the type of operation represented in this change notification

    +

    When the change stream's backing aggregation pipeline contains the $changeStreamSplitLargeEvent stage, events larger than 16MB will be split into multiple events and contain the following information about which fragment the current event is.

    -
    txnNumber?: number

    The transaction number. +

    txnNumber?: number

    The transaction number. Only present if the operation is part of a multi-document transaction.

    NOTE: txnNumber can be a Long if promoteLongs is set to false

    -
    wallTime?: Date

    The server date and time of the database operation. +

    wallTime?: Date

    The server date and time of the database operation. wallTime differs from clusterTime in that clusterTime is a timestamp taken from the oplog entry associated with the database operation event.

    6.0.0

    -
    +
    diff --git a/docs/Next/interfaces/ChangeStreamInsertDocument.html b/docs/Next/interfaces/ChangeStreamInsertDocument.html index d368d29e0e2..ac1a835c7a4 100644 --- a/docs/Next/interfaces/ChangeStreamInsertDocument.html +++ b/docs/Next/interfaces/ChangeStreamInsertDocument.html @@ -1,5 +1,5 @@ ChangeStreamInsertDocument | mongodb

    Interface ChangeStreamInsertDocument<TSchema>

    interface ChangeStreamInsertDocument<TSchema> {
        _id: unknown;
        clusterTime?: Timestamp;
        collectionUUID: Binary;
        documentKey: {
            _id: InferIdType<TSchema>;
            [shardKey: string]: any;
        };
        fullDocument: TSchema;
        lsid?: ServerSessionId;
        ns: ChangeStreamNameSpace;
        operationType: "insert";
        splitEvent?: ChangeStreamSplitEvent;
        txnNumber?: number;
        wallTime?: Date;
    }

    Type Parameters

    Hierarchy (view full)

    Properties

    _id +
    interface ChangeStreamInsertDocument<TSchema> {
        _id: unknown;
        clusterTime?: Timestamp;
        collectionUUID: Binary;
        documentKey: {
            _id: InferIdType<TSchema>;
            [shardKey: string]: any;
        };
        fullDocument: TSchema;
        lsid?: ServerSessionId;
        ns: ChangeStreamNameSpace;
        operationType: "insert";
        splitEvent?: ChangeStreamSplitEvent;
        txnNumber?: number;
        wallTime?: Date;
    }

    Type Parameters

    Hierarchy (view full)

    Properties

    Properties

    _id: unknown

    The id functions as an opaque token for use when resuming an interrupted change stream.

    -
    clusterTime?: Timestamp

    The timestamp from the oplog entry associated with the event. +

    clusterTime?: Timestamp

    The timestamp from the oplog entry associated with the event. For events that happened as part of a multi-document transaction, the associated change stream notifications will have the same clusterTime value, namely the time when the transaction was committed. On a sharded cluster, events that occur on different shards can have the same clusterTime but be associated with different transactions or even not be associated with any transaction. To identify events for a single transaction, you can use the combination of lsid and txnNumber in the change stream event document.

    -
    collectionUUID: Binary

    The UUID (Binary subtype 4) of the collection that the operation was performed on.

    +
    collectionUUID: Binary

    The UUID (Binary subtype 4) of the collection that the operation was performed on.

    Only present when the showExpandedEvents flag is enabled.

    NOTE: collectionUUID will be converted to a NodeJS Buffer if the promoteBuffers flag is enabled.

    6.1.0

    -
    documentKey: {
        _id: InferIdType<TSchema>;
        [shardKey: string]: any;
    }

    For unsharded collections this contains a single field _id. +

    documentKey: {
        _id: InferIdType<TSchema>;
        [shardKey: string]: any;
    }

    For unsharded collections this contains a single field _id. For sharded collections, this will contain all the components of the shard key

    -
    fullDocument: TSchema

    This key will contain the document being inserted

    -

    The identifier for the session associated with the transaction. +

    fullDocument: TSchema

    This key will contain the document being inserted

    +

    The identifier for the session associated with the transaction. Only present if the operation is part of a multi-document transaction.

    -

    Namespace the insert event occurred on

    -
    operationType: "insert"

    Describes the type of operation represented in this change notification

    -

    When the change stream's backing aggregation pipeline contains the $changeStreamSplitLargeEvent +

    Namespace the insert event occurred on

    +
    operationType: "insert"

    Describes the type of operation represented in this change notification

    +

    When the change stream's backing aggregation pipeline contains the $changeStreamSplitLargeEvent stage, events larger than 16MB will be split into multiple events and contain the following information about which fragment the current event is.

    -
    txnNumber?: number

    The transaction number. +

    txnNumber?: number

    The transaction number. Only present if the operation is part of a multi-document transaction.

    NOTE: txnNumber can be a Long if promoteLongs is set to false

    -
    wallTime?: Date

    The server date and time of the database operation. +

    wallTime?: Date

    The server date and time of the database operation. wallTime differs from clusterTime in that clusterTime is a timestamp taken from the oplog entry associated with the database operation event.

    6.0.0

    -
    +
    diff --git a/docs/Next/interfaces/ChangeStreamInvalidateDocument.html b/docs/Next/interfaces/ChangeStreamInvalidateDocument.html index 57e28c89cc3..42bcf9fc374 100644 --- a/docs/Next/interfaces/ChangeStreamInvalidateDocument.html +++ b/docs/Next/interfaces/ChangeStreamInvalidateDocument.html @@ -1,5 +1,5 @@ ChangeStreamInvalidateDocument | mongodb

    Interface ChangeStreamInvalidateDocument

    interface ChangeStreamInvalidateDocument {
        _id: unknown;
        clusterTime?: Timestamp;
        lsid?: ServerSessionId;
        operationType: "invalidate";
        splitEvent?: ChangeStreamSplitEvent;
        txnNumber?: number;
        wallTime?: Date;
    }

    Hierarchy (view full)

    Properties

    _id +
    interface ChangeStreamInvalidateDocument {
        _id: unknown;
        clusterTime?: Timestamp;
        lsid?: ServerSessionId;
        operationType: "invalidate";
        splitEvent?: ChangeStreamSplitEvent;
        txnNumber?: number;
        wallTime?: Date;
    }

    Hierarchy (view full)

    Properties

    Properties

    _id: unknown

    The id functions as an opaque token for use when resuming an interrupted change stream.

    -
    clusterTime?: Timestamp

    The timestamp from the oplog entry associated with the event. +

    clusterTime?: Timestamp

    The timestamp from the oplog entry associated with the event. For events that happened as part of a multi-document transaction, the associated change stream notifications will have the same clusterTime value, namely the time when the transaction was committed. On a sharded cluster, events that occur on different shards can have the same clusterTime but be associated with different transactions or even not be associated with any transaction. To identify events for a single transaction, you can use the combination of lsid and txnNumber in the change stream event document.

    -

    The identifier for the session associated with the transaction. +

    The identifier for the session associated with the transaction. Only present if the operation is part of a multi-document transaction.

    -
    operationType: "invalidate"

    Describes the type of operation represented in this change notification

    -

    When the change stream's backing aggregation pipeline contains the $changeStreamSplitLargeEvent +

    operationType: "invalidate"

    Describes the type of operation represented in this change notification

    +

    When the change stream's backing aggregation pipeline contains the $changeStreamSplitLargeEvent stage, events larger than 16MB will be split into multiple events and contain the following information about which fragment the current event is.

    -
    txnNumber?: number

    The transaction number. +

    txnNumber?: number

    The transaction number. Only present if the operation is part of a multi-document transaction.

    NOTE: txnNumber can be a Long if promoteLongs is set to false

    -
    wallTime?: Date

    The server date and time of the database operation. +

    wallTime?: Date

    The server date and time of the database operation. wallTime differs from clusterTime in that clusterTime is a timestamp taken from the oplog entry associated with the database operation event.

    6.0.0

    -
    +
    diff --git a/docs/Next/interfaces/ChangeStreamNameSpace.html b/docs/Next/interfaces/ChangeStreamNameSpace.html index 54b71e545bd..d896dfaeacb 100644 --- a/docs/Next/interfaces/ChangeStreamNameSpace.html +++ b/docs/Next/interfaces/ChangeStreamNameSpace.html @@ -1,3 +1,3 @@ -ChangeStreamNameSpace | mongodb

    Interface ChangeStreamNameSpace

    interface ChangeStreamNameSpace {
        coll: string;
        db: string;
    }

    Properties

    coll +ChangeStreamNameSpace | mongodb

    Interface ChangeStreamNameSpace

    interface ChangeStreamNameSpace {
        coll: string;
        db: string;
    }

    Properties

    Properties

    coll: string
    db: string
    +

    Properties

    coll: string
    db: string
    diff --git a/docs/Next/interfaces/ChangeStreamOptions.html b/docs/Next/interfaces/ChangeStreamOptions.html index 835ec4a19f6..988de04e8fa 100644 --- a/docs/Next/interfaces/ChangeStreamOptions.html +++ b/docs/Next/interfaces/ChangeStreamOptions.html @@ -1,5 +1,5 @@ ChangeStreamOptions | mongodb

    Interface ChangeStreamOptions

    Options that can be passed to a ChangeStream. Note that startAfter, resumeAfter, and startAtOperationTime are all mutually exclusive, and the server will error if more than one is specified.

    -
    interface ChangeStreamOptions {
        allowDiskUse?: boolean;
        authdb?: string;
        batchSize?: number;
        bsonRegExp?: boolean;
        bypassDocumentValidation?: boolean;
        checkKeys?: boolean;
        collation?: CollationOptions;
        comment?: unknown;
        cursor?: Document;
        dbName?: string;
        enableUtf8Validation?: boolean;
        explain?: ExplainVerbosityLike | ExplainCommandOptions;
        fieldsAsRaw?: Document;
        fullDocument?: string;
        fullDocumentBeforeChange?: string;
        hint?: Hint;
        ignoreUndefined?: boolean;
        let?: Document;
        maxAwaitTimeMS?: number;
        maxTimeMS?: number;
        noResponse?: boolean;
        out?: string;
        promoteBuffers?: boolean;
        promoteLongs?: boolean;
        promoteValues?: boolean;
        raw?: boolean;
        readConcern?: ReadConcernLike;
        readPreference?: ReadPreferenceLike;
        resumeAfter?: unknown;
        retryWrites?: boolean;
        serializeFunctions?: boolean;
        session?: ClientSession;
        showExpandedEvents?: boolean;
        startAfter?: unknown;
        startAtOperationTime?: Timestamp;
        timeoutMS?: number;
        useBigInt64?: boolean;
        willRetryWrite?: boolean;
    }

    Hierarchy

    Properties

    interface ChangeStreamOptions {
        allowDiskUse?: boolean;
        authdb?: string;
        batchSize?: number;
        bsonRegExp?: boolean;
        bypassDocumentValidation?: boolean;
        checkKeys?: boolean;
        collation?: CollationOptions;
        comment?: unknown;
        cursor?: Document;
        dbName?: string;
        enableUtf8Validation?: boolean;
        explain?: ExplainVerbosityLike | ExplainCommandOptions;
        fieldsAsRaw?: Document;
        fullDocument?: string;
        fullDocumentBeforeChange?: string;
        hint?: Hint;
        ignoreUndefined?: boolean;
        let?: Document;
        maxAwaitTimeMS?: number;
        maxTimeMS?: number;
        noResponse?: boolean;
        out?: string;
        promoteBuffers?: boolean;
        promoteLongs?: boolean;
        promoteValues?: boolean;
        raw?: boolean;
        readConcern?: ReadConcernLike;
        readPreference?: ReadPreferenceLike;
        resumeAfter?: unknown;
        retryWrites?: boolean;
        serializeFunctions?: boolean;
        session?: ClientSession;
        showExpandedEvents?: boolean;
        startAfter?: unknown;
        startAtOperationTime?: Timestamp;
        timeoutMS?: number;
        useBigInt64?: boolean;
        willRetryWrite?: boolean;
    }

    Hierarchy

    Properties

    allowDiskUse?: boolean

    allowDiskUse lets the server know if it can use disk to store temporary results for the aggregation (requires mongodb 2.6 >).

    -
    authdb?: string
    batchSize?: number

    The number of documents to return per batch.

    +
    authdb?: string
    batchSize?: number

    The number of documents to return per batch.

    bsonRegExp?: boolean

    return BSON regular expressions as BSONRegExp instances.

    +
    bsonRegExp?: boolean

    return BSON regular expressions as BSONRegExp instances.

    false

    bypassDocumentValidation?: boolean

    Allow driver to bypass schema validation.

    -
    checkKeys?: boolean

    the serializer will check if keys are valid.

    +
    checkKeys?: boolean

    the serializer will check if keys are valid.

    false

    collation?: CollationOptions

    Specify collation.

    -
    comment?: unknown

    Comment to apply to the operation.

    +
    comment?: unknown

    Comment to apply to the operation.

    In server versions pre-4.4, 'comment' must be string. A server error will be thrown if any other type is provided.

    In server versions 4.4 and above, 'comment' can be any valid BSON type.

    -
    cursor?: Document

    Return the query as cursor, on 2.6 > it returns as a real cursor on pre 2.6 it returns as an emulated cursor.

    -
    dbName?: string
    enableUtf8Validation?: boolean

    Enable utf8 validation when deserializing BSON documents. Defaults to true.

    -

    Specifies the verbosity mode for the explain output.

    +
    cursor?: Document

    Return the query as cursor, on 2.6 > it returns as a real cursor on pre 2.6 it returns as an emulated cursor.

    +
    dbName?: string
    enableUtf8Validation?: boolean

    Enable utf8 validation when deserializing BSON documents. Defaults to true.

    +

    Specifies the verbosity mode for the explain output.

    This API is deprecated in favor of collection.aggregate().explain() or db.aggregate().explain().

    -
    fieldsAsRaw?: Document

    allow to specify if there what fields we wish to return as unserialized raw buffer.

    +
    fieldsAsRaw?: Document

    allow to specify if there what fields we wish to return as unserialized raw buffer.

    null

    fullDocument?: string

    Allowed values: 'updateLookup', 'whenAvailable', 'required'.

    When set to 'updateLookup', the change notification for partial updates @@ -67,22 +67,22 @@ if the post-image for this event is available.

    When set to 'required', the same behavior as 'whenAvailable' except that an error is raised if the post-image is not available.

    -
    fullDocumentBeforeChange?: string

    Allowed values: 'whenAvailable', 'required', 'off'.

    +
    fullDocumentBeforeChange?: string

    Allowed values: 'whenAvailable', 'required', 'off'.

    The default is to not send a value, which is equivalent to 'off'.

    When set to 'whenAvailable', configures the change stream to return the pre-image of the modified document for replace, update, and delete change events if it is available.

    When set to 'required', the same behavior as 'whenAvailable' except that an error is raised if the pre-image is not available.

    -
    hint?: Hint

    Add an index selection hint to an aggregation command

    -
    ignoreUndefined?: boolean

    serialize will not emit undefined fields +

    hint?: Hint

    Add an index selection hint to an aggregation command

    +
    ignoreUndefined?: boolean

    serialize will not emit undefined fields note that the driver sets this to false

    true

    let?: Document

    Map of parameter names and values that can be accessed using $$var (requires MongoDB 5.0).

    -
    maxAwaitTimeMS?: number

    The maximum amount of time for the server to wait on new documents to satisfy a change stream query.

    -
    maxTimeMS?: number

    Specifies a cumulative time limit in milliseconds for processing operations on the cursor. MongoDB interrupts the operation at the earliest following interrupt point.

    -
    noResponse?: boolean

    This option is deprecated and will be removed in an upcoming major version.

    -
    out?: string
    promoteBuffers?: boolean

    when deserializing a Binary will return it as a node.js Buffer instance.

    +
    maxAwaitTimeMS?: number

    The maximum amount of time for the server to wait on new documents to satisfy a change stream query.

    +
    maxTimeMS?: number

    Specifies a cumulative time limit in milliseconds for processing operations on the cursor. MongoDB interrupts the operation at the earliest following interrupt point.

    +
    noResponse?: boolean

    This option is deprecated and will be removed in an upcoming major version.

    +
    out?: string
    promoteBuffers?: boolean

    when deserializing a Binary will return it as a node.js Buffer instance.

    false

    promoteLongs?: boolean

    when deserializing a Long will fit it into a Number if it's smaller than 53 bits.

    true

    @@ -99,16 +99,16 @@

    Please note there is a known limitation where this option cannot be used at the MongoClient level (see NODE-3946). It does correctly work at Db, Collection, and per operation the same as other BSON options work.

    -
    readConcern?: ReadConcernLike

    Specify a read concern and level for the collection. (only MongoDB 3.2 or higher supported)

    -
    readPreference?: ReadPreferenceLike

    The preferred read preference (ReadPreference.primary, ReadPreference.primary_preferred, ReadPreference.secondary, ReadPreference.secondary_preferred, ReadPreference.nearest).

    -
    resumeAfter?: unknown

    Allows you to start a changeStream after a specified event.

    +
    readConcern?: ReadConcernLike

    Specify a read concern and level for the collection. (only MongoDB 3.2 or higher supported)

    +
    readPreference?: ReadPreferenceLike

    The preferred read preference (ReadPreference.primary, ReadPreference.primary_preferred, ReadPreference.secondary, ReadPreference.secondary_preferred, ReadPreference.nearest).

    +
    resumeAfter?: unknown

    Allows you to start a changeStream after a specified event.

    retryWrites?: boolean

    This option is deprecated and will be removed in a future release as it is not used +

    retryWrites?: boolean

    This option is deprecated and will be removed in a future release as it is not used in the driver. Use MongoClientOptions or connection string parameters instead.

    -
    serializeFunctions?: boolean

    serialize the javascript functions

    +
    serializeFunctions?: boolean

    serialize the javascript functions

    false

    session?: ClientSession

    Specify ClientSession for this command

    -
    showExpandedEvents?: boolean

    When enabled, configures the change stream to include extra change events.

    +
    showExpandedEvents?: boolean

    When enabled, configures the change stream to include extra change events.

    -
    startAfter?: unknown

    Similar to resumeAfter, but will allow you to start after an invalidated event.

    +
    startAfter?: unknown

    Similar to resumeAfter, but will allow you to start after an invalidated event.

    startAtOperationTime?: Timestamp

    Will start the changeStream after the specified operationTime.

    -
    timeoutMS?: number

    Specifies the time an operation will run until it throws a timeout error

    -
    useBigInt64?: boolean

    when deserializing a Long return as a BigInt.

    +
    startAtOperationTime?: Timestamp

    Will start the changeStream after the specified operationTime.

    +
    timeoutMS?: number

    Specifies the time an operation will run until it throws a timeout error

    +
    useBigInt64?: boolean

    when deserializing a Long return as a BigInt.

    false

    -
    willRetryWrite?: boolean
    +
    willRetryWrite?: boolean
    diff --git a/docs/Next/interfaces/ChangeStreamRefineCollectionShardKeyDocument.html b/docs/Next/interfaces/ChangeStreamRefineCollectionShardKeyDocument.html index 75d1aa623fe..56c8121d932 100644 --- a/docs/Next/interfaces/ChangeStreamRefineCollectionShardKeyDocument.html +++ b/docs/Next/interfaces/ChangeStreamRefineCollectionShardKeyDocument.html @@ -1,5 +1,5 @@ ChangeStreamRefineCollectionShardKeyDocument | mongodb

    Interface ChangeStreamRefineCollectionShardKeyDocument

    interface ChangeStreamRefineCollectionShardKeyDocument {
        _id: unknown;
        clusterTime?: Timestamp;
        collectionUUID: Binary;
        lsid?: ServerSessionId;
        operationDescription?: Document;
        operationType: "refineCollectionShardKey";
        splitEvent?: ChangeStreamSplitEvent;
        txnNumber?: number;
    }

    Hierarchy (view full)

    Properties

    _id +
    interface ChangeStreamRefineCollectionShardKeyDocument {
        _id: unknown;
        clusterTime?: Timestamp;
        collectionUUID: Binary;
        lsid?: ServerSessionId;
        operationDescription?: Document;
        operationType: "refineCollectionShardKey";
        splitEvent?: ChangeStreamSplitEvent;
        txnNumber?: number;
    }

    Hierarchy (view full)

    Properties

    Properties

    _id: unknown

    The id functions as an opaque token for use when resuming an interrupted change stream.

    -
    clusterTime?: Timestamp

    The timestamp from the oplog entry associated with the event. +

    clusterTime?: Timestamp

    The timestamp from the oplog entry associated with the event. For events that happened as part of a multi-document transaction, the associated change stream notifications will have the same clusterTime value, namely the time when the transaction was committed. On a sharded cluster, events that occur on different shards can have the same clusterTime but be associated with different transactions or even not be associated with any transaction. To identify events for a single transaction, you can use the combination of lsid and txnNumber in the change stream event document.

    -
    collectionUUID: Binary

    The UUID (Binary subtype 4) of the collection that the operation was performed on.

    +
    collectionUUID: Binary

    The UUID (Binary subtype 4) of the collection that the operation was performed on.

    Only present when the showExpandedEvents flag is enabled.

    NOTE: collectionUUID will be converted to a NodeJS Buffer if the promoteBuffers flag is enabled.

    6.1.0

    -

    The identifier for the session associated with the transaction. +

    The identifier for the session associated with the transaction. Only present if the operation is part of a multi-document transaction.

    -
    operationDescription?: Document

    An description of the operation.

    +
    operationDescription?: Document

    An description of the operation.

    Only present when the showExpandedEvents flag is enabled.

    6.1.0

    -
    operationType: "refineCollectionShardKey"

    Describes the type of operation represented in this change notification

    -

    When the change stream's backing aggregation pipeline contains the $changeStreamSplitLargeEvent +

    operationType: "refineCollectionShardKey"

    Describes the type of operation represented in this change notification

    +

    When the change stream's backing aggregation pipeline contains the $changeStreamSplitLargeEvent stage, events larger than 16MB will be split into multiple events and contain the following information about which fragment the current event is.

    -
    txnNumber?: number

    The transaction number. +

    txnNumber?: number

    The transaction number. Only present if the operation is part of a multi-document transaction.

    NOTE: txnNumber can be a Long if promoteLongs is set to false

    -
    +
    diff --git a/docs/Next/interfaces/ChangeStreamRenameDocument.html b/docs/Next/interfaces/ChangeStreamRenameDocument.html index 2cbbcbfeaab..7b9c1dcff5b 100644 --- a/docs/Next/interfaces/ChangeStreamRenameDocument.html +++ b/docs/Next/interfaces/ChangeStreamRenameDocument.html @@ -1,5 +1,5 @@ ChangeStreamRenameDocument | mongodb

    Interface ChangeStreamRenameDocument

    interface ChangeStreamRenameDocument {
        _id: unknown;
        clusterTime?: Timestamp;
        collectionUUID: Binary;
        lsid?: ServerSessionId;
        ns: ChangeStreamNameSpace;
        operationType: "rename";
        splitEvent?: ChangeStreamSplitEvent;
        to: {
            coll: string;
            db: string;
        };
        txnNumber?: number;
        wallTime?: Date;
    }

    Hierarchy (view full)

    Properties

    _id +
    interface ChangeStreamRenameDocument {
        _id: unknown;
        clusterTime?: Timestamp;
        collectionUUID: Binary;
        lsid?: ServerSessionId;
        ns: ChangeStreamNameSpace;
        operationType: "rename";
        splitEvent?: ChangeStreamSplitEvent;
        to: {
            coll: string;
            db: string;
        };
        txnNumber?: number;
        wallTime?: Date;
    }

    Hierarchy (view full)

    Properties

    Properties

    _id: unknown

    The id functions as an opaque token for use when resuming an interrupted change stream.

    -
    clusterTime?: Timestamp

    The timestamp from the oplog entry associated with the event. +

    clusterTime?: Timestamp

    The timestamp from the oplog entry associated with the event. For events that happened as part of a multi-document transaction, the associated change stream notifications will have the same clusterTime value, namely the time when the transaction was committed. On a sharded cluster, events that occur on different shards can have the same clusterTime but be associated with different transactions or even not be associated with any transaction. To identify events for a single transaction, you can use the combination of lsid and txnNumber in the change stream event document.

    -
    collectionUUID: Binary

    The UUID (Binary subtype 4) of the collection that the operation was performed on.

    +
    collectionUUID: Binary

    The UUID (Binary subtype 4) of the collection that the operation was performed on.

    Only present when the showExpandedEvents flag is enabled.

    NOTE: collectionUUID will be converted to a NodeJS Buffer if the promoteBuffers flag is enabled.

    6.1.0

    -

    The identifier for the session associated with the transaction. +

    The identifier for the session associated with the transaction. Only present if the operation is part of a multi-document transaction.

    -

    The "from" namespace that the rename occurred on

    -
    operationType: "rename"

    Describes the type of operation represented in this change notification

    -

    When the change stream's backing aggregation pipeline contains the $changeStreamSplitLargeEvent +

    The "from" namespace that the rename occurred on

    +
    operationType: "rename"

    Describes the type of operation represented in this change notification

    +

    When the change stream's backing aggregation pipeline contains the $changeStreamSplitLargeEvent stage, events larger than 16MB will be split into multiple events and contain the following information about which fragment the current event is.

    -
    to: {
        coll: string;
        db: string;
    }

    The new name for the ns.coll collection

    -
    txnNumber?: number

    The transaction number. +

    to: {
        coll: string;
        db: string;
    }

    The new name for the ns.coll collection

    +
    txnNumber?: number

    The transaction number. Only present if the operation is part of a multi-document transaction.

    NOTE: txnNumber can be a Long if promoteLongs is set to false

    -
    wallTime?: Date

    The server date and time of the database operation. +

    wallTime?: Date

    The server date and time of the database operation. wallTime differs from clusterTime in that clusterTime is a timestamp taken from the oplog entry associated with the database operation event.

    6.0.0

    -
    +
    diff --git a/docs/Next/interfaces/ChangeStreamReplaceDocument.html b/docs/Next/interfaces/ChangeStreamReplaceDocument.html index fa76dc17954..fea66002cca 100644 --- a/docs/Next/interfaces/ChangeStreamReplaceDocument.html +++ b/docs/Next/interfaces/ChangeStreamReplaceDocument.html @@ -1,5 +1,5 @@ ChangeStreamReplaceDocument | mongodb

    Interface ChangeStreamReplaceDocument<TSchema>

    interface ChangeStreamReplaceDocument<TSchema> {
        _id: unknown;
        clusterTime?: Timestamp;
        documentKey: {
            _id: InferIdType<TSchema>;
            [shardKey: string]: any;
        };
        fullDocument: TSchema;
        fullDocumentBeforeChange?: TSchema;
        lsid?: ServerSessionId;
        ns: ChangeStreamNameSpace;
        operationType: "replace";
        splitEvent?: ChangeStreamSplitEvent;
        txnNumber?: number;
        wallTime?: Date;
    }

    Type Parameters

    Hierarchy (view full)

    Properties

    _id +
    interface ChangeStreamReplaceDocument<TSchema> {
        _id: unknown;
        clusterTime?: Timestamp;
        documentKey: {
            _id: InferIdType<TSchema>;
            [shardKey: string]: any;
        };
        fullDocument: TSchema;
        fullDocumentBeforeChange?: TSchema;
        lsid?: ServerSessionId;
        ns: ChangeStreamNameSpace;
        operationType: "replace";
        splitEvent?: ChangeStreamSplitEvent;
        txnNumber?: number;
        wallTime?: Date;
    }

    Type Parameters

    Hierarchy (view full)

    Properties

    Properties

    _id: unknown

    The id functions as an opaque token for use when resuming an interrupted change stream.

    -
    clusterTime?: Timestamp

    The timestamp from the oplog entry associated with the event. +

    clusterTime?: Timestamp

    The timestamp from the oplog entry associated with the event. For events that happened as part of a multi-document transaction, the associated change stream notifications will have the same clusterTime value, namely the time when the transaction was committed. On a sharded cluster, events that occur on different shards can have the same clusterTime but be associated with different transactions or even not be associated with any transaction. To identify events for a single transaction, you can use the combination of lsid and txnNumber in the change stream event document.

    -
    documentKey: {
        _id: InferIdType<TSchema>;
        [shardKey: string]: any;
    }

    For unsharded collections this contains a single field _id. +

    documentKey: {
        _id: InferIdType<TSchema>;
        [shardKey: string]: any;
    }

    For unsharded collections this contains a single field _id. For sharded collections, this will contain all the components of the shard key

    -
    fullDocument: TSchema

    The fullDocument of a replace event represents the document after the insert of the replacement document

    -
    fullDocumentBeforeChange?: TSchema

    Contains the pre-image of the modified or deleted document if the +

    fullDocument: TSchema

    The fullDocument of a replace event represents the document after the insert of the replacement document

    +
    fullDocumentBeforeChange?: TSchema

    Contains the pre-image of the modified or deleted document if the pre-image is available for the change event and either 'required' or 'whenAvailable' was specified for the 'fullDocumentBeforeChange' option when creating the change stream. If 'whenAvailable' was specified but the pre-image is unavailable, this will be explicitly set to null.

    -

    The identifier for the session associated with the transaction. +

    The identifier for the session associated with the transaction. Only present if the operation is part of a multi-document transaction.

    -

    Namespace the replace event occurred on

    -
    operationType: "replace"

    Describes the type of operation represented in this change notification

    -

    When the change stream's backing aggregation pipeline contains the $changeStreamSplitLargeEvent +

    Namespace the replace event occurred on

    +
    operationType: "replace"

    Describes the type of operation represented in this change notification

    +

    When the change stream's backing aggregation pipeline contains the $changeStreamSplitLargeEvent stage, events larger than 16MB will be split into multiple events and contain the following information about which fragment the current event is.

    -
    txnNumber?: number

    The transaction number. +

    txnNumber?: number

    The transaction number. Only present if the operation is part of a multi-document transaction.

    NOTE: txnNumber can be a Long if promoteLongs is set to false

    -
    wallTime?: Date

    The server date and time of the database operation. +

    wallTime?: Date

    The server date and time of the database operation. wallTime differs from clusterTime in that clusterTime is a timestamp taken from the oplog entry associated with the database operation event.

    6.0.0

    -
    +
    diff --git a/docs/Next/interfaces/ChangeStreamReshardCollectionDocument.html b/docs/Next/interfaces/ChangeStreamReshardCollectionDocument.html index b6f5dfd5595..8493f8b5c3c 100644 --- a/docs/Next/interfaces/ChangeStreamReshardCollectionDocument.html +++ b/docs/Next/interfaces/ChangeStreamReshardCollectionDocument.html @@ -1,5 +1,5 @@ ChangeStreamReshardCollectionDocument | mongodb

    Interface ChangeStreamReshardCollectionDocument

    interface ChangeStreamReshardCollectionDocument {
        _id: unknown;
        clusterTime?: Timestamp;
        collectionUUID: Binary;
        lsid?: ServerSessionId;
        operationDescription?: Document;
        operationType: "reshardCollection";
        splitEvent?: ChangeStreamSplitEvent;
        txnNumber?: number;
    }

    Hierarchy (view full)

    Properties

    _id +
    interface ChangeStreamReshardCollectionDocument {
        _id: unknown;
        clusterTime?: Timestamp;
        collectionUUID: Binary;
        lsid?: ServerSessionId;
        operationDescription?: Document;
        operationType: "reshardCollection";
        splitEvent?: ChangeStreamSplitEvent;
        txnNumber?: number;
    }

    Hierarchy (view full)

    Properties

    Properties

    _id: unknown

    The id functions as an opaque token for use when resuming an interrupted change stream.

    -
    clusterTime?: Timestamp

    The timestamp from the oplog entry associated with the event. +

    clusterTime?: Timestamp

    The timestamp from the oplog entry associated with the event. For events that happened as part of a multi-document transaction, the associated change stream notifications will have the same clusterTime value, namely the time when the transaction was committed. On a sharded cluster, events that occur on different shards can have the same clusterTime but be associated with different transactions or even not be associated with any transaction. To identify events for a single transaction, you can use the combination of lsid and txnNumber in the change stream event document.

    -
    collectionUUID: Binary

    The UUID (Binary subtype 4) of the collection that the operation was performed on.

    +
    collectionUUID: Binary

    The UUID (Binary subtype 4) of the collection that the operation was performed on.

    Only present when the showExpandedEvents flag is enabled.

    NOTE: collectionUUID will be converted to a NodeJS Buffer if the promoteBuffers flag is enabled.

    6.1.0

    -

    The identifier for the session associated with the transaction. +

    The identifier for the session associated with the transaction. Only present if the operation is part of a multi-document transaction.

    -
    operationDescription?: Document

    An description of the operation.

    +
    operationDescription?: Document

    An description of the operation.

    Only present when the showExpandedEvents flag is enabled.

    6.1.0

    -
    operationType: "reshardCollection"

    Describes the type of operation represented in this change notification

    -

    When the change stream's backing aggregation pipeline contains the $changeStreamSplitLargeEvent +

    operationType: "reshardCollection"

    Describes the type of operation represented in this change notification

    +

    When the change stream's backing aggregation pipeline contains the $changeStreamSplitLargeEvent stage, events larger than 16MB will be split into multiple events and contain the following information about which fragment the current event is.

    -
    txnNumber?: number

    The transaction number. +

    txnNumber?: number

    The transaction number. Only present if the operation is part of a multi-document transaction.

    NOTE: txnNumber can be a Long if promoteLongs is set to false

    -
    +
    diff --git a/docs/Next/interfaces/ChangeStreamShardCollectionDocument.html b/docs/Next/interfaces/ChangeStreamShardCollectionDocument.html index 4605c6e753a..fd391dc7ad1 100644 --- a/docs/Next/interfaces/ChangeStreamShardCollectionDocument.html +++ b/docs/Next/interfaces/ChangeStreamShardCollectionDocument.html @@ -1,5 +1,5 @@ ChangeStreamShardCollectionDocument | mongodb

    Interface ChangeStreamShardCollectionDocument

    interface ChangeStreamShardCollectionDocument {
        _id: unknown;
        clusterTime?: Timestamp;
        collectionUUID: Binary;
        lsid?: ServerSessionId;
        operationDescription?: Document;
        operationType: "shardCollection";
        splitEvent?: ChangeStreamSplitEvent;
        txnNumber?: number;
        wallTime?: Date;
    }

    Hierarchy (view full)

    Properties

    _id +
    interface ChangeStreamShardCollectionDocument {
        _id: unknown;
        clusterTime?: Timestamp;
        collectionUUID: Binary;
        lsid?: ServerSessionId;
        operationDescription?: Document;
        operationType: "shardCollection";
        splitEvent?: ChangeStreamSplitEvent;
        txnNumber?: number;
        wallTime?: Date;
    }

    Hierarchy (view full)

    Properties

    Properties

    _id: unknown

    The id functions as an opaque token for use when resuming an interrupted change stream.

    -
    clusterTime?: Timestamp

    The timestamp from the oplog entry associated with the event. +

    clusterTime?: Timestamp

    The timestamp from the oplog entry associated with the event. For events that happened as part of a multi-document transaction, the associated change stream notifications will have the same clusterTime value, namely the time when the transaction was committed. On a sharded cluster, events that occur on different shards can have the same clusterTime but be associated with different transactions or even not be associated with any transaction. To identify events for a single transaction, you can use the combination of lsid and txnNumber in the change stream event document.

    -
    collectionUUID: Binary

    The UUID (Binary subtype 4) of the collection that the operation was performed on.

    +
    collectionUUID: Binary

    The UUID (Binary subtype 4) of the collection that the operation was performed on.

    Only present when the showExpandedEvents flag is enabled.

    NOTE: collectionUUID will be converted to a NodeJS Buffer if the promoteBuffers flag is enabled.

    6.1.0

    -

    The identifier for the session associated with the transaction. +

    The identifier for the session associated with the transaction. Only present if the operation is part of a multi-document transaction.

    -
    operationDescription?: Document

    An description of the operation.

    +
    operationDescription?: Document

    An description of the operation.

    Only present when the showExpandedEvents flag is enabled.

    6.1.0

    -
    operationType: "shardCollection"

    Describes the type of operation represented in this change notification

    -

    When the change stream's backing aggregation pipeline contains the $changeStreamSplitLargeEvent +

    operationType: "shardCollection"

    Describes the type of operation represented in this change notification

    +

    When the change stream's backing aggregation pipeline contains the $changeStreamSplitLargeEvent stage, events larger than 16MB will be split into multiple events and contain the following information about which fragment the current event is.

    -
    txnNumber?: number

    The transaction number. +

    txnNumber?: number

    The transaction number. Only present if the operation is part of a multi-document transaction.

    NOTE: txnNumber can be a Long if promoteLongs is set to false

    -
    wallTime?: Date

    The server date and time of the database operation. +

    wallTime?: Date

    The server date and time of the database operation. wallTime differs from clusterTime in that clusterTime is a timestamp taken from the oplog entry associated with the database operation event.

    6.0.0

    -
    +
    diff --git a/docs/Next/interfaces/ChangeStreamSplitEvent.html b/docs/Next/interfaces/ChangeStreamSplitEvent.html index 7343a61ef77..ec3465f562c 100644 --- a/docs/Next/interfaces/ChangeStreamSplitEvent.html +++ b/docs/Next/interfaces/ChangeStreamSplitEvent.html @@ -1,5 +1,5 @@ -ChangeStreamSplitEvent | mongodb

    Interface ChangeStreamSplitEvent

    interface ChangeStreamSplitEvent {
        fragment: number;
        of: number;
    }

    Properties

    fragment +ChangeStreamSplitEvent | mongodb

    Interface ChangeStreamSplitEvent

    interface ChangeStreamSplitEvent {
        fragment: number;
        of: number;
    }

    Properties

    Properties

    fragment: number

    Which fragment of the change this is.

    -
    of: number

    The total number of fragments.

    -
    +
    of: number

    The total number of fragments.

    +
    diff --git a/docs/Next/interfaces/ChangeStreamUpdateDocument.html b/docs/Next/interfaces/ChangeStreamUpdateDocument.html index d1e085fe7c8..7014b4dc3c5 100644 --- a/docs/Next/interfaces/ChangeStreamUpdateDocument.html +++ b/docs/Next/interfaces/ChangeStreamUpdateDocument.html @@ -1,5 +1,5 @@ ChangeStreamUpdateDocument | mongodb

    Interface ChangeStreamUpdateDocument<TSchema>

    interface ChangeStreamUpdateDocument<TSchema> {
        _id: unknown;
        clusterTime?: Timestamp;
        collectionUUID: Binary;
        documentKey: {
            _id: InferIdType<TSchema>;
            [shardKey: string]: any;
        };
        fullDocument?: TSchema;
        fullDocumentBeforeChange?: TSchema;
        lsid?: ServerSessionId;
        ns: ChangeStreamNameSpace;
        operationType: "update";
        splitEvent?: ChangeStreamSplitEvent;
        txnNumber?: number;
        updateDescription: UpdateDescription<TSchema>;
        wallTime?: Date;
    }

    Type Parameters

    Hierarchy (view full)

    Properties

    _id +
    interface ChangeStreamUpdateDocument<TSchema> {
        _id: unknown;
        clusterTime?: Timestamp;
        collectionUUID: Binary;
        documentKey: {
            _id: InferIdType<TSchema>;
            [shardKey: string]: any;
        };
        fullDocument?: TSchema;
        fullDocumentBeforeChange?: TSchema;
        lsid?: ServerSessionId;
        ns: ChangeStreamNameSpace;
        operationType: "update";
        splitEvent?: ChangeStreamSplitEvent;
        txnNumber?: number;
        updateDescription: UpdateDescription<TSchema>;
        wallTime?: Date;
    }

    Type Parameters

    Hierarchy (view full)

    Properties

    Properties

    _id: unknown

    The id functions as an opaque token for use when resuming an interrupted change stream.

    -
    clusterTime?: Timestamp

    The timestamp from the oplog entry associated with the event. +

    clusterTime?: Timestamp

    The timestamp from the oplog entry associated with the event. For events that happened as part of a multi-document transaction, the associated change stream notifications will have the same clusterTime value, namely the time when the transaction was committed. On a sharded cluster, events that occur on different shards can have the same clusterTime but be associated with different transactions or even not be associated with any transaction. To identify events for a single transaction, you can use the combination of lsid and txnNumber in the change stream event document.

    -
    collectionUUID: Binary

    The UUID (Binary subtype 4) of the collection that the operation was performed on.

    +
    collectionUUID: Binary

    The UUID (Binary subtype 4) of the collection that the operation was performed on.

    Only present when the showExpandedEvents flag is enabled.

    NOTE: collectionUUID will be converted to a NodeJS Buffer if the promoteBuffers flag is enabled.

    6.1.0

    -
    documentKey: {
        _id: InferIdType<TSchema>;
        [shardKey: string]: any;
    }

    For unsharded collections this contains a single field _id. +

    documentKey: {
        _id: InferIdType<TSchema>;
        [shardKey: string]: any;
    }

    For unsharded collections this contains a single field _id. For sharded collections, this will contain all the components of the shard key

    -
    fullDocument?: TSchema

    This is only set if fullDocument is set to 'updateLookup' +

    fullDocument?: TSchema

    This is only set if fullDocument is set to 'updateLookup' Contains the point-in-time post-image of the modified document if the post-image is available and either 'required' or 'whenAvailable' was specified for the 'fullDocument' option when creating the change stream.

    -
    fullDocumentBeforeChange?: TSchema

    Contains the pre-image of the modified or deleted document if the +

    fullDocumentBeforeChange?: TSchema

    Contains the pre-image of the modified or deleted document if the pre-image is available for the change event and either 'required' or 'whenAvailable' was specified for the 'fullDocumentBeforeChange' option when creating the change stream. If 'whenAvailable' was specified but the pre-image is unavailable, this will be explicitly set to null.

    -

    The identifier for the session associated with the transaction. +

    The identifier for the session associated with the transaction. Only present if the operation is part of a multi-document transaction.

    -

    Namespace the update event occurred on

    -
    operationType: "update"

    Describes the type of operation represented in this change notification

    -

    When the change stream's backing aggregation pipeline contains the $changeStreamSplitLargeEvent +

    Namespace the update event occurred on

    +
    operationType: "update"

    Describes the type of operation represented in this change notification

    +

    When the change stream's backing aggregation pipeline contains the $changeStreamSplitLargeEvent stage, events larger than 16MB will be split into multiple events and contain the following information about which fragment the current event is.

    -
    txnNumber?: number

    The transaction number. +

    txnNumber?: number

    The transaction number. Only present if the operation is part of a multi-document transaction.

    NOTE: txnNumber can be a Long if promoteLongs is set to false

    -
    updateDescription: UpdateDescription<TSchema>

    Contains a description of updated and removed fields in this operation

    -
    wallTime?: Date

    The server date and time of the database operation. +

    updateDescription: UpdateDescription<TSchema>

    Contains a description of updated and removed fields in this operation

    +
    wallTime?: Date

    The server date and time of the database operation. wallTime differs from clusterTime in that clusterTime is a timestamp taken from the oplog entry associated with the database operation event.

    6.0.0

    -
    +
    diff --git a/docs/Next/interfaces/ClientBulkWriteError.html b/docs/Next/interfaces/ClientBulkWriteError.html index f0fb78f5eba..57becc6ca80 100644 --- a/docs/Next/interfaces/ClientBulkWriteError.html +++ b/docs/Next/interfaces/ClientBulkWriteError.html @@ -1,3 +1,3 @@ -ClientBulkWriteError | mongodb

    Interface ClientBulkWriteError

    interface ClientBulkWriteError {
        code: number;
        message: string;
    }

    Properties

    code +ClientBulkWriteError | mongodb

    Interface ClientBulkWriteError

    interface ClientBulkWriteError {
        code: number;
        message: string;
    }

    Properties

    Properties

    code: number
    message: string
    +

    Properties

    code: number
    message: string
    diff --git a/docs/Next/interfaces/ClientBulkWriteOptions.html b/docs/Next/interfaces/ClientBulkWriteOptions.html index f8770e572ac..d800f1d9898 100644 --- a/docs/Next/interfaces/ClientBulkWriteOptions.html +++ b/docs/Next/interfaces/ClientBulkWriteOptions.html @@ -1,4 +1,4 @@ -ClientBulkWriteOptions | mongodb

    Interface ClientBulkWriteOptions

    interface ClientBulkWriteOptions {
        authdb?: string;
        bsonRegExp?: boolean;
        bypassDocumentValidation?: boolean;
        checkKeys?: boolean;
        collation?: CollationOptions;
        comment?: unknown;
        dbName?: string;
        enableUtf8Validation?: boolean;
        explain?: ExplainVerbosityLike | ExplainCommandOptions;
        fieldsAsRaw?: Document;
        ignoreUndefined?: boolean;
        let?: Document;
        maxTimeMS?: number;
        noResponse?: boolean;
        ordered?: boolean;
        promoteBuffers?: boolean;
        promoteLongs?: boolean;
        promoteValues?: boolean;
        raw?: boolean;
        readConcern?: ReadConcernLike;
        readPreference?: ReadPreferenceLike;
        retryWrites?: boolean;
        serializeFunctions?: boolean;
        session?: ClientSession;
        timeoutMS?: number;
        useBigInt64?: boolean;
        verboseResults?: boolean;
        willRetryWrite?: boolean;
        writeConcern?: WriteConcern | WriteConcernSettings;
    }

    Hierarchy (view full)

    Properties

    authdb? +ClientBulkWriteOptions | mongodb

    Interface ClientBulkWriteOptions

    interface ClientBulkWriteOptions {
        authdb?: string;
        bsonRegExp?: boolean;
        bypassDocumentValidation?: boolean;
        checkKeys?: boolean;
        collation?: CollationOptions;
        comment?: unknown;
        dbName?: string;
        enableUtf8Validation?: boolean;
        explain?: ExplainVerbosityLike | ExplainCommandOptions;
        fieldsAsRaw?: Document;
        ignoreUndefined?: boolean;
        let?: Document;
        maxTimeMS?: number;
        noResponse?: boolean;
        ordered?: boolean;
        promoteBuffers?: boolean;
        promoteLongs?: boolean;
        promoteValues?: boolean;
        raw?: boolean;
        readConcern?: ReadConcernLike;
        readPreference?: ReadPreferenceLike;
        retryWrites?: boolean;
        serializeFunctions?: boolean;
        session?: ClientSession;
        timeoutMS?: number;
        useBigInt64?: boolean;
        verboseResults?: boolean;
        willRetryWrite?: boolean;
        writeConcern?: WriteConcern | WriteConcernSettings;
    }

    Hierarchy (view full)

    Properties

    authdb?: string
    bsonRegExp?: boolean

    return BSON regular expressions as BSONRegExp instances.

    +

    Properties

    authdb?: string
    bsonRegExp?: boolean

    return BSON regular expressions as BSONRegExp instances.

    false

    bypassDocumentValidation?: boolean

    Allow driver to bypass schema validation.

    false - documents will be validated by default

    -
    checkKeys?: boolean

    the serializer will check if keys are valid.

    +
    checkKeys?: boolean

    the serializer will check if keys are valid.

    false

    collation?: CollationOptions

    Collation

    -
    comment?: unknown

    Comment to apply to the operation.

    +
    comment?: unknown

    Comment to apply to the operation.

    In server versions pre-4.4, 'comment' must be string. A server error will be thrown if any other type is provided.

    In server versions 4.4 and above, 'comment' can be any valid BSON type.

    -
    dbName?: string
    enableUtf8Validation?: boolean

    Enable utf8 validation when deserializing BSON documents. Defaults to true.

    -

    Specifies the verbosity mode for the explain output.

    -
    fieldsAsRaw?: Document

    allow to specify if there what fields we wish to return as unserialized raw buffer.

    +
    dbName?: string
    enableUtf8Validation?: boolean

    Enable utf8 validation when deserializing BSON documents. Defaults to true.

    +

    Specifies the verbosity mode for the explain output.

    +
    fieldsAsRaw?: Document

    allow to specify if there what fields we wish to return as unserialized raw buffer.

    null

    ignoreUndefined?: boolean

    serialize will not emit undefined fields note that the driver sets this to false

    true

    let?: Document

    Map of parameter names and values that can be accessed using $$var (requires MongoDB 5.0).

    -
    maxTimeMS?: number

    maxTimeMS is a server-side time limit in milliseconds for processing an operation.

    -
    noResponse?: boolean

    This option is deprecated and will be removed in an upcoming major version.

    -
    ordered?: boolean

    If true, when an insert fails, don't execute the remaining writes. +

    maxTimeMS?: number

    maxTimeMS is a server-side time limit in milliseconds for processing an operation.

    +
    noResponse?: boolean

    This option is deprecated and will be removed in an upcoming major version.

    +
    ordered?: boolean

    If true, when an insert fails, don't execute the remaining writes. If false, continue with remaining inserts when one fails.

    true - inserts are ordered by default

    -
    promoteBuffers?: boolean

    when deserializing a Binary will return it as a node.js Buffer instance.

    +
    promoteBuffers?: boolean

    when deserializing a Binary will return it as a node.js Buffer instance.

    false

    promoteLongs?: boolean

    when deserializing a Long will fit it into a Number if it's smaller than 53 bits.

    true

    @@ -68,17 +68,17 @@

    Please note there is a known limitation where this option cannot be used at the MongoClient level (see NODE-3946). It does correctly work at Db, Collection, and per operation the same as other BSON options work.

    -
    readConcern?: ReadConcernLike

    Specify a read concern and level for the collection. (only MongoDB 3.2 or higher supported)

    -
    readPreference?: ReadPreferenceLike

    The preferred read preference (ReadPreference.primary, ReadPreference.primary_preferred, ReadPreference.secondary, ReadPreference.secondary_preferred, ReadPreference.nearest).

    -
    retryWrites?: boolean

    This option is deprecated and will be removed in a future release as it is not used +

    readConcern?: ReadConcernLike

    Specify a read concern and level for the collection. (only MongoDB 3.2 or higher supported)

    +
    readPreference?: ReadPreferenceLike

    The preferred read preference (ReadPreference.primary, ReadPreference.primary_preferred, ReadPreference.secondary, ReadPreference.secondary_preferred, ReadPreference.nearest).

    +
    retryWrites?: boolean

    This option is deprecated and will be removed in a future release as it is not used in the driver. Use MongoClientOptions or connection string parameters instead.

    -
    serializeFunctions?: boolean

    serialize the javascript functions

    +
    serializeFunctions?: boolean

    serialize the javascript functions

    false

    session?: ClientSession

    Specify ClientSession for this command

    -
    timeoutMS?: number

    Specifies the time an operation will run until it throws a timeout error

    -
    useBigInt64?: boolean

    when deserializing a Long return as a BigInt.

    +
    timeoutMS?: number

    Specifies the time an operation will run until it throws a timeout error

    +
    useBigInt64?: boolean

    when deserializing a Long return as a BigInt.

    false

    verboseResults?: boolean

    Whether detailed results for each successful operation should be included in the returned BulkWriteResult.

    -
    willRetryWrite?: boolean

    Write Concern as an object

    -
    +
    willRetryWrite?: boolean
    writeConcern?: WriteConcern | WriteConcernSettings

    Write Concern as an object

    +
    diff --git a/docs/Next/interfaces/ClientBulkWriteResult.html b/docs/Next/interfaces/ClientBulkWriteResult.html index 94f3043e330..f392bfa80e4 100644 --- a/docs/Next/interfaces/ClientBulkWriteResult.html +++ b/docs/Next/interfaces/ClientBulkWriteResult.html @@ -1,4 +1,4 @@ -ClientBulkWriteResult | mongodb

    Interface ClientBulkWriteResult

    interface ClientBulkWriteResult {
        acknowledged: boolean;
        deletedCount: number;
        deleteResults?: ReadonlyMap<number, ClientDeleteResult>;
        insertedCount: number;
        insertResults?: ReadonlyMap<number, ClientInsertOneResult>;
        matchedCount: number;
        modifiedCount: number;
        updateResults?: ReadonlyMap<number, ClientUpdateResult>;
        upsertedCount: number;
    }

    Properties

    acknowledged +ClientBulkWriteResult | mongodb

    Interface ClientBulkWriteResult

    interface ClientBulkWriteResult {
        acknowledged: boolean;
        deletedCount: number;
        deleteResults?: ReadonlyMap<number, ClientDeleteResult>;
        insertedCount: number;
        insertResults?: ReadonlyMap<number, ClientInsertOneResult>;
        matchedCount: number;
        modifiedCount: number;
        updateResults?: ReadonlyMap<number, ClientUpdateResult>;
        upsertedCount: number;
    }

    Properties

    acknowledged: boolean

    Whether the bulk write was acknowledged.

    -
    deletedCount: number

    The total number of documents deleted across all delete operations.

    -
    deleteResults?: ReadonlyMap<number, ClientDeleteResult>

    The results of each individual delete operation that was successfully performed.

    -
    insertedCount: number

    The total number of documents inserted across all insert operations.

    -
    insertResults?: ReadonlyMap<number, ClientInsertOneResult>

    The results of each individual insert operation that was successfully performed.

    -
    matchedCount: number

    The total number of documents matched across all update operations.

    -
    modifiedCount: number

    The total number of documents modified across all update operations.

    -
    updateResults?: ReadonlyMap<number, ClientUpdateResult>

    The results of each individual update operation that was successfully performed.

    -
    upsertedCount: number

    The total number of documents upserted across all update operations.

    -
    +
    deletedCount: number

    The total number of documents deleted across all delete operations.

    +
    deleteResults?: ReadonlyMap<number, ClientDeleteResult>

    The results of each individual delete operation that was successfully performed.

    +
    insertedCount: number

    The total number of documents inserted across all insert operations.

    +
    insertResults?: ReadonlyMap<number, ClientInsertOneResult>

    The results of each individual insert operation that was successfully performed.

    +
    matchedCount: number

    The total number of documents matched across all update operations.

    +
    modifiedCount: number

    The total number of documents modified across all update operations.

    +
    updateResults?: ReadonlyMap<number, ClientUpdateResult>

    The results of each individual update operation that was successfully performed.

    +
    upsertedCount: number

    The total number of documents upserted across all update operations.

    +
    diff --git a/docs/Next/interfaces/ClientDeleteManyModel.html b/docs/Next/interfaces/ClientDeleteManyModel.html index 43b3dc770f7..122e001d055 100644 --- a/docs/Next/interfaces/ClientDeleteManyModel.html +++ b/docs/Next/interfaces/ClientDeleteManyModel.html @@ -1,14 +1,14 @@ -ClientDeleteManyModel | mongodb

    Interface ClientDeleteManyModel<TSchema>

    interface ClientDeleteManyModel<TSchema> {
        collation?: CollationOptions;
        filter: Filter<TSchema>;
        hint?: Hint;
        name: "deleteMany";
        namespace: string;
    }

    Type Parameters

    • TSchema

    Hierarchy (view full)

    Properties

    collation? +ClientDeleteManyModel | mongodb

    Interface ClientDeleteManyModel<TSchema>

    interface ClientDeleteManyModel<TSchema> {
        collation?: CollationOptions;
        filter: Filter<TSchema>;
        hint?: Hint;
        name: "deleteMany";
        namespace: string;
    }

    Type Parameters

    • TSchema

    Hierarchy (view full)

    Properties

    collation?: CollationOptions

    Specifies a collation.

    -
    filter: Filter<TSchema>

    The filter used to determine if a document should be deleted. +

    filter: Filter<TSchema>

    The filter used to determine if a document should be deleted. For a deleteMany operation, all matches are removed.

    -
    hint?: Hint

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

    -
    name: "deleteMany"
    namespace: string

    The namespace for the write.

    +
    hint?: Hint

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

    +
    name: "deleteMany"
    namespace: string

    The namespace for the write.

    A namespace is a combination of the database name and the name of the collection: <database-name>.<collection>. All documents belong to a namespace.

    +
    diff --git a/docs/Next/interfaces/ClientDeleteOneModel.html b/docs/Next/interfaces/ClientDeleteOneModel.html index a35cd020ed3..5435ba40748 100644 --- a/docs/Next/interfaces/ClientDeleteOneModel.html +++ b/docs/Next/interfaces/ClientDeleteOneModel.html @@ -1,14 +1,14 @@ -ClientDeleteOneModel | mongodb

    Interface ClientDeleteOneModel<TSchema>

    interface ClientDeleteOneModel<TSchema> {
        collation?: CollationOptions;
        filter: Filter<TSchema>;
        hint?: Hint;
        name: "deleteOne";
        namespace: string;
    }

    Type Parameters

    • TSchema

    Hierarchy (view full)

    Properties

    collation? +ClientDeleteOneModel | mongodb

    Interface ClientDeleteOneModel<TSchema>

    interface ClientDeleteOneModel<TSchema> {
        collation?: CollationOptions;
        filter: Filter<TSchema>;
        hint?: Hint;
        name: "deleteOne";
        namespace: string;
    }

    Type Parameters

    • TSchema

    Hierarchy (view full)

    Properties

    collation?: CollationOptions

    Specifies a collation.

    -
    filter: Filter<TSchema>

    The filter used to determine if a document should be deleted. +

    filter: Filter<TSchema>

    The filter used to determine if a document should be deleted. For a deleteOne operation, the first match is removed.

    -
    hint?: Hint

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

    -
    name: "deleteOne"
    namespace: string

    The namespace for the write.

    +
    hint?: Hint

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

    +
    name: "deleteOne"
    namespace: string

    The namespace for the write.

    A namespace is a combination of the database name and the name of the collection: <database-name>.<collection>. All documents belong to a namespace.

    +
    diff --git a/docs/Next/interfaces/ClientDeleteResult.html b/docs/Next/interfaces/ClientDeleteResult.html index d6099b3cf65..f3d1450561d 100644 --- a/docs/Next/interfaces/ClientDeleteResult.html +++ b/docs/Next/interfaces/ClientDeleteResult.html @@ -1,3 +1,3 @@ -ClientDeleteResult | mongodb

    Interface ClientDeleteResult

    interface ClientDeleteResult {
        deletedCount: number;
    }

    Properties

    deletedCount +ClientDeleteResult | mongodb

    Interface ClientDeleteResult

    interface ClientDeleteResult {
        deletedCount: number;
    }

    Properties

    Properties

    deletedCount: number

    The number of documents that were deleted.

    -
    +
    diff --git a/docs/Next/interfaces/ClientEncryptionCreateDataKeyProviderOptions.html b/docs/Next/interfaces/ClientEncryptionCreateDataKeyProviderOptions.html index d55dfb88d19..f0ebb8e0a4d 100644 --- a/docs/Next/interfaces/ClientEncryptionCreateDataKeyProviderOptions.html +++ b/docs/Next/interfaces/ClientEncryptionCreateDataKeyProviderOptions.html @@ -1,8 +1,8 @@ ClientEncryptionCreateDataKeyProviderOptions | mongodb

    Interface ClientEncryptionCreateDataKeyProviderOptions

    Options to provide when creating a new data key.

    -
    interface ClientEncryptionCreateDataKeyProviderOptions {
        keyAltNames?: string[];
        keyMaterial?: Buffer<ArrayBufferLike> | Binary;
        masterKey?:
            | AWSEncryptionKeyOptions
            | AzureEncryptionKeyOptions
            | GCPEncryptionKeyOptions
            | KMIPEncryptionKeyOptions;
    }

    Properties

    interface ClientEncryptionCreateDataKeyProviderOptions {
        keyAltNames?: string[];
        keyMaterial?: Buffer<ArrayBufferLike> | Binary;
        masterKey?:
            | AWSEncryptionKeyOptions
            | AzureEncryptionKeyOptions
            | GCPEncryptionKeyOptions
            | KMIPEncryptionKeyOptions;
    }

    Properties

    keyAltNames?: string[]

    An optional list of string alternate names used to reference a key. If a key is created with alternate names, then encryption may refer to the key by the unique alternate name instead of by _id.

    -
    keyMaterial?: Buffer<ArrayBufferLike> | Binary

    Identifies a new KMS-specific key used to encrypt the new data key

    -
    +
    keyMaterial?: Buffer<ArrayBufferLike> | Binary
    masterKey?:
        | AWSEncryptionKeyOptions
        | AzureEncryptionKeyOptions
        | GCPEncryptionKeyOptions
        | KMIPEncryptionKeyOptions

    Identifies a new KMS-specific key used to encrypt the new data key

    +
    diff --git a/docs/Next/interfaces/ClientEncryptionEncryptOptions.html b/docs/Next/interfaces/ClientEncryptionEncryptOptions.html index 06b3863aa4a..6e2c94538d6 100644 --- a/docs/Next/interfaces/ClientEncryptionEncryptOptions.html +++ b/docs/Next/interfaces/ClientEncryptionEncryptOptions.html @@ -1,5 +1,5 @@ ClientEncryptionEncryptOptions | mongodb

    Interface ClientEncryptionEncryptOptions

    Options to provide when encrypting data.

    -
    interface ClientEncryptionEncryptOptions {
        algorithm:
            | "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic"
            | "AEAD_AES_256_CBC_HMAC_SHA_512-Random"
            | "Indexed"
            | "Unindexed"
            | "Range"
            | "TextPreview";
        contentionFactor?: number | bigint;
        keyAltName?: string;
        keyId?: Binary;
        queryType?:
            | "equality"
            | "range"
            | "prefixPreview"
            | "suffixPreview"
            | "substringPreview";
        rangeOptions?: RangeOptions;
        textOptions?: TextQueryOptions;
    }

    Properties

    interface ClientEncryptionEncryptOptions {
        algorithm:
            | "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic"
            | "AEAD_AES_256_CBC_HMAC_SHA_512-Random"
            | "Indexed"
            | "Unindexed"
            | "Range"
            | "TextPreview";
        contentionFactor?: number | bigint;
        keyAltName?: string;
        keyId?: Binary;
        queryType?:
            | "equality"
            | "range"
            | "prefixPreview"
            | "suffixPreview"
            | "substringPreview";
        rangeOptions?: RangeOptions;
        textOptions?: TextQueryOptions;
    }

    Properties

    algorithm:
        | "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic"
        | "AEAD_AES_256_CBC_HMAC_SHA_512-Random"
        | "Indexed"
        | "Unindexed"
        | "Range"
        | "TextPreview"

    The algorithm to use for encryption.

    -
    contentionFactor?: number | bigint

    The contention factor.

    -
    keyAltName?: string

    A unique string name corresponding to an already existing dataKey.

    -
    keyId?: Binary

    The id of the Binary dataKey to use for encryption

    -
    queryType?:
        | "equality"
        | "range"
        | "prefixPreview"
        | "suffixPreview"
        | "substringPreview"

    The query type.

    -
    rangeOptions?: RangeOptions

    The index options for a Queryable Encryption field supporting "range" queries.

    -
    textOptions?: TextQueryOptions

    Options for a Queryable Encryption field supporting text queries. Only valid when algorithm is TextPreview.

    +
    contentionFactor?: number | bigint

    The contention factor.

    +
    keyAltName?: string

    A unique string name corresponding to an already existing dataKey.

    +
    keyId?: Binary

    The id of the Binary dataKey to use for encryption

    +
    queryType?:
        | "equality"
        | "range"
        | "prefixPreview"
        | "suffixPreview"
        | "substringPreview"

    The query type.

    +
    rangeOptions?: RangeOptions

    The index options for a Queryable Encryption field supporting "range" queries.

    +
    textOptions?: TextQueryOptions

    Options for a Queryable Encryption field supporting text queries. Only valid when algorithm is TextPreview.

    Public Technical Preview: textPreview is an experimental feature and may break at any time.

    -
    +
    diff --git a/docs/Next/interfaces/ClientEncryptionOptions.html b/docs/Next/interfaces/ClientEncryptionOptions.html index 822165f8d52..ec6e6013338 100644 --- a/docs/Next/interfaces/ClientEncryptionOptions.html +++ b/docs/Next/interfaces/ClientEncryptionOptions.html @@ -1,5 +1,5 @@ ClientEncryptionOptions | mongodb

    Interface ClientEncryptionOptions

    Additional settings to provide when creating a new ClientEncryption instance.

    -
    interface ClientEncryptionOptions {
        credentialProviders?: CredentialProviders;
        keyExpirationMS?: number;
        keyVaultClient?: MongoClient;
        keyVaultNamespace: string;
        kmsProviders?: KMSProviders;
        proxyOptions?: ProxyOptions;
        timeoutMS?: number;
        tlsOptions?: CSFLEKMSTlsOptions;
    }

    Properties

    interface ClientEncryptionOptions {
        credentialProviders?: CredentialProviders;
        keyExpirationMS?: number;
        keyVaultClient?: MongoClient;
        keyVaultNamespace: string;
        kmsProviders?: KMSProviders;
        proxyOptions?: ProxyOptions;
        timeoutMS?: number;
        tlsOptions?: CSFLEKMSTlsOptions;
    }

    Properties

    credentialProviders?: CredentialProviders

    Options for user provided custom credential providers.

    -
    keyExpirationMS?: number

    Sets the expiration time for the DEK in the cache in milliseconds. Defaults to 60000. 0 means no timeout.

    -
    keyVaultClient?: MongoClient

    A MongoClient used to fetch keys from a key vault. Defaults to client.

    -
    keyVaultNamespace: string

    The namespace of the key vault, used to store encryption keys

    -
    kmsProviders?: KMSProviders

    Options for specific KMS providers to use

    -
    proxyOptions?: ProxyOptions

    Options for specifying a Socks5 proxy to use for connecting to the KMS.

    -
    timeoutMS?: number

    The timeout setting to be used for all the operations on ClientEncryption.

    +
    keyExpirationMS?: number

    Sets the expiration time for the DEK in the cache in milliseconds. Defaults to 60000. 0 means no timeout.

    +
    keyVaultClient?: MongoClient

    A MongoClient used to fetch keys from a key vault. Defaults to client.

    +
    keyVaultNamespace: string

    The namespace of the key vault, used to store encryption keys

    +
    kmsProviders?: KMSProviders

    Options for specific KMS providers to use

    +
    proxyOptions?: ProxyOptions

    Options for specifying a Socks5 proxy to use for connecting to the KMS.

    +
    timeoutMS?: number

    The timeout setting to be used for all the operations on ClientEncryption.

    When provided, timeoutMS is used as the timeout for each operation executed on the ClientEncryption object. For example:

    const clientEncryption = new ClientEncryption(client, {
    timeoutMS: 1_000
    kmsProviders: { local: { key: '<KEY>' } }
    });

    // `1_000` is used as the timeout for createDataKey call
    await clientEncryption.createDataKey('local'); @@ -24,5 +24,5 @@
    const client = new MongoClient('<uri>', { timeoutMS: 2_000 });

    // timeoutMS is set to 1_000 on clientEncryption
    const clientEncryption = new ClientEncryption(client, {
    timeoutMS: 1_000
    kmsProviders: { local: { key: '<KEY>' } }
    });
    -
    tlsOptions?: CSFLEKMSTlsOptions

    TLS options for kms providers to use.

    -
    +
    tlsOptions?: CSFLEKMSTlsOptions

    TLS options for kms providers to use.

    +
    diff --git a/docs/Next/interfaces/ClientEncryptionRewrapManyDataKeyProviderOptions.html b/docs/Next/interfaces/ClientEncryptionRewrapManyDataKeyProviderOptions.html index ea488f4124d..669bc60cec9 100644 --- a/docs/Next/interfaces/ClientEncryptionRewrapManyDataKeyProviderOptions.html +++ b/docs/Next/interfaces/ClientEncryptionRewrapManyDataKeyProviderOptions.html @@ -1,3 +1,3 @@ -ClientEncryptionRewrapManyDataKeyProviderOptions | mongodb

    Interface ClientEncryptionRewrapManyDataKeyProviderOptionsExperimental

    interface ClientEncryptionRewrapManyDataKeyProviderOptions {
        masterKey?:
            | AWSEncryptionKeyOptions
            | AzureEncryptionKeyOptions
            | GCPEncryptionKeyOptions
            | KMIPEncryptionKeyOptions;
        provider: keyof KMSProviders;
    }

    Properties

    masterKey? +ClientEncryptionRewrapManyDataKeyProviderOptions | mongodb

    Interface ClientEncryptionRewrapManyDataKeyProviderOptionsExperimental

    interface ClientEncryptionRewrapManyDataKeyProviderOptions {
        masterKey?:
            | AWSEncryptionKeyOptions
            | AzureEncryptionKeyOptions
            | GCPEncryptionKeyOptions
            | KMIPEncryptionKeyOptions;
        provider: keyof KMSProviders;
    }

    Properties

    Properties

    provider: keyof KMSProviders
    +

    Properties

    provider: keyof KMSProviders
    diff --git a/docs/Next/interfaces/ClientEncryptionRewrapManyDataKeyResult.html b/docs/Next/interfaces/ClientEncryptionRewrapManyDataKeyResult.html index d6ca092d508..bb817adcb8c 100644 --- a/docs/Next/interfaces/ClientEncryptionRewrapManyDataKeyResult.html +++ b/docs/Next/interfaces/ClientEncryptionRewrapManyDataKeyResult.html @@ -1,3 +1,3 @@ -ClientEncryptionRewrapManyDataKeyResult | mongodb

    Interface ClientEncryptionRewrapManyDataKeyResultExperimental

    interface ClientEncryptionRewrapManyDataKeyResult {
        bulkWriteResult?: BulkWriteResult;
    }

    Properties

    bulkWriteResult? +ClientEncryptionRewrapManyDataKeyResult | mongodb

    Interface ClientEncryptionRewrapManyDataKeyResultExperimental

    interface ClientEncryptionRewrapManyDataKeyResult {
        bulkWriteResult?: BulkWriteResult;
    }

    Properties

    Properties

    bulkWriteResult?: BulkWriteResult

    The result of rewrapping data keys. If unset, no keys matched the filter.

    -
    +
    diff --git a/docs/Next/interfaces/ClientInsertOneModel.html b/docs/Next/interfaces/ClientInsertOneModel.html index 00c76306180..e96d9779187 100644 --- a/docs/Next/interfaces/ClientInsertOneModel.html +++ b/docs/Next/interfaces/ClientInsertOneModel.html @@ -1,9 +1,9 @@ -ClientInsertOneModel | mongodb

    Interface ClientInsertOneModel<TSchema>

    interface ClientInsertOneModel<TSchema> {
        document: OptionalId<TSchema>;
        name: "insertOne";
        namespace: string;
    }

    Type Parameters

    • TSchema

    Hierarchy (view full)

    Properties

    document +ClientInsertOneModel | mongodb

    Interface ClientInsertOneModel<TSchema>

    interface ClientInsertOneModel<TSchema> {
        document: OptionalId<TSchema>;
        name: "insertOne";
        namespace: string;
    }

    Type Parameters

    • TSchema

    Hierarchy (view full)

    Properties

    document: OptionalId<TSchema>

    The document to insert.

    -
    name: "insertOne"
    namespace: string

    The namespace for the write.

    +
    name: "insertOne"
    namespace: string

    The namespace for the write.

    A namespace is a combination of the database name and the name of the collection: <database-name>.<collection>. All documents belong to a namespace.

    +
    diff --git a/docs/Next/interfaces/ClientInsertOneResult.html b/docs/Next/interfaces/ClientInsertOneResult.html index d50fac1daf0..007beae344f 100644 --- a/docs/Next/interfaces/ClientInsertOneResult.html +++ b/docs/Next/interfaces/ClientInsertOneResult.html @@ -1,3 +1,3 @@ -ClientInsertOneResult | mongodb

    Interface ClientInsertOneResult

    interface ClientInsertOneResult {
        insertedId: any;
    }

    Properties

    insertedId +ClientInsertOneResult | mongodb

    Interface ClientInsertOneResult

    interface ClientInsertOneResult {
        insertedId: any;
    }

    Properties

    Properties

    insertedId: any

    The _id of the inserted document.

    -
    +
    diff --git a/docs/Next/interfaces/ClientMetadata.html b/docs/Next/interfaces/ClientMetadata.html index c3c0ab47963..58ba90c3a28 100644 --- a/docs/Next/interfaces/ClientMetadata.html +++ b/docs/Next/interfaces/ClientMetadata.html @@ -1,9 +1,9 @@ ClientMetadata | mongodb

    Interface ClientMetadata

    This interface will be made internal in the next major release.

    https://github.com/mongodb/specifications/blob/master/source/mongodb-handshake/handshake.md#hello-command

    -
    interface ClientMetadata {
        application?: {
            name: string;
        };
        driver: {
            name: string;
            version: string;
        };
        env?: {
            memory_mb?: Int32;
            name:
                | "aws.lambda"
                | "gcp.func"
                | "azure.func"
                | "vercel";
            region?: string;
            timeout_sec?: Int32;
            url?: string;
        };
        os: {
            architecture?: string;
            name?: Platform;
            type: string;
            version?: string;
        };
        platform: string;
    }

    Properties

    interface ClientMetadata {
        application?: {
            name: string;
        };
        driver: {
            name: string;
            version: string;
        };
        env?: {
            memory_mb?: Int32;
            name:
                | "aws.lambda"
                | "gcp.func"
                | "azure.func"
                | "vercel";
            region?: string;
            timeout_sec?: Int32;
            url?: string;
        };
        os: {
            architecture?: string;
            name?: Platform;
            type: string;
            version?: string;
        };
        platform: string;
    }

    Properties

    application?: {
        name: string;
    }
    driver: {
        name: string;
        version: string;
    }
    env?: {
        memory_mb?: Int32;
        name:
            | "aws.lambda"
            | "gcp.func"
            | "azure.func"
            | "vercel";
        region?: string;
        timeout_sec?: Int32;
        url?: string;
    }

    FaaS environment information

    -
    os: {
        architecture?: string;
        name?: Platform;
        type: string;
        version?: string;
    }
    platform: string
    +

    Properties

    application?: {
        name: string;
    }
    driver: {
        name: string;
        version: string;
    }
    env?: {
        memory_mb?: Int32;
        name:
            | "aws.lambda"
            | "gcp.func"
            | "azure.func"
            | "vercel";
        region?: string;
        timeout_sec?: Int32;
        url?: string;
    }

    FaaS environment information

    +
    os: {
        architecture?: string;
        name?: Platform;
        type: string;
        version?: string;
    }
    platform: string
    diff --git a/docs/Next/interfaces/ClientMetadataOptions.html b/docs/Next/interfaces/ClientMetadataOptions.html index a8235d0d270..767906e903b 100644 --- a/docs/Next/interfaces/ClientMetadataOptions.html +++ b/docs/Next/interfaces/ClientMetadataOptions.html @@ -1,4 +1,4 @@ ClientMetadataOptions | mongodb

    Interface ClientMetadataOptions

    This interface will be made internal in the next major release.

    -
    interface ClientMetadataOptions {
        appName?: string;
        driverInfo?: {
            name?: string;
            platform?: string;
            version?: string;
        };
    }

    Properties

    interface ClientMetadataOptions {
        appName?: string;
        driverInfo?: {
            name?: string;
            platform?: string;
            version?: string;
        };
    }

    Properties

    Properties

    appName?: string
    driverInfo?: {
        name?: string;
        platform?: string;
        version?: string;
    }
    +

    Properties

    appName?: string
    driverInfo?: {
        name?: string;
        platform?: string;
        version?: string;
    }
    diff --git a/docs/Next/interfaces/ClientReplaceOneModel.html b/docs/Next/interfaces/ClientReplaceOneModel.html index a8cb16f2df9..e4e840e6fbc 100644 --- a/docs/Next/interfaces/ClientReplaceOneModel.html +++ b/docs/Next/interfaces/ClientReplaceOneModel.html @@ -1,4 +1,4 @@ -ClientReplaceOneModel | mongodb

    Interface ClientReplaceOneModel<TSchema>

    interface ClientReplaceOneModel<TSchema> {
        collation?: CollationOptions;
        filter: Filter<TSchema>;
        hint?: Hint;
        name: "replaceOne";
        namespace: string;
        replacement: WithoutId<TSchema>;
        sort?: Sort;
        upsert?: boolean;
    }

    Type Parameters

    • TSchema

    Hierarchy (view full)

    Properties

    collation? +ClientReplaceOneModel | mongodb

    Interface ClientReplaceOneModel<TSchema>

    interface ClientReplaceOneModel<TSchema> {
        collation?: CollationOptions;
        filter: Filter<TSchema>;
        hint?: Hint;
        name: "replaceOne";
        namespace: string;
        replacement: WithoutId<TSchema>;
        sort?: Sort;
        upsert?: boolean;
    }

    Type Parameters

    • TSchema

    Hierarchy (view full)

    Properties

    Properties

    collation?: CollationOptions

    Specifies a collation.

    -
    filter: Filter<TSchema>

    The filter used to determine if a document should be replaced. +

    filter: Filter<TSchema>

    The filter used to determine if a document should be replaced. For a replaceOne operation, the first match is replaced.

    -
    hint?: Hint

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

    -
    name: "replaceOne"
    namespace: string

    The namespace for the write.

    +
    hint?: Hint

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

    +
    name: "replaceOne"
    namespace: string

    The namespace for the write.

    A namespace is a combination of the database name and the name of the collection: <database-name>.<collection>. All documents belong to a namespace.

    replacement: WithoutId<TSchema>

    The document with which to replace the matched document.

    -
    sort?: Sort

    Specifies the sort order for the documents matched by the filter.

    -
    upsert?: boolean

    When true, creates a new document if no document matches the query.

    -
    +
    replacement: WithoutId<TSchema>

    The document with which to replace the matched document.

    +
    sort?: Sort

    Specifies the sort order for the documents matched by the filter.

    +
    upsert?: boolean

    When true, creates a new document if no document matches the query.

    +
    diff --git a/docs/Next/interfaces/ClientSessionOptions.html b/docs/Next/interfaces/ClientSessionOptions.html index 6728456bfeb..3d509f05299 100644 --- a/docs/Next/interfaces/ClientSessionOptions.html +++ b/docs/Next/interfaces/ClientSessionOptions.html @@ -1,10 +1,10 @@ -ClientSessionOptions | mongodb

    Interface ClientSessionOptions

    interface ClientSessionOptions {
        causalConsistency?: boolean;
        defaultTimeoutMS?: number;
        defaultTransactionOptions?: TransactionOptions;
        snapshot?: boolean;
    }

    Properties

    causalConsistency? +ClientSessionOptions | mongodb

    Interface ClientSessionOptions

    interface ClientSessionOptions {
        causalConsistency?: boolean;
        defaultTimeoutMS?: number;
        defaultTransactionOptions?: TransactionOptions;
        snapshot?: boolean;
    }

    Properties

    causalConsistency?: boolean

    Whether causal consistency should be enabled on this session

    -
    defaultTimeoutMS?: number

    An overriding timeoutMS value to use for a client-side timeout. +

    defaultTimeoutMS?: number

    An overriding timeoutMS value to use for a client-side timeout. If not provided the session uses the timeoutMS specified on the MongoClient.

    -
    defaultTransactionOptions?: TransactionOptions

    The default TransactionOptions to use for transactions started on this session.

    -
    snapshot?: boolean

    Whether all read operations should be read from the same snapshot for this session (NOTE: not compatible with causalConsistency=true)

    -
    +
    defaultTransactionOptions?: TransactionOptions

    The default TransactionOptions to use for transactions started on this session.

    +
    snapshot?: boolean

    Whether all read operations should be read from the same snapshot for this session (NOTE: not compatible with causalConsistency=true)

    +
    diff --git a/docs/Next/interfaces/ClientUpdateManyModel.html b/docs/Next/interfaces/ClientUpdateManyModel.html index 351bd9a61a5..b2fb61b4988 100644 --- a/docs/Next/interfaces/ClientUpdateManyModel.html +++ b/docs/Next/interfaces/ClientUpdateManyModel.html @@ -1,4 +1,4 @@ -ClientUpdateManyModel | mongodb

    Interface ClientUpdateManyModel<TSchema>

    interface ClientUpdateManyModel<TSchema> {
        arrayFilters?: Document[];
        collation?: CollationOptions;
        filter: Filter<TSchema>;
        hint?: Hint;
        name: "updateMany";
        namespace: string;
        update: Document[] | UpdateFilter<TSchema>;
        upsert?: boolean;
    }

    Type Parameters

    • TSchema

    Hierarchy (view full)

    Properties

    arrayFilters? +ClientUpdateManyModel | mongodb

    Interface ClientUpdateManyModel<TSchema>

    interface ClientUpdateManyModel<TSchema> {
        arrayFilters?: Document[];
        collation?: CollationOptions;
        filter: Filter<TSchema>;
        hint?: Hint;
        name: "updateMany";
        namespace: string;
        update: Document[] | UpdateFilter<TSchema>;
        upsert?: boolean;
    }

    Type Parameters

    • TSchema

    Hierarchy (view full)

    Properties

    Properties

    arrayFilters?: Document[]

    A set of filters specifying to which array elements an update should apply.

    -
    collation?: CollationOptions

    Specifies a collation.

    -
    filter: Filter<TSchema>

    The filter used to determine if a document should be updated. +

    collation?: CollationOptions

    Specifies a collation.

    +
    filter: Filter<TSchema>

    The filter used to determine if a document should be updated. For an updateMany operation, all matches are updated.

    -
    hint?: Hint

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

    -
    name: "updateMany"
    namespace: string

    The namespace for the write.

    +
    hint?: Hint

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

    +
    name: "updateMany"
    namespace: string

    The namespace for the write.

    A namespace is a combination of the database name and the name of the collection: <database-name>.<collection>. All documents belong to a namespace.

    The modifications to apply. The value can be either: +

    The modifications to apply. The value can be either: UpdateFilter - A document that contains update operator expressions, Document[] - an aggregation pipeline.

    -
    upsert?: boolean

    When true, creates a new document if no document matches the query.

    -
    +
    upsert?: boolean

    When true, creates a new document if no document matches the query.

    +
    diff --git a/docs/Next/interfaces/ClientUpdateOneModel.html b/docs/Next/interfaces/ClientUpdateOneModel.html index 4621b16977a..206da7a63ea 100644 --- a/docs/Next/interfaces/ClientUpdateOneModel.html +++ b/docs/Next/interfaces/ClientUpdateOneModel.html @@ -1,4 +1,4 @@ -ClientUpdateOneModel | mongodb

    Interface ClientUpdateOneModel<TSchema>

    interface ClientUpdateOneModel<TSchema> {
        arrayFilters?: Document[];
        collation?: CollationOptions;
        filter: Filter<TSchema>;
        hint?: Hint;
        name: "updateOne";
        namespace: string;
        sort?: Sort;
        update: Document[] | UpdateFilter<TSchema>;
        upsert?: boolean;
    }

    Type Parameters

    • TSchema

    Hierarchy (view full)

    Properties

    arrayFilters? +ClientUpdateOneModel | mongodb

    Interface ClientUpdateOneModel<TSchema>

    interface ClientUpdateOneModel<TSchema> {
        arrayFilters?: Document[];
        collation?: CollationOptions;
        filter: Filter<TSchema>;
        hint?: Hint;
        name: "updateOne";
        namespace: string;
        sort?: Sort;
        update: Document[] | UpdateFilter<TSchema>;
        upsert?: boolean;
    }

    Type Parameters

    • TSchema

    Hierarchy (view full)

    Properties

    Properties

    arrayFilters?: Document[]

    A set of filters specifying to which array elements an update should apply.

    -
    collation?: CollationOptions

    Specifies a collation.

    -
    filter: Filter<TSchema>

    The filter used to determine if a document should be updated. +

    collation?: CollationOptions

    Specifies a collation.

    +
    filter: Filter<TSchema>

    The filter used to determine if a document should be updated. For an updateOne operation, the first match is updated.

    -
    hint?: Hint

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

    -
    name: "updateOne"
    namespace: string

    The namespace for the write.

    +
    hint?: Hint

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

    +
    name: "updateOne"
    namespace: string

    The namespace for the write.

    A namespace is a combination of the database name and the name of the collection: <database-name>.<collection>. All documents belong to a namespace.

    sort?: Sort

    Specifies the sort order for the documents matched by the filter.

    -

    The modifications to apply. The value can be either: +

    sort?: Sort

    Specifies the sort order for the documents matched by the filter.

    +

    The modifications to apply. The value can be either: UpdateFilter - A document that contains update operator expressions, Document[] - an aggregation pipeline.

    -
    upsert?: boolean

    When true, creates a new document if no document matches the query.

    -
    +
    upsert?: boolean

    When true, creates a new document if no document matches the query.

    +
    diff --git a/docs/Next/interfaces/ClientUpdateResult.html b/docs/Next/interfaces/ClientUpdateResult.html index 895ab8ee68c..8155cfaf1c3 100644 --- a/docs/Next/interfaces/ClientUpdateResult.html +++ b/docs/Next/interfaces/ClientUpdateResult.html @@ -1,12 +1,12 @@ -ClientUpdateResult | mongodb

    Interface ClientUpdateResult

    interface ClientUpdateResult {
        didUpsert: boolean;
        matchedCount: number;
        modifiedCount: number;
        upsertedId?: any;
    }

    Properties

    didUpsert +ClientUpdateResult | mongodb

    Interface ClientUpdateResult

    interface ClientUpdateResult {
        didUpsert: boolean;
        matchedCount: number;
        modifiedCount: number;
        upsertedId?: any;
    }

    Properties

    didUpsert: boolean

    Determines if the upsert did include an _id, which includes the case of the _id being null.

    -
    matchedCount: number

    The number of documents that matched the filter.

    -
    modifiedCount: number

    The number of documents that were modified.

    -
    upsertedId?: any

    The _id field of the upserted document if an upsert occurred.

    +
    matchedCount: number

    The number of documents that matched the filter.

    +
    modifiedCount: number

    The number of documents that were modified.

    +
    upsertedId?: any

    The _id field of the upserted document if an upsert occurred.

    It MUST be possible to discern between a BSON Null upserted ID value and this field being unset. If necessary, drivers MAY add a didUpsert boolean field to differentiate between these two cases.

    -
    +
    diff --git a/docs/Next/interfaces/ClientWriteModel.html b/docs/Next/interfaces/ClientWriteModel.html index 679af496893..610ae6cacbb 100644 --- a/docs/Next/interfaces/ClientWriteModel.html +++ b/docs/Next/interfaces/ClientWriteModel.html @@ -1,6 +1,6 @@ -ClientWriteModel | mongodb

    Interface ClientWriteModel

    interface ClientWriteModel {
        namespace: string;
    }

    Hierarchy (view full)

    Properties

    namespace +ClientWriteModel | mongodb

    Interface ClientWriteModel

    interface ClientWriteModel {
        namespace: string;
    }

    Hierarchy (view full)

    Properties

    Properties

    namespace: string

    The namespace for the write.

    A namespace is a combination of the database name and the name of the collection: <database-name>.<collection>. All documents belong to a namespace.

    +
    diff --git a/docs/Next/interfaces/CloseOptions.html b/docs/Next/interfaces/CloseOptions.html index a125e46ddee..fd0e090bd53 100644 --- a/docs/Next/interfaces/CloseOptions.html +++ b/docs/Next/interfaces/CloseOptions.html @@ -1,4 +1,4 @@ CloseOptions | mongodb

    Interface CloseOptions

    This interface is deprecated and will be removed in a future release as it is not used in the driver

    -
    interface CloseOptions {
        force?: boolean;
    }

    Properties

    Properties

    force?: boolean
    +
    interface CloseOptions {
        force?: boolean;
    }

    Properties

    Properties

    force?: boolean
    diff --git a/docs/Next/interfaces/ClusterTime.html b/docs/Next/interfaces/ClusterTime.html index 6e8cec0f08c..39662606a40 100644 --- a/docs/Next/interfaces/ClusterTime.html +++ b/docs/Next/interfaces/ClusterTime.html @@ -1,7 +1,7 @@ ClusterTime | mongodb

    Interface ClusterTime

    Gossiped in component for the cluster time tracking the state of user databases across the cluster. It may optionally include a signature identifying the process that generated such a value.

    -
    interface ClusterTime {
        clusterTime: Timestamp;
        signature?: {
            hash: Binary;
            keyId: Long;
        };
    }

    Properties

    interface ClusterTime {
        clusterTime: Timestamp;
        signature?: {
            hash: Binary;
            keyId: Long;
        };
    }

    Properties

    clusterTime: Timestamp
    signature?: {
        hash: Binary;
        keyId: Long;
    }

    Used to validate the identity of a request or response's ClusterTime.

    -
    +

    Properties

    clusterTime: Timestamp
    signature?: {
        hash: Binary;
        keyId: Long;
    }

    Used to validate the identity of a request or response's ClusterTime.

    +
    diff --git a/docs/Next/interfaces/ClusteredCollectionOptions.html b/docs/Next/interfaces/ClusteredCollectionOptions.html index ae321a8d462..d5bc5e4c2b6 100644 --- a/docs/Next/interfaces/ClusteredCollectionOptions.html +++ b/docs/Next/interfaces/ClusteredCollectionOptions.html @@ -1,6 +1,6 @@ ClusteredCollectionOptions | mongodb

    Interface ClusteredCollectionOptions

    Configuration options for clustered collections

    interface ClusteredCollectionOptions {
        key: Document;
        name?: string;
        unique: boolean;
    }

    Hierarchy (view full)

    Properties

    key +
    interface ClusteredCollectionOptions {
        key: Document;
        name?: string;
        unique: boolean;
    }

    Hierarchy (view full)

    Properties

    Properties

    name?: string
    unique: boolean
    +

    Properties

    name?: string
    unique: boolean
    diff --git a/docs/Next/interfaces/CollationOptions.html b/docs/Next/interfaces/CollationOptions.html index 164be557f78..c48eb510450 100644 --- a/docs/Next/interfaces/CollationOptions.html +++ b/docs/Next/interfaces/CollationOptions.html @@ -1,4 +1,4 @@ -CollationOptions | mongodb

    Interface CollationOptions

    interface CollationOptions {
        alternate?: string;
        backwards?: boolean;
        caseFirst?: string;
        caseLevel?: boolean;
        locale: string;
        maxVariable?: string;
        normalization?: boolean;
        numericOrdering?: boolean;
        strength?: number;
    }

    Properties

    alternate? +CollationOptions | mongodb

    Interface CollationOptions

    interface CollationOptions {
        alternate?: string;
        backwards?: boolean;
        caseFirst?: string;
        caseLevel?: boolean;
        locale: string;
        maxVariable?: string;
        normalization?: boolean;
        numericOrdering?: boolean;
        strength?: number;
    }

    Properties

    alternate?: string
    backwards?: boolean
    caseFirst?: string
    caseLevel?: boolean
    locale: string
    maxVariable?: string
    normalization?: boolean
    numericOrdering?: boolean
    strength?: number
    +

    Properties

    alternate?: string
    backwards?: boolean
    caseFirst?: string
    caseLevel?: boolean
    locale: string
    maxVariable?: string
    normalization?: boolean
    numericOrdering?: boolean
    strength?: number
    diff --git a/docs/Next/interfaces/CollectionInfo.html b/docs/Next/interfaces/CollectionInfo.html index 3da70e5d799..46a7aa0e717 100644 --- a/docs/Next/interfaces/CollectionInfo.html +++ b/docs/Next/interfaces/CollectionInfo.html @@ -1,6 +1,6 @@ -CollectionInfo | mongodb

    Interface CollectionInfo

    interface CollectionInfo {
        idIndex?: Document;
        info?: {
            readOnly?: false;
            uuid?: Binary;
        };
        name: string;
        options?: Document;
        type?: string;
    }

    Hierarchy (view full)

    Properties

    idIndex? +CollectionInfo | mongodb

    Interface CollectionInfo

    interface CollectionInfo {
        idIndex?: Document;
        info?: {
            readOnly?: false;
            uuid?: Binary;
        };
        name: string;
        options?: Document;
        type?: string;
    }

    Hierarchy (view full)

    Properties

    idIndex?: Document
    info?: {
        readOnly?: false;
        uuid?: Binary;
    }
    name: string
    options?: Document
    type?: string
    +

    Properties

    idIndex?: Document
    info?: {
        readOnly?: false;
        uuid?: Binary;
    }
    name: string
    options?: Document
    type?: string
    diff --git a/docs/Next/interfaces/CollectionOptions.html b/docs/Next/interfaces/CollectionOptions.html index 55e34fb9bc3..f16c486ee69 100644 --- a/docs/Next/interfaces/CollectionOptions.html +++ b/docs/Next/interfaces/CollectionOptions.html @@ -1,4 +1,4 @@ -CollectionOptions | mongodb

    Interface CollectionOptions

    interface CollectionOptions {
        bsonRegExp?: boolean;
        checkKeys?: boolean;
        enableUtf8Validation?: boolean;
        fieldsAsRaw?: Document;
        ignoreUndefined?: boolean;
        promoteBuffers?: boolean;
        promoteLongs?: boolean;
        promoteValues?: boolean;
        raw?: boolean;
        readConcern?: ReadConcernLike;
        readPreference?: ReadPreferenceLike;
        serializeFunctions?: boolean;
        timeoutMS?: number;
        useBigInt64?: boolean;
        writeConcern?: WriteConcern | WriteConcernSettings;
    }

    Hierarchy (view full)

    Properties

    bsonRegExp? +CollectionOptions | mongodb

    Interface CollectionOptions

    interface CollectionOptions {
        bsonRegExp?: boolean;
        checkKeys?: boolean;
        enableUtf8Validation?: boolean;
        fieldsAsRaw?: Document;
        ignoreUndefined?: boolean;
        promoteBuffers?: boolean;
        promoteLongs?: boolean;
        promoteValues?: boolean;
        raw?: boolean;
        readConcern?: ReadConcernLike;
        readPreference?: ReadPreferenceLike;
        serializeFunctions?: boolean;
        timeoutMS?: number;
        useBigInt64?: boolean;
        writeConcern?: WriteConcern | WriteConcernSettings;
    }

    Hierarchy (view full)

    Properties

    checkKeys?: boolean

    the serializer will check if keys are valid.

    false

    enableUtf8Validation?: boolean

    Enable utf8 validation when deserializing BSON documents. Defaults to true.

    -
    fieldsAsRaw?: Document

    allow to specify if there what fields we wish to return as unserialized raw buffer.

    +
    fieldsAsRaw?: Document

    allow to specify if there what fields we wish to return as unserialized raw buffer.

    null

    ignoreUndefined?: boolean

    serialize will not emit undefined fields note that the driver sets this to false

    @@ -40,12 +40,12 @@

    Please note there is a known limitation where this option cannot be used at the MongoClient level (see NODE-3946). It does correctly work at Db, Collection, and per operation the same as other BSON options work.

    -
    readConcern?: ReadConcernLike

    Specify a read concern for the collection. (only MongoDB 3.2 or higher supported)

    -
    readPreference?: ReadPreferenceLike

    The preferred read preference (ReadPreference.PRIMARY, ReadPreference.PRIMARY_PREFERRED, ReadPreference.SECONDARY, ReadPreference.SECONDARY_PREFERRED, ReadPreference.NEAREST).

    -
    serializeFunctions?: boolean

    serialize the javascript functions

    +
    readConcern?: ReadConcernLike

    Specify a read concern for the collection. (only MongoDB 3.2 or higher supported)

    +
    readPreference?: ReadPreferenceLike

    The preferred read preference (ReadPreference.PRIMARY, ReadPreference.PRIMARY_PREFERRED, ReadPreference.SECONDARY, ReadPreference.SECONDARY_PREFERRED, ReadPreference.NEAREST).

    +
    serializeFunctions?: boolean

    serialize the javascript functions

    false

    timeoutMS?: number

    Specifies the time an operation will run until it throws a timeout error

    -
    useBigInt64?: boolean

    when deserializing a Long return as a BigInt.

    +
    useBigInt64?: boolean

    when deserializing a Long return as a BigInt.

    false

    Write Concern as an object

    -
    +
    diff --git a/docs/Next/interfaces/CommandOperationOptions.html b/docs/Next/interfaces/CommandOperationOptions.html index 2d3df60a96d..98601ff0b28 100644 --- a/docs/Next/interfaces/CommandOperationOptions.html +++ b/docs/Next/interfaces/CommandOperationOptions.html @@ -1,4 +1,4 @@ -CommandOperationOptions | mongodb

    Interface CommandOperationOptions

    interface CommandOperationOptions {
        authdb?: string;
        bsonRegExp?: boolean;
        checkKeys?: boolean;
        collation?: CollationOptions;
        comment?: unknown;
        dbName?: string;
        enableUtf8Validation?: boolean;
        explain?: ExplainVerbosityLike | ExplainCommandOptions;
        fieldsAsRaw?: Document;
        ignoreUndefined?: boolean;
        maxTimeMS?: number;
        noResponse?: boolean;
        promoteBuffers?: boolean;
        promoteLongs?: boolean;
        promoteValues?: boolean;
        raw?: boolean;
        readConcern?: ReadConcernLike;
        readPreference?: ReadPreferenceLike;
        retryWrites?: boolean;
        serializeFunctions?: boolean;
        session?: ClientSession;
        timeoutMS?: number;
        useBigInt64?: boolean;
        willRetryWrite?: boolean;
        writeConcern?: WriteConcern | WriteConcernSettings;
    }

    Hierarchy (view full)

    Properties

    authdb? +CommandOperationOptions | mongodb

    Interface CommandOperationOptions

    interface CommandOperationOptions {
        authdb?: string;
        bsonRegExp?: boolean;
        checkKeys?: boolean;
        collation?: CollationOptions;
        comment?: unknown;
        dbName?: string;
        enableUtf8Validation?: boolean;
        explain?: ExplainVerbosityLike | ExplainCommandOptions;
        fieldsAsRaw?: Document;
        ignoreUndefined?: boolean;
        maxTimeMS?: number;
        noResponse?: boolean;
        promoteBuffers?: boolean;
        promoteLongs?: boolean;
        promoteValues?: boolean;
        raw?: boolean;
        readConcern?: ReadConcernLike;
        readPreference?: ReadPreferenceLike;
        retryWrites?: boolean;
        serializeFunctions?: boolean;
        session?: ClientSession;
        timeoutMS?: number;
        useBigInt64?: boolean;
        willRetryWrite?: boolean;
        writeConcern?: WriteConcern | WriteConcernSettings;
    }

    Hierarchy (view full)

    Properties

    authdb?: string
    bsonRegExp?: boolean

    return BSON regular expressions as BSONRegExp instances.

    +

    Properties

    authdb?: string
    bsonRegExp?: boolean

    return BSON regular expressions as BSONRegExp instances.

    false

    checkKeys?: boolean

    the serializer will check if keys are valid.

    false

    collation?: CollationOptions

    Collation

    -
    comment?: unknown

    Comment to apply to the operation.

    +
    comment?: unknown

    Comment to apply to the operation.

    In server versions pre-4.4, 'comment' must be string. A server error will be thrown if any other type is provided.

    In server versions 4.4 and above, 'comment' can be any valid BSON type.

    -
    dbName?: string
    enableUtf8Validation?: boolean

    Enable utf8 validation when deserializing BSON documents. Defaults to true.

    -

    Specifies the verbosity mode for the explain output.

    -
    fieldsAsRaw?: Document

    allow to specify if there what fields we wish to return as unserialized raw buffer.

    +
    dbName?: string
    enableUtf8Validation?: boolean

    Enable utf8 validation when deserializing BSON documents. Defaults to true.

    +

    Specifies the verbosity mode for the explain output.

    +
    fieldsAsRaw?: Document

    allow to specify if there what fields we wish to return as unserialized raw buffer.

    null

    ignoreUndefined?: boolean

    serialize will not emit undefined fields note that the driver sets this to false

    true

    maxTimeMS?: number

    maxTimeMS is a server-side time limit in milliseconds for processing an operation.

    -
    noResponse?: boolean

    This option is deprecated and will be removed in an upcoming major version.

    -
    promoteBuffers?: boolean

    when deserializing a Binary will return it as a node.js Buffer instance.

    +
    noResponse?: boolean

    This option is deprecated and will be removed in an upcoming major version.

    +
    promoteBuffers?: boolean

    when deserializing a Binary will return it as a node.js Buffer instance.

    false

    promoteLongs?: boolean

    when deserializing a Long will fit it into a Number if it's smaller than 53 bits.

    true

    @@ -58,15 +58,15 @@

    Please note there is a known limitation where this option cannot be used at the MongoClient level (see NODE-3946). It does correctly work at Db, Collection, and per operation the same as other BSON options work.

    -
    readConcern?: ReadConcernLike

    Specify a read concern and level for the collection. (only MongoDB 3.2 or higher supported)

    -
    readPreference?: ReadPreferenceLike

    The preferred read preference (ReadPreference.primary, ReadPreference.primary_preferred, ReadPreference.secondary, ReadPreference.secondary_preferred, ReadPreference.nearest).

    -
    retryWrites?: boolean

    This option is deprecated and will be removed in a future release as it is not used +

    readConcern?: ReadConcernLike

    Specify a read concern and level for the collection. (only MongoDB 3.2 or higher supported)

    +
    readPreference?: ReadPreferenceLike

    The preferred read preference (ReadPreference.primary, ReadPreference.primary_preferred, ReadPreference.secondary, ReadPreference.secondary_preferred, ReadPreference.nearest).

    +
    retryWrites?: boolean

    This option is deprecated and will be removed in a future release as it is not used in the driver. Use MongoClientOptions or connection string parameters instead.

    -
    serializeFunctions?: boolean

    serialize the javascript functions

    +
    serializeFunctions?: boolean

    serialize the javascript functions

    false

    session?: ClientSession

    Specify ClientSession for this command

    -
    timeoutMS?: number

    Specifies the time an operation will run until it throws a timeout error

    -
    useBigInt64?: boolean

    when deserializing a Long return as a BigInt.

    +
    timeoutMS?: number

    Specifies the time an operation will run until it throws a timeout error

    +
    useBigInt64?: boolean

    when deserializing a Long return as a BigInt.

    false

    -
    willRetryWrite?: boolean

    Write Concern as an object

    -
    +
    willRetryWrite?: boolean

    Write Concern as an object

    +
    diff --git a/docs/Next/interfaces/ConnectOptions.html b/docs/Next/interfaces/ConnectOptions.html index 8a4e16478f2..7a38fd49716 100644 --- a/docs/Next/interfaces/ConnectOptions.html +++ b/docs/Next/interfaces/ConnectOptions.html @@ -1,2 +1,2 @@ -ConnectOptions | mongodb

    Interface ConnectOptions

    interface ConnectOptions {
        readPreference?: ReadPreference;
    }

    Properties

    Properties

    readPreference?: ReadPreference
    +ConnectOptions | mongodb

    Interface ConnectOptions

    interface ConnectOptions {
        readPreference?: ReadPreference;
    }

    Properties

    Properties

    readPreference?: ReadPreference
    diff --git a/docs/Next/interfaces/ConnectionOptions.html b/docs/Next/interfaces/ConnectionOptions.html index afd8b60495b..fc147d8f0bf 100644 --- a/docs/Next/interfaces/ConnectionOptions.html +++ b/docs/Next/interfaces/ConnectionOptions.html @@ -1,4 +1,4 @@ -ConnectionOptions | mongodb

    Interface ConnectionOptions

    interface ConnectionOptions {
        allowPartialTrustChain?: boolean;
        ALPNProtocols?: Uint8Array<ArrayBufferLike> | string[] | Uint8Array<ArrayBufferLike>[];
        autoSelectFamily?: boolean;
        autoSelectFamilyAttemptTimeout?: number;
        ca?: string | Buffer<ArrayBufferLike> | (string | Buffer<ArrayBufferLike>)[];
        cancellationToken?: CancellationToken;
        cert?: string | Buffer<ArrayBufferLike> | (string | Buffer<ArrayBufferLike>)[];
        checkServerIdentity?: ((hostname: string, cert: PeerCertificate) => Error | undefined);
        ciphers?: string;
        compressors?: (
            | "none"
            | "snappy"
            | "zlib"
            | "zstd")[];
        connectTimeoutMS?: number;
        credentials?: MongoCredentials;
        crl?: string | Buffer<ArrayBufferLike> | (string | Buffer<ArrayBufferLike>)[];
        ecdhCurve?: string;
        family?: number;
        generation: number;
        hints?: number;
        hostAddress: HostAddress;
        id: number | "<monitor>";
        keepAliveInitialDelay?: number;
        key?: string | Buffer<ArrayBufferLike> | (string | Buffer<ArrayBufferLike> | KeyObject)[];
        loadBalanced: boolean;
        localAddress?: string;
        localPort?: number;
        logicalSessionTimeoutMinutes?: number;
        lookup?: LookupFunction;
        metadata: ClientMetadata;
        minDHSize?: number;
        monitorCommands: boolean;
        noDelay?: boolean;
        passphrase?: string;
        pfx?: string | Buffer<ArrayBufferLike> | (string | Buffer<ArrayBufferLike> | PxfObject)[];
        proxyHost?: string;
        proxyPassword?: string;
        proxyPort?: number;
        proxyUsername?: string;
        rejectUnauthorized?: boolean;
        secureContext?: SecureContext;
        secureProtocol?: string;
        serverApi?: ServerApi;
        servername?: string;
        session?: Buffer<ArrayBufferLike>;
        socketTimeoutMS?: number;
        tls: boolean;
    }

    Hierarchy (view full)

    Properties

    allowPartialTrustChain? +ConnectionOptions | mongodb

    Interface ConnectionOptions

    interface ConnectionOptions {
        allowPartialTrustChain?: boolean;
        ALPNProtocols?: Uint8Array<ArrayBufferLike> | string[] | Uint8Array<ArrayBufferLike>[];
        autoSelectFamily?: boolean;
        autoSelectFamilyAttemptTimeout?: number;
        ca?: string | Buffer<ArrayBufferLike> | (string | Buffer<ArrayBufferLike>)[];
        cancellationToken?: CancellationToken;
        cert?: string | Buffer<ArrayBufferLike> | (string | Buffer<ArrayBufferLike>)[];
        checkServerIdentity?: ((hostname: string, cert: PeerCertificate) => Error | undefined);
        ciphers?: string;
        compressors?: (
            | "none"
            | "snappy"
            | "zlib"
            | "zstd")[];
        connectTimeoutMS?: number;
        credentials?: MongoCredentials;
        crl?: string | Buffer<ArrayBufferLike> | (string | Buffer<ArrayBufferLike>)[];
        ecdhCurve?: string;
        family?: number;
        generation: number;
        hints?: number;
        hostAddress: HostAddress;
        id: number | "<monitor>";
        keepAliveInitialDelay?: number;
        key?: string | Buffer<ArrayBufferLike> | (string | Buffer<ArrayBufferLike> | KeyObject)[];
        loadBalanced: boolean;
        localAddress?: string;
        localPort?: number;
        logicalSessionTimeoutMinutes?: number;
        lookup?: LookupFunction;
        metadata: ClientMetadata;
        minDHSize?: number;
        monitorCommands: boolean;
        noDelay?: boolean;
        passphrase?: string;
        pfx?: string | Buffer<ArrayBufferLike> | (string | Buffer<ArrayBufferLike> | PxfObject)[];
        proxyHost?: string;
        proxyPassword?: string;
        proxyPort?: number;
        proxyUsername?: string;
        rejectUnauthorized?: boolean;
        secureContext?: SecureContext;
        secureProtocol?: string;
        serverApi?: ServerApi;
        servername?: string;
        session?: Buffer<ArrayBufferLike>;
        socketTimeoutMS?: number;
        tls: boolean;
    }

    Hierarchy (view full)

    Properties

    allowPartialTrustChain?: boolean

    Treat intermediate (non-self-signed) certificates in the trust CA certificate list as trusted.

    v22.9.0, v20.18.0

    -
    ALPNProtocols?: Uint8Array<ArrayBufferLike> | string[] | Uint8Array<ArrayBufferLike>[]

    An array of strings or a Buffer naming possible ALPN protocols. +

    ALPNProtocols?: Uint8Array<ArrayBufferLike> | string[] | Uint8Array<ArrayBufferLike>[]

    An array of strings or a Buffer naming possible ALPN protocols. (Protocols should be ordered by their priority.)

    autoSelectFamily?: boolean

    v18.13.0

    -
    autoSelectFamilyAttemptTimeout?: number

    v18.13.0

    -
    ca?: string | Buffer<ArrayBufferLike> | (string | Buffer<ArrayBufferLike>)[]

    Optionally override the trusted CA certificates. Default is to trust +

    autoSelectFamilyAttemptTimeout?: number

    v18.13.0

    +
    ca?: string | Buffer<ArrayBufferLike> | (string | Buffer<ArrayBufferLike>)[]

    Optionally override the trusted CA certificates. Default is to trust the well-known CAs curated by Mozilla. Mozilla's CAs are completely replaced when CAs are explicitly specified using this option.

    -
    cancellationToken?: CancellationToken
    cert?: string | Buffer<ArrayBufferLike> | (string | Buffer<ArrayBufferLike>)[]

    Cert chains in PEM format. One cert chain should be provided per +

    cancellationToken?: CancellationToken
    cert?: string | Buffer<ArrayBufferLike> | (string | Buffer<ArrayBufferLike>)[]

    Cert chains in PEM format. One cert chain should be provided per private key. Each cert chain should consist of the PEM formatted certificate for a provided private key, followed by the PEM formatted intermediate certificates (if any), in order, and not @@ -81,7 +81,7 @@ information, see modifying the default cipher suite. Permitted ciphers can be obtained via tls.getCiphers(). Cipher names must be uppercased in order for OpenSSL to accept them.

    -
    compressors?: (
        | "none"
        | "snappy"
        | "zlib"
        | "zstd")[]
    connectTimeoutMS?: number
    credentials?: MongoCredentials
    crl?: string | Buffer<ArrayBufferLike> | (string | Buffer<ArrayBufferLike>)[]

    PEM formatted CRLs (Certificate Revocation Lists).

    +
    compressors?: (
        | "none"
        | "snappy"
        | "zlib"
        | "zstd")[]
    connectTimeoutMS?: number
    credentials?: MongoCredentials
    crl?: string | Buffer<ArrayBufferLike> | (string | Buffer<ArrayBufferLike>)[]

    PEM formatted CRLs (Certificate Revocation Lists).

    ecdhCurve?: string

    A string describing a named curve or a colon separated list of curve NIDs or names, for example P-521:P-384:P-256, to use for ECDH key agreement. Set to auto to select the curve automatically. Use @@ -89,8 +89,8 @@ recent releases, openssl ecparam -list_curves will also display the name and description of each available elliptic curve. Default: tls.DEFAULT_ECDH_CURVE.

    -
    family?: number
    generation: number
    hints?: number
    hostAddress: HostAddress
    id: number | "<monitor>"
    keepAliveInitialDelay?: number

    Node.JS socket option to set the time the first keepalive probe is sent on an idle socket. Defaults to 120000ms

    -
    key?: string | Buffer<ArrayBufferLike> | (string | Buffer<ArrayBufferLike> | KeyObject)[]

    Private keys in PEM format. PEM allows the option of private keys +

    family?: number
    generation: number
    hints?: number
    hostAddress: HostAddress
    id: number | "<monitor>"
    keepAliveInitialDelay?: number

    Node.JS socket option to set the time the first keepalive probe is sent on an idle socket. Defaults to 120000ms

    +
    key?: string | Buffer<ArrayBufferLike> | (string | Buffer<ArrayBufferLike> | KeyObject)[]

    Private keys in PEM format. PEM allows the option of private keys being encrypted. Encrypted keys will be decrypted with options.passphrase. Multiple keys using different algorithms can be provided either as an array of unencrypted key strings or buffers, @@ -98,7 +98,7 @@ passphrase: ]}. The object form can only occur in an array. object.passphrase is optional. Encrypted keys will be decrypted with object.passphrase if provided, or options.passphrase if it is not.

    -
    loadBalanced: boolean
    localAddress?: string
    localPort?: number
    logicalSessionTimeoutMinutes?: number
    lookup?: LookupFunction
    metadata: ClientMetadata
    minDHSize?: number
    monitorCommands: boolean
    noDelay?: boolean
    passphrase?: string

    Shared passphrase used for a single private key and/or a PFX.

    +
    loadBalanced: boolean
    localAddress?: string
    localPort?: number
    logicalSessionTimeoutMinutes?: number
    lookup?: LookupFunction
    metadata: ClientMetadata
    minDHSize?: number
    monitorCommands: boolean
    noDelay?: boolean
    passphrase?: string

    Shared passphrase used for a single private key and/or a PFX.

    pfx?: string | Buffer<ArrayBufferLike> | (string | Buffer<ArrayBufferLike> | PxfObject)[]

    PFX or PKCS12 encoded private key and certificate chain. pfx is an alternative to providing key and cert individually. PFX is usually encrypted, if it is, passphrase will be used to decrypt it. Multiple @@ -107,7 +107,7 @@ passphrase: ]}. The object form can only occur in an array. object.passphrase is optional. Encrypted PFX will be decrypted with object.passphrase if provided, or options.passphrase if it is not.

    -
    proxyHost?: string
    proxyPassword?: string
    proxyPort?: number
    proxyUsername?: string
    rejectUnauthorized?: boolean

    If true the server will reject any connection which is not +

    proxyHost?: string
    proxyPassword?: string
    proxyPort?: number
    proxyUsername?: string
    rejectUnauthorized?: boolean

    If true the server will reject any connection which is not authorized with the list of supplied CAs. This option only has an effect if requestCert is true.

    true
    @@ -123,5 +123,5 @@
     any TLS protocol version up to TLSv1.3. It is not recommended to use
     TLS versions less than 1.2, but it may be required for
     interoperability. Default: none, see minVersion.

    -
    serverApi?: ServerApi
    servername?: string
    session?: Buffer<ArrayBufferLike>

    An optional Buffer instance containing a TLS session.

    -
    socketTimeoutMS?: number
    tls: boolean
    +
    serverApi?: ServerApi
    servername?: string
    session?: Buffer<ArrayBufferLike>

    An optional Buffer instance containing a TLS session.

    +
    socketTimeoutMS?: number
    tls: boolean
    diff --git a/docs/Next/interfaces/ConnectionPoolOptions.html b/docs/Next/interfaces/ConnectionPoolOptions.html index 8c3b451a460..1a891e9f2fa 100644 --- a/docs/Next/interfaces/ConnectionPoolOptions.html +++ b/docs/Next/interfaces/ConnectionPoolOptions.html @@ -1,4 +1,4 @@ -ConnectionPoolOptions | mongodb

    Interface ConnectionPoolOptions

    interface ConnectionPoolOptions {
        allowPartialTrustChain?: boolean;
        ALPNProtocols?: Uint8Array<ArrayBufferLike> | string[] | Uint8Array<ArrayBufferLike>[];
        autoSelectFamily?: boolean;
        autoSelectFamilyAttemptTimeout?: number;
        ca?: string | Buffer<ArrayBufferLike> | (string | Buffer<ArrayBufferLike>)[];
        cancellationToken?: CancellationToken;
        cert?: string | Buffer<ArrayBufferLike> | (string | Buffer<ArrayBufferLike>)[];
        checkServerIdentity?: ((hostname: string, cert: PeerCertificate) => Error | undefined);
        ciphers?: string;
        compressors?: (
            | "none"
            | "snappy"
            | "zlib"
            | "zstd")[];
        connectTimeoutMS?: number;
        credentials?: MongoCredentials;
        crl?: string | Buffer<ArrayBufferLike> | (string | Buffer<ArrayBufferLike>)[];
        ecdhCurve?: string;
        family?: number;
        hints?: number;
        hostAddress: HostAddress;
        keepAliveInitialDelay?: number;
        key?: string | Buffer<ArrayBufferLike> | (string | Buffer<ArrayBufferLike> | KeyObject)[];
        loadBalanced: boolean;
        localAddress?: string;
        localPort?: number;
        logicalSessionTimeoutMinutes?: number;
        lookup?: LookupFunction;
        maxConnecting: number;
        maxIdleTimeMS: number;
        maxPoolSize: number;
        metadata: ClientMetadata;
        minDHSize?: number;
        minPoolSize: number;
        monitorCommands: boolean;
        noDelay?: boolean;
        passphrase?: string;
        pfx?: string | Buffer<ArrayBufferLike> | (string | Buffer<ArrayBufferLike> | PxfObject)[];
        proxyHost?: string;
        proxyPassword?: string;
        proxyPort?: number;
        proxyUsername?: string;
        rejectUnauthorized?: boolean;
        secureContext?: SecureContext;
        secureProtocol?: string;
        serverApi?: ServerApi;
        servername?: string;
        session?: Buffer<ArrayBufferLike>;
        socketTimeoutMS?: number;
        tls: boolean;
        waitQueueTimeoutMS: number;
    }

    Hierarchy

    Properties

    allowPartialTrustChain? +ConnectionPoolOptions | mongodb

    Interface ConnectionPoolOptions

    interface ConnectionPoolOptions {
        allowPartialTrustChain?: boolean;
        ALPNProtocols?: Uint8Array<ArrayBufferLike> | string[] | Uint8Array<ArrayBufferLike>[];
        autoSelectFamily?: boolean;
        autoSelectFamilyAttemptTimeout?: number;
        ca?: string | Buffer<ArrayBufferLike> | (string | Buffer<ArrayBufferLike>)[];
        cancellationToken?: CancellationToken;
        cert?: string | Buffer<ArrayBufferLike> | (string | Buffer<ArrayBufferLike>)[];
        checkServerIdentity?: ((hostname: string, cert: PeerCertificate) => Error | undefined);
        ciphers?: string;
        compressors?: (
            | "none"
            | "snappy"
            | "zlib"
            | "zstd")[];
        connectTimeoutMS?: number;
        credentials?: MongoCredentials;
        crl?: string | Buffer<ArrayBufferLike> | (string | Buffer<ArrayBufferLike>)[];
        ecdhCurve?: string;
        family?: number;
        hints?: number;
        hostAddress: HostAddress;
        keepAliveInitialDelay?: number;
        key?: string | Buffer<ArrayBufferLike> | (string | Buffer<ArrayBufferLike> | KeyObject)[];
        loadBalanced: boolean;
        localAddress?: string;
        localPort?: number;
        logicalSessionTimeoutMinutes?: number;
        lookup?: LookupFunction;
        maxConnecting: number;
        maxIdleTimeMS: number;
        maxPoolSize: number;
        metadata: ClientMetadata;
        minDHSize?: number;
        minPoolSize: number;
        monitorCommands: boolean;
        noDelay?: boolean;
        passphrase?: string;
        pfx?: string | Buffer<ArrayBufferLike> | (string | Buffer<ArrayBufferLike> | PxfObject)[];
        proxyHost?: string;
        proxyPassword?: string;
        proxyPort?: number;
        proxyUsername?: string;
        rejectUnauthorized?: boolean;
        secureContext?: SecureContext;
        secureProtocol?: string;
        serverApi?: ServerApi;
        servername?: string;
        session?: Buffer<ArrayBufferLike>;
        socketTimeoutMS?: number;
        tls: boolean;
        waitQueueTimeoutMS: number;
    }

    Hierarchy

    Properties

    allowPartialTrustChain?: boolean

    Treat intermediate (non-self-signed) certificates in the trust CA certificate list as trusted.

    v22.9.0, v20.18.0

    -
    ALPNProtocols?: Uint8Array<ArrayBufferLike> | string[] | Uint8Array<ArrayBufferLike>[]

    An array of strings or a Buffer naming possible ALPN protocols. +

    ALPNProtocols?: Uint8Array<ArrayBufferLike> | string[] | Uint8Array<ArrayBufferLike>[]

    An array of strings or a Buffer naming possible ALPN protocols. (Protocols should be ordered by their priority.)

    autoSelectFamily?: boolean

    v18.13.0

    -
    autoSelectFamilyAttemptTimeout?: number

    v18.13.0

    -
    ca?: string | Buffer<ArrayBufferLike> | (string | Buffer<ArrayBufferLike>)[]

    Optionally override the trusted CA certificates. Default is to trust +

    autoSelectFamilyAttemptTimeout?: number

    v18.13.0

    +
    ca?: string | Buffer<ArrayBufferLike> | (string | Buffer<ArrayBufferLike>)[]

    Optionally override the trusted CA certificates. Default is to trust the well-known CAs curated by Mozilla. Mozilla's CAs are completely replaced when CAs are explicitly specified using this option.

    -
    cancellationToken?: CancellationToken
    cert?: string | Buffer<ArrayBufferLike> | (string | Buffer<ArrayBufferLike>)[]

    Cert chains in PEM format. One cert chain should be provided per +

    cancellationToken?: CancellationToken
    cert?: string | Buffer<ArrayBufferLike> | (string | Buffer<ArrayBufferLike>)[]

    Cert chains in PEM format. One cert chain should be provided per private key. Each cert chain should consist of the PEM formatted certificate for a provided private key, followed by the PEM formatted intermediate certificates (if any), in order, and not @@ -84,7 +84,7 @@ information, see modifying the default cipher suite. Permitted ciphers can be obtained via tls.getCiphers(). Cipher names must be uppercased in order for OpenSSL to accept them.

    -
    compressors?: (
        | "none"
        | "snappy"
        | "zlib"
        | "zstd")[]
    connectTimeoutMS?: number
    credentials?: MongoCredentials
    crl?: string | Buffer<ArrayBufferLike> | (string | Buffer<ArrayBufferLike>)[]

    PEM formatted CRLs (Certificate Revocation Lists).

    +
    compressors?: (
        | "none"
        | "snappy"
        | "zlib"
        | "zstd")[]
    connectTimeoutMS?: number
    credentials?: MongoCredentials
    crl?: string | Buffer<ArrayBufferLike> | (string | Buffer<ArrayBufferLike>)[]

    PEM formatted CRLs (Certificate Revocation Lists).

    ecdhCurve?: string

    A string describing a named curve or a colon separated list of curve NIDs or names, for example P-521:P-384:P-256, to use for ECDH key agreement. Set to auto to select the curve automatically. Use @@ -92,8 +92,8 @@ recent releases, openssl ecparam -list_curves will also display the name and description of each available elliptic curve. Default: tls.DEFAULT_ECDH_CURVE.

    -
    family?: number
    hints?: number
    hostAddress: HostAddress
    keepAliveInitialDelay?: number

    Node.JS socket option to set the time the first keepalive probe is sent on an idle socket. Defaults to 120000ms

    -
    key?: string | Buffer<ArrayBufferLike> | (string | Buffer<ArrayBufferLike> | KeyObject)[]

    Private keys in PEM format. PEM allows the option of private keys +

    family?: number
    hints?: number
    hostAddress: HostAddress
    keepAliveInitialDelay?: number

    Node.JS socket option to set the time the first keepalive probe is sent on an idle socket. Defaults to 120000ms

    +
    key?: string | Buffer<ArrayBufferLike> | (string | Buffer<ArrayBufferLike> | KeyObject)[]

    Private keys in PEM format. PEM allows the option of private keys being encrypted. Encrypted keys will be decrypted with options.passphrase. Multiple keys using different algorithms can be provided either as an array of unencrypted key strings or buffers, @@ -102,11 +102,11 @@ object.passphrase is optional. Encrypted keys will be decrypted with object.passphrase if provided, or options.passphrase if it is not.

    loadBalanced: boolean

    If we are in load balancer mode.

    -
    localAddress?: string
    localPort?: number
    logicalSessionTimeoutMinutes?: number
    lookup?: LookupFunction
    maxConnecting: number

    The maximum number of connections that may be in the process of being established concurrently by the connection pool.

    -
    maxIdleTimeMS: number

    The maximum amount of time a connection should remain idle in the connection pool before being marked idle.

    -
    maxPoolSize: number

    The maximum number of connections that may be associated with a pool at a given time. This includes in use and available connections.

    -
    metadata: ClientMetadata
    minDHSize?: number
    minPoolSize: number

    The minimum number of connections that MUST exist at any moment in a single connection pool.

    -
    monitorCommands: boolean
    noDelay?: boolean
    passphrase?: string

    Shared passphrase used for a single private key and/or a PFX.

    +
    localAddress?: string
    localPort?: number
    logicalSessionTimeoutMinutes?: number
    lookup?: LookupFunction
    maxConnecting: number

    The maximum number of connections that may be in the process of being established concurrently by the connection pool.

    +
    maxIdleTimeMS: number

    The maximum amount of time a connection should remain idle in the connection pool before being marked idle.

    +
    maxPoolSize: number

    The maximum number of connections that may be associated with a pool at a given time. This includes in use and available connections.

    +
    metadata: ClientMetadata
    minDHSize?: number
    minPoolSize: number

    The minimum number of connections that MUST exist at any moment in a single connection pool.

    +
    monitorCommands: boolean
    noDelay?: boolean
    passphrase?: string

    Shared passphrase used for a single private key and/or a PFX.

    pfx?: string | Buffer<ArrayBufferLike> | (string | Buffer<ArrayBufferLike> | PxfObject)[]

    PFX or PKCS12 encoded private key and certificate chain. pfx is an alternative to providing key and cert individually. PFX is usually encrypted, if it is, passphrase will be used to decrypt it. Multiple @@ -115,7 +115,7 @@ passphrase: ]}. The object form can only occur in an array. object.passphrase is optional. Encrypted PFX will be decrypted with object.passphrase if provided, or options.passphrase if it is not.

    -
    proxyHost?: string
    proxyPassword?: string
    proxyPort?: number
    proxyUsername?: string
    rejectUnauthorized?: boolean

    If true the server will reject any connection which is not +

    proxyHost?: string
    proxyPassword?: string
    proxyPort?: number
    proxyUsername?: string
    rejectUnauthorized?: boolean

    If true the server will reject any connection which is not authorized with the list of supplied CAs. This option only has an effect if requestCert is true.

    true
    @@ -131,6 +131,6 @@
     any TLS protocol version up to TLSv1.3. It is not recommended to use
     TLS versions less than 1.2, but it may be required for
     interoperability. Default: none, see minVersion.

    -
    serverApi?: ServerApi
    servername?: string
    session?: Buffer<ArrayBufferLike>

    An optional Buffer instance containing a TLS session.

    -
    socketTimeoutMS?: number
    tls: boolean
    waitQueueTimeoutMS: number

    The maximum amount of time operation execution should wait for a connection to become available. The default is 0 which means there is no limit.

    -
    +
    serverApi?: ServerApi
    servername?: string
    session?: Buffer<ArrayBufferLike>

    An optional Buffer instance containing a TLS session.

    +
    socketTimeoutMS?: number
    tls: boolean
    waitQueueTimeoutMS: number

    The maximum amount of time operation execution should wait for a connection to become available. The default is 0 which means there is no limit.

    +
    diff --git a/docs/Next/interfaces/CountDocumentsOptions.html b/docs/Next/interfaces/CountDocumentsOptions.html index f0baa4f178b..8e078891922 100644 --- a/docs/Next/interfaces/CountDocumentsOptions.html +++ b/docs/Next/interfaces/CountDocumentsOptions.html @@ -1,4 +1,4 @@ -CountDocumentsOptions | mongodb

    Interface CountDocumentsOptions

    interface CountDocumentsOptions {
        allowDiskUse?: boolean;
        authdb?: string;
        batchSize?: number;
        bsonRegExp?: boolean;
        bypassDocumentValidation?: boolean;
        checkKeys?: boolean;
        collation?: CollationOptions;
        comment?: unknown;
        cursor?: Document;
        dbName?: string;
        enableUtf8Validation?: boolean;
        explain?: ExplainVerbosityLike | ExplainCommandOptions;
        fieldsAsRaw?: Document;
        hint?: Hint;
        ignoreUndefined?: boolean;
        let?: Document;
        limit?: number;
        maxAwaitTimeMS?: number;
        maxTimeMS?: number;
        noResponse?: boolean;
        out?: string;
        promoteBuffers?: boolean;
        promoteLongs?: boolean;
        promoteValues?: boolean;
        raw?: boolean;
        readConcern?: ReadConcernLike;
        readPreference?: ReadPreferenceLike;
        retryWrites?: boolean;
        serializeFunctions?: boolean;
        session?: ClientSession;
        skip?: number;
        timeoutMS?: number;
        useBigInt64?: boolean;
        willRetryWrite?: boolean;
        writeConcern?: WriteConcern | WriteConcernSettings;
    }

    Hierarchy (view full)

    Properties

    allowDiskUse? +CountDocumentsOptions | mongodb

    Interface CountDocumentsOptions

    interface CountDocumentsOptions {
        allowDiskUse?: boolean;
        authdb?: string;
        batchSize?: number;
        bsonRegExp?: boolean;
        bypassDocumentValidation?: boolean;
        checkKeys?: boolean;
        collation?: CollationOptions;
        comment?: unknown;
        cursor?: Document;
        dbName?: string;
        enableUtf8Validation?: boolean;
        explain?: ExplainVerbosityLike | ExplainCommandOptions;
        fieldsAsRaw?: Document;
        hint?: Hint;
        ignoreUndefined?: boolean;
        let?: Document;
        limit?: number;
        maxAwaitTimeMS?: number;
        maxTimeMS?: number;
        noResponse?: boolean;
        out?: string;
        promoteBuffers?: boolean;
        promoteLongs?: boolean;
        promoteValues?: boolean;
        raw?: boolean;
        readConcern?: ReadConcernLike;
        readPreference?: ReadPreferenceLike;
        retryWrites?: boolean;
        serializeFunctions?: boolean;
        session?: ClientSession;
        skip?: number;
        timeoutMS?: number;
        useBigInt64?: boolean;
        willRetryWrite?: boolean;
        writeConcern?: WriteConcern | WriteConcernSettings;
    }

    Hierarchy (view full)

    Properties

    allowDiskUse?: boolean

    allowDiskUse lets the server know if it can use disk to store temporary results for the aggregation (requires mongodb 2.6 >).

    -
    authdb?: string
    batchSize?: number

    The number of documents to return per batch. See aggregation documentation.

    -
    bsonRegExp?: boolean

    return BSON regular expressions as BSONRegExp instances.

    +
    authdb?: string
    batchSize?: number

    The number of documents to return per batch. See aggregation documentation.

    +
    bsonRegExp?: boolean

    return BSON regular expressions as BSONRegExp instances.

    false

    bypassDocumentValidation?: boolean

    Allow driver to bypass schema validation.

    -
    checkKeys?: boolean

    the serializer will check if keys are valid.

    +
    checkKeys?: boolean

    the serializer will check if keys are valid.

    false

    collation?: CollationOptions

    Specify collation.

    -
    comment?: unknown

    Comment to apply to the operation.

    +
    comment?: unknown

    Comment to apply to the operation.

    In server versions pre-4.4, 'comment' must be string. A server error will be thrown if any other type is provided.

    In server versions 4.4 and above, 'comment' can be any valid BSON type.

    -
    cursor?: Document

    Return the query as cursor, on 2.6 > it returns as a real cursor on pre 2.6 it returns as an emulated cursor.

    -
    dbName?: string
    enableUtf8Validation?: boolean

    Enable utf8 validation when deserializing BSON documents. Defaults to true.

    -

    Specifies the verbosity mode for the explain output.

    +
    cursor?: Document

    Return the query as cursor, on 2.6 > it returns as a real cursor on pre 2.6 it returns as an emulated cursor.

    +
    dbName?: string
    enableUtf8Validation?: boolean

    Enable utf8 validation when deserializing BSON documents. Defaults to true.

    +

    Specifies the verbosity mode for the explain output.

    This API is deprecated in favor of collection.aggregate().explain() or db.aggregate().explain().

    -
    fieldsAsRaw?: Document

    allow to specify if there what fields we wish to return as unserialized raw buffer.

    +
    fieldsAsRaw?: Document

    allow to specify if there what fields we wish to return as unserialized raw buffer.

    null

    hint?: Hint

    Add an index selection hint to an aggregation command

    -
    ignoreUndefined?: boolean

    serialize will not emit undefined fields +

    ignoreUndefined?: boolean

    serialize will not emit undefined fields note that the driver sets this to false

    true

    let?: Document

    Map of parameter names and values that can be accessed using $$var (requires MongoDB 5.0).

    -
    limit?: number

    The maximum amount of documents to consider.

    -
    maxAwaitTimeMS?: number

    The maximum amount of time for the server to wait on new documents to satisfy a tailable cursor query.

    -
    maxTimeMS?: number

    Specifies a cumulative time limit in milliseconds for processing operations on the cursor. MongoDB interrupts the operation at the earliest following interrupt point.

    -
    noResponse?: boolean

    This option is deprecated and will be removed in an upcoming major version.

    -
    out?: string
    promoteBuffers?: boolean

    when deserializing a Binary will return it as a node.js Buffer instance.

    +
    limit?: number

    The maximum amount of documents to consider.

    +
    maxAwaitTimeMS?: number

    The maximum amount of time for the server to wait on new documents to satisfy a tailable cursor query.

    +
    maxTimeMS?: number

    Specifies a cumulative time limit in milliseconds for processing operations on the cursor. MongoDB interrupts the operation at the earliest following interrupt point.

    +
    noResponse?: boolean

    This option is deprecated and will be removed in an upcoming major version.

    +
    out?: string
    promoteBuffers?: boolean

    when deserializing a Binary will return it as a node.js Buffer instance.

    false

    promoteLongs?: boolean

    when deserializing a Long will fit it into a Number if it's smaller than 53 bits.

    true

    @@ -78,16 +78,16 @@

    Please note there is a known limitation where this option cannot be used at the MongoClient level (see NODE-3946). It does correctly work at Db, Collection, and per operation the same as other BSON options work.

    -
    readConcern?: ReadConcernLike

    Specify a read concern and level for the collection. (only MongoDB 3.2 or higher supported)

    -
    readPreference?: ReadPreferenceLike

    The preferred read preference (ReadPreference.primary, ReadPreference.primary_preferred, ReadPreference.secondary, ReadPreference.secondary_preferred, ReadPreference.nearest).

    -
    retryWrites?: boolean

    This option is deprecated and will be removed in a future release as it is not used +

    readConcern?: ReadConcernLike

    Specify a read concern and level for the collection. (only MongoDB 3.2 or higher supported)

    +
    readPreference?: ReadPreferenceLike

    The preferred read preference (ReadPreference.primary, ReadPreference.primary_preferred, ReadPreference.secondary, ReadPreference.secondary_preferred, ReadPreference.nearest).

    +
    retryWrites?: boolean

    This option is deprecated and will be removed in a future release as it is not used in the driver. Use MongoClientOptions or connection string parameters instead.

    -
    serializeFunctions?: boolean

    serialize the javascript functions

    +
    serializeFunctions?: boolean

    serialize the javascript functions

    false

    session?: ClientSession

    Specify ClientSession for this command

    -
    skip?: number

    The number of documents to skip.

    -
    timeoutMS?: number

    Specifies the time an operation will run until it throws a timeout error

    -
    useBigInt64?: boolean

    when deserializing a Long return as a BigInt.

    +
    skip?: number

    The number of documents to skip.

    +
    timeoutMS?: number

    Specifies the time an operation will run until it throws a timeout error

    +
    useBigInt64?: boolean

    when deserializing a Long return as a BigInt.

    false

    -
    willRetryWrite?: boolean

    Write Concern as an object

    -
    +
    willRetryWrite?: boolean

    Write Concern as an object

    +
    diff --git a/docs/Next/interfaces/CountOptions.html b/docs/Next/interfaces/CountOptions.html index e04c23c5c0c..a30410e2a4c 100644 --- a/docs/Next/interfaces/CountOptions.html +++ b/docs/Next/interfaces/CountOptions.html @@ -1,4 +1,4 @@ -CountOptions | mongodb

    Interface CountOptions

    interface CountOptions {
        authdb?: string;
        bsonRegExp?: boolean;
        checkKeys?: boolean;
        collation?: CollationOptions;
        comment?: unknown;
        dbName?: string;
        enableUtf8Validation?: boolean;
        explain?: ExplainVerbosityLike | ExplainCommandOptions;
        fieldsAsRaw?: Document;
        hint?: string | Document;
        ignoreUndefined?: boolean;
        limit?: number;
        maxTimeMS?: number;
        noResponse?: boolean;
        promoteBuffers?: boolean;
        promoteLongs?: boolean;
        promoteValues?: boolean;
        raw?: boolean;
        readConcern?: ReadConcernLike;
        readPreference?: ReadPreferenceLike;
        retryWrites?: boolean;
        serializeFunctions?: boolean;
        session?: ClientSession;
        skip?: number;
        timeoutMS?: number;
        useBigInt64?: boolean;
        willRetryWrite?: boolean;
        writeConcern?: WriteConcern | WriteConcernSettings;
    }

    Hierarchy (view full)

    Properties

    authdb? +CountOptions | mongodb

    Interface CountOptions

    interface CountOptions {
        authdb?: string;
        bsonRegExp?: boolean;
        checkKeys?: boolean;
        collation?: CollationOptions;
        comment?: unknown;
        dbName?: string;
        enableUtf8Validation?: boolean;
        explain?: ExplainVerbosityLike | ExplainCommandOptions;
        fieldsAsRaw?: Document;
        hint?: string | Document;
        ignoreUndefined?: boolean;
        limit?: number;
        maxTimeMS?: number;
        noResponse?: boolean;
        promoteBuffers?: boolean;
        promoteLongs?: boolean;
        promoteValues?: boolean;
        raw?: boolean;
        readConcern?: ReadConcernLike;
        readPreference?: ReadPreferenceLike;
        retryWrites?: boolean;
        serializeFunctions?: boolean;
        session?: ClientSession;
        skip?: number;
        timeoutMS?: number;
        useBigInt64?: boolean;
        willRetryWrite?: boolean;
        writeConcern?: WriteConcern | WriteConcernSettings;
    }

    Hierarchy (view full)

    Properties

    authdb?: string
    bsonRegExp?: boolean

    return BSON regular expressions as BSONRegExp instances.

    +

    Properties

    authdb?: string
    bsonRegExp?: boolean

    return BSON regular expressions as BSONRegExp instances.

    false

    checkKeys?: boolean

    the serializer will check if keys are valid.

    false

    collation?: CollationOptions

    Collation

    -
    comment?: unknown

    Comment to apply to the operation.

    +
    comment?: unknown

    Comment to apply to the operation.

    In server versions pre-4.4, 'comment' must be string. A server error will be thrown if any other type is provided.

    In server versions 4.4 and above, 'comment' can be any valid BSON type.

    -
    dbName?: string
    enableUtf8Validation?: boolean

    Enable utf8 validation when deserializing BSON documents. Defaults to true.

    -

    Specifies the verbosity mode for the explain output.

    -
    fieldsAsRaw?: Document

    allow to specify if there what fields we wish to return as unserialized raw buffer.

    +
    dbName?: string
    enableUtf8Validation?: boolean

    Enable utf8 validation when deserializing BSON documents. Defaults to true.

    +

    Specifies the verbosity mode for the explain output.

    +
    fieldsAsRaw?: Document

    allow to specify if there what fields we wish to return as unserialized raw buffer.

    null

    hint?: string | Document

    An index name hint for the query.

    -
    ignoreUndefined?: boolean

    serialize will not emit undefined fields +

    ignoreUndefined?: boolean

    serialize will not emit undefined fields note that the driver sets this to false

    true

    limit?: number

    The maximum amounts to count before aborting.

    -
    maxTimeMS?: number

    Number of milliseconds to wait before aborting the query.

    -
    noResponse?: boolean

    This option is deprecated and will be removed in an upcoming major version.

    -
    promoteBuffers?: boolean

    when deserializing a Binary will return it as a node.js Buffer instance.

    +
    maxTimeMS?: number

    Number of milliseconds to wait before aborting the query.

    +
    noResponse?: boolean

    This option is deprecated and will be removed in an upcoming major version.

    +
    promoteBuffers?: boolean

    when deserializing a Binary will return it as a node.js Buffer instance.

    false

    promoteLongs?: boolean

    when deserializing a Long will fit it into a Number if it's smaller than 53 bits.

    true

    @@ -63,16 +63,16 @@

    Please note there is a known limitation where this option cannot be used at the MongoClient level (see NODE-3946). It does correctly work at Db, Collection, and per operation the same as other BSON options work.

    -
    readConcern?: ReadConcernLike

    Specify a read concern and level for the collection. (only MongoDB 3.2 or higher supported)

    -
    readPreference?: ReadPreferenceLike

    The preferred read preference (ReadPreference.primary, ReadPreference.primary_preferred, ReadPreference.secondary, ReadPreference.secondary_preferred, ReadPreference.nearest).

    -
    retryWrites?: boolean

    This option is deprecated and will be removed in a future release as it is not used +

    readConcern?: ReadConcernLike

    Specify a read concern and level for the collection. (only MongoDB 3.2 or higher supported)

    +
    readPreference?: ReadPreferenceLike

    The preferred read preference (ReadPreference.primary, ReadPreference.primary_preferred, ReadPreference.secondary, ReadPreference.secondary_preferred, ReadPreference.nearest).

    +
    retryWrites?: boolean

    This option is deprecated and will be removed in a future release as it is not used in the driver. Use MongoClientOptions or connection string parameters instead.

    -
    serializeFunctions?: boolean

    serialize the javascript functions

    +
    serializeFunctions?: boolean

    serialize the javascript functions

    false

    session?: ClientSession

    Specify ClientSession for this command

    -
    skip?: number

    The number of documents to skip.

    -
    timeoutMS?: number

    Specifies the time an operation will run until it throws a timeout error

    -
    useBigInt64?: boolean

    when deserializing a Long return as a BigInt.

    +
    skip?: number

    The number of documents to skip.

    +
    timeoutMS?: number

    Specifies the time an operation will run until it throws a timeout error

    +
    useBigInt64?: boolean

    when deserializing a Long return as a BigInt.

    false

    -
    willRetryWrite?: boolean

    Write Concern as an object

    -
    +
    willRetryWrite?: boolean

    Write Concern as an object

    +
    diff --git a/docs/Next/interfaces/CreateCollectionOptions.html b/docs/Next/interfaces/CreateCollectionOptions.html index 345d770a8e2..ad061f96b19 100644 --- a/docs/Next/interfaces/CreateCollectionOptions.html +++ b/docs/Next/interfaces/CreateCollectionOptions.html @@ -1,4 +1,4 @@ -CreateCollectionOptions | mongodb

    Interface CreateCollectionOptions

    interface CreateCollectionOptions {
        authdb?: string;
        autoIndexId?: boolean;
        bsonRegExp?: boolean;
        capped?: boolean;
        changeStreamPreAndPostImages?: {
            enabled: boolean;
        };
        checkKeys?: boolean;
        clusteredIndex?: ClusteredCollectionOptions;
        collation?: CollationOptions;
        comment?: unknown;
        dbName?: string;
        enableUtf8Validation?: boolean;
        encryptedFields?: Document;
        expireAfterSeconds?: number;
        explain?: ExplainVerbosityLike | ExplainCommandOptions;
        fieldsAsRaw?: Document;
        flags?: number;
        ignoreUndefined?: boolean;
        indexOptionDefaults?: Document;
        max?: number;
        maxTimeMS?: number;
        noResponse?: boolean;
        pipeline?: Document[];
        pkFactory?: PkFactory;
        promoteBuffers?: boolean;
        promoteLongs?: boolean;
        promoteValues?: boolean;
        raw?: boolean;
        readConcern?: ReadConcernLike;
        readPreference?: ReadPreferenceLike;
        retryWrites?: boolean;
        serializeFunctions?: boolean;
        session?: ClientSession;
        size?: number;
        storageEngine?: Document;
        timeoutMS?: number;
        timeseries?: TimeSeriesCollectionOptions;
        useBigInt64?: boolean;
        validationAction?: string;
        validationLevel?: string;
        validator?: Document;
        viewOn?: string;
        willRetryWrite?: boolean;
        writeConcern?: WriteConcern | WriteConcernSettings;
    }

    Hierarchy

    Properties

    authdb? +CreateCollectionOptions | mongodb

    Interface CreateCollectionOptions

    interface CreateCollectionOptions {
        authdb?: string;
        autoIndexId?: boolean;
        bsonRegExp?: boolean;
        capped?: boolean;
        changeStreamPreAndPostImages?: {
            enabled: boolean;
        };
        checkKeys?: boolean;
        clusteredIndex?: ClusteredCollectionOptions;
        collation?: CollationOptions;
        comment?: unknown;
        dbName?: string;
        enableUtf8Validation?: boolean;
        encryptedFields?: Document;
        expireAfterSeconds?: number;
        explain?: ExplainVerbosityLike | ExplainCommandOptions;
        fieldsAsRaw?: Document;
        flags?: number;
        ignoreUndefined?: boolean;
        indexOptionDefaults?: Document;
        max?: number;
        maxTimeMS?: number;
        noResponse?: boolean;
        pipeline?: Document[];
        pkFactory?: PkFactory;
        promoteBuffers?: boolean;
        promoteLongs?: boolean;
        promoteValues?: boolean;
        raw?: boolean;
        readConcern?: ReadConcernLike;
        readPreference?: ReadPreferenceLike;
        retryWrites?: boolean;
        serializeFunctions?: boolean;
        session?: ClientSession;
        size?: number;
        storageEngine?: Document;
        timeoutMS?: number;
        timeseries?: TimeSeriesCollectionOptions;
        useBigInt64?: boolean;
        validationAction?: string;
        validationLevel?: string;
        validator?: Document;
        viewOn?: string;
        willRetryWrite?: boolean;
        writeConcern?: WriteConcern | WriteConcernSettings;
    }

    Hierarchy

    Properties

    authdb?: string
    autoIndexId?: boolean

    Create an index on the _id field of the document. This option is deprecated in MongoDB 3.2+ and will be removed once no longer supported by the server.

    -
    bsonRegExp?: boolean

    return BSON regular expressions as BSONRegExp instances.

    +

    Properties

    authdb?: string
    autoIndexId?: boolean

    Create an index on the _id field of the document. This option is deprecated in MongoDB 3.2+ and will be removed once no longer supported by the server.

    +
    bsonRegExp?: boolean

    return BSON regular expressions as BSONRegExp instances.

    false

    capped?: boolean

    Create a capped collection

    -
    changeStreamPreAndPostImages?: {
        enabled: boolean;
    }

    If set, enables pre-update and post-update document events to be included for any +

    changeStreamPreAndPostImages?: {
        enabled: boolean;
    }

    If set, enables pre-update and post-update document events to be included for any change streams that listen on this collection.

    -
    checkKeys?: boolean

    the serializer will check if keys are valid.

    +
    checkKeys?: boolean

    the serializer will check if keys are valid.

    false

    A document specifying configuration options for clustered collections. For MongoDB 5.3 and above.

    -
    collation?: CollationOptions

    Collation

    -
    comment?: unknown

    Comment to apply to the operation.

    +
    collation?: CollationOptions

    Collation

    +
    comment?: unknown

    Comment to apply to the operation.

    In server versions pre-4.4, 'comment' must be string. A server error will be thrown if any other type is provided.

    In server versions 4.4 and above, 'comment' can be any valid BSON type.

    -
    dbName?: string
    enableUtf8Validation?: boolean

    Enable utf8 validation when deserializing BSON documents. Defaults to true.

    -
    encryptedFields?: Document
    expireAfterSeconds?: number

    The number of seconds after which a document in a timeseries or clustered collection expires.

    -

    Specifies the verbosity mode for the explain output.

    -
    fieldsAsRaw?: Document

    allow to specify if there what fields we wish to return as unserialized raw buffer.

    +
    dbName?: string
    enableUtf8Validation?: boolean

    Enable utf8 validation when deserializing BSON documents. Defaults to true.

    +
    encryptedFields?: Document
    expireAfterSeconds?: number

    The number of seconds after which a document in a timeseries or clustered collection expires.

    +

    Specifies the verbosity mode for the explain output.

    +
    fieldsAsRaw?: Document

    allow to specify if there what fields we wish to return as unserialized raw buffer.

    null

    flags?: number

    Available for the MMAPv1 storage engine only to set the usePowerOf2Sizes and the noPadding flag

    -
    ignoreUndefined?: boolean

    serialize will not emit undefined fields +

    ignoreUndefined?: boolean

    serialize will not emit undefined fields note that the driver sets this to false

    true

    indexOptionDefaults?: Document

    Allows users to specify a default configuration for indexes when creating a collection

    -
    max?: number

    The maximum number of documents in the capped collection

    -
    maxTimeMS?: number

    maxTimeMS is a server-side time limit in milliseconds for processing an operation.

    -
    noResponse?: boolean

    This option is deprecated and will be removed in an upcoming major version.

    -
    pipeline?: Document[]

    An array that consists of the aggregation pipeline stage. Creates the view by applying the specified pipeline to the viewOn collection or view

    -
    pkFactory?: PkFactory

    A primary key factory function for generation of custom _id keys.

    -
    promoteBuffers?: boolean

    when deserializing a Binary will return it as a node.js Buffer instance.

    +
    max?: number

    The maximum number of documents in the capped collection

    +
    maxTimeMS?: number

    maxTimeMS is a server-side time limit in milliseconds for processing an operation.

    +
    noResponse?: boolean

    This option is deprecated and will be removed in an upcoming major version.

    +
    pipeline?: Document[]

    An array that consists of the aggregation pipeline stage. Creates the view by applying the specified pipeline to the viewOn collection or view

    +
    pkFactory?: PkFactory

    A primary key factory function for generation of custom _id keys.

    +
    promoteBuffers?: boolean

    when deserializing a Binary will return it as a node.js Buffer instance.

    false

    promoteLongs?: boolean

    when deserializing a Long will fit it into a Number if it's smaller than 53 bits.

    true

    @@ -87,22 +87,22 @@

    Please note there is a known limitation where this option cannot be used at the MongoClient level (see NODE-3946). It does correctly work at Db, Collection, and per operation the same as other BSON options work.

    -
    readConcern?: ReadConcernLike

    Specify a read concern and level for the collection. (only MongoDB 3.2 or higher supported)

    -
    readPreference?: ReadPreferenceLike

    The preferred read preference (ReadPreference.primary, ReadPreference.primary_preferred, ReadPreference.secondary, ReadPreference.secondary_preferred, ReadPreference.nearest).

    -
    retryWrites?: boolean

    This option is deprecated and will be removed in a future release as it is not used +

    readConcern?: ReadConcernLike

    Specify a read concern and level for the collection. (only MongoDB 3.2 or higher supported)

    +
    readPreference?: ReadPreferenceLike

    The preferred read preference (ReadPreference.primary, ReadPreference.primary_preferred, ReadPreference.secondary, ReadPreference.secondary_preferred, ReadPreference.nearest).

    +
    retryWrites?: boolean

    This option is deprecated and will be removed in a future release as it is not used in the driver. Use MongoClientOptions or connection string parameters instead.

    -
    serializeFunctions?: boolean

    serialize the javascript functions

    +
    serializeFunctions?: boolean

    serialize the javascript functions

    false

    session?: ClientSession

    Specify ClientSession for this command

    -
    size?: number

    The size of the capped collection in bytes

    -
    storageEngine?: Document

    Allows users to specify configuration to the storage engine on a per-collection basis when creating a collection

    -
    timeoutMS?: number

    Specifies the time an operation will run until it throws a timeout error

    -

    A document specifying configuration options for timeseries collections.

    -
    useBigInt64?: boolean

    when deserializing a Long return as a BigInt.

    +
    size?: number

    The size of the capped collection in bytes

    +
    storageEngine?: Document

    Allows users to specify configuration to the storage engine on a per-collection basis when creating a collection

    +
    timeoutMS?: number

    Specifies the time an operation will run until it throws a timeout error

    +

    A document specifying configuration options for timeseries collections.

    +
    useBigInt64?: boolean

    when deserializing a Long return as a BigInt.

    false

    validationAction?: string

    Determines whether to error on invalid documents or just warn about the violations but allow invalid documents to be inserted

    -
    validationLevel?: string

    Determines how strictly MongoDB applies the validation rules to existing documents during an update

    -
    validator?: Document

    Allows users to specify validation rules or expressions for the collection. For more information, see Document Validation

    -
    viewOn?: string

    The name of the source collection or view from which to create the view. The name is not the full namespace of the collection or view (i.e., does not include the database name and implies the same database as the view to create)

    -
    willRetryWrite?: boolean

    Write Concern as an object

    -
    +
    validationLevel?: string

    Determines how strictly MongoDB applies the validation rules to existing documents during an update

    +
    validator?: Document

    Allows users to specify validation rules or expressions for the collection. For more information, see Document Validation

    +
    viewOn?: string

    The name of the source collection or view from which to create the view. The name is not the full namespace of the collection or view (i.e., does not include the database name and implies the same database as the view to create)

    +
    willRetryWrite?: boolean

    Write Concern as an object

    +
    diff --git a/docs/Next/interfaces/CreateIndexesOptions.html b/docs/Next/interfaces/CreateIndexesOptions.html index f94ba99f0eb..81efe53f185 100644 --- a/docs/Next/interfaces/CreateIndexesOptions.html +++ b/docs/Next/interfaces/CreateIndexesOptions.html @@ -1,4 +1,4 @@ -CreateIndexesOptions | mongodb

    Interface CreateIndexesOptions

    interface CreateIndexesOptions {
        2dsphereIndexVersion?: number;
        authdb?: string;
        background?: boolean;
        bits?: number;
        bsonRegExp?: boolean;
        bucketSize?: number;
        checkKeys?: boolean;
        collation?: CollationOptions;
        comment?: unknown;
        commitQuorum?: string | number;
        dbName?: string;
        default_language?: string;
        enableUtf8Validation?: boolean;
        expireAfterSeconds?: number;
        explain?: ExplainVerbosityLike | ExplainCommandOptions;
        fieldsAsRaw?: Document;
        hidden?: boolean;
        ignoreUndefined?: boolean;
        language_override?: string;
        max?: number;
        maxTimeMS?: number;
        min?: number;
        name?: string;
        noResponse?: boolean;
        partialFilterExpression?: Document;
        promoteBuffers?: boolean;
        promoteLongs?: boolean;
        promoteValues?: boolean;
        raw?: boolean;
        readConcern?: ReadConcernLike;
        readPreference?: ReadPreferenceLike;
        retryWrites?: boolean;
        serializeFunctions?: boolean;
        session?: ClientSession;
        sparse?: boolean;
        storageEngine?: Document;
        textIndexVersion?: number;
        timeoutMS?: number;
        unique?: boolean;
        useBigInt64?: boolean;
        version?: number;
        weights?: Document;
        wildcardProjection?: Document;
        willRetryWrite?: boolean;
    }

    Hierarchy

    Properties

    2dsphereIndexVersion? +CreateIndexesOptions | mongodb

    Interface CreateIndexesOptions

    interface CreateIndexesOptions {
        2dsphereIndexVersion?: number;
        authdb?: string;
        background?: boolean;
        bits?: number;
        bsonRegExp?: boolean;
        bucketSize?: number;
        checkKeys?: boolean;
        collation?: CollationOptions;
        comment?: unknown;
        commitQuorum?: string | number;
        dbName?: string;
        default_language?: string;
        enableUtf8Validation?: boolean;
        expireAfterSeconds?: number;
        explain?: ExplainVerbosityLike | ExplainCommandOptions;
        fieldsAsRaw?: Document;
        hidden?: boolean;
        ignoreUndefined?: boolean;
        language_override?: string;
        max?: number;
        maxTimeMS?: number;
        min?: number;
        name?: string;
        noResponse?: boolean;
        partialFilterExpression?: Document;
        promoteBuffers?: boolean;
        promoteLongs?: boolean;
        promoteValues?: boolean;
        raw?: boolean;
        readConcern?: ReadConcernLike;
        readPreference?: ReadPreferenceLike;
        retryWrites?: boolean;
        serializeFunctions?: boolean;
        session?: ClientSession;
        sparse?: boolean;
        storageEngine?: Document;
        textIndexVersion?: number;
        timeoutMS?: number;
        unique?: boolean;
        useBigInt64?: boolean;
        version?: number;
        weights?: Document;
        wildcardProjection?: Document;
        willRetryWrite?: boolean;
    }

    Hierarchy

    Properties

    2dsphereIndexVersion?: number
    authdb?: string
    background?: boolean

    Creates the index in the background, yielding whenever possible.

    -
    bits?: number
    bsonRegExp?: boolean

    return BSON regular expressions as BSONRegExp instances.

    +

    Properties

    2dsphereIndexVersion?: number
    authdb?: string
    background?: boolean

    Creates the index in the background, yielding whenever possible.

    +
    bits?: number
    bsonRegExp?: boolean

    return BSON regular expressions as BSONRegExp instances.

    false

    -
    bucketSize?: number
    checkKeys?: boolean

    the serializer will check if keys are valid.

    +
    bucketSize?: number
    checkKeys?: boolean

    the serializer will check if keys are valid.

    false

    collation?: CollationOptions

    Collation

    -
    comment?: unknown

    Comment to apply to the operation.

    +
    comment?: unknown

    Comment to apply to the operation.

    In server versions pre-4.4, 'comment' must be string. A server error will be thrown if any other type is provided.

    In server versions 4.4 and above, 'comment' can be any valid BSON type.

    -
    commitQuorum?: string | number

    (MongoDB 4.4. or higher) Specifies how many data-bearing members of a replica set, including the primary, must complete the index builds successfully before the primary marks the indexes as ready. This option accepts the same values for the "w" field in a write concern plus "votingMembers", which indicates all voting data-bearing nodes.

    -
    dbName?: string
    default_language?: string
    enableUtf8Validation?: boolean

    Enable utf8 validation when deserializing BSON documents. Defaults to true.

    -
    expireAfterSeconds?: number

    Allows you to expire data on indexes applied to a data (MongoDB 2.2 or higher)

    -

    Specifies the verbosity mode for the explain output.

    -
    fieldsAsRaw?: Document

    allow to specify if there what fields we wish to return as unserialized raw buffer.

    +
    commitQuorum?: string | number

    (MongoDB 4.4. or higher) Specifies how many data-bearing members of a replica set, including the primary, must complete the index builds successfully before the primary marks the indexes as ready. This option accepts the same values for the "w" field in a write concern plus "votingMembers", which indicates all voting data-bearing nodes.

    +
    dbName?: string
    default_language?: string
    enableUtf8Validation?: boolean

    Enable utf8 validation when deserializing BSON documents. Defaults to true.

    +
    expireAfterSeconds?: number

    Allows you to expire data on indexes applied to a data (MongoDB 2.2 or higher)

    +

    Specifies the verbosity mode for the explain output.

    +
    fieldsAsRaw?: Document

    allow to specify if there what fields we wish to return as unserialized raw buffer.

    null

    hidden?: boolean

    Specifies that the index should exist on the target collection but should not be used by the query planner when executing operations. (MongoDB 4.4 or higher)

    -
    ignoreUndefined?: boolean

    serialize will not emit undefined fields +

    ignoreUndefined?: boolean

    serialize will not emit undefined fields note that the driver sets this to false

    true

    -
    language_override?: string
    max?: number

    For geospatial indexes set the high bound for the co-ordinates.

    -
    maxTimeMS?: number

    maxTimeMS is a server-side time limit in milliseconds for processing an operation.

    -
    min?: number

    For geospatial indexes set the lower bound for the co-ordinates.

    -
    name?: string

    Override the autogenerated index name (useful if the resulting name is larger than 128 bytes)

    -
    noResponse?: boolean

    This option is deprecated and will be removed in an upcoming major version.

    -
    partialFilterExpression?: Document

    Creates a partial index based on the given filter object (MongoDB 3.2 or higher)

    -
    promoteBuffers?: boolean

    when deserializing a Binary will return it as a node.js Buffer instance.

    +
    language_override?: string
    max?: number

    For geospatial indexes set the high bound for the co-ordinates.

    +
    maxTimeMS?: number

    maxTimeMS is a server-side time limit in milliseconds for processing an operation.

    +
    min?: number

    For geospatial indexes set the lower bound for the co-ordinates.

    +
    name?: string

    Override the autogenerated index name (useful if the resulting name is larger than 128 bytes)

    +
    noResponse?: boolean

    This option is deprecated and will be removed in an upcoming major version.

    +
    partialFilterExpression?: Document

    Creates a partial index based on the given filter object (MongoDB 3.2 or higher)

    +
    promoteBuffers?: boolean

    when deserializing a Binary will return it as a node.js Buffer instance.

    false

    promoteLongs?: boolean

    when deserializing a Long will fit it into a Number if it's smaller than 53 bits.

    true

    @@ -85,18 +85,18 @@

    Please note there is a known limitation where this option cannot be used at the MongoClient level (see NODE-3946). It does correctly work at Db, Collection, and per operation the same as other BSON options work.

    -
    readConcern?: ReadConcernLike

    Specify a read concern and level for the collection. (only MongoDB 3.2 or higher supported)

    -
    readPreference?: ReadPreferenceLike

    The preferred read preference (ReadPreference.primary, ReadPreference.primary_preferred, ReadPreference.secondary, ReadPreference.secondary_preferred, ReadPreference.nearest).

    -
    retryWrites?: boolean

    This option is deprecated and will be removed in a future release as it is not used +

    readConcern?: ReadConcernLike

    Specify a read concern and level for the collection. (only MongoDB 3.2 or higher supported)

    +
    readPreference?: ReadPreferenceLike

    The preferred read preference (ReadPreference.primary, ReadPreference.primary_preferred, ReadPreference.secondary, ReadPreference.secondary_preferred, ReadPreference.nearest).

    +
    retryWrites?: boolean

    This option is deprecated and will be removed in a future release as it is not used in the driver. Use MongoClientOptions or connection string parameters instead.

    -
    serializeFunctions?: boolean

    serialize the javascript functions

    +
    serializeFunctions?: boolean

    serialize the javascript functions

    false

    session?: ClientSession

    Specify ClientSession for this command

    -
    sparse?: boolean

    Creates a sparse index.

    -
    storageEngine?: Document

    Allows users to configure the storage engine on a per-index basis when creating an index. (MongoDB 3.0 or higher)

    -
    textIndexVersion?: number
    timeoutMS?: number

    Specifies the time an operation will run until it throws a timeout error

    -
    unique?: boolean

    Creates an unique index.

    -
    useBigInt64?: boolean

    when deserializing a Long return as a BigInt.

    +
    sparse?: boolean

    Creates a sparse index.

    +
    storageEngine?: Document

    Allows users to configure the storage engine on a per-index basis when creating an index. (MongoDB 3.0 or higher)

    +
    textIndexVersion?: number
    timeoutMS?: number

    Specifies the time an operation will run until it throws a timeout error

    +
    unique?: boolean

    Creates an unique index.

    +
    useBigInt64?: boolean

    when deserializing a Long return as a BigInt.

    false

    version?: number

    Specifies the index version number, either 0 or 1.

    -
    weights?: Document
    wildcardProjection?: Document
    willRetryWrite?: boolean
    +
    weights?: Document
    wildcardProjection?: Document
    willRetryWrite?: boolean
    diff --git a/docs/Next/interfaces/CredentialProviders.html b/docs/Next/interfaces/CredentialProviders.html index acf887ddef9..24d6ff79616 100644 --- a/docs/Next/interfaces/CredentialProviders.html +++ b/docs/Next/interfaces/CredentialProviders.html @@ -1,3 +1,3 @@ CredentialProviders | mongodb

    Interface CredentialProviders

    Configuration options for custom credential providers for KMS requests.

    -
    interface CredentialProviders {
        aws?: AWSCredentialProvider;
    }

    Properties

    Properties

    +
    interface CredentialProviders {
        aws?: AWSCredentialProvider;
    }

    Properties

    Properties

    diff --git a/docs/Next/interfaces/CursorStreamOptions.html b/docs/Next/interfaces/CursorStreamOptions.html index 145352abe11..0687d84a3d4 100644 --- a/docs/Next/interfaces/CursorStreamOptions.html +++ b/docs/Next/interfaces/CursorStreamOptions.html @@ -1,3 +1,3 @@ -CursorStreamOptions | mongodb

    Interface CursorStreamOptions

    interface CursorStreamOptions {
        transform?(this: void, doc: Document): Document;
    }

    Methods

    transform? +CursorStreamOptions | mongodb

    Interface CursorStreamOptions

    interface CursorStreamOptions {
        transform?(this: void, doc: Document): Document;
    }

    Methods

    Methods

    +

    Parameters

    Returns Document

    diff --git a/docs/Next/interfaces/DataKey.html b/docs/Next/interfaces/DataKey.html index a864400c36e..b848180a35e 100644 --- a/docs/Next/interfaces/DataKey.html +++ b/docs/Next/interfaces/DataKey.html @@ -1,5 +1,5 @@ DataKey | mongodb

    Interface DataKey

    The schema for a DataKey in the key vault collection.

    -
    interface DataKey {
        _id: UUID;
        creationDate: Date;
        keyAltNames?: string[];
        keyMaterial: Binary;
        masterKey: Document;
        status: number;
        updateDate: Date;
        version?: number;
    }

    Properties

    _id +
    interface DataKey {
        _id: UUID;
        creationDate: Date;
        keyAltNames?: string[];
        keyMaterial: Binary;
        masterKey: Document;
        status: number;
        updateDate: Date;
        version?: number;
    }

    Properties

    _id: UUID
    creationDate: Date
    keyAltNames?: string[]
    keyMaterial: Binary
    masterKey: Document
    status: number
    updateDate: Date
    version?: number
    +

    Properties

    _id: UUID
    creationDate: Date
    keyAltNames?: string[]
    keyMaterial: Binary
    masterKey: Document
    status: number
    updateDate: Date
    version?: number
    diff --git a/docs/Next/interfaces/DbOptions.html b/docs/Next/interfaces/DbOptions.html index 9824536ac4b..7f3bb400ab5 100644 --- a/docs/Next/interfaces/DbOptions.html +++ b/docs/Next/interfaces/DbOptions.html @@ -1,4 +1,4 @@ -DbOptions | mongodb

    Interface DbOptions

    interface DbOptions {
        authSource?: string;
        bsonRegExp?: boolean;
        checkKeys?: boolean;
        enableUtf8Validation?: boolean;
        fieldsAsRaw?: Document;
        forceServerObjectId?: boolean;
        ignoreUndefined?: boolean;
        pkFactory?: PkFactory;
        promoteBuffers?: boolean;
        promoteLongs?: boolean;
        promoteValues?: boolean;
        raw?: boolean;
        readConcern?: ReadConcern;
        readPreference?: ReadPreferenceLike;
        retryWrites?: boolean;
        serializeFunctions?: boolean;
        timeoutMS?: number;
        useBigInt64?: boolean;
        writeConcern?: WriteConcern | WriteConcernSettings;
    }

    Hierarchy (view full)

    Properties

    authSource? +DbOptions | mongodb

    Interface DbOptions

    interface DbOptions {
        authSource?: string;
        bsonRegExp?: boolean;
        checkKeys?: boolean;
        enableUtf8Validation?: boolean;
        fieldsAsRaw?: Document;
        forceServerObjectId?: boolean;
        ignoreUndefined?: boolean;
        pkFactory?: PkFactory;
        promoteBuffers?: boolean;
        promoteLongs?: boolean;
        promoteValues?: boolean;
        raw?: boolean;
        readConcern?: ReadConcern;
        readPreference?: ReadPreferenceLike;
        retryWrites?: boolean;
        serializeFunctions?: boolean;
        timeoutMS?: number;
        useBigInt64?: boolean;
        writeConcern?: WriteConcern | WriteConcernSettings;
    }

    Hierarchy (view full)

    Properties

    authSource?: string

    If the database authentication is dependent on another databaseName.

    -
    bsonRegExp?: boolean

    return BSON regular expressions as BSONRegExp instances.

    +
    bsonRegExp?: boolean

    return BSON regular expressions as BSONRegExp instances.

    false

    checkKeys?: boolean

    the serializer will check if keys are valid.

    false

    enableUtf8Validation?: boolean

    Enable utf8 validation when deserializing BSON documents. Defaults to true.

    -
    fieldsAsRaw?: Document

    allow to specify if there what fields we wish to return as unserialized raw buffer.

    +
    fieldsAsRaw?: Document

    allow to specify if there what fields we wish to return as unserialized raw buffer.

    null

    forceServerObjectId?: boolean

    Force server to assign _id values instead of driver.

    -
    ignoreUndefined?: boolean

    serialize will not emit undefined fields +

    ignoreUndefined?: boolean

    serialize will not emit undefined fields note that the driver sets this to false

    true

    pkFactory?: PkFactory

    A primary key factory object for generation of custom _id keys.

    -
    promoteBuffers?: boolean

    when deserializing a Binary will return it as a node.js Buffer instance.

    +
    promoteBuffers?: boolean

    when deserializing a Binary will return it as a node.js Buffer instance.

    false

    promoteLongs?: boolean

    when deserializing a Long will fit it into a Number if it's smaller than 53 bits.

    true

    @@ -47,13 +47,13 @@

    Please note there is a known limitation where this option cannot be used at the MongoClient level (see NODE-3946). It does correctly work at Db, Collection, and per operation the same as other BSON options work.

    -
    readConcern?: ReadConcern

    Specify a read concern for the collection. (only MongoDB 3.2 or higher supported)

    -
    readPreference?: ReadPreferenceLike

    The preferred read preference (ReadPreference.PRIMARY, ReadPreference.PRIMARY_PREFERRED, ReadPreference.SECONDARY, ReadPreference.SECONDARY_PREFERRED, ReadPreference.NEAREST).

    -
    retryWrites?: boolean

    Should retry failed writes

    -
    serializeFunctions?: boolean

    serialize the javascript functions

    +
    readConcern?: ReadConcern

    Specify a read concern for the collection. (only MongoDB 3.2 or higher supported)

    +
    readPreference?: ReadPreferenceLike

    The preferred read preference (ReadPreference.PRIMARY, ReadPreference.PRIMARY_PREFERRED, ReadPreference.SECONDARY, ReadPreference.SECONDARY_PREFERRED, ReadPreference.NEAREST).

    +
    retryWrites?: boolean

    Should retry failed writes

    +
    serializeFunctions?: boolean

    serialize the javascript functions

    false

    timeoutMS?: number

    Specifies the time an operation will run until it throws a timeout error

    -
    useBigInt64?: boolean

    when deserializing a Long return as a BigInt.

    +
    useBigInt64?: boolean

    when deserializing a Long return as a BigInt.

    false

    Write Concern as an object

    -
    +
    diff --git a/docs/Next/interfaces/DbStatsOptions.html b/docs/Next/interfaces/DbStatsOptions.html index 9d3a52b128b..e8a1d500134 100644 --- a/docs/Next/interfaces/DbStatsOptions.html +++ b/docs/Next/interfaces/DbStatsOptions.html @@ -1,4 +1,4 @@ -DbStatsOptions | mongodb

    Interface DbStatsOptions

    interface DbStatsOptions {
        authdb?: string;
        bsonRegExp?: boolean;
        checkKeys?: boolean;
        collation?: CollationOptions;
        comment?: unknown;
        dbName?: string;
        enableUtf8Validation?: boolean;
        explain?: ExplainVerbosityLike | ExplainCommandOptions;
        fieldsAsRaw?: Document;
        ignoreUndefined?: boolean;
        maxTimeMS?: number;
        noResponse?: boolean;
        promoteBuffers?: boolean;
        promoteLongs?: boolean;
        promoteValues?: boolean;
        raw?: boolean;
        readConcern?: ReadConcernLike;
        readPreference?: ReadPreferenceLike;
        retryWrites?: boolean;
        scale?: number;
        serializeFunctions?: boolean;
        session?: ClientSession;
        timeoutMS?: number;
        useBigInt64?: boolean;
        willRetryWrite?: boolean;
        writeConcern?: WriteConcern | WriteConcernSettings;
    }

    Hierarchy

    Properties

    authdb? +DbStatsOptions | mongodb

    Interface DbStatsOptions

    interface DbStatsOptions {
        authdb?: string;
        bsonRegExp?: boolean;
        checkKeys?: boolean;
        collation?: CollationOptions;
        comment?: unknown;
        dbName?: string;
        enableUtf8Validation?: boolean;
        explain?: ExplainVerbosityLike | ExplainCommandOptions;
        fieldsAsRaw?: Document;
        ignoreUndefined?: boolean;
        maxTimeMS?: number;
        noResponse?: boolean;
        promoteBuffers?: boolean;
        promoteLongs?: boolean;
        promoteValues?: boolean;
        raw?: boolean;
        readConcern?: ReadConcernLike;
        readPreference?: ReadPreferenceLike;
        retryWrites?: boolean;
        scale?: number;
        serializeFunctions?: boolean;
        session?: ClientSession;
        timeoutMS?: number;
        useBigInt64?: boolean;
        willRetryWrite?: boolean;
        writeConcern?: WriteConcern | WriteConcernSettings;
    }

    Hierarchy

    Properties

    authdb?: string
    bsonRegExp?: boolean

    return BSON regular expressions as BSONRegExp instances.

    +

    Properties

    authdb?: string
    bsonRegExp?: boolean

    return BSON regular expressions as BSONRegExp instances.

    false

    checkKeys?: boolean

    the serializer will check if keys are valid.

    false

    collation?: CollationOptions

    Collation

    -
    comment?: unknown

    Comment to apply to the operation.

    +
    comment?: unknown

    Comment to apply to the operation.

    In server versions pre-4.4, 'comment' must be string. A server error will be thrown if any other type is provided.

    In server versions 4.4 and above, 'comment' can be any valid BSON type.

    -
    dbName?: string
    enableUtf8Validation?: boolean

    Enable utf8 validation when deserializing BSON documents. Defaults to true.

    -

    Specifies the verbosity mode for the explain output.

    -
    fieldsAsRaw?: Document

    allow to specify if there what fields we wish to return as unserialized raw buffer.

    +
    dbName?: string
    enableUtf8Validation?: boolean

    Enable utf8 validation when deserializing BSON documents. Defaults to true.

    +

    Specifies the verbosity mode for the explain output.

    +
    fieldsAsRaw?: Document

    allow to specify if there what fields we wish to return as unserialized raw buffer.

    null

    ignoreUndefined?: boolean

    serialize will not emit undefined fields note that the driver sets this to false

    true

    maxTimeMS?: number

    maxTimeMS is a server-side time limit in milliseconds for processing an operation.

    -
    noResponse?: boolean

    This option is deprecated and will be removed in an upcoming major version.

    -
    promoteBuffers?: boolean

    when deserializing a Binary will return it as a node.js Buffer instance.

    +
    noResponse?: boolean

    This option is deprecated and will be removed in an upcoming major version.

    +
    promoteBuffers?: boolean

    when deserializing a Binary will return it as a node.js Buffer instance.

    false

    promoteLongs?: boolean

    when deserializing a Long will fit it into a Number if it's smaller than 53 bits.

    true

    @@ -59,16 +59,16 @@

    Please note there is a known limitation where this option cannot be used at the MongoClient level (see NODE-3946). It does correctly work at Db, Collection, and per operation the same as other BSON options work.

    -
    readConcern?: ReadConcernLike

    Specify a read concern and level for the collection. (only MongoDB 3.2 or higher supported)

    -
    readPreference?: ReadPreferenceLike

    The preferred read preference (ReadPreference.primary, ReadPreference.primary_preferred, ReadPreference.secondary, ReadPreference.secondary_preferred, ReadPreference.nearest).

    -
    retryWrites?: boolean

    This option is deprecated and will be removed in a future release as it is not used +

    readConcern?: ReadConcernLike

    Specify a read concern and level for the collection. (only MongoDB 3.2 or higher supported)

    +
    readPreference?: ReadPreferenceLike

    The preferred read preference (ReadPreference.primary, ReadPreference.primary_preferred, ReadPreference.secondary, ReadPreference.secondary_preferred, ReadPreference.nearest).

    +
    retryWrites?: boolean

    This option is deprecated and will be removed in a future release as it is not used in the driver. Use MongoClientOptions or connection string parameters instead.

    -
    scale?: number

    Divide the returned sizes by scale value.

    -
    serializeFunctions?: boolean

    serialize the javascript functions

    +
    scale?: number

    Divide the returned sizes by scale value.

    +
    serializeFunctions?: boolean

    serialize the javascript functions

    false

    session?: ClientSession

    Specify ClientSession for this command

    -
    timeoutMS?: number

    Specifies the time an operation will run until it throws a timeout error

    -
    useBigInt64?: boolean

    when deserializing a Long return as a BigInt.

    +
    timeoutMS?: number

    Specifies the time an operation will run until it throws a timeout error

    +
    useBigInt64?: boolean

    when deserializing a Long return as a BigInt.

    false

    -
    willRetryWrite?: boolean

    Write Concern as an object

    -
    +
    willRetryWrite?: boolean

    Write Concern as an object

    +
    diff --git a/docs/Next/interfaces/DeleteManyModel.html b/docs/Next/interfaces/DeleteManyModel.html index 506ec434a92..aadf011b238 100644 --- a/docs/Next/interfaces/DeleteManyModel.html +++ b/docs/Next/interfaces/DeleteManyModel.html @@ -1,7 +1,7 @@ -DeleteManyModel | mongodb

    Interface DeleteManyModel<TSchema>

    interface DeleteManyModel<TSchema> {
        collation?: CollationOptions;
        filter: Filter<TSchema>;
        hint?: Hint;
    }

    Type Parameters

    Properties

    collation? +DeleteManyModel | mongodb

    Interface DeleteManyModel<TSchema>

    interface DeleteManyModel<TSchema> {
        collation?: CollationOptions;
        filter: Filter<TSchema>;
        hint?: Hint;
    }

    Type Parameters

    Properties

    collation?: CollationOptions

    Specifies a collation.

    -
    filter: Filter<TSchema>

    The filter to limit the deleted documents.

    -
    hint?: Hint

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

    -
    +
    filter: Filter<TSchema>

    The filter to limit the deleted documents.

    +
    hint?: Hint

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

    +
    diff --git a/docs/Next/interfaces/DeleteOneModel.html b/docs/Next/interfaces/DeleteOneModel.html index cec811dd159..d3d031b5dae 100644 --- a/docs/Next/interfaces/DeleteOneModel.html +++ b/docs/Next/interfaces/DeleteOneModel.html @@ -1,7 +1,7 @@ -DeleteOneModel | mongodb

    Interface DeleteOneModel<TSchema>

    interface DeleteOneModel<TSchema> {
        collation?: CollationOptions;
        filter: Filter<TSchema>;
        hint?: Hint;
    }

    Type Parameters

    Properties

    collation? +DeleteOneModel | mongodb

    Interface DeleteOneModel<TSchema>

    interface DeleteOneModel<TSchema> {
        collation?: CollationOptions;
        filter: Filter<TSchema>;
        hint?: Hint;
    }

    Type Parameters

    Properties

    collation?: CollationOptions

    Specifies a collation.

    -
    filter: Filter<TSchema>

    The filter to limit the deleted documents.

    -
    hint?: Hint

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

    -
    +
    filter: Filter<TSchema>

    The filter to limit the deleted documents.

    +
    hint?: Hint

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

    +
    diff --git a/docs/Next/interfaces/DeleteOptions.html b/docs/Next/interfaces/DeleteOptions.html index 1ad7cc60c52..ea3c52503cc 100644 --- a/docs/Next/interfaces/DeleteOptions.html +++ b/docs/Next/interfaces/DeleteOptions.html @@ -1,4 +1,4 @@ -DeleteOptions | mongodb

    Interface DeleteOptions

    interface DeleteOptions {
        authdb?: string;
        bsonRegExp?: boolean;
        checkKeys?: boolean;
        collation?: CollationOptions;
        comment?: unknown;
        dbName?: string;
        enableUtf8Validation?: boolean;
        explain?: ExplainVerbosityLike | ExplainCommandOptions;
        fieldsAsRaw?: Document;
        hint?: string | Document;
        ignoreUndefined?: boolean;
        let?: Document;
        maxTimeMS?: number;
        noResponse?: boolean;
        ordered?: boolean;
        promoteBuffers?: boolean;
        promoteLongs?: boolean;
        promoteValues?: boolean;
        raw?: boolean;
        readConcern?: ReadConcernLike;
        readPreference?: ReadPreferenceLike;
        retryWrites?: boolean;
        serializeFunctions?: boolean;
        session?: ClientSession;
        timeoutMS?: number;
        useBigInt64?: boolean;
        willRetryWrite?: boolean;
        writeConcern?: WriteConcern | WriteConcernSettings;
    }

    Hierarchy (view full)

    Properties

    authdb? +DeleteOptions | mongodb

    Interface DeleteOptions

    interface DeleteOptions {
        authdb?: string;
        bsonRegExp?: boolean;
        checkKeys?: boolean;
        collation?: CollationOptions;
        comment?: unknown;
        dbName?: string;
        enableUtf8Validation?: boolean;
        explain?: ExplainVerbosityLike | ExplainCommandOptions;
        fieldsAsRaw?: Document;
        hint?: string | Document;
        ignoreUndefined?: boolean;
        let?: Document;
        maxTimeMS?: number;
        noResponse?: boolean;
        ordered?: boolean;
        promoteBuffers?: boolean;
        promoteLongs?: boolean;
        promoteValues?: boolean;
        raw?: boolean;
        readConcern?: ReadConcernLike;
        readPreference?: ReadPreferenceLike;
        retryWrites?: boolean;
        serializeFunctions?: boolean;
        session?: ClientSession;
        timeoutMS?: number;
        useBigInt64?: boolean;
        willRetryWrite?: boolean;
        writeConcern?: WriteConcern | WriteConcernSettings;
    }

    Hierarchy (view full)

    Properties

    authdb?: string
    bsonRegExp?: boolean

    return BSON regular expressions as BSONRegExp instances.

    +

    Properties

    authdb?: string
    bsonRegExp?: boolean

    return BSON regular expressions as BSONRegExp instances.

    false

    checkKeys?: boolean

    the serializer will check if keys are valid.

    false

    collation?: CollationOptions

    Specifies the collation to use for the operation

    -
    comment?: unknown

    Comment to apply to the operation.

    +
    comment?: unknown

    Comment to apply to the operation.

    In server versions pre-4.4, 'comment' must be string. A server error will be thrown if any other type is provided.

    In server versions 4.4 and above, 'comment' can be any valid BSON type.

    -
    dbName?: string
    enableUtf8Validation?: boolean

    Enable utf8 validation when deserializing BSON documents. Defaults to true.

    -

    Specifies the verbosity mode for the explain output.

    -
    fieldsAsRaw?: Document

    allow to specify if there what fields we wish to return as unserialized raw buffer.

    +
    dbName?: string
    enableUtf8Validation?: boolean

    Enable utf8 validation when deserializing BSON documents. Defaults to true.

    +

    Specifies the verbosity mode for the explain output.

    +
    fieldsAsRaw?: Document

    allow to specify if there what fields we wish to return as unserialized raw buffer.

    null

    hint?: string | Document

    Specify that the update query should only consider plans using the hinted index

    -
    ignoreUndefined?: boolean

    serialize will not emit undefined fields +

    ignoreUndefined?: boolean

    serialize will not emit undefined fields note that the driver sets this to false

    true

    let?: Document

    Map of parameter names and values that can be accessed using $$var (requires MongoDB 5.0).

    -
    maxTimeMS?: number

    maxTimeMS is a server-side time limit in milliseconds for processing an operation.

    -
    noResponse?: boolean

    This option is deprecated and will be removed in an upcoming major version.

    -
    ordered?: boolean

    If true, when an insert fails, don't execute the remaining writes. If false, continue with remaining inserts when one fails.

    -
    promoteBuffers?: boolean

    when deserializing a Binary will return it as a node.js Buffer instance.

    +
    maxTimeMS?: number

    maxTimeMS is a server-side time limit in milliseconds for processing an operation.

    +
    noResponse?: boolean

    This option is deprecated and will be removed in an upcoming major version.

    +
    ordered?: boolean

    If true, when an insert fails, don't execute the remaining writes. If false, continue with remaining inserts when one fails.

    +
    promoteBuffers?: boolean

    when deserializing a Binary will return it as a node.js Buffer instance.

    false

    promoteLongs?: boolean

    when deserializing a Long will fit it into a Number if it's smaller than 53 bits.

    true

    @@ -64,15 +64,15 @@

    Please note there is a known limitation where this option cannot be used at the MongoClient level (see NODE-3946). It does correctly work at Db, Collection, and per operation the same as other BSON options work.

    -
    readConcern?: ReadConcernLike

    Specify a read concern and level for the collection. (only MongoDB 3.2 or higher supported)

    -
    readPreference?: ReadPreferenceLike

    The preferred read preference (ReadPreference.primary, ReadPreference.primary_preferred, ReadPreference.secondary, ReadPreference.secondary_preferred, ReadPreference.nearest).

    -
    retryWrites?: boolean

    This option is deprecated and will be removed in a future release as it is not used +

    readConcern?: ReadConcernLike

    Specify a read concern and level for the collection. (only MongoDB 3.2 or higher supported)

    +
    readPreference?: ReadPreferenceLike

    The preferred read preference (ReadPreference.primary, ReadPreference.primary_preferred, ReadPreference.secondary, ReadPreference.secondary_preferred, ReadPreference.nearest).

    +
    retryWrites?: boolean

    This option is deprecated and will be removed in a future release as it is not used in the driver. Use MongoClientOptions or connection string parameters instead.

    -
    serializeFunctions?: boolean

    serialize the javascript functions

    +
    serializeFunctions?: boolean

    serialize the javascript functions

    false

    session?: ClientSession

    Specify ClientSession for this command

    -
    timeoutMS?: number

    Specifies the time an operation will run until it throws a timeout error

    -
    useBigInt64?: boolean

    when deserializing a Long return as a BigInt.

    +
    timeoutMS?: number

    Specifies the time an operation will run until it throws a timeout error

    +
    useBigInt64?: boolean

    when deserializing a Long return as a BigInt.

    false

    -
    willRetryWrite?: boolean

    Write Concern as an object

    -
    +
    willRetryWrite?: boolean

    Write Concern as an object

    +
    diff --git a/docs/Next/interfaces/DeleteResult.html b/docs/Next/interfaces/DeleteResult.html index 2186cd61800..184310492a4 100644 --- a/docs/Next/interfaces/DeleteResult.html +++ b/docs/Next/interfaces/DeleteResult.html @@ -1,5 +1,5 @@ -DeleteResult | mongodb

    Interface DeleteResult

    interface DeleteResult {
        acknowledged: boolean;
        deletedCount: number;
    }

    Properties

    acknowledged +DeleteResult | mongodb

    Interface DeleteResult

    interface DeleteResult {
        acknowledged: boolean;
        deletedCount: number;
    }

    Properties

    acknowledged: boolean

    Indicates whether this write result was acknowledged. If not, then all other members of this result will be undefined.

    -
    deletedCount: number

    The number of documents that were deleted

    -
    +
    deletedCount: number

    The number of documents that were deleted

    +
    diff --git a/docs/Next/interfaces/DeleteStatement.html b/docs/Next/interfaces/DeleteStatement.html index 427f9d60551..c99df67ae3e 100644 --- a/docs/Next/interfaces/DeleteStatement.html +++ b/docs/Next/interfaces/DeleteStatement.html @@ -1,9 +1,9 @@ -DeleteStatement | mongodb

    Interface DeleteStatement

    interface DeleteStatement {
        collation?: CollationOptions;
        hint?: Hint;
        limit: number;
        q: Document;
    }

    Properties

    collation? +DeleteStatement | mongodb

    Interface DeleteStatement

    interface DeleteStatement {
        collation?: CollationOptions;
        hint?: Hint;
        limit: number;
        q: Document;
    }

    Properties

    Properties

    collation?: CollationOptions

    Specifies the collation to use for the operation.

    -
    hint?: Hint

    A document or string that specifies the index to use to support the query predicate.

    -
    limit: number

    The number of matching documents to delete.

    -

    The query that matches documents to delete.

    -
    +
    hint?: Hint

    A document or string that specifies the index to use to support the query predicate.

    +
    limit: number

    The number of matching documents to delete.

    +

    The query that matches documents to delete.

    +
    diff --git a/docs/Next/interfaces/DriverInfo.html b/docs/Next/interfaces/DriverInfo.html index bcb6229328f..aa8d664bdf7 100644 --- a/docs/Next/interfaces/DriverInfo.html +++ b/docs/Next/interfaces/DriverInfo.html @@ -1,4 +1,4 @@ -DriverInfo | mongodb

    Interface DriverInfo

    interface DriverInfo {
        name?: string;
        platform?: string;
        version?: string;
    }

    Properties

    name? +DriverInfo | mongodb

    Interface DriverInfo

    interface DriverInfo {
        name?: string;
        platform?: string;
        version?: string;
    }

    Properties

    name?: string
    platform?: string
    version?: string
    +

    Properties

    name?: string
    platform?: string
    version?: string
    diff --git a/docs/Next/interfaces/DropCollectionOptions.html b/docs/Next/interfaces/DropCollectionOptions.html index 74594298651..cf59c52cda6 100644 --- a/docs/Next/interfaces/DropCollectionOptions.html +++ b/docs/Next/interfaces/DropCollectionOptions.html @@ -1,4 +1,4 @@ -DropCollectionOptions | mongodb

    Interface DropCollectionOptions

    interface DropCollectionOptions {
        authdb?: string;
        bsonRegExp?: boolean;
        checkKeys?: boolean;
        collation?: CollationOptions;
        comment?: unknown;
        dbName?: string;
        enableUtf8Validation?: boolean;
        encryptedFields?: Document;
        explain?: ExplainVerbosityLike | ExplainCommandOptions;
        fieldsAsRaw?: Document;
        ignoreUndefined?: boolean;
        maxTimeMS?: number;
        noResponse?: boolean;
        promoteBuffers?: boolean;
        promoteLongs?: boolean;
        promoteValues?: boolean;
        raw?: boolean;
        readConcern?: ReadConcernLike;
        readPreference?: ReadPreferenceLike;
        retryWrites?: boolean;
        serializeFunctions?: boolean;
        session?: ClientSession;
        timeoutMS?: number;
        useBigInt64?: boolean;
        willRetryWrite?: boolean;
        writeConcern?: WriteConcern | WriteConcernSettings;
    }

    Hierarchy

    Properties

    authdb? +DropCollectionOptions | mongodb

    Interface DropCollectionOptions

    interface DropCollectionOptions {
        authdb?: string;
        bsonRegExp?: boolean;
        checkKeys?: boolean;
        collation?: CollationOptions;
        comment?: unknown;
        dbName?: string;
        enableUtf8Validation?: boolean;
        encryptedFields?: Document;
        explain?: ExplainVerbosityLike | ExplainCommandOptions;
        fieldsAsRaw?: Document;
        ignoreUndefined?: boolean;
        maxTimeMS?: number;
        noResponse?: boolean;
        promoteBuffers?: boolean;
        promoteLongs?: boolean;
        promoteValues?: boolean;
        raw?: boolean;
        readConcern?: ReadConcernLike;
        readPreference?: ReadPreferenceLike;
        retryWrites?: boolean;
        serializeFunctions?: boolean;
        session?: ClientSession;
        timeoutMS?: number;
        useBigInt64?: boolean;
        willRetryWrite?: boolean;
        writeConcern?: WriteConcern | WriteConcernSettings;
    }

    Hierarchy

    Properties

    authdb?: string
    bsonRegExp?: boolean

    return BSON regular expressions as BSONRegExp instances.

    +

    Properties

    authdb?: string
    bsonRegExp?: boolean

    return BSON regular expressions as BSONRegExp instances.

    false

    checkKeys?: boolean

    the serializer will check if keys are valid.

    false

    collation?: CollationOptions

    Collation

    -
    comment?: unknown

    Comment to apply to the operation.

    +
    comment?: unknown

    Comment to apply to the operation.

    In server versions pre-4.4, 'comment' must be string. A server error will be thrown if any other type is provided.

    In server versions 4.4 and above, 'comment' can be any valid BSON type.

    -
    dbName?: string
    enableUtf8Validation?: boolean

    Enable utf8 validation when deserializing BSON documents. Defaults to true.

    -
    encryptedFields?: Document

    Specifies the verbosity mode for the explain output.

    -
    fieldsAsRaw?: Document

    allow to specify if there what fields we wish to return as unserialized raw buffer.

    +
    dbName?: string
    enableUtf8Validation?: boolean

    Enable utf8 validation when deserializing BSON documents. Defaults to true.

    +
    encryptedFields?: Document

    Specifies the verbosity mode for the explain output.

    +
    fieldsAsRaw?: Document

    allow to specify if there what fields we wish to return as unserialized raw buffer.

    null

    ignoreUndefined?: boolean

    serialize will not emit undefined fields note that the driver sets this to false

    true

    maxTimeMS?: number

    maxTimeMS is a server-side time limit in milliseconds for processing an operation.

    -
    noResponse?: boolean

    This option is deprecated and will be removed in an upcoming major version.

    -
    promoteBuffers?: boolean

    when deserializing a Binary will return it as a node.js Buffer instance.

    +
    noResponse?: boolean

    This option is deprecated and will be removed in an upcoming major version.

    +
    promoteBuffers?: boolean

    when deserializing a Binary will return it as a node.js Buffer instance.

    false

    promoteLongs?: boolean

    when deserializing a Long will fit it into a Number if it's smaller than 53 bits.

    true

    @@ -59,15 +59,15 @@

    Please note there is a known limitation where this option cannot be used at the MongoClient level (see NODE-3946). It does correctly work at Db, Collection, and per operation the same as other BSON options work.

    -
    readConcern?: ReadConcernLike

    Specify a read concern and level for the collection. (only MongoDB 3.2 or higher supported)

    -
    readPreference?: ReadPreferenceLike

    The preferred read preference (ReadPreference.primary, ReadPreference.primary_preferred, ReadPreference.secondary, ReadPreference.secondary_preferred, ReadPreference.nearest).

    -
    retryWrites?: boolean

    This option is deprecated and will be removed in a future release as it is not used +

    readConcern?: ReadConcernLike

    Specify a read concern and level for the collection. (only MongoDB 3.2 or higher supported)

    +
    readPreference?: ReadPreferenceLike

    The preferred read preference (ReadPreference.primary, ReadPreference.primary_preferred, ReadPreference.secondary, ReadPreference.secondary_preferred, ReadPreference.nearest).

    +
    retryWrites?: boolean

    This option is deprecated and will be removed in a future release as it is not used in the driver. Use MongoClientOptions or connection string parameters instead.

    -
    serializeFunctions?: boolean

    serialize the javascript functions

    +
    serializeFunctions?: boolean

    serialize the javascript functions

    false

    session?: ClientSession

    Specify ClientSession for this command

    -
    timeoutMS?: number

    Specifies the time an operation will run until it throws a timeout error

    -
    useBigInt64?: boolean

    when deserializing a Long return as a BigInt.

    +
    timeoutMS?: number

    Specifies the time an operation will run until it throws a timeout error

    +
    useBigInt64?: boolean

    when deserializing a Long return as a BigInt.

    false

    -
    willRetryWrite?: boolean

    Write Concern as an object

    -
    +
    willRetryWrite?: boolean

    Write Concern as an object

    +
    diff --git a/docs/Next/interfaces/EndSessionOptions.html b/docs/Next/interfaces/EndSessionOptions.html index 7ea19cd2d8a..b4d7520b1da 100644 --- a/docs/Next/interfaces/EndSessionOptions.html +++ b/docs/Next/interfaces/EndSessionOptions.html @@ -1,5 +1,5 @@ -EndSessionOptions | mongodb

    Interface EndSessionOptions

    interface EndSessionOptions {
        force?: boolean;
        forceClear?: boolean;
        timeoutMS?: number;
    }

    Properties

    force? +EndSessionOptions | mongodb

    Interface EndSessionOptions

    interface EndSessionOptions {
        force?: boolean;
        forceClear?: boolean;
        timeoutMS?: number;
    }

    Properties

    force?: boolean
    forceClear?: boolean
    timeoutMS?: number

    Specifies the time an operation will run until it throws a timeout error

    -
    +

    Properties

    force?: boolean
    forceClear?: boolean
    timeoutMS?: number

    Specifies the time an operation will run until it throws a timeout error

    +
    diff --git a/docs/Next/interfaces/ErrorDescription.html b/docs/Next/interfaces/ErrorDescription.html index 183a4022667..7c18f23f0a4 100644 --- a/docs/Next/interfaces/ErrorDescription.html +++ b/docs/Next/interfaces/ErrorDescription.html @@ -1,6 +1,6 @@ -ErrorDescription | mongodb

    Interface ErrorDescription

    interface ErrorDescription {
        $err?: string;
        errInfo?: Document;
        errmsg?: string;
        errorLabels?: string[];
        message?: string;
    }

    Hierarchy (view full)

    Properties

    $err? +ErrorDescription | mongodb

    Interface ErrorDescription

    interface ErrorDescription {
        $err?: string;
        errInfo?: Document;
        errmsg?: string;
        errorLabels?: string[];
        message?: string;
    }

    Hierarchy (view full)

    Properties

    $err?: string
    errInfo?: Document
    errmsg?: string
    errorLabels?: string[]
    message?: string
    +

    Properties

    $err?: string
    errInfo?: Document
    errmsg?: string
    errorLabels?: string[]
    message?: string
    diff --git a/docs/Next/interfaces/EstimatedDocumentCountOptions.html b/docs/Next/interfaces/EstimatedDocumentCountOptions.html index e7759e880ac..3384457d552 100644 --- a/docs/Next/interfaces/EstimatedDocumentCountOptions.html +++ b/docs/Next/interfaces/EstimatedDocumentCountOptions.html @@ -1,4 +1,4 @@ -EstimatedDocumentCountOptions | mongodb

    Interface EstimatedDocumentCountOptions

    interface EstimatedDocumentCountOptions {
        authdb?: string;
        bsonRegExp?: boolean;
        checkKeys?: boolean;
        collation?: CollationOptions;
        comment?: unknown;
        dbName?: string;
        enableUtf8Validation?: boolean;
        explain?: ExplainVerbosityLike | ExplainCommandOptions;
        fieldsAsRaw?: Document;
        ignoreUndefined?: boolean;
        maxTimeMS?: number;
        noResponse?: boolean;
        promoteBuffers?: boolean;
        promoteLongs?: boolean;
        promoteValues?: boolean;
        raw?: boolean;
        readConcern?: ReadConcernLike;
        readPreference?: ReadPreferenceLike;
        retryWrites?: boolean;
        serializeFunctions?: boolean;
        session?: ClientSession;
        timeoutMS?: number;
        useBigInt64?: boolean;
        willRetryWrite?: boolean;
        writeConcern?: WriteConcern | WriteConcernSettings;
    }

    Hierarchy (view full)

    Properties

    authdb? +EstimatedDocumentCountOptions | mongodb

    Interface EstimatedDocumentCountOptions

    interface EstimatedDocumentCountOptions {
        authdb?: string;
        bsonRegExp?: boolean;
        checkKeys?: boolean;
        collation?: CollationOptions;
        comment?: unknown;
        dbName?: string;
        enableUtf8Validation?: boolean;
        explain?: ExplainVerbosityLike | ExplainCommandOptions;
        fieldsAsRaw?: Document;
        ignoreUndefined?: boolean;
        maxTimeMS?: number;
        noResponse?: boolean;
        promoteBuffers?: boolean;
        promoteLongs?: boolean;
        promoteValues?: boolean;
        raw?: boolean;
        readConcern?: ReadConcernLike;
        readPreference?: ReadPreferenceLike;
        retryWrites?: boolean;
        serializeFunctions?: boolean;
        session?: ClientSession;
        timeoutMS?: number;
        useBigInt64?: boolean;
        willRetryWrite?: boolean;
        writeConcern?: WriteConcern | WriteConcernSettings;
    }

    Hierarchy (view full)

    Properties

    authdb?: string
    bsonRegExp?: boolean

    return BSON regular expressions as BSONRegExp instances.

    +

    Properties

    authdb?: string
    bsonRegExp?: boolean

    return BSON regular expressions as BSONRegExp instances.

    false

    checkKeys?: boolean

    the serializer will check if keys are valid.

    false

    collation?: CollationOptions

    Collation

    -
    comment?: unknown

    Comment to apply to the operation.

    +
    comment?: unknown

    Comment to apply to the operation.

    In server versions pre-4.4, 'comment' must be string. A server error will be thrown if any other type is provided.

    In server versions 4.4 and above, 'comment' can be any valid BSON type.

    -
    dbName?: string
    enableUtf8Validation?: boolean

    Enable utf8 validation when deserializing BSON documents. Defaults to true.

    -

    Specifies the verbosity mode for the explain output.

    -
    fieldsAsRaw?: Document

    allow to specify if there what fields we wish to return as unserialized raw buffer.

    +
    dbName?: string
    enableUtf8Validation?: boolean

    Enable utf8 validation when deserializing BSON documents. Defaults to true.

    +

    Specifies the verbosity mode for the explain output.

    +
    fieldsAsRaw?: Document

    allow to specify if there what fields we wish to return as unserialized raw buffer.

    null

    ignoreUndefined?: boolean

    serialize will not emit undefined fields note that the driver sets this to false

    true

    maxTimeMS?: number

    The maximum amount of time to allow the operation to run.

    This option is sent only if the caller explicitly provides a value. The default is to not send a value.

    -
    noResponse?: boolean

    This option is deprecated and will be removed in an upcoming major version.

    -
    promoteBuffers?: boolean

    when deserializing a Binary will return it as a node.js Buffer instance.

    +
    noResponse?: boolean

    This option is deprecated and will be removed in an upcoming major version.

    +
    promoteBuffers?: boolean

    when deserializing a Binary will return it as a node.js Buffer instance.

    false

    promoteLongs?: boolean

    when deserializing a Long will fit it into a Number if it's smaller than 53 bits.

    true

    @@ -59,15 +59,15 @@

    Please note there is a known limitation where this option cannot be used at the MongoClient level (see NODE-3946). It does correctly work at Db, Collection, and per operation the same as other BSON options work.

    -
    readConcern?: ReadConcernLike

    Specify a read concern and level for the collection. (only MongoDB 3.2 or higher supported)

    -
    readPreference?: ReadPreferenceLike

    The preferred read preference (ReadPreference.primary, ReadPreference.primary_preferred, ReadPreference.secondary, ReadPreference.secondary_preferred, ReadPreference.nearest).

    -
    retryWrites?: boolean

    This option is deprecated and will be removed in a future release as it is not used +

    readConcern?: ReadConcernLike

    Specify a read concern and level for the collection. (only MongoDB 3.2 or higher supported)

    +
    readPreference?: ReadPreferenceLike

    The preferred read preference (ReadPreference.primary, ReadPreference.primary_preferred, ReadPreference.secondary, ReadPreference.secondary_preferred, ReadPreference.nearest).

    +
    retryWrites?: boolean

    This option is deprecated and will be removed in a future release as it is not used in the driver. Use MongoClientOptions or connection string parameters instead.

    -
    serializeFunctions?: boolean

    serialize the javascript functions

    +
    serializeFunctions?: boolean

    serialize the javascript functions

    false

    session?: ClientSession

    Specify ClientSession for this command

    -
    timeoutMS?: number

    Specifies the time an operation will run until it throws a timeout error

    -
    useBigInt64?: boolean

    when deserializing a Long return as a BigInt.

    +
    timeoutMS?: number

    Specifies the time an operation will run until it throws a timeout error

    +
    useBigInt64?: boolean

    when deserializing a Long return as a BigInt.

    false

    -
    willRetryWrite?: boolean

    Write Concern as an object

    -
    +
    willRetryWrite?: boolean

    Write Concern as an object

    +
    diff --git a/docs/Next/interfaces/ExplainCommandOptions.html b/docs/Next/interfaces/ExplainCommandOptions.html index 107e4885160..9d065d012c5 100644 --- a/docs/Next/interfaces/ExplainCommandOptions.html +++ b/docs/Next/interfaces/ExplainCommandOptions.html @@ -1,5 +1,5 @@ -ExplainCommandOptions | mongodb

    Interface ExplainCommandOptions

    interface ExplainCommandOptions {
        maxTimeMS?: number;
        verbosity: string;
    }

    Properties

    maxTimeMS? +ExplainCommandOptions | mongodb

    Interface ExplainCommandOptions

    interface ExplainCommandOptions {
        maxTimeMS?: number;
        verbosity: string;
    }

    Properties

    maxTimeMS?: number

    The maxTimeMS setting for the command.

    -
    verbosity: string

    The explain verbosity for the command.

    -
    +
    verbosity: string

    The explain verbosity for the command.

    +
    diff --git a/docs/Next/interfaces/ExplainOptions.html b/docs/Next/interfaces/ExplainOptions.html index da15a3498e4..e96c2917f3a 100644 --- a/docs/Next/interfaces/ExplainOptions.html +++ b/docs/Next/interfaces/ExplainOptions.html @@ -10,6 +10,6 @@
    // limits the `explain` command to no more than 2 seconds
    collection.find({ name: 'john doe' }, {
    explain: {
    verbosity: 'queryPlanner',
    maxTimeMS: 2000
    }
    });
    -
    interface ExplainOptions {
        explain?: ExplainVerbosityLike | ExplainCommandOptions;
    }

    Hierarchy (view full)

    Properties

    interface ExplainOptions {
        explain?: ExplainVerbosityLike | ExplainCommandOptions;
    }

    Hierarchy (view full)

    Properties

    Properties

    Specifies the verbosity mode for the explain output.

    -
    +
    diff --git a/docs/Next/interfaces/FilterOperators.html b/docs/Next/interfaces/FilterOperators.html index 0406d282125..4eab0f137f1 100644 --- a/docs/Next/interfaces/FilterOperators.html +++ b/docs/Next/interfaces/FilterOperators.html @@ -1,4 +1,4 @@ -FilterOperators | mongodb

    Interface FilterOperators<TValue>

    interface FilterOperators<TValue> {
        __id?: undefined;
        $all?: readonly any[];
        $bitsAllClear?: BitwiseFilter;
        $bitsAllSet?: BitwiseFilter;
        $bitsAnyClear?: BitwiseFilter;
        $bitsAnySet?: BitwiseFilter;
        $elemMatch?: Document;
        $eq?: TValue;
        $exists?: boolean;
        $expr?: Record<string, any>;
        $geoIntersects?: {
            $geometry: Document;
        };
        $geoWithin?: Document;
        $gt?: TValue;
        $gte?: TValue;
        $in?: readonly TValue[];
        $jsonSchema?: Record<string, any>;
        $lt?: TValue;
        $lte?: TValue;
        $maxDistance?: number;
        $mod?: TValue extends number
            ? [number, number]
            : never;
        $ne?: TValue;
        $near?: Document;
        $nearSphere?: Document;
        $nin?: readonly TValue[];
        $not?: TValue extends string
            ? RegExp | FilterOperators<TValue<TValue>>
            : FilterOperators<TValue>;
        $options?: TValue extends string
            ? string
            : never;
        $rand?: Record<string, never>;
        $regex?: TValue extends string
            ? string | RegExp | BSONRegExp
            : never;
        $size?: TValue extends readonly any[]
            ? number
            : never;
        $type?:
            | "string"
            | "symbol"
            | "undefined"
            | "object"
            | "double"
            | "array"
            | "binData"
            | "objectId"
            | "bool"
            | "date"
            | "null"
            | "regex"
            | "dbPointer"
            | "javascript"
            | "javascriptWithScope"
            | "int"
            | "timestamp"
            | "long"
            | "decimal"
            | "minKey"
            | "maxKey"
            | BSON.BSONType;
        id?: undefined;
        toHexString?: any;
    }

    Type Parameters

    • TValue

    Hierarchy (view full)

    Properties

    __id? +FilterOperators | mongodb

    Interface FilterOperators<TValue>

    interface FilterOperators<TValue> {
        __id?: undefined;
        $all?: readonly any[];
        $bitsAllClear?: BitwiseFilter;
        $bitsAllSet?: BitwiseFilter;
        $bitsAnyClear?: BitwiseFilter;
        $bitsAnySet?: BitwiseFilter;
        $elemMatch?: Document;
        $eq?: TValue;
        $exists?: boolean;
        $expr?: Record<string, any>;
        $geoIntersects?: {
            $geometry: Document;
        };
        $geoWithin?: Document;
        $gt?: TValue;
        $gte?: TValue;
        $in?: readonly TValue[];
        $jsonSchema?: Record<string, any>;
        $lt?: TValue;
        $lte?: TValue;
        $maxDistance?: number;
        $mod?: TValue extends number
            ? [number, number]
            : never;
        $ne?: TValue;
        $near?: Document;
        $nearSphere?: Document;
        $nin?: readonly TValue[];
        $not?: TValue extends string
            ? RegExp | FilterOperators<TValue<TValue>>
            : FilterOperators<TValue>;
        $options?: TValue extends string
            ? string
            : never;
        $rand?: Record<string, never>;
        $regex?: TValue extends string
            ? string | RegExp | BSONRegExp
            : never;
        $size?: TValue extends readonly any[]
            ? number
            : never;
        $type?:
            | "string"
            | "symbol"
            | "undefined"
            | "object"
            | "double"
            | "array"
            | "binData"
            | "objectId"
            | "bool"
            | "date"
            | "null"
            | "regex"
            | "dbPointer"
            | "javascript"
            | "javascriptWithScope"
            | "int"
            | "timestamp"
            | "long"
            | "decimal"
            | "minKey"
            | "maxKey"
            | BSON.BSONType;
        id?: undefined;
        toHexString?: any;
    }

    Type Parameters

    • TValue

    Hierarchy (view full)

    Properties

    Methods

    Properties

    __id?: undefined
    $all?: readonly any[]
    $bitsAllClear?: BitwiseFilter
    $bitsAllSet?: BitwiseFilter
    $bitsAnyClear?: BitwiseFilter
    $bitsAnySet?: BitwiseFilter
    $elemMatch?: Document
    $eq?: TValue
    $exists?: boolean

    When true, $exists matches the documents that contain the field, +

    Properties

    __id?: undefined
    $all?: readonly any[]
    $bitsAllClear?: BitwiseFilter
    $bitsAllSet?: BitwiseFilter
    $bitsAnyClear?: BitwiseFilter
    $bitsAnySet?: BitwiseFilter
    $elemMatch?: Document
    $eq?: TValue
    $exists?: boolean

    When true, $exists matches the documents that contain the field, including documents where the field value is null.

    -
    $expr?: Record<string, any>
    $geoIntersects?: {
        $geometry: Document;
    }
    $geoWithin?: Document
    $gt?: TValue
    $gte?: TValue
    $in?: readonly TValue[]
    $jsonSchema?: Record<string, any>
    $lt?: TValue
    $lte?: TValue
    $maxDistance?: number
    $mod?: TValue extends number
        ? [number, number]
        : never
    $ne?: TValue
    $near?: Document
    $nearSphere?: Document
    $nin?: readonly TValue[]
    $not?: TValue extends string
        ? RegExp | FilterOperators<TValue<TValue>>
        : FilterOperators<TValue>
    $options?: TValue extends string
        ? string
        : never
    $rand?: Record<string, never>
    $regex?: TValue extends string
        ? string | RegExp | BSONRegExp
        : never
    $size?: TValue extends readonly any[]
        ? number
        : never
    $type?:
        | "string"
        | "symbol"
        | "undefined"
        | "object"
        | "double"
        | "array"
        | "binData"
        | "objectId"
        | "bool"
        | "date"
        | "null"
        | "regex"
        | "dbPointer"
        | "javascript"
        | "javascriptWithScope"
        | "int"
        | "timestamp"
        | "long"
        | "decimal"
        | "minKey"
        | "maxKey"
        | BSON.BSONType
    id?: undefined

    Methods

    toHexString
    +
    $expr?: Record<string, any>
    $geoIntersects?: {
        $geometry: Document;
    }
    $geoWithin?: Document
    $gt?: TValue
    $gte?: TValue
    $in?: readonly TValue[]
    $jsonSchema?: Record<string, any>
    $lt?: TValue
    $lte?: TValue
    $maxDistance?: number
    $mod?: TValue extends number
        ? [number, number]
        : never
    $ne?: TValue
    $near?: Document
    $nearSphere?: Document
    $nin?: readonly TValue[]
    $not?: TValue extends string
        ? RegExp | FilterOperators<TValue<TValue>>
        : FilterOperators<TValue>
    $options?: TValue extends string
        ? string
        : never
    $rand?: Record<string, never>
    $regex?: TValue extends string
        ? string | RegExp | BSONRegExp
        : never
    $size?: TValue extends readonly any[]
        ? number
        : never
    $type?:
        | "string"
        | "symbol"
        | "undefined"
        | "object"
        | "double"
        | "array"
        | "binData"
        | "objectId"
        | "bool"
        | "date"
        | "null"
        | "regex"
        | "dbPointer"
        | "javascript"
        | "javascriptWithScope"
        | "int"
        | "timestamp"
        | "long"
        | "decimal"
        | "minKey"
        | "maxKey"
        | BSON.BSONType
    id?: undefined

    Methods

    toHexString
    diff --git a/docs/Next/interfaces/FindOneAndDeleteOptions.html b/docs/Next/interfaces/FindOneAndDeleteOptions.html index b89a50291a2..a1e4042799c 100644 --- a/docs/Next/interfaces/FindOneAndDeleteOptions.html +++ b/docs/Next/interfaces/FindOneAndDeleteOptions.html @@ -1,4 +1,4 @@ -FindOneAndDeleteOptions | mongodb

    Interface FindOneAndDeleteOptions

    interface FindOneAndDeleteOptions {
        authdb?: string;
        bsonRegExp?: boolean;
        checkKeys?: boolean;
        collation?: CollationOptions;
        comment?: unknown;
        dbName?: string;
        enableUtf8Validation?: boolean;
        explain?: ExplainVerbosityLike | ExplainCommandOptions;
        fieldsAsRaw?: Document;
        hint?: Document;
        ignoreUndefined?: boolean;
        includeResultMetadata?: boolean;
        let?: Document;
        maxTimeMS?: number;
        noResponse?: boolean;
        projection?: Document;
        promoteBuffers?: boolean;
        promoteLongs?: boolean;
        promoteValues?: boolean;
        raw?: boolean;
        readConcern?: ReadConcernLike;
        readPreference?: ReadPreferenceLike;
        retryWrites?: boolean;
        serializeFunctions?: boolean;
        session?: ClientSession;
        sort?: Sort;
        timeoutMS?: number;
        useBigInt64?: boolean;
        willRetryWrite?: boolean;
        writeConcern?: WriteConcern | WriteConcernSettings;
    }

    Hierarchy (view full)

    Properties

    authdb? +FindOneAndDeleteOptions | mongodb

    Interface FindOneAndDeleteOptions

    interface FindOneAndDeleteOptions {
        authdb?: string;
        bsonRegExp?: boolean;
        checkKeys?: boolean;
        collation?: CollationOptions;
        comment?: unknown;
        dbName?: string;
        enableUtf8Validation?: boolean;
        explain?: ExplainVerbosityLike | ExplainCommandOptions;
        fieldsAsRaw?: Document;
        hint?: Document;
        ignoreUndefined?: boolean;
        includeResultMetadata?: boolean;
        let?: Document;
        maxTimeMS?: number;
        noResponse?: boolean;
        projection?: Document;
        promoteBuffers?: boolean;
        promoteLongs?: boolean;
        promoteValues?: boolean;
        raw?: boolean;
        readConcern?: ReadConcernLike;
        readPreference?: ReadPreferenceLike;
        retryWrites?: boolean;
        serializeFunctions?: boolean;
        session?: ClientSession;
        sort?: Sort;
        timeoutMS?: number;
        useBigInt64?: boolean;
        willRetryWrite?: boolean;
        writeConcern?: WriteConcern | WriteConcernSettings;
    }

    Hierarchy (view full)

    Properties

    authdb?: string
    bsonRegExp?: boolean

    return BSON regular expressions as BSONRegExp instances.

    +

    Properties

    authdb?: string
    bsonRegExp?: boolean

    return BSON regular expressions as BSONRegExp instances.

    false

    checkKeys?: boolean

    the serializer will check if keys are valid.

    false

    collation?: CollationOptions

    Collation

    -
    comment?: unknown

    Comment to apply to the operation.

    +
    comment?: unknown

    Comment to apply to the operation.

    In server versions pre-4.4, 'comment' must be string. A server error will be thrown if any other type is provided.

    In server versions 4.4 and above, 'comment' can be any valid BSON type.

    -
    dbName?: string
    enableUtf8Validation?: boolean

    Enable utf8 validation when deserializing BSON documents. Defaults to true.

    -

    Specifies the verbosity mode for the explain output.

    -
    fieldsAsRaw?: Document

    allow to specify if there what fields we wish to return as unserialized raw buffer.

    +
    dbName?: string
    enableUtf8Validation?: boolean

    Enable utf8 validation when deserializing BSON documents. Defaults to true.

    +

    Specifies the verbosity mode for the explain output.

    +
    fieldsAsRaw?: Document

    allow to specify if there what fields we wish to return as unserialized raw buffer.

    null

    hint?: Document

    An optional hint for query optimization. See the command reference for more information.

    -
    ignoreUndefined?: boolean

    serialize will not emit undefined fields +

    ignoreUndefined?: boolean

    serialize will not emit undefined fields note that the driver sets this to false

    true

    includeResultMetadata?: boolean

    Return the ModifyResult instead of the modified document. Defaults to false

    -
    let?: Document

    Map of parameter names and values that can be accessed using $$var (requires MongoDB 5.0).

    -
    maxTimeMS?: number

    maxTimeMS is a server-side time limit in milliseconds for processing an operation.

    -
    noResponse?: boolean

    This option is deprecated and will be removed in an upcoming major version.

    -
    projection?: Document

    Limits the fields to return for all matching documents.

    -
    promoteBuffers?: boolean

    when deserializing a Binary will return it as a node.js Buffer instance.

    +
    let?: Document

    Map of parameter names and values that can be accessed using $$var (requires MongoDB 5.0).

    +
    maxTimeMS?: number

    maxTimeMS is a server-side time limit in milliseconds for processing an operation.

    +
    noResponse?: boolean

    This option is deprecated and will be removed in an upcoming major version.

    +
    projection?: Document

    Limits the fields to return for all matching documents.

    +
    promoteBuffers?: boolean

    when deserializing a Binary will return it as a node.js Buffer instance.

    false

    promoteLongs?: boolean

    when deserializing a Long will fit it into a Number if it's smaller than 53 bits.

    true

    @@ -67,16 +67,16 @@

    Please note there is a known limitation where this option cannot be used at the MongoClient level (see NODE-3946). It does correctly work at Db, Collection, and per operation the same as other BSON options work.

    -
    readConcern?: ReadConcernLike

    Specify a read concern and level for the collection. (only MongoDB 3.2 or higher supported)

    -
    readPreference?: ReadPreferenceLike

    The preferred read preference (ReadPreference.primary, ReadPreference.primary_preferred, ReadPreference.secondary, ReadPreference.secondary_preferred, ReadPreference.nearest).

    -
    retryWrites?: boolean

    This option is deprecated and will be removed in a future release as it is not used +

    readConcern?: ReadConcernLike

    Specify a read concern and level for the collection. (only MongoDB 3.2 or higher supported)

    +
    readPreference?: ReadPreferenceLike

    The preferred read preference (ReadPreference.primary, ReadPreference.primary_preferred, ReadPreference.secondary, ReadPreference.secondary_preferred, ReadPreference.nearest).

    +
    retryWrites?: boolean

    This option is deprecated and will be removed in a future release as it is not used in the driver. Use MongoClientOptions or connection string parameters instead.

    -
    serializeFunctions?: boolean

    serialize the javascript functions

    +
    serializeFunctions?: boolean

    serialize the javascript functions

    false

    session?: ClientSession

    Specify ClientSession for this command

    -
    sort?: Sort

    Determines which document the operation modifies if the query selects multiple documents.

    -
    timeoutMS?: number

    Specifies the time an operation will run until it throws a timeout error

    -
    useBigInt64?: boolean

    when deserializing a Long return as a BigInt.

    +
    sort?: Sort

    Determines which document the operation modifies if the query selects multiple documents.

    +
    timeoutMS?: number

    Specifies the time an operation will run until it throws a timeout error

    +
    useBigInt64?: boolean

    when deserializing a Long return as a BigInt.

    false

    -
    willRetryWrite?: boolean

    Write Concern as an object

    -
    +
    willRetryWrite?: boolean

    Write Concern as an object

    +
    diff --git a/docs/Next/interfaces/FindOneAndReplaceOptions.html b/docs/Next/interfaces/FindOneAndReplaceOptions.html index 10d6bc0ed70..f6223c5151d 100644 --- a/docs/Next/interfaces/FindOneAndReplaceOptions.html +++ b/docs/Next/interfaces/FindOneAndReplaceOptions.html @@ -1,4 +1,4 @@ -FindOneAndReplaceOptions | mongodb

    Interface FindOneAndReplaceOptions

    interface FindOneAndReplaceOptions {
        authdb?: string;
        bsonRegExp?: boolean;
        bypassDocumentValidation?: boolean;
        checkKeys?: boolean;
        collation?: CollationOptions;
        comment?: unknown;
        dbName?: string;
        enableUtf8Validation?: boolean;
        explain?: ExplainVerbosityLike | ExplainCommandOptions;
        fieldsAsRaw?: Document;
        hint?: Document;
        ignoreUndefined?: boolean;
        includeResultMetadata?: boolean;
        let?: Document;
        maxTimeMS?: number;
        noResponse?: boolean;
        projection?: Document;
        promoteBuffers?: boolean;
        promoteLongs?: boolean;
        promoteValues?: boolean;
        raw?: boolean;
        readConcern?: ReadConcernLike;
        readPreference?: ReadPreferenceLike;
        retryWrites?: boolean;
        returnDocument?: ReturnDocument;
        serializeFunctions?: boolean;
        session?: ClientSession;
        sort?: Sort;
        timeoutMS?: number;
        upsert?: boolean;
        useBigInt64?: boolean;
        willRetryWrite?: boolean;
        writeConcern?: WriteConcern | WriteConcernSettings;
    }

    Hierarchy (view full)

    Properties

    authdb? +FindOneAndReplaceOptions | mongodb

    Interface FindOneAndReplaceOptions

    interface FindOneAndReplaceOptions {
        authdb?: string;
        bsonRegExp?: boolean;
        bypassDocumentValidation?: boolean;
        checkKeys?: boolean;
        collation?: CollationOptions;
        comment?: unknown;
        dbName?: string;
        enableUtf8Validation?: boolean;
        explain?: ExplainVerbosityLike | ExplainCommandOptions;
        fieldsAsRaw?: Document;
        hint?: Document;
        ignoreUndefined?: boolean;
        includeResultMetadata?: boolean;
        let?: Document;
        maxTimeMS?: number;
        noResponse?: boolean;
        projection?: Document;
        promoteBuffers?: boolean;
        promoteLongs?: boolean;
        promoteValues?: boolean;
        raw?: boolean;
        readConcern?: ReadConcernLike;
        readPreference?: ReadPreferenceLike;
        retryWrites?: boolean;
        returnDocument?: ReturnDocument;
        serializeFunctions?: boolean;
        session?: ClientSession;
        sort?: Sort;
        timeoutMS?: number;
        upsert?: boolean;
        useBigInt64?: boolean;
        willRetryWrite?: boolean;
        writeConcern?: WriteConcern | WriteConcernSettings;
    }

    Hierarchy (view full)

    Properties

    authdb?: string
    bsonRegExp?: boolean

    return BSON regular expressions as BSONRegExp instances.

    +

    Properties

    authdb?: string
    bsonRegExp?: boolean

    return BSON regular expressions as BSONRegExp instances.

    false

    bypassDocumentValidation?: boolean

    Allow driver to bypass schema validation.

    -
    checkKeys?: boolean

    the serializer will check if keys are valid.

    +
    checkKeys?: boolean

    the serializer will check if keys are valid.

    false

    collation?: CollationOptions

    Collation

    -
    comment?: unknown

    Comment to apply to the operation.

    +
    comment?: unknown

    Comment to apply to the operation.

    In server versions pre-4.4, 'comment' must be string. A server error will be thrown if any other type is provided.

    In server versions 4.4 and above, 'comment' can be any valid BSON type.

    -
    dbName?: string
    enableUtf8Validation?: boolean

    Enable utf8 validation when deserializing BSON documents. Defaults to true.

    -

    Specifies the verbosity mode for the explain output.

    -
    fieldsAsRaw?: Document

    allow to specify if there what fields we wish to return as unserialized raw buffer.

    +
    dbName?: string
    enableUtf8Validation?: boolean

    Enable utf8 validation when deserializing BSON documents. Defaults to true.

    +

    Specifies the verbosity mode for the explain output.

    +
    fieldsAsRaw?: Document

    allow to specify if there what fields we wish to return as unserialized raw buffer.

    null

    hint?: Document

    An optional hint for query optimization. See the command reference for more information.

    -
    ignoreUndefined?: boolean

    serialize will not emit undefined fields +

    ignoreUndefined?: boolean

    serialize will not emit undefined fields note that the driver sets this to false

    true

    includeResultMetadata?: boolean

    Return the ModifyResult instead of the modified document. Defaults to false

    -
    let?: Document

    Map of parameter names and values that can be accessed using $$var (requires MongoDB 5.0).

    -
    maxTimeMS?: number

    maxTimeMS is a server-side time limit in milliseconds for processing an operation.

    -
    noResponse?: boolean

    This option is deprecated and will be removed in an upcoming major version.

    -
    projection?: Document

    Limits the fields to return for all matching documents.

    -
    promoteBuffers?: boolean

    when deserializing a Binary will return it as a node.js Buffer instance.

    +
    let?: Document

    Map of parameter names and values that can be accessed using $$var (requires MongoDB 5.0).

    +
    maxTimeMS?: number

    maxTimeMS is a server-side time limit in milliseconds for processing an operation.

    +
    noResponse?: boolean

    This option is deprecated and will be removed in an upcoming major version.

    +
    projection?: Document

    Limits the fields to return for all matching documents.

    +
    promoteBuffers?: boolean

    when deserializing a Binary will return it as a node.js Buffer instance.

    false

    promoteLongs?: boolean

    when deserializing a Long will fit it into a Number if it's smaller than 53 bits.

    true

    @@ -71,18 +71,18 @@

    Please note there is a known limitation where this option cannot be used at the MongoClient level (see NODE-3946). It does correctly work at Db, Collection, and per operation the same as other BSON options work.

    -
    readConcern?: ReadConcernLike

    Specify a read concern and level for the collection. (only MongoDB 3.2 or higher supported)

    -
    readPreference?: ReadPreferenceLike

    The preferred read preference (ReadPreference.primary, ReadPreference.primary_preferred, ReadPreference.secondary, ReadPreference.secondary_preferred, ReadPreference.nearest).

    -
    retryWrites?: boolean

    This option is deprecated and will be removed in a future release as it is not used +

    readConcern?: ReadConcernLike

    Specify a read concern and level for the collection. (only MongoDB 3.2 or higher supported)

    +
    readPreference?: ReadPreferenceLike

    The preferred read preference (ReadPreference.primary, ReadPreference.primary_preferred, ReadPreference.secondary, ReadPreference.secondary_preferred, ReadPreference.nearest).

    +
    retryWrites?: boolean

    This option is deprecated and will be removed in a future release as it is not used in the driver. Use MongoClientOptions or connection string parameters instead.

    -
    returnDocument?: ReturnDocument

    When set to 'after', returns the updated document rather than the original. The default is 'before'.

    -
    serializeFunctions?: boolean

    serialize the javascript functions

    +
    returnDocument?: ReturnDocument

    When set to 'after', returns the updated document rather than the original. The default is 'before'.

    +
    serializeFunctions?: boolean

    serialize the javascript functions

    false

    session?: ClientSession

    Specify ClientSession for this command

    -
    sort?: Sort

    Determines which document the operation modifies if the query selects multiple documents.

    -
    timeoutMS?: number

    Specifies the time an operation will run until it throws a timeout error

    -
    upsert?: boolean

    Upsert the document if it does not exist.

    -
    useBigInt64?: boolean

    when deserializing a Long return as a BigInt.

    +
    sort?: Sort

    Determines which document the operation modifies if the query selects multiple documents.

    +
    timeoutMS?: number

    Specifies the time an operation will run until it throws a timeout error

    +
    upsert?: boolean

    Upsert the document if it does not exist.

    +
    useBigInt64?: boolean

    when deserializing a Long return as a BigInt.

    false

    -
    willRetryWrite?: boolean

    Write Concern as an object

    -
    +
    willRetryWrite?: boolean

    Write Concern as an object

    +
    diff --git a/docs/Next/interfaces/FindOneAndUpdateOptions.html b/docs/Next/interfaces/FindOneAndUpdateOptions.html index 89239517043..d04f83a2d1c 100644 --- a/docs/Next/interfaces/FindOneAndUpdateOptions.html +++ b/docs/Next/interfaces/FindOneAndUpdateOptions.html @@ -1,4 +1,4 @@ -FindOneAndUpdateOptions | mongodb

    Interface FindOneAndUpdateOptions

    interface FindOneAndUpdateOptions {
        arrayFilters?: Document[];
        authdb?: string;
        bsonRegExp?: boolean;
        bypassDocumentValidation?: boolean;
        checkKeys?: boolean;
        collation?: CollationOptions;
        comment?: unknown;
        dbName?: string;
        enableUtf8Validation?: boolean;
        explain?: ExplainVerbosityLike | ExplainCommandOptions;
        fieldsAsRaw?: Document;
        hint?: Document;
        ignoreUndefined?: boolean;
        includeResultMetadata?: boolean;
        let?: Document;
        maxTimeMS?: number;
        noResponse?: boolean;
        projection?: Document;
        promoteBuffers?: boolean;
        promoteLongs?: boolean;
        promoteValues?: boolean;
        raw?: boolean;
        readConcern?: ReadConcernLike;
        readPreference?: ReadPreferenceLike;
        retryWrites?: boolean;
        returnDocument?: ReturnDocument;
        serializeFunctions?: boolean;
        session?: ClientSession;
        sort?: Sort;
        timeoutMS?: number;
        upsert?: boolean;
        useBigInt64?: boolean;
        willRetryWrite?: boolean;
        writeConcern?: WriteConcern | WriteConcernSettings;
    }

    Hierarchy (view full)

    Properties

    arrayFilters? +FindOneAndUpdateOptions | mongodb

    Interface FindOneAndUpdateOptions

    interface FindOneAndUpdateOptions {
        arrayFilters?: Document[];
        authdb?: string;
        bsonRegExp?: boolean;
        bypassDocumentValidation?: boolean;
        checkKeys?: boolean;
        collation?: CollationOptions;
        comment?: unknown;
        dbName?: string;
        enableUtf8Validation?: boolean;
        explain?: ExplainVerbosityLike | ExplainCommandOptions;
        fieldsAsRaw?: Document;
        hint?: Document;
        ignoreUndefined?: boolean;
        includeResultMetadata?: boolean;
        let?: Document;
        maxTimeMS?: number;
        noResponse?: boolean;
        projection?: Document;
        promoteBuffers?: boolean;
        promoteLongs?: boolean;
        promoteValues?: boolean;
        raw?: boolean;
        readConcern?: ReadConcernLike;
        readPreference?: ReadPreferenceLike;
        retryWrites?: boolean;
        returnDocument?: ReturnDocument;
        serializeFunctions?: boolean;
        session?: ClientSession;
        sort?: Sort;
        timeoutMS?: number;
        upsert?: boolean;
        useBigInt64?: boolean;
        willRetryWrite?: boolean;
        writeConcern?: WriteConcern | WriteConcernSettings;
    }

    Hierarchy (view full)

    Properties

    arrayFilters?: Document[]

    Optional list of array filters referenced in filtered positional operators

    -
    authdb?: string
    bsonRegExp?: boolean

    return BSON regular expressions as BSONRegExp instances.

    +
    authdb?: string
    bsonRegExp?: boolean

    return BSON regular expressions as BSONRegExp instances.

    false

    bypassDocumentValidation?: boolean

    Allow driver to bypass schema validation.

    -
    checkKeys?: boolean

    the serializer will check if keys are valid.

    +
    checkKeys?: boolean

    the serializer will check if keys are valid.

    false

    collation?: CollationOptions

    Collation

    -
    comment?: unknown

    Comment to apply to the operation.

    +
    comment?: unknown

    Comment to apply to the operation.

    In server versions pre-4.4, 'comment' must be string. A server error will be thrown if any other type is provided.

    In server versions 4.4 and above, 'comment' can be any valid BSON type.

    -
    dbName?: string
    enableUtf8Validation?: boolean

    Enable utf8 validation when deserializing BSON documents. Defaults to true.

    -

    Specifies the verbosity mode for the explain output.

    -
    fieldsAsRaw?: Document

    allow to specify if there what fields we wish to return as unserialized raw buffer.

    +
    dbName?: string
    enableUtf8Validation?: boolean

    Enable utf8 validation when deserializing BSON documents. Defaults to true.

    +

    Specifies the verbosity mode for the explain output.

    +
    fieldsAsRaw?: Document

    allow to specify if there what fields we wish to return as unserialized raw buffer.

    null

    hint?: Document

    An optional hint for query optimization. See the command reference for more information.

    -
    ignoreUndefined?: boolean

    serialize will not emit undefined fields +

    ignoreUndefined?: boolean

    serialize will not emit undefined fields note that the driver sets this to false

    true

    includeResultMetadata?: boolean

    Return the ModifyResult instead of the modified document. Defaults to false

    -
    let?: Document

    Map of parameter names and values that can be accessed using $$var (requires MongoDB 5.0).

    -
    maxTimeMS?: number

    maxTimeMS is a server-side time limit in milliseconds for processing an operation.

    -
    noResponse?: boolean

    This option is deprecated and will be removed in an upcoming major version.

    -
    projection?: Document

    Limits the fields to return for all matching documents.

    -
    promoteBuffers?: boolean

    when deserializing a Binary will return it as a node.js Buffer instance.

    +
    let?: Document

    Map of parameter names and values that can be accessed using $$var (requires MongoDB 5.0).

    +
    maxTimeMS?: number

    maxTimeMS is a server-side time limit in milliseconds for processing an operation.

    +
    noResponse?: boolean

    This option is deprecated and will be removed in an upcoming major version.

    +
    projection?: Document

    Limits the fields to return for all matching documents.

    +
    promoteBuffers?: boolean

    when deserializing a Binary will return it as a node.js Buffer instance.

    false

    promoteLongs?: boolean

    when deserializing a Long will fit it into a Number if it's smaller than 53 bits.

    true

    @@ -73,18 +73,18 @@

    Please note there is a known limitation where this option cannot be used at the MongoClient level (see NODE-3946). It does correctly work at Db, Collection, and per operation the same as other BSON options work.

    -
    readConcern?: ReadConcernLike

    Specify a read concern and level for the collection. (only MongoDB 3.2 or higher supported)

    -
    readPreference?: ReadPreferenceLike

    The preferred read preference (ReadPreference.primary, ReadPreference.primary_preferred, ReadPreference.secondary, ReadPreference.secondary_preferred, ReadPreference.nearest).

    -
    retryWrites?: boolean

    This option is deprecated and will be removed in a future release as it is not used +

    readConcern?: ReadConcernLike

    Specify a read concern and level for the collection. (only MongoDB 3.2 or higher supported)

    +
    readPreference?: ReadPreferenceLike

    The preferred read preference (ReadPreference.primary, ReadPreference.primary_preferred, ReadPreference.secondary, ReadPreference.secondary_preferred, ReadPreference.nearest).

    +
    retryWrites?: boolean

    This option is deprecated and will be removed in a future release as it is not used in the driver. Use MongoClientOptions or connection string parameters instead.

    -
    returnDocument?: ReturnDocument

    When set to 'after', returns the updated document rather than the original. The default is 'before'.

    -
    serializeFunctions?: boolean

    serialize the javascript functions

    +
    returnDocument?: ReturnDocument

    When set to 'after', returns the updated document rather than the original. The default is 'before'.

    +
    serializeFunctions?: boolean

    serialize the javascript functions

    false

    session?: ClientSession

    Specify ClientSession for this command

    -
    sort?: Sort

    Determines which document the operation modifies if the query selects multiple documents.

    -
    timeoutMS?: number

    Specifies the time an operation will run until it throws a timeout error

    -
    upsert?: boolean

    Upsert the document if it does not exist.

    -
    useBigInt64?: boolean

    when deserializing a Long return as a BigInt.

    +
    sort?: Sort

    Determines which document the operation modifies if the query selects multiple documents.

    +
    timeoutMS?: number

    Specifies the time an operation will run until it throws a timeout error

    +
    upsert?: boolean

    Upsert the document if it does not exist.

    +
    useBigInt64?: boolean

    when deserializing a Long return as a BigInt.

    false

    -
    willRetryWrite?: boolean

    Write Concern as an object

    -
    +
    willRetryWrite?: boolean

    Write Concern as an object

    +
    diff --git a/docs/Next/interfaces/FindOneOptions.html b/docs/Next/interfaces/FindOneOptions.html index ae07e43e733..a0a30ff65b1 100644 --- a/docs/Next/interfaces/FindOneOptions.html +++ b/docs/Next/interfaces/FindOneOptions.html @@ -1,4 +1,4 @@ -FindOneOptions | mongodb

    Interface FindOneOptions

    interface FindOneOptions {
        allowDiskUse?: boolean;
        allowPartialResults?: boolean;
        authdb?: string;
        awaitData?: boolean;
        batchSize?: number;
        bsonRegExp?: boolean;
        checkKeys?: boolean;
        collation?: CollationOptions;
        comment?: unknown;
        dbName?: string;
        enableUtf8Validation?: boolean;
        explain?: ExplainVerbosityLike | ExplainCommandOptions;
        fieldsAsRaw?: Document;
        hint?: Hint;
        ignoreUndefined?: boolean;
        let?: Document;
        limit?: number;
        max?: Document;
        maxAwaitTimeMS?: number;
        maxTimeMS?: number;
        min?: Document;
        noCursorTimeout?: boolean;
        noResponse?: boolean;
        oplogReplay?: boolean;
        projection?: Document;
        promoteBuffers?: boolean;
        promoteLongs?: boolean;
        promoteValues?: boolean;
        raw?: boolean;
        readConcern?: ReadConcernLike;
        readPreference?: ReadPreferenceLike;
        retryWrites?: boolean;
        returnKey?: boolean;
        serializeFunctions?: boolean;
        session?: ClientSession;
        showRecordId?: boolean;
        singleBatch?: boolean;
        skip?: number;
        sort?: Sort;
        tailable?: boolean;
        timeout?: boolean;
        timeoutMS?: number;
        useBigInt64?: boolean;
        willRetryWrite?: boolean;
    }

    Hierarchy (view full)

    Properties

    allowDiskUse? +FindOneOptions | mongodb

    Interface FindOneOptions

    interface FindOneOptions {
        allowDiskUse?: boolean;
        allowPartialResults?: boolean;
        authdb?: string;
        awaitData?: boolean;
        batchSize?: number;
        bsonRegExp?: boolean;
        checkKeys?: boolean;
        collation?: CollationOptions;
        comment?: unknown;
        dbName?: string;
        enableUtf8Validation?: boolean;
        explain?: ExplainVerbosityLike | ExplainCommandOptions;
        fieldsAsRaw?: Document;
        hint?: Hint;
        ignoreUndefined?: boolean;
        let?: Document;
        limit?: number;
        max?: Document;
        maxAwaitTimeMS?: number;
        maxTimeMS?: number;
        min?: Document;
        noCursorTimeout?: boolean;
        noResponse?: boolean;
        oplogReplay?: boolean;
        projection?: Document;
        promoteBuffers?: boolean;
        promoteLongs?: boolean;
        promoteValues?: boolean;
        raw?: boolean;
        readConcern?: ReadConcernLike;
        readPreference?: ReadPreferenceLike;
        retryWrites?: boolean;
        returnKey?: boolean;
        serializeFunctions?: boolean;
        session?: ClientSession;
        showRecordId?: boolean;
        singleBatch?: boolean;
        skip?: number;
        sort?: Sort;
        tailable?: boolean;
        timeout?: boolean;
        timeoutMS?: number;
        useBigInt64?: boolean;
        willRetryWrite?: boolean;
    }

    Hierarchy (view full)

    Properties

    allowDiskUse?: boolean

    Allows disk use for blocking sort operations exceeding 100MB memory. (MongoDB 3.2 or higher)

    -
    allowPartialResults?: boolean

    For queries against a sharded collection, allows the command (or subsequent getMore commands) to return partial results, rather than an error, if one or more queried shards are unavailable.

    -
    authdb?: string
    awaitData?: boolean

    Specify if the cursor is a tailable-await cursor. Requires tailable to be true

    -
    batchSize?: number

    Will be removed in the next major version. User provided value will be ignored.

    -
    bsonRegExp?: boolean

    return BSON regular expressions as BSONRegExp instances.

    +
    allowPartialResults?: boolean

    For queries against a sharded collection, allows the command (or subsequent getMore commands) to return partial results, rather than an error, if one or more queried shards are unavailable.

    +
    authdb?: string
    awaitData?: boolean

    Specify if the cursor is a tailable-await cursor. Requires tailable to be true

    +
    batchSize?: number

    Will be removed in the next major version. User provided value will be ignored.

    +
    bsonRegExp?: boolean

    return BSON regular expressions as BSONRegExp instances.

    false

    checkKeys?: boolean

    the serializer will check if keys are valid.

    false

    collation?: CollationOptions

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

    -
    comment?: unknown

    Comment to apply to the operation.

    +
    comment?: unknown

    Comment to apply to the operation.

    In server versions pre-4.4, 'comment' must be string. A server error will be thrown if any other type is provided.

    In server versions 4.4 and above, 'comment' can be any valid BSON type.

    -
    dbName?: string
    enableUtf8Validation?: boolean

    Enable utf8 validation when deserializing BSON documents. Defaults to true.

    -

    Specifies the verbosity mode for the explain output.

    +
    dbName?: string
    enableUtf8Validation?: boolean

    Enable utf8 validation when deserializing BSON documents. Defaults to true.

    +

    Specifies the verbosity mode for the explain output.

    This API is deprecated in favor of collection.find().explain().

    -
    fieldsAsRaw?: Document

    allow to specify if there what fields we wish to return as unserialized raw buffer.

    +
    fieldsAsRaw?: Document

    allow to specify if there what fields we wish to return as unserialized raw buffer.

    null

    hint?: Hint

    Tell the query to use specific indexes in the query. Object of indexes to use, {'_id':1}

    -
    ignoreUndefined?: boolean

    serialize will not emit undefined fields +

    ignoreUndefined?: boolean

    serialize will not emit undefined fields note that the driver sets this to false

    true

    let?: Document

    Map of parameter names and values that can be accessed using $$var (requires MongoDB 5.0).

    -
    limit?: number

    Will be removed in the next major version. User provided value will be ignored.

    -
    max?: Document

    The exclusive upper bound for a specific index

    -
    maxAwaitTimeMS?: number

    The maximum amount of time for the server to wait on new documents to satisfy a tailable cursor query. Requires tailable and awaitData to be true

    -
    maxTimeMS?: number

    Number of milliseconds to wait before aborting the query.

    -
    min?: Document

    The inclusive lower bound for a specific index

    -
    noCursorTimeout?: boolean

    Will be removed in the next major version. User provided value will be ignored.

    -
    noResponse?: boolean

    This option is deprecated and will be removed in an upcoming major version.

    -
    oplogReplay?: boolean

    Option to enable an optimized code path for queries looking for a particular range of ts values in the oplog. Requires tailable to be true.

    +
    limit?: number

    Will be removed in the next major version. User provided value will be ignored.

    +
    max?: Document

    The exclusive upper bound for a specific index

    +
    maxAwaitTimeMS?: number

    The maximum amount of time for the server to wait on new documents to satisfy a tailable cursor query. Requires tailable and awaitData to be true

    +
    maxTimeMS?: number

    Number of milliseconds to wait before aborting the query.

    +
    min?: Document

    The inclusive lower bound for a specific index

    +
    noCursorTimeout?: boolean

    Will be removed in the next major version. User provided value will be ignored.

    +
    noResponse?: boolean

    This option is deprecated and will be removed in an upcoming major version.

    +
    oplogReplay?: boolean

    Option to enable an optimized code path for queries looking for a particular range of ts values in the oplog. Requires tailable to be true.

    Starting from MongoDB 4.4 this flag is not needed and will be ignored.

    -
    projection?: Document

    The fields to return in the query. Object of fields to either include or exclude (one of, not both), {'a':1, 'b': 1} or {'a': 0, 'b': 0}

    -
    promoteBuffers?: boolean

    when deserializing a Binary will return it as a node.js Buffer instance.

    +
    projection?: Document

    The fields to return in the query. Object of fields to either include or exclude (one of, not both), {'a':1, 'b': 1} or {'a': 0, 'b': 0}

    +
    promoteBuffers?: boolean

    when deserializing a Binary will return it as a node.js Buffer instance.

    false

    promoteLongs?: boolean

    when deserializing a Long will fit it into a Number if it's smaller than 53 bits.

    true

    @@ -92,21 +92,21 @@

    Please note there is a known limitation where this option cannot be used at the MongoClient level (see NODE-3946). It does correctly work at Db, Collection, and per operation the same as other BSON options work.

    -
    readConcern?: ReadConcernLike

    Specify a read concern and level for the collection. (only MongoDB 3.2 or higher supported)

    -
    readPreference?: ReadPreferenceLike

    The preferred read preference (ReadPreference.primary, ReadPreference.primary_preferred, ReadPreference.secondary, ReadPreference.secondary_preferred, ReadPreference.nearest).

    -
    retryWrites?: boolean

    This option is deprecated and will be removed in a future release as it is not used +

    readConcern?: ReadConcernLike

    Specify a read concern and level for the collection. (only MongoDB 3.2 or higher supported)

    +
    readPreference?: ReadPreferenceLike

    The preferred read preference (ReadPreference.primary, ReadPreference.primary_preferred, ReadPreference.secondary, ReadPreference.secondary_preferred, ReadPreference.nearest).

    +
    retryWrites?: boolean

    This option is deprecated and will be removed in a future release as it is not used in the driver. Use MongoClientOptions or connection string parameters instead.

    -
    returnKey?: boolean

    If true, returns only the index keys in the resulting documents.

    -
    serializeFunctions?: boolean

    serialize the javascript functions

    +
    returnKey?: boolean

    If true, returns only the index keys in the resulting documents.

    +
    serializeFunctions?: boolean

    serialize the javascript functions

    false

    session?: ClientSession

    Specify ClientSession for this command

    -
    showRecordId?: boolean

    Determines whether to return the record identifier for each document. If true, adds a field $recordId to the returned documents.

    -
    singleBatch?: boolean

    Determines whether to close the cursor after the first batch. Defaults to false.

    -
    skip?: number

    Set to skip N documents ahead in your query (useful for pagination).

    -
    sort?: Sort

    Set to sort the documents coming back from the query. Array of indexes, [['a', 1]] etc.

    -
    tailable?: boolean

    Specify if the cursor is tailable.

    -
    timeout?: boolean

    Specify if the cursor can timeout.

    -
    timeoutMS?: number

    Specifies the time an operation will run until it throws a timeout error

    -
    useBigInt64?: boolean

    when deserializing a Long return as a BigInt.

    +
    showRecordId?: boolean

    Determines whether to return the record identifier for each document. If true, adds a field $recordId to the returned documents.

    +
    singleBatch?: boolean

    Determines whether to close the cursor after the first batch. Defaults to false.

    +
    skip?: number

    Set to skip N documents ahead in your query (useful for pagination).

    +
    sort?: Sort

    Set to sort the documents coming back from the query. Array of indexes, [['a', 1]] etc.

    +
    tailable?: boolean

    Specify if the cursor is tailable.

    +
    timeout?: boolean

    Specify if the cursor can timeout.

    +
    timeoutMS?: number

    Specifies the time an operation will run until it throws a timeout error

    +
    useBigInt64?: boolean

    when deserializing a Long return as a BigInt.

    false

    -
    willRetryWrite?: boolean
    +
    willRetryWrite?: boolean
    diff --git a/docs/Next/interfaces/FindOptions.html b/docs/Next/interfaces/FindOptions.html index 27ba4bdcd24..0405bd4e59f 100644 --- a/docs/Next/interfaces/FindOptions.html +++ b/docs/Next/interfaces/FindOptions.html @@ -1,5 +1,5 @@ FindOptions | mongodb

    Interface FindOptions<TSchema>

    interface FindOptions<TSchema> {
        allowDiskUse?: boolean;
        allowPartialResults?: boolean;
        authdb?: string;
        awaitData?: boolean;
        batchSize?: number;
        bsonRegExp?: boolean;
        checkKeys?: boolean;
        collation?: CollationOptions;
        comment?: unknown;
        dbName?: string;
        enableUtf8Validation?: boolean;
        explain?: ExplainVerbosityLike | ExplainCommandOptions;
        fieldsAsRaw?: Document;
        hint?: Hint;
        ignoreUndefined?: boolean;
        let?: Document;
        limit?: number;
        max?: Document;
        maxAwaitTimeMS?: number;
        maxTimeMS?: number;
        min?: Document;
        noCursorTimeout?: boolean;
        noResponse?: boolean;
        oplogReplay?: boolean;
        projection?: Document;
        promoteBuffers?: boolean;
        promoteLongs?: boolean;
        promoteValues?: boolean;
        raw?: boolean;
        readConcern?: ReadConcernLike;
        readPreference?: ReadPreferenceLike;
        retryWrites?: boolean;
        returnKey?: boolean;
        serializeFunctions?: boolean;
        session?: ClientSession;
        showRecordId?: boolean;
        singleBatch?: boolean;
        skip?: number;
        sort?: Sort;
        tailable?: boolean;
        timeout?: boolean;
        timeoutMS?: number;
        useBigInt64?: boolean;
        willRetryWrite?: boolean;
    }

    Type Parameters

    • TSchema extends Document = Document

      Unused schema definition, deprecated usage, only specify FindOptions with no generic

      -

    Hierarchy (view full)

    Properties

    Hierarchy (view full)

    Properties

    allowDiskUse?: boolean

    Allows disk use for blocking sort operations exceeding 100MB memory. (MongoDB 3.2 or higher)

    -
    allowPartialResults?: boolean

    For queries against a sharded collection, allows the command (or subsequent getMore commands) to return partial results, rather than an error, if one or more queried shards are unavailable.

    -
    authdb?: string
    awaitData?: boolean

    Specify if the cursor is a tailable-await cursor. Requires tailable to be true

    -
    batchSize?: number

    Set the batchSize for the getMoreCommand when iterating over the query results.

    -
    bsonRegExp?: boolean

    return BSON regular expressions as BSONRegExp instances.

    +
    allowPartialResults?: boolean

    For queries against a sharded collection, allows the command (or subsequent getMore commands) to return partial results, rather than an error, if one or more queried shards are unavailable.

    +
    authdb?: string
    awaitData?: boolean

    Specify if the cursor is a tailable-await cursor. Requires tailable to be true

    +
    batchSize?: number

    Set the batchSize for the getMoreCommand when iterating over the query results.

    +
    bsonRegExp?: boolean

    return BSON regular expressions as BSONRegExp instances.

    false

    checkKeys?: boolean

    the serializer will check if keys are valid.

    false

    collation?: CollationOptions

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

    -
    comment?: unknown

    Comment to apply to the operation.

    +
    comment?: unknown

    Comment to apply to the operation.

    In server versions pre-4.4, 'comment' must be string. A server error will be thrown if any other type is provided.

    In server versions 4.4 and above, 'comment' can be any valid BSON type.

    -
    dbName?: string
    enableUtf8Validation?: boolean

    Enable utf8 validation when deserializing BSON documents. Defaults to true.

    -

    Specifies the verbosity mode for the explain output.

    +
    dbName?: string
    enableUtf8Validation?: boolean

    Enable utf8 validation when deserializing BSON documents. Defaults to true.

    +

    Specifies the verbosity mode for the explain output.

    This API is deprecated in favor of collection.find().explain().

    -
    fieldsAsRaw?: Document

    allow to specify if there what fields we wish to return as unserialized raw buffer.

    +
    fieldsAsRaw?: Document

    allow to specify if there what fields we wish to return as unserialized raw buffer.

    null

    hint?: Hint

    Tell the query to use specific indexes in the query. Object of indexes to use, {'_id':1}

    -
    ignoreUndefined?: boolean

    serialize will not emit undefined fields +

    ignoreUndefined?: boolean

    serialize will not emit undefined fields note that the driver sets this to false

    true

    let?: Document

    Map of parameter names and values that can be accessed using $$var (requires MongoDB 5.0).

    -
    limit?: number

    Sets the limit of documents returned in the query.

    -
    max?: Document

    The exclusive upper bound for a specific index

    -
    maxAwaitTimeMS?: number

    The maximum amount of time for the server to wait on new documents to satisfy a tailable cursor query. Requires tailable and awaitData to be true

    -
    maxTimeMS?: number

    Number of milliseconds to wait before aborting the query.

    -
    min?: Document

    The inclusive lower bound for a specific index

    -
    noCursorTimeout?: boolean

    The server normally times out idle cursors after an inactivity period (10 minutes) to prevent excess memory use. Set this option to prevent that.

    -
    noResponse?: boolean

    This option is deprecated and will be removed in an upcoming major version.

    -
    oplogReplay?: boolean

    Option to enable an optimized code path for queries looking for a particular range of ts values in the oplog. Requires tailable to be true.

    +
    limit?: number

    Sets the limit of documents returned in the query.

    +
    max?: Document

    The exclusive upper bound for a specific index

    +
    maxAwaitTimeMS?: number

    The maximum amount of time for the server to wait on new documents to satisfy a tailable cursor query. Requires tailable and awaitData to be true

    +
    maxTimeMS?: number

    Number of milliseconds to wait before aborting the query.

    +
    min?: Document

    The inclusive lower bound for a specific index

    +
    noCursorTimeout?: boolean

    The server normally times out idle cursors after an inactivity period (10 minutes) to prevent excess memory use. Set this option to prevent that.

    +
    noResponse?: boolean

    This option is deprecated and will be removed in an upcoming major version.

    +
    oplogReplay?: boolean

    Option to enable an optimized code path for queries looking for a particular range of ts values in the oplog. Requires tailable to be true.

    Starting from MongoDB 4.4 this flag is not needed and will be ignored.

    -
    projection?: Document

    The fields to return in the query. Object of fields to either include or exclude (one of, not both), {'a':1, 'b': 1} or {'a': 0, 'b': 0}

    -
    promoteBuffers?: boolean

    when deserializing a Binary will return it as a node.js Buffer instance.

    +
    projection?: Document

    The fields to return in the query. Object of fields to either include or exclude (one of, not both), {'a':1, 'b': 1} or {'a': 0, 'b': 0}

    +
    promoteBuffers?: boolean

    when deserializing a Binary will return it as a node.js Buffer instance.

    false

    promoteLongs?: boolean

    when deserializing a Long will fit it into a Number if it's smaller than 53 bits.

    true

    @@ -93,21 +93,21 @@

    Please note there is a known limitation where this option cannot be used at the MongoClient level (see NODE-3946). It does correctly work at Db, Collection, and per operation the same as other BSON options work.

    -
    readConcern?: ReadConcernLike

    Specify a read concern and level for the collection. (only MongoDB 3.2 or higher supported)

    -
    readPreference?: ReadPreferenceLike

    The preferred read preference (ReadPreference.primary, ReadPreference.primary_preferred, ReadPreference.secondary, ReadPreference.secondary_preferred, ReadPreference.nearest).

    -
    retryWrites?: boolean

    This option is deprecated and will be removed in a future release as it is not used +

    readConcern?: ReadConcernLike

    Specify a read concern and level for the collection. (only MongoDB 3.2 or higher supported)

    +
    readPreference?: ReadPreferenceLike

    The preferred read preference (ReadPreference.primary, ReadPreference.primary_preferred, ReadPreference.secondary, ReadPreference.secondary_preferred, ReadPreference.nearest).

    +
    retryWrites?: boolean

    This option is deprecated and will be removed in a future release as it is not used in the driver. Use MongoClientOptions or connection string parameters instead.

    -
    returnKey?: boolean

    If true, returns only the index keys in the resulting documents.

    -
    serializeFunctions?: boolean

    serialize the javascript functions

    +
    returnKey?: boolean

    If true, returns only the index keys in the resulting documents.

    +
    serializeFunctions?: boolean

    serialize the javascript functions

    false

    session?: ClientSession

    Specify ClientSession for this command

    -
    showRecordId?: boolean

    Determines whether to return the record identifier for each document. If true, adds a field $recordId to the returned documents.

    -
    singleBatch?: boolean

    Determines whether to close the cursor after the first batch. Defaults to false.

    -
    skip?: number

    Set to skip N documents ahead in your query (useful for pagination).

    -
    sort?: Sort

    Set to sort the documents coming back from the query. Array of indexes, [['a', 1]] etc.

    -
    tailable?: boolean

    Specify if the cursor is tailable.

    -
    timeout?: boolean

    Specify if the cursor can timeout.

    -
    timeoutMS?: number

    Specifies the time an operation will run until it throws a timeout error

    -
    useBigInt64?: boolean

    when deserializing a Long return as a BigInt.

    +
    showRecordId?: boolean

    Determines whether to return the record identifier for each document. If true, adds a field $recordId to the returned documents.

    +
    singleBatch?: boolean

    Determines whether to close the cursor after the first batch. Defaults to false.

    +
    skip?: number

    Set to skip N documents ahead in your query (useful for pagination).

    +
    sort?: Sort

    Set to sort the documents coming back from the query. Array of indexes, [['a', 1]] etc.

    +
    tailable?: boolean

    Specify if the cursor is tailable.

    +
    timeout?: boolean

    Specify if the cursor can timeout.

    +
    timeoutMS?: number

    Specifies the time an operation will run until it throws a timeout error

    +
    useBigInt64?: boolean

    when deserializing a Long return as a BigInt.

    false

    -
    willRetryWrite?: boolean
    +
    willRetryWrite?: boolean
    diff --git a/docs/Next/interfaces/GCPEncryptionKeyOptions.html b/docs/Next/interfaces/GCPEncryptionKeyOptions.html index c230acb2ce9..4961d825849 100644 --- a/docs/Next/interfaces/GCPEncryptionKeyOptions.html +++ b/docs/Next/interfaces/GCPEncryptionKeyOptions.html @@ -1,14 +1,14 @@ GCPEncryptionKeyOptions | mongodb

    Interface GCPEncryptionKeyOptions

    Configuration options for making an AWS encryption key

    -
    interface GCPEncryptionKeyOptions {
        endpoint?: string;
        keyName: string;
        keyRing: string;
        keyVersion?: string;
        location: string;
        projectId: string;
    }

    Properties

    interface GCPEncryptionKeyOptions {
        endpoint?: string;
        keyName: string;
        keyRing: string;
        keyVersion?: string;
        location: string;
        projectId: string;
    }

    Properties

    endpoint?: string

    KMS URL, defaults to https://www.googleapis.com/auth/cloudkms

    -
    keyName: string

    Key name

    -
    keyRing: string

    Key ring name

    -
    keyVersion?: string

    Key version

    -
    location: string

    Location name (e.g. "global")

    -
    projectId: string

    GCP project ID

    -
    +
    keyName: string

    Key name

    +
    keyRing: string

    Key ring name

    +
    keyVersion?: string

    Key version

    +
    location: string

    Location name (e.g. "global")

    +
    projectId: string

    GCP project ID

    +
    diff --git a/docs/Next/interfaces/GridFSBucketOptions.html b/docs/Next/interfaces/GridFSBucketOptions.html index f3c03888942..8151bf7df9e 100644 --- a/docs/Next/interfaces/GridFSBucketOptions.html +++ b/docs/Next/interfaces/GridFSBucketOptions.html @@ -1,12 +1,12 @@ -GridFSBucketOptions | mongodb

    Interface GridFSBucketOptions

    interface GridFSBucketOptions {
        bucketName?: string;
        chunkSizeBytes?: number;
        readPreference?: ReadPreference;
        timeoutMS?: number;
        writeConcern?: WriteConcern | WriteConcernSettings;
    }

    Hierarchy (view full)

    Properties

    bucketName? +GridFSBucketOptions | mongodb

    Interface GridFSBucketOptions

    interface GridFSBucketOptions {
        bucketName?: string;
        chunkSizeBytes?: number;
        readPreference?: ReadPreference;
        timeoutMS?: number;
        writeConcern?: WriteConcern | WriteConcernSettings;
    }

    Hierarchy (view full)

    Properties

    bucketName?: string

    The 'files' and 'chunks' collections will be prefixed with the bucket name followed by a dot.

    -
    chunkSizeBytes?: number

    Number of bytes stored in each chunk. Defaults to 255KB

    -
    readPreference?: ReadPreference

    Read preference to be passed to read operations

    -
    timeoutMS?: number

    Specifies the lifetime duration of a gridFS stream. If any async operations are in progress +

    chunkSizeBytes?: number

    Number of bytes stored in each chunk. Defaults to 255KB

    +
    readPreference?: ReadPreference

    Read preference to be passed to read operations

    +
    timeoutMS?: number

    Specifies the lifetime duration of a gridFS stream. If any async operations are in progress when this timeout expires, the stream will throw a timeout error.

    -

    Write Concern as an object

    -
    +

    Write Concern as an object

    +
    diff --git a/docs/Next/interfaces/GridFSBucketReadStreamOptions.html b/docs/Next/interfaces/GridFSBucketReadStreamOptions.html index 9cfc74d4c0e..aafed7aa1fe 100644 --- a/docs/Next/interfaces/GridFSBucketReadStreamOptions.html +++ b/docs/Next/interfaces/GridFSBucketReadStreamOptions.html @@ -1,10 +1,10 @@ -GridFSBucketReadStreamOptions | mongodb

    Interface GridFSBucketReadStreamOptions

    interface GridFSBucketReadStreamOptions {
        end?: number;
        skip?: number;
        sort?: Sort;
        start?: number;
        timeoutMS?: number;
    }

    Hierarchy (view full)

    Properties

    end? +GridFSBucketReadStreamOptions | mongodb

    Interface GridFSBucketReadStreamOptions

    interface GridFSBucketReadStreamOptions {
        end?: number;
        skip?: number;
        sort?: Sort;
        start?: number;
        timeoutMS?: number;
    }

    Hierarchy (view full)

    Properties

    end?: number

    0-indexed non-negative byte offset to the end of the file contents to be returned by the stream. end is non-inclusive

    -
    skip?: number
    sort?: Sort
    start?: number

    0-indexed non-negative byte offset from the beginning of the file

    -
    timeoutMS?: number

    Specifies the time an operation will run until it throws a timeout error

    -
    +
    skip?: number
    sort?: Sort
    start?: number

    0-indexed non-negative byte offset from the beginning of the file

    +
    timeoutMS?: number

    Specifies the time an operation will run until it throws a timeout error

    +
    diff --git a/docs/Next/interfaces/GridFSBucketReadStreamOptionsWithRevision.html b/docs/Next/interfaces/GridFSBucketReadStreamOptionsWithRevision.html index 54d4fbe26be..037884379ad 100644 --- a/docs/Next/interfaces/GridFSBucketReadStreamOptionsWithRevision.html +++ b/docs/Next/interfaces/GridFSBucketReadStreamOptionsWithRevision.html @@ -1,4 +1,4 @@ -GridFSBucketReadStreamOptionsWithRevision | mongodb

    Interface GridFSBucketReadStreamOptionsWithRevision

    interface GridFSBucketReadStreamOptionsWithRevision {
        end?: number;
        revision?: number;
        skip?: number;
        sort?: Sort;
        start?: number;
        timeoutMS?: number;
    }

    Hierarchy (view full)

    Properties

    end? +GridFSBucketReadStreamOptionsWithRevision | mongodb

    Interface GridFSBucketReadStreamOptionsWithRevision

    interface GridFSBucketReadStreamOptionsWithRevision {
        end?: number;
        revision?: number;
        skip?: number;
        sort?: Sort;
        start?: number;
        timeoutMS?: number;
    }

    Hierarchy (view full)

    Properties

    Properties

    end?: number

    0-indexed non-negative byte offset to the end of the file contents to be returned by the stream. end is non-inclusive

    -
    revision?: number

    The revision number relative to the oldest file with the given filename. 0 +

    revision?: number

    The revision number relative to the oldest file with the given filename. 0 gets you the oldest file, 1 gets you the 2nd oldest, -1 gets you the newest.

    -
    skip?: number
    sort?: Sort
    start?: number

    0-indexed non-negative byte offset from the beginning of the file

    -
    timeoutMS?: number

    Specifies the time an operation will run until it throws a timeout error

    -
    +
    skip?: number
    sort?: Sort
    start?: number

    0-indexed non-negative byte offset from the beginning of the file

    +
    timeoutMS?: number

    Specifies the time an operation will run until it throws a timeout error

    +
    diff --git a/docs/Next/interfaces/GridFSBucketWriteStreamOptions.html b/docs/Next/interfaces/GridFSBucketWriteStreamOptions.html index d75816b0f4b..011a3c22158 100644 --- a/docs/Next/interfaces/GridFSBucketWriteStreamOptions.html +++ b/docs/Next/interfaces/GridFSBucketWriteStreamOptions.html @@ -1,4 +1,4 @@ -GridFSBucketWriteStreamOptions | mongodb

    Interface GridFSBucketWriteStreamOptions

    interface GridFSBucketWriteStreamOptions {
        aliases?: string[];
        chunkSizeBytes?: number;
        contentType?: string;
        id?: ObjectId;
        metadata?: Document;
        timeoutMS?: number;
        writeConcern?: WriteConcern | WriteConcernSettings;
    }

    Hierarchy (view full)

    Properties

    aliases? +GridFSBucketWriteStreamOptions | mongodb

    Interface GridFSBucketWriteStreamOptions

    interface GridFSBucketWriteStreamOptions {
        aliases?: string[];
        chunkSizeBytes?: number;
        contentType?: string;
        id?: ObjectId;
        metadata?: Document;
        timeoutMS?: number;
        writeConcern?: WriteConcern | WriteConcernSettings;
    }

    Hierarchy (view full)

    Properties

    aliases?: string[]

    Array of strings to store in the file document's aliases field.

    Will be removed in the next major version. Add an aliases field to the metadata document instead.

    -
    chunkSizeBytes?: number

    Overwrite this bucket's chunkSizeBytes for this file

    -
    contentType?: string

    String to store in the file document's contentType field.

    +
    chunkSizeBytes?: number

    Overwrite this bucket's chunkSizeBytes for this file

    +
    contentType?: string

    String to store in the file document's contentType field.

    Will be removed in the next major version. Add a contentType field to the metadata document instead.

    -

    Custom file id for the GridFS file.

    -
    metadata?: Document

    Object to store in the file document's metadata field

    -
    timeoutMS?: number

    Specifies the time an operation will run until it throws a timeout error

    -

    Write Concern as an object

    -
    +

    Custom file id for the GridFS file.

    +
    metadata?: Document

    Object to store in the file document's metadata field

    +
    timeoutMS?: number

    Specifies the time an operation will run until it throws a timeout error

    +

    Write Concern as an object

    +
    diff --git a/docs/Next/interfaces/GridFSChunk.html b/docs/Next/interfaces/GridFSChunk.html index a66bff3c9ff..8f5df8b1c0c 100644 --- a/docs/Next/interfaces/GridFSChunk.html +++ b/docs/Next/interfaces/GridFSChunk.html @@ -1,5 +1,5 @@ -GridFSChunk | mongodb

    Interface GridFSChunk

    interface GridFSChunk {
        _id: ObjectId;
        data: Uint8Array<ArrayBufferLike> | Buffer<ArrayBufferLike>;
        files_id: ObjectId;
        n: number;
    }

    Properties

    _id +GridFSChunk | mongodb

    Interface GridFSChunk

    interface GridFSChunk {
        _id: ObjectId;
        data: Uint8Array<ArrayBufferLike> | Buffer<ArrayBufferLike>;
        files_id: ObjectId;
        n: number;
    }

    Properties

    Properties

    data: Uint8Array<ArrayBufferLike> | Buffer<ArrayBufferLike>
    files_id: ObjectId
    n: number
    +

    Properties

    data: Uint8Array<ArrayBufferLike> | Buffer<ArrayBufferLike>
    files_id: ObjectId
    n: number
    diff --git a/docs/Next/interfaces/GridFSFile.html b/docs/Next/interfaces/GridFSFile.html index 9ffaa47f6dc..d435886d79b 100644 --- a/docs/Next/interfaces/GridFSFile.html +++ b/docs/Next/interfaces/GridFSFile.html @@ -1,4 +1,4 @@ -GridFSFile | mongodb

    Interface GridFSFile

    interface GridFSFile {
        _id: ObjectId;
        aliases?: string[];
        chunkSize: number;
        contentType?: string;
        filename: string;
        length: number;
        metadata?: Document;
        uploadDate: Date;
    }

    Properties

    _id +GridFSFile | mongodb

    Interface GridFSFile

    interface GridFSFile {
        _id: ObjectId;
        aliases?: string[];
        chunkSize: number;
        contentType?: string;
        filename: string;
        length: number;
        metadata?: Document;
        uploadDate: Date;
    }

    Properties

    aliases?: string[]

    Will be removed in the next major version.

    -
    chunkSize: number
    contentType?: string

    Will be removed in the next major version.

    -
    filename: string
    length: number
    metadata?: Document
    uploadDate: Date
    +

    Properties

    aliases?: string[]

    Will be removed in the next major version.

    +
    chunkSize: number
    contentType?: string

    Will be removed in the next major version.

    +
    filename: string
    length: number
    metadata?: Document
    uploadDate: Date
    diff --git a/docs/Next/interfaces/HedgeOptions.html b/docs/Next/interfaces/HedgeOptions.html index b161ca2f4a6..abc8d3179fb 100644 --- a/docs/Next/interfaces/HedgeOptions.html +++ b/docs/Next/interfaces/HedgeOptions.html @@ -1,3 +1,3 @@ -HedgeOptions | mongodb

    Interface HedgeOptions

    interface HedgeOptions {
        enabled?: boolean;
    }

    Properties

    enabled? +HedgeOptions | mongodb

    Interface HedgeOptions

    interface HedgeOptions {
        enabled?: boolean;
    }

    Properties

    Properties

    enabled?: boolean

    Explicitly enable or disable hedged reads.

    -
    +
    diff --git a/docs/Next/interfaces/IdPInfo.html b/docs/Next/interfaces/IdPInfo.html index e918d639432..c0444e92976 100644 --- a/docs/Next/interfaces/IdPInfo.html +++ b/docs/Next/interfaces/IdPInfo.html @@ -1,10 +1,10 @@ IdPInfo | mongodb

    Interface IdPInfo

    The information returned by the server on the IDP server.

    -
    interface IdPInfo {
        clientId: string;
        issuer: string;
        requestScopes?: string[];
    }

    Properties

    interface IdPInfo {
        clientId: string;
        issuer: string;
        requestScopes?: string[];
    }

    Properties

    clientId: string

    A unique client ID for this OIDC client.

    -
    issuer: string

    A URL which describes the Authentication Server. This identifier should +

    issuer: string

    A URL which describes the Authentication Server. This identifier should be the iss of provided access tokens, and be viable for RFC8414 metadata discovery and RFC9207 identification.

    -
    requestScopes?: string[]

    A list of additional scopes to request from IdP.

    -
    +
    requestScopes?: string[]

    A list of additional scopes to request from IdP.

    +
    diff --git a/docs/Next/interfaces/IdPServerResponse.html b/docs/Next/interfaces/IdPServerResponse.html index 875fb9ec02f..271f65d7953 100644 --- a/docs/Next/interfaces/IdPServerResponse.html +++ b/docs/Next/interfaces/IdPServerResponse.html @@ -1,9 +1,9 @@ IdPServerResponse | mongodb

    Interface IdPServerResponse

    The response from the IdP server with the access token and optional expiration time and refresh token.

    -
    interface IdPServerResponse {
        accessToken: string;
        expiresInSeconds?: number;
        refreshToken?: string;
    }

    Properties

    interface IdPServerResponse {
        accessToken: string;
        expiresInSeconds?: number;
        refreshToken?: string;
    }

    Properties

    accessToken: string

    The OIDC access token.

    -
    expiresInSeconds?: number

    The time when the access token expires. For future use.

    -
    refreshToken?: string

    The refresh token, if applicable, to be used by the callback to request a new token from the issuer.

    -
    +
    expiresInSeconds?: number

    The time when the access token expires. For future use.

    +
    refreshToken?: string

    The refresh token, if applicable, to be used by the callback to request a new token from the issuer.

    +
    diff --git a/docs/Next/interfaces/IndexDescription.html b/docs/Next/interfaces/IndexDescription.html index a3838dca2ca..064c790976f 100644 --- a/docs/Next/interfaces/IndexDescription.html +++ b/docs/Next/interfaces/IndexDescription.html @@ -1,4 +1,4 @@ -IndexDescription | mongodb

    Interface IndexDescription

    interface IndexDescription {
        2dsphereIndexVersion?: number;
        background?: boolean;
        bits?: number;
        bucketSize?: number;
        collation?: CollationOptions;
        default_language?: string;
        expireAfterSeconds?: number;
        hidden?: boolean;
        key: {
            [key: string]: IndexDirection;
        } | Map<string, IndexDirection>;
        language_override?: string;
        max?: number;
        min?: number;
        name?: string;
        partialFilterExpression?: Document;
        sparse?: boolean;
        storageEngine?: Document;
        textIndexVersion?: number;
        unique?: boolean;
        version?: number;
        weights?: Document;
        wildcardProjection?: Document;
    }

    Hierarchy

    • Pick<CreateIndexesOptions,
          | "background"
          | "unique"
          | "partialFilterExpression"
          | "sparse"
          | "hidden"
          | "expireAfterSeconds"
          | "storageEngine"
          | "version"
          | "weights"
          | "default_language"
          | "language_override"
          | "textIndexVersion"
          | "2dsphereIndexVersion"
          | "bits"
          | "min"
          | "max"
          | "bucketSize"
          | "wildcardProjection">
      • IndexDescription

    Properties

    2dsphereIndexVersion? +IndexDescription | mongodb

    Interface IndexDescription

    interface IndexDescription {
        2dsphereIndexVersion?: number;
        background?: boolean;
        bits?: number;
        bucketSize?: number;
        collation?: CollationOptions;
        default_language?: string;
        expireAfterSeconds?: number;
        hidden?: boolean;
        key: {
            [key: string]: IndexDirection;
        } | Map<string, IndexDirection>;
        language_override?: string;
        max?: number;
        min?: number;
        name?: string;
        partialFilterExpression?: Document;
        sparse?: boolean;
        storageEngine?: Document;
        textIndexVersion?: number;
        unique?: boolean;
        version?: number;
        weights?: Document;
        wildcardProjection?: Document;
    }

    Hierarchy

    • Pick<CreateIndexesOptions,
          | "background"
          | "unique"
          | "partialFilterExpression"
          | "sparse"
          | "hidden"
          | "expireAfterSeconds"
          | "storageEngine"
          | "version"
          | "weights"
          | "default_language"
          | "language_override"
          | "textIndexVersion"
          | "2dsphereIndexVersion"
          | "bits"
          | "min"
          | "max"
          | "bucketSize"
          | "wildcardProjection">
      • IndexDescription

    Properties

    2dsphereIndexVersion?: number
    background?: boolean

    Creates the index in the background, yielding whenever possible.

    -
    bits?: number
    bucketSize?: number
    collation?: CollationOptions
    default_language?: string
    expireAfterSeconds?: number

    Allows you to expire data on indexes applied to a data (MongoDB 2.2 or higher)

    -
    hidden?: boolean

    Specifies that the index should exist on the target collection but should not be used by the query planner when executing operations. (MongoDB 4.4 or higher)

    -
    key: {
        [key: string]: IndexDirection;
    } | Map<string, IndexDirection>
    language_override?: string
    max?: number

    For geospatial indexes set the high bound for the co-ordinates.

    -
    min?: number

    For geospatial indexes set the lower bound for the co-ordinates.

    -
    name?: string
    partialFilterExpression?: Document

    Creates a partial index based on the given filter object (MongoDB 3.2 or higher)

    -
    sparse?: boolean

    Creates a sparse index.

    -
    storageEngine?: Document

    Allows users to configure the storage engine on a per-index basis when creating an index. (MongoDB 3.0 or higher)

    -
    textIndexVersion?: number
    unique?: boolean

    Creates an unique index.

    -
    version?: number

    Specifies the index version number, either 0 or 1.

    -
    weights?: Document
    wildcardProjection?: Document
    +

    Properties

    2dsphereIndexVersion?: number
    background?: boolean

    Creates the index in the background, yielding whenever possible.

    +
    bits?: number
    bucketSize?: number
    collation?: CollationOptions
    default_language?: string
    expireAfterSeconds?: number

    Allows you to expire data on indexes applied to a data (MongoDB 2.2 or higher)

    +
    hidden?: boolean

    Specifies that the index should exist on the target collection but should not be used by the query planner when executing operations. (MongoDB 4.4 or higher)

    +
    key: {
        [key: string]: IndexDirection;
    } | Map<string, IndexDirection>
    language_override?: string
    max?: number

    For geospatial indexes set the high bound for the co-ordinates.

    +
    min?: number

    For geospatial indexes set the lower bound for the co-ordinates.

    +
    name?: string
    partialFilterExpression?: Document

    Creates a partial index based on the given filter object (MongoDB 3.2 or higher)

    +
    sparse?: boolean

    Creates a sparse index.

    +
    storageEngine?: Document

    Allows users to configure the storage engine on a per-index basis when creating an index. (MongoDB 3.0 or higher)

    +
    textIndexVersion?: number
    unique?: boolean

    Creates an unique index.

    +
    version?: number

    Specifies the index version number, either 0 or 1.

    +
    weights?: Document
    wildcardProjection?: Document
    diff --git a/docs/Next/interfaces/IndexInformationOptions.html b/docs/Next/interfaces/IndexInformationOptions.html index fcbff6a4b80..703a7993d68 100644 --- a/docs/Next/interfaces/IndexInformationOptions.html +++ b/docs/Next/interfaces/IndexInformationOptions.html @@ -1,4 +1,4 @@ -IndexInformationOptions | mongodb

    Interface IndexInformationOptions

    interface IndexInformationOptions {
        awaitData?: boolean;
        batchSize?: number;
        bsonRegExp?: boolean;
        checkKeys?: boolean;
        comment?: unknown;
        enableUtf8Validation?: boolean;
        fieldsAsRaw?: Document;
        full?: boolean;
        ignoreUndefined?: boolean;
        maxAwaitTimeMS?: number;
        maxTimeMS?: number;
        noCursorTimeout?: boolean;
        promoteBuffers?: boolean;
        promoteLongs?: boolean;
        promoteValues?: boolean;
        raw?: boolean;
        readConcern?: ReadConcernLike;
        readPreference?: ReadPreferenceLike;
        serializeFunctions?: boolean;
        session?: ClientSession;
        tailable?: boolean;
        timeoutMode?: CursorTimeoutMode;
        timeoutMS?: number;
        useBigInt64?: boolean;
    }

    Hierarchy (view full)

    Properties

    awaitData? +IndexInformationOptions | mongodb

    Interface IndexInformationOptions

    interface IndexInformationOptions {
        awaitData?: boolean;
        batchSize?: number;
        bsonRegExp?: boolean;
        checkKeys?: boolean;
        comment?: unknown;
        enableUtf8Validation?: boolean;
        fieldsAsRaw?: Document;
        full?: boolean;
        ignoreUndefined?: boolean;
        maxAwaitTimeMS?: number;
        maxTimeMS?: number;
        noCursorTimeout?: boolean;
        promoteBuffers?: boolean;
        promoteLongs?: boolean;
        promoteValues?: boolean;
        raw?: boolean;
        readConcern?: ReadConcernLike;
        readPreference?: ReadPreferenceLike;
        serializeFunctions?: boolean;
        session?: ClientSession;
        tailable?: boolean;
        timeoutMode?: CursorTimeoutMode;
        timeoutMS?: number;
        useBigInt64?: boolean;
    }

    Hierarchy (view full)

    Properties

    awaitData? batchSize? bsonRegExp? checkKeys? @@ -26,8 +26,8 @@ MongoDB blocks the query thread for a period of time waiting for new data to arrive. When new data is inserted into the capped collection, the blocked thread is signaled to wake up and return the next batch to the client.

    -
    batchSize?: number

    Specifies the number of documents to return in each response from MongoDB

    -
    bsonRegExp?: boolean

    return BSON regular expressions as BSONRegExp instances.

    +
    batchSize?: number

    Specifies the number of documents to return in each response from MongoDB

    +
    bsonRegExp?: boolean

    return BSON regular expressions as BSONRegExp instances.

    false

    checkKeys?: boolean

    the serializer will check if keys are valid.

    false

    @@ -35,8 +35,8 @@

    In server versions pre-4.4, 'comment' must be string. A server error will be thrown if any other type is provided.

    In server versions 4.4 and above, 'comment' can be any valid BSON type.

    -
    enableUtf8Validation?: boolean

    Enable utf8 validation when deserializing BSON documents. Defaults to true.

    -
    fieldsAsRaw?: Document

    allow to specify if there what fields we wish to return as unserialized raw buffer.

    +
    enableUtf8Validation?: boolean

    Enable utf8 validation when deserializing BSON documents. Defaults to true.

    +
    fieldsAsRaw?: Document

    allow to specify if there what fields we wish to return as unserialized raw buffer.

    null

    full?: boolean

    When true, an array of index descriptions is returned. When false, the driver returns an object that with keys corresponding to index names with values @@ -49,14 +49,14 @@

    {
    'a_1': [['a', 1]],
    'b_1_c_1': [['b', 1], ['c', 1]],
    }
    -
    ignoreUndefined?: boolean

    serialize will not emit undefined fields +

    ignoreUndefined?: boolean

    serialize will not emit undefined fields note that the driver sets this to false

    true

    maxAwaitTimeMS?: number

    When applicable maxAwaitTimeMS controls the amount of time subsequent getMores that a cursor uses to fetch more data should take. (ex. cursor.next())

    -
    maxTimeMS?: number

    When applicable maxTimeMS controls the amount of time the initial command +

    maxTimeMS?: number

    When applicable maxTimeMS controls the amount of time the initial command that constructs a cursor should take. (ex. find, aggregate, listCollections)

    -
    noCursorTimeout?: boolean
    promoteBuffers?: boolean

    when deserializing a Binary will return it as a node.js Buffer instance.

    +
    noCursorTimeout?: boolean
    promoteBuffers?: boolean

    when deserializing a Binary will return it as a node.js Buffer instance.

    false

    promoteLongs?: boolean

    when deserializing a Long will fit it into a Number if it's smaller than 53 bits.

    true

    @@ -73,13 +73,13 @@

    Please note there is a known limitation where this option cannot be used at the MongoClient level (see NODE-3946). It does correctly work at Db, Collection, and per operation the same as other BSON options work.

    -
    readConcern?: ReadConcernLike
    readPreference?: ReadPreferenceLike
    serializeFunctions?: boolean

    serialize the javascript functions

    +
    readConcern?: ReadConcernLike
    readPreference?: ReadPreferenceLike
    serializeFunctions?: boolean

    serialize the javascript functions

    false

    -
    session?: ClientSession
    tailable?: boolean

    By default, MongoDB will automatically close a cursor when the +

    session?: ClientSession
    tailable?: boolean

    By default, MongoDB will automatically close a cursor when the client has exhausted all results in the cursor. However, for capped collections you may use a Tailable Cursor that remains open after the client exhausts the results in the initial cursor.

    -
    timeoutMode?: CursorTimeoutMode

    Specifies how timeoutMS is applied to the cursor. Can be either 'cursorLifeTime' or 'iteration' +

    timeoutMode?: CursorTimeoutMode

    Specifies how timeoutMS is applied to the cursor. Can be either 'cursorLifeTime' or 'iteration' When set to 'iteration', the deadline specified by timeoutMS applies to each call of cursor.next(). When set to 'cursorLifetime', the deadline applies to the life of the entire cursor.

    @@ -93,7 +93,7 @@
    const cursor = collection.find({}, { timeoutMS: 1000, timeoutMode: 'cursorLifetime' });
    const docs = await cursor.toArray(); // This entire line will throw a timeout error if all batches are not fetched and returned within 1000ms.
    -
    timeoutMS?: number

    Specifies the time an operation will run until it throws a timeout error. See AbstractCursorOptions.timeoutMode for more details on how this option applies to cursors.

    -
    useBigInt64?: boolean

    when deserializing a Long return as a BigInt.

    +
    timeoutMS?: number

    Specifies the time an operation will run until it throws a timeout error. See AbstractCursorOptions.timeoutMode for more details on how this option applies to cursors.

    +
    useBigInt64?: boolean

    when deserializing a Long return as a BigInt.

    false

    diff --git a/docs/Next/interfaces/InsertManyResult.html b/docs/Next/interfaces/InsertManyResult.html index 8cda7304180..96b85280d11 100644 --- a/docs/Next/interfaces/InsertManyResult.html +++ b/docs/Next/interfaces/InsertManyResult.html @@ -1,7 +1,7 @@ -InsertManyResult | mongodb

    Interface InsertManyResult<TSchema>

    interface InsertManyResult<TSchema> {
        acknowledged: boolean;
        insertedCount: number;
        insertedIds: {
            [key: number]: InferIdType<TSchema>;
        };
    }

    Type Parameters

    Properties

    acknowledged +InsertManyResult | mongodb

    Interface InsertManyResult<TSchema>

    interface InsertManyResult<TSchema> {
        acknowledged: boolean;
        insertedCount: number;
        insertedIds: {
            [key: number]: InferIdType<TSchema>;
        };
    }

    Type Parameters

    Properties

    acknowledged: boolean

    Indicates whether this write result was acknowledged. If not, then all other members of this result will be undefined

    -
    insertedCount: number

    The number of inserted documents for this operations

    -
    insertedIds: {
        [key: number]: InferIdType<TSchema>;
    }

    Map of the index of the inserted document to the id of the inserted document

    -
    +
    insertedCount: number

    The number of inserted documents for this operations

    +
    insertedIds: {
        [key: number]: InferIdType<TSchema>;
    }

    Map of the index of the inserted document to the id of the inserted document

    +
    diff --git a/docs/Next/interfaces/InsertOneModel.html b/docs/Next/interfaces/InsertOneModel.html index aecb3a5272a..f40e19c8745 100644 --- a/docs/Next/interfaces/InsertOneModel.html +++ b/docs/Next/interfaces/InsertOneModel.html @@ -1,3 +1,3 @@ -InsertOneModel | mongodb

    Interface InsertOneModel<TSchema>

    interface InsertOneModel<TSchema> {
        document: OptionalId<TSchema>;
    }

    Type Parameters

    Properties

    document +InsertOneModel | mongodb

    Interface InsertOneModel<TSchema>

    interface InsertOneModel<TSchema> {
        document: OptionalId<TSchema>;
    }

    Type Parameters

    Properties

    Properties

    document: OptionalId<TSchema>

    The document to insert.

    -
    +
    diff --git a/docs/Next/interfaces/InsertOneOptions.html b/docs/Next/interfaces/InsertOneOptions.html index 58147d1a725..9ff32efe2cf 100644 --- a/docs/Next/interfaces/InsertOneOptions.html +++ b/docs/Next/interfaces/InsertOneOptions.html @@ -1,4 +1,4 @@ -InsertOneOptions | mongodb

    Interface InsertOneOptions

    interface InsertOneOptions {
        authdb?: string;
        bsonRegExp?: boolean;
        bypassDocumentValidation?: boolean;
        checkKeys?: boolean;
        collation?: CollationOptions;
        comment?: unknown;
        dbName?: string;
        enableUtf8Validation?: boolean;
        explain?: ExplainVerbosityLike | ExplainCommandOptions;
        fieldsAsRaw?: Document;
        forceServerObjectId?: boolean;
        ignoreUndefined?: boolean;
        maxTimeMS?: number;
        noResponse?: boolean;
        promoteBuffers?: boolean;
        promoteLongs?: boolean;
        promoteValues?: boolean;
        raw?: boolean;
        readConcern?: ReadConcernLike;
        readPreference?: ReadPreferenceLike;
        retryWrites?: boolean;
        serializeFunctions?: boolean;
        session?: ClientSession;
        timeoutMS?: number;
        useBigInt64?: boolean;
        willRetryWrite?: boolean;
        writeConcern?: WriteConcern | WriteConcernSettings;
    }

    Hierarchy (view full)

    Properties

    authdb? +InsertOneOptions | mongodb

    Interface InsertOneOptions

    interface InsertOneOptions {
        authdb?: string;
        bsonRegExp?: boolean;
        bypassDocumentValidation?: boolean;
        checkKeys?: boolean;
        collation?: CollationOptions;
        comment?: unknown;
        dbName?: string;
        enableUtf8Validation?: boolean;
        explain?: ExplainVerbosityLike | ExplainCommandOptions;
        fieldsAsRaw?: Document;
        forceServerObjectId?: boolean;
        ignoreUndefined?: boolean;
        maxTimeMS?: number;
        noResponse?: boolean;
        promoteBuffers?: boolean;
        promoteLongs?: boolean;
        promoteValues?: boolean;
        raw?: boolean;
        readConcern?: ReadConcernLike;
        readPreference?: ReadPreferenceLike;
        retryWrites?: boolean;
        serializeFunctions?: boolean;
        session?: ClientSession;
        timeoutMS?: number;
        useBigInt64?: boolean;
        willRetryWrite?: boolean;
        writeConcern?: WriteConcern | WriteConcernSettings;
    }

    Hierarchy (view full)

    Properties

    authdb?: string
    bsonRegExp?: boolean

    return BSON regular expressions as BSONRegExp instances.

    +

    Properties

    authdb?: string
    bsonRegExp?: boolean

    return BSON regular expressions as BSONRegExp instances.

    false

    bypassDocumentValidation?: boolean

    Allow driver to bypass schema validation.

    -
    checkKeys?: boolean

    the serializer will check if keys are valid.

    +
    checkKeys?: boolean

    the serializer will check if keys are valid.

    false

    collation?: CollationOptions

    Collation

    -
    comment?: unknown

    Comment to apply to the operation.

    +
    comment?: unknown

    Comment to apply to the operation.

    In server versions pre-4.4, 'comment' must be string. A server error will be thrown if any other type is provided.

    In server versions 4.4 and above, 'comment' can be any valid BSON type.

    -
    dbName?: string
    enableUtf8Validation?: boolean

    Enable utf8 validation when deserializing BSON documents. Defaults to true.

    -

    Specifies the verbosity mode for the explain output.

    -
    fieldsAsRaw?: Document

    allow to specify if there what fields we wish to return as unserialized raw buffer.

    +
    dbName?: string
    enableUtf8Validation?: boolean

    Enable utf8 validation when deserializing BSON documents. Defaults to true.

    +

    Specifies the verbosity mode for the explain output.

    +
    fieldsAsRaw?: Document

    allow to specify if there what fields we wish to return as unserialized raw buffer.

    null

    forceServerObjectId?: boolean

    Force server to assign _id values instead of driver.

    -
    ignoreUndefined?: boolean

    serialize will not emit undefined fields +

    ignoreUndefined?: boolean

    serialize will not emit undefined fields note that the driver sets this to false

    true

    maxTimeMS?: number

    maxTimeMS is a server-side time limit in milliseconds for processing an operation.

    -
    noResponse?: boolean

    This option is deprecated and will be removed in an upcoming major version.

    -
    promoteBuffers?: boolean

    when deserializing a Binary will return it as a node.js Buffer instance.

    +
    noResponse?: boolean

    This option is deprecated and will be removed in an upcoming major version.

    +
    promoteBuffers?: boolean

    when deserializing a Binary will return it as a node.js Buffer instance.

    false

    promoteLongs?: boolean

    when deserializing a Long will fit it into a Number if it's smaller than 53 bits.

    true

    @@ -62,15 +62,15 @@

    Please note there is a known limitation where this option cannot be used at the MongoClient level (see NODE-3946). It does correctly work at Db, Collection, and per operation the same as other BSON options work.

    -
    readConcern?: ReadConcernLike

    Specify a read concern and level for the collection. (only MongoDB 3.2 or higher supported)

    -
    readPreference?: ReadPreferenceLike

    The preferred read preference (ReadPreference.primary, ReadPreference.primary_preferred, ReadPreference.secondary, ReadPreference.secondary_preferred, ReadPreference.nearest).

    -
    retryWrites?: boolean

    This option is deprecated and will be removed in a future release as it is not used +

    readConcern?: ReadConcernLike

    Specify a read concern and level for the collection. (only MongoDB 3.2 or higher supported)

    +
    readPreference?: ReadPreferenceLike

    The preferred read preference (ReadPreference.primary, ReadPreference.primary_preferred, ReadPreference.secondary, ReadPreference.secondary_preferred, ReadPreference.nearest).

    +
    retryWrites?: boolean

    This option is deprecated and will be removed in a future release as it is not used in the driver. Use MongoClientOptions or connection string parameters instead.

    -
    serializeFunctions?: boolean

    serialize the javascript functions

    +
    serializeFunctions?: boolean

    serialize the javascript functions

    false

    session?: ClientSession

    Specify ClientSession for this command

    -
    timeoutMS?: number

    Specifies the time an operation will run until it throws a timeout error

    -
    useBigInt64?: boolean

    when deserializing a Long return as a BigInt.

    +
    timeoutMS?: number

    Specifies the time an operation will run until it throws a timeout error

    +
    useBigInt64?: boolean

    when deserializing a Long return as a BigInt.

    false

    -
    willRetryWrite?: boolean

    Write Concern as an object

    -
    +
    willRetryWrite?: boolean

    Write Concern as an object

    +
    diff --git a/docs/Next/interfaces/InsertOneResult.html b/docs/Next/interfaces/InsertOneResult.html index 106f5245819..719be1209b5 100644 --- a/docs/Next/interfaces/InsertOneResult.html +++ b/docs/Next/interfaces/InsertOneResult.html @@ -1,5 +1,5 @@ -InsertOneResult | mongodb

    Interface InsertOneResult<TSchema>

    interface InsertOneResult<TSchema> {
        acknowledged: boolean;
        insertedId: InferIdType<TSchema>;
    }

    Type Parameters

    Properties

    acknowledged +InsertOneResult | mongodb

    Interface InsertOneResult<TSchema>

    interface InsertOneResult<TSchema> {
        acknowledged: boolean;
        insertedId: InferIdType<TSchema>;
    }

    Type Parameters

    Properties

    acknowledged: boolean

    Indicates whether this write result was acknowledged. If not, then all other members of this result will be undefined

    -
    insertedId: InferIdType<TSchema>

    The identifier that was inserted. If the server generated the identifier, this value will be null as the driver does not have access to that data

    -
    +
    insertedId: InferIdType<TSchema>

    The identifier that was inserted. If the server generated the identifier, this value will be null as the driver does not have access to that data

    +
    diff --git a/docs/Next/interfaces/KMIPEncryptionKeyOptions.html b/docs/Next/interfaces/KMIPEncryptionKeyOptions.html index e2e61e40ac4..dca46c2c97b 100644 --- a/docs/Next/interfaces/KMIPEncryptionKeyOptions.html +++ b/docs/Next/interfaces/KMIPEncryptionKeyOptions.html @@ -1,10 +1,10 @@ KMIPEncryptionKeyOptions | mongodb

    Interface KMIPEncryptionKeyOptions

    Configuration options for making a KMIP encryption key

    -
    interface KMIPEncryptionKeyOptions {
        delegated?: boolean;
        endpoint?: string;
        keyId?: string;
    }

    Properties

    interface KMIPEncryptionKeyOptions {
        delegated?: boolean;
        endpoint?: string;
        keyId?: string;
    }

    Properties

    delegated?: boolean

    If true, this key should be decrypted by the KMIP server.

    Requires mongodb-client-encryption>=6.0.1.

    -
    endpoint?: string

    Host with optional port.

    -
    keyId?: string

    keyId is the KMIP Unique Identifier to a 96 byte KMIP Secret Data managed object.

    +
    endpoint?: string

    Host with optional port.

    +
    keyId?: string

    keyId is the KMIP Unique Identifier to a 96 byte KMIP Secret Data managed object.

    If keyId is omitted, a random 96 byte KMIP Secret Data managed object will be created.

    -
    +
    diff --git a/docs/Next/interfaces/KMIPKMSProviderConfiguration.html b/docs/Next/interfaces/KMIPKMSProviderConfiguration.html index 2755c822532..ef4bd182446 100644 --- a/docs/Next/interfaces/KMIPKMSProviderConfiguration.html +++ b/docs/Next/interfaces/KMIPKMSProviderConfiguration.html @@ -1,5 +1,5 @@ -KMIPKMSProviderConfiguration | mongodb

    Interface KMIPKMSProviderConfiguration

    interface KMIPKMSProviderConfiguration {
        endpoint?: string;
    }

    Properties

    endpoint? +KMIPKMSProviderConfiguration | mongodb

    Interface KMIPKMSProviderConfiguration

    interface KMIPKMSProviderConfiguration {
        endpoint?: string;
    }

    Properties

    Properties

    endpoint?: string

    The output endpoint string. The endpoint consists of a hostname and port separated by a colon. E.g. "example.com:123". A port is always present.

    -
    +
    diff --git a/docs/Next/interfaces/KMSProviders.html b/docs/Next/interfaces/KMSProviders.html index 172ed3c192e..433cd526319 100644 --- a/docs/Next/interfaces/KMSProviders.html +++ b/docs/Next/interfaces/KMSProviders.html @@ -1,13 +1,13 @@ KMSProviders | mongodb

    Interface KMSProviders

    Configuration options that are used by specific KMS providers during key generation, encryption, and decryption.

    Named KMS providers are not supported for automatic KMS credential fetching.

    -
    interface KMSProviders {
        aws?: AWSKMSProviderConfiguration | Record<string, never>;
        azure?: AzureKMSProviderConfiguration | Record<string, never>;
        gcp?: GCPKMSProviderConfiguration | Record<string, never>;
        kmip?: KMIPKMSProviderConfiguration;
        local?: LocalKMSProviderConfiguration;
        [key: `aws:${string}`]: AWSKMSProviderConfiguration;
        [key: `local:${string}`]: LocalKMSProviderConfiguration;
        [key: `kmip:${string}`]: KMIPKMSProviderConfiguration;
        [key: `azure:${string}`]: AzureKMSProviderConfiguration;
        [key: `gcp:${string}`]: GCPKMSProviderConfiguration;
    }

    Indexable

    Properties

    interface KMSProviders {
        aws?: AWSKMSProviderConfiguration | Record<string, never>;
        azure?: AzureKMSProviderConfiguration | Record<string, never>;
        gcp?: GCPKMSProviderConfiguration | Record<string, never>;
        kmip?: KMIPKMSProviderConfiguration;
        local?: LocalKMSProviderConfiguration;
        [key: `aws:${string}`]: AWSKMSProviderConfiguration;
        [key: `local:${string}`]: LocalKMSProviderConfiguration;
        [key: `kmip:${string}`]: KMIPKMSProviderConfiguration;
        [key: `azure:${string}`]: AzureKMSProviderConfiguration;
        [key: `gcp:${string}`]: GCPKMSProviderConfiguration;
    }

    Indexable

    Properties

    aws?: AWSKMSProviderConfiguration | Record<string, never>

    Configuration options for using 'aws' as your KMS provider

    -
    azure?: AzureKMSProviderConfiguration | Record<string, never>

    Configuration options for using 'azure' as your KMS provider

    -
    gcp?: GCPKMSProviderConfiguration | Record<string, never>

    Configuration options for using 'gcp' as your KMS provider

    -

    Configuration options for using 'kmip' as your KMS provider

    -

    Configuration options for using 'local' as your KMS provider

    -
    +
    azure?: AzureKMSProviderConfiguration | Record<string, never>

    Configuration options for using 'azure' as your KMS provider

    +
    gcp?: GCPKMSProviderConfiguration | Record<string, never>

    Configuration options for using 'gcp' as your KMS provider

    +

    Configuration options for using 'kmip' as your KMS provider

    +

    Configuration options for using 'local' as your KMS provider

    +
    diff --git a/docs/Next/interfaces/ListCollectionsOptions.html b/docs/Next/interfaces/ListCollectionsOptions.html index 267346531e6..67366fd5ca8 100644 --- a/docs/Next/interfaces/ListCollectionsOptions.html +++ b/docs/Next/interfaces/ListCollectionsOptions.html @@ -1,4 +1,4 @@ -ListCollectionsOptions | mongodb

    Interface ListCollectionsOptions

    interface ListCollectionsOptions {
        authdb?: string;
        authorizedCollections?: boolean;
        batchSize?: number;
        bsonRegExp?: boolean;
        checkKeys?: boolean;
        collation?: CollationOptions;
        comment?: unknown;
        dbName?: string;
        enableUtf8Validation?: boolean;
        explain?: ExplainVerbosityLike | ExplainCommandOptions;
        fieldsAsRaw?: Document;
        ignoreUndefined?: boolean;
        maxTimeMS?: number;
        nameOnly?: boolean;
        noResponse?: boolean;
        promoteBuffers?: boolean;
        promoteLongs?: boolean;
        promoteValues?: boolean;
        raw?: boolean;
        readConcern?: ReadConcernLike;
        readPreference?: ReadPreferenceLike;
        retryWrites?: boolean;
        serializeFunctions?: boolean;
        session?: ClientSession;
        signal?: AbortSignal;
        timeoutMS?: number;
        useBigInt64?: boolean;
        willRetryWrite?: boolean;
    }

    Hierarchy (view full)

    Properties

    authdb? +ListCollectionsOptions | mongodb

    Interface ListCollectionsOptions

    interface ListCollectionsOptions {
        authdb?: string;
        authorizedCollections?: boolean;
        batchSize?: number;
        bsonRegExp?: boolean;
        checkKeys?: boolean;
        collation?: CollationOptions;
        comment?: unknown;
        dbName?: string;
        enableUtf8Validation?: boolean;
        explain?: ExplainVerbosityLike | ExplainCommandOptions;
        fieldsAsRaw?: Document;
        ignoreUndefined?: boolean;
        maxTimeMS?: number;
        nameOnly?: boolean;
        noResponse?: boolean;
        promoteBuffers?: boolean;
        promoteLongs?: boolean;
        promoteValues?: boolean;
        raw?: boolean;
        readConcern?: ReadConcernLike;
        readPreference?: ReadPreferenceLike;
        retryWrites?: boolean;
        serializeFunctions?: boolean;
        session?: ClientSession;
        signal?: AbortSignal;
        timeoutMS?: number;
        useBigInt64?: boolean;
        willRetryWrite?: boolean;
    }

    Hierarchy (view full)

    Properties

    authdb?: string
    authorizedCollections?: boolean

    Since 4.0: If true and nameOnly is true, allows a user without the required privilege (i.e. listCollections action on the database) to run the command when access control is enforced.

    -
    batchSize?: number

    The batchSize for the returned command cursor or if pre 2.8 the systems batch collection

    -
    bsonRegExp?: boolean

    return BSON regular expressions as BSONRegExp instances.

    +

    Properties

    authdb?: string
    authorizedCollections?: boolean

    Since 4.0: If true and nameOnly is true, allows a user without the required privilege (i.e. listCollections action on the database) to run the command when access control is enforced.

    +
    batchSize?: number

    The batchSize for the returned command cursor or if pre 2.8 the systems batch collection

    +
    bsonRegExp?: boolean

    return BSON regular expressions as BSONRegExp instances.

    false

    checkKeys?: boolean

    the serializer will check if keys are valid.

    false

    collation?: CollationOptions

    Collation

    -
    comment?: unknown

    Comment to apply to the operation.

    +
    comment?: unknown

    Comment to apply to the operation.

    In server versions pre-4.4, 'comment' must be string. A server error will be thrown if any other type is provided.

    In server versions 4.4 and above, 'comment' can be any valid BSON type.

    -
    dbName?: string
    enableUtf8Validation?: boolean

    Enable utf8 validation when deserializing BSON documents. Defaults to true.

    -

    Specifies the verbosity mode for the explain output.

    -
    fieldsAsRaw?: Document

    allow to specify if there what fields we wish to return as unserialized raw buffer.

    +
    dbName?: string
    enableUtf8Validation?: boolean

    Enable utf8 validation when deserializing BSON documents. Defaults to true.

    +

    Specifies the verbosity mode for the explain output.

    +
    fieldsAsRaw?: Document

    allow to specify if there what fields we wish to return as unserialized raw buffer.

    null

    ignoreUndefined?: boolean

    serialize will not emit undefined fields note that the driver sets this to false

    true

    maxTimeMS?: number

    maxTimeMS is a server-side time limit in milliseconds for processing an operation.

    -
    nameOnly?: boolean

    Since 4.0: If true, will only return the collection name in the response, and will omit additional info

    -
    noResponse?: boolean

    This option is deprecated and will be removed in an upcoming major version.

    -
    promoteBuffers?: boolean

    when deserializing a Binary will return it as a node.js Buffer instance.

    +
    nameOnly?: boolean

    Since 4.0: If true, will only return the collection name in the response, and will omit additional info

    +
    noResponse?: boolean

    This option is deprecated and will be removed in an upcoming major version.

    +
    promoteBuffers?: boolean

    when deserializing a Binary will return it as a node.js Buffer instance.

    false

    promoteLongs?: boolean

    when deserializing a Long will fit it into a Number if it's smaller than 53 bits.

    true

    @@ -64,14 +64,14 @@

    Please note there is a known limitation where this option cannot be used at the MongoClient level (see NODE-3946). It does correctly work at Db, Collection, and per operation the same as other BSON options work.

    -
    readConcern?: ReadConcernLike

    Specify a read concern and level for the collection. (only MongoDB 3.2 or higher supported)

    -
    readPreference?: ReadPreferenceLike

    The preferred read preference (ReadPreference.primary, ReadPreference.primary_preferred, ReadPreference.secondary, ReadPreference.secondary_preferred, ReadPreference.nearest).

    -
    retryWrites?: boolean

    This option is deprecated and will be removed in a future release as it is not used +

    readConcern?: ReadConcernLike

    Specify a read concern and level for the collection. (only MongoDB 3.2 or higher supported)

    +
    readPreference?: ReadPreferenceLike

    The preferred read preference (ReadPreference.primary, ReadPreference.primary_preferred, ReadPreference.secondary, ReadPreference.secondary_preferred, ReadPreference.nearest).

    +
    retryWrites?: boolean

    This option is deprecated and will be removed in a future release as it is not used in the driver. Use MongoClientOptions or connection string parameters instead.

    -
    serializeFunctions?: boolean

    serialize the javascript functions

    +
    serializeFunctions?: boolean

    serialize the javascript functions

    false

    session?: ClientSession

    Specify ClientSession for this command

    -
    signal?: AbortSignal

    When provided, the corresponding AbortController can be used to abort an asynchronous action.

    +
    signal?: AbortSignal

    When provided, the corresponding AbortController can be used to abort an asynchronous action.

    The signal.reason value is used as the error thrown.

    NOTE: If an abort signal aborts an operation while the driver is writing to the underlying socket or reading the response from the server, the socket will be closed. @@ -83,7 +83,7 @@

    const controller = new AbortController();
    const { signal } = controller;
    process.on('SIGINT', () => controller.abort(new Error('^C pressed')));

    try {
    const res = await fetch('...', { signal });
    await collection.findOne(await res.json(), { signal });
    catch (error) {
    if (error === signal.reason) {
    // signal abort error handling
    }
    }
    -
    timeoutMS?: number

    Specifies the time an operation will run until it throws a timeout error

    -
    useBigInt64?: boolean

    when deserializing a Long return as a BigInt.

    +
    timeoutMS?: number

    Specifies the time an operation will run until it throws a timeout error

    +
    useBigInt64?: boolean

    when deserializing a Long return as a BigInt.

    false

    -
    willRetryWrite?: boolean
    +
    willRetryWrite?: boolean
    diff --git a/docs/Next/interfaces/ListDatabasesOptions.html b/docs/Next/interfaces/ListDatabasesOptions.html index 1f098d573cc..3fd19d0191d 100644 --- a/docs/Next/interfaces/ListDatabasesOptions.html +++ b/docs/Next/interfaces/ListDatabasesOptions.html @@ -1,4 +1,4 @@ -ListDatabasesOptions | mongodb

    Interface ListDatabasesOptions

    interface ListDatabasesOptions {
        authdb?: string;
        authorizedDatabases?: boolean;
        bsonRegExp?: boolean;
        checkKeys?: boolean;
        collation?: CollationOptions;
        comment?: unknown;
        dbName?: string;
        enableUtf8Validation?: boolean;
        explain?: ExplainVerbosityLike | ExplainCommandOptions;
        fieldsAsRaw?: Document;
        filter?: Document;
        ignoreUndefined?: boolean;
        maxTimeMS?: number;
        nameOnly?: boolean;
        noResponse?: boolean;
        promoteBuffers?: boolean;
        promoteLongs?: boolean;
        promoteValues?: boolean;
        raw?: boolean;
        readConcern?: ReadConcernLike;
        readPreference?: ReadPreferenceLike;
        retryWrites?: boolean;
        serializeFunctions?: boolean;
        session?: ClientSession;
        timeoutMS?: number;
        useBigInt64?: boolean;
        willRetryWrite?: boolean;
        writeConcern?: WriteConcern | WriteConcernSettings;
    }

    Hierarchy

    Properties

    authdb? +ListDatabasesOptions | mongodb

    Interface ListDatabasesOptions

    interface ListDatabasesOptions {
        authdb?: string;
        authorizedDatabases?: boolean;
        bsonRegExp?: boolean;
        checkKeys?: boolean;
        collation?: CollationOptions;
        comment?: unknown;
        dbName?: string;
        enableUtf8Validation?: boolean;
        explain?: ExplainVerbosityLike | ExplainCommandOptions;
        fieldsAsRaw?: Document;
        filter?: Document;
        ignoreUndefined?: boolean;
        maxTimeMS?: number;
        nameOnly?: boolean;
        noResponse?: boolean;
        promoteBuffers?: boolean;
        promoteLongs?: boolean;
        promoteValues?: boolean;
        raw?: boolean;
        readConcern?: ReadConcernLike;
        readPreference?: ReadPreferenceLike;
        retryWrites?: boolean;
        serializeFunctions?: boolean;
        session?: ClientSession;
        timeoutMS?: number;
        useBigInt64?: boolean;
        willRetryWrite?: boolean;
        writeConcern?: WriteConcern | WriteConcernSettings;
    }

    Hierarchy

    Properties

    authdb?: string
    authorizedDatabases?: boolean

    A flag that determines which databases are returned based on the user privileges when access control is enabled

    -
    bsonRegExp?: boolean

    return BSON regular expressions as BSONRegExp instances.

    +

    Properties

    authdb?: string
    authorizedDatabases?: boolean

    A flag that determines which databases are returned based on the user privileges when access control is enabled

    +
    bsonRegExp?: boolean

    return BSON regular expressions as BSONRegExp instances.

    false

    checkKeys?: boolean

    the serializer will check if keys are valid.

    false

    collation?: CollationOptions

    Collation

    -
    comment?: unknown

    Comment to apply to the operation.

    +
    comment?: unknown

    Comment to apply to the operation.

    In server versions pre-4.4, 'comment' must be string. A server error will be thrown if any other type is provided.

    In server versions 4.4 and above, 'comment' can be any valid BSON type.

    -
    dbName?: string
    enableUtf8Validation?: boolean

    Enable utf8 validation when deserializing BSON documents. Defaults to true.

    -

    Specifies the verbosity mode for the explain output.

    -
    fieldsAsRaw?: Document

    allow to specify if there what fields we wish to return as unserialized raw buffer.

    +
    dbName?: string
    enableUtf8Validation?: boolean

    Enable utf8 validation when deserializing BSON documents. Defaults to true.

    +

    Specifies the verbosity mode for the explain output.

    +
    fieldsAsRaw?: Document

    allow to specify if there what fields we wish to return as unserialized raw buffer.

    null

    filter?: Document

    A query predicate that determines which databases are listed

    -
    ignoreUndefined?: boolean

    serialize will not emit undefined fields +

    ignoreUndefined?: boolean

    serialize will not emit undefined fields note that the driver sets this to false

    true

    maxTimeMS?: number

    maxTimeMS is a server-side time limit in milliseconds for processing an operation.

    -
    nameOnly?: boolean

    A flag to indicate whether the command should return just the database names, or return both database names and size information

    -
    noResponse?: boolean

    This option is deprecated and will be removed in an upcoming major version.

    -
    promoteBuffers?: boolean

    when deserializing a Binary will return it as a node.js Buffer instance.

    +
    nameOnly?: boolean

    A flag to indicate whether the command should return just the database names, or return both database names and size information

    +
    noResponse?: boolean

    This option is deprecated and will be removed in an upcoming major version.

    +
    promoteBuffers?: boolean

    when deserializing a Binary will return it as a node.js Buffer instance.

    false

    promoteLongs?: boolean

    when deserializing a Long will fit it into a Number if it's smaller than 53 bits.

    true

    @@ -64,15 +64,15 @@

    Please note there is a known limitation where this option cannot be used at the MongoClient level (see NODE-3946). It does correctly work at Db, Collection, and per operation the same as other BSON options work.

    -
    readConcern?: ReadConcernLike

    Specify a read concern and level for the collection. (only MongoDB 3.2 or higher supported)

    -
    readPreference?: ReadPreferenceLike

    The preferred read preference (ReadPreference.primary, ReadPreference.primary_preferred, ReadPreference.secondary, ReadPreference.secondary_preferred, ReadPreference.nearest).

    -
    retryWrites?: boolean

    This option is deprecated and will be removed in a future release as it is not used +

    readConcern?: ReadConcernLike

    Specify a read concern and level for the collection. (only MongoDB 3.2 or higher supported)

    +
    readPreference?: ReadPreferenceLike

    The preferred read preference (ReadPreference.primary, ReadPreference.primary_preferred, ReadPreference.secondary, ReadPreference.secondary_preferred, ReadPreference.nearest).

    +
    retryWrites?: boolean

    This option is deprecated and will be removed in a future release as it is not used in the driver. Use MongoClientOptions or connection string parameters instead.

    -
    serializeFunctions?: boolean

    serialize the javascript functions

    +
    serializeFunctions?: boolean

    serialize the javascript functions

    false

    session?: ClientSession

    Specify ClientSession for this command

    -
    timeoutMS?: number

    Specifies the time an operation will run until it throws a timeout error

    -
    useBigInt64?: boolean

    when deserializing a Long return as a BigInt.

    +
    timeoutMS?: number

    Specifies the time an operation will run until it throws a timeout error

    +
    useBigInt64?: boolean

    when deserializing a Long return as a BigInt.

    false

    -
    willRetryWrite?: boolean

    Write Concern as an object

    -
    +
    willRetryWrite?: boolean

    Write Concern as an object

    +
    diff --git a/docs/Next/interfaces/ListDatabasesResult.html b/docs/Next/interfaces/ListDatabasesResult.html index e68a7b6478a..efeaac37dfa 100644 --- a/docs/Next/interfaces/ListDatabasesResult.html +++ b/docs/Next/interfaces/ListDatabasesResult.html @@ -1,5 +1,5 @@ -ListDatabasesResult | mongodb

    Interface ListDatabasesResult

    interface ListDatabasesResult {
        databases: ({
            empty?: boolean;
            name: string;
            sizeOnDisk?: number;
        } & Document)[];
        ok: 0 | 1;
        totalSize?: number;
        totalSizeMb?: number;
    }

    Properties

    databases +ListDatabasesResult | mongodb

    Interface ListDatabasesResult

    interface ListDatabasesResult {
        databases: ({
            empty?: boolean;
            name: string;
            sizeOnDisk?: number;
        } & Document)[];
        ok: 0 | 1;
        totalSize?: number;
        totalSizeMb?: number;
    }

    Properties

    databases: ({
        empty?: boolean;
        name: string;
        sizeOnDisk?: number;
    } & Document)[]
    ok: 0 | 1
    totalSize?: number
    totalSizeMb?: number
    +

    Properties

    databases: ({
        empty?: boolean;
        name: string;
        sizeOnDisk?: number;
    } & Document)[]
    ok: 0 | 1
    totalSize?: number
    totalSizeMb?: number
    diff --git a/docs/Next/interfaces/LocalKMSProviderConfiguration.html b/docs/Next/interfaces/LocalKMSProviderConfiguration.html index 78f5bc83137..637547ad988 100644 --- a/docs/Next/interfaces/LocalKMSProviderConfiguration.html +++ b/docs/Next/interfaces/LocalKMSProviderConfiguration.html @@ -1,4 +1,4 @@ -LocalKMSProviderConfiguration | mongodb

    Interface LocalKMSProviderConfiguration

    interface LocalKMSProviderConfiguration {
        key: string | Uint8Array<ArrayBufferLike> | Binary;
    }

    Properties

    key +LocalKMSProviderConfiguration | mongodb

    Interface LocalKMSProviderConfiguration

    interface LocalKMSProviderConfiguration {
        key: string | Uint8Array<ArrayBufferLike> | Binary;
    }

    Properties

    Properties

    key: string | Uint8Array<ArrayBufferLike> | Binary

    The master key used to encrypt/decrypt data keys. A 96-byte long Buffer or base64 encoded string.

    -
    +
    diff --git a/docs/Next/interfaces/Log.html b/docs/Next/interfaces/Log.html index bc6f461bd6d..3727e34fdcc 100644 --- a/docs/Next/interfaces/Log.html +++ b/docs/Next/interfaces/Log.html @@ -1,5 +1,5 @@ -Log | mongodb

    Interface Log

    interface Log {
        c: MongoLoggableComponent;
        message?: string;
        s: SeverityLevel;
        t: Date;
    }

    Hierarchy

    • Record<string, any>
      • Log

    Properties

    c +Log | mongodb

    Interface Log

    interface Log {
        c: MongoLoggableComponent;
        message?: string;
        s: SeverityLevel;
        t: Date;
    }

    Hierarchy

    • Record<string, any>
      • Log

    Properties

    Properties

    message?: string
    t: Date
    +

    Properties

    message?: string
    t: Date
    diff --git a/docs/Next/interfaces/LogComponentSeveritiesClientOptions.html b/docs/Next/interfaces/LogComponentSeveritiesClientOptions.html index cc46072a7b6..d4e6d3a718a 100644 --- a/docs/Next/interfaces/LogComponentSeveritiesClientOptions.html +++ b/docs/Next/interfaces/LogComponentSeveritiesClientOptions.html @@ -1,13 +1,13 @@ -LogComponentSeveritiesClientOptions | mongodb

    Interface LogComponentSeveritiesClientOptions

    interface LogComponentSeveritiesClientOptions {
        client?: SeverityLevel;
        command?: SeverityLevel;
        connection?: SeverityLevel;
        default?: SeverityLevel;
        serverSelection?: SeverityLevel;
        topology?: SeverityLevel;
    }

    Properties

    client? +LogComponentSeveritiesClientOptions | mongodb

    Interface LogComponentSeveritiesClientOptions

    interface LogComponentSeveritiesClientOptions {
        client?: SeverityLevel;
        command?: SeverityLevel;
        connection?: SeverityLevel;
        default?: SeverityLevel;
        serverSelection?: SeverityLevel;
        topology?: SeverityLevel;
    }

    Properties

    client?: SeverityLevel

    Optional severity level for client component

    -
    command?: SeverityLevel

    Optional severity level for command component

    -
    connection?: SeverityLevel

    Optional severity level for connection component

    -
    default?: SeverityLevel

    Optional default severity level to be used if any of the above are unset

    -
    serverSelection?: SeverityLevel

    Optional severity level for server selection component

    -
    topology?: SeverityLevel

    Optional severity level for topology component

    -
    +
    command?: SeverityLevel

    Optional severity level for command component

    +
    connection?: SeverityLevel

    Optional severity level for connection component

    +
    default?: SeverityLevel

    Optional default severity level to be used if any of the above are unset

    +
    serverSelection?: SeverityLevel

    Optional severity level for server selection component

    +
    topology?: SeverityLevel

    Optional severity level for topology component

    +
    diff --git a/docs/Next/interfaces/ModifyResult.html b/docs/Next/interfaces/ModifyResult.html index fec3e249b47..877db8328ba 100644 --- a/docs/Next/interfaces/ModifyResult.html +++ b/docs/Next/interfaces/ModifyResult.html @@ -1,4 +1,4 @@ -ModifyResult | mongodb

    Interface ModifyResult<TSchema>

    interface ModifyResult<TSchema> {
        lastErrorObject?: Document;
        ok: 0 | 1;
        value: null | WithId<TSchema>;
    }

    Type Parameters

    Properties

    lastErrorObject? +ModifyResult | mongodb

    Interface ModifyResult<TSchema>

    interface ModifyResult<TSchema> {
        lastErrorObject?: Document;
        ok: 0 | 1;
        value: null | WithId<TSchema>;
    }

    Type Parameters

    Properties

    lastErrorObject?: Document
    ok: 0 | 1
    value: null | WithId<TSchema>
    +

    Properties

    lastErrorObject?: Document
    ok: 0 | 1
    value: null | WithId<TSchema>
    diff --git a/docs/Next/interfaces/MongoClientOptions.html b/docs/Next/interfaces/MongoClientOptions.html index fc36e9788cb..db1a58b9c6e 100644 --- a/docs/Next/interfaces/MongoClientOptions.html +++ b/docs/Next/interfaces/MongoClientOptions.html @@ -1,6 +1,6 @@ MongoClientOptions | mongodb

    Interface MongoClientOptions

    Describes all possible URI query options for the mongo client

    interface MongoClientOptions {
        allowPartialTrustChain?: boolean;
        ALPNProtocols?: Uint8Array<ArrayBufferLike> | string[] | Uint8Array<ArrayBufferLike>[];
        appName?: string;
        auth?: Auth;
        authMechanism?: AuthMechanism;
        authMechanismProperties?: AuthMechanismProperties;
        authSource?: string;
        autoEncryption?: AutoEncryptionOptions;
        autoSelectFamily?: boolean;
        autoSelectFamilyAttemptTimeout?: number;
        bsonRegExp?: boolean;
        ca?: string | Buffer<ArrayBufferLike> | (string | Buffer<ArrayBufferLike>)[];
        cert?: string | Buffer<ArrayBufferLike> | (string | Buffer<ArrayBufferLike>)[];
        checkKeys?: boolean;
        checkServerIdentity?: ((hostname: string, cert: PeerCertificate) => Error | undefined);
        ciphers?: string;
        compressors?: string | (
            | "none"
            | "snappy"
            | "zlib"
            | "zstd")[];
        connectTimeoutMS?: number;
        crl?: string | Buffer<ArrayBufferLike> | (string | Buffer<ArrayBufferLike>)[];
        directConnection?: boolean;
        driverInfo?: DriverInfo;
        ecdhCurve?: string;
        enableUtf8Validation?: boolean;
        family?: number;
        fieldsAsRaw?: Document;
        forceServerObjectId?: boolean;
        heartbeatFrequencyMS?: number;
        hints?: number;
        ignoreUndefined?: boolean;
        journal?: boolean;
        keepAliveInitialDelay?: number;
        key?: string | Buffer<ArrayBufferLike> | (string | Buffer<ArrayBufferLike> | KeyObject)[];
        loadBalanced?: boolean;
        localAddress?: string;
        localPort?: number;
        localThresholdMS?: number;
        lookup?: LookupFunction;
        maxConnecting?: number;
        maxIdleTimeMS?: number;
        maxPoolSize?: number;
        maxStalenessSeconds?: number;
        minDHSize?: number;
        minHeartbeatFrequencyMS?: number;
        minPoolSize?: number;
        mongodbLogComponentSeverities?: LogComponentSeveritiesClientOptions;
        mongodbLogMaxDocumentLength?: number;
        mongodbLogPath?: "stderr" | "stdout" | MongoDBLogWritable;
        monitorCommands?: boolean;
        noDelay?: boolean;
        passphrase?: string;
        pfx?: string | Buffer<ArrayBufferLike> | (string | Buffer<ArrayBufferLike> | PxfObject)[];
        pkFactory?: PkFactory;
        promoteBuffers?: boolean;
        promoteLongs?: boolean;
        promoteValues?: boolean;
        proxyHost?: string;
        proxyPassword?: string;
        proxyPort?: number;
        proxyUsername?: string;
        raw?: boolean;
        readConcern?: ReadConcernLike;
        readConcernLevel?: ReadConcernLevel;
        readPreference?: ReadPreference | ReadPreferenceMode;
        readPreferenceTags?: TagSet[];
        rejectUnauthorized?: boolean;
        replicaSet?: string;
        retryReads?: boolean;
        retryWrites?: boolean;
        secureContext?: SecureContext;
        secureProtocol?: string;
        serializeFunctions?: boolean;
        serverApi?: "1" | ServerApi;
        serverMonitoringMode?: ServerMonitoringMode;
        servername?: string;
        serverSelectionTimeoutMS?: number;
        session?: Buffer<ArrayBufferLike>;
        socketTimeoutMS?: number;
        srvMaxHosts?: number;
        srvServiceName?: string;
        ssl?: boolean;
        timeoutMS?: number;
        tls?: boolean;
        tlsAllowInvalidCertificates?: boolean;
        tlsAllowInvalidHostnames?: boolean;
        tlsCAFile?: string;
        tlsCertificateKeyFile?: string;
        tlsCertificateKeyFilePassword?: string;
        tlsCRLFile?: string;
        tlsInsecure?: boolean;
        useBigInt64?: boolean;
        w?: W;
        waitQueueTimeoutMS?: number;
        writeConcern?: WriteConcern | WriteConcernSettings;
        wtimeoutMS?: number;
        zlibCompressionLevel?:
            | 0
            | 5
            | 1
            | 3
            | 9
            | 4
            | 2
            | 8
            | 6
            | 7;
    }

    Hierarchy (view full)

    Properties

    interface MongoClientOptions {
        allowPartialTrustChain?: boolean;
        ALPNProtocols?: Uint8Array<ArrayBufferLike> | string[] | Uint8Array<ArrayBufferLike>[];
        appName?: string;
        auth?: Auth;
        authMechanism?: AuthMechanism;
        authMechanismProperties?: AuthMechanismProperties;
        authSource?: string;
        autoEncryption?: AutoEncryptionOptions;
        autoSelectFamily?: boolean;
        autoSelectFamilyAttemptTimeout?: number;
        bsonRegExp?: boolean;
        ca?: string | Buffer<ArrayBufferLike> | (string | Buffer<ArrayBufferLike>)[];
        cert?: string | Buffer<ArrayBufferLike> | (string | Buffer<ArrayBufferLike>)[];
        checkKeys?: boolean;
        checkServerIdentity?: ((hostname: string, cert: PeerCertificate) => Error | undefined);
        ciphers?: string;
        compressors?: string | (
            | "none"
            | "snappy"
            | "zlib"
            | "zstd")[];
        connectTimeoutMS?: number;
        crl?: string | Buffer<ArrayBufferLike> | (string | Buffer<ArrayBufferLike>)[];
        directConnection?: boolean;
        driverInfo?: DriverInfo;
        ecdhCurve?: string;
        enableUtf8Validation?: boolean;
        family?: number;
        fieldsAsRaw?: Document;
        forceServerObjectId?: boolean;
        heartbeatFrequencyMS?: number;
        hints?: number;
        ignoreUndefined?: boolean;
        journal?: boolean;
        keepAliveInitialDelay?: number;
        key?: string | Buffer<ArrayBufferLike> | (string | Buffer<ArrayBufferLike> | KeyObject)[];
        loadBalanced?: boolean;
        localAddress?: string;
        localPort?: number;
        localThresholdMS?: number;
        lookup?: LookupFunction;
        maxConnecting?: number;
        maxIdleTimeMS?: number;
        maxPoolSize?: number;
        maxStalenessSeconds?: number;
        minDHSize?: number;
        minHeartbeatFrequencyMS?: number;
        minPoolSize?: number;
        mongodbLogComponentSeverities?: LogComponentSeveritiesClientOptions;
        mongodbLogMaxDocumentLength?: number;
        mongodbLogPath?: "stderr" | "stdout" | MongoDBLogWritable;
        monitorCommands?: boolean;
        noDelay?: boolean;
        passphrase?: string;
        pfx?: string | Buffer<ArrayBufferLike> | (string | Buffer<ArrayBufferLike> | PxfObject)[];
        pkFactory?: PkFactory;
        promoteBuffers?: boolean;
        promoteLongs?: boolean;
        promoteValues?: boolean;
        proxyHost?: string;
        proxyPassword?: string;
        proxyPort?: number;
        proxyUsername?: string;
        raw?: boolean;
        readConcern?: ReadConcernLike;
        readConcernLevel?: ReadConcernLevel;
        readPreference?: ReadPreference | ReadPreferenceMode;
        readPreferenceTags?: TagSet[];
        rejectUnauthorized?: boolean;
        replicaSet?: string;
        retryReads?: boolean;
        retryWrites?: boolean;
        secureContext?: SecureContext;
        secureProtocol?: string;
        serializeFunctions?: boolean;
        serverApi?: "1" | ServerApi;
        serverMonitoringMode?: ServerMonitoringMode;
        servername?: string;
        serverSelectionTimeoutMS?: number;
        session?: Buffer<ArrayBufferLike>;
        socketTimeoutMS?: number;
        srvMaxHosts?: number;
        srvServiceName?: string;
        ssl?: boolean;
        timeoutMS?: number;
        tls?: boolean;
        tlsAllowInvalidCertificates?: boolean;
        tlsAllowInvalidHostnames?: boolean;
        tlsCAFile?: string;
        tlsCertificateKeyFile?: string;
        tlsCertificateKeyFilePassword?: string;
        tlsCRLFile?: string;
        tlsInsecure?: boolean;
        useBigInt64?: boolean;
        w?: W;
        waitQueueTimeoutMS?: number;
        writeConcern?: WriteConcern | WriteConcernSettings;
        wtimeoutMS?: number;
        zlibCompressionLevel?:
            | 0
            | 5
            | 1
            | 3
            | 9
            | 4
            | 2
            | 8
            | 6
            | 7;
    }

    Hierarchy (view full)

    Properties

    Properties

    allowPartialTrustChain?: boolean

    Treat intermediate (non-self-signed) certificates in the trust CA certificate list as trusted.

    v22.9.0, v20.18.0

    -
    ALPNProtocols?: Uint8Array<ArrayBufferLike> | string[] | Uint8Array<ArrayBufferLike>[]

    An array of strings or a Buffer naming possible ALPN protocols. +

    ALPNProtocols?: Uint8Array<ArrayBufferLike> | string[] | Uint8Array<ArrayBufferLike>[]

    An array of strings or a Buffer naming possible ALPN protocols. (Protocols should be ordered by their priority.)

    appName?: string

    The name of the application that created this MongoClient instance. MongoDB 3.4 and newer will print this value in the server log upon establishing each connection. It is also recorded in the slow query log and profile collections

    -
    auth?: Auth

    The auth settings for when connection to server.

    -
    authMechanism?: AuthMechanism

    Specify the authentication mechanism that MongoDB will use to authenticate the connection.

    -
    authMechanismProperties?: AuthMechanismProperties

    Specify properties for the specified authMechanism as a comma-separated list of colon-separated key-value pairs.

    -
    authSource?: string

    Specify the database name associated with the user’s credentials.

    -
    autoEncryption?: AutoEncryptionOptions

    Optionally enable in-use auto encryption

    +
    auth?: Auth

    The auth settings for when connection to server.

    +
    authMechanism?: AuthMechanism

    Specify the authentication mechanism that MongoDB will use to authenticate the connection.

    +
    authMechanismProperties?: AuthMechanismProperties

    Specify properties for the specified authMechanism as a comma-separated list of colon-separated key-value pairs.

    +
    authSource?: string

    Specify the database name associated with the user’s credentials.

    +
    autoEncryption?: AutoEncryptionOptions

    Optionally enable in-use auto encryption

    Automatic encryption is an enterprise only feature that only applies to operations on a collection. Automatic encryption is not supported for operations on a database or view, and operations that are not bypassed will result in error (see libmongocrypt: Auto Encryption Allow-List). To bypass automatic encryption for all operations, set bypassAutoEncryption=true in AutoEncryptionOpts.

    Automatic encryption requires the authenticated user to have the listCollections privilege action.

    @@ -115,9 +115,9 @@
  • AutoEncryptionOptions.bypassAutomaticEncryption is false.
  • If an internal MongoClient is created, it is configured with the same options as the parent MongoClient except minPoolSize is set to 0 and AutoEncryptionOptions is omitted.

    -
    autoSelectFamily?: boolean

    v18.13.0

    -
    autoSelectFamilyAttemptTimeout?: number

    v18.13.0

    -
    bsonRegExp?: boolean

    return BSON regular expressions as BSONRegExp instances.

    +
    autoSelectFamily?: boolean

    v18.13.0

    +
    autoSelectFamilyAttemptTimeout?: number

    v18.13.0

    +
    bsonRegExp?: boolean

    return BSON regular expressions as BSONRegExp instances.

    false

    ca?: string | Buffer<ArrayBufferLike> | (string | Buffer<ArrayBufferLike>)[]

    Optionally override the trusted CA certificates. Default is to trust the well-known CAs curated by Mozilla. Mozilla's CAs are completely @@ -154,15 +154,15 @@ ciphers can be obtained via tls.getCiphers(). Cipher names must be uppercased in order for OpenSSL to accept them.

    compressors?: string | (
        | "none"
        | "snappy"
        | "zlib"
        | "zstd")[]

    An array or comma-delimited string of compressors to enable network compression for communication between this client and a mongod/mongos instance.

    -
    connectTimeoutMS?: number

    The time in milliseconds to attempt a connection before timing out.

    -
    crl?: string | Buffer<ArrayBufferLike> | (string | Buffer<ArrayBufferLike>)[]

    PEM formatted CRLs (Certificate Revocation Lists).

    +
    connectTimeoutMS?: number

    The time in milliseconds to attempt a connection before timing out.

    +
    crl?: string | Buffer<ArrayBufferLike> | (string | Buffer<ArrayBufferLike>)[]

    PEM formatted CRLs (Certificate Revocation Lists).

    directConnection?: boolean

    Allow a driver to force a Single topology type with a connection string containing one host

    -
    driverInfo?: DriverInfo

    Allows a wrapping driver to amend the client metadata generated by the driver to include information about the wrapping driver +

    driverInfo?: DriverInfo

    Allows a wrapping driver to amend the client metadata generated by the driver to include information about the wrapping driver /*

    • Will be made internal in a future major release.
    -
    ecdhCurve?: string

    A string describing a named curve or a colon separated list of curve +

    ecdhCurve?: string

    A string describing a named curve or a colon separated list of curve NIDs or names, for example P-521:P-384:P-256, to use for ECDH key agreement. Set to auto to select the curve automatically. Use crypto.getCurves() to obtain a list of available curve names. On @@ -170,17 +170,17 @@ name and description of each available elliptic curve. Default: tls.DEFAULT_ECDH_CURVE.

    enableUtf8Validation?: boolean

    Enable utf8 validation when deserializing BSON documents. Defaults to true.

    -
    family?: number
    fieldsAsRaw?: Document

    allow to specify if there what fields we wish to return as unserialized raw buffer.

    +
    family?: number
    fieldsAsRaw?: Document

    allow to specify if there what fields we wish to return as unserialized raw buffer.

    null

    forceServerObjectId?: boolean

    Force server to assign _id values instead of driver

    -
    heartbeatFrequencyMS?: number

    heartbeatFrequencyMS controls when the driver checks the state of the MongoDB deployment. Specify the interval (in milliseconds) between checks, counted from the end of the previous check until the beginning of the next one.

    -
    hints?: number
    ignoreUndefined?: boolean

    serialize will not emit undefined fields +

    heartbeatFrequencyMS?: number

    heartbeatFrequencyMS controls when the driver checks the state of the MongoDB deployment. Specify the interval (in milliseconds) between checks, counted from the end of the previous check until the beginning of the next one.

    +
    hints?: number
    ignoreUndefined?: boolean

    serialize will not emit undefined fields note that the driver sets this to false

    true

    journal?: boolean

    The journal write concern

    Please use the writeConcern option instead

    -
    keepAliveInitialDelay?: number

    Node.JS socket option to set the time the first keepalive probe is sent on an idle socket. Defaults to 120000ms

    -
    key?: string | Buffer<ArrayBufferLike> | (string | Buffer<ArrayBufferLike> | KeyObject)[]

    Private keys in PEM format. PEM allows the option of private keys +

    keepAliveInitialDelay?: number

    Node.JS socket option to set the time the first keepalive probe is sent on an idle socket. Defaults to 120000ms

    +
    key?: string | Buffer<ArrayBufferLike> | (string | Buffer<ArrayBufferLike> | KeyObject)[]

    Private keys in PEM format. PEM allows the option of private keys being encrypted. Encrypted keys will be decrypted with options.passphrase. Multiple keys using different algorithms can be provided either as an array of unencrypted key strings or buffers, @@ -189,22 +189,22 @@ object.passphrase is optional. Encrypted keys will be decrypted with object.passphrase if provided, or options.passphrase if it is not.

    loadBalanced?: boolean

    Instruct the driver it is connecting to a load balancer fronting a mongos like service

    -
    localAddress?: string
    localPort?: number
    localThresholdMS?: number

    The size (in milliseconds) of the latency window for selecting among multiple suitable MongoDB instances.

    -
    lookup?: LookupFunction
    maxConnecting?: number

    The maximum number of connections that may be in the process of being established concurrently by the connection pool.

    -
    maxIdleTimeMS?: number

    The maximum amount of time a connection should remain idle in the connection pool before being marked idle, in milliseconds. +

    localAddress?: string
    localPort?: number
    localThresholdMS?: number

    The size (in milliseconds) of the latency window for selecting among multiple suitable MongoDB instances.

    +
    lookup?: LookupFunction
    maxConnecting?: number

    The maximum number of connections that may be in the process of being established concurrently by the connection pool.

    +
    maxIdleTimeMS?: number

    The maximum amount of time a connection should remain idle in the connection pool before being marked idle, in milliseconds. If specified, this must be a number greater than or equal to 0, where 0 means there is no limit. Defaults to 0. After this time passes, the idle collection can be automatically cleaned up in the background.

    -
    maxPoolSize?: number

    The maximum number of connections in the connection pool.

    -
    maxStalenessSeconds?: number

    Specifies, in seconds, how stale a secondary can be before the client stops using it for read operations.

    -
    minDHSize?: number
    minHeartbeatFrequencyMS?: number

    Sets the minimum heartbeat frequency. In the event that the driver has to frequently re-check a server's availability, it will wait at least this long since the previous check to avoid wasted effort.

    -
    minPoolSize?: number

    The minimum number of connections in the connection pool.

    -
    mongodbLogComponentSeverities?: LogComponentSeveritiesClientOptions

    Enable logging level per component or use default to control any unset components.

    -
    mongodbLogMaxDocumentLength?: number

    All BSON documents are stringified to EJSON. This controls the maximum length of those strings. +

    maxPoolSize?: number

    The maximum number of connections in the connection pool.

    +
    maxStalenessSeconds?: number

    Specifies, in seconds, how stale a secondary can be before the client stops using it for read operations.

    +
    minDHSize?: number
    minHeartbeatFrequencyMS?: number

    Sets the minimum heartbeat frequency. In the event that the driver has to frequently re-check a server's availability, it will wait at least this long since the previous check to avoid wasted effort.

    +
    minPoolSize?: number

    The minimum number of connections in the connection pool.

    +
    mongodbLogComponentSeverities?: LogComponentSeveritiesClientOptions

    Enable logging level per component or use default to control any unset components.

    +
    mongodbLogMaxDocumentLength?: number

    All BSON documents are stringified to EJSON. This controls the maximum length of those strings. It is defaulted to 1000.

    -
    mongodbLogPath?: "stderr" | "stdout" | MongoDBLogWritable

    Specifies the destination of the driver's logging. The default is stderr.

    -
    monitorCommands?: boolean

    Enable command monitoring for this client

    -
    noDelay?: boolean

    TCP Connection no delay

    -
    passphrase?: string

    Shared passphrase used for a single private key and/or a PFX.

    +
    mongodbLogPath?: "stderr" | "stdout" | MongoDBLogWritable

    Specifies the destination of the driver's logging. The default is stderr.

    +
    monitorCommands?: boolean

    Enable command monitoring for this client

    +
    noDelay?: boolean

    TCP Connection no delay

    +
    passphrase?: string

    Shared passphrase used for a single private key and/or a PFX.

    pfx?: string | Buffer<ArrayBufferLike> | (string | Buffer<ArrayBufferLike> | PxfObject)[]

    PFX or PKCS12 encoded private key and certificate chain. pfx is an alternative to providing key and cert individually. PFX is usually encrypted, if it is, passphrase will be used to decrypt it. Multiple @@ -214,17 +214,17 @@ object.passphrase is optional. Encrypted PFX will be decrypted with object.passphrase if provided, or options.passphrase if it is not.

    pkFactory?: PkFactory

    A primary key factory function for generation of custom _id keys

    -
    promoteBuffers?: boolean

    when deserializing a Binary will return it as a node.js Buffer instance.

    +
    promoteBuffers?: boolean

    when deserializing a Binary will return it as a node.js Buffer instance.

    false

    promoteLongs?: boolean

    when deserializing a Long will fit it into a Number if it's smaller than 53 bits.

    true

    promoteValues?: boolean

    when deserializing will promote BSON values to their Node.js closest equivalent types.

    true

    proxyHost?: string

    Configures a Socks5 proxy host used for creating TCP connections.

    -
    proxyPassword?: string

    Configures a Socks5 proxy password when the proxy in proxyHost requires username/password authentication.

    -
    proxyPort?: number

    Configures a Socks5 proxy port used for creating TCP connections.

    -
    proxyUsername?: string

    Configures a Socks5 proxy username when the proxy in proxyHost requires username/password authentication.

    -
    raw?: boolean

    Enabling the raw option will return a Node.js Buffer +

    proxyPassword?: string

    Configures a Socks5 proxy password when the proxy in proxyHost requires username/password authentication.

    +
    proxyPort?: number

    Configures a Socks5 proxy port used for creating TCP connections.

    +
    proxyUsername?: string

    Configures a Socks5 proxy username when the proxy in proxyHost requires username/password authentication.

    +
    raw?: boolean

    Enabling the raw option will return a Node.js Buffer which is allocated using allocUnsafe API. See this section from the Node.js Docs here for more detail about what "unsafe" refers to in this context. @@ -235,20 +235,20 @@

    Please note there is a known limitation where this option cannot be used at the MongoClient level (see NODE-3946). It does correctly work at Db, Collection, and per operation the same as other BSON options work.

    -
    readConcern?: ReadConcernLike

    Specify a read concern for the collection (only MongoDB 3.2 or higher supported)

    -
    readConcernLevel?: ReadConcernLevel

    The level of isolation

    -

    Specifies the read preferences for this connection

    -
    readPreferenceTags?: TagSet[]

    Specifies the tags document as a comma-separated list of colon-separated key-value pairs.

    -
    rejectUnauthorized?: boolean

    If true the server will reject any connection which is not +

    readConcern?: ReadConcernLike

    Specify a read concern for the collection (only MongoDB 3.2 or higher supported)

    +
    readConcernLevel?: ReadConcernLevel

    The level of isolation

    +

    Specifies the read preferences for this connection

    +
    readPreferenceTags?: TagSet[]

    Specifies the tags document as a comma-separated list of colon-separated key-value pairs.

    +
    rejectUnauthorized?: boolean

    If true the server will reject any connection which is not authorized with the list of supplied CAs. This option only has an effect if requestCert is true.

    true
     
    replicaSet?: string

    Specifies the name of the replica set, if the mongod is a member of a replica set.

    -
    retryReads?: boolean

    Enables retryable reads.

    -
    retryWrites?: boolean

    Enable retryable writes.

    -
    secureContext?: SecureContext

    An optional TLS context object from tls.createSecureContext()

    +
    retryReads?: boolean

    Enables retryable reads.

    +
    retryWrites?: boolean

    Enable retryable writes.

    +
    secureContext?: SecureContext

    An optional TLS context object from tls.createSecureContext()

    secureProtocol?: string

    Legacy mechanism to select the TLS protocol version to use, it does not support independent control of the minimum and maximum version, and does not support limiting the protocol to TLSv1.3. Use @@ -261,33 +261,33 @@

    serializeFunctions?: boolean

    serialize the javascript functions

    false

    serverApi?: "1" | ServerApi

    Server API version

    -
    serverMonitoringMode?: ServerMonitoringMode

    Instructs the driver monitors to use a specific monitoring mode

    -
    servername?: string
    serverSelectionTimeoutMS?: number

    Specifies how long (in milliseconds) to block for server selection before throwing an exception.

    -
    session?: Buffer<ArrayBufferLike>

    An optional Buffer instance containing a TLS session.

    +
    serverMonitoringMode?: ServerMonitoringMode

    Instructs the driver monitors to use a specific monitoring mode

    +
    servername?: string
    serverSelectionTimeoutMS?: number

    Specifies how long (in milliseconds) to block for server selection before throwing an exception.

    +
    session?: Buffer<ArrayBufferLike>

    An optional Buffer instance containing a TLS session.

    socketTimeoutMS?: number

    The time in milliseconds to attempt a send or receive on a socket before the attempt times out.

    -
    srvMaxHosts?: number

    The maximum number of hosts to connect to when using an srv connection string, a setting of 0 means unlimited hosts

    -
    srvServiceName?: string

    Modifies the srv URI to look like:

    +
    srvMaxHosts?: number

    The maximum number of hosts to connect to when using an srv connection string, a setting of 0 means unlimited hosts

    +
    srvServiceName?: string

    Modifies the srv URI to look like:

    _{srvServiceName}._tcp.{hostname}.{domainname}

    Querying this DNS URI is expected to respond with SRV records

    -
    ssl?: boolean

    A boolean to enable or disables TLS/SSL for the connection. (The ssl option is equivalent to the tls option.)

    -
    timeoutMS?: number

    Specifies the time an operation will run until it throws a timeout error

    -
    tls?: boolean

    Enables or disables TLS/SSL for the connection.

    -
    tlsAllowInvalidCertificates?: boolean

    Bypasses validation of the certificates presented by the mongod/mongos instance

    -
    tlsAllowInvalidHostnames?: boolean

    Disables hostname validation of the certificate presented by the mongod/mongos instance.

    -
    tlsCAFile?: string

    Specifies the location of a local .pem file that contains the root certificate chain from the Certificate Authority. This file is used to validate the certificate presented by the mongod/mongos instance.

    -
    tlsCertificateKeyFile?: string

    Specifies the location of a local .pem file that contains either the client's TLS/SSL certificate and key.

    -
    tlsCertificateKeyFilePassword?: string

    Specifies the password to de-crypt the tlsCertificateKeyFile.

    -
    tlsCRLFile?: string

    Specifies the location of a local CRL .pem file that contains the client revokation list.

    -
    tlsInsecure?: boolean

    Disables various certificate validations.

    -
    useBigInt64?: boolean

    when deserializing a Long return as a BigInt.

    +
    ssl?: boolean

    A boolean to enable or disables TLS/SSL for the connection. (The ssl option is equivalent to the tls option.)

    +
    timeoutMS?: number

    Specifies the time an operation will run until it throws a timeout error

    +
    tls?: boolean

    Enables or disables TLS/SSL for the connection.

    +
    tlsAllowInvalidCertificates?: boolean

    Bypasses validation of the certificates presented by the mongod/mongos instance

    +
    tlsAllowInvalidHostnames?: boolean

    Disables hostname validation of the certificate presented by the mongod/mongos instance.

    +
    tlsCAFile?: string

    Specifies the location of a local .pem file that contains the root certificate chain from the Certificate Authority. This file is used to validate the certificate presented by the mongod/mongos instance.

    +
    tlsCertificateKeyFile?: string

    Specifies the location of a local .pem file that contains either the client's TLS/SSL certificate and key.

    +
    tlsCertificateKeyFilePassword?: string

    Specifies the password to de-crypt the tlsCertificateKeyFile.

    +
    tlsCRLFile?: string

    Specifies the location of a local CRL .pem file that contains the client revokation list.

    +
    tlsInsecure?: boolean

    Disables various certificate validations.

    +
    useBigInt64?: boolean

    when deserializing a Long return as a BigInt.

    false

    w?: W

    The write concern w value

    Please use the writeConcern option instead

    -
    waitQueueTimeoutMS?: number

    The maximum time in milliseconds that a thread can wait for a connection to become available.

    -

    A MongoDB WriteConcern, which describes the level of acknowledgement +

    waitQueueTimeoutMS?: number

    The maximum time in milliseconds that a thread can wait for a connection to become available.

    +

    A MongoDB WriteConcern, which describes the level of acknowledgement requested from MongoDB for write operations.

    wtimeoutMS?: number

    The write concern timeout

    +
    wtimeoutMS?: number

    The write concern timeout

    Please use the writeConcern option instead

    -
    zlibCompressionLevel?:
        | 0
        | 5
        | 1
        | 3
        | 9
        | 4
        | 2
        | 8
        | 6
        | 7

    An integer that specifies the compression level if using zlib for network compression.

    -
    +
    zlibCompressionLevel?:
        | 0
        | 5
        | 1
        | 3
        | 9
        | 4
        | 2
        | 8
        | 6
        | 7

    An integer that specifies the compression level if using zlib for network compression.

    +
    diff --git a/docs/Next/interfaces/MongoCredentialsOptions.html b/docs/Next/interfaces/MongoCredentialsOptions.html index 3bc122ae9b8..adba5c20dc9 100644 --- a/docs/Next/interfaces/MongoCredentialsOptions.html +++ b/docs/Next/interfaces/MongoCredentialsOptions.html @@ -1,7 +1,7 @@ -MongoCredentialsOptions | mongodb

    Interface MongoCredentialsOptions

    interface MongoCredentialsOptions {
        db?: string;
        mechanism?: AuthMechanism;
        mechanismProperties: AuthMechanismProperties;
        password: string;
        source: string;
        username?: string;
    }

    Properties

    db? +MongoCredentialsOptions | mongodb

    Interface MongoCredentialsOptions

    interface MongoCredentialsOptions {
        db?: string;
        mechanism?: AuthMechanism;
        mechanismProperties: AuthMechanismProperties;
        password: string;
        source: string;
        username?: string;
    }

    Properties

    db?: string
    mechanism?: AuthMechanism
    mechanismProperties: AuthMechanismProperties
    password: string
    source: string
    username?: string
    +

    Properties

    db?: string
    mechanism?: AuthMechanism
    mechanismProperties: AuthMechanismProperties
    password: string
    source: string
    username?: string
    diff --git a/docs/Next/interfaces/MongoDBLogWritable.html b/docs/Next/interfaces/MongoDBLogWritable.html index b46245d0d40..b031e918139 100644 --- a/docs/Next/interfaces/MongoDBLogWritable.html +++ b/docs/Next/interfaces/MongoDBLogWritable.html @@ -1,5 +1,5 @@ MongoDBLogWritable | mongodb

    Interface MongoDBLogWritable

    A custom destination for structured logging messages.

    -
    interface MongoDBLogWritable {
        write(log: Log): unknown;
    }

    Methods

    interface MongoDBLogWritable {
        write(log: Log): unknown;
    }

    Methods

    Methods

    • This function will be called for every enabled log message.

      It can be sync or async:

        @@ -15,4 +15,4 @@
      • The Log messages are structured but subject to change since the intended purpose is informational. Program against this defensively and err on the side of stringifying whatever is passed in to write in some form or another.
      -

      Parameters

      Returns unknown

    +

    Parameters

    Returns unknown

    diff --git a/docs/Next/interfaces/MongoNetworkErrorOptions.html b/docs/Next/interfaces/MongoNetworkErrorOptions.html index b688bc725c3..992237d49c8 100644 --- a/docs/Next/interfaces/MongoNetworkErrorOptions.html +++ b/docs/Next/interfaces/MongoNetworkErrorOptions.html @@ -1,4 +1,4 @@ -MongoNetworkErrorOptions | mongodb

    Interface MongoNetworkErrorOptions

    interface MongoNetworkErrorOptions {
        beforeHandshake?: boolean;
        cause?: Error;
    }

    Properties

    beforeHandshake? +MongoNetworkErrorOptions | mongodb

    Interface MongoNetworkErrorOptions

    interface MongoNetworkErrorOptions {
        beforeHandshake?: boolean;
        cause?: Error;
    }

    Properties

    beforeHandshake?: boolean

    Indicates the timeout happened before a connection handshake completed

    -
    cause?: Error
    +
    cause?: Error
    diff --git a/docs/Next/interfaces/MongoOptions.html b/docs/Next/interfaces/MongoOptions.html index 87e5a52d5e4..474502d4345 100644 --- a/docs/Next/interfaces/MongoOptions.html +++ b/docs/Next/interfaces/MongoOptions.html @@ -11,7 +11,7 @@
  • DNS SRV records and TXT records
  • Not all options may be present after client construction as some are obtained from asynchronous operations.

    -
    interface MongoOptions {
        additionalDriverInfo: DriverInfo[];
        allowPartialTrustChain?: boolean;
        ALPNProtocols?: Uint8Array<ArrayBufferLike> | string[] | Uint8Array<ArrayBufferLike>[];
        appName?: string;
        autoEncryption: AutoEncryptionOptions;
        autoSelectFamily?: boolean;
        autoSelectFamilyAttemptTimeout?: number;
        ca?: string | Buffer<ArrayBufferLike> | (string | Buffer<ArrayBufferLike>)[];
        cert?: string | Buffer<ArrayBufferLike> | (string | Buffer<ArrayBufferLike>)[];
        checkServerIdentity?: ((hostname: string, cert: PeerCertificate) => Error | undefined);
        ciphers?: string;
        compressors: (
            | "none"
            | "snappy"
            | "zlib"
            | "zstd")[];
        connectTimeoutMS: number;
        credentials?: MongoCredentials;
        crl?: string | Buffer<ArrayBufferLike> | (string | Buffer<ArrayBufferLike>)[];
        dbName: string;
        directConnection: boolean;
        driverInfo: DriverInfo;
        ecdhCurve?: string;
        extendedMetadata: Promise<Document>;
        family?: number;
        forceServerObjectId: boolean;
        heartbeatFrequencyMS: number;
        hints?: number;
        hosts: HostAddress[];
        keepAliveInitialDelay?: number;
        key?: string | Buffer<ArrayBufferLike> | (string | Buffer<ArrayBufferLike> | KeyObject)[];
        loadBalanced: boolean;
        localAddress?: string;
        localPort?: number;
        localThresholdMS: number;
        lookup?: LookupFunction;
        maxConnecting: number;
        maxIdleTimeMS: number;
        maxPoolSize: number;
        metadata: ClientMetadata;
        minDHSize?: number;
        minHeartbeatFrequencyMS: number;
        minPoolSize: number;
        monitorCommands: boolean;
        noDelay: boolean;
        passphrase?: string;
        pfx?: string | Buffer<ArrayBufferLike> | (string | Buffer<ArrayBufferLike> | PxfObject)[];
        pkFactory: PkFactory;
        proxyHost?: string;
        proxyPassword?: string;
        proxyPort?: number;
        proxyUsername?: string;
        raw: boolean;
        readConcern: ReadConcern;
        readPreference: ReadPreference;
        rejectUnauthorized?: boolean;
        replicaSet: string;
        retryReads: boolean;
        retryWrites: boolean;
        secureContext?: SecureContext;
        secureProtocol?: string;
        serverApi: ServerApi;
        serverMonitoringMode: ServerMonitoringMode;
        servername?: string;
        serverSelectionTimeoutMS: number;
        session?: Buffer<ArrayBufferLike>;
        socketTimeoutMS: number;
        srvHost?: string;
        srvMaxHosts: number;
        srvServiceName: string;
        timeoutMS?: number;
        tls: boolean;
        tlsAllowInvalidCertificates: boolean;
        tlsAllowInvalidHostnames: boolean;
        tlsCAFile?: string;
        tlsCertificateKeyFile?: string;
        tlsCRLFile?: string;
        tlsInsecure: boolean;
        waitQueueTimeoutMS: number;
        writeConcern: WriteConcern;
        zlibCompressionLevel:
            | 0
            | 1
            | 2
            | 3
            | 4
            | 5
            | 6
            | 7
            | 8
            | 9;
    }

    Hierarchy (view full)

    • Required<Pick<MongoClientOptions,
          | "autoEncryption"
          | "connectTimeoutMS"
          | "directConnection"
          | "driverInfo"
          | "forceServerObjectId"
          | "minHeartbeatFrequencyMS"
          | "heartbeatFrequencyMS"
          | "localThresholdMS"
          | "maxConnecting"
          | "maxIdleTimeMS"
          | "maxPoolSize"
          | "minPoolSize"
          | "monitorCommands"
          | "noDelay"
          | "pkFactory"
          | "raw"
          | "replicaSet"
          | "retryReads"
          | "retryWrites"
          | "serverSelectionTimeoutMS"
          | "socketTimeoutMS"
          | "srvMaxHosts"
          | "srvServiceName"
          | "tlsAllowInvalidCertificates"
          | "tlsAllowInvalidHostnames"
          | "tlsInsecure"
          | "waitQueueTimeoutMS"
          | "zlibCompressionLevel">>
    • SupportedNodeConnectionOptions
      • MongoOptions

    Properties

    interface MongoOptions {
        additionalDriverInfo: DriverInfo[];
        allowPartialTrustChain?: boolean;
        ALPNProtocols?: Uint8Array<ArrayBufferLike> | string[] | Uint8Array<ArrayBufferLike>[];
        appName?: string;
        autoEncryption: AutoEncryptionOptions;
        autoSelectFamily?: boolean;
        autoSelectFamilyAttemptTimeout?: number;
        ca?: string | Buffer<ArrayBufferLike> | (string | Buffer<ArrayBufferLike>)[];
        cert?: string | Buffer<ArrayBufferLike> | (string | Buffer<ArrayBufferLike>)[];
        checkServerIdentity?: ((hostname: string, cert: PeerCertificate) => Error | undefined);
        ciphers?: string;
        compressors: (
            | "none"
            | "snappy"
            | "zlib"
            | "zstd")[];
        connectTimeoutMS: number;
        credentials?: MongoCredentials;
        crl?: string | Buffer<ArrayBufferLike> | (string | Buffer<ArrayBufferLike>)[];
        dbName: string;
        directConnection: boolean;
        driverInfo: DriverInfo;
        ecdhCurve?: string;
        extendedMetadata: Promise<Document>;
        family?: number;
        forceServerObjectId: boolean;
        heartbeatFrequencyMS: number;
        hints?: number;
        hosts: HostAddress[];
        keepAliveInitialDelay?: number;
        key?: string | Buffer<ArrayBufferLike> | (string | Buffer<ArrayBufferLike> | KeyObject)[];
        loadBalanced: boolean;
        localAddress?: string;
        localPort?: number;
        localThresholdMS: number;
        lookup?: LookupFunction;
        maxConnecting: number;
        maxIdleTimeMS: number;
        maxPoolSize: number;
        metadata: ClientMetadata;
        minDHSize?: number;
        minHeartbeatFrequencyMS: number;
        minPoolSize: number;
        monitorCommands: boolean;
        noDelay: boolean;
        passphrase?: string;
        pfx?: string | Buffer<ArrayBufferLike> | (string | Buffer<ArrayBufferLike> | PxfObject)[];
        pkFactory: PkFactory;
        proxyHost?: string;
        proxyPassword?: string;
        proxyPort?: number;
        proxyUsername?: string;
        raw: boolean;
        readConcern: ReadConcern;
        readPreference: ReadPreference;
        rejectUnauthorized?: boolean;
        replicaSet: string;
        retryReads: boolean;
        retryWrites: boolean;
        secureContext?: SecureContext;
        secureProtocol?: string;
        serverApi: ServerApi;
        serverMonitoringMode: ServerMonitoringMode;
        servername?: string;
        serverSelectionTimeoutMS: number;
        session?: Buffer<ArrayBufferLike>;
        socketTimeoutMS: number;
        srvHost?: string;
        srvMaxHosts: number;
        srvServiceName: string;
        timeoutMS?: number;
        tls: boolean;
        tlsAllowInvalidCertificates: boolean;
        tlsAllowInvalidHostnames: boolean;
        tlsCAFile?: string;
        tlsCertificateKeyFile?: string;
        tlsCRLFile?: string;
        tlsInsecure: boolean;
        waitQueueTimeoutMS: number;
        writeConcern: WriteConcern;
        zlibCompressionLevel:
            | 0
            | 1
            | 2
            | 3
            | 4
            | 5
            | 6
            | 7
            | 8
            | 9;
    }

    Hierarchy (view full)

    • Required<Pick<MongoClientOptions,
          | "autoEncryption"
          | "connectTimeoutMS"
          | "directConnection"
          | "driverInfo"
          | "forceServerObjectId"
          | "minHeartbeatFrequencyMS"
          | "heartbeatFrequencyMS"
          | "localThresholdMS"
          | "maxConnecting"
          | "maxIdleTimeMS"
          | "maxPoolSize"
          | "minPoolSize"
          | "monitorCommands"
          | "noDelay"
          | "pkFactory"
          | "raw"
          | "replicaSet"
          | "retryReads"
          | "retryWrites"
          | "serverSelectionTimeoutMS"
          | "socketTimeoutMS"
          | "srvMaxHosts"
          | "srvServiceName"
          | "tlsAllowInvalidCertificates"
          | "tlsAllowInvalidHostnames"
          | "tlsInsecure"
          | "waitQueueTimeoutMS"
          | "zlibCompressionLevel">>
    • SupportedNodeConnectionOptions
      • MongoOptions

    Properties

    additionalDriverInfo: DriverInfo[]
    • Will be made internal in a future major release.
    -
    allowPartialTrustChain?: boolean

    Treat intermediate (non-self-signed) +

    allowPartialTrustChain?: boolean

    Treat intermediate (non-self-signed) certificates in the trust CA certificate list as trusted.

    v22.9.0, v20.18.0

    -
    ALPNProtocols?: Uint8Array<ArrayBufferLike> | string[] | Uint8Array<ArrayBufferLike>[]

    An array of strings or a Buffer naming possible ALPN protocols. +

    ALPNProtocols?: Uint8Array<ArrayBufferLike> | string[] | Uint8Array<ArrayBufferLike>[]

    An array of strings or a Buffer naming possible ALPN protocols. (Protocols should be ordered by their priority.)

    -
    appName?: string
    autoEncryption: AutoEncryptionOptions

    Optionally enable in-use auto encryption

    +
    appName?: string
    autoEncryption: AutoEncryptionOptions

    Optionally enable in-use auto encryption

    Automatic encryption is an enterprise only feature that only applies to operations on a collection. Automatic encryption is not supported for operations on a database or view, and operations that are not bypassed will result in error (see libmongocrypt: Auto Encryption Allow-List). To bypass automatic encryption for all operations, set bypassAutoEncryption=true in AutoEncryptionOpts.

    Automatic encryption requires the authenticated user to have the listCollections privilege action.

    @@ -106,9 +106,9 @@
  • AutoEncryptionOptions.bypassAutomaticEncryption is false.
  • If an internal MongoClient is created, it is configured with the same options as the parent MongoClient except minPoolSize is set to 0 and AutoEncryptionOptions is omitted.

    -
    autoSelectFamily?: boolean

    v18.13.0

    -
    autoSelectFamilyAttemptTimeout?: number

    v18.13.0

    -
    ca?: string | Buffer<ArrayBufferLike> | (string | Buffer<ArrayBufferLike>)[]

    Optionally override the trusted CA certificates. Default is to trust +

    autoSelectFamily?: boolean

    v18.13.0

    +
    autoSelectFamilyAttemptTimeout?: number

    v18.13.0

    +
    ca?: string | Buffer<ArrayBufferLike> | (string | Buffer<ArrayBufferLike>)[]

    Optionally override the trusted CA certificates. Default is to trust the well-known CAs curated by Mozilla. Mozilla's CAs are completely replaced when CAs are explicitly specified using this option.

    cert?: string | Buffer<ArrayBufferLike> | (string | Buffer<ArrayBufferLike>)[]

    Cert chains in PEM format. One cert chain should be provided per @@ -140,15 +140,15 @@ information, see modifying the default cipher suite. Permitted ciphers can be obtained via tls.getCiphers(). Cipher names must be uppercased in order for OpenSSL to accept them.

    -
    compressors: (
        | "none"
        | "snappy"
        | "zlib"
        | "zstd")[]
    connectTimeoutMS: number

    The time in milliseconds to attempt a connection before timing out.

    -
    credentials?: MongoCredentials
    crl?: string | Buffer<ArrayBufferLike> | (string | Buffer<ArrayBufferLike>)[]

    PEM formatted CRLs (Certificate Revocation Lists).

    -
    dbName: string
    directConnection: boolean

    Allow a driver to force a Single topology type with a connection string containing one host

    -
    driverInfo: DriverInfo

    Allows a wrapping driver to amend the client metadata generated by the driver to include information about the wrapping driver +

    compressors: (
        | "none"
        | "snappy"
        | "zlib"
        | "zstd")[]
    connectTimeoutMS: number

    The time in milliseconds to attempt a connection before timing out.

    +
    credentials?: MongoCredentials
    crl?: string | Buffer<ArrayBufferLike> | (string | Buffer<ArrayBufferLike>)[]

    PEM formatted CRLs (Certificate Revocation Lists).

    +
    dbName: string
    directConnection: boolean

    Allow a driver to force a Single topology type with a connection string containing one host

    +
    driverInfo: DriverInfo

    Allows a wrapping driver to amend the client metadata generated by the driver to include information about the wrapping driver /*

    • Will be made internal in a future major release.
    -
    ecdhCurve?: string

    A string describing a named curve or a colon separated list of curve +

    ecdhCurve?: string

    A string describing a named curve or a colon separated list of curve NIDs or names, for example P-521:P-384:P-256, to use for ECDH key agreement. Set to auto to select the curve automatically. Use crypto.getCurves() to obtain a list of available curve names. On @@ -158,10 +158,10 @@

    extendedMetadata: Promise<Document>
    • Will be made internal in a future major release.
    -
    family?: number
    forceServerObjectId: boolean

    Force server to assign _id values instead of driver

    -
    heartbeatFrequencyMS: number

    heartbeatFrequencyMS controls when the driver checks the state of the MongoDB deployment. Specify the interval (in milliseconds) between checks, counted from the end of the previous check until the beginning of the next one.

    -
    hints?: number
    hosts: HostAddress[]
    keepAliveInitialDelay?: number

    Node.JS socket option to set the time the first keepalive probe is sent on an idle socket. Defaults to 120000ms

    -
    key?: string | Buffer<ArrayBufferLike> | (string | Buffer<ArrayBufferLike> | KeyObject)[]

    Private keys in PEM format. PEM allows the option of private keys +

    family?: number
    forceServerObjectId: boolean

    Force server to assign _id values instead of driver

    +
    heartbeatFrequencyMS: number

    heartbeatFrequencyMS controls when the driver checks the state of the MongoDB deployment. Specify the interval (in milliseconds) between checks, counted from the end of the previous check until the beginning of the next one.

    +
    hints?: number
    hosts: HostAddress[]
    keepAliveInitialDelay?: number

    Node.JS socket option to set the time the first keepalive probe is sent on an idle socket. Defaults to 120000ms

    +
    key?: string | Buffer<ArrayBufferLike> | (string | Buffer<ArrayBufferLike> | KeyObject)[]

    Private keys in PEM format. PEM allows the option of private keys being encrypted. Encrypted keys will be decrypted with options.passphrase. Multiple keys using different algorithms can be provided either as an array of unencrypted key strings or buffers, @@ -169,20 +169,20 @@ passphrase: ]}. The object form can only occur in an array. object.passphrase is optional. Encrypted keys will be decrypted with object.passphrase if provided, or options.passphrase if it is not.

    -
    loadBalanced: boolean
    localAddress?: string
    localPort?: number
    localThresholdMS: number

    The size (in milliseconds) of the latency window for selecting among multiple suitable MongoDB instances.

    -
    lookup?: LookupFunction
    maxConnecting: number

    The maximum number of connections that may be in the process of being established concurrently by the connection pool.

    -
    maxIdleTimeMS: number

    The maximum amount of time a connection should remain idle in the connection pool before being marked idle, in milliseconds. +

    loadBalanced: boolean
    localAddress?: string
    localPort?: number
    localThresholdMS: number

    The size (in milliseconds) of the latency window for selecting among multiple suitable MongoDB instances.

    +
    lookup?: LookupFunction
    maxConnecting: number

    The maximum number of connections that may be in the process of being established concurrently by the connection pool.

    +
    maxIdleTimeMS: number

    The maximum amount of time a connection should remain idle in the connection pool before being marked idle, in milliseconds. If specified, this must be a number greater than or equal to 0, where 0 means there is no limit. Defaults to 0. After this time passes, the idle collection can be automatically cleaned up in the background.

    -
    maxPoolSize: number

    The maximum number of connections in the connection pool.

    -
    metadata: ClientMetadata
      +
    maxPoolSize: number

    The maximum number of connections in the connection pool.

    +
    metadata: ClientMetadata
    • Will be made internal in a future major release.
    -
    minDHSize?: number
    minHeartbeatFrequencyMS: number

    Sets the minimum heartbeat frequency. In the event that the driver has to frequently re-check a server's availability, it will wait at least this long since the previous check to avoid wasted effort.

    -
    minPoolSize: number

    The minimum number of connections in the connection pool.

    -
    monitorCommands: boolean

    Enable command monitoring for this client

    -
    noDelay: boolean

    TCP Connection no delay

    -
    passphrase?: string

    Shared passphrase used for a single private key and/or a PFX.

    +
    minDHSize?: number
    minHeartbeatFrequencyMS: number

    Sets the minimum heartbeat frequency. In the event that the driver has to frequently re-check a server's availability, it will wait at least this long since the previous check to avoid wasted effort.

    +
    minPoolSize: number

    The minimum number of connections in the connection pool.

    +
    monitorCommands: boolean

    Enable command monitoring for this client

    +
    noDelay: boolean

    TCP Connection no delay

    +
    passphrase?: string

    Shared passphrase used for a single private key and/or a PFX.

    pfx?: string | Buffer<ArrayBufferLike> | (string | Buffer<ArrayBufferLike> | PxfObject)[]

    PFX or PKCS12 encoded private key and certificate chain. pfx is an alternative to providing key and cert individually. PFX is usually encrypted, if it is, passphrase will be used to decrypt it. Multiple @@ -192,7 +192,7 @@ object.passphrase is optional. Encrypted PFX will be decrypted with object.passphrase if provided, or options.passphrase if it is not.

    pkFactory: PkFactory

    A primary key factory function for generation of custom _id keys

    -
    proxyHost?: string
    proxyPassword?: string
    proxyPort?: number
    proxyUsername?: string
    raw: boolean

    Enabling the raw option will return a Node.js Buffer +

    proxyHost?: string
    proxyPassword?: string
    proxyPort?: number
    proxyUsername?: string
    raw: boolean

    Enabling the raw option will return a Node.js Buffer which is allocated using allocUnsafe API. See this section from the Node.js Docs here for more detail about what "unsafe" refers to in this context. @@ -203,16 +203,16 @@

    Please note there is a known limitation where this option cannot be used at the MongoClient level (see NODE-3946). It does correctly work at Db, Collection, and per operation the same as other BSON options work.

    -
    readConcern: ReadConcern
    readPreference: ReadPreference
    rejectUnauthorized?: boolean

    If true the server will reject any connection which is not +

    readConcern: ReadConcern
    readPreference: ReadPreference
    rejectUnauthorized?: boolean

    If true the server will reject any connection which is not authorized with the list of supplied CAs. This option only has an effect if requestCert is true.

    true
     
    replicaSet: string

    Specifies the name of the replica set, if the mongod is a member of a replica set.

    -
    retryReads: boolean

    Enables retryable reads.

    -
    retryWrites: boolean

    Enable retryable writes.

    -
    secureContext?: SecureContext

    An optional TLS context object from tls.createSecureContext()

    +
    retryReads: boolean

    Enables retryable reads.

    +
    retryWrites: boolean

    Enable retryable writes.

    +
    secureContext?: SecureContext

    An optional TLS context object from tls.createSecureContext()

    secureProtocol?: string

    Legacy mechanism to select the TLS protocol version to use, it does not support independent control of the minimum and maximum version, and does not support limiting the protocol to TLSv1.3. Use @@ -222,14 +222,14 @@

    serverApi: ServerApi
    serverMonitoringMode: ServerMonitoringMode
    servername?: string
    serverSelectionTimeoutMS: number

    Specifies how long (in milliseconds) to block for server selection before throwing an exception.

    -
    session?: Buffer<ArrayBufferLike>

    An optional Buffer instance containing a TLS session.

    +
    serverApi: ServerApi
    serverMonitoringMode: ServerMonitoringMode
    servername?: string
    serverSelectionTimeoutMS: number

    Specifies how long (in milliseconds) to block for server selection before throwing an exception.

    +
    session?: Buffer<ArrayBufferLike>

    An optional Buffer instance containing a TLS session.

    socketTimeoutMS: number

    The time in milliseconds to attempt a send or receive on a socket before the attempt times out.

    -
    srvHost?: string
    srvMaxHosts: number

    The maximum number of hosts to connect to when using an srv connection string, a setting of 0 means unlimited hosts

    -
    srvServiceName: string

    Modifies the srv URI to look like:

    +
    srvHost?: string
    srvMaxHosts: number

    The maximum number of hosts to connect to when using an srv connection string, a setting of 0 means unlimited hosts

    +
    srvServiceName: string

    Modifies the srv URI to look like:

    _{srvServiceName}._tcp.{hostname}.{domainname}

    Querying this DNS URI is expected to respond with SRV records

    -
    timeoutMS?: number
    tls: boolean

    NOTE ABOUT TLS Options

    If tls is provided as an option, it is equivalent to setting the ssl option.

    +
    timeoutMS?: number
    tls: boolean

    NOTE ABOUT TLS Options

    If tls is provided as an option, it is equivalent to setting the ssl option.

    NodeJS native TLS options are passed through to the socket and retain their original types.

    @@ -292,9 +292,9 @@
    -
    +
    diff --git a/docs/Next/types/AzureKMSProviderConfiguration.html b/docs/Next/types/AzureKMSProviderConfiguration.html index 7604cf3954a..32ba4b0a450 100644 --- a/docs/Next/types/AzureKMSProviderConfiguration.html +++ b/docs/Next/types/AzureKMSProviderConfiguration.html @@ -6,4 +6,4 @@ Defaults to "login.microsoftonline.com"

  • tenantId: string

    The tenant ID identifies the organization for the account

  • Type declaration

    • accessToken: string

      If present, an access token to authenticate with Azure.

      -
    +
    diff --git a/docs/Next/types/BSONTypeAlias.html b/docs/Next/types/BSONTypeAlias.html index 87867bf47a7..dddff657785 100644 --- a/docs/Next/types/BSONTypeAlias.html +++ b/docs/Next/types/BSONTypeAlias.html @@ -1 +1 @@ -BSONTypeAlias | mongodb

    Type Alias BSONTypeAlias

    BSONTypeAlias: keyof typeof BSON.BSONType
    +BSONTypeAlias | mongodb

    Type Alias BSONTypeAlias

    BSONTypeAlias: keyof typeof BSON.BSONType
    diff --git a/docs/Next/types/BatchType.html b/docs/Next/types/BatchType.html index d107fe90341..af9353b1184 100644 --- a/docs/Next/types/BatchType.html +++ b/docs/Next/types/BatchType.html @@ -1 +1 @@ -BatchType | mongodb

    Type Alias BatchType

    BatchType: typeof BatchType[keyof typeof BatchType]
    +BatchType | mongodb

    Type Alias BatchType

    BatchType: typeof BatchType[keyof typeof BatchType]
    diff --git a/docs/Next/types/BitwiseFilter.html b/docs/Next/types/BitwiseFilter.html index b68f93ef726..da711e678de 100644 --- a/docs/Next/types/BitwiseFilter.html +++ b/docs/Next/types/BitwiseFilter.html @@ -1 +1 @@ -BitwiseFilter | mongodb

    Type Alias BitwiseFilter

    BitwiseFilter: number | Binary | ReadonlyArray<number>
    +BitwiseFilter | mongodb

    Type Alias BitwiseFilter

    BitwiseFilter: number | Binary | ReadonlyArray<number>
    diff --git a/docs/Next/types/CSFLEKMSTlsOptions.html b/docs/Next/types/CSFLEKMSTlsOptions.html index 53a257b851f..1d1fca9208b 100644 --- a/docs/Next/types/CSFLEKMSTlsOptions.html +++ b/docs/Next/types/CSFLEKMSTlsOptions.html @@ -1 +1 @@ -CSFLEKMSTlsOptions | mongodb

    Type Alias CSFLEKMSTlsOptions

    CSFLEKMSTlsOptions: {
        aws?: ClientEncryptionTlsOptions;
        azure?: ClientEncryptionTlsOptions;
        gcp?: ClientEncryptionTlsOptions;
        kmip?: ClientEncryptionTlsOptions;
        local?: ClientEncryptionTlsOptions;
        [key: string]: ClientEncryptionTlsOptions | undefined;
    }
    +CSFLEKMSTlsOptions | mongodb

    Type Alias CSFLEKMSTlsOptions

    CSFLEKMSTlsOptions: {
        aws?: ClientEncryptionTlsOptions;
        azure?: ClientEncryptionTlsOptions;
        gcp?: ClientEncryptionTlsOptions;
        kmip?: ClientEncryptionTlsOptions;
        local?: ClientEncryptionTlsOptions;
        [key: string]: ClientEncryptionTlsOptions | undefined;
    }
    diff --git a/docs/Next/types/Callback.html b/docs/Next/types/Callback.html index 6165023cdb7..a575f21cac2 100644 --- a/docs/Next/types/Callback.html +++ b/docs/Next/types/Callback.html @@ -1,2 +1,2 @@ Callback | mongodb

    Type Alias Callback<T>

    Callback<T>: ((error?: AnyError, result?: T) => void)

    MongoDB Driver style callback

    -

    Type Parameters

    • T = any
    +

    Type Parameters

    • T = any
    diff --git a/docs/Next/types/ChangeStreamDocument.html b/docs/Next/types/ChangeStreamDocument.html index 962a4247c9a..3e199c5cf05 100644 --- a/docs/Next/types/ChangeStreamDocument.html +++ b/docs/Next/types/ChangeStreamDocument.html @@ -1 +1 @@ -ChangeStreamDocument | mongodb
    +ChangeStreamDocument | mongodb
    diff --git a/docs/Next/types/ChangeStreamEvents.html b/docs/Next/types/ChangeStreamEvents.html index c9539a097fb..9229e8a3a5b 100644 --- a/docs/Next/types/ChangeStreamEvents.html +++ b/docs/Next/types/ChangeStreamEvents.html @@ -1,4 +1,4 @@ -ChangeStreamEvents | mongodb

    Type Alias ChangeStreamEvents<TSchema, TChange>

    ChangeStreamEvents<TSchema, TChange>: {
        change(change: TChange): void;
        close(): void;
        end(): void;
        error(error: Error): void;
        init(response: any): void;
        more(response?: any): void;
        response(): void;
        resumeTokenChanged(token: unknown): void;
    }

    Type Parameters

    Type declaration

    • change:function
    • close:function
      • Returns void

        Note that the close event is currently emitted whenever the internal ChangeStreamCursor +ChangeStreamEvents | mongodb

        Type Alias ChangeStreamEvents<TSchema, TChange>

        ChangeStreamEvents<TSchema, TChange>: {
            change(change: TChange): void;
            close(): void;
            end(): void;
            error(error: Error): void;
            init(response: any): void;
            more(response?: any): void;
            response(): void;
            resumeTokenChanged(token: unknown): void;
        }

        Type Parameters

        Type declaration

        • change:function
        • close:function
          • Returns void

            Note that the close event is currently emitted whenever the internal ChangeStreamCursor instance is closed, which can occur multiple times for a given ChangeStream instance.

            TODO(NODE-6434): address this issue in NODE-6434

            -
        • end:function
        • error:function
        • init:function
        • more:function
        • response:function
        • resumeTokenChanged:function
        +
    • end:function
    • error:function
    • init:function
    • more:function
    • response:function
    • resumeTokenChanged:function
    diff --git a/docs/Next/types/ClientBulkWriteModel.html b/docs/Next/types/ClientBulkWriteModel.html index 5fd1266a719..6adfad8d680 100644 --- a/docs/Next/types/ClientBulkWriteModel.html +++ b/docs/Next/types/ClientBulkWriteModel.html @@ -3,4 +3,4 @@

    The type of the namespace field narrows other parts of the BulkWriteModel to use the correct schema for type assertions.

    -
    +
    diff --git a/docs/Next/types/ClientEncryptionDataKeyProvider.html b/docs/Next/types/ClientEncryptionDataKeyProvider.html index 9c98f72723b..8e5dca4a794 100644 --- a/docs/Next/types/ClientEncryptionDataKeyProvider.html +++ b/docs/Next/types/ClientEncryptionDataKeyProvider.html @@ -5,4 +5,4 @@ aws:<name>, gcp:<name>, local:<name>, kmip:<name>, azure:<name> where name is an alphanumeric string, underscores allowed. -
    +
    diff --git a/docs/Next/types/ClientEncryptionSocketOptions.html b/docs/Next/types/ClientEncryptionSocketOptions.html index 75b87049e6d..bbe8eba8d35 100644 --- a/docs/Next/types/ClientEncryptionSocketOptions.html +++ b/docs/Next/types/ClientEncryptionSocketOptions.html @@ -1,2 +1,2 @@ ClientEncryptionSocketOptions | mongodb

    Type Alias ClientEncryptionSocketOptions

    ClientEncryptionSocketOptions: Pick<MongoClientOptions, "autoSelectFamily" | "autoSelectFamilyAttemptTimeout">

    Socket options to use for KMS requests.

    -
    +
    diff --git a/docs/Next/types/ClientEncryptionTlsOptions.html b/docs/Next/types/ClientEncryptionTlsOptions.html index 0bccadddac6..34757315c2e 100644 --- a/docs/Next/types/ClientEncryptionTlsOptions.html +++ b/docs/Next/types/ClientEncryptionTlsOptions.html @@ -6,4 +6,4 @@
  • tlsInsecure
  • These options are not included in the type, and are ignored if provided.

    -
    +
    diff --git a/docs/Next/types/ClientSessionEvents.html b/docs/Next/types/ClientSessionEvents.html index 506efd7b6f9..460edbac9e5 100644 --- a/docs/Next/types/ClientSessionEvents.html +++ b/docs/Next/types/ClientSessionEvents.html @@ -1 +1 @@ -ClientSessionEvents | mongodb

    Type Alias ClientSessionEvents

    ClientSessionEvents: {
        ended(session: ClientSession): void;
    }
    +ClientSessionEvents | mongodb

    Type Alias ClientSessionEvents

    ClientSessionEvents: {
        ended(session: ClientSession): void;
    }
    diff --git a/docs/Next/types/CommonEvents.html b/docs/Next/types/CommonEvents.html index 9a4139f7ea4..f19f585ae5c 100644 --- a/docs/Next/types/CommonEvents.html +++ b/docs/Next/types/CommonEvents.html @@ -1 +1 @@ -CommonEvents | mongodb

    Type Alias CommonEvents

    CommonEvents: "newListener" | "removeListener"
    +CommonEvents | mongodb

    Type Alias CommonEvents

    CommonEvents: "newListener" | "removeListener"
    diff --git a/docs/Next/types/Compressor.html b/docs/Next/types/Compressor.html index 0851888dc72..b248cfc979d 100644 --- a/docs/Next/types/Compressor.html +++ b/docs/Next/types/Compressor.html @@ -1 +1 @@ -Compressor | mongodb
    +Compressor | mongodb
    diff --git a/docs/Next/types/CompressorName.html b/docs/Next/types/CompressorName.html index e8993ad8af9..ef46ef7005d 100644 --- a/docs/Next/types/CompressorName.html +++ b/docs/Next/types/CompressorName.html @@ -1 +1 @@ -CompressorName | mongodb

    Type Alias CompressorName

    CompressorName: keyof typeof Compressor
    +CompressorName | mongodb

    Type Alias CompressorName

    CompressorName: keyof typeof Compressor
    diff --git a/docs/Next/types/Condition.html b/docs/Next/types/Condition.html index cd415f4bd38..1ec1019e315 100644 --- a/docs/Next/types/Condition.html +++ b/docs/Next/types/Condition.html @@ -1 +1 @@ -Condition | mongodb

    Type Alias Condition<T>

    Type Parameters

    • T
    +Condition | mongodb

    Type Alias Condition<T>

    Type Parameters

    • T
    diff --git a/docs/Next/types/ConnectionEvents.html b/docs/Next/types/ConnectionEvents.html index a877d582df2..b5e7bdc1f61 100644 --- a/docs/Next/types/ConnectionEvents.html +++ b/docs/Next/types/ConnectionEvents.html @@ -1 +1 @@ -ConnectionEvents | mongodb

    Type Alias ConnectionEvents

    ConnectionEvents: {
        close(): void;
        clusterTimeReceived(clusterTime: Document): void;
        commandFailed(event: CommandFailedEvent): void;
        commandStarted(event: CommandStartedEvent): void;
        commandSucceeded(event: CommandSucceededEvent): void;
        pinned(pinType: string): void;
        unpinned(pinType: string): void;
    }
    +ConnectionEvents | mongodb

    Type Alias ConnectionEvents

    ConnectionEvents: {
        close(): void;
        clusterTimeReceived(clusterTime: Document): void;
        commandFailed(event: CommandFailedEvent): void;
        commandStarted(event: CommandStartedEvent): void;
        commandSucceeded(event: CommandSucceededEvent): void;
        pinned(pinType: string): void;
        unpinned(pinType: string): void;
    }
    diff --git a/docs/Next/types/ConnectionPoolEvents.html b/docs/Next/types/ConnectionPoolEvents.html index 415a9949ff1..2f605e3fa01 100644 --- a/docs/Next/types/ConnectionPoolEvents.html +++ b/docs/Next/types/ConnectionPoolEvents.html @@ -1 +1 @@ -ConnectionPoolEvents | mongodb

    Type Alias ConnectionPoolEvents

    ConnectionPoolEvents: {
        connectionCheckedIn(event: ConnectionCheckedInEvent): void;
        connectionCheckedOut(event: ConnectionCheckedOutEvent): void;
        connectionCheckOutFailed(event: ConnectionCheckOutFailedEvent): void;
        connectionCheckOutStarted(event: ConnectionCheckOutStartedEvent): void;
        connectionClosed(event: ConnectionClosedEvent): void;
        connectionCreated(event: ConnectionCreatedEvent): void;
        connectionPoolCleared(event: ConnectionPoolClearedEvent): void;
        connectionPoolClosed(event: ConnectionPoolClosedEvent): void;
        connectionPoolCreated(event: ConnectionPoolCreatedEvent): void;
        connectionPoolReady(event: ConnectionPoolReadyEvent): void;
        connectionReady(event: ConnectionReadyEvent): void;
    } & Omit<ConnectionEvents, "close" | "message">
    +ConnectionPoolEvents | mongodb

    Type Alias ConnectionPoolEvents

    ConnectionPoolEvents: {
        connectionCheckedIn(event: ConnectionCheckedInEvent): void;
        connectionCheckedOut(event: ConnectionCheckedOutEvent): void;
        connectionCheckOutFailed(event: ConnectionCheckOutFailedEvent): void;
        connectionCheckOutStarted(event: ConnectionCheckOutStartedEvent): void;
        connectionClosed(event: ConnectionClosedEvent): void;
        connectionCreated(event: ConnectionCreatedEvent): void;
        connectionPoolCleared(event: ConnectionPoolClearedEvent): void;
        connectionPoolClosed(event: ConnectionPoolClosedEvent): void;
        connectionPoolCreated(event: ConnectionPoolCreatedEvent): void;
        connectionPoolReady(event: ConnectionPoolReadyEvent): void;
        connectionReady(event: ConnectionReadyEvent): void;
    } & Omit<ConnectionEvents, "close" | "message">
    diff --git a/docs/Next/types/CursorFlag.html b/docs/Next/types/CursorFlag.html index 74ed3bc723c..45d51029bf7 100644 --- a/docs/Next/types/CursorFlag.html +++ b/docs/Next/types/CursorFlag.html @@ -1 +1 @@ -CursorFlag | mongodb

    Type Alias CursorFlag

    CursorFlag: typeof CURSOR_FLAGS[number]
    +CursorFlag | mongodb

    Type Alias CursorFlag

    CursorFlag: typeof CURSOR_FLAGS[number]
    diff --git a/docs/Next/types/CursorTimeoutMode.html b/docs/Next/types/CursorTimeoutMode.html index dce6580be04..a16f71da392 100644 --- a/docs/Next/types/CursorTimeoutMode.html +++ b/docs/Next/types/CursorTimeoutMode.html @@ -1 +1 @@ -CursorTimeoutMode | mongodb

    Type Alias CursorTimeoutModeExperimental

    CursorTimeoutMode: typeof CursorTimeoutMode[keyof typeof CursorTimeoutMode]
    +CursorTimeoutMode | mongodb

    Type Alias CursorTimeoutModeExperimental

    CursorTimeoutMode: typeof CursorTimeoutMode[keyof typeof CursorTimeoutMode]
    diff --git a/docs/Next/types/DistinctOptions.html b/docs/Next/types/DistinctOptions.html index ada259fc3e8..d3770428cb6 100644 --- a/docs/Next/types/DistinctOptions.html +++ b/docs/Next/types/DistinctOptions.html @@ -4,4 +4,4 @@

    If provided as a string, hint must be index name for an index on the collection. If provided as an object, hint must be an index description for an index defined on the collection.

    See https://www.mongodb.com/docs/manual/reference/command/distinct/#command-fields.

    -
    +
    diff --git a/docs/Next/types/DropDatabaseOptions.html b/docs/Next/types/DropDatabaseOptions.html index 0fb23fc05e6..a60ff322807 100644 --- a/docs/Next/types/DropDatabaseOptions.html +++ b/docs/Next/types/DropDatabaseOptions.html @@ -1 +1 @@ -DropDatabaseOptions | mongodb

    Type Alias DropDatabaseOptions

    DropDatabaseOptions: CommandOperationOptions
    +DropDatabaseOptions | mongodb

    Type Alias DropDatabaseOptions

    DropDatabaseOptions: CommandOperationOptions
    diff --git a/docs/Next/types/DropIndexesOptions.html b/docs/Next/types/DropIndexesOptions.html index 8e73d66e4d7..53479a69f18 100644 --- a/docs/Next/types/DropIndexesOptions.html +++ b/docs/Next/types/DropIndexesOptions.html @@ -1 +1 @@ -DropIndexesOptions | mongodb

    Type Alias DropIndexesOptions

    DropIndexesOptions: CommandOperationOptions
    +DropIndexesOptions | mongodb

    Type Alias DropIndexesOptions

    DropIndexesOptions: CommandOperationOptions
    diff --git a/docs/Next/types/EnhancedOmit.html b/docs/Next/types/EnhancedOmit.html index 149d73691b5..2c5f2ee64a8 100644 --- a/docs/Next/types/EnhancedOmit.html +++ b/docs/Next/types/EnhancedOmit.html @@ -1,2 +1,2 @@ EnhancedOmit | mongodb

    Type Alias EnhancedOmit<TRecordOrUnion, KeyUnion>

    EnhancedOmit<TRecordOrUnion, KeyUnion>: string extends keyof TRecordOrUnion
        ? TRecordOrUnion
        : TRecordOrUnion extends any
            ? Pick<TRecordOrUnion, Exclude<keyof TRecordOrUnion, KeyUnion>>
            : never

    TypeScript Omit (Exclude to be specific) does not work for objects with an "any" indexed type, and breaks discriminated unions

    -

    Type Parameters

    • TRecordOrUnion
    • KeyUnion
    +

    Type Parameters

    • TRecordOrUnion
    • KeyUnion
    diff --git a/docs/Next/types/EventEmitterWithState.html b/docs/Next/types/EventEmitterWithState.html index 9d73aebe160..0ca52a37ec7 100644 --- a/docs/Next/types/EventEmitterWithState.html +++ b/docs/Next/types/EventEmitterWithState.html @@ -1 +1 @@ -EventEmitterWithState | mongodb

    Type Alias EventEmitterWithState

    EventEmitterWithState: {}
    +EventEmitterWithState | mongodb

    Type Alias EventEmitterWithState

    EventEmitterWithState: {}
    diff --git a/docs/Next/types/EventsDescription.html b/docs/Next/types/EventsDescription.html index 93516b7d3f0..b3a70a45352 100644 --- a/docs/Next/types/EventsDescription.html +++ b/docs/Next/types/EventsDescription.html @@ -1,2 +1,2 @@ EventsDescription | mongodb

    Type Alias EventsDescription

    EventsDescription: Record<string, GenericListener>

    Event description type

    -
    +
    diff --git a/docs/Next/types/ExplainVerbosity.html b/docs/Next/types/ExplainVerbosity.html index 1b61e78afae..33928046e03 100644 --- a/docs/Next/types/ExplainVerbosity.html +++ b/docs/Next/types/ExplainVerbosity.html @@ -1 +1 @@ -ExplainVerbosity | mongodb

    Type Alias ExplainVerbosity

    ExplainVerbosity: string
    +ExplainVerbosity | mongodb

    Type Alias ExplainVerbosity

    ExplainVerbosity: string
    diff --git a/docs/Next/types/ExplainVerbosityLike.html b/docs/Next/types/ExplainVerbosityLike.html index 070a1a6a302..99b5736dedb 100644 --- a/docs/Next/types/ExplainVerbosityLike.html +++ b/docs/Next/types/ExplainVerbosityLike.html @@ -1,3 +1,3 @@ ExplainVerbosityLike | mongodb

    Type Alias ExplainVerbosityLike

    ExplainVerbosityLike: ExplainVerbosity | boolean

    For backwards compatibility, true is interpreted as "allPlansExecution" and false as "queryPlanner".

    -
    +
    diff --git a/docs/Next/types/Filter.html b/docs/Next/types/Filter.html index 90062cabe26..a00f1d2802a 100644 --- a/docs/Next/types/Filter.html +++ b/docs/Next/types/Filter.html @@ -1,2 +1,2 @@ Filter | mongodb

    Type Alias Filter<TSchema>

    Filter<TSchema>: {
        [P in keyof WithId<TSchema>]?: Condition<WithId<TSchema>[P]>
    } & RootFilterOperators<WithId<TSchema>>

    A MongoDB filter can be some portion of the schema or a set of operators

    -

    Type Parameters

    • TSchema
    +

    Type Parameters

    • TSchema
    diff --git a/docs/Next/types/FilterOperations.html b/docs/Next/types/FilterOperations.html index a140aff63fe..ebcaedb554c 100644 --- a/docs/Next/types/FilterOperations.html +++ b/docs/Next/types/FilterOperations.html @@ -1 +1 @@ -FilterOperations | mongodb

    Type Alias FilterOperations<T>

    FilterOperations<T>: T extends Record<string, any>
        ? {
            [key in keyof T]?: FilterOperators<T[key]>
        }
        : FilterOperators<T>

    Type Parameters

    • T
    +FilterOperations | mongodb

    Type Alias FilterOperations<T>

    FilterOperations<T>: T extends Record<string, any>
        ? {
            [key in keyof T]?: FilterOperators<T[key]>
        }
        : FilterOperators<T>

    Type Parameters

    • T
    diff --git a/docs/Next/types/Flatten.html b/docs/Next/types/Flatten.html index d0b3e107609..2bde9a685b7 100644 --- a/docs/Next/types/Flatten.html +++ b/docs/Next/types/Flatten.html @@ -1 +1 @@ -Flatten | mongodb

    Type Alias Flatten<Type>

    Flatten<Type>: Type extends ReadonlyArray<infer Item>
        ? Item
        : Type

    Type Parameters

    • Type
    +Flatten | mongodb

    Type Alias Flatten<Type>

    Flatten<Type>: Type extends ReadonlyArray<infer Item>
        ? Item
        : Type

    Type Parameters

    • Type
    diff --git a/docs/Next/types/GCPKMSProviderConfiguration.html b/docs/Next/types/GCPKMSProviderConfiguration.html index 090fce59f2c..ebdccd50ecb 100644 --- a/docs/Next/types/GCPKMSProviderConfiguration.html +++ b/docs/Next/types/GCPKMSProviderConfiguration.html @@ -3,4 +3,4 @@ Defaults to "oauth2.googleapis.com"

  • privateKey: string | Buffer

    A PKCS#8 encrypted key. This can either be a base64 string or a binary representation

  • Type declaration

    • accessToken: string

      If present, an access token to authenticate with GCP.

      -
    +
    diff --git a/docs/Next/types/GSSAPICanonicalizationValue.html b/docs/Next/types/GSSAPICanonicalizationValue.html index 54583bf605f..1cfade66808 100644 --- a/docs/Next/types/GSSAPICanonicalizationValue.html +++ b/docs/Next/types/GSSAPICanonicalizationValue.html @@ -1 +1 @@ -GSSAPICanonicalizationValue | mongodb

    Type Alias GSSAPICanonicalizationValue

    GSSAPICanonicalizationValue: typeof GSSAPICanonicalizationValue[keyof typeof GSSAPICanonicalizationValue]
    +GSSAPICanonicalizationValue | mongodb

    Type Alias GSSAPICanonicalizationValue

    GSSAPICanonicalizationValue: typeof GSSAPICanonicalizationValue[keyof typeof GSSAPICanonicalizationValue]
    diff --git a/docs/Next/types/GenericListener.html b/docs/Next/types/GenericListener.html index 8156dafd958..5904a9e9df7 100644 --- a/docs/Next/types/GenericListener.html +++ b/docs/Next/types/GenericListener.html @@ -1 +1 @@ -GenericListener | mongodb

    Type Alias GenericListener

    GenericListener: ((...args: any[]) => void)
    +GenericListener | mongodb

    Type Alias GenericListener

    GenericListener: ((...args: any[]) => void)
    diff --git a/docs/Next/types/GridFSBucketEvents.html b/docs/Next/types/GridFSBucketEvents.html index 3f8054e1869..ebf309f6620 100644 --- a/docs/Next/types/GridFSBucketEvents.html +++ b/docs/Next/types/GridFSBucketEvents.html @@ -1 +1 @@ -GridFSBucketEvents | mongodb

    Type Alias GridFSBucketEvents

    GridFSBucketEvents: {
        index(): void;
    }
    +GridFSBucketEvents | mongodb

    Type Alias GridFSBucketEvents

    GridFSBucketEvents: {
        index(): void;
    }
    diff --git a/docs/Next/types/Hint.html b/docs/Next/types/Hint.html index b57f15957ea..ea061c69108 100644 --- a/docs/Next/types/Hint.html +++ b/docs/Next/types/Hint.html @@ -1 +1 @@ -Hint | mongodb

    Type Alias Hint

    Hint: string | Document
    +Hint | mongodb

    Type Alias Hint

    Hint: string | Document
    diff --git a/docs/Next/types/IndexDescriptionCompact.html b/docs/Next/types/IndexDescriptionCompact.html index dc2d4498850..25d1ffc508d 100644 --- a/docs/Next/types/IndexDescriptionCompact.html +++ b/docs/Next/types/IndexDescriptionCompact.html @@ -1 +1 @@ -IndexDescriptionCompact | mongodb

    Type Alias IndexDescriptionCompact

    IndexDescriptionCompact: Record<string, [name: string, direction: IndexDirection][]>
    +IndexDescriptionCompact | mongodb

    Type Alias IndexDescriptionCompact

    IndexDescriptionCompact: Record<string, [name: string, direction: IndexDirection][]>
    diff --git a/docs/Next/types/IndexDescriptionInfo.html b/docs/Next/types/IndexDescriptionInfo.html index d121a5296b5..7ec1e21c64f 100644 --- a/docs/Next/types/IndexDescriptionInfo.html +++ b/docs/Next/types/IndexDescriptionInfo.html @@ -1,2 +1,2 @@ IndexDescriptionInfo | mongodb

    Type Alias IndexDescriptionInfo

    IndexDescriptionInfo: Omit<IndexDescription, "key" | "version"> & {
        key: {
            [key: string]: IndexDirection;
        };
        v?: IndexDescription["version"];
    } & Document
    +
    diff --git a/docs/Next/types/IndexDirection.html b/docs/Next/types/IndexDirection.html index 98d5a291ec2..6cf62c5b932 100644 --- a/docs/Next/types/IndexDirection.html +++ b/docs/Next/types/IndexDirection.html @@ -1 +1 @@ -IndexDirection | mongodb

    Type Alias IndexDirection

    IndexDirection:
        | -1
        | 1
        | "2d"
        | "2dsphere"
        | "text"
        | "geoHaystack"
        | "hashed"
        | number
    +IndexDirection | mongodb

    Type Alias IndexDirection

    IndexDirection:
        | -1
        | 1
        | "2d"
        | "2dsphere"
        | "text"
        | "geoHaystack"
        | "hashed"
        | number
    diff --git a/docs/Next/types/IndexSpecification.html b/docs/Next/types/IndexSpecification.html index b63cf97f05b..92b6c171103 100644 --- a/docs/Next/types/IndexSpecification.html +++ b/docs/Next/types/IndexSpecification.html @@ -1 +1 @@ -IndexSpecification | mongodb

    Type Alias IndexSpecification

    IndexSpecification: OneOrMore<
        | string
        | [string, IndexDirection]
        | {
            [key: string]: IndexDirection;
        }
        | Map<string, IndexDirection>>
    +IndexSpecification | mongodb

    Type Alias IndexSpecification

    IndexSpecification: OneOrMore<
        | string
        | [string, IndexDirection]
        | {
            [key: string]: IndexDirection;
        }
        | Map<string, IndexDirection>>
    diff --git a/docs/Next/types/InferIdType.html b/docs/Next/types/InferIdType.html index 391cbb802e7..4b18f3a06d7 100644 --- a/docs/Next/types/InferIdType.html +++ b/docs/Next/types/InferIdType.html @@ -1,2 +1,2 @@ InferIdType | mongodb

    Type Alias InferIdType<TSchema>

    InferIdType<TSchema>: TSchema extends {
            _id: infer IdType;
        }
        ? Record<any, never> extends IdType
            ? never
            : IdType
        : TSchema extends {
                _id?: infer IdType;
            }
            ? unknown extends IdType
                ? ObjectId
                : IdType
            : ObjectId

    Given an object shaped type, return the type of the _id field or default to ObjectId

    -

    Type Parameters

    • TSchema
    +

    Type Parameters

    • TSchema
    diff --git a/docs/Next/types/IntegerType.html b/docs/Next/types/IntegerType.html index e6cd34a6cd2..7399004936a 100644 --- a/docs/Next/types/IntegerType.html +++ b/docs/Next/types/IntegerType.html @@ -1 +1 @@ -IntegerType | mongodb

    Type Alias IntegerType

    IntegerType:
        | number
        | Int32
        | Long
        | bigint
    +IntegerType | mongodb

    Type Alias IntegerType

    IntegerType:
        | number
        | Int32
        | Long
        | bigint
    diff --git a/docs/Next/types/IsAny.html b/docs/Next/types/IsAny.html index a8c64d0d5df..a4d9d4c08f2 100644 --- a/docs/Next/types/IsAny.html +++ b/docs/Next/types/IsAny.html @@ -1 +1 @@ -IsAny | mongodb

    Type Alias IsAny<Type, ResultIfAny, ResultIfNotAny>

    IsAny<Type, ResultIfAny, ResultIfNotAny>: true extends false & Type
        ? ResultIfAny
        : ResultIfNotAny

    Type Parameters

    • Type
    • ResultIfAny
    • ResultIfNotAny
    +IsAny | mongodb

    Type Alias IsAny<Type, ResultIfAny, ResultIfNotAny>

    IsAny<Type, ResultIfAny, ResultIfNotAny>: true extends false & Type
        ? ResultIfAny
        : ResultIfNotAny

    Type Parameters

    • Type
    • ResultIfAny
    • ResultIfNotAny
    diff --git a/docs/Next/types/Join.html b/docs/Next/types/Join.html index fba63a10d6c..abca41902eb 100644 --- a/docs/Next/types/Join.html +++ b/docs/Next/types/Join.html @@ -1 +1 @@ -Join | mongodb

    Type Alias Join<T, D>

    Join<T, D>: T extends []
        ? ""
        : T extends [string | number]
            ? `${T[0]}`
            : T extends [string | number, ...(infer R)]
                ? `${T[0]}${D}${Join<R, D>}`
                : string

    Type Parameters

    • T extends unknown[]
    • D extends string
    +Join | mongodb

    Type Alias Join<T, D>

    Join<T, D>: T extends []
        ? ""
        : T extends [string | number]
            ? `${T[0]}`
            : T extends [string | number, ...(infer R)]
                ? `${T[0]}${D}${Join<R, D>}`
                : string

    Type Parameters

    • T extends unknown[]
    • D extends string
    diff --git a/docs/Next/types/KeysOfAType.html b/docs/Next/types/KeysOfAType.html index 33457830496..e4d618b648c 100644 --- a/docs/Next/types/KeysOfAType.html +++ b/docs/Next/types/KeysOfAType.html @@ -1 +1 @@ -KeysOfAType | mongodb

    Type Alias KeysOfAType<TSchema, Type>

    KeysOfAType<TSchema, Type>: {
        [key in keyof TSchema]: NonNullable<TSchema[key]> extends Type
            ? key
            : never
    }[keyof TSchema]

    Type Parameters

    • TSchema
    • Type
    +KeysOfAType | mongodb

    Type Alias KeysOfAType<TSchema, Type>

    KeysOfAType<TSchema, Type>: {
        [key in keyof TSchema]: NonNullable<TSchema[key]> extends Type
            ? key
            : never
    }[keyof TSchema]

    Type Parameters

    • TSchema
    • Type
    diff --git a/docs/Next/types/KeysOfOtherType.html b/docs/Next/types/KeysOfOtherType.html index 843e2dbdab9..cab4ee564e7 100644 --- a/docs/Next/types/KeysOfOtherType.html +++ b/docs/Next/types/KeysOfOtherType.html @@ -1 +1 @@ -KeysOfOtherType | mongodb

    Type Alias KeysOfOtherType<TSchema, Type>

    KeysOfOtherType<TSchema, Type>: {
        [key in keyof TSchema]: NonNullable<TSchema[key]> extends Type
            ? never
            : key
    }[keyof TSchema]

    Type Parameters

    • TSchema
    • Type
    +KeysOfOtherType | mongodb

    Type Alias KeysOfOtherType<TSchema, Type>

    KeysOfOtherType<TSchema, Type>: {
        [key in keyof TSchema]: NonNullable<TSchema[key]> extends Type
            ? never
            : key
    }[keyof TSchema]

    Type Parameters

    • TSchema
    • Type
    diff --git a/docs/Next/types/ListIndexesOptions.html b/docs/Next/types/ListIndexesOptions.html index ee9ff0e0a90..812340d84e5 100644 --- a/docs/Next/types/ListIndexesOptions.html +++ b/docs/Next/types/ListIndexesOptions.html @@ -1 +1 @@ -ListIndexesOptions | mongodb

    Type Alias ListIndexesOptions

    ListIndexesOptions: AbstractCursorOptions & {}
    +ListIndexesOptions | mongodb

    Type Alias ListIndexesOptions

    ListIndexesOptions: AbstractCursorOptions & {}
    diff --git a/docs/Next/types/ListSearchIndexesOptions.html b/docs/Next/types/ListSearchIndexesOptions.html index 313855ed359..982f75eb4cb 100644 --- a/docs/Next/types/ListSearchIndexesOptions.html +++ b/docs/Next/types/ListSearchIndexesOptions.html @@ -1 +1 @@ -ListSearchIndexesOptions | mongodb

    Type Alias ListSearchIndexesOptions

    ListSearchIndexesOptions: Omit<AggregateOptions, "readConcern" | "writeConcern">
    +ListSearchIndexesOptions | mongodb

    Type Alias ListSearchIndexesOptions

    ListSearchIndexesOptions: Omit<AggregateOptions, "readConcern" | "writeConcern">
    diff --git a/docs/Next/types/MatchKeysAndValues.html b/docs/Next/types/MatchKeysAndValues.html index 0757f1bd856..d26188ea57e 100644 --- a/docs/Next/types/MatchKeysAndValues.html +++ b/docs/Next/types/MatchKeysAndValues.html @@ -1 +1 @@ -MatchKeysAndValues | mongodb

    Type Alias MatchKeysAndValues<TSchema>

    MatchKeysAndValues<TSchema>: Readonly<Partial<TSchema>> & Record<string, any>

    Type Parameters

    • TSchema
    +MatchKeysAndValues | mongodb

    Type Alias MatchKeysAndValues<TSchema>

    MatchKeysAndValues<TSchema>: Readonly<Partial<TSchema>> & Record<string, any>

    Type Parameters

    • TSchema
    diff --git a/docs/Next/types/MongoClientEvents.html b/docs/Next/types/MongoClientEvents.html index 6d137f2b17d..2df0a6ad17f 100644 --- a/docs/Next/types/MongoClientEvents.html +++ b/docs/Next/types/MongoClientEvents.html @@ -1 +1 @@ -MongoClientEvents | mongodb

    Type Alias MongoClientEvents

    MongoClientEvents: Pick<TopologyEvents, typeof MONGO_CLIENT_EVENTS[number]> & {
        open(mongoClient: MongoClient): void;
    }
    +MongoClientEvents | mongodb

    Type Alias MongoClientEvents

    MongoClientEvents: Pick<TopologyEvents, typeof MONGO_CLIENT_EVENTS[number]> & {
        open(mongoClient: MongoClient): void;
    }
    diff --git a/docs/Next/types/MongoErrorLabel.html b/docs/Next/types/MongoErrorLabel.html index ebd008884df..effc4b9feec 100644 --- a/docs/Next/types/MongoErrorLabel.html +++ b/docs/Next/types/MongoErrorLabel.html @@ -1 +1 @@ -MongoErrorLabel | mongodb

    Type Alias MongoErrorLabel

    MongoErrorLabel: typeof MongoErrorLabel[keyof typeof MongoErrorLabel]
    +MongoErrorLabel | mongodb

    Type Alias MongoErrorLabel

    MongoErrorLabel: typeof MongoErrorLabel[keyof typeof MongoErrorLabel]
    diff --git a/docs/Next/types/MongoLoggableComponent.html b/docs/Next/types/MongoLoggableComponent.html index 0505b62f484..cfe76c07b60 100644 --- a/docs/Next/types/MongoLoggableComponent.html +++ b/docs/Next/types/MongoLoggableComponent.html @@ -1 +1 @@ -MongoLoggableComponent | mongodb

    Type Alias MongoLoggableComponent

    MongoLoggableComponent: typeof MongoLoggableComponent[keyof typeof MongoLoggableComponent]
    +MongoLoggableComponent | mongodb

    Type Alias MongoLoggableComponent

    MongoLoggableComponent: typeof MongoLoggableComponent[keyof typeof MongoLoggableComponent]
    diff --git a/docs/Next/types/MonitorEvents.html b/docs/Next/types/MonitorEvents.html index d787f825af8..265fae09578 100644 --- a/docs/Next/types/MonitorEvents.html +++ b/docs/Next/types/MonitorEvents.html @@ -1 +1 @@ -MonitorEvents | mongodb

    Type Alias MonitorEvents

    MonitorEvents: {
        close(): void;
        resetConnectionPool(): void;
        resetServer(error?: MongoError): void;
        serverHeartbeatFailed(event: ServerHeartbeatFailedEvent): void;
        serverHeartbeatStarted(event: ServerHeartbeatStartedEvent): void;
        serverHeartbeatSucceeded(event: ServerHeartbeatSucceededEvent): void;
    } & EventEmitterWithState
    +MonitorEvents | mongodb

    Type Alias MonitorEvents

    MonitorEvents: {
        close(): void;
        resetConnectionPool(): void;
        resetServer(error?: MongoError): void;
        serverHeartbeatFailed(event: ServerHeartbeatFailedEvent): void;
        serverHeartbeatStarted(event: ServerHeartbeatStartedEvent): void;
        serverHeartbeatSucceeded(event: ServerHeartbeatSucceededEvent): void;
    } & EventEmitterWithState
    diff --git a/docs/Next/types/NestedPaths.html b/docs/Next/types/NestedPaths.html index 8ae657bf51b..e753fe899b0 100644 --- a/docs/Next/types/NestedPaths.html +++ b/docs/Next/types/NestedPaths.html @@ -5,4 +5,4 @@ should be changed if issues are found with this level of checking. Beyond this depth any helpers that make use of NestedPaths should devolve to not asserting any type safety on the input.

    -
    +
    diff --git a/docs/Next/types/NestedPathsOfType.html b/docs/Next/types/NestedPathsOfType.html index 88bb890ac3c..359a215f9d8 100644 --- a/docs/Next/types/NestedPathsOfType.html +++ b/docs/Next/types/NestedPathsOfType.html @@ -1,3 +1,3 @@ NestedPathsOfType | mongodb

    Type Alias NestedPathsOfType<TSchema, Type>

    NestedPathsOfType<TSchema, Type>: KeysOfAType<{
        [Property in Join<NestedPaths<TSchema, []>, ".">]: PropertyType<TSchema, Property>
    }, Type>

    returns keys (strings) for every path into a schema with a value of type https://www.mongodb.com/docs/manual/tutorial/query-embedded-documents/

    -

    Type Parameters

    • TSchema
    • Type
    +

    Type Parameters

    • TSchema
    • Type
    diff --git a/docs/Next/types/NonObjectIdLikeDocument.html b/docs/Next/types/NonObjectIdLikeDocument.html index 4da5a1270ee..08254f5118c 100644 --- a/docs/Next/types/NonObjectIdLikeDocument.html +++ b/docs/Next/types/NonObjectIdLikeDocument.html @@ -1,2 +1,2 @@ NonObjectIdLikeDocument | mongodb

    Type Alias NonObjectIdLikeDocument

    NonObjectIdLikeDocument: {
        [key in keyof ObjectIdLike]?: never
    } & Document

    A type that extends Document but forbids anything that "looks like" an object id.

    -
    +
    diff --git a/docs/Next/types/NotAcceptedFields.html b/docs/Next/types/NotAcceptedFields.html index 3ef4744bf91..f423b0f97e4 100644 --- a/docs/Next/types/NotAcceptedFields.html +++ b/docs/Next/types/NotAcceptedFields.html @@ -1,2 +1,2 @@ NotAcceptedFields | mongodb

    Type Alias NotAcceptedFields<TSchema, FieldType>

    NotAcceptedFields<TSchema, FieldType>: {
        readonly [key in KeysOfOtherType<TSchema, FieldType>]?: never
    }

    It avoids using fields with not acceptable types

    -

    Type Parameters

    • TSchema
    • FieldType
    +

    Type Parameters

    • TSchema
    • FieldType
    diff --git a/docs/Next/types/NumericType.html b/docs/Next/types/NumericType.html index 3489277b0f3..f137c44b5ba 100644 --- a/docs/Next/types/NumericType.html +++ b/docs/Next/types/NumericType.html @@ -1 +1 @@ -NumericType | mongodb

    Type Alias NumericType

    NumericType: IntegerType | Decimal128 | Double
    +NumericType | mongodb

    Type Alias NumericType

    NumericType: IntegerType | Decimal128 | Double
    diff --git a/docs/Next/types/OIDCCallbackFunction.html b/docs/Next/types/OIDCCallbackFunction.html index e3fc35de71a..33a2be8034f 100644 --- a/docs/Next/types/OIDCCallbackFunction.html +++ b/docs/Next/types/OIDCCallbackFunction.html @@ -1,2 +1,2 @@ OIDCCallbackFunction | mongodb

    Type Alias OIDCCallbackFunction

    OIDCCallbackFunction: ((params: OIDCCallbackParams) => Promise<OIDCResponse>)

    The signature of the human or machine callback functions.

    -
    +
    diff --git a/docs/Next/types/OneOrMore.html b/docs/Next/types/OneOrMore.html index 9474fa41835..a91078715e6 100644 --- a/docs/Next/types/OneOrMore.html +++ b/docs/Next/types/OneOrMore.html @@ -1 +1 @@ -OneOrMore | mongodb

    Type Alias OneOrMore<T>

    OneOrMore<T>: T | ReadonlyArray<T>

    Type Parameters

    • T
    +OneOrMore | mongodb

    Type Alias OneOrMore<T>

    OneOrMore<T>: T | ReadonlyArray<T>

    Type Parameters

    • T
    diff --git a/docs/Next/types/OnlyFieldsOfType.html b/docs/Next/types/OnlyFieldsOfType.html index b388c4afa8d..356d75e4a37 100644 --- a/docs/Next/types/OnlyFieldsOfType.html +++ b/docs/Next/types/OnlyFieldsOfType.html @@ -1 +1 @@ -OnlyFieldsOfType | mongodb

    Type Alias OnlyFieldsOfType<TSchema, FieldType, AssignableType>

    OnlyFieldsOfType<TSchema, FieldType, AssignableType>: IsAny<TSchema[keyof TSchema], AssignableType extends FieldType
        ? Record<string, FieldType>
        : Record<string, AssignableType>, AcceptedFields<TSchema, FieldType, AssignableType> & NotAcceptedFields<TSchema, FieldType> & Record<string, AssignableType>>

    Type Parameters

    • TSchema
    • FieldType = any
    • AssignableType = FieldType
    +OnlyFieldsOfType | mongodb

    Type Alias OnlyFieldsOfType<TSchema, FieldType, AssignableType>

    OnlyFieldsOfType<TSchema, FieldType, AssignableType>: IsAny<TSchema[keyof TSchema], AssignableType extends FieldType
        ? Record<string, FieldType>
        : Record<string, AssignableType>, AcceptedFields<TSchema, FieldType, AssignableType> & NotAcceptedFields<TSchema, FieldType> & Record<string, AssignableType>>

    Type Parameters

    • TSchema
    • FieldType = any
    • AssignableType = FieldType
    diff --git a/docs/Next/types/OperationTime.html b/docs/Next/types/OperationTime.html index a58b7b66b5f..48a7df844e0 100644 --- a/docs/Next/types/OperationTime.html +++ b/docs/Next/types/OperationTime.html @@ -1,3 +1,3 @@ OperationTime | mongodb

    Type Alias OperationTime

    OperationTime: Timestamp

    Represents a specific point in time on a server. Can be retrieved by using db.command()

    +
    diff --git a/docs/Next/types/OptionalId.html b/docs/Next/types/OptionalId.html index 47f823ffdc5..c42e239f6bf 100644 --- a/docs/Next/types/OptionalId.html +++ b/docs/Next/types/OptionalId.html @@ -1,2 +1,2 @@ OptionalId | mongodb

    Type Alias OptionalId<TSchema>

    OptionalId<TSchema>: EnhancedOmit<TSchema, "_id"> & {
        _id?: InferIdType<TSchema>;
    }

    Add an optional _id field to an object shaped type

    -

    Type Parameters

    • TSchema
    +

    Type Parameters

    • TSchema
    diff --git a/docs/Next/types/OptionalUnlessRequiredId.html b/docs/Next/types/OptionalUnlessRequiredId.html index d7044d81d75..1e3aab24261 100644 --- a/docs/Next/types/OptionalUnlessRequiredId.html +++ b/docs/Next/types/OptionalUnlessRequiredId.html @@ -1,3 +1,3 @@ OptionalUnlessRequiredId | mongodb

    Type Alias OptionalUnlessRequiredId<TSchema>

    OptionalUnlessRequiredId<TSchema>: TSchema extends {
            _id: any;
        }
        ? TSchema
        : OptionalId<TSchema>

    Adds an optional _id field to an object shaped type, unless the _id field is required on that type. In the case _id is required, this method continues to require_id.

    -

    Type Parameters

    • TSchema
    +

    Type Parameters

    • TSchema
    diff --git a/docs/Next/types/ProfilingLevel.html b/docs/Next/types/ProfilingLevel.html index a8994490892..5f5f7371f10 100644 --- a/docs/Next/types/ProfilingLevel.html +++ b/docs/Next/types/ProfilingLevel.html @@ -1 +1 @@ -ProfilingLevel | mongodb
    +ProfilingLevel | mongodb
    diff --git a/docs/Next/types/ProfilingLevelOptions.html b/docs/Next/types/ProfilingLevelOptions.html index e53beda2466..a6cc12ea9f7 100644 --- a/docs/Next/types/ProfilingLevelOptions.html +++ b/docs/Next/types/ProfilingLevelOptions.html @@ -1 +1 @@ -ProfilingLevelOptions | mongodb

    Type Alias ProfilingLevelOptions

    ProfilingLevelOptions: Omit<CommandOperationOptions, "rawData">
    +ProfilingLevelOptions | mongodb

    Type Alias ProfilingLevelOptions

    ProfilingLevelOptions: Omit<CommandOperationOptions, "rawData">
    diff --git a/docs/Next/types/PropertyType.html b/docs/Next/types/PropertyType.html index 078f4eae6f3..0a1fc618123 100644 --- a/docs/Next/types/PropertyType.html +++ b/docs/Next/types/PropertyType.html @@ -1 +1 @@ -PropertyType | mongodb

    Type Alias PropertyType<Type, Property>

    PropertyType<Type, Property>: string extends Property
        ? unknown
        : Property extends keyof Type
            ? Type[Property]
            : Property extends `${number}`
                ? Type extends ReadonlyArray<infer ArrayType>
                    ? ArrayType
                    : unknown
                : Property extends `${infer Key}.${infer Rest}`
                    ? Key extends `${number}`
                        ? Type extends ReadonlyArray<infer ArrayType>
                            ? PropertyType<ArrayType, Rest>
                            : unknown
                        : Key extends keyof Type
                            ? Type[Key] extends Map<string, infer MapType>
                                ? MapType
                                : PropertyType<Type[Key], Rest>
                            : unknown
                    : unknown

    Type Parameters

    • Type
    • Property extends string
    +PropertyType | mongodb

    Type Alias PropertyType<Type, Property>

    PropertyType<Type, Property>: string extends Property
        ? unknown
        : Property extends keyof Type
            ? Type[Property]
            : Property extends `${number}`
                ? Type extends ReadonlyArray<infer ArrayType>
                    ? ArrayType
                    : unknown
                : Property extends `${infer Key}.${infer Rest}`
                    ? Key extends `${number}`
                        ? Type extends ReadonlyArray<infer ArrayType>
                            ? PropertyType<ArrayType, Rest>
                            : unknown
                        : Key extends keyof Type
                            ? Type[Key] extends Map<string, infer MapType>
                                ? MapType
                                : PropertyType<Type[Key], Rest>
                            : unknown
                    : unknown

    Type Parameters

    • Type
    • Property extends string
    diff --git a/docs/Next/types/PullAllOperator.html b/docs/Next/types/PullAllOperator.html index 6c226dc7e96..8f9a346c2e9 100644 --- a/docs/Next/types/PullAllOperator.html +++ b/docs/Next/types/PullAllOperator.html @@ -1 +1 @@ -PullAllOperator | mongodb

    Type Alias PullAllOperator<TSchema>

    PullAllOperator<TSchema>: {
        readonly [key in KeysOfAType<TSchema, ReadonlyArray<any>>]?: TSchema[key]
    } & NotAcceptedFields<TSchema, ReadonlyArray<any>> & {
        [key: string]: ReadonlyArray<any>;
    }

    Type Parameters

    • TSchema
    +PullAllOperator | mongodb

    Type Alias PullAllOperator<TSchema>

    PullAllOperator<TSchema>: {
        readonly [key in KeysOfAType<TSchema, ReadonlyArray<any>>]?: TSchema[key]
    } & NotAcceptedFields<TSchema, ReadonlyArray<any>> & {
        [key: string]: ReadonlyArray<any>;
    }

    Type Parameters

    • TSchema
    diff --git a/docs/Next/types/PullOperator.html b/docs/Next/types/PullOperator.html index a72d46c81ad..014ccc7bdda 100644 --- a/docs/Next/types/PullOperator.html +++ b/docs/Next/types/PullOperator.html @@ -1 +1 @@ -PullOperator | mongodb

    Type Alias PullOperator<TSchema>

    PullOperator<TSchema>: {
        readonly [key in KeysOfAType<TSchema, ReadonlyArray<any>>]?: Partial<Flatten<TSchema[key]>> | FilterOperations<Flatten<TSchema[key]>>
    } & NotAcceptedFields<TSchema, ReadonlyArray<any>> & {
        [key: string]: FilterOperators<any> | any;
    }

    Type Parameters

    • TSchema
    +PullOperator | mongodb

    Type Alias PullOperator<TSchema>

    PullOperator<TSchema>: {
        readonly [key in KeysOfAType<TSchema, ReadonlyArray<any>>]?: Partial<Flatten<TSchema[key]>> | FilterOperations<Flatten<TSchema[key]>>
    } & NotAcceptedFields<TSchema, ReadonlyArray<any>> & {
        [key: string]: FilterOperators<any> | any;
    }

    Type Parameters

    • TSchema
    diff --git a/docs/Next/types/PushOperator.html b/docs/Next/types/PushOperator.html index 08d958a0bdc..ef891cee968 100644 --- a/docs/Next/types/PushOperator.html +++ b/docs/Next/types/PushOperator.html @@ -1 +1 @@ -PushOperator | mongodb

    Type Alias PushOperator<TSchema>

    PushOperator<TSchema>: {
        readonly [key in KeysOfAType<TSchema, ReadonlyArray<any>>]?: Flatten<TSchema[key]> | ArrayOperator<Flatten<TSchema[key]>[]>
    } & NotAcceptedFields<TSchema, ReadonlyArray<any>> & {
        [key: string]: ArrayOperator<any> | any;
    }

    Type Parameters

    • TSchema
    +PushOperator | mongodb

    Type Alias PushOperator<TSchema>

    PushOperator<TSchema>: {
        readonly [key in KeysOfAType<TSchema, ReadonlyArray<any>>]?: Flatten<TSchema[key]> | ArrayOperator<Flatten<TSchema[key]>[]>
    } & NotAcceptedFields<TSchema, ReadonlyArray<any>> & {
        [key: string]: ArrayOperator<any> | any;
    }

    Type Parameters

    • TSchema
    diff --git a/docs/Next/types/ReadConcernLevel.html b/docs/Next/types/ReadConcernLevel.html index 5708df345fe..80f73251a7a 100644 --- a/docs/Next/types/ReadConcernLevel.html +++ b/docs/Next/types/ReadConcernLevel.html @@ -1 +1 @@ -ReadConcernLevel | mongodb

    Type Alias ReadConcernLevel

    ReadConcernLevel: typeof ReadConcernLevel[keyof typeof ReadConcernLevel]
    +ReadConcernLevel | mongodb

    Type Alias ReadConcernLevel

    ReadConcernLevel: typeof ReadConcernLevel[keyof typeof ReadConcernLevel]
    diff --git a/docs/Next/types/ReadConcernLike.html b/docs/Next/types/ReadConcernLike.html index b926131692e..e014ce5085e 100644 --- a/docs/Next/types/ReadConcernLike.html +++ b/docs/Next/types/ReadConcernLike.html @@ -1 +1 @@ -ReadConcernLike | mongodb

    Type Alias ReadConcernLike

    ReadConcernLike: ReadConcern | {
        level: ReadConcernLevel;
    } | ReadConcernLevel
    +ReadConcernLike | mongodb

    Type Alias ReadConcernLike

    ReadConcernLike: ReadConcern | {
        level: ReadConcernLevel;
    } | ReadConcernLevel
    diff --git a/docs/Next/types/ReadPreferenceLike.html b/docs/Next/types/ReadPreferenceLike.html index 9e48a9304bf..f3fcfe52a0e 100644 --- a/docs/Next/types/ReadPreferenceLike.html +++ b/docs/Next/types/ReadPreferenceLike.html @@ -1 +1 @@ -ReadPreferenceLike | mongodb

    Type Alias ReadPreferenceLike

    ReadPreferenceLike: ReadPreference | ReadPreferenceMode
    +ReadPreferenceLike | mongodb

    Type Alias ReadPreferenceLike

    ReadPreferenceLike: ReadPreference | ReadPreferenceMode
    diff --git a/docs/Next/types/ReadPreferenceMode.html b/docs/Next/types/ReadPreferenceMode.html index 784658a238f..ad3c5567cda 100644 --- a/docs/Next/types/ReadPreferenceMode.html +++ b/docs/Next/types/ReadPreferenceMode.html @@ -1 +1 @@ -ReadPreferenceMode | mongodb

    Type Alias ReadPreferenceMode

    ReadPreferenceMode: typeof ReadPreferenceMode[keyof typeof ReadPreferenceMode]
    +ReadPreferenceMode | mongodb

    Type Alias ReadPreferenceMode

    ReadPreferenceMode: typeof ReadPreferenceMode[keyof typeof ReadPreferenceMode]
    diff --git a/docs/Next/types/RegExpOrString.html b/docs/Next/types/RegExpOrString.html index 46c3ec07ef2..0e0c1225302 100644 --- a/docs/Next/types/RegExpOrString.html +++ b/docs/Next/types/RegExpOrString.html @@ -1 +1 @@ -RegExpOrString | mongodb

    Type Alias RegExpOrString<T>

    RegExpOrString<T>: T extends string
        ? BSONRegExp | RegExp | T
        : T

    Type Parameters

    • T
    +RegExpOrString | mongodb

    Type Alias RegExpOrString<T>

    RegExpOrString<T>: T extends string
        ? BSONRegExp | RegExp | T
        : T

    Type Parameters

    • T
    diff --git a/docs/Next/types/RemoveUserOptions.html b/docs/Next/types/RemoveUserOptions.html index 1c25abf1236..c534aa6cbae 100644 --- a/docs/Next/types/RemoveUserOptions.html +++ b/docs/Next/types/RemoveUserOptions.html @@ -1 +1 @@ -RemoveUserOptions | mongodb

    Type Alias RemoveUserOptions

    RemoveUserOptions: Omit<CommandOperationOptions, "rawData">
    +RemoveUserOptions | mongodb

    Type Alias RemoveUserOptions

    RemoveUserOptions: Omit<CommandOperationOptions, "rawData">
    diff --git a/docs/Next/types/ResumeToken.html b/docs/Next/types/ResumeToken.html index 3b1ebd8ee4e..b6be26b7a6c 100644 --- a/docs/Next/types/ResumeToken.html +++ b/docs/Next/types/ResumeToken.html @@ -1,3 +1,3 @@ ResumeToken | mongodb

    Type Alias ResumeToken

    ResumeToken: unknown

    Represents the logical starting point for a new ChangeStream or resuming a ChangeStream on the server.

    +
    diff --git a/docs/Next/types/ReturnDocument.html b/docs/Next/types/ReturnDocument.html index a8db5447ed6..20544c27a5c 100644 --- a/docs/Next/types/ReturnDocument.html +++ b/docs/Next/types/ReturnDocument.html @@ -1 +1 @@ -ReturnDocument | mongodb

    Type Alias ReturnDocument

    ReturnDocument: typeof ReturnDocument[keyof typeof ReturnDocument]
    +ReturnDocument | mongodb

    Type Alias ReturnDocument

    ReturnDocument: typeof ReturnDocument[keyof typeof ReturnDocument]
    diff --git a/docs/Next/types/RunCommandOptions.html b/docs/Next/types/RunCommandOptions.html index 3da973c6a13..b387451eb29 100644 --- a/docs/Next/types/RunCommandOptions.html +++ b/docs/Next/types/RunCommandOptions.html @@ -1,4 +1,4 @@ RunCommandOptions | mongodb

    Type Alias RunCommandOptions

    RunCommandOptions: {
        readPreference?: ReadPreferenceLike;
        session?: ClientSession;
        timeoutMS?: number;
    } & BSONSerializeOptions & Abortable

    Type declaration

    • OptionalreadPreference?: ReadPreferenceLike

      The read preference

    • Optionalsession?: ClientSession

      Specify ClientSession for this command

    • Optional ExperimentaltimeoutMS?: number

      Specifies the time an operation will run until it throws a timeout error

      -
    +
    diff --git a/docs/Next/types/RunCursorCommandOptions.html b/docs/Next/types/RunCursorCommandOptions.html index f0788fba019..675672ce552 100644 --- a/docs/Next/types/RunCursorCommandOptions.html +++ b/docs/Next/types/RunCursorCommandOptions.html @@ -15,4 +15,4 @@
    const cursor = collection.find({}, { timeoutMS: 1000, timeoutMode: 'cursorLifetime' });
    const docs = await cursor.toArray(); // This entire line will throw a timeout error if all batches are not fetched and returned within 1000ms.
    -
    +
    diff --git a/docs/Next/variables/ExplainVerbosity-1.html b/docs/Next/variables/ExplainVerbosity-1.html index 5a6c3943f87..01f1a7e9934 100644 --- a/docs/Next/variables/ExplainVerbosity-1.html +++ b/docs/Next/variables/ExplainVerbosity-1.html @@ -1 +1 @@ -ExplainVerbosity | mongodb

    Variable ExplainVerbosityConst

    ExplainVerbosity: Readonly<{
        allPlansExecution: "allPlansExecution";
        executionStats: "executionStats";
        queryPlanner: "queryPlanner";
        queryPlannerExtended: "queryPlannerExtended";
    }> = ...
    +ExplainVerbosity | mongodb

    Variable ExplainVerbosityConst

    ExplainVerbosity: Readonly<{
        allPlansExecution: "allPlansExecution";
        executionStats: "executionStats";
        queryPlanner: "queryPlanner";
        queryPlannerExtended: "queryPlannerExtended";
    }> = ...
    diff --git a/docs/Next/variables/GSSAPICanonicalizationValue-1.html b/docs/Next/variables/GSSAPICanonicalizationValue-1.html index 3977a84c6f2..4586f3d6109 100644 --- a/docs/Next/variables/GSSAPICanonicalizationValue-1.html +++ b/docs/Next/variables/GSSAPICanonicalizationValue-1.html @@ -1 +1 @@ -GSSAPICanonicalizationValue | mongodb

    Variable GSSAPICanonicalizationValueConst

    GSSAPICanonicalizationValue: Readonly<{
        forward: "forward";
        forwardAndReverse: "forwardAndReverse";
        none: "none";
        off: false;
        on: true;
    }> = ...
    +GSSAPICanonicalizationValue | mongodb

    Variable GSSAPICanonicalizationValueConst

    GSSAPICanonicalizationValue: Readonly<{
        forward: "forward";
        forwardAndReverse: "forwardAndReverse";
        none: "none";
        off: false;
        on: true;
    }> = ...
    diff --git a/docs/Next/variables/LEGAL_TCP_SOCKET_OPTIONS.html b/docs/Next/variables/LEGAL_TCP_SOCKET_OPTIONS.html index 3637a6664d7..a52545d50ba 100644 --- a/docs/Next/variables/LEGAL_TCP_SOCKET_OPTIONS.html +++ b/docs/Next/variables/LEGAL_TCP_SOCKET_OPTIONS.html @@ -1 +1 @@ -LEGAL_TCP_SOCKET_OPTIONS | mongodb

    Variable LEGAL_TCP_SOCKET_OPTIONSConst

    LEGAL_TCP_SOCKET_OPTIONS: readonly ["autoSelectFamily", "autoSelectFamilyAttemptTimeout", "keepAliveInitialDelay", "family", "hints", "localAddress", "localPort", "lookup"] = ...
    +LEGAL_TCP_SOCKET_OPTIONS | mongodb

    Variable LEGAL_TCP_SOCKET_OPTIONSConst

    LEGAL_TCP_SOCKET_OPTIONS: readonly ["autoSelectFamily", "autoSelectFamilyAttemptTimeout", "keepAliveInitialDelay", "family", "hints", "localAddress", "localPort", "lookup"] = ...
    diff --git a/docs/Next/variables/LEGAL_TLS_SOCKET_OPTIONS.html b/docs/Next/variables/LEGAL_TLS_SOCKET_OPTIONS.html index 42ea3224f4c..4a13bd21350 100644 --- a/docs/Next/variables/LEGAL_TLS_SOCKET_OPTIONS.html +++ b/docs/Next/variables/LEGAL_TLS_SOCKET_OPTIONS.html @@ -1 +1 @@ -LEGAL_TLS_SOCKET_OPTIONS | mongodb

    Variable LEGAL_TLS_SOCKET_OPTIONSConst

    LEGAL_TLS_SOCKET_OPTIONS: readonly ["allowPartialTrustChain", "ALPNProtocols", "ca", "cert", "checkServerIdentity", "ciphers", "crl", "ecdhCurve", "key", "minDHSize", "passphrase", "pfx", "rejectUnauthorized", "secureContext", "secureProtocol", "servername", "session"] = ...
    +LEGAL_TLS_SOCKET_OPTIONS | mongodb

    Variable LEGAL_TLS_SOCKET_OPTIONSConst

    LEGAL_TLS_SOCKET_OPTIONS: readonly ["allowPartialTrustChain", "ALPNProtocols", "ca", "cert", "checkServerIdentity", "ciphers", "crl", "ecdhCurve", "key", "minDHSize", "passphrase", "pfx", "rejectUnauthorized", "secureContext", "secureProtocol", "servername", "session"] = ...
    diff --git a/docs/Next/variables/MONGO_CLIENT_EVENTS.html b/docs/Next/variables/MONGO_CLIENT_EVENTS.html index 39516c3555d..81fab00b0d7 100644 --- a/docs/Next/variables/MONGO_CLIENT_EVENTS.html +++ b/docs/Next/variables/MONGO_CLIENT_EVENTS.html @@ -1 +1 @@ -MONGO_CLIENT_EVENTS | mongodb

    Variable MONGO_CLIENT_EVENTSConst

    MONGO_CLIENT_EVENTS: readonly ["connectionPoolCreated", "connectionPoolReady", "connectionPoolCleared", "connectionPoolClosed", "connectionCreated", "connectionReady", "connectionClosed", "connectionCheckOutStarted", "connectionCheckOutFailed", "connectionCheckedOut", "connectionCheckedIn", "commandStarted", "commandSucceeded", "commandFailed", "serverOpening", "serverClosed", "serverDescriptionChanged", "topologyOpening", "topologyClosed", "topologyDescriptionChanged", "error", "timeout", "close", "serverHeartbeatStarted", "serverHeartbeatSucceeded", "serverHeartbeatFailed"] = ...
    +MONGO_CLIENT_EVENTS | mongodb

    Variable MONGO_CLIENT_EVENTSConst

    MONGO_CLIENT_EVENTS: readonly ["connectionPoolCreated", "connectionPoolReady", "connectionPoolCleared", "connectionPoolClosed", "connectionCreated", "connectionReady", "connectionClosed", "connectionCheckOutStarted", "connectionCheckOutFailed", "connectionCheckedOut", "connectionCheckedIn", "commandStarted", "commandSucceeded", "commandFailed", "serverOpening", "serverClosed", "serverDescriptionChanged", "topologyOpening", "topologyClosed", "topologyDescriptionChanged", "error", "timeout", "close", "serverHeartbeatStarted", "serverHeartbeatSucceeded", "serverHeartbeatFailed"] = ...
    diff --git a/docs/Next/variables/MongoErrorLabel-1.html b/docs/Next/variables/MongoErrorLabel-1.html index c6f6c0ace40..9cb9c2897ce 100644 --- a/docs/Next/variables/MongoErrorLabel-1.html +++ b/docs/Next/variables/MongoErrorLabel-1.html @@ -1 +1 @@ -MongoErrorLabel | mongodb

    Variable MongoErrorLabelConst

    MongoErrorLabel: Readonly<{
        HandshakeError: "HandshakeError";
        InterruptInUseConnections: "InterruptInUseConnections";
        NoWritesPerformed: "NoWritesPerformed";
        PoolRequstedRetry: "PoolRequstedRetry";
        ResetPool: "ResetPool";
        ResumableChangeStreamError: "ResumableChangeStreamError";
        RetryableWriteError: "RetryableWriteError";
        TransientTransactionError: "TransientTransactionError";
        UnknownTransactionCommitResult: "UnknownTransactionCommitResult";
    }> = ...
    +MongoErrorLabel | mongodb

    Variable MongoErrorLabelConst

    MongoErrorLabel: Readonly<{
        HandshakeError: "HandshakeError";
        InterruptInUseConnections: "InterruptInUseConnections";
        NoWritesPerformed: "NoWritesPerformed";
        PoolRequestedRetry: "PoolRequestedRetry";
        ResetPool: "ResetPool";
        ResumableChangeStreamError: "ResumableChangeStreamError";
        RetryableWriteError: "RetryableWriteError";
        TransientTransactionError: "TransientTransactionError";
        UnknownTransactionCommitResult: "UnknownTransactionCommitResult";
    }> = ...
    diff --git a/docs/Next/variables/MongoLoggableComponent-1.html b/docs/Next/variables/MongoLoggableComponent-1.html index 301dd9aefc4..d6abf9691a9 100644 --- a/docs/Next/variables/MongoLoggableComponent-1.html +++ b/docs/Next/variables/MongoLoggableComponent-1.html @@ -1 +1 @@ -MongoLoggableComponent | mongodb

    Variable MongoLoggableComponentConst

    MongoLoggableComponent: Readonly<{
        CLIENT: "client";
        COMMAND: "command";
        CONNECTION: "connection";
        SERVER_SELECTION: "serverSelection";
        TOPOLOGY: "topology";
    }> = ...
    +MongoLoggableComponent | mongodb

    Variable MongoLoggableComponentConst

    MongoLoggableComponent: Readonly<{
        CLIENT: "client";
        COMMAND: "command";
        CONNECTION: "connection";
        SERVER_SELECTION: "serverSelection";
        TOPOLOGY: "topology";
    }> = ...
    diff --git a/docs/Next/variables/ProfilingLevel-1.html b/docs/Next/variables/ProfilingLevel-1.html index 9a731da1844..93edb3ace2a 100644 --- a/docs/Next/variables/ProfilingLevel-1.html +++ b/docs/Next/variables/ProfilingLevel-1.html @@ -1 +1 @@ -ProfilingLevel | mongodb

    Variable ProfilingLevelConst

    ProfilingLevel: Readonly<{
        all: "all";
        off: "off";
        slowOnly: "slow_only";
    }> = ...
    +ProfilingLevel | mongodb

    Variable ProfilingLevelConst

    ProfilingLevel: Readonly<{
        all: "all";
        off: "off";
        slowOnly: "slow_only";
    }> = ...
    diff --git a/docs/Next/variables/ReadConcernLevel-1.html b/docs/Next/variables/ReadConcernLevel-1.html index 3c5b5536ee6..fd5e8503058 100644 --- a/docs/Next/variables/ReadConcernLevel-1.html +++ b/docs/Next/variables/ReadConcernLevel-1.html @@ -1 +1 @@ -ReadConcernLevel | mongodb

    Variable ReadConcernLevelConst

    ReadConcernLevel: Readonly<{
        available: "available";
        linearizable: "linearizable";
        local: "local";
        majority: "majority";
        snapshot: "snapshot";
    }> = ...
    +ReadConcernLevel | mongodb

    Variable ReadConcernLevelConst

    ReadConcernLevel: Readonly<{
        available: "available";
        linearizable: "linearizable";
        local: "local";
        majority: "majority";
        snapshot: "snapshot";
    }> = ...
    diff --git a/docs/Next/variables/ReadPreferenceMode-1.html b/docs/Next/variables/ReadPreferenceMode-1.html index b5c5a703bbf..f6197e0afba 100644 --- a/docs/Next/variables/ReadPreferenceMode-1.html +++ b/docs/Next/variables/ReadPreferenceMode-1.html @@ -1 +1 @@ -ReadPreferenceMode | mongodb

    Variable ReadPreferenceModeConst

    ReadPreferenceMode: Readonly<{
        nearest: "nearest";
        primary: "primary";
        primaryPreferred: "primaryPreferred";
        secondary: "secondary";
        secondaryPreferred: "secondaryPreferred";
    }> = ...
    +ReadPreferenceMode | mongodb

    Variable ReadPreferenceModeConst

    ReadPreferenceMode: Readonly<{
        nearest: "nearest";
        primary: "primary";
        primaryPreferred: "primaryPreferred";
        secondary: "secondary";
        secondaryPreferred: "secondaryPreferred";
    }> = ...
    diff --git a/docs/Next/variables/ReturnDocument-1.html b/docs/Next/variables/ReturnDocument-1.html index baf4ca8f81a..b71a7a56e32 100644 --- a/docs/Next/variables/ReturnDocument-1.html +++ b/docs/Next/variables/ReturnDocument-1.html @@ -1 +1 @@ -ReturnDocument | mongodb

    Variable ReturnDocumentConst

    ReturnDocument: Readonly<{
        AFTER: "after";
        BEFORE: "before";
    }> = ...
    +ReturnDocument | mongodb

    Variable ReturnDocumentConst

    ReturnDocument: Readonly<{
        AFTER: "after";
        BEFORE: "before";
    }> = ...
    diff --git a/docs/Next/variables/ServerApiVersion-1.html b/docs/Next/variables/ServerApiVersion-1.html index f064be3df8c..ef212b55e06 100644 --- a/docs/Next/variables/ServerApiVersion-1.html +++ b/docs/Next/variables/ServerApiVersion-1.html @@ -1 +1 @@ -ServerApiVersion | mongodb

    Variable ServerApiVersionConst

    ServerApiVersion: Readonly<{
        v1: "1";
    }> = ...
    +ServerApiVersion | mongodb

    Variable ServerApiVersionConst

    ServerApiVersion: Readonly<{
        v1: "1";
    }> = ...
    diff --git a/docs/Next/variables/ServerMonitoringMode-1.html b/docs/Next/variables/ServerMonitoringMode-1.html index 74bb7518187..42bed17f264 100644 --- a/docs/Next/variables/ServerMonitoringMode-1.html +++ b/docs/Next/variables/ServerMonitoringMode-1.html @@ -1 +1 @@ -ServerMonitoringMode | mongodb

    Variable ServerMonitoringModeConst

    ServerMonitoringMode: Readonly<{
        auto: "auto";
        poll: "poll";
        stream: "stream";
    }> = ...
    +ServerMonitoringMode | mongodb

    Variable ServerMonitoringModeConst

    ServerMonitoringMode: Readonly<{
        auto: "auto";
        poll: "poll";
        stream: "stream";
    }> = ...
    diff --git a/docs/Next/variables/ServerType-1.html b/docs/Next/variables/ServerType-1.html index 19384948ff3..c9913fc1059 100644 --- a/docs/Next/variables/ServerType-1.html +++ b/docs/Next/variables/ServerType-1.html @@ -1,2 +1,2 @@ ServerType | mongodb

    Variable ServerTypeConst

    ServerType: Readonly<{
        LoadBalancer: "LoadBalancer";
        Mongos: "Mongos";
        PossiblePrimary: "PossiblePrimary";
        RSArbiter: "RSArbiter";
        RSGhost: "RSGhost";
        RSOther: "RSOther";
        RSPrimary: "RSPrimary";
        RSSecondary: "RSSecondary";
        Standalone: "Standalone";
        Unknown: "Unknown";
    }> = ...

    An enumeration of server types we know about

    -
    +
    diff --git a/docs/Next/variables/SeverityLevel-1.html b/docs/Next/variables/SeverityLevel-1.html index d8cf94c45ef..d8d66d17f99 100644 --- a/docs/Next/variables/SeverityLevel-1.html +++ b/docs/Next/variables/SeverityLevel-1.html @@ -1,3 +1,3 @@ SeverityLevel | mongodb

    Variable SeverityLevelConst

    SeverityLevel: Readonly<{
        ALERT: "alert";
        CRITICAL: "critical";
        DEBUG: "debug";
        EMERGENCY: "emergency";
        ERROR: "error";
        INFORMATIONAL: "info";
        NOTICE: "notice";
        OFF: "off";
        TRACE: "trace";
        WARNING: "warn";
    }> = ...

    Severity levels align with unix syslog. Most typical driver functions will log to debug.

    -
    +
    diff --git a/docs/Next/variables/TopologyType-1.html b/docs/Next/variables/TopologyType-1.html index c8c231136f9..d031f98f2bd 100644 --- a/docs/Next/variables/TopologyType-1.html +++ b/docs/Next/variables/TopologyType-1.html @@ -1,2 +1,2 @@ TopologyType | mongodb

    Variable TopologyTypeConst

    TopologyType: Readonly<{
        LoadBalanced: "LoadBalanced";
        ReplicaSetNoPrimary: "ReplicaSetNoPrimary";
        ReplicaSetWithPrimary: "ReplicaSetWithPrimary";
        Sharded: "Sharded";
        Single: "Single";
        Unknown: "Unknown";
    }> = ...

    An enumeration of topology types we know about

    -
    +
    diff --git a/hugo/LICENSE b/hugo/LICENSE new file mode 100644 index 00000000000..261eeb9e9f8 --- /dev/null +++ b/hugo/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/hugo/README.md b/hugo/README.md new file mode 100644 index 00000000000..1bc23e905ec --- /dev/null +++ b/hugo/README.md @@ -0,0 +1,282 @@ +[bep]: https://github.com/bep +[bugs]: https://github.com/gohugoio/hugo/issues?q=is%3Aopen+is%3Aissue+label%3ABug +[contributing]: CONTRIBUTING.md +[create a proposal]: https://github.com/gohugoio/hugo/issues/new?labels=Proposal%2C+NeedsTriage&template=feature_request.md +[documentation repository]: https://github.com/gohugoio/hugoDocs +[documentation]: https://gohugo.io/documentation +[dragonfly bsd, freebsd, netbsd, and openbsd]: https://gohugo.io/installation/bsd +[features]: https://gohugo.io/about/features/ +[forum]: https://discourse.gohugo.io +[friends]: https://github.com/gohugoio/hugo/graphs/contributors +[go]: https://go.dev/ +[hugo modules]: https://gohugo.io/hugo-modules/ +[installation]: https://gohugo.io/installation +[issue queue]: https://github.com/gohugoio/hugo/issues +[linux]: https://gohugo.io/installation/linux +[macos]: https://gohugo.io/installation/macos +[prebuilt binary]: https://github.com/gohugoio/hugo/releases/latest +[requesting help]: https://discourse.gohugo.io/t/requesting-help/9132 +[spf13]: https://github.com/spf13 +[static site generator]: https://en.wikipedia.org/wiki/Static_site_generator +[support]: https://discourse.gohugo.io +[themes]: https://themes.gohugo.io/ +[website]: https://gohugo.io +[windows]: https://gohugo.io/installation/windows + +Hugo + +A fast and flexible static site generator built with love by [bep], [spf13], and [friends] in [Go]. + +--- + +[![GoDoc](https://godoc.org/github.com/gohugoio/hugo?status.svg)](https://godoc.org/github.com/gohugoio/hugo) +[![Tests on Linux, MacOS and Windows](https://github.com/gohugoio/hugo/workflows/Test/badge.svg)](https://github.com/gohugoio/hugo/actions?query=workflow%3ATest) +[![Go Report Card](https://goreportcard.com/badge/github.com/gohugoio/hugo)](https://goreportcard.com/report/github.com/gohugoio/hugo) + +[Website] | [Installation] | [Documentation] | [Support] | [Contributing] | Mastodon + +## Overview + +Hugo is a [static site generator] written in [Go], optimized for speed and designed for flexibility. With its advanced templating system and fast asset pipelines, Hugo renders a complete site in seconds, often less. + +Due to its flexible framework, multilingual support, and powerful taxonomy system, Hugo is widely used to create: + +- Corporate, government, nonprofit, education, news, event, and project sites +- Documentation sites +- Image portfolios +- Landing pages +- Business, professional, and personal blogs +- Resumes and CVs + +Use Hugo's embedded web server during development to instantly see changes to content, structure, behavior, and presentation. Then deploy the site to your host, or push changes to your Git provider for automated builds and deployment. + +Hugo's fast asset pipelines include: + +- Image processing – Convert, resize, crop, rotate, adjust colors, apply filters, overlay text and images, and extract EXIF data +- JavaScript bundling – Transpile TypeScript and JSX to JavaScript, bundle, tree shake, minify, create source maps, and perform SRI hashing. +- Sass processing – Transpile Sass to CSS, bundle, tree shake, minify, create source maps, perform SRI hashing, and integrate with PostCSS +- Tailwind CSS processing – Compile Tailwind CSS utility classes into standard CSS, bundle, tree shake, optimize, minify, perform SRI hashing, and integrate with PostCSS + +And with [Hugo Modules], you can share content, assets, data, translations, themes, templates, and configuration with other projects via public or private Git repositories. + +See the [features] section of the documentation for a comprehensive summary of Hugo's capabilities. + +## Sponsors + +

     

    +

    + Linode +    + The complete IDE crafted for professional Go developers. +     + CloudCannon +

    + +## Editions + +Hugo is available in three editions: standard, extended, and extended/deploy. While the standard edition provides core functionality, the extended and extended/deploy editions offer advanced features. + +Feature|extended edition|extended/deploy edition +:--|:-:|:-: +Encode to the WebP format when [processing images]. You can decode WebP images with any edition.|:heavy_check_mark:|:heavy_check_mark: +[Transpile Sass to CSS] using the embedded LibSass transpiler. You can use the [Dart Sass] transpiler with any edition.|:heavy_check_mark:|:heavy_check_mark: +Deploy your site directly to a Google Cloud Storage bucket, an AWS S3 bucket, or an Azure Storage container. See [details].|:x:|:heavy_check_mark: + +[dart sass]: https://gohugo.io/functions/css/sass/#dart-sass +[processing images]: https://gohugo.io/content-management/image-processing/ +[transpile sass to css]: https://gohugo.io/functions/css/sass/ +[details]: https://gohugo.io/hosting-and-deployment/hugo-deploy/ + +Unless your specific deployment needs require the extended/deploy edition, we recommend the extended edition. + +## Installation + +Install Hugo from a [prebuilt binary], package manager, or package repository. Please see the installation instructions for your operating system: + +- [macOS] +- [Linux] +- [Windows] +- [DragonFly BSD, FreeBSD, NetBSD, and OpenBSD] + +## Build from source + +Prerequisites to build Hugo from source: + +- Standard edition: Go 1.24.0 or later +- Extended edition: Go 1.24.0 or later, and GCC +- Extended/deploy edition: Go 1.24.0 or later, and GCC + +Build the standard edition: + +```text +go install github.com/gohugoio/hugo@latest +``` + +Build the extended edition: + +```text +CGO_ENABLED=1 go install -tags extended github.com/gohugoio/hugo@latest +``` + +Build the extended/deploy edition: + +```text +CGO_ENABLED=1 go install -tags extended,withdeploy github.com/gohugoio/hugo@latest +``` + +## Star History + +[![Star History Chart](https://api.star-history.com/svg?repos=gohugoio/hugo&type=Timeline)](https://star-history.com/#gohugoio/hugo&Timeline) + +## Documentation + +Hugo's [documentation] includes installation instructions, a quick start guide, conceptual explanations, reference information, and examples. + +Please submit documentation issues and pull requests to the [documentation repository]. + +## Support + +Please **do not use the issue queue** for questions or troubleshooting. Unless you are certain that your issue is a software defect, use the [forum]. + +Hugo’s [forum] is an active community of users and developers who answer questions, share knowledge, and provide examples. A quick search of over 20,000 topics will often answer your question. Please be sure to read about [requesting help] before asking your first question. + +## Contributing + +You can contribute to the Hugo project by: + +- Answering questions on the [forum] +- Improving the [documentation] +- Monitoring the [issue queue] +- Creating or improving [themes] +- Squashing [bugs] + +Please submit documentation issues and pull requests to the [documentation repository]. + +If you have an idea for an enhancement or new feature, create a new topic on the [forum] in the "Feature" category. This will help you to: + +- Determine if the capability already exists +- Measure interest +- Refine the concept + +If there is sufficient interest, [create a proposal]. Do not submit a pull request until the project lead accepts the proposal. + +For a complete guide to contributing to Hugo, see the [Contribution Guide](CONTRIBUTING.md). + +## Dependencies + +Hugo stands on the shoulders of great open source libraries. Run `hugo env --logLevel info` to display a list of dependencies. + +
    +See current dependencies + +```text +github.com/BurntSushi/locker="v0.0.0-20171006230638-a6e239ea1c69" +github.com/PuerkitoBio/goquery="v1.10.1" +github.com/alecthomas/chroma/v2="v2.15.0" +github.com/andybalholm/cascadia="v1.3.3" +github.com/armon/go-radix="v1.0.1-0.20221118154546-54df44f2176c" +github.com/bep/clocks="v0.5.0" +github.com/bep/debounce="v1.2.0" +github.com/bep/gitmap="v1.6.0" +github.com/bep/goat="v0.5.0" +github.com/bep/godartsass/v2="v2.3.2" +github.com/bep/golibsass="v1.2.0" +github.com/bep/gowebp="v0.3.0" +github.com/bep/imagemeta="v0.8.4" +github.com/bep/lazycache="v0.7.0" +github.com/bep/logg="v0.4.0" +github.com/bep/mclib="v1.20400.20402" +github.com/bep/overlayfs="v0.9.2" +github.com/bep/simplecobra="v0.5.0" +github.com/bep/tmc="v0.5.1" +github.com/cespare/xxhash/v2="v2.3.0" +github.com/clbanning/mxj/v2="v2.7.0" +github.com/cpuguy83/go-md2man/v2="v2.0.4" +github.com/disintegration/gift="v1.2.1" +github.com/dlclark/regexp2="v1.11.5" +github.com/dop251/goja="v0.0.0-20250125213203-5ef83b82af17" +github.com/evanw/esbuild="v0.24.2" +github.com/fatih/color="v1.18.0" +github.com/frankban/quicktest="v1.14.6" +github.com/fsnotify/fsnotify="v1.8.0" +github.com/getkin/kin-openapi="v0.129.0" +github.com/ghodss/yaml="v1.0.0" +github.com/go-openapi/jsonpointer="v0.21.0" +github.com/go-openapi/swag="v0.23.0" +github.com/go-sourcemap/sourcemap="v2.1.4+incompatible" +github.com/gobuffalo/flect="v1.0.3" +github.com/gobwas/glob="v0.2.3" +github.com/gohugoio/go-i18n/v2="v2.1.3-0.20230805085216-e63c13218d0e" +github.com/gohugoio/hashstructure="v0.5.0" +github.com/gohugoio/httpcache="v0.7.0" +github.com/gohugoio/hugo-goldmark-extensions/extras="v0.2.0" +github.com/gohugoio/hugo-goldmark-extensions/passthrough="v0.3.0" +github.com/gohugoio/locales="v0.14.0" +github.com/gohugoio/localescompressed="v1.0.1" +github.com/golang/freetype="v0.0.0-20170609003504-e2365dfdc4a0" +github.com/google/go-cmp="v0.6.0" +github.com/google/pprof="v0.0.0-20250208200701-d0013a598941" +github.com/gorilla/websocket="v1.5.3" +github.com/hairyhenderson/go-codeowners="v0.7.0" +github.com/hashicorp/golang-lru/v2="v2.0.7" +github.com/jdkato/prose="v1.2.1" +github.com/josharian/intern="v1.0.0" +github.com/kr/pretty="v0.3.1" +github.com/kr/text="v0.2.0" +github.com/kyokomi/emoji/v2="v2.2.13" +github.com/lucasb-eyer/go-colorful="v1.2.0" +github.com/mailru/easyjson="v0.7.7" +github.com/makeworld-the-better-one/dither/v2="v2.4.0" +github.com/marekm4/color-extractor="v1.2.1" +github.com/mattn/go-colorable="v0.1.13" +github.com/mattn/go-isatty="v0.0.20" +github.com/mattn/go-runewidth="v0.0.9" +github.com/mazznoer/csscolorparser="v0.1.5" +github.com/mitchellh/mapstructure="v1.5.1-0.20231216201459-8508981c8b6c" +github.com/mohae/deepcopy="v0.0.0-20170929034955-c48cc78d4826" +github.com/muesli/smartcrop="v0.3.0" +github.com/niklasfasching/go-org="v1.7.0" +github.com/oasdiff/yaml3="v0.0.0-20241210130736-a94c01f36349" +github.com/oasdiff/yaml="v0.0.0-20241210131133-6b86fb107d80" +github.com/olekukonko/tablewriter="v0.0.5" +github.com/pbnjay/memory="v0.0.0-20210728143218-7b4eea64cf58" +github.com/pelletier/go-toml/v2="v2.2.3" +github.com/perimeterx/marshmallow="v1.1.5" +github.com/pkg/browser="v0.0.0-20240102092130-5ac0b6a4141c" +github.com/pkg/errors="v0.9.1" +github.com/rivo/uniseg="v0.4.7" +github.com/rogpeppe/go-internal="v1.13.1" +github.com/russross/blackfriday/v2="v2.1.0" +github.com/sass/libsass="3.6.6" +github.com/spf13/afero="v1.11.0" +github.com/spf13/cast="v1.7.1" +github.com/spf13/cobra="v1.8.1" +github.com/spf13/fsync="v0.10.1" +github.com/spf13/pflag="v1.0.6" +github.com/tdewolff/minify/v2="v2.20.37" +github.com/tdewolff/parse/v2="v2.7.15" +github.com/tetratelabs/wazero="v1.8.2" +github.com/webmproject/libwebp="v1.3.2" +github.com/yuin/goldmark-emoji="v1.0.4" +github.com/yuin/goldmark="v1.7.8" +go.uber.org/automaxprocs="v1.5.3" +golang.org/x/crypto="v0.33.0" +golang.org/x/exp="v0.0.0-20250210185358-939b2ce775ac" +golang.org/x/image="v0.24.0" +golang.org/x/mod="v0.23.0" +golang.org/x/net="v0.35.0" +golang.org/x/sync="v0.11.0" +golang.org/x/sys="v0.30.0" +golang.org/x/text="v0.22.0" +golang.org/x/tools="v0.30.0" +golang.org/x/xerrors="v0.0.0-20240903120638-7835f813f4da" +gonum.org/v1/plot="v0.15.0" +google.golang.org/protobuf="v1.36.5" +gopkg.in/yaml.v2="v2.4.0" +gopkg.in/yaml.v3="v3.0.1" +oss.terrastruct.com/d2="v0.6.9" +oss.terrastruct.com/util-go="v0.0.0-20241005222610-44c011a04896" +rsc.io/qr="v0.2.0" +software.sslmate.com/src/go-pkcs12="v0.2.0" +``` +
    diff --git a/hugo/hugo b/hugo/hugo new file mode 100755 index 00000000000..21ffd78e3e8 Binary files /dev/null and b/hugo/hugo differ