summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/orm/query.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2020-10-29 23:21:13 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2020-10-29 23:23:26 -0400
commit163a97c6d57db09d6405124dae9b877bc9629721 (patch)
treea2d03a838965ad9ccbdda01d54ad24a9b4a8c1f3 /lib/sqlalchemy/orm/query.py
parentb9f7a92d821a31e48f7ce20ef848e73571c644fa (diff)
downloadsqlalchemy-163a97c6d57db09d6405124dae9b877bc9629721.tar.gz
rename "bulk" UPDATE and DELETE to not use the word "bulk"
This term confuses this feature with the lesser used "bulk insert/update" feature, and also "bulk" is not as descriptive here as only a single statement is run; there's not a large set of data passed in. For now call it UPDATE/DELETE with arbitrary WHERE clause, or ORM-enabled UPDATE/DELETE. Change-Id: I317fcda9d73d4c2dd250031a745dd3d72e4f1fc6
Diffstat (limited to 'lib/sqlalchemy/orm/query.py')
-rw-r--r--lib/sqlalchemy/orm/query.py24
1 files changed, 13 insertions, 11 deletions
diff --git a/lib/sqlalchemy/orm/query.py b/lib/sqlalchemy/orm/query.py
index df1a048f3..277dda6fb 100644
--- a/lib/sqlalchemy/orm/query.py
+++ b/lib/sqlalchemy/orm/query.py
@@ -3033,7 +3033,7 @@ class Query(
return self._from_self(col).scalar()
def delete(self, synchronize_session="evaluate"):
- r"""Perform a bulk delete query.
+ r"""Perform a DELETE with an arbitrary WHERE clause.
Deletes rows matched by this query from the database.
@@ -3047,20 +3047,21 @@ class Query(
.. warning::
- See the section :ref:`bulk_update_delete` for important caveats
- and warnings, including limitations when using bulk UPDATE
+ See the section :ref:`orm_expression_update_delete` for important
+ caveats and warnings, including limitations when using bulk UPDATE
and DELETE with mapper inheritance configurations.
:param synchronize_session: chooses the strategy to update the
attributes on objects in the session. See the section
- :ref:`bulk_update_delete` for a discussion of these strategies.
+ :ref:`orm_expression_update_delete` for a discussion of these
+ strategies.
:return: the count of rows matched as returned by the database's
"row count" feature.
.. seealso::
- :ref:`bulk_update_delete`
+ :ref:`orm_expression_update_delete`
"""
@@ -3087,7 +3088,7 @@ class Query(
return result.rowcount
def update(self, values, synchronize_session="evaluate", update_args=None):
- r"""Perform a bulk update query.
+ r"""Perform an UPDATE with an arbitrary WHERE clause.
Updates rows matched by this query in the database.
@@ -3101,9 +3102,9 @@ class Query(
.. warning::
- See the section :ref:`bulk_update_delete` for important caveats
- and warnings, including limitations when using bulk UPDATE
- and DELETE with mapper inheritance configurations.
+ See the section :ref:`orm_expression_update_delete` for important
+ caveats and warnings, including limitations when using arbitrary
+ UPDATE and DELETE with mapper inheritance configurations.
:param values: a dictionary with attributes names, or alternatively
mapped attributes or SQL expressions, as keys, and literal
@@ -3117,7 +3118,8 @@ class Query(
:param synchronize_session: chooses the strategy to update the
attributes on objects in the session. See the section
- :ref:`bulk_update_delete` for a discussion of these strategies.
+ :ref:`orm_expression_update_delete` for a discussion of these
+ strategies.
:param update_args: Optional dictionary, if present will be passed
to the underlying :func:`_expression.update`
@@ -3132,7 +3134,7 @@ class Query(
.. seealso::
- :ref:`bulk_update_delete`
+ :ref:`orm_expression_update_delete`
"""