public function Sql::addGroupBy

Add a simple GROUP BY clause to the query. The caller is responsible for ensuring that the fields are fully qualified and the table is properly added.

1 call to Sql::addGroupBy()
Sql::query in drupal/core/modules/views/lib/Drupal/views/Plugin/views/query/Sql.php
Generate a query and a countquery from all of the information supplied to the object.

File

drupal/core/modules/views/lib/Drupal/views/Plugin/views/query/Sql.php, line 967
Definition of Drupal\views\Plugin\views\query\Sql.

Class

Sql
@todo.

Namespace

Drupal\views\Plugin\views\query

Code

public function addGroupBy($clause) {

  // Only add it if it's not already in there.
  if (!in_array($clause, $this->groupby)) {
    $this->groupby[] = $clause;
  }
}