mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-06 23:02:48 +08:00
数据库驱动增加getExplain方法用于性能分析
This commit is contained in:
@@ -42,6 +42,7 @@ class Sqlite extends Driver
|
||||
$result = $this->query('PRAGMA table_info( ' . $tableName . ' )');
|
||||
$info = [];
|
||||
if ($result) {
|
||||
$result = array_change_key_case($result);
|
||||
foreach ($result as $key => $val) {
|
||||
$info[$val['name']] = [
|
||||
'name' => $val['name'],
|
||||
@@ -101,4 +102,15 @@ class Sqlite extends Driver
|
||||
{
|
||||
return 'RANDOM()';
|
||||
}
|
||||
|
||||
/**
|
||||
* SQL性能分析
|
||||
* @access protected
|
||||
* @param string $sql
|
||||
* @return array
|
||||
*/
|
||||
protected function getExplain($sql)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user