"Autocommit" means that each SQL Statement executes in it's own transaction. 
Just as if you were to execute "begin; <statement>; commit;" each time.

-----Ursprüngliche Nachricht-----
Von: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] Im 
Auftrag von Peng Yu
Gesendet: Freitag, 31. Januar 2020 02:14
An: SQLite mailing list <sqlite-users@mailinglists.sqlite.org>
Betreff: [EXTERNAL] Re: [sqlite] Default isolation_level for sqlite3.connect?

I still have a hard time to understand what the difference is according to the 
python manual. It keeps saying see somewhere else in the python manual. But I 
don't see where it explains the differences between the differences 
comprehensively and clearly.

https://www.sqlite.org/lang_transaction.html

On the above page, I only see

- BEGIN
- BEGIN DEFERRED
- BEGIN IMMEDIATE
- BEGIN EXCLUSIVE

, where BEGIN is just BEGIN DEFERRED.

But what is isolation_level = None?

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

"The underlying sqlite3 library operates in autocommit mode by default, but the 
Python sqlite3 module by default does not."

According to the above, since isolation_level="" is the default in python, so 
it is not autocommit and it is BEGIN.

But what is autocommit mode? The following doesn't provide a definition. Is 
there a definition on sqlite.com website?

https://www.sqlite.org/c3ref/get_autocommit.html

> The default is an empty string (ie, '').  It can take the value None,
> '', 'DEFERRED', 'IMMEDIATE', 'EXCLUSIVE' and the value (if not None)
> is appended to the BEGIN when a magical transaction is started, and if
> None, then you are indicating that you will be using manual
> transaction control
>
> isolation_level   command
> None              None
> '' (default)      BEGIN
> 'DEFERRED'        BEGIN DEFERRED
> 'IMMEDIATE'       BEGIN IMMEDIATE
> 'EXCLUSIVE'       BEGIN EXCLUSIVE
>
> You can set the isolation_level in the connect call (the default is
> '') or read/change it with the .isolation_level property of a connection 
> object.

--
Regards,
Peng
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


___________________________________________
 Gunter Hick | Software Engineer | Scientific Games International GmbH | 
Klitschgasse 2-4, A-1130 Vienna | FN 157284 a, HG Wien, DVR: 0430013 | (O) +43 
1 80100 - 0

May be privileged. May be confidential. Please delete if not the addressee.
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to