Skip to content

refactor: all write commands now inherit from CommandOperation #2665

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 10, 2020

Conversation

mbroadst
Copy link
Member

@mbroadst mbroadst commented Dec 7, 2020

This patch moves the command construction for write operations from the wire protocol layer to the operation layer. Specifically, the insert/update/delete operations, which are also shared by the bulk implementation, are now the primary sites for write command construction. This has a few implications, primarily that you can no longer "write" with a Server instance, you can only execute a write operation against it.

NODE-2953

This patch moves the command construction for write operations from
the wire protocol layer to the operation layer. Specifically, the
insert/update/delete operations, which are also shared by the bulk
implementation, are now the primary sites for write command
construction. This has a few implications, primarily that you can
no longer "write" with a `Server` instance, you can only execute
a write operation against it.

NODE-2953
@mbroadst mbroadst force-pushed the NODE-2953/remove-write-command branch from 4f38dd0 to 93f1358 Compare December 8, 2020 21:02
Copy link
Contributor

@emadum emadum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@@ -54,6 +54,8 @@ describe('Aggregation', function () {
var collection = db.collection('shouldCorrectlyExecuteSimpleAggregationPipelineUsingArray');
// Insert the docs
collection.insertMany(docs, { w: 1 }, function (err, result) {
if (err) console.dir(err);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this console.dir left over from debugging something?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🙈 yeah it was, I'll correct that in the following PR just so we don't pay another CI round for this one

@mbroadst mbroadst merged commit 07fd317 into master Dec 10, 2020
@mbroadst mbroadst deleted the NODE-2953/remove-write-command branch December 10, 2020 16:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants