内核更新

This commit is contained in:
2016-07-22 14:33:13 +08:00
parent 265a9da552
commit c4ba53fd9e
10 changed files with 80 additions and 44 deletions

View File

@@ -284,7 +284,7 @@ abstract class Connection
if ($this->linkID) {
return $this->linkID->getAttribute(PDO::ATTR_DRIVER_NAME);
} else {
return basename(str_replace('\\', '/', $this->config['type']));
return $this->config['type'];
}
}

View File

@@ -359,7 +359,7 @@ class Query
static $builder = [];
$driver = $this->driver;
if (!isset($builder[$driver])) {
$class = '\\think\\db\\builder\\' . ucfirst($driver);
$class = false !== strpos($driver, '\\') ? $driver : '\\think\\db\\builder\\' . ucfirst($driver);
$builder[$driver] = new $class($this->connection);
}
// 设置当前查询对象