From 746458bec4c30a6324cdced85825d382bbbb4144 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Sun, 13 Jun 2021 21:08:24 -0400 Subject: document missing ColumnCollection methods add additional notes regarding the methods that are on this object. Fixes: #6629 Change-Id: I68446cb16cbfcef9af9c2998687b3b536607cf0d --- lib/sqlalchemy/dialects/sqlite/dml.py | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'lib/sqlalchemy/dialects/sqlite') diff --git a/lib/sqlalchemy/dialects/sqlite/dml.py b/lib/sqlalchemy/dialects/sqlite/dml.py index 4cb819960..a444c34c0 100644 --- a/lib/sqlalchemy/dialects/sqlite/dml.py +++ b/lib/sqlalchemy/dialects/sqlite/dml.py @@ -45,6 +45,17 @@ class Insert(StandardInsert): be inserted, known as ``excluded``. This attribute provides all columns in this row to be referenceable. + .. tip:: The :attr:`_sqlite.Insert.excluded` 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.excluded.some_column``), but special names and + dictionary method names should be accessed using indexed access, + such as ``stmt.excluded["column name"]`` or + ``stmt.excluded["values"]``. See the docstring for + :class:`_expression.ColumnCollection` for further examples. + """ return alias(self.table, name="excluded").columns -- cgit v1.2.1