Skip to main content
Latest
method Collection.prototype.findAndModify
import { Collection } from "https://deno.land/x/denomongo_unittest_utils@v0.5.3/deps.ts";

Find and modify a document in one, returning the matching document.

Parameters

optional
filter: Filter<T>

The query used to match documents

optional
options: FindAndModifyOptions<T>

Additional options for the operation (e.g. containing update or remove parameters)

Returns

Promise<T | undefined>

The document matched and modified