update to 1.5.6 version

add CQCommand filter
add ZM_DEFAULT_FETCH_MODE
This commit is contained in:
whale
2020-06-15 19:50:07 +08:00
parent c654cf40d5
commit cebc6fb310
8 changed files with 29 additions and 11 deletions

View File

@@ -90,10 +90,11 @@ class DB
/**
* @param string $line
* @param array $params
* @param int $fetch_mode
* @return mixed
* @throws DbException
*/
public static function rawQuery(string $line, $params = []) {
public static function rawQuery(string $line, $params = [], $fetch_mode = ZM_DEFAULT_FETCH_MODE) {
if (ZMBuf::get("sql_log") === true) {
$starttime = microtime(true);
}
@@ -131,7 +132,7 @@ class DB
"] " . $line . " " . json_encode($params, JSON_UNESCAPED_UNICODE) . "\n";
Coroutine::writeFile(CRASH_DIR . "sql.log", $log, FILE_APPEND);
}
return $ps->fetchAll();
return $ps->fetchAll($fetch_mode);
}
} catch (DbException $e) {
if (ZMBuf::get("sql_log") === true) {