Skip to content

Commit 706d4fc

Browse files
committed
- for whatever reason, Insert.values() with multi values wasn't
in the 0.8 migration, so let's just add that
1 parent 48080d8 commit 706d4fc

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed

doc/build/changelog/changelog_08.rst

+4
Original file line numberDiff line numberDiff line change
@@ -2156,6 +2156,10 @@
21562156
Supported by Postgresql, SQLite, and MySQL.
21572157
Big thanks to Idan Kamara for doing the legwork on this one.
21582158

2159+
.. seealso::
2160+
2161+
:ref:`feature_2623`
2162+
21592163
.. change::
21602164
:tags: oracle, bug
21612165
:tickets: 2620

doc/build/changelog/migration_08.rst

+24
Original file line numberDiff line numberDiff line change
@@ -683,6 +683,30 @@ as more string, integer and date operators.
683683

684684
:ticket:`2547`
685685

686+
.. _feature_2623:
687+
688+
Multiple-VALUES support for Insert
689+
-----------------------------------
690+
691+
The :meth:`.Insert.values` method now supports a list of dictionaries,
692+
which will render a multi-VALUES statement such as
693+
``VALUES (<row1>), (<row2>), ...``. This is only relevant to backends which
694+
support this syntax, including Postgresql, SQLite, and MySQL. It is
695+
not the same thing as the usual ``executemany()`` style of INSERT which
696+
remains unchanged::
697+
698+
users.insert().values([
699+
{"name": "some name"},
700+
{"name": "some other name"},
701+
{"name": "yet another name"},
702+
])
703+
704+
.. seealso::
705+
706+
:meth:`.Insert.values`
707+
708+
:ticket:`2623`
709+
686710
Type Expressions
687711
-----------------
688712

0 commit comments

Comments
 (0)