| @@ 465-476 (lines=12) @@ | ||
| 462 | * |
|
| 463 | * @return $this This QueryBuilder instance. |
|
| 464 | */ |
|
| 465 | public function select($select = null) |
|
| 466 | { |
|
| 467 | $this->type = self::SELECT; |
|
| 468 | ||
| 469 | if (empty($select)) { |
|
| 470 | return $this; |
|
| 471 | } |
|
| 472 | ||
| 473 | $selects = is_array($select) ? $select : func_get_args(); |
|
| 474 | ||
| 475 | return $this->add('select', $selects, false); |
|
| 476 | } |
|
| 477 | ||
| 478 | /** |
|
| 479 | * Adds an item that is to be returned in the query result. |
|
| @@ 493-504 (lines=12) @@ | ||
| 490 | * |
|
| 491 | * @return $this This QueryBuilder instance. |
|
| 492 | */ |
|
| 493 | public function addSelect($select = null) |
|
| 494 | { |
|
| 495 | $this->type = self::SELECT; |
|
| 496 | ||
| 497 | if (empty($select)) { |
|
| 498 | return $this; |
|
| 499 | } |
|
| 500 | ||
| 501 | $selects = is_array($select) ? $select : func_get_args(); |
|
| 502 | ||
| 503 | return $this->add('select', $selects, true); |
|
| 504 | } |
|
| 505 | ||
| 506 | /** |
|
| 507 | * Turns the query being built into a bulk delete query that ranges over |
|
| @@ 866-875 (lines=10) @@ | ||
| 863 | * |
|
| 864 | * @return $this This QueryBuilder instance. |
|
| 865 | */ |
|
| 866 | public function groupBy($groupBy) |
|
| 867 | { |
|
| 868 | if (empty($groupBy)) { |
|
| 869 | return $this; |
|
| 870 | } |
|
| 871 | ||
| 872 | $groupBy = is_array($groupBy) ? $groupBy : func_get_args(); |
|
| 873 | ||
| 874 | return $this->add('groupBy', $groupBy, false); |
|
| 875 | } |
|
| 876 | ||
| 877 | ||
| 878 | /** |
|
| @@ 893-902 (lines=10) @@ | ||
| 890 | * |
|
| 891 | * @return $this This QueryBuilder instance. |
|
| 892 | */ |
|
| 893 | public function addGroupBy($groupBy) |
|
| 894 | { |
|
| 895 | if (empty($groupBy)) { |
|
| 896 | return $this; |
|
| 897 | } |
|
| 898 | ||
| 899 | $groupBy = is_array($groupBy) ? $groupBy : func_get_args(); |
|
| 900 | ||
| 901 | return $this->add('groupBy', $groupBy, true); |
|
| 902 | } |
|
| 903 | ||
| 904 | /** |
|
| 905 | * Sets a value for a column in an insert query. |
|