Interface GenericInsertManyOrderedOptions

Options for a generic insertMany command using the Data API when ordered is true.

Field

ordered - If true, the records are inserted sequentially in the order provided.

Field

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

Field

timeout - The timeout override for this method

See

GenericInsertManyOptions

interface GenericInsertManyOrderedOptions {
    chunkSize?: number;
    maxTimeMS?: "ERROR: The `maxTimeMS` option is no longer available; the timeouts system has been overhauled, and timeouts should now be set using `timeout`";
    ordered: true;
    timeout?: number | Pick<Partial<TimeoutDescriptor>, "requestTimeoutMs" | "generalMethodTimeoutMs">;
    vector?: "ERROR: Set the `$vector` field in the docs directly";
    vectorize?: "ERROR: Set the `$vectorize` field in the docs directly";
}

Hierarchy (view full)

  • WithTimeout<"generalMethodTimeoutMs">
    • GenericInsertManyOrderedOptions

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
maxTimeMS?: "ERROR: The `maxTimeMS` option is no longer available; the timeouts system has been overhauled, and timeouts should now be set using `timeout`"

This temporary error-ing property exists for migration convenience, and will be removed in a future version.

Deprecated

  • The maxTimeMS option is no longer available; the timeouts system has been overhauled, and timeouts should now be set using timeout, and defaults in timeoutDefaults. You may generally Ctrl+R replace maxTimeMS with timeout to retain the same behavior.
ordered: true

If true, the records are inserted in the order provided. If an error occurs, the operation stops and the remaining records are not inserted.

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

The method timeout override.

See TimeoutDescriptor for much more information.

vector?: "ERROR: Set the `$vector` field in the docs directly"

This temporary error-ing property exists for migration convenience, and will be removed in a future version.

Deprecated

  • Set the $vector field in the docs directly.
vectorize?: "ERROR: Set the `$vectorize` field in the docs directly"

This temporary error-ing property exists for migration convenience, and will be removed in a future version.

Deprecated

  • Set the $vectorize field in the docs directly.