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

Implement sensible query pagination #5

Closed
simonw opened this issue Oct 23, 2017 · 3 comments
Closed

Implement sensible query pagination #5

simonw opened this issue Oct 23, 2017 · 3 comments

Comments

@simonw
Copy link
Owner

simonw commented Oct 23, 2017

No description provided.

@simonw
Copy link
Owner Author

simonw commented Oct 23, 2017

https://stackoverflow.com/a/14468878/6083

Looks like I should order by compound primary key and implement cursor-based pagination.

@simonw simonw added this to the Ship v1 milestone Oct 23, 2017
@simonw
Copy link
Owner Author

simonw commented Oct 24, 2017

I have code to detect primary keys on tables... but what should I do for tables that lack primary keys? How should I even sort them?

@simonw
Copy link
Owner Author

simonw commented Oct 24, 2017

Looks like I can use the SQLite specific “rowid” in that case. It isn’t guaranteed to stay consistent across a VACUUM but that’s ok because we are immutable anyway.

https://www.sqlite.org/lang_createtable.html#rowid

@simonw simonw added the medium label Oct 24, 2017
simonw pushed a commit that referenced this issue Nov 9, 2017
Allows us to link to individual records even for tables that do not have a primary key.

Refs #5
simonw pushed a commit that referenced this issue Nov 9, 2017
@simonw simonw closed this as completed in 21c9c04 Nov 10, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant