: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)
: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.
"""
@_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
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