| @@ 1235-1246 (lines=12) @@ | ||
| 1232 | * @param bool $overwrite whether to reset the list of queries to be operated or not |
|
| 1233 | * @return $this |
|
| 1234 | */ |
|
| 1235 | public function union($query, $overwrite = false) |
|
| 1236 | { |
|
| 1237 | if ($overwrite) { |
|
| 1238 | $this->_parts['union'] = []; |
|
| 1239 | } |
|
| 1240 | $this->_parts['union'][] = [ |
|
| 1241 | 'all' => false, |
|
| 1242 | 'query' => $query |
|
| 1243 | ]; |
|
| 1244 | $this->_dirty(); |
|
| 1245 | return $this; |
|
| 1246 | } |
|
| 1247 | ||
| 1248 | /** |
|
| 1249 | * Adds a complete query to be used in conjunction with the UNION ALL operator with |
|
| @@ 1269-1280 (lines=12) @@ | ||
| 1266 | * @param bool $overwrite whether to reset the list of queries to be operated or not |
|
| 1267 | * @return $this |
|
| 1268 | */ |
|
| 1269 | public function unionAll($query, $overwrite = false) |
|
| 1270 | { |
|
| 1271 | if ($overwrite) { |
|
| 1272 | $this->_parts['union'] = []; |
|
| 1273 | } |
|
| 1274 | $this->_parts['union'][] = [ |
|
| 1275 | 'all' => true, |
|
| 1276 | 'query' => $query |
|
| 1277 | ]; |
|
| 1278 | $this->_dirty(); |
|
| 1279 | return $this; |
|
| 1280 | } |
|
| 1281 | ||
| 1282 | /** |
|
| 1283 | * Create an insert query. |
|