Skip to main content
Module

x/typeorm/src/index.ts>MongoEntityManager#findOneAndReplace

Forked from https://github.com/typeorm/typeorm
Latest
method MongoEntityManager.prototype.findOneAndReplace
Re-export
import { MongoEntityManager } from "https://deno.land/x/typeorm@v0.2.23-rc10/src/index.ts";

Find a document and replace it in one atomic operation, requires a write lock for the duration of the operation.

Parameters

entityClassOrName: ObjectType<Entity> | EntitySchema<Entity> | string
query: ObjectLiteral
replacement: Object
optional
options: FindOneAndReplaceOption

Returns

Promise<FindAndModifyWriteOpResultObject>