public function consume($dsql, $tick = true)
    {
        if ($dsql === UNDEFINED) {
            return '';
        }
        if ($dsql === null) {
            return '';
        }
        if (is_object($dsql) && $dsql instanceof Field) {
            $dsql = $dsql->getExpr();
        }
        if (!is_object($dsql) || !$dsql instanceof self) {
            return $tick ? $this->bt($dsql) : $dsql;
        }
        $dsql->params = &$this->params;
        $ret = $dsql->_render();
        if ($dsql->mode === 'select') {
            $ret = '('.$ret.')';
        }
        unset($dsql->params);
        $dsql->params = array();

        return $ret;
    }
public function consume($dsql, $tick = true)
    {
        if ($dsql === UNDEFINED) {
            return '';
        }
        if ($dsql === null) {
            return '';
        }
        if (is_object($dsql) && $dsql instanceof Field) {
            $dsql = $dsql->getExpr();
        }
        if (!is_object($dsql) || !$dsql instanceof self) {
            return $tick ? $this->bt($dsql) : $dsql;
        }
        $dsql->params = &$this->params;
        $ret = $dsql->_render();
        if ($dsql->mode === 'select') {
            $ret = '('.$ret.')';
        }
        unset($dsql->params);
        $dsql->params = array();

        return $ret;
    }
public function consume ( $ dsql , $ tick = true ) { if ( $ dsql === UNDEFINED ) { return '' ; } if ( $ dsql === null ) { return '' ; } if ( is_object ( $ dsql ) && $ dsql instanceof Field ) { $ dsql = $ dsql -> getExpr ( ) ; } if ( ! is_object ( $ dsql ) || ! $ dsql instanceof self ) { return $ tick ? $ this -> bt ( $ dsql ) : $ dsql ; } $ dsql -> params = & $ this -> params ; $ ret = $ dsql -> _render ( ) ; if ( $ dsql -> mode === 'select' ) { $ ret = '(' . $ ret . ')' ; } unset ( $ dsql -> params ) ; $ dsql -> params = array ( ) ; return $ ret ; }
Recursively renders sub-query or expression, combining parameters.
If the argument is more likely to be a field, use tick=true.

@param string|Field|DB_dsql $dsql Expression
@param bool                 $tick Preferred quoted style

@return string Quoted expression
Recursively renders sub - query or expression combining parameters . If the argument is more likely to be a field use tick = true .