SelectExtender::getFields

public &SelectExtender::getFields() Returns a reference to the fields array for this query. Because this method returns by reference, alter hooks may edit the fields array directly to make their changes. If just adding fields, however, the use of addField() is preferred. Note that this method must be called by reference as well: $fields =& $query->getFields(); Return value A reference to the fields array structure. Overrides SelectInterface::getFields File core/lib/Drupal/Core/Data

SelectExtender::getMetaData

public SelectExtender::getMetaData($key) Retrieves a given piece of metadata. Parameters $key: The unique identifier for the piece of metadata to retrieve. Return value The previously attached metadata object, or NULL if one doesn't exist. Overrides AlterableInterface::getMetaData File core/lib/Drupal/Core/Database/Query/SelectExtender.php, line 96 Class SelectExtender The base extender class for Select queries. Namespace Drupal\Core\Database\Query Code public function getMetaData($k

SelectExtender::getGroupBy

public &SelectExtender::getGroupBy() Returns a reference to the group-by array for this query. Because this method returns by reference, alter hooks may edit the group-by array directly to make their changes. If just adding additional grouping fields, however, the use of groupBy() is preferred. Note that this method must be called by reference as well: $fields =& $query->getGroupBy(); Return value A reference to the group-by array structure. Overrides SelectInterface::getGroupBy Fi

SelectExtender::fields

public SelectExtender::fields($table_alias, array $fields = array()) Add multiple fields from the same table to be SELECTed. This method does not return the aliases set for the passed fields. In the majority of cases that is not a problem, as the alias will be the field name. However, if you do need to know the alias you can call getFields() and examine the result to determine what alias was created. Alternatively, simply use addField() for the few fields you care about and this method for the

SelectExtender::forUpdate

public SelectExtender::forUpdate($set = TRUE) Add FOR UPDATE to the query. FOR UPDATE prevents the rows retrieved by the SELECT statement from being modified or deleted by other transactions until the current transaction ends. Other transactions that attempt UPDATE, DELETE, or SELECT FOR UPDATE of these rows will be blocked until the current transaction ends. Parameters $set: IF TRUE, FOR UPDATE will be added to the query, if FALSE then it won't. Return value \Drupal\Core\Database\Query\Condi

SelectExtender::exists

public SelectExtender::exists(SelectInterface $select) Sets a condition that the specified subquery returns values. Parameters \Drupal\Core\Database\Query\SelectInterface $select: The subquery that must contain results. Return value \Drupal\Core\Database\Query\ConditionInterface The called object. Overrides ConditionInterface::exists File core/lib/Drupal/Core/Database/Query/SelectExtender.php, line 459 Class SelectExtender The base extender class for Select queries. Namespace Drupal\C

SelectExtender::extend

public SelectExtender::extend($extender_name) Enhance this object by wrapping it in an extender object. Parameters $extender_name: The fully-qualified name of the extender class, without the leading '\' (for example, Drupal\my_module\myExtenderClass). The extender name will be checked against the current database connection to allow driver-specific subclasses as well, using the same logic as the query objects themselves. Return value \Drupal\Core\Database\Query\ExtendableInterface The extende

SelectExtender::execute

public SelectExtender::execute() Runs the query against the database. Return value \Drupal\Core\Database\StatementInterface|null A prepared statement, or NULL if the query is not valid. Overrides SelectInterface::execute File core/lib/Drupal/Core/Database/Query/SelectExtender.php, line 309 Class SelectExtender The base extender class for Select queries. Namespace Drupal\Core\Database\Query Code public function execute() { // By calling preExecute() here, we force it to preprocess th

SelectExtender::escapeLike

public SelectExtender::escapeLike($string) Escapes characters that work as wildcard characters in a LIKE pattern. Parameters $string: The string to escape. Return value string The escaped string. Overrides SelectInterface::escapeLike See also \Drupal\Core\Database\Connection::escapeLike() File core/lib/Drupal/Core/Database/Query/SelectExtender.php, line 268 Class SelectExtender The base extender class for Select queries. Namespace Drupal\Core\Database\Query Code public function esca

SelectExtender::conditions

public &SelectExtender::conditions() Gets a complete list of all conditions in this conditional clause. This method returns by reference. That allows alter hooks to access the data structure directly and manipulate it before it gets compiled. The data structure that is returned is an indexed array of entries, where each entry looks like the following: array( 'field' => $field, 'value' => $value, 'operator' => $operator, ); In the special case that $operator is NULL, the $fi