-
Notifications
You must be signed in to change notification settings - Fork 1.4k
DOCSP-35966 query builder #2790
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
DOCSP-35966 query builder #2790
Conversation
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.
Good work on this long page! Happy to discuss any of my comments
docs/query-builder.txt
Outdated
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.
Q: What does "same" mean in this context?
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.
I think I had "a common" previously to represent the "fluent interface and syntax" which might be more clear than "the same". Let me know if one is more clear than the other, or how you might otherwise word it.
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.
maybe you can just add "... the same ... as the Laravel query builder"?
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.
Thanks for that perspective!
I wanted to describe the query builder rather than comparing it with something else, but it seems like using noun phrases (e.g. #2790 (comment)) can cause some confusion.
In this sentence, the items being compared are syntax you use to access each of the supported databases rather than something with the query builder (given it's describing the query builder).
I'll spend a few minutes to try to reorder the sentence in a way that avoids connecting noun phrases to restrictive clauses.
docs/query-builder.txt
Outdated
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.
nit: ambiguous identifiers - do the classes made the syntax more concise, etc or the facades
docs/query-builder.txt
Outdated
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.
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.
Thanks for spotting this! I'll reword since "them" refers to the unspecified number of chained methods.
docs/query-builder.txt
Outdated
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.
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.
I considered the suggestion while, but think that "for" might not be the correct preposition. I think "for" would imply that the examples are being delivered to someone or something. I'll use "provides" and pair it with "of".
docs/query-builder.txt
Outdated
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.
I; description does not match
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.
S: add introduction to section list
docs/query-builder.txt
Outdated
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.
docs/query-builder.txt
Outdated
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.
docs/query-builder.txt
Outdated
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.
@rustagir thanks for the review. I think I addressed everything and went through the content multiple times. I also moved all the code snippets to a new unit test file.
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.
lgtm with some small fixes
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.
S: Make the titles of the subsections all in the same form (action oriented)
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.
I: description does not match example
imdb.votes field value of 350
where('imdb.rating', 9.3)
docs/query-builder.txt
Outdated
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.
docs/query-builder.txt
Outdated
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.
docs/query-builder.txt
Outdated
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.
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.
Q: if the _ matches a single character, why is Spider Woman in the results?
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.
Q: if the
_matches a single character, why is Spider Woman in the results?
Good question -- whitespace is a character in the context of SQL queries. The Laravel documentation omits any explanation of the wildcard characters that they use, but I thought it would be good to reiterate the SQL LIKE syntax.
Let me know if you think this needs further explanation.
docs/query-builder.txt
Outdated
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.
S: remove quotes from the expression
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.
I updated the tests to add assertions, using a subset of the data.
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.
This should tell how to create a geo index.
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.
Will do -- I can link to the Schema Builder section "Create a Geospatial Index". However, I'll need to merge in the 4.1 branch to get that content. Is that ok or should I create a separate ticket to address this?
JIRA: https://jira.mongodb.org/browse/DOCSP-35966
Staging: https://preview-mongodbcchomongodb.gatsbyjs.io/laravel/DOCSP-35966-query-builder/query-builder/
Checklist