mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-10 00:22:48 +08:00
增加接口类 规范驱动扩展
This commit is contained in:
@@ -26,7 +26,7 @@ class Mysql extends Connection
|
||||
* @param array $config 连接信息
|
||||
* @return string
|
||||
*/
|
||||
protected function parseDsn($config)
|
||||
public function parseDsn($config)
|
||||
{
|
||||
$dsn = 'mysql:dbname=' . $config['database'] . ';host=' . $config['hostname'];
|
||||
if (!empty($config['hostport'])) {
|
||||
@@ -91,11 +91,11 @@ class Mysql extends Connection
|
||||
|
||||
/**
|
||||
* SQL性能分析
|
||||
* @access protected
|
||||
* @access public
|
||||
* @param string $sql
|
||||
* @return array
|
||||
*/
|
||||
protected function getExplain($sql)
|
||||
public function getExplain($sql)
|
||||
{
|
||||
$pdo = $this->linkID->query("EXPLAIN " . $sql);
|
||||
$result = $pdo->fetch(\PDO::FETCH_ASSOC);
|
||||
|
||||
@@ -28,7 +28,7 @@ class Oracle extends Connection
|
||||
* @param array $config 连接信息
|
||||
* @return string
|
||||
*/
|
||||
protected function parseDsn($config)
|
||||
public function parseDsn($config)
|
||||
{
|
||||
$dsn = 'oci:dbname=';
|
||||
if (!empty($config['hostname'])) {
|
||||
@@ -139,11 +139,11 @@ class Oracle extends Connection
|
||||
|
||||
/**
|
||||
* SQL性能分析
|
||||
* @access protected
|
||||
* @access public
|
||||
* @param string $sql
|
||||
* @return array
|
||||
*/
|
||||
protected function getExplain($sql)
|
||||
public function getExplain($sql)
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ class Pgsql extends Connection
|
||||
* @param array $config 连接信息
|
||||
* @return string
|
||||
*/
|
||||
protected function parseDsn($config)
|
||||
public function parseDsn($config)
|
||||
{
|
||||
$dsn = 'pgsql:dbname=' . $config['database'] . ';host=' . $config['hostname'];
|
||||
if (!empty($config['hostport'])) {
|
||||
@@ -79,11 +79,11 @@ class Pgsql extends Connection
|
||||
|
||||
/**
|
||||
* SQL性能分析
|
||||
* @access protected
|
||||
* @access public
|
||||
* @param string $sql
|
||||
* @return array
|
||||
*/
|
||||
protected function getExplain($sql)
|
||||
public function getExplain($sql)
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ class Sqlite extends Connection
|
||||
* @param array $config 连接信息
|
||||
* @return string
|
||||
*/
|
||||
protected function parseDsn($config)
|
||||
public function parseDsn($config)
|
||||
{
|
||||
$dsn = 'sqlite:' . $config['database'];
|
||||
return $dsn;
|
||||
@@ -78,11 +78,11 @@ class Sqlite extends Connection
|
||||
|
||||
/**
|
||||
* SQL性能分析
|
||||
* @access protected
|
||||
* @access public
|
||||
* @param string $sql
|
||||
* @return array
|
||||
*/
|
||||
protected function getExplain($sql)
|
||||
public function getExplain($sql)
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ class Sqlsrv extends Connection
|
||||
* @param array $config 连接信息
|
||||
* @return string
|
||||
*/
|
||||
protected function parseDsn($config)
|
||||
public function parseDsn($config)
|
||||
{
|
||||
$dsn = 'sqlsrv:Database=' . $config['database'] . ';Server=' . $config['hostname'];
|
||||
if (!empty($config['hostport'])) {
|
||||
@@ -96,11 +96,11 @@ class Sqlsrv extends Connection
|
||||
|
||||
/**
|
||||
* SQL性能分析
|
||||
* @access protected
|
||||
* @access public
|
||||
* @param string $sql
|
||||
* @return array
|
||||
*/
|
||||
protected function getExplain($sql)
|
||||
public function getExplain($sql)
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user