core/SqlCondition.php
public function getFrame()
    {
        $sqlItems = [];
        $argItems = [];
        foreach ($this->items as $item) {
            $tempSql = $item->sql;
            $tempArgs = $item->args;
            if (preg_match('@^or\s+@i', $tempSql)) {
                if (count($sqlItems) == 0) {
                    $tempSql = preg_replace('@^or\s+@i', '', $tempSql);
                }
            } else if (preg_match('@^and\s+@i', $tempSql)) {
                if (count($sqlItems) == 0) {
                    $tempSql = preg_replace('@^and\s+@i', '', $tempSql);
                }
            } else {
                if (count($sqlItems) >= 0) {
                    $tempSql = 'and ' . $tempSql;
                }
            }
            $sqlItems[] = $tempSql;
            if (is_array($tempArgs)) {
                $argItems = array_merge($argItems, $tempArgs);
            } else if ($tempArgs !== null) {
                $argItems[] = $tempArgs;
            }

        }
        return ['sql' => join(' ', $sqlItems), 'args' => $argItems, 'type' => $this->type];
    }
public function getFrame()
    {
        $sqlItems = [];
        $argItems = [];
        foreach ($this->items as $item) {
            $tempSql = $item->sql;
            $tempArgs = $item->args;
            if (preg_match('@^or\s+@i', $tempSql)) {
                if (count($sqlItems) == 0) {
                    $tempSql = preg_replace('@^or\s+@i', '', $tempSql);
                }
            } else if (preg_match('@^and\s+@i', $tempSql)) {
                if (count($sqlItems) == 0) {
                    $tempSql = preg_replace('@^and\s+@i', '', $tempSql);
                }
            } else {
                if (count($sqlItems) >= 0) {
                    $tempSql = 'and ' . $tempSql;
                }
            }
            $sqlItems[] = $tempSql;
            if (is_array($tempArgs)) {
                $argItems = array_merge($argItems, $tempArgs);
            } else if ($tempArgs !== null) {
                $argItems[] = $tempArgs;
            }

        }
        return ['sql' => join(' ', $sqlItems), 'args' => $argItems, 'type' => $this->type];
    }
获取代码帧
@return array