MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / correlate_except

Method correlate_except

lib/sqlalchemy/sql/selectable.py:7147–7182  ·  view source on GitHub ↗

r"""Return a new :class:`_expression.ScalarSelect` which will omit the given FROM clauses from the auto-correlation process. This method is mirrored from the :meth:`_sql.Select.correlate_except` method of the underlying :class:`_sql.Select`. The method appli

(
        self,
        *fromclauses: Union[Literal[None, False], _FromClauseArgument],
    )

Source from the content-addressed store, hash-verified

7145
7146 @_generative
7147 def correlate_except(
7148 self,
7149 *fromclauses: Union[Literal[None, False], _FromClauseArgument],
7150 ) -> Self:
7151 r"""Return a new :class:`_expression.ScalarSelect`
7152 which will omit the given FROM
7153 clauses from the auto-correlation process.
7154
7155 This method is mirrored from the
7156 :meth:`_sql.Select.correlate_except` method of the underlying
7157 :class:`_sql.Select`. The method applies the
7158 :meth:_sql.Select.correlate_except` method, then returns a new
7159 :class:`_sql.ScalarSelect` against that statement.
7160
7161 .. versionadded:: 1.4 Previously, the
7162 :meth:`_sql.ScalarSelect.correlate_except`
7163 method was only available from :class:`_sql.Select`.
7164
7165 :param \*fromclauses: a list of one or more
7166 :class:`_expression.FromClause`
7167 constructs, or other compatible constructs (i.e. ORM-mapped
7168 classes) to become part of the correlate-exception collection.
7169
7170 .. seealso::
7171
7172 :meth:`_expression.ScalarSelect.correlate`
7173
7174 :ref:`tutorial_scalar_subquery` - in the 2.0 tutorial
7175
7176
7177 """
7178
7179 self.element = cast(
7180 "Select[Unpack[TupleAny]]", self.element
7181 ).correlate_except(*fromclauses)
7182 return self
7183
7184
7185class Exists(UnaryExpression[bool]):

Callers

nothing calls this directly

Calls 2

castFunction · 0.70
correlate_exceptMethod · 0.45

Tested by

no test coverage detected