Interface GenericInsertManyUnorderedOptions

Options for a generic insertMany command using the Data API when ordered is false or unset.

Field

ordered - If false or unset, the records are inserted in an arbitrary, parallelized order.

Field

concurrency - The maximum number of concurrent requests to make at once.

Field

chunkSize - The number of records to upload per request. Defaults to 50.

Field

timeout - The timeout override for this method

See

Collection.insertMany

interface GenericInsertManyUnorderedOptions {
    chunkSize?: number;
    concurrency?: number;
    ordered?: false;
    timeout?: number | Pick<Partial<TimeoutDescriptor>, "requestTimeoutMs" | "generalMethodTimeoutMs">;
}

Hierarchy (view full)

  • WithTimeout<"generalMethodTimeoutMs">
    • GenericInsertManyUnorderedOptions

Properties

chunkSize?: number

The number of records to upload per request. Defaults to 50.

If you have large records, you may find it beneficial to reduce this number and increase concurrency to improve throughput. Leave it unspecified (recommended) to use the system default.

Default Value

50
concurrency?: number

The maximum number of concurrent requests to make at once.

ordered?: false

If false, the records are inserted in an arbitrary order. If an error occurs, the operation does not stop and the remaining records are inserted. This allows the operation to be parallelized for better performance.

timeout?: number | Pick<Partial<TimeoutDescriptor>, "requestTimeoutMs" | "generalMethodTimeoutMs">

The method timeout override.

See TimeoutDescriptor for much more information.