public function SelectQuery_sqlsrv::addExpression in Drupal driver for SQL Server and SQL Azure 7.2
Same name and namespace in other branches
- 7.3 sqlsrv/select.inc \SelectQuery_sqlsrv::addExpression()
Overriden with an aditional exclude parameter that tells not to include this expression (by default) in the select list.
Parameters
string $expression:
string $alias:
string $arguments:
string $exclude: If set to TRUE, this expression will not be added to the select list. Useful when you want to reuse expressions in the WHERE part.
string $expand: If this expression will be expanded as a CROSS_JOIN so it can be consumed from other parts of the query. TRUE by default. It attempts to detect expressions that cannot be cross joined (aggregates).
Return value
string
Overrides SelectQuery::addExpression
2 calls to SelectQuery_sqlsrv::addExpression()
- SelectQuery_sqlsrv::orderRandom in sqlsrv/
select.inc - Override of SelectQuery::orderRandom() for SQL Server.
- SelectQuery_sqlsrv::preExecute in sqlsrv/
select.inc - Override for SelectQuery::preExecute().
File
- sqlsrv/
select.inc, line 24
Class
Code
public function addExpression($expression, $alias = NULL, $arguments = array(), $exclude = FALSE, $expand = TRUE) {
$alias = parent::addExpression($expression, $alias, $arguments);
$this->expressions[$alias]['exclude'] = $exclude;
$this->expressions[$alias]['expand'] = $expand;
return $alias;
}