]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
- Added NotImplementedError for params() method
authorMike Bayer <mike_mp@zzzcomputing.com>
Fri, 21 Nov 2008 01:21:00 +0000 (01:21 +0000)
committerMike Bayer <mike_mp@zzzcomputing.com>
Fri, 21 Nov 2008 01:21:00 +0000 (01:21 +0000)
on Insert/Update/Delete constructs.  These items
currently don't support this functionality, which
also would be a little misleading compared to
values().

CHANGES
lib/sqlalchemy/sql/expression.py

diff --git a/CHANGES b/CHANGES
index 6734cd3114a484b595a907da7fdddc917572c81a..ef177b5ead40fc313b33c3264ea8f45cd97a4deb 100644 (file)
--- 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.
       
index 4891b5ca50bf8acf87acb2959e2b9539fb2f6851..4b47a119f04f138045dbad43c0f0b7c26c162f86 100644 (file)
@@ -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