public function getValue()
    {
        $sql = '('.$this->query->toSql().')';

        if ($this->alias) {
            $alias = $this->query->getGrammar()->wrapTable($this->alias);

            $sql .= ' as '.$alias;
        }

        return $sql;
    }
public function getValue()
    {
        $sql = '('.$this->query->toSql().')';

        if ($this->alias) {
            $alias = $this->query->getGrammar()->wrapTable($this->alias);

            $sql .= ' as '.$alias;
        }

        return $sql;
    }
public function getValue ( ) { $ sql = '(' . $ this -> query -> toSql ( ) . ')' ; if ( $ this -> alias ) { $ alias = $ this -> query -> getGrammar ( ) -> wrapTable ( $ this -> alias ) ; $ sql .= ' as ' . $ alias ; } return $ sql ; }
Evaluate query as string.

@return string
Evaluate query as string .