Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/mongoose/types/models.d.ts>mongoose.ReplaceOneModel

MongoDB object modeling designed to work in an asynchronous environment.
Latest
interface mongoose.ReplaceOneModel
import { type mongoose } from "https://deno.land/x/mongoose@8.4.4/types/models.d.ts";
const { ReplaceOneModel } = mongoose;

Type Parameters

optional
TSchema = AnyObject

Properties

filter: FilterQuery<TSchema>

The filter to limit the replaced document.

replacement: mongodb.WithoutId<TSchema>

The document with which to replace the matched document.

optional
collation: mongodb.CollationOptions

Specifies a collation.

optional
hint: mongodb.Hint

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

optional
upsert: boolean

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

optional
timestamps: boolean

When false, do not add timestamps. When true, overrides the timestamps option set in the bulkWrite options.