From: Mike Bayer Date: Fri, 21 Nov 2008 01:21:00 +0000 (+0000) Subject: - Added NotImplementedError for params() method X-Git-Tag: rel_0_5_0~165 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7c0ba8028c985be460c491f8b6b59024090d0c3d;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git - Added NotImplementedError for params() method on Insert/Update/Delete constructs. These items currently don't support this functionality, which also would be a little misleading compared to values(). --- diff --git a/CHANGES b/CHANGES index 6734cd3114..ef177b5ead 100644 --- a/CHANGES +++ b/CHANGES @@ -15,6 +15,13 @@ CHANGES - Query.add_column() can accept FromClause objects in the same manner as session.query() can. +- sql + - Added NotImplementedError for params() method + on Insert/Update/Delete constructs. These items + currently don't support this functionality, which + also would be a little misleading compared to + values(). + - the "passive" flag on session.is_modified() is correctly propagated to the attribute manager. diff --git a/lib/sqlalchemy/sql/expression.py b/lib/sqlalchemy/sql/expression.py index 4891b5ca50..4b47a119f0 100644 --- a/lib/sqlalchemy/sql/expression.py +++ b/lib/sqlalchemy/sql/expression.py @@ -3455,7 +3455,11 @@ class _UpdateBase(ClauseElement): return pp else: return parameters - + + def params(self, *arg, **kw): + raise NotImplementedError("params() is not supported for INSERT/UPDATE/DELETE statements." + " To set the values for an INSERT or UPDATE statement, use stmt.values(**parameters).") + def bind(self): return self._bind or self.table.bind