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

docs: Add pagination explanation to docs #2134

Merged
merged 1 commit into from
Dec 2, 2024

Conversation

filinvadim
Copy link
Contributor

Resolves #2133.

Summary
This addition to the documentation provides a detailed explanation and implementation of pagination using prefix scans for lexicographically sorted keys.
Introduces a practical method for implementing pagination using:

  • A limit on the number of results returned per query.
  • A cursor (last processed key) to track the stopping point of the current iteration and resume subsequent queries.
    Includes a clear example of using cursors to manage iteration over keys in BadgerDB.
    Provides a complete Go implementation, showcasing how to perform prefix scans, manage pagination, and retrieve key-value pairs sequentially.

This addition enhances the documentation by offering both theoretical insights and practical guidance, making it easier for developers to implement efficient, scalable, and sorted data retrieval mechanisms in their applications.

@filinvadim filinvadim requested a review from a team December 2, 2024 09:19
@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


vadim seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

1 similar comment
@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


vadim seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

Copy link

netlify bot commented Dec 2, 2024

Deploy Preview for badger-docs ready!

Name Link
🔨 Latest commit c794e7d
🔍 Latest deploy log https://app.netlify.com/sites/badger-docs/deploys/674d7bb9bd9244000851548e
😎 Deploy Preview https://deploy-preview-2134--badger-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@harshil-goel harshil-goel merged commit 28fb51d into hypermodeinc:main Dec 2, 2024
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

[QUESTION]: <Is it possible to implement pagination?>
3 participants