summaryrefslogtreecommitdiff
path: root/lib/extensions.py
diff options
context:
space:
mode:
authorFederico Di Gregorio <fog@initd.org>2005-10-08 03:04:40 +0000
committerFederico Di Gregorio <fog@initd.org>2005-10-08 03:04:40 +0000
commite1688431e04357b56277144fc1a9ddf0207c991b (patch)
treeec99fb9eeec5e1447f1eadc23680d217fd6ea4c7 /lib/extensions.py
parent8920c2662b85efe7c3d61932ac3b6e2d50d4f949 (diff)
downloadpsycopg2-e1688431e04357b56277144fc1a9ddf0207c991b.tar.gz
Isolation level changes.
Diffstat (limited to 'lib/extensions.py')
-rw-r--r--lib/extensions.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/extensions.py b/lib/extensions.py
index 6a18878..d5d1ac6 100644
--- a/lib/extensions.py
+++ b/lib/extensions.py
@@ -41,6 +41,15 @@ from _psycopg import adapt, adapters, encodings, connection, cursor
from _psycopg import string_types, binary_types, new_type, register_type
from _psycopg import ISQLQuote
+"""Isolation level values."""
+ISOLATION_LEVEL_AUTOCOMMIT = 0
+ISOLATION_LEVEL_READ_COMMITED = 1
+ISOLATION_LEVEL_SERIALIZABLE = 2
+
+# Postgresql maps the the other standard values to already defined levels
+ISOLATION_LEVEL_REPEATABLE_READ = ISOLATION_LEVEL_SERIALIZABLE
+ISOLATION_LEVEL_READ UNCOMMITTED = ISOLATION_LEVEL_READ_COMMITED
+
def register_adapter(typ, callable):
"""Register 'callable' as an ISQLQuote adapter for type 'typ'."""