summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGES7
-rw-r--r--lib/sqlalchemy/sql/expression.py6
2 files changed, 12 insertions, 1 deletions
diff --git a/CHANGES b/CHANGES
index 6734cd311..ef177b5ea 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 4891b5ca5..4b47a119f 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