MCPcopy Index your code
hub / github.com/sqlalchemy/sqlalchemy / excluded

Method excluded

lib/sqlalchemy/dialects/sqlite/dml.py:82–103  ·  view source on GitHub ↗

Provide the ``excluded`` namespace for an ON CONFLICT statement SQLite's ON CONFLICT clause allows reference to the row that would be inserted, known as ``excluded``. This attribute provides all columns in this row to be referenceable. .. tip:: The :attr:`_sqlite.

(
        self,
    )

Source from the content-addressed store, hash-verified

80
81 @util.memoized_property
82 def excluded(
83 self,
84 ) -> ReadOnlyColumnCollection[str, KeyedColumnElement[Any]]:
85 """Provide the ``excluded`` namespace for an ON CONFLICT statement
86
87 SQLite's ON CONFLICT clause allows reference to the row that would
88 be inserted, known as ``excluded``. This attribute provides
89 all columns in this row to be referenceable.
90
91 .. tip:: The :attr:`_sqlite.Insert.excluded` attribute is an instance
92 of :class:`_expression.ColumnCollection`, which provides an
93 interface the same as that of the :attr:`_schema.Table.c`
94 collection described at :ref:`metadata_tables_and_columns`.
95 With this collection, ordinary names are accessible like attributes
96 (e.g. ``stmt.excluded.some_column``), but special names and
97 dictionary method names should be accessed using indexed access,
98 such as ``stmt.excluded["column name"]`` or
99 ``stmt.excluded["values"]``. See the docstring for
100 :class:`_expression.ColumnCollection` for further examples.
101
102 """
103 return alias(self.table, name="excluded").columns
104
105 _on_conflict_exclusive = _exclusive_against(
106 "_post_values_clause",

Callers

nothing calls this directly

Calls 1

aliasFunction · 0.85

Tested by

no test coverage detected