@@ -46,6 +46,7 @@ const indexes = require('./operations/collection_ops').indexes;
4646const indexExists = require ( './operations/collection_ops' ) . indexExists ;
4747const indexInformation = require ( './operations/collection_ops' ) . indexInformation ;
4848const insertMany = require ( './operations/collection_ops' ) . insertMany ;
49+ const insertOne = require ( './operations/collection_ops' ) . insertOne ;
4950const isCapped = require ( './operations/collection_ops' ) . isCapped ;
5051const mapReduce = require ( './operations/collection_ops' ) . mapReduce ;
5152const optionsOp = require ( './operations/collection_ops' ) . optionsOp ;
@@ -60,9 +61,6 @@ const updateDocuments = require('./operations/collection_ops').updateDocuments;
6061const updateMany = require ( './operations/collection_ops' ) . updateMany ;
6162const updateOne = require ( './operations/collection_ops' ) . updateOne ;
6263
63- const InsertOneOperation = require ( './operations/insert_one' ) ;
64- const executeOperationV2 = require ( './operations/execute_operation_v2' ) ;
65-
6664/**
6765 * @fileOverview The **Collection** class is an internal class that embodies a MongoDB collection
6866 * 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) {
462460 options . ignoreUndefined = this . s . options . ignoreUndefined ;
463461 }
464462
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 ] ) ;
468464} ;
469465
470466/**
0 commit comments