summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/engine
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2012-05-04 17:44:22 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2012-05-04 17:44:22 -0400
commitc6d4471af3949e339912edc4fa404d77eb31e5fb (patch)
treec4fe146d602d6065a31a63ba8b480b6753aa41ed /lib/sqlalchemy/engine
parent391ca4dc8ee0f78dec86a1ab431d4fcfa7590de3 (diff)
downloadsqlalchemy-c6d4471af3949e339912edc4fa404d77eb31e5fb.tar.gz
- [feature] Added SQLite execution option
"sqlite_raw_colnames=True", will bypass attempts to remove "." from column names returned by SQLite cursor.description. [ticket:2475]
Diffstat (limited to 'lib/sqlalchemy/engine')
-rw-r--r--lib/sqlalchemy/engine/base.py2
-rw-r--r--lib/sqlalchemy/engine/default.py8
2 files changed, 5 insertions, 5 deletions
diff --git a/lib/sqlalchemy/engine/base.py b/lib/sqlalchemy/engine/base.py
index a2695e337..a631f5c32 100644
--- a/lib/sqlalchemy/engine/base.py
+++ b/lib/sqlalchemy/engine/base.py
@@ -2726,7 +2726,7 @@ class ResultMetaData(object):
context = parent.context
dialect = context.dialect
typemap = dialect.dbapi_type_map
- translate_colname = dialect._translate_colname
+ translate_colname = context._translate_colname
self.case_sensitive = dialect.case_sensitive
# high precedence key values.
diff --git a/lib/sqlalchemy/engine/default.py b/lib/sqlalchemy/engine/default.py
index 1f72d005d..b0d2ab946 100644
--- a/lib/sqlalchemy/engine/default.py
+++ b/lib/sqlalchemy/engine/default.py
@@ -96,10 +96,6 @@ class DefaultDialect(base.Dialect):
# and denormalize_name() must be provided.
requires_name_normalize = False
- # a hook for SQLite's translation of
- # result column names
- _translate_colname = None
-
reflection_options = ()
def __init__(self, convert_unicode=False, assert_unicode=False,
@@ -361,6 +357,10 @@ class DefaultExecutionContext(base.ExecutionContext):
_is_implicit_returning = False
_is_explicit_returning = False
+ # a hook for SQLite's translation of
+ # result column names
+ _translate_colname = None
+
@classmethod
def _init_ddl(cls, dialect, connection, dbapi_connection, compiled_ddl):
"""Initialize execution context for a DDLElement construct."""