Group BY
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 50/100
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.
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
- Dominant language
- PHP
- Stars
- 36
- Forks
- 26
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
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.
More from DataTables/PHP
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
DataTables/PHP#48 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 42/100
DataTables/PHP#43 · 3 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
DataTables/PHP#38 · 2 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
DataTables/PHP#4 · 2 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
DataTables/PHP#2 · 5 comments ·
Similar issues
-
No Code Attached Yet
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
joomla/joomla-cms#48611 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Maintainers usually reply within 1 day
-
Bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Automattic/safe-publish#716 ·
Maintainers usually reply within 1 day
-
FrameworkBundle SecurityBundle
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
symfony/symfony-docs#23277 ·
Maintainers usually reply within 3 days
-
[Sync EN] hard link does not need special permissionsPossibly taken @lacatoire claimed this today. Opensync-en
Difficulty 1/5 Under an hour Newbie friendliness 90/100
Maintainers usually reply within 1 day