Skip to content

Group BY #40

Description

@MrG0LD3

No ficheiro Editor.php, adicionar procurar as linhas

/** @var string Action name allowing for configuration */
private $_actionName = 'action';

e adicionar após

/** @var string */
private $_group_by = '';

Adicionar a função

/**
 * @param string $column
 *
 * @return ($column is null ? string[] : $this) Where condition array.
 */
public function groupBy($column) {

    if ($column === null) {
        return $this->_group_by;
    }

    $this->_group_by = $column;

    return $this;
}

Na função
private function _get($id = null, $http = null)

Procurar a linha $ssp = $this->_ssp_query($query, $http); e adicionar depois da mesma

if($this->_group_by != '')
    $query->group_by($this->_group_by);

if ($id !== null) {
    $query->where($this->pkeyToArray($id, true));
}

Pode ser sempre melhorada foi uma alteração que fiz para poder usar o group by no editor

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions