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

Support async iterator in ResultProxy #92

Closed
asvetlov opened this issue Jan 5, 2016 · 3 comments
Closed

Support async iterator in ResultProxy #92

asvetlov opened this issue Jan 5, 2016 · 3 comments
Milestone

Comments

@asvetlov
Copy link
Member

asvetlov commented Jan 5, 2016

async for row in conn.exectute("SELECT ..."):
    print(row)
@asvetlov asvetlov added this to the 0.8 milestone Jan 5, 2016
@jettify
Copy link
Member

jettify commented Jan 5, 2016

I tried to implement and found that this API is not very good, because there is no way to close created ResultProxy object with cursor inside. We should encourage:

async with conn.execute("SELECT ...") as result:
    async for record in result:
        print(record)

@asvetlov
Copy link
Member Author

asvetlov commented Jan 5, 2016

Maybe. I used dirty trick to close result IIRC.

@jettify
Copy link
Member

jettify commented Jan 10, 2016

resolved by #94

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

No branches or pull requests

2 participants