You are here

class QueryFactory in Zircon Profile 8

Same name in this branch
  1. 8 core/lib/Drupal/Core/Entity/Query/QueryFactory.php \Drupal\Core\Entity\Query\QueryFactory
  2. 8 core/lib/Drupal/Core/Config/Entity/Query/QueryFactory.php \Drupal\Core\Config\Entity\Query\QueryFactory
  3. 8 core/lib/Drupal/Core/Entity/KeyValueStore/Query/QueryFactory.php \Drupal\Core\Entity\KeyValueStore\Query\QueryFactory
  4. 8 core/lib/Drupal/Core/Entity/Query/Sql/QueryFactory.php \Drupal\Core\Entity\Query\Sql\QueryFactory
  5. 8 core/lib/Drupal/Core/Entity/Query/Null/QueryFactory.php \Drupal\Core\Entity\Query\Null\QueryFactory
  6. 8 core/lib/Drupal/Core/Entity/Query/Sql/pgsql/QueryFactory.php \Drupal\Core\Entity\Query\Sql\pgsql\QueryFactory
Same name and namespace in other branches
  1. 8.0 core/lib/Drupal/Core/Entity/Query/Sql/pgsql/QueryFactory.php \Drupal\Core\Entity\Query\Sql\pgsql\QueryFactory

PostgreSQL specific entity query implementation.

To add a new query implementation extending the default SQL one, add a service definition like pgsql.entity.query.sql and a factory class like this. The system will automatically find the relevant Query, QueryAggregate, Condition, ConditionAggregate, Tables classes in this namespace, in the namespace of the parent class and so on. So after creating an empty query factory class like this, it is possible to just drop in a class extending the base class in this namespace and it will be used automatically but it is optional: if a class is not extended the relevant default is used.

Hierarchy

Expanded class hierarchy of QueryFactory

See also

\Drupal\Core\Entity\Query\QueryBase::getNamespaces()

\Drupal\Core\Entity\Query\QueryBase::getClass()

1 string reference to 'QueryFactory'
core.services.yml in core/core.services.yml
core/core.services.yml
1 service uses QueryFactory
pgsql.entity.query.sql in core/core.services.yml
Drupal\Core\Entity\Query\Sql\pgsql\QueryFactory

File

core/lib/Drupal/Core/Entity/Query/Sql/pgsql/QueryFactory.php, line 28
Contains \Drupal\Core\Entity\Query\Sql\pgsql\QueryFactory.

Namespace

Drupal\Core\Entity\Query\Sql\pgsql
View source
class QueryFactory extends BaseQueryFactory {

}

Members

Namesort descending Modifiers Type Description Overrides
QueryFactory::$connection protected property The database connection to use.
QueryFactory::$namespaces protected property The namespace of this class, the parent class etc.
QueryFactory::get public function Instantiates an entity query for a given entity type. Overrides QueryFactoryInterface::get
QueryFactory::getAggregate public function Instantiates an aggregation query object for a given entity type. Overrides QueryFactoryInterface::getAggregate
QueryFactory::__construct public function Constructs a QueryFactory object.