src/Trace.php
public static function addSqlInfo($data)
    {
        if (is_array($data)) {
            $info[] = 'SQL :' . $data['sql'] . ' [' . $data['time'] . 's]';
            if (isset($data['explain'])) {
                foreach ($data['explain'] as $explain) {
                    $info[] = 'EXPLAIN :' . json_encode($explain);
                }
            }
        } else {
            $info[] = $data;
        }

        if (!self::$sqlInfo) {
            self::$sqlInfo = $info;
        } else {
            self::$sqlInfo = array_merge(self::$sqlInfo, (array) $info);
        }
    }
public static function addSqlInfo($data)
    {
        if (is_array($data)) {
            $info[] = 'SQL :' . $data['sql'] . ' [' . $data['time'] . 's]';
            if (isset($data['explain'])) {
                foreach ($data['explain'] as $explain) {
                    $info[] = 'EXPLAIN :' . json_encode($explain);
                }
            }
        } else {
            $info[] = $data;
        }

        if (!self::$sqlInfo) {
            self::$sqlInfo = $info;
        } else {
            self::$sqlInfo = array_merge(self::$sqlInfo, (array) $info);
        }
    }
增加sql执行信息记录