| 1034 | update: UpdateFilter<TSchema> | Document[] |
| 1035 | ): Promise<WithId<TSchema> | null>; |
| 1036 | async findOneAndUpdate( |
| 1037 | filter: Filter<TSchema>, |
| 1038 | update: UpdateFilter<TSchema> | Document[], |
| 1039 | options?: FindOneAndUpdateOptions |
| 1040 | ): Promise<WithId<TSchema> | ModifyResult<TSchema> | null> { |
| 1041 | return await executeOperation( |
| 1042 | this.client, |
| 1043 | new FindOneAndUpdateOperation( |
| 1044 | this as TODO_NODE_3286, |
| 1045 | filter, |
| 1046 | update, |
| 1047 | resolveOptions(this, options) |
| 1048 | ) as TODO_NODE_3286 |
| 1049 | ); |
| 1050 | } |
| 1051 | |
| 1052 | /** |
| 1053 | * Execute an aggregation framework pipeline against the collection, needs MongoDB \>= 2.2 |