From: Mike Bayer Date: Tue, 9 Sep 2014 22:59:59 +0000 (-0400) Subject: - for whatever reason, Insert.values() with multi values wasn't X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=6434b6b9ac00cb934098bd7a1e6dd5311b88fdd2;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git - for whatever reason, Insert.values() with multi values wasn't in the 0.8 migration, so let's just add that --- diff --git a/doc/build/changelog/changelog_08.rst b/doc/build/changelog/changelog_08.rst index 002eaf7044..6515f731d3 100644 --- a/doc/build/changelog/changelog_08.rst +++ b/doc/build/changelog/changelog_08.rst @@ -2156,6 +2156,10 @@ 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 diff --git a/doc/build/changelog/migration_08.rst b/doc/build/changelog/migration_08.rst index 3346916ea6..a2e052b98a 100644 --- a/doc/build/changelog/migration_08.rst +++ b/doc/build/changelog/migration_08.rst @@ -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 (), (), ...``. 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 -----------------