]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
- for whatever reason, Insert.values() with multi values wasn't
authorMike Bayer <mike_mp@zzzcomputing.com>
Tue, 9 Sep 2014 22:59:59 +0000 (18:59 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Tue, 9 Sep 2014 23:00:34 +0000 (19:00 -0400)
in the 0.8 migration, so let's just add that

doc/build/changelog/changelog_08.rst
doc/build/changelog/migration_08.rst

index 002eaf70446483af15b2215aaa3350b1949bcbf6..6515f731d3d18b1ada03f2c99081d11aa5f441dc 100644 (file)
       Supported by Postgresql, SQLite, and MySQL.
       Big thanks to Idan Kamara for doing the legwork on this one.
 
+      .. seealso::
+
+        :ref:`feature_2623`
+
     .. change::
         :tags: oracle, bug
         :tickets: 2620
index 3346916ea659a50539e00a5270d1cad132a83b0f..a2e052b98a6d1ac77b8a6f72d9095cfd447896f5 100644 (file)
@@ -683,6 +683,30 @@ as more string, integer and date operators.
 
 :ticket:`2547`
 
+.. _feature_2623:
+
+Multiple-VALUES support for Insert
+-----------------------------------
+
+The :meth:`.Insert.values` method now supports a list of dictionaries,
+which will render a multi-VALUES statement such as
+``VALUES (<row1>), (<row2>), ...``.  This is only relevant to backends which
+support this syntax, including Postgresql, SQLite, and MySQL.  It is
+not the same thing as the usual ``executemany()`` style of INSERT which
+remains unchanged::
+
+    users.insert().values([
+                        {"name": "some name"},
+                        {"name": "some other name"},
+                        {"name": "yet another name"},
+                    ])
+
+.. seealso::
+
+    :meth:`.Insert.values`
+
+:ticket:`2623`
+
 Type Expressions
 -----------------