Python DB API - commit() v. execute("commit transaction")?

Neil Cerutti neilc at norwich.edu
Fri Jun 2 15:40:54 EDT 2017


On 2017-06-02, Skip Montanaro <skip.montanaro at gmail.com> wrote:
> On Fri, Jun 2, 2017 at 11:14 AM, Dennis Lee Bieber
> <wlfraed at ix.netcom.com> wrote:
> I just checked, and the sqlite3 adapter I have access to
> (Python 2.7.13 in a Conda env, module version 2.6.0, SQLite3
> 3.13.0) has no autocommit attribute at all. I checked at the
> module, connection and cursor levels.

You get autocommit with sqlite3 by setting isolation_level=None
on the connection object. 

https://docs.python.org/2/library/sqlite3.html#sqlite3-controlling-transactions

-- 
Neil Cerutti




More information about the Python-list mailing list