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

PHPLIB-1420 Integrate query builder for non-aggregation APIs #1385

Merged
merged 4 commits into from
Sep 11, 2024

Conversation

GromNaN
Copy link
Member

@GromNaN GromNaN commented Sep 11, 2024

@GromNaN GromNaN requested a review from alcaeus September 11, 2024 08:35
@GromNaN GromNaN requested a review from a team as a code owner September 11, 2024 08:35
src/Operation/BulkWrite.php Dismissed Show dismissed Hide dismissed
src/Operation/BulkWrite.php Dismissed Show dismissed Hide dismissed
src/Operation/BulkWrite.php Dismissed Show dismissed Hide dismissed
src/Operation/BulkWrite.php Dismissed Show dismissed Hide dismissed
src/Operation/BulkWrite.php Dismissed Show dismissed Hide dismissed
src/Operation/BulkWrite.php Dismissed Show dismissed Hide dismissed
src/Operation/BulkWrite.php Dismissed Show dismissed Hide dismissed
src/Operation/BulkWrite.php Dismissed Show dismissed Hide dismissed
src/Operation/BulkWrite.php Dismissed Show dismissed Hide dismissed
src/Operation/BulkWrite.php Dismissed Show dismissed Hide dismissed
Copy link
Member

@alcaeus alcaeus left a comment

Choose a reason for hiding this comment

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

LGTM.

I left a comment about the syntax to create a query, we can tackle that separately (if at all)

$result = $this->collection->bulkWrite([
[
'deleteMany' => [
Query::query(x: Query::gt(1)),
Copy link
Member

Choose a reason for hiding this comment

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

Not necessary for this PR, but I just came to think that the following might be a little easier on the eyes:

Suggested change
Query::query(x: Query::gt(1)),
new Query(x: Query::gt(1)),

Alternatively, if we have a generic builder class:

Suggested change
Query::query(x: Query::gt(1)),
new Builder::query(x: Query::gt(1)),

For some reason, the Query::query(...) part irks me a bit 🤔

Copy link
Member Author

Choose a reason for hiding this comment

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

Sure, if we can create functions for all the factories that would shorten the syntax.

@GromNaN GromNaN merged commit 5da5c15 into mongodb:master Sep 11, 2024
31 checks passed
@GromNaN GromNaN deleted the PHPLIB-1420 branch September 11, 2024 09:53
alcaeus added a commit that referenced this pull request Sep 19, 2024
* v1.x: (87 commits)
  Performance: Keep collections and indexes between GridFS tests (#1421)
  Add final annotations to non-internal Operation classes (#1410)
  Fix types accepted by $round (#1401)
  Replace arrayHasKey with assertArrayHasKey in tests (#1403)
  PHPLIB-1514 Make data providers static (#1404)
  PHPLIB-1515 Replace assertObjectHasAttribute with assertObjectHasProperty (#1405)
  Restore Prose22_RangeExplicitEncryptionTest (#1400)
  Remove Prose22_RangeExplicitEncryptionTest that requires ext-mongodb < 1.20 (#1394)
  Use `match` instead of `switch` when a simple value is returned (#1393)
  Remove PHPUnit functions polyfill (#1395)
  Update branch names for GHA workflows (#1390)
  PHPLIB-1419 Encode Agg builder objects in Collection methods (#1383)
  PHPLIB-1420 Integrate query builder for non-aggregation APIs (#1385)
  Fix optional parameter declared before required parameter (#1384)
  PHPLIB-1505 Add driver option "builderEncoder" (#1382)
  Exclude rector.php from the artifact
  Check generated files are up-to-date
  Replace composer package mongodb/builder
  Skip Pedentry method sort for generated files
  Remove composer constraints already imposed by the main package
  ...
alcaeus added a commit that referenced this pull request Sep 25, 2024
* v1.x: (90 commits)
  Merge v1.20 into v1.x (#1447)
  PHPLIB-1525 Removes dependency to Symfony PHPUnit bridge (#1413)
  Change deprecated assertObjectHasAttribute to assertObjectHasProperty (#1432)
  Performance: Keep collections and indexes between GridFS tests (#1421)
  Add final annotations to non-internal Operation classes (#1410)
  Fix types accepted by $round (#1401)
  Replace arrayHasKey with assertArrayHasKey in tests (#1403)
  PHPLIB-1514 Make data providers static (#1404)
  PHPLIB-1515 Replace assertObjectHasAttribute with assertObjectHasProperty (#1405)
  Restore Prose22_RangeExplicitEncryptionTest (#1400)
  Remove Prose22_RangeExplicitEncryptionTest that requires ext-mongodb < 1.20 (#1394)
  Use `match` instead of `switch` when a simple value is returned (#1393)
  Remove PHPUnit functions polyfill (#1395)
  Update branch names for GHA workflows (#1390)
  PHPLIB-1419 Encode Agg builder objects in Collection methods (#1383)
  PHPLIB-1420 Integrate query builder for non-aggregation APIs (#1385)
  Fix optional parameter declared before required parameter (#1384)
  PHPLIB-1505 Add driver option "builderEncoder" (#1382)
  Exclude rector.php from the artifact
  Check generated files are up-to-date
  ...
alcaeus added a commit that referenced this pull request Sep 25, 2024
* v1.x: (90 commits)
  Merge v1.20 into v1.x (#1447)
  PHPLIB-1525 Removes dependency to Symfony PHPUnit bridge (#1413)
  Change deprecated assertObjectHasAttribute to assertObjectHasProperty (#1432)
  Performance: Keep collections and indexes between GridFS tests (#1421)
  Add final annotations to non-internal Operation classes (#1410)
  Fix types accepted by $round (#1401)
  Replace arrayHasKey with assertArrayHasKey in tests (#1403)
  PHPLIB-1514 Make data providers static (#1404)
  PHPLIB-1515 Replace assertObjectHasAttribute with assertObjectHasProperty (#1405)
  Restore Prose22_RangeExplicitEncryptionTest (#1400)
  Remove Prose22_RangeExplicitEncryptionTest that requires ext-mongodb < 1.20 (#1394)
  Use `match` instead of `switch` when a simple value is returned (#1393)
  Remove PHPUnit functions polyfill (#1395)
  Update branch names for GHA workflows (#1390)
  PHPLIB-1419 Encode Agg builder objects in Collection methods (#1383)
  PHPLIB-1420 Integrate query builder for non-aggregation APIs (#1385)
  Fix optional parameter declared before required parameter (#1384)
  PHPLIB-1505 Add driver option "builderEncoder" (#1382)
  Exclude rector.php from the artifact
  Check generated files are up-to-date
  ...
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.

2 participants