public function toSQL(WhereTree $data = null)
    {
        if ($data === null) {
            $data = $this->data;
        }
        $res = '';
        foreach ($data->getChilds() as $v) {
            /* @var $v WhereTree */
            if ($v->getChilds()) {
                $res .= '(' . $this->toSQL($v) . ')';
            } elseif ($v->getValue() instanceof SQLExpressionParser) {
                $res .= $v->getValue()->toSQL();
            } else {
                $res .= ' ' . $v->getValue() . ' ';
            }
        }
        return $res . '';
    }