summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/engine.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2006-01-03 00:36:16 +0000
committerMike Bayer <mike_mp@zzzcomputing.com>2006-01-03 00:36:16 +0000
commit1c49a556509ee1ae7047b8095434fb19401dc06c (patch)
tree2d8233f2cc1268a45ab1ab4d7ca6f8ee7d03b496 /lib/sqlalchemy/engine.py
parentad7938a8e0c2b0d57954b7d5ec1e0b2ad9552625 (diff)
downloadsqlalchemy-1c49a556509ee1ae7047b8095434fb19401dc06c.tar.gz
type objects pass engine around to get a hold of DBAPI type objects
added dbapi.Binary creation to base BinaryType fixed MySQL binary type adjustment to Join._match_primaries to work better with self-referential table
Diffstat (limited to 'lib/sqlalchemy/engine.py')
-rw-r--r--lib/sqlalchemy/engine.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/sqlalchemy/engine.py b/lib/sqlalchemy/engine.py
index 6e04ffa2c..703bd0b3e 100644
--- a/lib/sqlalchemy/engine.py
+++ b/lib/sqlalchemy/engine.py
@@ -604,12 +604,13 @@ class ResultProxy:
class AmbiguousColumn(object):
def __init__(self, key):
self.key = key
- def convert_result_value(self, arg):
+ def convert_result_value(self, arg, engine):
raise "Ambiguous column name '%s' in result set! try 'use_labels' option on select statement." % (self.key)
def __init__(self, cursor, engine, typemap = None):
"""ResultProxy objects are constructed via the execute() method on SQLEngine."""
self.cursor = cursor
+ self.engine = engine
self.echo = engine.echo=="debug"
self.rowcount = engine.context.rowcount
metadata = cursor.description
@@ -643,7 +644,7 @@ class ResultProxy:
rec = self.props[key.lower()]
else:
rec = self.props[key]
- return rec[0].convert_result_value(row[rec[1]])
+ return rec[0].convert_result_value(row[rec[1]], self.engine)
def fetchall(self):
"""fetches all rows, just like DBAPI cursor.fetchall()."""