Interface ReplaceOneModel<TSchema>

interface ReplaceOneModel<TSchema> {
    collation?: CollationOptions;
    filter: Filter<TSchema>;
    hint?: Hint;
    replacement: WithoutId<TSchema>;
    upsert?: boolean;
}

Type Parameters

Properties

collation?: CollationOptions

Specifies a collation.

filter: Filter<TSchema>

The filter to limit the replaced document.

hint?: Hint

The index to use. If specified, then the query system will only consider plans using the hinted index.

replacement: WithoutId<TSchema>

The document with which to replace the matched document.

upsert?: boolean

When true, creates a new document if no document matches the query.