You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When calling the find function, the request.limit value is optional. However, if you do not provide a limit value, the amount of data returned will differ based on if you are using the http adapter (connecting to a CouchDB instance) vs a local adapter.
My question is: should the limit on Pouch find behave the same way as Couch _find, where, by default, the limit is 25 on both the local and the http adapter? If not, can we at least update the docs to call out that the default limit value may differ based on which adapter you are using?
Reproduce
You can demonstrate what I am talking about by adding a new test to test.limit.js
This test will succeed when running with the local adapter since all 3000 results will be returned. It will fail if you instead connect Pouch to a Couch instance via the http adapter. Only 25 results will be returned in that case.
The text was updated successfully, but these errors were encountered:
Pouch generally aims for API compatibility with Couch so let's go ahead and update the implementation and docs to have a default of 25. This is technically a breaking change so should be included in the next major (coming soon)!
Having different adapters with different defaults is particularly confusing!
jkuester
added a commit
to jkuester/pouchdb
that referenced
this issue
Apr 22, 2024
Issue
When calling the
find
function, therequest.limit
value is optional. However, if you do not provide a limit value, the amount of data returned will differ based on if you are using the http adapter (connecting to a CouchDB instance) vs a local adapter.The CouchDB docs for
_find
say:I cannot find any mention of a default limit size in the Pouch docs:
My question is: should the
limit
on Pouchfind
behave the same way as Couch_find
, where, by default, the limit is25
on both the local and the http adapter? If not, can we at least update the docs to call out that the defaultlimit
value may differ based on which adapter you are using?Reproduce
You can demonstrate what I am talking about by adding a new test to test.limit.js
This test will succeed when running with the local adapter since all
3000
results will be returned. It will fail if you instead connect Pouch to a Couch instance via the http adapter. Only 25 results will be returned in that case.The text was updated successfully, but these errors were encountered: