-
-
Notifications
You must be signed in to change notification settings - Fork 339
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
Conversation
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/
if (isset($this->options['arrayFilters'])) { | ||
$updateOptions['arrayFilters'] = $this->options['arrayFilters']; | ||
} | ||
|
||
$bulkOptions=[]; | ||
|
||
if (isset($this->options['bypassDocumentValidation'])&&Functions::serverSupportsFeature( |
There was a problem hiding this comment.
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'], |
There was a problem hiding this comment.
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=[]; |
There was a problem hiding this comment.
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/)
Thank you |
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!
In raising this pull request, I confirm the following (please check boxes):
Small description of change:
Thanks