Skip to content
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

Add arrayFilter option #868

Merged
merged 12 commits into from
Nov 16, 2018
Merged

Add arrayFilter option #868

merged 12 commits into from
Nov 16, 2018

Conversation

datacas
Copy link
Contributor

@datacas datacas commented Aug 27, 2018

Add option arrayFilters to allow to use the arrayfilters of version 3.6 of Mongo.

https://docs.mongodb.com/manual/reference/command/update/#update-command-arrayfilters
https://docs.mongodb.com/php-library/current/reference/method/MongoDBCollection-updateMany/

Hello!

  • Type: bug fix | new feature | code quality | documentation
  • Link to issue:

In raising this pull request, I confirm the following (please check boxes):

  • I have read and understood the Contributing Guidelines?
  • I have checked that another pull request for this purpose does not exist.
  • I wrote some tests for this PR.

Small description of change:

Thanks

@datacas datacas changed the base branch from master to 3.4.x August 27, 2018 18:51
if (isset($this->options['arrayFilters'])) {
$updateOptions['arrayFilters'] = $this->options['arrayFilters'];
}

$bulkOptions=[];

if (isset($this->options['bypassDocumentValidation'])&&Functions::serverSupportsFeature(

Choose a reason for hiding this comment

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

spaces around && would be much nicer here.

@@ -136,9 +136,13 @@ public function execute(Server $server)
'upsert'=>$this->options['upsert'],
Copy link
Member

Choose a reason for hiding this comment

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

Make it PSR-2 compatible (https://www.php-fig.org/psr/psr-2/)

if (isset($this->options['arrayFilters'])) {
$updateOptions['arrayFilters'] = $this->options['arrayFilters'];
}

$bulkOptions=[];
Copy link
Member

Choose a reason for hiding this comment

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

Make it PSR-2 compatible (https://www.php-fig.org/psr/psr-2/)

@sergeyklay sergeyklay merged commit 278c360 into phalcon:3.4.x Nov 16, 2018
@sergeyklay
Copy link
Contributor

Thank you

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.

4 participants