We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
In aiopg, queries to update table fields doesn't work with self inversion. I tried to inverse one field like that:
cmd = 'UPDATE schema.table SET field1 = NOT field1 WHERE field2 = %s' await cur.execute(cmd, args)
It didn't work. instead of this way, I had to do this in two queries - select and update:
cmd = 'SELECT field1 FROM schema.table WHERE field2 = %s' res = await cur.execute(cmd, args) res = not res[0][0] cmd = 'UPDATE schema.table SET field1 = %s WHERE field2 = %s' await cur.execute(cmd, (res,) + args)
The syntax for SET field = NOT field is correct and it works in terminal, but I don't know why it doesn't work here.
SET field = NOT field
system: ubuntu 20.04 python: 3.8 aiogp: 1.2.1
The text was updated successfully, but these errors were encountered:
No branches or pull requests
In aiopg, queries to update table fields doesn't work with self inversion.
I tried to inverse one field like that:
It didn't work. instead of this way, I had to do this in two queries - select and update:
The syntax for
SET field = NOT field
is correct and it works in terminal, but I don't know why it doesn't work here.System
system: ubuntu 20.04
python: 3.8
aiogp: 1.2.1
The text was updated successfully, but these errors were encountered: