SelectInterface

Interface definition for a Select Query object. Hierarchy interface \Drupal\Core\Database\Query\ConditionInterface; interface \Drupal\Core\Database\Query\AlterableInterface; interface \Drupal\Core\Database\Query\ExtendableInterface; interface \Drupal\Core\Database\Query\PlaceholderInterfaceinterface \Drupal\Core\Database\Query\SelectInterface Related topics Database abstraction layer Allow the use of different database servers using the same code base. File core/lib/Drupal/Core/Database/Q

SelectExtender::__toString

public SelectExtender::__toString() Returns a string representation of how the query will be executed in SQL. Return value string The Select Query object expressed as a string. Overrides SelectInterface::__toString File core/lib/Drupal/Core/Database/Query/SelectExtender.php, line 475 Class SelectExtender The base extender class for Select queries. Namespace Drupal\Core\Database\Query Code public function __toString() { return (string) $this->query; }

SelectExtender::__clone

public SelectExtender::__clone() Clone magic method. Select queries have dependent objects that must be deep-cloned. The connection object itself, however, should not be cloned as that would duplicate the connection itself. Overrides SelectInterface::__clone File core/lib/Drupal/Core/Database/Query/SelectExtender.php, line 482 Class SelectExtender The base extender class for Select queries. Namespace Drupal\Core\Database\Query Code public function __clone() { $this->uniqueIdentifi

SelectExtender::__call

public SelectExtender::__call($method, $args) Magic override for undefined methods. If one extender extends another extender, then methods in the inner extender will not be exposed on the outer extender. That's because we cannot know in advance what those methods will be, so we cannot provide wrapping implementations as we do above. Instead, we use this slower catch-all method to handle any additional methods. File core/lib/Drupal/Core/Database/Query/SelectExtender.php, line 499 Class Selec

SelectExtender::__construct

public SelectExtender::__construct(SelectInterface $query, Connection $connection) File core/lib/Drupal/Core/Database/Query/SelectExtender.php, line 36 Class SelectExtender The base extender class for Select queries. Namespace Drupal\Core\Database\Query Code public function __construct(SelectInterface $query, Connection $connection) { $this->uniqueIdentifier = uniqid('', TRUE); $this->query = $query; $this->connection = $connection; }

SelectExtender::range

public SelectExtender::range($start = NULL, $length = NULL) Restricts a query to a given range in the result set. If this method is called with no parameters, will remove any range directives that have been set. Parameters $start: The first record from the result set to return. If NULL, removes any range directives that are set. $length: The number of records to return from the result set. Return value \Drupal\Core\Database\Query\SelectInterface The called object. Overrides SelectInterface::r

SelectExtender::where

public SelectExtender::where($snippet, $args = array()) Adds an arbitrary WHERE clause to the query. Parameters $snippet: A portion of a WHERE clause as a prepared statement. It must use named placeholders, not ? placeholders. $args: An associative array of arguments. Return value \Drupal\Core\Database\Query\ConditionInterface The called object. Overrides ConditionInterface::where File core/lib/Drupal/Core/Database/Query/SelectExtender.php, line 125 Class SelectExtender The base extender

SelectExtender::union

public SelectExtender::union(SelectInterface $query, $type = '') Add another Select query to UNION to this one. Union queries consist of two or more queries whose results are effectively concatenated together. Queries will be UNIONed in the order they are specified, with this object's query coming first. Duplicate columns will be discarded. All forms of UNION are supported, using the second '$type' argument. Note: All queries UNIONed together must have the same field structure, in the same orde

SelectExtender::rightJoin

public SelectExtender::rightJoin($table, $alias = NULL, $condition = NULL, $arguments = array()) Right Outer Join against another table in the database. Parameters $table: The table against which to join. May be a string or another SelectQuery object. If a query object is passed, it will be used as a subselect. Unless the table name starts with the database / schema name and a dot it will be prefixed. $alias: The alias for the table. In most cases this should be the first letter of the table,

SelectExtender::uniqueIdentifier

public SelectExtender::uniqueIdentifier() Returns a unique identifier for this object. Overrides PlaceholderInterface::uniqueIdentifier File core/lib/Drupal/Core/Database/Query/SelectExtender.php, line 45 Class SelectExtender The base extender class for Select queries. Namespace Drupal\Core\Database\Query Code public function uniqueIdentifier() { return $this->uniqueIdentifier; }