From ea46e556f9f691735bc14885648a92e8cf7177d5 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Sat, 10 Nov 2007 03:02:16 +0000 Subject: - anonymous column expressions are automatically labeled. e.g. select([x* 5]) produces "SELECT x * 5 AS anon_1". This allows the labelname to be present in the cursor.description which can then be appropriately matched to result-column processing rules. (we can't reliably use positional tracking for result-column matches since text() expressions may represent multiple columns). - operator overloading is now controlled by TypeEngine objects - the one built-in operator overload so far is String types overloading '+' to be the string concatenation operator. User-defined types can also define their own operator overloading by overriding the adapt_operator(self, op) method. - untyped bind parameters on the right side of a binary expression will be assigned the type of the left side of the operation, to better enable the appropriate bind parameter processing to take effect [ticket:819] --- lib/sqlalchemy/engine/base.py | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/sqlalchemy/engine') diff --git a/lib/sqlalchemy/engine/base.py b/lib/sqlalchemy/engine/base.py index 013c5704b..859fb796e 100644 --- a/lib/sqlalchemy/engine/base.py +++ b/lib/sqlalchemy/engine/base.py @@ -1339,6 +1339,7 @@ class ResultProxy(object): for i, item in enumerate(metadata): # sqlite possibly prepending table name to colnames so strip colname = (item[0].split('.')[-1]).decode(self.dialect.encoding) + if self.context.typemap is not None: type = self.context.typemap.get(colname.lower(), typemap.get(item[1], types.NULLTYPE)) else: -- cgit v1.2.1