Skip to content
New issue

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

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

Already on GitHub? # to your account

DOCSP-43159: QB returns objects #3135

Merged

Conversation

rustagir
Copy link
Contributor

@rustagir rustagir commented Sep 4, 2024

adds documentation to note that QB returns results as objects instead of arrays in v5

https://jira.mongodb.org/browse/DOCSP-43159

Staging
upgrade guide

Checklist

  • Add tests and ensure they pass
  • Add an entry to the CHANGELOG.md file

@github-actions github-actions bot added the docs label Sep 4, 2024
Copy link
Contributor

@jordan-smith721 jordan-smith721 left a comment

Choose a reason for hiding this comment

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

LGTM

@rustagir rustagir marked this pull request as ready for review September 4, 2024 18:31
@rustagir rustagir requested a review from a team as a code owner September 4, 2024 18:31
@GromNaN
Copy link
Member

GromNaN commented Sep 4, 2024

This needs to be documented in the upgrade guide. This is a major breaking change.

docs/upgrade.txt Outdated
Comment on lines 84 to 87
DB::table('accounts')
->where('name', 'Anita Charles')
->first()
->balance
Copy link
Member

Choose a reason for hiding this comment

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

You could highlight the change with a diff (not sure if diffs are correctly colorized in the docs):

Suggested change
DB::table('accounts')
->where('name', 'Anita Charles')
->first()
->balance
$document = DB::table('accounts')
->where('name', 'Anita Charles')
->first();
- $document['balance'];
+ $document->balance;

Preview:

     $document = DB::table('accounts')
         ->where('name', 'Anita Charles')
         ->first();

-    $document['balance'];
+    $document->balance;

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The only way we can demonstrate this is by using code comments. I can make that change though!

@rustagir rustagir requested a review from GromNaN September 9, 2024 14:34
Copy link
Member

@GromNaN GromNaN left a comment

Choose a reason for hiding this comment

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

LGTM

@rustagir rustagir enabled auto-merge (squash) September 9, 2024 15:57
@rustagir rustagir merged commit 4766274 into mongodb:5.0 Sep 9, 2024
15 checks passed
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants