You are here

public function PgsqlQueryFactory::getAggregate in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/workspaces/src/EntityQuery/PgsqlQueryFactory.php \Drupal\workspaces\EntityQuery\PgsqlQueryFactory::getAggregate()
  2. 10 core/modules/workspaces/src/EntityQuery/PgsqlQueryFactory.php \Drupal\workspaces\EntityQuery\PgsqlQueryFactory::getAggregate()

Instantiates an aggregation query object for a given entity type.

Parameters

\Drupal\Core\Entity\EntityTypeInterface $entity_type: The entity type definition.

string $conjunction:

  • AND: all of the conditions on the query need to match.
  • OR: at least one of the conditions on the query need to match.

Return value

\Drupal\Core\Entity\Query\QueryAggregateInterface The query object that can query the given entity type.

Throws

\Drupal\Core\Entity\Query\QueryException

Overrides QueryFactory::getAggregate

File

core/modules/workspaces/src/EntityQuery/PgsqlQueryFactory.php, line 48

Class

PgsqlQueryFactory
Workspaces PostgreSQL-specific entity query implementation.

Namespace

Drupal\workspaces\EntityQuery

Code

public function getAggregate(EntityTypeInterface $entity_type, $conjunction) {
  $class = QueryBase::getClass($this->namespaces, 'QueryAggregate');
  return new $class($entity_type, $conjunction, $this->connection, $this->namespaces, $this->workspaceManager);
}