(
ns: MongoDBCollectionNamespace,
filter: Document,
replacement: Document,
options: ReplaceOptions
)
| 217 | /** @internal */ |
| 218 | export class ReplaceOneOperation extends UpdateOperation { |
| 219 | constructor( |
| 220 | ns: MongoDBCollectionNamespace, |
| 221 | filter: Document, |
| 222 | replacement: Document, |
| 223 | options: ReplaceOptions |
| 224 | ) { |
| 225 | super(ns, [makeUpdateStatement(filter, replacement, { ...options, multi: false })], options); |
| 226 | |
| 227 | if (hasAtomicOperators(replacement)) { |
| 228 | throw new MongoInvalidArgumentError(class="st">'Replacement document must not contain atomic operators'); |
| 229 | } |
| 230 | } |
| 231 | |
| 232 | override handleOk( |
| 233 | response: InstanceType<typeof this.SERVER_COMMAND_RESPONSE_TYPE> |
nothing calls this directly
no test coverage detected