]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
Repair documentation issues
authorMike Bayer <mike_mp@zzzcomputing.com>
Wed, 9 Sep 2020 14:24:15 +0000 (10:24 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Wed, 9 Sep 2020 15:01:01 +0000 (11:01 -0400)
Fixes some remaining issues detailed at #5428.

Fixes: #5428
Change-Id: I942a64411766fc82f30791eee570747a218af77d

doc/build/changelog/unreleased_13/5539.rst
doc/build/orm/session_transaction.rst
lib/sqlalchemy/sql/ddl.py
lib/sqlalchemy/sql/selectable.py

index ee3fb134c8ca520d688af868196be2295755a5f4..4010fca1f7a5bca6ad24de6b463b2a110bb7b0a2 100644 (file)
@@ -2,9 +2,9 @@
     :tags: change, mysql
     :tickets: 5539
 
-       Add new MySQL reserved words: `cube`, `lateral`.
+    Add new MySQL reserved words: `cube`, `lateral`.
 
-       Reference https://dev.mysql.com/doc/refman/8.0/en/keywords.html :
+    Reference https://dev.mysql.com/doc/refman/8.0/en/keywords.html :
 
-       * CUBE (R); became reserved in 8.0.1
-       * LATERAL (R); added in 8.0.14 (reserved)
+    * CUBE (R); became reserved in 8.0.1
+    * LATERAL (R); added in 8.0.14 (reserved)
index 4ab42399a6b9023ef3a2bc1f86bfbccc00caf74f..0e5740b1e6d1bac13ddd7a06913936f2ab08252a 100644 (file)
@@ -653,7 +653,7 @@ entire database interaction is rolled back.
 
 .. versionchanged:: 1.4  This section introduces a new version of the
    "join into an external transaction" recipe that will work equally well
-   for both :term:`2.0 style` and :term:`1.x style`engines and sessions.
+   for both :term:`2.0 style` and :term:`1.x style` engines and sessions.
    The recipe here from previous versions such as 1.3 will also continue to
    work for 1.x engines and sessions.
 
index 3c23b50ca8a464d89ec35ece79bd672e9365fd15..67c11f6c767852f0af3b8325960d2681988f1879 100644 (file)
@@ -94,9 +94,11 @@ class DDLElement(roles.DDLRole, Executable, _DDLCompiles):
 
         :param target:
           Optional, defaults to None.  The target :class:`_schema.SchemaItem`
-          for the execute call.  Will be passed to the ``on`` callable if any,
-          and may also provide string expansion data for the statement.
-          See ``execute_at`` for more information.
+          for the execute call.   This is equivalent to passing the
+          :class:`_schema.SchemaItem` to the :meth:`.DDLElement.against`
+          method and then invoking :meth:`_schema.DDLElement.execute`
+          upon the resulting :class:`_schema.DDLElement` object.  See
+          :meth:`.DDLElement.against` for further detail.
 
         """
 
@@ -110,7 +112,37 @@ class DDLElement(roles.DDLRole, Executable, _DDLCompiles):
 
     @_generative
     def against(self, target):
-        """Return a copy of this DDL against a specific schema item."""
+        """Return a copy of this :class:`_schema.DDLElement` which will include
+        the given target.
+
+        This essentially applies the given item to the ``.target`` attribute
+        of the returned :class:`_schema.DDLElement` object.  This target
+        is then usable by event handlers and compilation routines in order to
+        provide services such as tokenization of a DDL string in terms of a
+        particular :class:`_schema.Table`.
+
+        When a :class:`_schema.DDLElement` object is established as an event
+        handler for the :meth:`_events.DDLEvents.before_create` or
+        :meth:`_events.DDLEvents.after_create` events, and the event
+        then occurs for a given target such as a :class:`_schema.Constraint`
+        or :class:`_schema.Table`, that target is established with a copy
+        of the :class:`_schema.DDLElement` object using this method, which
+        then proceeds to the :meth:`_schema.DDLElement.execute` method
+        in order to invoke the actual DDL instruction.
+
+        :param target: a :class:`_schema.SchemaItem` that will be the subject
+         of a DDL operation.
+
+        :return: a copy of this :class:`_schema.DDLElement` with the
+         ``.target`` attribute assigned to the given
+         :class:`_schema.SchemaItem`.
+
+        .. seealso::
+
+            :class:`_schema.DDL` - uses tokenization against the "target" when
+            processing the DDL string.
+
+        """
 
         self.target = target
 
index ea3bb0512b59970d65d5b0624565e4ee197f288c..0c808e7a7e9519bb5fc0f218ca5473a156432a59 100644 (file)
@@ -4108,9 +4108,11 @@ class Select(
           column with its parent table's (or aliases) name so that name
           conflicts between columns in different tables don't occur.
           The format of the label is ``<tablename>_<column>``.  The "c"
-          collection of the resulting :class:`_expression.Select`
-          object will use these
-          names as well for targeting column members.
+          collection of a :class:`_expression.Subquery` created
+          against this :class:`_expression.Select`
+          object, as well as the :attr:`_expression.Select.selected_columns`
+          collection of the :class:`_expression.Select` itself, will use these
+          names for targeting column members.
 
           This parameter can also be specified on an existing
           :class:`_expression.Select` object using the