]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
place docs for DBAPI-agnostic transaction_isolation setting for sqlite, pg [ticket...
authorMike Bayer <mike_mp@zzzcomputing.com>
Fri, 30 Apr 2010 19:00:48 +0000 (15:00 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Fri, 30 Apr 2010 19:00:48 +0000 (15:00 -0400)
lib/sqlalchemy/dialects/postgresql/base.py
lib/sqlalchemy/dialects/postgresql/psycopg2.py
lib/sqlalchemy/dialects/sqlite/base.py

index 7de5cafad16f4b302d917d64a09ab0edd367b096..aa2048d4be31fe63ec0c544d517990053d3515f2 100644 (file)
@@ -36,6 +36,14 @@ PostgreSQL 8.2 supports an ``INSERT...RETURNING`` syntax which SQLAlchemy suppor
 as well.  A future release of SQLA will use this feature by default in lieu of 
 sequence pre-execution in order to retrieve new primary key values, when available.
 
+Transaction Isolation Level
+---------------------------
+
+:func:`create_engine` accepts an ``isolation_level`` parameter which results in 
+the command ``SET SESSION CHARACTERISTICS AS TRANSACTION ISOLATION LEVEL <level>``
+being invoked for every new connection.   Valid values for this parameter are 
+``READ_COMMITTED``,  ``READ_UNCOMMITTED``, ``REPEATABLE_READ``, and ``SERIALIZABLE``.
+
 INSERT/UPDATE...RETURNING
 -------------------------
 
index 2a51a72397267dd990129e9a5ea0c2f06478063a..6ae6c6c08a896fd9bbd467d0e9e632b0061b2eb5 100644 (file)
@@ -25,9 +25,6 @@ psycopg2-specific keyword arguments which are accepted by :func:`~sqlalchemy.cre
   at a time are fetched over the wire to reduce conversational overhead.
 * *use_native_unicode* - Enable the usage of Psycopg2 "native unicode" mode per connection.  True  
   by default.
-* *isolation_level* - Sets the transaction isolation level for each transaction
-  within the engine. Valid isolation levels are `READ_COMMITTED`,
-  `READ_UNCOMMITTED`, `REPEATABLE_READ`, and `SERIALIZABLE`.
 
 Transactions
 ------------
index ca0a39136c620c3b1d91ee194ac59b944727b5f9..ec3d7b8ac65770b6d1d56213b9adf7fc06420be8 100644 (file)
@@ -41,7 +41,15 @@ to the Table construct::
     Table('sometable', metadata,
             Column('id', Integer, primary_key=True), 
             sqlite_autoincrement=True)
-    
+
+Transaction Isolation Level
+---------------------------
+
+:func:`create_engine` accepts an ``isolation_level`` parameter which results in 
+the command ``PRAGMA read_uncommitted <level>`` being invoked for every new 
+connection.   Valid values for this parameter are ``SERIALIZABLE`` and 
+``READ UNCOMMITTED`` corresponding to a value of 0 and 1, respectively.
+
 """
 
 import datetime, re, time