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.
Hello, thank you for ResoTransport! I'm using this in one of my projects, and its saved me from having to reinvent the wheel.
Working with the query API, I noticed that I wasn't able to construct complex nested queries. My use-case is a client to wanted to pull down all listings within a certain area, but only the active and bumpable-buyer listings. In addition, he wanted to see all of his own listings, regardless of the status. The query looks something like this:
This is not possible to construct using the current query API, but it seems to me that there's no reason it couldn't be, like this:
Note that I have also extended
#eq
to accept an array for brevity, but that extension is not in this PR. This PR just makes the deep nesting possible.All existing tests pass with the new implementation, so it should be backwards compatible, but perhaps there are some queries out there that are relying on some idiosyncracy of the old implementation.
Anyways, thoughts? Any interest in merging this?
If desired, I can push a PR for the
.eq(field: [1,2,3])
syntax, as well.