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

allow filtering by limit and offset or using a cursor on the results #22

Open
dwiel opened this issue Nov 12, 2015 · 1 comment
Open

Comments

@dwiel
Copy link
Owner

dwiel commented Nov 12, 2015

No description provided.

@dwiel
Copy link
Owner Author

dwiel commented Jan 21, 2016

This is difficult. The simplest solution I can think of at the moment is to convert the execution model to use generators so that limit can simply be use at the end to only pull the first N elements out of the iterator. Otherwise, it may be difficult to communicate the limit throughout the query. There would be backtracking when you pull the first 10 elements out of a function, then place a constraint which brings the count down to 5, so you have to go back to the first function and get 5 more out, then run constraints on those, etc.

Also complicating matters are optimizations which require many -> many operations, like SQL queries where it is easier to pass a set of ids in and get a set out, then to make many small queries with one id each. Perhaps even in this case the SQL driver can support a generator model of return.

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

1 participant