mirror of
https://github.com/psycopg/psycopg2.git
synced 2025-02-16 17:10:32 +03:00
Construct proper human sentences to describe execute_values()
With bonus typos dropped.
This commit is contained in:
parent
75198a46d4
commit
3ec06b88f0
|
@ -1178,7 +1178,7 @@ def execute_batch(cur, sql, argslist, page_size=100):
|
||||||
fewer multi-statement commands, each one containing at most *page_size*
|
fewer multi-statement commands, each one containing at most *page_size*
|
||||||
statements, resulting in a reduced number of server roundtrips.
|
statements, resulting in a reduced number of server roundtrips.
|
||||||
|
|
||||||
After the execution of the functtion the `cursor.rowcount` property will
|
After the execution of the function the `cursor.rowcount` property will
|
||||||
**not** contain a total result.
|
**not** contain a total result.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
@ -1201,10 +1201,15 @@ def execute_values(cur, sql, argslist, template=None, page_size=100):
|
||||||
*template*.
|
*template*.
|
||||||
|
|
||||||
:param template: the snippet to merge to every item in *argslist* to
|
:param template: the snippet to merge to every item in *argslist* to
|
||||||
compose the query. If *argslist* items are sequences it should contain
|
compose the query.
|
||||||
positional placeholders (e.g. ``"(%s, %s, %s)"``, or ``"(%s, %s, 42)``"
|
|
||||||
if there are constants value...); If *argslist* is items are mapping
|
- If the *argslist* items are sequences it should contain positional
|
||||||
it should contain named placeholders (e.g. ``"(%(id)s, %(f1)s, 42)"``).
|
placeholders (e.g. ``"(%s, %s, %s)"``, or ``"(%s, %s, 42)``" if there
|
||||||
|
are constants value...).
|
||||||
|
|
||||||
|
- If the *argslist* items are mappings it should contain named
|
||||||
|
placeholders (e.g. ``"(%(id)s, %(f1)s, 42)"``).
|
||||||
|
|
||||||
If not specified, assume the arguments are sequence and use a simple
|
If not specified, assume the arguments are sequence and use a simple
|
||||||
positional template (i.e. ``(%s, %s, ...)``), with the number of
|
positional template (i.e. ``(%s, %s, ...)``), with the number of
|
||||||
placeholders sniffed by the first element in *argslist*.
|
placeholders sniffed by the first element in *argslist*.
|
||||||
|
@ -1215,7 +1220,7 @@ def execute_values(cur, sql, argslist, template=None, page_size=100):
|
||||||
|
|
||||||
.. __: https://www.postgresql.org/docs/current/static/queries-values.html
|
.. __: https://www.postgresql.org/docs/current/static/queries-values.html
|
||||||
|
|
||||||
After the execution of the functtion the `cursor.rowcount` property will
|
After the execution of the function the `cursor.rowcount` property will
|
||||||
**not** contain a total result.
|
**not** contain a total result.
|
||||||
|
|
||||||
While :sql:`INSERT` is an obvious candidate for this function it is
|
While :sql:`INSERT` is an obvious candidate for this function it is
|
||||||
|
|
Loading…
Reference in New Issue
Block a user