Python SQLite - How to manually BEGIN and END transactions?

后端 未结 2 1812
谎友^
谎友^ 2021-01-13 15:19

Context

So I am trying to figure out how to properly override the auto-transaction when using SQLite in Python. When I try and run

c         


        
2条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-01-13 16:13

    The documentaton says:

    You can control which kind of BEGIN statements sqlite3 implicitly executes (or none at all) via the isolation_level parameter to the connect() call, or via the isolation_level property of connections.

    If you want autocommit mode, then set isolation_level to None.

提交回复
热议问题