Query::__sleep

public Query::__sleep() Implements the magic __sleep function to disconnect from the database. File core/lib/Drupal/Core/Database/Query/Query.php, line 82 Class Query Base class for query builders. Namespace Drupal\Core\Database\Query Code public function __sleep() { $keys = get_object_vars($this); unset($keys['connection']); return array_keys($keys); }

Query::__construct

Query::__construct(EntityTypeInterface $entity_type, $conjunction, ConfigFactoryInterface $config_factory, KeyValueFactoryInterface $key_value_factory, array $namespaces) Constructs a Query object. 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. \Drupal\Core\Config\ConfigFactoryInterface $config_factory: The

Query::__construct

public Query::__construct(EntityTypeInterface $entity_type, $conjunction, Connection $connection, array $namespaces) Constructs a query object. 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. \Drupal\Core\Database\Connection $connection: The database connection to run the query against. array $namespaces: Lis

Query::__construct

public Query::__construct(EntityTypeInterface $entity_type, $conjunction, array $namespaces, KeyValueFactoryInterface $key_value_factory) Constructs a new Query. Parameters \Drupal\Core\Entity\EntityTypeInterface $entity_type: The entity type. 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. array $namespaces: List of potential namespaces of the classes belonging to this query. \Drupal\Core\KeyValueSt

Query::__construct

public Query::__construct(Connection $connection, $options) Constructs a Query object. Parameters \Drupal\Core\Database\Connection $connection: Database connection object. array $options: Array of query options. File core/lib/Drupal/Core/Database/Query/Query.php, line 69 Class Query Base class for query builders. Namespace Drupal\Core\Database\Query Code public function __construct(Connection $connection, $options) { $this->uniqueIdentifier = uniqid('', TRUE); $this->connec

Query::__clone

public Query::__clone() Implements the magic __clone method. Reset fields and GROUP BY when cloning. Overrides QueryBase::__clone File core/lib/Drupal/Core/Entity/Query/Sql/Query.php, line 292 Class Query The SQL storage entity query class. Namespace Drupal\Core\Entity\Query\Sql Code public function __clone() { parent::__clone(); $this->sqlFields = array(); $this->sqlGroupBy = array(); }

Query::__clone

public Query::__clone() Implements the magic __clone function. File core/lib/Drupal/Core/Database/Query/Query.php, line 98 Class Query Base class for query builders. Namespace Drupal\Core\Database\Query Code public function __clone() { $this->uniqueIdentifier = uniqid('', TRUE); }

Query::uniqueIdentifier

public Query::uniqueIdentifier() Returns a unique identifier for this object. Overrides PlaceholderInterface::uniqueIdentifier File core/lib/Drupal/Core/Database/Query/Query.php, line 124 Class Query Base class for query builders. Namespace Drupal\Core\Database\Query Code public function uniqueIdentifier() { return $this->uniqueIdentifier; }

Query::result

protected Query::result() Executes the query and returns the result. Return value int|array Returns the query result as entity IDs. File core/lib/Drupal/Core/Entity/Query/Sql/Query.php, line 243 Class Query The SQL storage entity query class. Namespace Drupal\Core\Entity\Query\Sql Code protected function result() { if ($this->count) { return $this->sqlQuery->countQuery()->execute()->fetchField(); } // Return a keyed array of results. The key is either the revi

Query::prepare

protected Query::prepare() Prepares the basic query with proper metadata/tags and base fields. Return value \Drupal\Core\Entity\Query\Sql\Query Returns the called object. Throws \Drupal\Core\Entity\Query\QueryException Thrown if the base table does not exist. File core/lib/Drupal/Core/Entity/Query/Sql/Query.php, line 89 Class Query The SQL storage entity query class. Namespace Drupal\Core\Entity\Query\Sql Code protected function prepare() { if ($this->allRevisions) { if (!$b