diff options
| author | mike bayer <mike_mp@zzzcomputing.com> | 2020-03-24 21:11:26 +0000 |
|---|---|---|
| committer | Gerrit Code Review <gerrit@bbpush.zzzcomputing.com> | 2020-03-24 21:11:26 +0000 |
| commit | 050dee534b888a9a8e6768d2ad16c3f2380c7c9c (patch) | |
| tree | c771f1dafb0603d3b45c50a7c5b4185d1e25eff0 /lib/sqlalchemy/dialects/sqlite/base.py | |
| parent | 7ab1a62d886a9fe40eb368bbbe73b6436b9cbb4b (diff) | |
| parent | 64e8303debd8064d7d9c01c3300cca5f54c02db1 (diff) | |
| download | sqlalchemy-050dee534b888a9a8e6768d2ad16c3f2380c7c9c.tar.gz | |
Merge "Implement autocommit isolation level for pysqlite"
Diffstat (limited to 'lib/sqlalchemy/dialects/sqlite/base.py')
| -rw-r--r-- | lib/sqlalchemy/dialects/sqlite/base.py | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/lib/sqlalchemy/dialects/sqlite/base.py b/lib/sqlalchemy/dialects/sqlite/base.py index 31425d4c0..1a13f678f 100644 --- a/lib/sqlalchemy/dialects/sqlite/base.py +++ b/lib/sqlalchemy/dialects/sqlite/base.py @@ -168,8 +168,8 @@ work when using the pysqlite driver. .. _sqlite_isolation_level: -Transaction Isolation Level ----------------------------- +Transaction Isolation Level / Autocommit +---------------------------------------- SQLite supports "transaction isolation" in a non-standard way, along two axes. One is that of the @@ -185,6 +185,15 @@ and ``"READ UNCOMMITTED"`` corresponding to a value of 0 and 1, respectively. SQLite defaults to ``SERIALIZABLE``, however its behavior is impacted by the pysqlite driver's default behavior. +When using the pysqlite driver, the ``"AUTOCOMMIT"`` isolation level is also +available, which will alter the pysqlite connection using the ``.isolation_level`` +attribute on the DBAPI connection and set it to None for the duration +of the setting. + +.. versionadded:: 1.3.16 added support for SQLite AUTOCOMMIT isolation level + when using the pysqlite / sqlite3 SQLite driver. + + The other axis along which SQLite's transactional locking is impacted is via the nature of the ``BEGIN`` statement used. The three varieties are "deferred", "immediate", and "exclusive", as described at |
