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

Provide the next cursor from a query #6

Open
jeffj6123 opened this issue Dec 12, 2018 · 3 comments
Open

Provide the next cursor from a query #6

jeffj6123 opened this issue Dec 12, 2018 · 3 comments

Comments

@jeffj6123
Copy link

It could be really useful if as apart of the results it would provide the next cursor. I find myself doing it right now after getting the query back and it might make a lot of sense to provide it.

@kahurangitama
Copy link

I think you don't need those as you can do something like:
nextPage = result.items.pop()._id;
previousPage = result.items.shift()._id;

@jeffj6123
Copy link
Author

I had just find myself doing basically that pretty frequently and then writing a thin wrapper this library to add those properties and at that point I figured it might make sense for it to be part of this library

@Uzlopak
Copy link

Uzlopak commented Feb 20, 2020

@jeffj6123

Do you base the next and previous dependending on the reverse value?

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