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

Fix sqlalchemy default values for insert and update queries #266

Closed
wants to merge 10 commits into from

Conversation

ckkz-it
Copy link

@ckkz-it ckkz-it commented Nov 12, 2020

This is what actually aiopg does https://github.com/aio-libs/aiopg/blob/master/aiopg/sa/engine.py#L17#L30

Fixes #72
I think this solution is less tricky than #206

@@ -917,6 +1009,7 @@ async def run_database_queries():
async with database:

async def db_lookup():

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

left \n

_result_processors = {} # type: dict


class APGCompiler_psycopg2(
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems strange to call this APGCompiler_psycopg2, given that the db backend used for postgres in databases is asyncpg, not psycopg2.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right but that's because aiopg is just a wrapper around psycopg2, asyncpg is not.

@aminalaee aminalaee closed this Nov 24, 2021
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

Successfully merging this pull request may close these issues.

Support for "default" parameter in sqlalchemy.Column
4 participants