Select::forUpdate

public Select::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\ConditionInte

Select::forUpdate

public Select::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\ConditionInte

Select::fields

public Select::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 rest. Pa

Select::extend

public Select::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 extender object

Select::execute

public Select::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 Select::execute File core/lib/Drupal/Core/Database/Driver/pgsql/Select.php, line 142 Class Select PostgreSQL implementation of \Drupal\Core\Database\Query\Select. Namespace Drupal\Core\Database\Driver\pgsql Code public function execute() { $this->connection->addSavepoint(); try { $resul

Select::execute

public Select::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 Query::execute File core/lib/Drupal/Core/Database/Query/Select.php, line 485 Class Select Query builder for SELECT statements. Namespace Drupal\Core\Database\Query Code public function execute() { // If validation fails, simply return NULL. // Note that validation routines in preExecute() may thr

Select::escapeLike

public Select::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/Select.php, line 414 Class Select Query builder for SELECT statements. Namespace Drupal\Core\Database\Query Code public function escapeLike($string) { return $thi

Select::escapeField

public Select::escapeField($string) Escapes a field name string. Force all field names to be strictly alphanumeric-plus-underscore. For some database drivers, it may also wrap the field name in database-specific escape characters. Parameters string $string: An unsanitized field name. Return value The sanitized field name string. Overrides SelectInterface::escapeField File core/lib/Drupal/Core/Database/Query/Select.php, line 421 Class Select Query builder for SELECT statements. Namespac

Select::distinct

public Select::distinct($distinct = TRUE) Sets this query to be DISTINCT. Parameters $distinct: TRUE to flag this query DISTINCT, FALSE to disable it. Return value \Drupal\Core\Database\Query\SelectInterface The called object. Overrides SelectInterface::distinct File core/lib/Drupal/Core/Database/Query/Select.php, line 499 Class Select Query builder for SELECT statements. Namespace Drupal\Core\Database\Query Code public function distinct($distinct = TRUE) { $this->distinct = $di

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()