public function toSQL(Parameters $params, bool $inner_clause)
    {
        $alias = $this->alias;

        $drv = $params->getDriver();
        $sql = $drv->toSQL($params, $this->expression, true);

        if (empty($this->alias))
            $this->alias = $params->generateAlias($this->expression);

        if (!empty($this->alias))
            return $sql . ' AS ' . $drv->identQuote($this->alias);

        return $sql;
    }
public function toSQL(Parameters $params, bool $inner_clause)
    {
        $alias = $this->alias;

        $drv = $params->getDriver();
        $sql = $drv->toSQL($params, $this->expression, true);

        if (empty($this->alias))
            $this->alias = $params->generateAlias($this->expression);

        if (!empty($this->alias))
            return $sql . ' AS ' . $drv->identQuote($this->alias);

        return $sql;
    }
public function toSQL ( Parameters $ params , bool $ inner_clause ) { $ alias = $ this -> alias ; $ drv = $ params -> getDriver ( ) ; $ sql = $ drv -> toSQL ( $ params , $ this -> expression , true ) ; if ( empty ( $ this -> alias ) ) $ this -> alias = $ params -> generateAlias ( $ this -> expression ) ; if ( ! empty ( $ this -> alias ) ) return $ sql . ' AS ' . $ drv -> identQuote ( $ this -> alias ) ; return $ sql ; }
Write a select return clause as SQL query syntax
@param Parameters $params The query parameters: tables and placeholder values
@return string The generated SQL
Write a select return clause as SQL query syntax