forked from bloom-housing/bloom
-
Notifications
You must be signed in to change notification settings - Fork 1
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
Move where clauses and pagination to subquery, so filtered results return all listing data #271
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
avaleske
changed the title
Avaleske/move where clauses to subquery
Move where clauses and pagination to subquery
Jul 26, 2021
avaleske
changed the title
Move where clauses and pagination to subquery
Move where clauses and pagination to subquery, so filtered results return all listing data
Jul 26, 2021
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 doing this! Two questions below.
willrlin
approved these changes
Jul 27, 2021
…f passing inner parameters out manually
anders-schneider
approved these changes
Jul 27, 2021
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!
seanmalbert
pushed a commit
that referenced
this pull request
Jun 23, 2022
…turn all listing data (#271) * inner query works on its own, but fails when placed in outer query * add param for inner query params * add support for where parameters to filtered query * updates pagination to use inner query * Refactor pagination, update type for comparison param * fix comment spacing * fix tests * update changelog * address comment nits and remove units from inner join for now * reorder outer query builder logic, and use .getParameters() instead of passing inner parameters out manually * fix tests
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Move where clauses and pagination to subquery, so filtered results return all listing data
Issue #258, #151
Addresses #258, #151
Description
Moves
WHERE
clauses and pagination to a subquery, so filtered results return all listing data.Previously, if we filtered on units or preferences, only the units or preferences that match the query were returned. Now, everything about a building that contains matching units is returned
Also:
meta.totalItems
was the total number of listings, not the total number of listings that match the filtersmeta
detailstake()
andskip()
Type of change
How Can This Be Tested/Reviewed?
Test with paths like:
Checklist: