File tree Expand file tree Collapse file tree 2 files changed +34
-0
lines changed Expand file tree Collapse file tree 2 files changed +34
-0
lines changed Original file line number Diff line number Diff line change @@ -36,6 +36,7 @@ Behavior Changes
36
36
- The default value for ``valueSeparator `` in ``Table::findList() `` is now
37
37
a single space instead of ``; ``.
38
38
- ``ErrorLogger `` uses ``Psr\Log\LogTrait `` now.
39
+ - ``Database\QueryCompiler::$_orderedUnion `` was removed.
39
40
40
41
Deprecations
41
42
============
@@ -100,6 +101,11 @@ Database
100
101
functions to manipulate data as geospatial values.
101
102
- ``SelectQuery::__debugInfo() `` now includes which connection role the query
102
103
is for.
104
+ - ``SelectQuery::intersect() `` and ``SelectQuery::intersectAll() `` were added.
105
+ These methods enable queries using ``INTERSECT `` and ``INTERSECT ALL ``
106
+ conjunctions to be expressed.
107
+ - New supports features were added for ``intersect ``, ``intersect-all `` and
108
+ ``set-operations-order-by `` features.
103
109
104
110
Datasource
105
111
----------
Original file line number Diff line number Diff line change @@ -1706,6 +1706,34 @@ You can create ``UNION ALL`` queries using the ``unionAll()`` method::
1706
1706
1707
1707
$unpublished->unionAll($inReview);
1708
1708
1709
+ Intersections
1710
+ -------------
1711
+
1712
+ Intersections allow you to combine the result sets of two queries together and
1713
+ finding results with overlapping results. Intersections are created by composing
1714
+ one or more select queries together::
1715
+
1716
+ $inReview = $articles->find()
1717
+ ->where(['need_review' => true]);
1718
+
1719
+ $unpublished = $articles->find()
1720
+ ->where(['published' => false]);
1721
+
1722
+ $unpublished->intersect($inReview);
1723
+
1724
+ You can create ``INTERSECT ALL `` queries using the ``intersectAll() `` method::
1725
+
1726
+ $inReview = $articles->find()
1727
+ ->where(['need_review' => true]);
1728
+
1729
+ $unpublished = $articles->find()
1730
+ ->where(['published' => false]);
1731
+
1732
+ $unpublished->intersectAll($inReview);
1733
+
1734
+ .. versionadded :: 5.1.0
1735
+ ``intersect() `` and ``intersectAll() `` were added.
1736
+
1709
1737
Subqueries
1710
1738
----------
1711
1739
You can’t perform that action at this time.
0 commit comments