summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/dialects
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2010-04-30 15:00:48 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2010-04-30 15:00:48 -0400
commitc4bb1f7ba27aa19e1228f85419208d547ce161e6 (patch)
tree516f79e7ff8ec82ec4242ad98c6e2deb3e24dd82 /lib/sqlalchemy/dialects
parent1f58d4c2e407fee2c3625ec50242470e638127be (diff)
downloadsqlalchemy-c4bb1f7ba27aa19e1228f85419208d547ce161e6.tar.gz
place docs for DBAPI-agnostic transaction_isolation setting for sqlite, pg [ticket:1784]
Diffstat (limited to 'lib/sqlalchemy/dialects')
-rw-r--r--lib/sqlalchemy/dialects/postgresql/base.py8
-rw-r--r--lib/sqlalchemy/dialects/postgresql/psycopg2.py3
-rw-r--r--lib/sqlalchemy/dialects/sqlite/base.py10
3 files changed, 17 insertions, 4 deletions
diff --git a/lib/sqlalchemy/dialects/postgresql/base.py b/lib/sqlalchemy/dialects/postgresql/base.py
index 7de5cafad..aa2048d4b 100644
--- a/lib/sqlalchemy/dialects/postgresql/base.py
+++ b/lib/sqlalchemy/dialects/postgresql/base.py
@@ -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
-------------------------
diff --git a/lib/sqlalchemy/dialects/postgresql/psycopg2.py b/lib/sqlalchemy/dialects/postgresql/psycopg2.py
index 2a51a7239..6ae6c6c08 100644
--- a/lib/sqlalchemy/dialects/postgresql/psycopg2.py
+++ b/lib/sqlalchemy/dialects/postgresql/psycopg2.py
@@ -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
------------
diff --git a/lib/sqlalchemy/dialects/sqlite/base.py b/lib/sqlalchemy/dialects/sqlite/base.py
index ca0a39136..ec3d7b8ac 100644
--- a/lib/sqlalchemy/dialects/sqlite/base.py
+++ b/lib/sqlalchemy/dialects/sqlite/base.py
@@ -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