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

Cursor support? #5

Open
seanbreckenridge opened this issue Feb 20, 2021 · 1 comment
Open

Cursor support? #5

seanbreckenridge opened this issue Feb 20, 2021 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@seanbreckenridge
Copy link
Owner

seanbreckenridge commented Feb 20, 2021

Cursors would be preferable for offset/pages, especially for live data. However, need a way to distinguish between distinct events/cache partial results in memory.

See discussion here karlicoss/HPI#16 (comment)

@seanbreckenridge seanbreckenridge self-assigned this Feb 20, 2021
@seanbreckenridge seanbreckenridge added the enhancement New feature or request label Feb 20, 2021
@seanbreckenridge
Copy link
Owner Author

seanbreckenridge commented Mar 7, 2021

Thinking about this further, the most obvious way to do this is to force the user to specify an attribute/dict key which acts as the hash.

Would have to split the code in the route generator to use the limit/act as a cursor, based on the presence of the hash/index GET arg, which seems feasible.

Hash the last item and return that as the cursor; if the user supplies the cursor consume the generator till you hit that value

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

No branches or pull requests

1 participant