Sets the group paramater for the query

@param array $fields
@param boolean $rollup suport for modifier WITH ROLLUP
@return $this
165957
public function group($fields, $rollup = false)
    {
        $this->parts['group']['fields'] = $fields;
        $this->parts['group']['rollup'] = $rollup;

        return $this;
    }
1318081
public function addFields(array $fields)
    {
        $oldFields = $this->_queryBuilder->getFields() ? $this->_queryBuilder->getFields() : array();
        $newFields = array_merge($oldFields, $fields);
        $this->setFields($newFields);
        return $this;
    }
378621
public function fields($fields)
    {
        foreach ($this->resources as $resource) {
            $resource->fields($fields);
        }

        return $this;
    }
479895
public function setPostFields($fields)
    {
        //argument 1 must be a string or array
        Argument::i()->test(1, 'array', 'string');

        $this->options[CURLOPT_POSTFIELDS] = $fields;

        return $this;
    }
736548
public function GroupBy($Fields = NULL) {
      if(is_null($Fields)) {
         // Group by every item in the select that isn't a function.
         foreach($this->_Selects as $Alias => $Select) {
            if(ArrayValue('Function', $Select) == '') {
               $this->_GroupBys[] = $Select['Field'];
            }
         }
         return $this;
      }
      
      if (is_string($Fields))
         $Fields = explode(',', $Fields);

      foreach ($Fields as $Field) {
         $Field = trim($Field);

         if ($Field != '')
            $this->_GroupBys[] = $this->EscapeIdentifier($Field);
      }
      return $this;
   }
729799
public function addParamsGrouping($fields = [])
    {
        if (is_array($fields) && !empty($fields))
        {
            $this->groupingParams = array_merge(is_array($this->groupingParams) ? $this->groupingParams : [], $fields);
        }
    }
825456
public function wrap($fieldset, $group, callable $callback)
    {
        $this->form->wrap($fieldset, $group, $callback);

        return $this;
    }
1316396
public function useFields($fields)
    {
        if (is_string($fields)) {
            $fields = explode(',', $fields);
        }
        $this->fields = $fields;

        return $this;
    }
1270678
public function setFields($fields)
    {
        $this->fields = $fields; 
        $this->raw_fields = array_merge($this->raw_fields, $fields);   
        parent::setFields($fields);  
		return $this;
    }
1040742
public function group($fieldGroup)
    {
        //====================================================================//
        // Safety Checks ==> Verify a new Field Exists
        if (empty($this->new)) {
            Splash::log()->err("ErrFieldsNoNew");
        } else {
            //====================================================================//
            // Update New Field structure
            $this->new->group = Splash::trans(trim($fieldGroup));
        }

        return $this;
    }
882044
public function setOptional($fields)
    {

        if (empty($fields) === false) {

            if (is_array($fields) === true) {
                $this->optionalFields = implode(',', $fields);
            } else {
                $this->optionalFields = $fields;

            }
        }

        return $this;

    }
922834
public function setSelect(array $fields)
    {
        $this->storageSelect = [];

        foreach ($fields as $key => $field)
        {
            $this->select([$key => $field]);
        }

        return $this;
    }
1167623
public function setPostFields($fields, string $type = 'query')
    {
        if (is_array($fields)) {
            if ($type === 'json') {
                 $fields = json_encode($fields);
            } else {
                 $fields = http_build_query($fields);
            }
        }

        $this->options[CURLOPT_POSTFIELDS] = $fields;

        return $this;
    }
275818
public function setImagesField($fieldsOptions)
    {
        if (isset(static::$imageFields)) {
            static::$imageFields = array_merge($this->getDefinedUploadFields(), $fieldsOptions);
        } else {
            $this->imagesFields = $fieldsOptions;
        }

        return $this;
    }
889486
public function groupBy($fields)
    {
        if (!is_array($fields)) {
            $fields = $this->splitParts($fields);
        }

        foreach ($fields as $k => $field) {
            $fields[$k] = $this->db->quoteColumn($field);
        }

        $this->query['group'] = implode(',', $fields);

        return $this;
    }
261205
public function set($field, $value = null)
    {
        if (! is_array($field)) {
            $field = [$field => $value];
        }

        foreach ($field as $f => $v) {
            $this->update('$set', $f, $v);
        }

        return $this;
    }
751631
public function set(array $fields = null): Update
    {
        if (!\is_array($fields)) {
            throw new InvalidArgumentException('$fields has to be an array or a string');
        }

        $this->namesClass->addAliases(\array_keys($fields));
        foreach ($fields as $name => $value) {
            $this->fields[] = \sprintf(
                '%s=%s',
                $name,
                $this->escapeClass->escape($value, $this->namesClass->getAliases())
            );
        }

        return $this;
    }