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