Skip to content

Commit

Permalink
Revert "feat(lib): implement executeOperationV2"
Browse files Browse the repository at this point in the history
This reverts commit 67d4edf.
  • Loading branch information
kvwalker committed Apr 5, 2019
1 parent e1e24ed commit 72e88ad
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 242 deletions.
8 changes: 2 additions & 6 deletions lib/collection.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ const indexes = require('./operations/collection_ops').indexes;
const indexExists = require('./operations/collection_ops').indexExists;
const indexInformation = require('./operations/collection_ops').indexInformation;
const insertMany = require('./operations/collection_ops').insertMany;
const insertOne = require('./operations/collection_ops').insertOne;
const isCapped = require('./operations/collection_ops').isCapped;
const mapReduce = require('./operations/collection_ops').mapReduce;
const optionsOp = require('./operations/collection_ops').optionsOp;
Expand All @@ -60,9 +61,6 @@ const updateDocuments = require('./operations/collection_ops').updateDocuments;
const updateMany = require('./operations/collection_ops').updateMany;
const updateOne = require('./operations/collection_ops').updateOne;

const InsertOneOperation = require('./operations/insert_one');
const executeOperationV2 = require('./operations/execute_operation_v2');

/**
* @fileOverview The **Collection** class is an internal class that embodies a MongoDB collection
* allowing for insert/update/remove/find and other command operation on that MongoDB collection.
Expand Down Expand Up @@ -462,9 +460,7 @@ Collection.prototype.insertOne = function(doc, options, callback) {
options.ignoreUndefined = this.s.options.ignoreUndefined;
}

const insertOneOperation = new InsertOneOperation(this, doc, options);

return executeOperationV2(this.s.topology, insertOneOperation, callback);
return executeOperation(this.s.topology, insertOne, [this, doc, options, callback]);
};

/**
Expand Down
86 changes: 0 additions & 86 deletions lib/operations/execute_operation_v2.js

This file was deleted.

94 changes: 0 additions & 94 deletions lib/operations/insert_one.js

This file was deleted.

56 changes: 0 additions & 56 deletions lib/operations/operation.js

This file was deleted.

0 comments on commit 72e88ad

Please sign in to comment.