Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Make iterate() lazy in JavaScript API #514

Open
penberg opened this issue Dec 19, 2024 · 3 comments
Open

Make iterate() lazy in JavaScript API #514

penberg opened this issue Dec 19, 2024 · 3 comments
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed JavaScript bindings

Comments

@penberg
Copy link
Collaborator

penberg commented Dec 19, 2024

Currently, iterate() calls all() internally, which fetches all rows eagerly. Let's make iterate lazily call sqlite3_step() instead.

@penberg penberg added enhancement New feature or request help wanted Extra attention is needed good first issue Good for newcomers JavaScript bindings labels Dec 19, 2024
@penberg penberg changed the title Make iterate() lazy in Limbo's JavaScript API Make iterate() lazy in JavaScript API Dec 19, 2024
@Tejasmadhukar
Copy link

Hello, I want to take up this issue!

@diegoreis42
Copy link
Contributor

Hi, I just started implementing this issue. If I have any blocks, I will let you know here

@Lemon-Peppermint
Copy link

Lemon-Peppermint commented Dec 20, 2024

For clarification sake, is the iterate() function meant to return a single row or an iterator that lazily evaluates all the statement results?
If it's the former then wouldn't calling self.get() internally be enough?

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed JavaScript bindings
Projects
None yet
Development

No branches or pull requests

4 participants