00001 <?php
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00025 final class CombineQuery extends StaticFactory
00026 {
00027 const UNION = 'UNION';
00028 const UNION_ALL = 'UNION ALL';
00029
00030 const INTERSECT = 'INTERSECT';
00031 const INTERSECT_ALL = 'INTERSECT ALL';
00032
00033 const EXCEPT = 'EXCEPT';
00034 const EXCEPT_ALL = 'EXCEPT ALL';
00035
00039 public static function union($left, $right)
00040 {
00041 return new QueryCombination($left, $right, self::UNION);
00042 }
00043
00047 public static function unionBlock()
00048 {
00049 $args = func_get_args();
00050
00051 return QueryChain::block($args, self::UNION);
00052 }
00053
00057 public static function unionAll($left, $right)
00058 {
00059 return new QueryCombination($left, $right, self::UNION_ALL);
00060 }
00061
00065 public static function unionAllBlock()
00066 {
00067 $args = func_get_args();
00068
00069 return QueryChain::block($args, self::UNION_ALL);
00070 }
00071
00075 public static function intersect($left, $right)
00076 {
00077 return new QueryCombination($left, $right, self::INTERSECT);
00078 }
00079
00083 public static function intersectBlock()
00084 {
00085 $args = func_get_args();
00086
00087 return QueryChain::block($args, self::INTERSECT);
00088 }
00089
00093 public static function intersectAll($left, $right)
00094 {
00095 return new QueryCombination($left, $right, self::INTERSECT_ALL);
00096 }
00097
00101 public static function intersectAllBlock()
00102 {
00103 $args = func_get_args();
00104
00105 return QueryChain::block($args, self::INTERSECT_ALL);
00106 }
00107
00111 public static function except($left, $right)
00112 {
00113 return new QueryCombination($left, $right, self::EXCEPT);
00114 }
00115
00119 public static function exceptBlock()
00120 {
00121 $args = func_get_args();
00122
00123 return QueryChain::block($args, self::EXCEPT);
00124 }
00125
00129 public static function exceptAll($left, $right)
00130 {
00131 return new QueryCombination($left, $right, self::EXCEPT_ALL);
00132 }
00133
00137 public static function exceptAllBlock()
00138 {
00139 $args = func_get_args();
00140
00141 return QueryChain::block($args, self::EXCEPT_ALL);
00142 }
00143 }
00144 ?>