Select::addTag

public Select::addTag($tag) Adds a tag to a query. Tags are strings that identify a query. A query may have any number of tags. Tags are used to mark a query so that alter hooks may decide if they wish to take action. Tags should be all lower-case and contain only letters, numbers, and underscore, and start with a letter. That is, they should follow the same rules as PHP identifiers in general. Parameters $tag: The tag to add. Return value \Drupal\Core\Database\Query\AlterableInterface The ca

Select::compiled

public Select::compiled() Check whether a condition has been previously compiled. Return value TRUE if the condition has been previously compiled. Overrides QueryConditionTrait::compiled File core/lib/Drupal/Core/Database/Query/Select.php, line 251 Class Select Query builder for SELECT statements. Namespace Drupal\Core\Database\Query Code public function compiled() { if (!$this->condition->compiled() || !$this->having->compiled()) { return FALSE; } foreach ($thi

Select::countQuery

public Select::countQuery() Get the equivalent COUNT query of this query as a new query object. Return value \Drupal\Core\Database\Query\SelectInterface A new SelectQuery object with no fields or expressions besides COUNT(*). Overrides SelectInterface::countQuery File core/lib/Drupal/Core/Database/Query/Select.php, line 703 Class Select Query builder for SELECT statements. Namespace Drupal\Core\Database\Query Code public function countQuery() { $count = $this->prepareCountQuery()

Select::compile

public Select::compile(Connection $connection, PlaceholderInterface $queryPlaceholder) Compiles the saved conditions for later retrieval. This method does not return anything, but simply prepares data to be retrieved via __toString() and arguments(). Parameters $connection: The database connection for which to compile the conditionals. $queryPlaceholder: The query this condition belongs to. If not given, the current query is used. Overrides QueryConditionTrait::compile File core/lib/Drupal/Cor

Select::addJoin

public Select::addJoin($type, $table, $alias = NULL, $condition = NULL, $arguments = array()) Join against another table in the database. This method does the "hard" work of queuing up a table to be joined against. In some cases, that may include dipping into the Schema API to find the necessary fields on which to join. Parameters $type: The type of join. Typically one one of INNER, LEFT OUTER, and RIGHT OUTER. $table: The table against which to join. May be a string or another SelectQuery obj

Select::addExpression

public Select::addExpression($expression, $alias = NULL, $arguments = array()) Adds an expression to the list of "fields" to be SELECTed. An expression can be any arbitrary string that is valid SQL. That includes various functions, which may in some cases be database-dependent. This method makes no effort to correct for database-specific functions. Parameters $expression: The expression string. May contain placeholders. $alias: The alias for this expression. If not specified, one will be gener

Select::addMetaData

public Select::addMetaData($key, $object) Adds additional metadata to the query. Often, a query may need to provide additional contextual data to alter hooks. Alter hooks may then use that information to decide if and how to take action. Parameters $key: The unique identifier for this piece of metadata. Must be a string that follows the same rules as any other PHP identifier. $object: The additional data to add to the query. May be any valid PHP variable. Return value \Drupal\Core\Database\Qu

Select::addField

public Select::addField($table_alias, $field, $alias = NULL) Adds a field to the list to be SELECTed. Parameters $table_alias: The name of the table from which the field comes, as an alias. Generally you will want to use the return value of join() here to ensure that it is valid. $field: The name of the field. $alias: The alias for this field. If not specified, one will be generated automatically based on the $table_alias and $field. The alias will be checked for uniqueness, so the requested a

Select::$order

The fields by which to order this query. This is an associative array. The keys are the fields to order, and the value is the direction to order, either ASC or DESC. Type: array File core/lib/Drupal/Core/Database/Query/Select.php, line 66 Class Select Query builder for SELECT statements. Namespace Drupal\Core\Database\Query Code protected $order = array();

Select::$union

An array whose elements specify a query to UNION, and the UNION type. The 'type' key may be '', 'ALL', or 'DISTINCT' to represent a 'UNION', 'UNION ALL', or 'UNION DISTINCT' statement, respectively. All entries in this array will be applied from front to back, with the first query to union on the right of the original query, the second union to the right of the first, etc. Type: array File core/lib/Drupal/Core/Database/Query/Select.php, line 107 Class Select Query builder for SELECT statem