function Sql::add_groupby

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::add_groupby()
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 1034
Definition of Drupal\views\Plugin\views\query\Sql.

Class

Sql
@todo.

Namespace

Drupal\views\Plugin\views\query

Code

function add_groupby($clause) {

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