@@ 478-489 (lines=12) @@ | ||
475 | * |
|
476 | * @return $this This QueryBuilder instance. |
|
477 | */ |
|
478 | public function select($select = null) |
|
479 | { |
|
480 | $this->type = self::SELECT; |
|
481 | ||
482 | if (empty($select)) { |
|
483 | return $this; |
|
484 | } |
|
485 | ||
486 | $selects = is_array($select) ? $select : func_get_args(); |
|
487 | ||
488 | return $this->add('select', $selects); |
|
489 | } |
|
490 | ||
491 | /** |
|
492 | * Adds an item that is to be returned in the query result. |
|
@@ 506-517 (lines=12) @@ | ||
503 | * |
|
504 | * @return $this This QueryBuilder instance. |
|
505 | */ |
|
506 | public function addSelect($select = null) |
|
507 | { |
|
508 | $this->type = self::SELECT; |
|
509 | ||
510 | if (empty($select)) { |
|
511 | return $this; |
|
512 | } |
|
513 | ||
514 | $selects = is_array($select) ? $select : func_get_args(); |
|
515 | ||
516 | return $this->add('select', $selects, true); |
|
517 | } |
|
518 | ||
519 | /** |
|
520 | * Turns the query being built into a bulk delete query that ranges over |
|
@@ 879-888 (lines=10) @@ | ||
876 | * |
|
877 | * @return $this This QueryBuilder instance. |
|
878 | */ |
|
879 | public function groupBy($groupBy) |
|
880 | { |
|
881 | if (empty($groupBy)) { |
|
882 | return $this; |
|
883 | } |
|
884 | ||
885 | $groupBy = is_array($groupBy) ? $groupBy : func_get_args(); |
|
886 | ||
887 | return $this->add('groupBy', $groupBy, false); |
|
888 | } |
|
889 | ||
890 | ||
891 | /** |
|
@@ 906-915 (lines=10) @@ | ||
903 | * |
|
904 | * @return $this This QueryBuilder instance. |
|
905 | */ |
|
906 | public function addGroupBy($groupBy) |
|
907 | { |
|
908 | if (empty($groupBy)) { |
|
909 | return $this; |
|
910 | } |
|
911 | ||
912 | $groupBy = is_array($groupBy) ? $groupBy : func_get_args(); |
|
913 | ||
914 | return $this->add('groupBy', $groupBy, true); |
|
915 | } |
|
916 | ||
917 | /** |
|
918 | * Sets a value for a column in an insert query. |