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

Moving through rows using pk or limit/offset #23

Closed
Jaymon opened this issue Apr 15, 2016 · 1 comment
Closed

Moving through rows using pk or limit/offset #23

Jaymon opened this issue Apr 15, 2016 · 1 comment

Comments

@Jaymon
Copy link
Owner

Jaymon commented Apr 15, 2016

This was a way rough test but there didn't seem to be any meaningful difference between the two

with pout.p("cursor"):
    user_id = 0
    while True:
        users = User.query.gt_pk(user_id).asc_pk().get(5000)
        if users:
            for u in users:
                user_id = u.pk
                print user_id
        else:
            break


with pout.p("all"):
    for u in User.query.asc_pk().all():
        user_id = u.pk
        print user_id
@Jaymon
Copy link
Owner Author

Jaymon commented Dec 18, 2020

The new Iterator code that uses cursors exclusively makes this moot

@Jaymon Jaymon closed this as completed Dec 18, 2020
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

1 participant