how to set autocommit = 1 in a sqlalchemy.engine.Connection

后端 未结 5 2176
旧巷少年郎
旧巷少年郎 2021-02-20 00:01

In sqlalchemy, I make the connection:

 conn = engine.connect()

I found this will set autocommit = 0 in my mysqld log. Now I want to set autocom

5条回答
  •  甜味超标
    2021-02-20 00:21

    What is your dialect for mysql connection?

    You can set the autocommit to True to solve the problem, like this mysql+mysqldb://user:password@host:port/db?charset=foo&autocommit=true

提交回复
热议问题