@@ -46,6 +46,7 @@ const indexes = require('./operations/collection_ops').indexes;
46
46
const indexExists = require ( './operations/collection_ops' ) . indexExists ;
47
47
const indexInformation = require ( './operations/collection_ops' ) . indexInformation ;
48
48
const insertMany = require ( './operations/collection_ops' ) . insertMany ;
49
+ const insertOne = require ( './operations/collection_ops' ) . insertOne ;
49
50
const isCapped = require ( './operations/collection_ops' ) . isCapped ;
50
51
const mapReduce = require ( './operations/collection_ops' ) . mapReduce ;
51
52
const optionsOp = require ( './operations/collection_ops' ) . optionsOp ;
@@ -60,9 +61,6 @@ const updateDocuments = require('./operations/collection_ops').updateDocuments;
60
61
const updateMany = require ( './operations/collection_ops' ) . updateMany ;
61
62
const updateOne = require ( './operations/collection_ops' ) . updateOne ;
62
63
63
- const InsertOneOperation = require ( './operations/insert_one' ) ;
64
- const executeOperationV2 = require ( './operations/execute_operation_v2' ) ;
65
-
66
64
/**
67
65
* @fileOverview The **Collection** class is an internal class that embodies a MongoDB collection
68
66
* allowing for insert/update/remove/find and other command operation on that MongoDB collection.
@@ -462,9 +460,7 @@ Collection.prototype.insertOne = function(doc, options, callback) {
462
460
options . ignoreUndefined = this . s . options . ignoreUndefined ;
463
461
}
464
462
465
- const insertOneOperation = new InsertOneOperation ( this , doc , options ) ;
466
-
467
- return executeOperationV2 ( this . s . topology , insertOneOperation , callback ) ;
463
+ return executeOperation ( this . s . topology , insertOne , [ this , doc , options , callback ] ) ;
468
464
} ;
469
465
470
466
/**
0 commit comments