mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-06 15:02:47 +08:00
修正Oracle驱动
This commit is contained in:
@@ -70,7 +70,7 @@ class Db
|
|||||||
// 解析连接参数 支持数组和字符串
|
// 解析连接参数 支持数组和字符串
|
||||||
$options = self::parseConfig($config);
|
$options = self::parseConfig($config);
|
||||||
if (empty($options['type'])) {
|
if (empty($options['type'])) {
|
||||||
throw new Exception('db type error');
|
throw new \InvalidArgumentException('db type error');
|
||||||
}
|
}
|
||||||
$class = (!empty($options['namespace']) ? $options['namespace'] : '\\think\\db\\connector\\') . ucwords($options['type']);
|
$class = (!empty($options['namespace']) ? $options['namespace'] : '\\think\\db\\connector\\') . ucwords($options['type']);
|
||||||
// 记录初始化信息
|
// 记录初始化信息
|
||||||
|
|||||||
@@ -125,10 +125,10 @@ class Oracle extends Connection
|
|||||||
/**
|
/**
|
||||||
* 取得数据库的表信息(暂时实现取得用户表信息)
|
* 取得数据库的表信息(暂时实现取得用户表信息)
|
||||||
* @access public
|
* @access public
|
||||||
|
* @param string $dbName
|
||||||
* @return array
|
* @return array
|
||||||
* @internal param string $dbName
|
|
||||||
*/
|
*/
|
||||||
public function getTables()
|
public function getTables($dbName = '')
|
||||||
{
|
{
|
||||||
$pdo = $this->linkID->query("select table_name from all_tables");
|
$pdo = $this->linkID->query("select table_name from all_tables");
|
||||||
$result = $pdo->fetchAll(PDO::FETCH_ASSOC);
|
$result = $pdo->fetchAll(PDO::FETCH_ASSOC);
|
||||||
|
|||||||
Reference in New Issue
Block a user