Interface UpdateOneModel<TSchema>

Represents an updateOne operation that can be used in a bulk write operation.

Field

filter - The filter to choose the document to update.

Field

update - The update to apply to the document.

Field

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

interface UpdateOneModel<TSchema> {
    filter: Filter<TSchema>;
    update: UpdateFilter<TSchema>;
    upsert?: boolean;
}

Type Parameters

Properties

Properties

filter: Filter<TSchema>

The filter to choose the document to update.

The update to apply to the document.

upsert?: boolean

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

If false, do not insert if no documents match the filter.

Defaults to false.

Default Value

false