Is mysql.interface line 70 supposed to be not transaction?
Closed this issue · 4 comments
xxxzc commented
Mysql executor does not commit after executing update sql, is mysql.interface line 70 supposed to be not transaction
?
mayim/src/mayim/sql/mysql/interface.py
Lines 64 to 72 in c73d9d2
After changing to not transaction, the update was committed normally
ahopkins commented
Are you trying to use it in a transaction or not?
xxxzc commented
My code looks like this:
class ConfigExecutor(MysqlExecutor):
@query("""
update t_config set config=$config where source=$source
""")
async def update_config(self, source: str, config: str):
...
How do I commit this update with or without a transaction?
slipstream77 commented
Having similar issue. SELECT statements work fine, but an UPDATE statement will not commit unless writing the SQL file as a transaction. Do you have any UPDATE examples showing this and how to handle a transaction that did not complete successfully?
adk23333 commented