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.
Hey as I was using more features around Views and getting help from CouchDB Slack people I was told about this and thought now that the library supports Views it shouldn't be hard so I implemented the following.
Check it out when you have time and tell me if something needs to change, no rush, thanks for your time 😊
Feature Overview
By appending a
/queries
in a view URL you can execute this view with multiple query objects to get multiple results without calling the API multiple times. The only difference is that you add eachquery option
in a json like thisthen you receive a response that has only one object which contains one result per query in the same order
I added an Internal Dto
CouchViewQueryResult
to deserialize the result object.Then added the following methods: (
Task
and some parameters omitted for brevity)I also created two tests that query the same view method with the same options twice since it doesn't matter if you use the same options multiple times, then the tests check if the produced request/response objects are of the expected format.
Questions
<remarks></remarks>
stating the version?This feature exists in CouchDB v2.2 and later and is described with more details here