summaryrefslogtreecommitdiff
path: root/doc/build/tutorial/data_insert.rst
diff options
context:
space:
mode:
authorjonathan vanasco <jonathan@2xlp.com>2021-08-23 16:25:21 -0400
committerjonathan vanasco <jonathan@2xlp.com>2021-08-23 16:25:21 -0400
commit369edbbd674c2dcdc121072a20b3f9d259f9ee91 (patch)
tree92c8f145ce641e8170a48e900c54e2eac22be42d /doc/build/tutorial/data_insert.rst
parent207ec35c2e175f5fcf68e886d5e61a0678c2d6fc (diff)
downloadsqlalchemy-369edbbd674c2dcdc121072a20b3f9d259f9ee91.tar.gz
standardizing docs #6821
(redo of 2999/I5609025feee8cfdecc09b55bfbf1bd13fa2e6602) This PR is designed to bring more clarity within the docs by renaming object instances that may be consfusingly similar to class, method, and attribute names. For example, instances of the class `MetaData` are available on some objects as `.metadata` property, and had appeared within the docs as both `meta` and `metadata` which has confused some users in the past. By this PR, the docs now utilize the following naming convention: * MetaData - SQLAlchemy class * .metadata - SQLAlchemy API attributes * metadata_obj - developer instantiated metadata objects or references Detailed Changes: * standardized `meta` and `metadata` instances to `metadata_obj`. note: the docs were evenly split between 'meta' and 'metadata'. * standardized 'cursor' to 'cursor_obj' to avoid confusion with the method. * standardized a 'scalar_subquery = ' to 'scalar_subq' to avoid confusion with the method. * standardized a 'cte = ' to 'cte_obj' to avoid confusion with the method Change-Id: I79c98aee16c5fc6649289b2dd7d6dfc368222fb4
Diffstat (limited to 'doc/build/tutorial/data_insert.rst')
-rw-r--r--doc/build/tutorial/data_insert.rst4
1 files changed, 2 insertions, 2 deletions
diff --git a/doc/build/tutorial/data_insert.rst b/doc/build/tutorial/data_insert.rst
index 1fba351b8..14d7237fb 100644
--- a/doc/build/tutorial/data_insert.rst
+++ b/doc/build/tutorial/data_insert.rst
@@ -165,7 +165,7 @@ construct automatically.
.. sourcecode:: pycon+sql
>>> from sqlalchemy import select, bindparam
- >>> scalar_subquery = (
+ >>> scalar_subq = (
... select(user_table.c.id).
... where(user_table.c.name==bindparam('username')).
... scalar_subquery()
@@ -173,7 +173,7 @@ construct automatically.
>>> with engine.connect() as conn:
... result = conn.execute(
- ... insert(address_table).values(user_id=scalar_subquery),
+ ... insert(address_table).values(user_id=scalar_subq),
... [
... {"username": 'spongebob', "email_address": "spongebob@sqlalchemy.org"},
... {"username": 'sandy', "email_address": "sandy@sqlalchemy.org"},