]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
Revise / rewrite sentences that use the phrase "referred towards"
authorEric Hanchrow <eric.hanchrow@gmail.com>
Wed, 20 Sep 2023 21:02:08 +0000 (17:02 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Wed, 20 Sep 2023 22:18:29 +0000 (18:18 -0400)
Comments by Mike <mike_mp@zzzcomputing.com>:

"Referred towards" is not correct English and can be replaced directly
with "referred to".  However, this then introduces a dangling
preposition to sentences which I don't think is appropriate for this
style of writing.  So instead, use phrases like "known as",
"references", "to which X refers".

To help me identify dangling prepositions I made use of ChatGPT,
here's the log of how that transpired:
https://chat.openai.com/share/60d42ff4-c1ac-4232-893a-415c2b6d7320

Co-authored-by: Mike Bayer <mike_mp@zzzcomputing.com>
Closes: #10210
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/10210
Pull-request-sha: 5d30e79c14fe78996d332fefd4bae36d76626ff4

Change-Id: Ib6a98e5be441f5b25d3929a2efb7d873bcfef98e

36 files changed:
doc/build/changelog/changelog_11.rst
doc/build/changelog/changelog_13.rst
doc/build/changelog/changelog_14.rst
doc/build/changelog/changelog_20.rst
doc/build/changelog/migration_13.rst
doc/build/changelog/migration_20.rst
doc/build/core/connections.rst
doc/build/core/metadata.rst
doc/build/core/reflection.rst
doc/build/errors.rst
doc/build/glossary.rst
doc/build/orm/basic_relationships.rst
doc/build/orm/composites.rst
doc/build/orm/declarative_tables.rst
doc/build/orm/inheritance.rst
doc/build/orm/join_conditions.rst
doc/build/orm/mapping_styles.rst
doc/build/orm/queryguide/inheritance.rst
doc/build/orm/queryguide/select.rst
doc/build/orm/quickstart.rst
doc/build/tutorial/data_select.rst
doc/build/tutorial/dbapi_transactions.rst
doc/build/tutorial/metadata.rst
doc/build/tutorial/orm_related_objects.rst
lib/sqlalchemy/dialects/postgresql/base.py
lib/sqlalchemy/dialects/postgresql/psycopg2.py
lib/sqlalchemy/dialects/sqlite/base.py
lib/sqlalchemy/engine/base.py
lib/sqlalchemy/engine/interfaces.py
lib/sqlalchemy/ext/hybrid.py
lib/sqlalchemy/orm/mapper.py
lib/sqlalchemy/orm/relationships.py
lib/sqlalchemy/orm/util.py
lib/sqlalchemy/sql/elements.py
lib/sqlalchemy/sql/selectable.py
lib/sqlalchemy/sql/visitors.py

index fe2a02477cec97dad7f6620e3158fa4bf1a10a1e..00a17896c8f6637e111aa588c18a574042434c55 100644 (file)
         :tickets: 4124
         :versions: 1.2.0
 
-        Fixed bug where a descriptor that is elsewhere a mapped column
-        or relationship within a hierarchy based on :class:`.AbstractConcreteBase`
-        would be referred towards during a refresh operation, causing an error
-        as the attribute is not mapped as a mapper property.
-        A similar issue can arise for other attributes like the "type" column
-        added by :class:`.AbstractConcreteBase` if the class fails to include
-        "concrete=True" in its mapper, however the check here should also
-        prevent that scenario from causing a problem.
+        Fixed a bug where a descriptor, which is a mapped column or a
+        relationship elsewhere in a hierarchy based on
+        :class:`.AbstractConcreteBase`, would be referenced during a refresh
+        operation, leading to an error since the attribute is not mapped as a
+        mapper property. A similar issue can arise for other attributes
+        like the "type" column added by :class:`.AbstractConcreteBase` if the
+        class fails to include "concrete=True" in its mapper, however the check
+        here should also prevent that scenario from causing a problem.
 
     .. change:: 4006
         :tags: bug, postgresql
index 603949969210ad0ad5c0c697d066c70ce085e4f4..462511f3fdf293eba0690c5a3393d5f34e7116a8 100644 (file)
         :tags: bug, sql
         :tickets: 4730
 
-        Fixed a series of quoting issues which all stemmed from the concept of the
-        :func:`_expression.literal_column` construct, which when being "proxied" through a
-        subquery to be referred towards by a label that matches its text, the label
-        would not have quoting rules applied to it, even if the string in the
-        :class:`.Label` were set up as a :class:`.quoted_name` construct.  Not
-        applying quoting to the text of the :class:`.Label` is a bug because this
-        text is strictly a SQL identifier name and not a SQL expression, and the
-        string should not have quotes embedded into it already unlike the
-        :func:`_expression.literal_column` which it may be applied towards.   The existing
-        behavior of a non-labeled :func:`_expression.literal_column` being propagated as is on
-        the outside of a subquery is maintained in order to help with manual
-        quoting schemes, although it's not clear if valid SQL can be generated for
-        such a construct in any case.
+        Addressed a range of quoting issues originating from the use of the
+        :func:`_expression.literal_column`` construct. When this construct is
+        "proxied" through a subquery and referred to by a label matching its
+        text, the label does not have quoting rules applied to it, even if the
+        string in the :class:`.Label` was set up using a :class:`.quoted_name``
+        construct. Not applying quoting to the text of the :class:`.Label` is a
+        bug because this text is strictly a SQL identifier name and not a SQL
+        expression, and the string should not have quotes embedded into it
+        already unlike the :func:`_expression.literal_column` which it may be
+        applied towards.   The existing behavior of a non-labeled
+        :func:`_expression.literal_column` being propagated as is on the
+        outside of a subquery is maintained in order to help with manual
+        quoting schemes, although it's not clear if valid SQL can be generated
+        for such a construct in any case.
 
 .. changelog::
     :version: 1.3.4
index 8b68b04a8163bc488c8947dd5dff0ace37a927bf..709e0e97800ed738d2048a80756d234825af4409 100644 (file)
@@ -1719,11 +1719,12 @@ This document details individual issue-level changes made throughout
 
         Added new parameter
         :paramref:`.FunctionElement.table_valued.joins_implicitly`, for the
-        :meth:`.FunctionElement.table_valued` construct. This parameter indicates
-        that the given table-valued function implicitly joins to the table it
-        refers towards, essentially disabling the "from linting" feature, i.e. the
-        "cartesian product" warning, from taking effect due to the presence of this
-        parameter. May be used for functions such as ``func.json_each()``.
+        :meth:`.FunctionElement.table_valued` construct. This parameter
+        indicates that the table-valued function provided will automatically
+        perform an implicit join with the referenced table. This effectively
+        disables the 'from linting' feature, such as the 'cartesian product'
+        warning, from triggering due to the presence of this parameter.  May be
+        used for functions such as ``func.json_each()``.
 
     .. change::
         :tags: usecase, engine
@@ -3990,16 +3991,16 @@ This document details individual issue-level changes made throughout
         Fixed regression in :mod:`sqlalchemy.ext.automap` extension such that the
         use case of creating an explicit mapped class to a table that is also the
         :paramref:`_orm.relationship.secondary` element of a
-        :func:`_orm.relationship` that automap will be generating would emit the
-        "overlaps" warnings introduced in 1.4 and discussed at :ref:`error_qzyx`.
-        While generating this case from automap is still subject to the same
-        caveats that the "overlaps" warning refers towards, as automap is intended
-        for more ad-hoc use cases, the condition which produces the warning is
-        disabled when a many-to-many relationship with this particular pattern is
+        :func:`_orm.relationship` that automap will be generating would emit
+        the "overlaps" warnings introduced in 1.4 and discussed at
+        :ref:`error_qzyx`. While generating this case from automap is still
+        subject to the same caveats mentioned in the 'overlaps' warning,
+        since automap is primarily intended for more ad-hoc
+        use cases, the condition triggering the warning is disabled when a
+        many-to-many relationship with this specific pattern is
         generated.
 
 
-
     .. change::
         :tags: bug, regression, orm
         :tickets: 6678
@@ -5056,7 +5057,7 @@ This document details individual issue-level changes made throughout
 
         Fixed a critical performance issue where the traversal of a
         :func:`_sql.select` construct would traverse a repetitive product of the
-        represented FROM clauses as they were each referred towards by columns in
+        represented FROM clauses as they were each referenced by columns in
         the columns clause; for a series of nested subqueries with lots of columns
         this could cause a large delay and significant memory growth. This
         traversal is used by a wide variety of SQL and ORM functions, including by
@@ -6518,8 +6519,9 @@ This document details individual issue-level changes made throughout
         with an emphasis on its use within the :func:`_orm.with_loader_criteria`
         feature where it is most prominently used [ticket:5760]:
 
-        * fixed issue where boolean True/False values referred towards in the
-          closure variables of the lambda would cause failures [ticket:5763]
+        * Fixed the issue where boolean True/False values, which were referred
+          to in the closure variables of the lambda, would cause failures.
+          [ticket:5763]
 
         * Repaired a non-working detection for Python functions embedded in the
           lambda that produce bound values; this case is likely not supportable
@@ -6962,7 +6964,7 @@ This document details individual issue-level changes made throughout
         syntaxes supported by PostgreSQL, one of the most commonly requested
         features. Table valued functions are SQL functions that return lists of
         values or rows, and are prevalent in PostgreSQL in the area of JSON
-        functions, where the "table value" is commonly referred towards as the
+        functions, where the "table value" is commonly referred to as the
         "record" datatype. Table valued functions are also supported by Oracle and
         SQL Server.
 
index 45bf8e35112221b9c8a303d90f5970d202c00ebc..b1d7d791857e756a6ce373becd6ec43fa9b2e758 100644 (file)
 
         Fixed regression related to the implementation for the new
         "insertmanyvalues" feature where an internal ``TypeError`` would occur in
-        arrangements where a :func:`_sql.insert` would be referred towards inside
+        arrangements where a :func:`_sql.insert` would be referenced inside
         of another :func:`_sql.insert` via a CTE; made additional repairs for this
         use case for positional dialects such as asyncpg when using
         "insertmanyvalues".
index f7ce653f476c3ecbb164eac18ec235a85bca1bf7..a86e5bc089ae60bf9cb74730422613bba8ade2db 100644 (file)
@@ -150,7 +150,7 @@ so that they did not conflict with the existing columns mapped to ``B``, as
 well as it was necessary to define a new primary key.
 
 With the new approach, all of this verbosity goes away, and the additional
-columns are referred towards directly when making the relationship::
+columns are referenced directly when making the relationship::
 
     j = join(B, D, D.b_id == B.id).join(C, C.id == D.c_id)
 
@@ -452,27 +452,26 @@ AssociationProxy stores class-specific state on a per-class basis
 
 The :class:`.AssociationProxy` object makes lots of decisions based on the
 parent mapped class it is associated with.   While the
-:class:`.AssociationProxy` historically began as a relatively simple "getter",
-it became apparent early on that it also needed to make decisions about what
-kind of attribute it is referring towards, e.g. scalar or collection, mapped
-object or simple value, and similar.  To achieve this, it needs to inspect the
-mapped attribute or other descriptor or attribute that it refers towards, as
-referenced from its parent class.   However in Python descriptor mechanics, a
-descriptor only learns about its "parent" class when it is accessed in the
-context of that class, such as calling ``MyClass.some_descriptor``, which calls
-the ``__get__()`` method which passes in the class.    The
+:class:`.AssociationProxy` historically began as a relatively simple 'getter,'
+it became apparent early on that it also needed to make decisions regarding the
+kind of attribute to which it refers—such as scalar or collection, mapped
+object or simple value, and so on. To achieve this, it needs to inspect the
+mapped attribute or other referring descriptor or attribute, as referenced from
+its parent class. However in Python descriptor mechanics, a descriptor only
+learns about its "parent" class when it is accessed in the context of that
+class, such as calling ``MyClass.some_descriptor``, which calls the
+``__get__()`` method which passes in the class.    The
 :class:`.AssociationProxy` object would therefore store state that is specific
 to that class, but only once this method were called; trying to inspect this
-state ahead of time without first accessing the :class:`.AssociationProxy`
-as a descriptor would raise an error.  Additionally, it would  assume that
-the first class to be seen by ``__get__()`` would be  the only parent class it
-needed to know about.  This is despite the fact that if a particular class
-has inheriting subclasses, the association proxy is really working
-on behalf of more than one parent class even though it was not explicitly
-re-used.  While even with this shortcoming, the association proxy would
-still get pretty far with its current behavior, it still leaves shortcomings
-in some cases as well as the complex problem of determining the best "owner"
-class.
+state ahead of time without first accessing the :class:`.AssociationProxy` as a
+descriptor would raise an error.  Additionally, it would  assume that the first
+class to be seen by ``__get__()`` would be  the only parent class it needed to
+know about.  This is despite the fact that if a particular class has inheriting
+subclasses, the association proxy is really working on behalf of more than one
+parent class even though it was not explicitly re-used.  While even with this
+shortcoming, the association proxy would still get pretty far with its current
+behavior, it still leaves shortcomings in some cases as well as the complex
+problem of determining the best "owner" class.
 
 These problems are now solved in that :class:`.AssociationProxy` no longer
 modifies its own internal state when ``__get__()`` is called; instead, a new
index a83012255412e438bc632990814e1307c315726f..b7d7dbcdcb9ae41f17a4ea067329503ac57941dd 100644 (file)
@@ -1525,7 +1525,7 @@ following the table, and may include additional notes not summarized here.
           )
 
           # or
-          
+
           session.scalar(
             select(func.count(User.id))
           )
@@ -2007,7 +2007,7 @@ The new approach makes use of the :func:`_orm.aliased` construct so that the
 ORM internals don't need to guess which entities and columns should be adapted
 and in what way; in the example above, the ``ua`` and ``aa`` objects, both
 of which are :class:`_orm.AliasedClass` instances, provide to the internals
-an unambiguous marker as to where the subquery should be referred towards
+an unambiguous marker as to where the subquery should be referenced
 as well as what entity column or relationship is being considered for a given
 component of the query.
 
index 89d6df321dadfa86a7125963da293fb2a42be549..994daa8f541bd39689c459741975efa5dfb6357b 100644 (file)
@@ -107,7 +107,7 @@ to the transaction ending, the :class:`_engine.Connection` waits for the
 :meth:`_engine.Connection.execute` method to be called again, at which point
 it autobegins again.
 
-This calling style is referred towards as **commit as you go**, and is
+This calling style is known as **commit as you go**, and is
 illustrated in the example below::
 
     with engine.connect() as connection:
@@ -159,7 +159,7 @@ Begin Once
 ~~~~~~~~~~
 
 The :class:`_engine.Connection` object provides a more explicit transaction
-management style referred towards as **begin once**. In contrast to "commit as
+management style known as **begin once**. In contrast to "commit as
 you go", "begin once" allows the start point of the transaction to be
 stated explicitly,
 and allows that the transaction itself may be framed out as a context manager
@@ -2199,7 +2199,7 @@ given exceeds a fixed limit, or when the total number of bound parameters to be
 rendered in a single INSERT statement exceeds a fixed limit (the two fixed
 limits are separate), multiple INSERT statements will be invoked within the
 scope of a single :meth:`_engine.Connection.execute` call, each of which
-accommodate for a portion of the parameter dictionaries, referred towards as a
+accommodate for a portion of the parameter dictionaries, known as a
 "batch".  The number of parameter dictionaries represented within each
 "batch" is then known as the "batch size".  For example, a batch size of
 500 means that each INSERT statement emitted will INSERT at most 500 rows.
index 49669705628cf4b144972f4a434f4401177d8344..1a9338288560ae9f85fc4a62999ef09d8cdec92a 100644 (file)
@@ -301,11 +301,11 @@ Server) or even names that refer to alternate database files (SQLite ATTACH) or
 remote servers (Oracle DBLINK with synonyms).
 
 What all of the above approaches have (mostly) in common is that there's a way
-of referring to this alternate set of tables using a string name.  SQLAlchemy
+of referencing this alternate set of tables using a string name.  SQLAlchemy
 refers to this name as the **schema name**.  Within SQLAlchemy, this is nothing
 more than a string name which is associated with a :class:`_schema.Table`
 object, and is then rendered into SQL statements in a manner appropriate to the
-target database such that the table is referred towards in its remote "schema",
+target database such that the table is referenced in its remote "schema",
 whatever mechanism that is on the target database.
 
 The "schema" name may be associated directly with a :class:`_schema.Table`
@@ -328,7 +328,7 @@ schema names on a per-connection or per-statement basis.
     "database" that typically has a single "owner".  Within this database there
     can be any number of "schemas" which then contain the actual table objects.
 
-    A table within a specific schema is referred towards explicitly using the
+    A table within a specific schema is referenced explicitly using the
     syntax "<schemaname>.<tablename>".  Contrast this to an architecture such
     as that of MySQL, where there are only "databases", however SQL statements
     can refer to multiple databases at once, using the same syntax except it
index 1ff517510ec2d82308fef2ab6e6f346f4041e31e..4f3805b7ed2cdd149fb19dab66a8d5db278013ce 100644 (file)
@@ -215,7 +215,7 @@ schemas will not require that the schema name be present (while at the same time
 it's also perfectly fine if the schema name *is* present).
 
 Since most relational databases therefore have the concept of a particular
-table object which can be referred towards both in a schema-qualified way, as
+table object which can be referenced both in a schema-qualified way, as
 well as an "implicit" way where no schema is present, this presents a
 complexity for SQLAlchemy's reflection
 feature.  Reflecting a table in
index bcfb43efb75860a622abe06cbe73552146c94f4b..48fdedeace0c3b5185a260a41fb0a1db60a02ce9 100644 (file)
@@ -678,7 +678,7 @@ construct::
 The above pattern also allows an arbitrary selectable, such as
 a Core :class:`_sql.Join` or :class:`_sql.Alias` object,
 however there is no automatic adaptation of this element, meaning the
-Core element would need to be referred towards directly::
+Core element would need to be referenced directly::
 
     a1 = Address.__table__.alias()
 
@@ -783,7 +783,7 @@ Above, the SQL selects FROM the ``employee`` table, representing the
 ``Employee`` entity in the query. It then joins to a right-nested join of
 ``employee AS employee_1 JOIN manager AS manager_1``, where the ``employee``
 table is stated again, except as an anonymous alias ``employee_1``. This is the
-"automatic generation of an alias" that the warning message refers towards.
+'automatic generation of an alias' to which the warning message refers.
 
 When SQLAlchemy loads ORM rows that each contain an ``Employee`` and a
 ``Manager`` object, the ORM must adapt rows from what above is the
@@ -1196,7 +1196,7 @@ relationship X will copy column Q to column P, which conflicts with relationship
 This warning refers to the case when two or more relationships will write data
 to the same columns on flush, but the ORM does not have any means of
 coordinating these relationships together. Depending on specifics, the solution
-may be that two relationships need to be referred towards one another using
+may be that two relationships need to be referenced by one another using
 :paramref:`_orm.relationship.back_populates`, or that one or more of the
 relationships should be configured with :paramref:`_orm.relationship.viewonly`
 to prevent conflicting writes, or sometimes that the configuration is fully
index 21c8a6ebfb60d83ca8f0f2015a4f00b38fac5408..c3e49cacf618614e13c6ec9d75087429ce8bb0d9 100644 (file)
@@ -304,7 +304,7 @@ Glossary
         aggregate the single row from each INSERT execution together.
 
         To overcome this limitation, SQLAlchemy as of the 2.0 series implements
-        an alternative form of "executemany" which is referred towards as
+        an alternative form of "executemany" which is known as
         :ref:`engine_insertmanyvalues`. This feature makes use of
         ``cursor.execute()`` to invoke an INSERT statement that will proceed
         with multiple parameter sets in one round trip, thus producing the same
index 91353681ed27ea18df1a859b8f239578d7e78ab4..bbeac0858cced9e07b92a172726fc34afd926c52 100644 (file)
@@ -945,10 +945,10 @@ the :func:`_orm.relationship` construct::
     )
 
 These string names are resolved into classes in the mapper resolution stage,
-which is an internal process that occurs typically after all mappings have
-been defined and is normally triggered by the first usage of the mappings
-themselves.     The :class:`_orm.registry` object is the container in which
-these names are stored and resolved to the mapped classes they refer towards.
+which is an internal process that occurs typically after all mappings have been
+defined and is normally triggered by the first usage of the mappings
+themselves.  The :class:`_orm.registry` object is the container where these
+names are stored and resolved to the mapped classes to which they refer.
 
 In addition to the main class argument for :func:`_orm.relationship`,
 other arguments which depend upon the columns present on an as-yet
@@ -1140,7 +1140,7 @@ using either a lambda callable or string name is supported, where string
 resolution works by evaluation of given Python expression which links
 identifier names to same-named :class:`_schema.Table` objects that
 are present in the same
-:class:`_schema.MetaData` collection referred towards by the current
+:class:`_schema.MetaData` collection referenced by the current
 :class:`_orm.registry`.
 
 For the example given at :ref:`relationships_many_to_many`, if we assumed
index 4eaf7024a93440188d71e530e7f2db893bd2375d..2e625509e025d746a046f0cc6a4ccaa25441a130 100644 (file)
@@ -84,7 +84,7 @@ Working with Mapped Composite Column Types
 
 With a mapping as illustrated in the top section, we can work with the
 ``Vertex`` class, where the ``.start`` and ``.end`` attributes will
-transparently refer to the columns referred towards by the ``Point`` class, as
+transparently refer to the columns referenced by the ``Point`` class, as
 well as with instances of the ``Vertex`` class, where the ``.start`` and
 ``.end`` attributes will refer to instances of the ``Point`` class. The ``x1``,
 ``y1``, ``x2``, and ``y2`` columns are handled transparently:
index 3d032b9a62cca62381a11e191b2bebdc33ee0326..711fa11bbee57c087f8ce26fcc723461f8891613 100644 (file)
@@ -1218,7 +1218,7 @@ The above configuration is often more readable as an inline definition::
 
 A natural effect of the above style is that the ``__table__`` attribute is
 itself defined within the class definition block.   As such it may be
-immediately referred towards within subsequent attributes, such as the example
+immediately referenced within subsequent attributes, such as the example
 below which illustrates referring to the ``type`` column in a polymorphic
 mapper configuration::
 
@@ -1699,7 +1699,7 @@ Similarly::
 will map the ``Address`` class to the ``address_table`` table, including
 all columns present except ``street``, ``city``, ``state``, and ``zip``.
 
-As indicated in the two examples, columns may be referred towards either
+As indicated in the two examples, columns may be referenced either
 by string name or by referring to the :class:`_schema.Column` object
 directly.  Referring to the object directly may be useful for explicitness as
 well as to resolve ambiguities when
index 6746a0cda5644597e097d68a7e7302d1b52e93b7..fe3e06bf0f098b4dc10a30d808a407fa8a6082b4 100644 (file)
@@ -424,7 +424,7 @@ parameter indicates to :func:`_orm.mapped_column` that it should look for the
 requested :class:`_schema.Column` on the mapped :class:`.Table` for
 ``Employee`` first, and if present, maintain that existing mapping.  If not
 present, :func:`_orm.mapped_column` will map the column normally, adding it
-as one of the columns in the :class:`.Table` referred towards by the
+as one of the columns in the :class:`.Table` referenced by the
 ``Employee`` superclass.
 
 
index 09c744e40a13873bd1f63715703469ae1d1ea789..ef6d74e66761bd4811bca518c745721444ec08e5 100644 (file)
@@ -428,7 +428,7 @@ composite key to ``Writer``.   If we associate an ``Article`` with a
 particular ``Magazine``, but then associate the ``Article`` with a
 ``Writer`` that's  associated  with a *different* ``Magazine``, the ORM
 will overwrite ``Article.magazine_id`` non-deterministically, silently
-changing which magazine we refer towards; it may
+changing which magazine to which we refer; it may
 also attempt to place NULL into this column if we de-associate a
 ``Writer`` from an ``Article``.  The warning lets us know this is the case.
 
index 72d540090fa2b85a199068f641ec343be7db8118..fbe4267be7807978c123679d72b1e0f534593446 100644 (file)
@@ -89,7 +89,7 @@ the use of a declarative base which is then used in a declarative table mapping:
         nickname: Mapped[Optional[str]]
 
 Above, the :class:`_orm.DeclarativeBase` class is used to generate a new
-base class (within SQLAlchemy's documentation it's typically referred towards
+base class (within SQLAlchemy's documentation it's typically referred to
 as ``Base``, however can have any desired name) from
 which new classes to be mapped may inherit from, as above a new mapped
 class ``User`` is constructed.
index 66ac18e268dd93095ce1243bcf3d92ce394c5e9c..136bed55a600799bcfd31195373e5182a72f34a6 100644 (file)
@@ -408,7 +408,7 @@ In contrast to :func:`_orm.selectin_polymorphic` which affects only the loading
 of objects, the :func:`_orm.with_polymorphic` construct affects how the SQL
 query for a polymorphic structure is rendered, most commonly as a series of
 LEFT OUTER JOINs to each of the included sub-tables. This join structure is
-referred towards as the **polymorphic selectable**. By providing for a view of
+known as the **polymorphic selectable**. By providing for a view of
 several sub-tables at once, :func:`_orm.with_polymorphic` offers a means of
 writing a SELECT statement across several inherited classes at once with the
 ability to add filtering criteria based on individual sub-tables.
@@ -509,7 +509,7 @@ statement.
 To use this feature with a joined inheritance mapping, we typically want to
 pass two parameters, :paramref:`_orm.with_polymorphic.aliased` as well as
 :paramref:`_orm.with_polymorphic.flat`.  The :paramref:`_orm.with_polymorphic.aliased`
-parameter indicates that the polymorphic selectable should be referred towards
+parameter indicates that the polymorphic selectable should be referenced
 by an alias name that is unique to this construct.   The
 :paramref:`_orm.with_polymorphic.flat` parameter is specific to the default
 LEFT OUTER JOIN polymorphic selectable and indicates that a more optimized
index c14eb134e40108ef8febfaf0c9b7729687e1ff73..678565932dda77a0a6c4a0072599aed6bf6ad012 100644 (file)
@@ -798,7 +798,7 @@ applied to more than one :func:`_orm.aliased` construct at once, and
 used in the same :class:`.Select` construct in terms of each entity separately.
 The rendered SQL will continue to treat all such :func:`_orm.aliased`
 constructs as the same subquery, however from the ORM / Python perspective
-the different return values and object attributes can be referred towards
+the different return values and object attributes can be referenced
 by using the appropriate :func:`_orm.aliased` construct.
 
 Given for example a subquery that refers to both ``User`` and ``Address``::
@@ -1049,7 +1049,7 @@ in terms of the target :func:`_orm.relationship`.
 
 * **An object has a particular parent from a one-to-many perspective** - the
   :func:`_orm.with_parent` function produces a comparison that returns rows
-  which are referred towards by a given parent, this is essentially the
+  which are referenced by a given parent, this is essentially the
   same as using the ``==`` operator with the many-to-one side::
 
       >>> from sqlalchemy.orm import with_parent
index 9c693e027d42edaee70fdf18b5522559c47c061d..48f3673699f2ad80dae51c7602f2336a22d20547 100644 (file)
@@ -103,10 +103,10 @@ of the key.  In the above example, the ``User.id`` and ``Address.id``
 columns are marked as primary key.
 
 Taken together, the combination of a string table name as well as a list
-of column declarations is referred towards in SQLAlchemy as :term:`table metadata`.
+of column declarations is known in SQLAlchemy as :term:`table metadata`.
 Setting up table metadata using both Core and ORM approaches is introduced
 in the :ref:`unified_tutorial` at :ref:`tutorial_working_with_metadata`.
-The above mapping is an example of what's referred towards as
+The above mapping is an example of what's known as
 :ref:`Annotated Declarative Table <orm_declarative_mapped_column>`
 configuration.
 
index 03bc459a1f749ecc54b558bebe11dd6ffdcce07a..abdbb2ec54429ea62969534a4da6912fb2991361 100644 (file)
@@ -255,7 +255,7 @@ when referring to arbitrary SQL expressions in a result row by name:
 .. seealso::
 
     :ref:`tutorial_order_by_label` - the label names we create may also be
-    referred towards in the ORDER BY or GROUP BY clause of the :class:`_sql.Select`.
+    referenced in the ORDER BY or GROUP BY clause of the :class:`_sql.Select`.
 
 .. _tutorial_select_arbitrary_text:
 
@@ -682,7 +682,7 @@ Now that we are selecting from multiple tables and using joins, we quickly
 run into the case where we need to refer to the same table multiple times
 in the FROM clause of a statement.  We accomplish this using SQL **aliases**,
 which are a syntax that supplies an alternative name to a table or subquery
-from which it can be referred towards in the statement.
+from which it can be referenced in the statement.
 
 In the SQLAlchemy Expression Language, these "names" are instead represented by
 :class:`_sql.FromClause` objects known as the :class:`_sql.Alias` construct,
@@ -1163,7 +1163,7 @@ that it has fewer methods.   The :class:`_sql.CompoundSelect` produced by
 To use a :class:`_sql.CompoundSelect` as a subquery, just like :class:`_sql.Select`
 it provides a :meth:`_sql.SelectBase.subquery` method which will produce a
 :class:`_sql.Subquery` object with a :attr:`_sql.FromClause.c`
-collection that may be referred towards in an enclosing :func:`_sql.select`::
+collection that may be referenced in an enclosing :func:`_sql.select`::
 
     >>> u_subq = u.subquery()
     >>> stmt = (
@@ -1422,7 +1422,7 @@ something like :class:`_types.Integer` or :class:`_types.Numeric`, JSON
 accessors in order to work need to be using a type such as
 :class:`_types.JSON`.  Certain classes of functions return entire rows
 instead of column values, where there is a need to refer to specific columns;
-such functions are referred towards
+such functions are known
 as :ref:`table valued functions <tutorial_functions_table_valued>`.
 
 The SQL return type of the function may also be significant when executing a
@@ -1676,7 +1676,7 @@ Table-Valued Functions
 Table-valued SQL functions support a scalar representation that contains named
 sub-elements. Often used for JSON and ARRAY-oriented functions as well as
 functions like ``generate_series()``, the table-valued function is specified in
-the FROM clause, and is then referred towards as a table, or sometimes even as
+the FROM clause, and is then referenced as a table, or sometimes even as
 a column. Functions of this form are prominent within the PostgreSQL database,
 however some forms of table valued functions are also supported by SQLite,
 Oracle, and SQL Server.
index aecc3e6bae7f937e117d6a3f7503a8109911ed5f..ade14eb4fb3f833c055d8234d29f6392fa21f733 100644 (file)
@@ -137,7 +137,7 @@ connection, rather than the :meth:`_engine.Engine.connect` method.  This method
 will both manage the scope of the :class:`_engine.Connection` and also
 enclose everything inside of a transaction with COMMIT at the end, assuming
 a successful block, or ROLLBACK in case of exception raise.  This style
-may be referred towards as **begin once**:
+is known as **begin once**:
 
 .. sourcecode:: pycon+sql
 
@@ -301,7 +301,7 @@ Sending Parameters
 SQL statements are usually accompanied by data that is to be passed with the
 statement itself, as we saw in the INSERT example previously. The
 :meth:`_engine.Connection.execute` method therefore also accepts parameters,
-which are referred towards as :term:`bound parameters`.  A rudimentary example
+which are known as :term:`bound parameters`.  A rudimentary example
 might be if we wanted to limit our SELECT statement only to rows that meet a
 certain criteria, such as rows where the "y" value were greater than a certain
 value that is passed in to a function.
index 8ee87480af6ac75634ce7d80fea2d420e2dab9f5..7d6f5b31377ead487fb9536dd39fda7de3b61655 100644 (file)
@@ -335,7 +335,7 @@ SQLAlchemy :class:`_orm.DeclarativeBase` class::
     >>> class Base(DeclarativeBase):
     ...     pass
 
-Above, the ``Base`` class is what we'll refer towards as the Declarative Base.
+Above, the ``Base`` class is what we'll call the Declarative Base.
 When we make new classes that are subclasses of ``Base``, combined with
 appropriate class-level directives, they will each be established as a new
 **ORM mapped class** at class creation time, each one typically (but not
@@ -415,7 +415,7 @@ types::
     ...     def __repr__(self) -> str:
     ...         return f"Address(id={self.id!r}, email_address={self.email_address!r})"
 
-The two classes above, ``User`` and ``Address``, are now referred towards
+The two classes above, ``User`` and ``Address``, are now called
 as **ORM Mapped Classes**, and are available for use in
 ORM persistence and query operations, which will be described later.  Details
 about these classes include:
@@ -427,7 +427,7 @@ about these classes include:
   from the :attr:`_orm.DeclarativeBase.__table__` attribute.
 
 * As mentioned previously, this form
-  is referred towards as :ref:`orm_declarative_table_configuration`.  One
+  is known as :ref:`orm_declarative_table_configuration`.  One
   of several alternative declaration styles would instead have us
   build the :class:`_schema.Table` object directly, and **assign** it
   directly to :attr:`_orm.DeclarativeBase.__table__`.  This style
index e10288a21cf8ec09832a9ab68e77c9cd24c30c47..48e049dd9e815a3a571d2c06e8ccd7e92e1577b4 100644 (file)
@@ -56,7 +56,7 @@ are mapped to the ``User`` and ``Address`` classes. As the
 table, the :func:`_orm.relationship` can determine unambiguously that there is
 a :term:`one to many` relationship from the ``User`` class to the ``Address``
 class, along the ``User.addresses`` relationship; one particular row in the
-``user_account`` table may be referred towards by many rows in the ``address``
+``user_account`` table may be referenced by many rows in the ``address``
 table.
 
 All one-to-many relationships naturally correspond to a :term:`many to one`
index b5f53a1ff1b417823fbce49f19e92a2b2cb6eebc..b9fd8c8baba5274e3c8cac4c083b55a0ef77bef9 100644 (file)
@@ -303,7 +303,7 @@ Setting Alternate Search Paths on Connect
 ------------------------------------------
 
 The PostgreSQL ``search_path`` variable refers to the list of schema names
-that will be implicitly referred towards when a particular table or other
+that will be implicitly referenced when a particular table or other
 object is referenced in a SQL statement.  As detailed in the next section
 :ref:`postgresql_schema_reflection`, SQLAlchemy is generally organized around
 the concept of keeping this variable at its default value of ``public``,
@@ -1376,8 +1376,8 @@ Built-in support for rendering a ``ROW`` may be approximated using
 Table Types passed to Functions
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
-PostgreSQL supports passing a table as an argument to a function, which it
-refers towards as a "record" type. SQLAlchemy :class:`_sql.FromClause` objects
+PostgreSQL supports passing a table as an argument to a function, which is
+known as a "record" type. SQLAlchemy :class:`_sql.FromClause` objects
 such as :class:`_schema.Table` support this special form using the
 :meth:`_sql.FromClause.table_valued` method, which is comparable to the
 :meth:`_functions.FunctionElement.table_valued` method except that the collection
index 27f63ea6e153230048b5d6b8ca2c408fa30d097d..2719f3dc5e53fb7ee3b5078358c10d547429b18a 100644 (file)
@@ -254,7 +254,7 @@ equivalent to psycopg2's ``execute_values()`` handler; an overview of this
 feature and its configuration are at :ref:`engine_insertmanyvalues`.
 
 .. versionadded:: 2.0 Replaced psycopg2's ``execute_values()`` fast execution
-   helper with a native SQLAlchemy mechanism referred towards as
+   helper with a native SQLAlchemy mechanism known as
    :ref:`insertmanyvalues <engine_insertmanyvalues>`.
 
 The psycopg2 dialect retains the ability to use the psycopg2-specific
index 15c262c3e8e9d3d0f3eaee2a02e4da8c121daed5..4bce3a3d29c310b7071ca54a1329a8ba542d93ff 100644 (file)
@@ -843,7 +843,7 @@ Reflecting internal schema tables
 ----------------------------------
 
 Reflection methods that return lists of tables will omit so-called
-"SQLite internal schema object" names, which are referred towards by SQLite
+"SQLite internal schema object" names, which are considered by SQLite
 as any object name that is prefixed with ``sqlite_``.  An example of
 such an object is the ``sqlite_sequence`` table that's generated when
 the ``AUTOINCREMENT`` column parameter is used.   In order to return
index b0cd721f1cd78bc852f5381562e41c4472e081f5..72012ff9d91fdd8b8bb59fca5605def44127d7fb 100644 (file)
@@ -814,7 +814,7 @@ class Connection(ConnectionEventsTarget, inspection.Inspectable["Inspector"]):
 
         The above code is not  fundamentally any different in its behavior than
         the following code  which does not use
-        :meth:`_engine.Connection.begin`; the below style is referred towards
+        :meth:`_engine.Connection.begin`; the below style is known
         as "commit as you go" style::
 
             with engine.connect() as conn:
index c7db91000de0b9e0a0c45f230f5c9513e6d1efe7..ea1f27d0629b4f096a49d71533332377bc826f3d 100644 (file)
@@ -521,7 +521,7 @@ class ReflectedIndex(TypedDict):
     """index name"""
 
     column_names: List[Optional[str]]
-    """column names which the index refers towards.
+    """column names which the index references.
     An element of this list is ``None`` if it's an expression and is
     returned in the ``expressions`` list.
     """
index 722c9bd563ceed77421137564994225ed4fc4bfa..615f166b479a27657a562ae228ab78855671feea 100644 (file)
@@ -200,7 +200,7 @@ Using ``inplace`` to create pep-484 compliant hybrid properties
 
 In the previous section, a :class:`.hybrid_property` decorator is illustrated
 which includes two separate method-level functions being decorated, both
-to produce a single object attribute referred towards as ``Interval.radius``.
+to produce a single object attribute referenced as ``Interval.radius``.
 There are actually several different modifiers we can use for
 :class:`.hybrid_property` including :meth:`.hybrid_property.expression`,
 :meth:`.hybrid_property.setter` and :meth:`.hybrid_property.update_expression`.
index a83c70043a34f76c36e4785e47858f9a6bcacef2..c66d876e087e1a88fd5b6d244b251b7df5bcd8ab 100644 (file)
@@ -964,8 +964,8 @@ class Mapper(
     version_id_generator: Optional[Union[Literal[False], Callable[[Any], Any]]]
 
     local_table: FromClause
-    """The immediate :class:`_expression.FromClause` which this
-    :class:`_orm.Mapper` refers towards.
+    """The immediate :class:`_expression.FromClause` to which this
+    :class:`_orm.Mapper` refers.
 
     Typically is an instance of :class:`_schema.Table`, may be any
     :class:`.FromClause`.
index 191ace48dd1ab41bb4bbdcb779d419e97b3c30e1..bb5ddb872588bf9249232b9099cab9c3a05e5534 100644 (file)
@@ -1614,7 +1614,8 @@ class RelationshipProperty(
     @util.memoized_property
     def entity(self) -> _InternalEntityType[_T]:
         """Return the target mapped entity, which is an inspect() of the
-        class or aliased class that is referred towards.
+        class or aliased class that is referenced by this
+        :class:`.RelationshipProperty`.
 
         """
         self.parent._check_configure()
@@ -1990,7 +1991,7 @@ class RelationshipProperty(
                 'and not on the "many" side of a many-to-one or many-to-many '
                 "relationship.  "
                 "To force this relationship to allow a particular "
-                '"%(relatedcls)s" object to be referred towards by only '
+                '"%(relatedcls)s" object to be referenced by only '
                 'a single "%(clsname)s" object at a time via the '
                 "%(rel)s relationship, which "
                 "would allow "
index a838d8d08eb89a9d535de202390f3deff0c4eddc..e9a85b9ae66539aab13f75044334ab4525538d98 100644 (file)
@@ -936,7 +936,7 @@ class AliasedInsp(
     """the AliasedClass that refers to this AliasedInsp"""
 
     _target: Union[Type[_O], AliasedClass[_O]]
-    """the thing referred towards by the AliasedClass/AliasedInsp.
+    """the thing referenced by the AliasedClass/AliasedInsp.
 
     In the vast majority of cases, this is the mapped class.  However
     it may also be another AliasedClass (alias of alias).
index a3666c5f10cfde2e9e7fffd3da4550be24c4c5d4..90ee100aae0f13eb0c929fb7d23f977cfe5187c0 100644 (file)
@@ -4182,7 +4182,7 @@ class Over(ColumnElement[_T]):
 
     element: ColumnElement[_T]
     """The underlying expression object to which this :class:`.Over`
-    object refers towards."""
+    object refers."""
 
     range_: Optional[typing_Tuple[int, int]]
 
index a508e6fb773e0fdb8a8cf87610c033677cfdb21a..debeb8bb87707cced42539e391b7d559739f8695 100644 (file)
@@ -2434,7 +2434,7 @@ class HasCTE(roles.HasCTERole, SelectsRows):
             SELECT t.c1, t.c2
             FROM t
 
-        Above, the "anon_1" CTE is not referred towards in the SELECT
+        Above, the "anon_1" CTE is not referenced in the SELECT
         statement, however still accomplishes the task of running an INSERT
         statement.
 
index 8020181a2999f80397774786112e5979613b8986..cccebe65ba817a77eb8217d8bfe6941e12667b5c 100644 (file)
@@ -161,16 +161,17 @@ class InternalTraversal(Enum):
     the ``_traverse_internals`` collection.   Such as, the :class:`.Case`
     object defines ``_traverse_internals`` as ::
 
-        _traverse_internals = [
-            ("value", InternalTraversal.dp_clauseelement),
-            ("whens", InternalTraversal.dp_clauseelement_tuples),
-            ("else_", InternalTraversal.dp_clauseelement),
-        ]
+        class Case(ColumnElement[_T]):
+            _traverse_internals = [
+                ("value", InternalTraversal.dp_clauseelement),
+                ("whens", InternalTraversal.dp_clauseelement_tuples),
+                ("else_", InternalTraversal.dp_clauseelement),
+            ]
 
     Above, the :class:`.Case` class indicates its internal state as the
     attributes named ``value``, ``whens``, and ``else_``.    They each
     link to an :class:`.InternalTraversal` method which indicates the type
-    of datastructure referred towards.
+    of datastructure to which each attribute refers.
 
     Using the ``_traverse_internals`` structure, objects of type
     :class:`.InternalTraversible` will have the following methods automatically