src/Titon/Db/Driver/Dialect/AbstractDialect.php
public function formatSubQuery(SubQuery $query) {

        // Reset the alias since statement would have double aliasing
        $alias = $query->getAlias();
        $query->asAlias(null);

        // @codeCoverageIgnoreStart
        if (method_exists($this, 'buildSelect')) {
            $output = sprintf($this->getClause(self::SUB_QUERY), trim($this->buildSelect($query), ';'));
        } else {
            throw new UnsupportedQueryStatementException('Sub-query building requires a buildSelect() method');
        }
        // @codeCoverageIgnoreEnd

        if ($alias) {
            $output = sprintf($this->getClause(self::AS_ALIAS), $output, $this->quote($alias));
        }

        if ($filter = $query->getFilter()) {
            $output = $this->getKeyword($filter) . ' ' . $output;
        }

        return $output;
    }
public function formatSubQuery(SubQuery $query) {

        // Reset the alias since statement would have double aliasing
        $alias = $query->getAlias();
        $query->asAlias(null);

        // @codeCoverageIgnoreStart
        if (method_exists($this, 'buildSelect')) {
            $output = sprintf($this->getClause(self::SUB_QUERY), trim($this->buildSelect($query), ';'));
        } else {
            throw new UnsupportedQueryStatementException('Sub-query building requires a buildSelect() method');
        }
        // @codeCoverageIgnoreEnd

        if ($alias) {
            $output = sprintf($this->getClause(self::AS_ALIAS), $output, $this->quote($alias));
        }

        if ($filter = $query->getFilter()) {
            $output = $this->getKeyword($filter) . ' ' . $output;
        }

        return $output;
    }
public function formatSubQuery ( SubQuery $ query ) { // Reset the alias since statement would have double aliasing $ alias = $ query -> getAlias ( ) ; $ query -> asAlias ( null ) ; // @codeCoverageIgnoreStart if ( method_exists ( $ this , 'buildSelect' ) ) { $ output = sprintf ( $ this -> getClause ( self :: SUB_QUERY ) , trim ( $ this -> buildSelect ( $ query ) , ';' ) ) ; } else { throw new UnsupportedQueryStatementException ( 'Sub-query building requires a buildSelect() method' ) ; } // @codeCoverageIgnoreEnd if ( $ alias ) { $ output = sprintf ( $ this -> getClause ( self :: AS_ALIAS ) , $ output , $ this -> quote ( $ alias ) ) ; } if ( $ filter = $ query -> getFilter ( ) ) { $ output = $ this -> getKeyword ( $ filter ) . ' ' . $ output ; } return $ output ; }
Format a sub-query.

@param \Titon\Db\Query\SubQuery $query
@return string
@throws \Titon\Db\Exception\UnsupportedQueryStatementException
Format a sub - query .