mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-01 20:52:48 +08:00
48 lines
1.3 KiB
PHP
48 lines
1.3 KiB
PHP
<?php
|
|
// +----------------------------------------------------------------------
|
|
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
|
|
// +----------------------------------------------------------------------
|
|
// | Copyright (c) 2006~2016 http://thinkphp.cn All rights reserved.
|
|
// +----------------------------------------------------------------------
|
|
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
|
|
// +----------------------------------------------------------------------
|
|
// | Author: liu21st <liu21st@gmail.com>
|
|
// +----------------------------------------------------------------------
|
|
|
|
namespace think\db;
|
|
|
|
interface ConnectionInterface
|
|
{
|
|
/**
|
|
* 解析pdo连接的dsn信息
|
|
* @access public
|
|
* @param array $config 连接信息
|
|
* @return string
|
|
*/
|
|
public function parseDsn($config);
|
|
|
|
/**
|
|
* 取得数据表的字段信息
|
|
* @access public
|
|
* @param string $tableName
|
|
* @return array
|
|
*/
|
|
public function getFields($tableName);
|
|
|
|
/**
|
|
* 取得数据库的表信息
|
|
* @access public
|
|
* @param string $dbName
|
|
* @return array
|
|
*/
|
|
public function getTables($dbName);
|
|
|
|
/**
|
|
* SQL性能分析
|
|
* @access protected
|
|
* @param string $sql
|
|
* @return array
|
|
*/
|
|
public function getExplain($sql);
|
|
}
|