Interface GenericReplaceOneOptions

Represents the options for some generic replaceOne command.

Field

upsert - If true, perform an insert if no documents match the filter.

Field

sort - The sort order to pick which document to replace if the filter selects multiple documents.

Field

timeout - The timeout override for this method

interface GenericReplaceOneOptions {
    sort?: Sort;
    timeout?: number | Pick<Partial<TimeoutDescriptor>, "requestTimeoutMs" | "generalMethodTimeoutMs">;
    upsert?: boolean;
}

Hierarchy (view full)

  • WithTimeout<"generalMethodTimeoutMs">
    • GenericReplaceOneOptions

Properties

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

The method timeout override.

See TimeoutDescriptor for much more information.

upsert?: boolean