Group BY
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 36
- Forks
- 26
- PR merge metrics
- No merged PRs in 30d
Description
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
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading Editor.php, especially the _get($id = null, $http = null) method and the existing _ssp_query($query, $http) call. Confirm how query grouping is represented there, then verify that groupBy can set and retrieve the grouping and that generated queries apply it before the id condition.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend, database
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 50/100