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

Add paginated lookups for EnumerableSet and EnumerableMap #4909

Open
Amxx opened this issue Feb 19, 2024 · 2 comments
Open

Add paginated lookups for EnumerableSet and EnumerableMap #4909

Amxx opened this issue Feb 19, 2024 · 2 comments

Comments

@Amxx
Copy link
Collaborator

Amxx commented Feb 19, 2024

Proposed in #4907.

Usecases need to be evaluated.

@Amxx
Copy link
Collaborator Author

Amxx commented Feb 19, 2024

Note, if we implement this, I think we should follow a pagination system similar to graphQL first & skip or the SQL offset & limit, where you request N entries start at index P.

It would return an array of length between 0 and N. If the returned array length is smaller than N, the caller knows there is no more data. If the returned array length is N, then there may or may not be more data to fetch. In that case the caller needs to do another call, moving the offset P by N to get ne next elements.

@ernestognw
Copy link
Member

Usecases need to be evaluated.

I don't see a good use case other for very specific cases of on-chain pagination. But they're unclear to me.

Note, if we implement this, I think we should follow a pagination system similar to graphQL first & skip or the SQL offset & limit, where you request N entries start at index P.

If we're doing this, the larger discussion may be if we rather implement offset-based pagination or other. I think both have different properties but we need the concrete use cases to decide between them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants