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

Iterator API with data copy #225

Open
efirs opened this issue Feb 9, 2023 · 1 comment
Open

Iterator API with data copy #225

efirs opened this issue Feb 9, 2023 · 1 comment
Labels
good first issue Good for newcomers
Milestone

Comments

@efirs
Copy link
Collaborator

efirs commented Feb 9, 2023

Implement HasNext/Get APIs, which returns an object suitable to be passed outside of iteration loop scope.

Example API:

for it.HasNext() {
   d := it.Get()
}

it.Get() would return a pointer to the document.

Current API we have, minimizes allocations and copies.
But the object is only accessible inside the loop scope.

var d Doc
for it.Next(&doc) {
}
@efirs efirs added this to Tigris Feb 9, 2023
@efirs efirs added this to the Beta milestone Feb 9, 2023
@efirs efirs moved this to 🆕 New in Tigris Feb 9, 2023
@efirs efirs added the good first issue Good for newcomers label Feb 9, 2023
@ankitsridhar16
Copy link
Contributor

I would like to work on this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants