internal static ObjectQueryState Intersect(
            ObjectQueryState leftQuery,
            ObjectQueryState rightQuery)
        {
            Span newSpan = Span.CopyUnion(leftQuery.Span, rightQuery.Span);

            return(EntitySqlQueryBuilder.BuildSetOp(leftQuery, rightQuery, newSpan, "\r\n) INTERSECT (\r\n"));
        }
        internal static ObjectQueryState UnionAll(
            ObjectQueryState leftQuery,
            ObjectQueryState rightQuery)
        {
            Span newSpan = Span.CopyUnion(leftQuery.Span, rightQuery.Span);

            return(EntitySqlQueryBuilder.BuildSetOp(leftQuery, rightQuery, newSpan, "\r\n) UNION ALL (\r\n"));
        }
 internal static ObjectQueryState Except(
     ObjectQueryState leftQuery,
     ObjectQueryState rightQuery)
 {
     return(EntitySqlQueryBuilder.BuildSetOp(leftQuery, rightQuery, leftQuery.Span, "\r\n) EXCEPT (\r\n"));
 }