src/Budkit/Datastore/Activerecord.php
final public function groupBy($by)
    {
        if (is_string($by)) {
            $by = explode(',', $by);
        }

        foreach ($by as $val) {
            $val = trim($val);

            if ($val != '') {
                $this->arrayGroupBy[] = $this->identifiers($val);

                if ($this->arrayCaching === TRUE) {
                    $this->arrayCacheGroupBy[] = $this->identifiers($val);
                    $this->arrayCacheExists[] = 'groupby';
                }
            }
        }
        return $this;
    }
final public function groupBy($by)
    {
        if (is_string($by)) {
            $by = explode(',', $by);
        }

        foreach ($by as $val) {
            $val = trim($val);

            if ($val != '') {
                $this->arrayGroupBy[] = $this->identifiers($val);

                if ($this->arrayCaching === TRUE) {
                    $this->arrayCacheGroupBy[] = $this->identifiers($val);
                    $this->arrayCacheExists[] = 'groupby';
                }
            }
        }
        return $this;
    }
final public function groupBy ( $ by ) { if ( is_string ( $ by ) ) { $ by = explode ( ',' , $ by ) ; } foreach ( $ by as $ val ) { $ val = trim ( $ val ) ; if ( $ val != '' ) { $ this -> arrayGroupBy [ ] = $ this -> identifiers ( $ val ) ; if ( $ this -> arrayCaching === TRUE ) { $ this -> arrayCacheGroupBy [ ] = $ this -> identifiers ( $ val ) ; $ this -> arrayCacheExists [ ] = 'groupby' ; } } } return $ this ; }
Adds a group by clause to a query statement

@param string $by
@return ActiveRecord
Adds a group by clause to a query statement