Skip to content

docs(array filter): add example using array filters #1647

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 5 commits into from
Jan 25, 2018
Merged

Conversation

jlord
Copy link
Contributor

@jlord jlord commented Jan 22, 2018

Add an example of using arrayFilters in an update for the docs team.

Fixes NODE-1263

@jlord jlord requested review from mbroadst and daprahamian January 22, 2018 16:27
Copy link
Member

@mbroadst mbroadst left a comment

Choose a reason for hiding this comment

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

These should be in operation_example_tests.js, operation_generators_example_tests.js, operation_promises_example_tests.js (modified per variant) instead. It made sense to put all the changestreams in one file because there were a few, but this is a single test.

const db = client.db(configuration.db);
const collection = db.collection('arrayFilterUpdateExample');

// 3. Exploiting the power of arrays
Copy link
Member

Choose a reason for hiding this comment

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

also does this line need a corresponding end tag?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I will check with the docs team 👍

@jlord
Copy link
Contributor Author

jlord commented Jan 23, 2018

I have moved the example to examples_tests.js which we talked about (in real life) of being a better home than the files mentioned ☝️ above.

  • I'm still waiting for feedback on if there is a closing code comment we need to use.

@@ -1192,4 +1192,36 @@ describe('Examples', function() {
});
}
});

it.only('supports array filters when updating', {
Copy link
Contributor

Choose a reason for hiding this comment

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

.only

Copy link
Contributor Author

Choose a reason for hiding this comment

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

🤣

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