MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / intersect

Method intersect

lib/sqlalchemy/orm/query.py:2218–2229  ·  view source on GitHub ↗

Produce an INTERSECT of this Query against one or more queries. Works the same way as :meth:`~sqlalchemy.orm.query.Query.union`. See that method for usage examples. .. seealso:: :meth:`_sql.Select.intersect` - v2 equivalent method.

(self, *q: Query[Any])

Source from the content-addressed store, hash-verified

2216 return self._set_op(expression.union_all, *q)
2217
2218 def intersect(self, *q: Query[Any]) -> Self:
2219 """Produce an INTERSECT of this Query against one or more queries.
2220
2221 Works the same way as :meth:`~sqlalchemy.orm.query.Query.union`. See
2222 that method for usage examples.
2223
2224 .. seealso::
2225
2226 :meth:`_sql.Select.intersect` - v2 equivalent method.
2227
2228 """
2229 return self._set_op(expression.intersect, *q)
2230
2231 def intersect_all(self, *q: Query[Any]) -> Self:
2232 """Produce an INTERSECT ALL of this Query against one or more queries.

Callers

nothing calls this directly

Calls 1

_set_opMethod · 0.95

Tested by

no test coverage detected