original_string: public function group($spec)
      {
          if (!is_array($spec)) {
              $spec = array($spec);
          }
  
          foreach ($spec as $val) {
              if (preg_match('/\(.*\)/', (string) $val)) {
                  $val = new Zend_Db_Expr($val);
              }
              $this->_parts[self::GROUP][] = $val;
          }
  
          return $this;
      }
code: public function group($spec)
      {
          if (!is_array($spec)) {
              $spec = array($spec);
          }
  
          foreach ($spec as $val) {
              if (preg_match('/\(.*\)/', (string) $val)) {
                  $val = new Zend_Db_Expr($val);
              }
              $this->_parts[self::GROUP][] = $val;
          }
  
          return $this;
      }
code_tokens: public function group ( $ spec ) { if ( ! is_array ( $ spec ) ) { $ spec = array ( $ spec ) ; } foreach ( $ spec as $ val ) { if ( preg_match ( '/\(.*\)/' , ( string ) $ val ) ) { $ val = new Zend_Db_Expr ( $ val ) ; } $ this -> _parts [ self :: GROUP ] [ ] = $ val ; } return $ this ; }
docstring: Adds grouping to the query.
  
  @param  array|string $spec The column(s) to group by.
  @return Zend_Db_Select This Zend_Db_Select object.
docstring_tokens: Adds grouping to the query .