Ejemplo n.º 1
0
 /**
  * Create a SQLFunction with the expression as the argument
  *
  * @param EntityQuery $entityQuery
  * @return SqlFunction
  */
 protected function getSqlFunction(EntityQueryBuilder $entityQueryBuilder)
 {
     return new AliasedSqlValueExpression(new SqlFunction($this->getFunc(), $entityQueryBuilder->subject($this->expression)), $this->alias);
 }
Ejemplo n.º 2
0
 /**
  * Converts value expression to be appended to SELECT list
  * @param EntityQueryBuilder $builder
  * @return ISqlValueExpression
  */
 protected function getValueExpression(EntityQueryBuilder $builder)
 {
     $builder->registerIdentifier($this->alias);
     return new AliasedSqlValueExpression($builder->subject($this->expression), $this->alias);
 }