Same name in this branch
  1. 10 core/modules/workspaces/src/EntityQuery/Query.php \Drupal\workspaces\EntityQuery\Query
  2. 10 core/lib/Drupal/Core/Database/Query/Query.php \Drupal\Core\Database\Query\Query
  3. 10 core/lib/Drupal/Core/Config/Entity/Query/Query.php \Drupal\Core\Config\Entity\Query\Query
  4. 10 core/lib/Drupal/Core/Entity/KeyValueStore/Query/Query.php \Drupal\Core\Entity\KeyValueStore\Query\Query
  5. 10 core/lib/Drupal/Core/Entity/Query/Null/Query.php \Drupal\Core\Entity\Query\Null\Query
  6. 10 core/lib/Drupal/Core/Entity/Query/Sql/Query.php \Drupal\Core\Entity\Query\Sql\Query
Same name and namespace in other branches
  1. 8.9.x core/lib/Drupal/Core/Entity/Query/Null/Query.php \Drupal\Core\Entity\Query\Null\Query
  2. 9 core/lib/Drupal/Core/Entity/Query/Null/Query.php \Drupal\Core\Entity\Query\Null\Query

Defines the entity query for configuration entities.

Hierarchy

Expanded class hierarchy of Query

2 string references to 'Query'
QueryFactory::get in core/lib/Drupal/Core/Entity/Query/Sql/QueryFactory.php
Instantiates an entity query for a given entity type.
views.data_types.schema.yml in core/modules/views/config/schema/views.data_types.schema.yml
core/modules/views/config/schema/views.data_types.schema.yml

File

core/lib/Drupal/Core/Entity/Query/Null/Query.php, line 13

Namespace

Drupal\Core\Entity\Query\Null
View source
class Query extends QueryBase implements QueryInterface, QueryAggregateInterface {

  /**
   * {@inheritdoc}
   */
  public function execute() {
    if ($this->count) {
      return 0;
    }
    return [];
  }

  /**
   * {@inheritdoc}
   */
  public function existsAggregate($field, $function, $langcode = NULL) {
    return $this->conditionAggregate
      ->exists($field, $function, $langcode);
  }

  /**
   * {@inheritdoc}
   */
  public function notExistsAggregate($field, $function, $langcode = NULL) {
    return $this->conditionAggregate
      ->notExists($field, $function, $langcode);
  }

  /**
   * {@inheritdoc}
   */
  public function conditionAggregateGroupFactory($conjunction = 'AND') {
    return new ConditionAggregate($conjunction, $this);
  }

}

Members

Namesort descending Modifiers Type Description Overrides
AlterableInterface::addMetaData public function Adds additional metadata to the query. 1
AlterableInterface::addTag public function Adds a tag to a query. 1
AlterableInterface::getMetaData public function Retrieves a given piece of metadata. 1
AlterableInterface::hasAllTags public function Determines if a given query has all specified tags. 1
AlterableInterface::hasAnyTag public function Determines if a given query has any specified tag. 1
AlterableInterface::hasTag public function Determines if a given query has a given tag. 1
Query::conditionAggregateGroupFactory public function Creates an object holding a group of conditions. Overrides QueryAggregateInterface::conditionAggregateGroupFactory
Query::execute public function Execute the query. Overrides QueryInterface::execute
Query::existsAggregate public function Queries for the existence of a field. Overrides QueryAggregateInterface::existsAggregate
Query::notExistsAggregate public function Queries for the nonexistence of a field. Overrides QueryAggregateInterface::notExistsAggregate
QueryAggregateInterface::aggregate public function Specifies a field and a function to aggregate on.
QueryAggregateInterface::conditionAggregate public function Sets a condition for an aggregated value.
QueryAggregateInterface::groupBy public function Specifies the field to group on.
QueryAggregateInterface::sortAggregate public function Sorts by an aggregated value.
QueryInterface::accessCheck public function Enables or disables access checking for this query.
QueryInterface::allRevisions public function Queries all the revisions.
QueryInterface::andConditionGroup public function Creates a new group of conditions ANDed together.
QueryInterface::condition public function Add a condition to the query or a condition group. 1
QueryInterface::count public function Makes this a count query.
QueryInterface::currentRevision public function Limits the query to only default revisions.
QueryInterface::exists public function Queries for a non-empty value on a field.
QueryInterface::getEntityTypeId public function Gets the ID of the entity type for this query.
QueryInterface::latestRevision public function Queries the latest revision.
QueryInterface::notExists public function Queries for an empty field.
QueryInterface::orConditionGroup public function Creates a new group of conditions ORed together.
QueryInterface::pager public function Enables a pager for the query.
QueryInterface::range public function Defines the range of the query.
QueryInterface::sort public function Sorts the result set by a given field.
QueryInterface::tableSort public function Enables sortable tables for this query.