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

Pagination #81

Open
pietercolpaert opened this issue Jun 17, 2014 · 6 comments
Open

Pagination #81

pietercolpaert opened this issue Jun 17, 2014 · 6 comments

Comments

@pietercolpaert
Copy link

Implement pagination by implementing the option: startTriple.

This way, a next page of triples of {limit:100} can be requested as follows:
{limit: 100, startTriple: {subject : "..." , predicate: "...", object : "..."}}

By which you should be able to only give the beginning of the object, not the entire object

@mcollina
Copy link
Collaborator

I'd suggest to call it startTriple.

@pietercolpaert
Copy link
Author

Edited

@pietercolpaert
Copy link
Author

Do you think the implementation of this is straightforward? Or will I need to invest time to get to understand the entire mechanism? I've already seen your presentation, which was already surprisingly helpful (and interesting).

@mcollina
Copy link
Collaborator

I think the implementation is straightforward, just replace start with the startTriple if present.

However, you should:

  1. be sure they are on the very same index (spo, pso, ecc)
  2. check if start is a prefix of startTriple, and if not return an Error

@pietercolpaert
Copy link
Author

Or just return 0 triples in case 2?

@mcollina
Copy link
Collaborator

nope, because the start for the LevelUp's ReadStream is calculated based on the pattern. It's the same of saying "you are trying to start from a triple which is not included in the given pattern".

@pietercolpaert pietercolpaert mentioned this issue Oct 13, 2014
Closed
7 tasks
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

2 participants