From: Mike Bayer Date: Fri, 19 Jan 2007 20:51:05 +0000 (+0000) Subject: - trailing underscores are trimmed from func. calls, such as func.if_() X-Git-Tag: rel_0_3_4~22 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fe0cf718b10b0370a64f6d7f82dce986d2de0aba;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git - trailing underscores are trimmed from func. calls, such as func.if_() --- diff --git a/CHANGES b/CHANGES index 1f8c26d7bf..6d6aaf794a 100644 --- a/CHANGES +++ b/CHANGES @@ -8,6 +8,7 @@ - added "fetchmany()" support to ResultProxy - changed "BooleanExpression" to subclass from "BinaryExpression", so that boolean expressions can also follow column-clause behaviors (i.e. label(), etc). + - trailing underscores are trimmed from func. calls, such as func.if_() - fix to correlation of subqueries when the column list of the select statement is constructed with individual calls to append_column(); this fixes an ORM bug whereby nested select statements were not getting correlated with the diff --git a/lib/sqlalchemy/sql.py b/lib/sqlalchemy/sql.py index e0bae905a0..f944b468d6 100644 --- a/lib/sqlalchemy/sql.py +++ b/lib/sqlalchemy/sql.py @@ -274,6 +274,8 @@ class _FunctionGateway(object): """returns a callable based on an attribute name, which then returns a _Function object with that name.""" def __getattr__(self, name): + if name[-1] == '_': + name = name[0:-1] return getattr(_FunctionGenerator(), name) func = _FunctionGateway()