diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2021-06-13 21:08:24 -0400 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2021-06-13 21:34:43 -0400 |
commit | 746458bec4c30a6324cdced85825d382bbbb4144 (patch) | |
tree | 130f64eca46013ca98ab2e435d9e51c6824fb4d3 /lib/sqlalchemy/dialects/mysql/dml.py | |
parent | c2cad1f97c51c8a2a6ad5d371ece7bcd9c7ffcf9 (diff) | |
download | sqlalchemy-746458bec4c30a6324cdced85825d382bbbb4144.tar.gz |
document missing ColumnCollection methods
add additional notes regarding the methods that are on this
object.
Fixes: #6629
Change-Id: I68446cb16cbfcef9af9c2998687b3b536607cf0d
Diffstat (limited to 'lib/sqlalchemy/dialects/mysql/dml.py')
-rw-r--r-- | lib/sqlalchemy/dialects/mysql/dml.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/sqlalchemy/dialects/mysql/dml.py b/lib/sqlalchemy/dialects/mysql/dml.py index d57a89090..e2f78783c 100644 --- a/lib/sqlalchemy/dialects/mysql/dml.py +++ b/lib/sqlalchemy/dialects/mysql/dml.py @@ -38,6 +38,17 @@ class Insert(StandardInsert): so as not to conflict with the existing :meth:`_expression.Insert.values` method. + .. tip:: The :attr:`_mysql.Insert.inserted` attribute is an instance + of :class:`_expression.ColumnCollection`, which provides an + interface the same as that of the :attr:`_schema.Table.c` + collection described at :ref:`metadata_tables_and_columns`. + With this collection, ordinary names are accessible like attributes + (e.g. ``stmt.inserted.some_column``), but special names and + dictionary method names should be accessed using indexed access, + such as ``stmt.inserted["column name"]`` or + ``stmt.inserted["values"]``. See the docstring for + :class:`_expression.ColumnCollection` for further examples. + .. seealso:: :ref:`mysql_insert_on_duplicate_key_update` - example of how |