Пример #1
0
 /**
  * Overriden with an aditional exclude parameter that tells not to include this expression (by default)
  * in the select list.
  *
  * @param string $expression 
  *
  * @param string $alias 
  *
  * @param string $arguments 
  *
  * @param 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.
  * @param 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 string
  */
 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;
 }