Skip to content
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

Ability to set limit for queries #190

Open
stickbyatlas opened this issue Aug 27, 2017 · 3 comments
Open

Ability to set limit for queries #190

stickbyatlas opened this issue Aug 27, 2017 · 3 comments

Comments

@stickbyatlas
Copy link

Hi folks,

I was surprised to discover that the query function in the adapter was implemented without the ability to specify a limit param, meaning that query results will always return 25 results or less. Is there a reason that the adapter implements query with only the ability to set a selector and a sort param? I've currently got around this limitation by overriding query in my application adapter, but I'm puzzled as to why this feature was omitted in the first place.

Anybody care to elaborate?

@broerse
Copy link
Collaborator

broerse commented Aug 28, 2017

It is a breaking change introduced in CouchDB 2.1.0 as far is I can tell. See pouchdb-community/relational-pouch#81

@afinne
Copy link

afinne commented Sep 13, 2017

I think that you can actually specify a limit and skip to normal queries in the adapter. The documentation is just not explicitly stating it, instead referring to the pouchdb-find documentation (https://github.com/pouchdb/pouchdb/tree/master/packages/node_modules/pouchdb-find). Noticed that the link in the documentation is broken though.

The issue linked above refers to "internal" queries that ember-pouch performs when following hasMany links.

@afinne
Copy link

afinne commented Sep 15, 2017

I was mistaken above, the limit and skip are currently ignored by the adapter. In #193 the implementation is on its way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants