Compare commits

..

No commits in common. "27d5fd0b08b98f6fda3b8a6682b2dd7c7a692d82" and "47953a6165f14c342b04aed586773b7ded705bac" have entirely different histories.

View File

@ -217,6 +217,18 @@ class QueryBuilder
return $this;
}
public function groupBy(string $field, ? string $direction = null) : self
{
if ( null === $groupBy = $this->getFragment(Query\GroupBy::class) ) {
$groupBy = new Query\GroupBy();
$this->push($groupBy);
}
$groupBy->add($field, $direction);
return $this;
}
public function limit(int $value) : self
{
if ( null === $limit = $this->getFragment(Query\Limit::class) ) {
@ -253,18 +265,6 @@ class QueryBuilder
return $this;
}
public function groupBy(string $field, ? string $direction = null) : self
{
if ( null === $groupBy = $this->getFragment(Query\GroupBy::class) ) {
$groupBy = new Query\GroupBy();
$this->push($groupBy);
}
$groupBy->add($field, $direction);
return $this;
}
public function join(string $type, /*string | QueryBuilder*/ $table, $field, $value, bool $outer = false, ? string $alias = null) : self
{
$this->withJoin(...func_get_args());