SelectInterface::getFields

public &SelectInterface::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. File core/lib/Drupal/Core/Database/Query/SelectInterface.php, line

SelectInterface::escapeLike

public SelectInterface::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. See also \Drupal\Core\Database\Connection::escapeLike() File core/lib/Drupal/Core/Database/Query/SelectInterface.php, line 136 Class SelectInterface Interface definition for a Select Query object. Namespace Drupal\Core\Database\Query Code public function escapeLike($string);

SelectInterface::forUpdate

public SelectInterface::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\Cond

SelectInterface::execute

public SelectInterface::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. File core/lib/Drupal/Core/Database/Query/SelectInterface.php, line 520 Class SelectInterface Interface definition for a Select Query object. Namespace Drupal\Core\Database\Query Code public function execute();

SelectInterface::distinct

public SelectInterface::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. File core/lib/Drupal/Core/Database/Query/SelectInterface.php, line 175 Class SelectInterface Interface definition for a Select Query object. Namespace Drupal\Core\Database\Query Code public function distinct($distinct = TRUE);

SelectInterface::addField

public SelectInterface::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 re

SelectInterface::countQuery

public SelectInterface::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(*). File core/lib/Drupal/Core/Database/Query/SelectInterface.php, line 496 Class SelectInterface Interface definition for a Select Query object. Namespace Drupal\Core\Database\Query Code public function countQuery();

SelectInterface::escapeField

public SelectInterface::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. File core/lib/Drupal/Core/Database/Query/SelectInterface.php, line 151 Class SelectInterface Interface definition for a Select Query object. Namespace

SelectInterface::addJoin

public SelectInterface::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 Select

SelectInterface::addExpression

public SelectInterface::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