function Sql::setDistinct
Same name in other branches
- 8.9.x core/modules/views/src/Plugin/views/query/Sql.php \Drupal\views\Plugin\views\query\Sql::setDistinct()
- 10 core/modules/views/src/Plugin/views/query/Sql.php \Drupal\views\Plugin\views\query\Sql::setDistinct()
- 11.x core/modules/views/src/Plugin/views/query/Sql.php \Drupal\views\Plugin\views\query\Sql::setDistinct()
Set the view to be distinct (per base field).
Parameters
bool $value: Should the view be distinct.
1 call to Sql::setDistinct()
- Sql::build in core/
modules/ views/ src/ Plugin/ views/ query/ Sql.php - Builds the necessary info to execute the query.
File
-
core/
modules/ views/ src/ Plugin/ views/ query/ Sql.php, line 243
Class
- Sql
- Views query plugin for an SQL query.
Namespace
Drupal\views\Plugin\views\queryCode
protected function setDistinct($value = TRUE) {
if (!(isset($this->noDistinct) && $value)) {
$this->distinct = $value;
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.