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

feature suggestion: expose fetchone() and fetchall() methods on the Engine and SAConnection #744

Open
brianmaissy opened this issue Oct 19, 2020 · 1 comment

Comments

@brianmaissy
Copy link
Contributor

brianmaissy commented Oct 19, 2020

Similarly to engine.scalar() and connection.scalar(), it would be convenient if there were fetchone() and fetchall() methods as well, as shortcuts for:

result = await connection.execute(...)
data = await result.fetchall()

I know that sqlalchemy's engine and connection don't have those methods, but since aiopgsa is async, simply chaining the method calls is significantly messier and less clear:

data = await (await connection.execute(...)).fetchall()

Happy to open a PR if this is something that would get merged.

@brianmaissy
Copy link
Contributor Author

@Pliner what do you think about this one?

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

1 participant