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
insert multiple rows in one query #250
Comments
example query which would be great but currently gives the above error: await conn.execute(
sa_foo_table
.insert()
.values([
dict(name='name1', x=1),
dict(name='name2', x=2),
dict(name='name3', x=3),
])
) Surely this can't be impossible with psycopg2 as it's still a single query, just currently not possible with aiopg's sqlachemy integration. |
Your approach should work, I do almost the same here |
weird, wonder why I was getting an error before. Sorry. Might be worth documenting this. I searched the docs for "bulk" and "executemany" and just found the code snippets saying " Perhaps add to the docs " |
Related to #112, I know
executemany
is not possible, but I wonder if it would be possible for aiopg (and aiopg-sqlachemy flavour) to support insert with multiple rows. As described here?Currently, I'm getting
When trying a query like this.
The text was updated successfully, but these errors were encountered: