mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-01 12:42:48 +08:00
Think\Db\Driver类 删除queryID属性
oracle驱动类 添加parseLock方法
This commit is contained in:
@@ -36,8 +36,6 @@ class Driver {
|
||||
protected $linkID = [];
|
||||
// 当前连接ID
|
||||
protected $_linkID = null;
|
||||
// 当前查询ID
|
||||
protected $queryID = null;
|
||||
// 数据库连接参数配置
|
||||
protected $config = [];
|
||||
// 数据库表达式
|
||||
@@ -255,7 +253,7 @@ class Driver {
|
||||
public function error() {
|
||||
if($this->PDOStatement) {
|
||||
$error = $this->PDOStatement->errorInfo();
|
||||
$this->error = $error[2];
|
||||
$this->error = $error[1].':'.$error[2];
|
||||
}else{
|
||||
$this->error = '';
|
||||
}
|
||||
@@ -934,7 +932,7 @@ class Driver {
|
||||
*/
|
||||
public function __destruct() {
|
||||
// 释放查询
|
||||
if ($this->queryID){
|
||||
if ($this->PDOStatement){
|
||||
$this->free();
|
||||
}
|
||||
// 关闭连接
|
||||
|
||||
@@ -157,4 +157,14 @@ class Oracle extends Driver{
|
||||
}
|
||||
return $limitStr?' WHERE '.$limitStr:'';
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置锁机制
|
||||
* @access protected
|
||||
* @return string
|
||||
*/
|
||||
protected function parseLock($lock=false) {
|
||||
if(!$lock) return '';
|
||||
return ' FOR UPDATE NOWAIT ';
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user