Problems with autocommit in sqlite3 module from Python3

≡放荡痞女 提交于 2019-12-04 19:37:18

Independently of the isolation_level you use, using the with statement means everything will be handled automatically after the with block is ended.

That means commiting any remaining open transactions.

Take a look at this documentation: https://docs.python.org/2/library/sqlite3.html#using-the-connection-as-a-context-manager

Connection objects can be used as context managers that automatically commit or rollback transactions. In the event of an exception, the transaction is rolled back; otherwise, the transaction is committed:

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!