diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2007-01-19 20:51:05 +0000 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2007-01-19 20:51:05 +0000 |
| commit | fe0cf718b10b0370a64f6d7f82dce986d2de0aba (patch) | |
| tree | b91fbcf6f7832717e3c02f2f051e6e6cecd000bd | |
| parent | 8a48ee2c8c0a28c059e8d60ef1da4c8b2ddf0738 (diff) | |
| download | sqlalchemy-fe0cf718b10b0370a64f6d7f82dce986d2de0aba.tar.gz | |
- trailing underscores are trimmed from func.<xxx> calls, such as func.if_()
| -rw-r--r-- | CHANGES | 1 | ||||
| -rw-r--r-- | lib/sqlalchemy/sql.py | 2 |
2 files changed, 3 insertions, 0 deletions
@@ -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.<xxx> 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 e0bae905a..f944b468d 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() |
