intersect method

Query<(Expr<A>, Expr<B>, Expr<C>, Expr<D>, Expr<E>, Expr<F>, Expr<G>)> intersect(
  1. Query<(Expr<A>, Expr<B>, Expr<C>, Expr<D>, Expr<E>, Expr<F>, Expr<G>)> other
)

Combine this Query with other using INTERSECT set operator.

This returns a Query containing all the rows that appear in both this Query and other, with duplicate rows appearing only once.

Implementation

Query<(Expr<A>, Expr<B>, Expr<C>, Expr<D>, Expr<E>, Expr<F>, Expr<G>)>
intersect(
  Query<(Expr<A>, Expr<B>, Expr<C>, Expr<D>, Expr<E>, Expr<F>, Expr<G>)>
  other,
) => Query._(
  _context,
  _expressions,
  (e) => IntersectClause._(_from(_expressions.toList()), other._castAs(this)),
);