* Add a single insert document to the bulk operation * * @example * ```ts * const bulkOp = collection.initializeOrderedBulkOp(); * * // Adds three inserts to the bulkOp. * bulkOp * .insert({ a: 1 }) * .insert({ b: 2 }) * .insert({ c: 3 }); * await bulkOp.execut
(document: Document)
| 978 | * ``` |
| 979 | */ |
| 980 | insert(document: Document): BulkOperationBase { |
| 981 | maybeAddIdToDocuments(this.collection, document, { |
| 982 | forceServerObjectId: this.shouldForceServerObjectId() |
| 983 | }); |
| 984 | |
| 985 | return this.addToOperationsList(BatchType.INSERT, document); |
| 986 | } |
| 987 | |
| 988 | /** |
| 989 | * Builds a find operation for an update/updateOne/delete/deleteOne/replaceOne. |
nothing calls this directly
no test coverage detected