mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-07 15:12:48 +08:00
修改Builder若干处注释错误,错别字,以及修复一处因方法不存在可能导致异常的错误
This commit is contained in:
@@ -11,6 +11,7 @@
|
|||||||
|
|
||||||
namespace think\db;
|
namespace think\db;
|
||||||
|
|
||||||
|
use BadMethodCallException;
|
||||||
use PDO;
|
use PDO;
|
||||||
use think\Exception;
|
use think\Exception;
|
||||||
|
|
||||||
@@ -46,7 +47,7 @@ abstract class Builder
|
|||||||
/**
|
/**
|
||||||
* 获取当前的连接对象实例
|
* 获取当前的连接对象实例
|
||||||
* @access public
|
* @access public
|
||||||
* @return void
|
* @return Connection
|
||||||
*/
|
*/
|
||||||
public function getConnection()
|
public function getConnection()
|
||||||
{
|
{
|
||||||
@@ -56,7 +57,7 @@ abstract class Builder
|
|||||||
/**
|
/**
|
||||||
* 获取当前的Query对象实例
|
* 获取当前的Query对象实例
|
||||||
* @access public
|
* @access public
|
||||||
* @return void
|
* @return Query
|
||||||
*/
|
*/
|
||||||
public function getQuery()
|
public function getQuery()
|
||||||
{
|
{
|
||||||
@@ -80,6 +81,7 @@ abstract class Builder
|
|||||||
* @param array $data 数据
|
* @param array $data 数据
|
||||||
* @param array $options 查询参数
|
* @param array $options 查询参数
|
||||||
* @return array
|
* @return array
|
||||||
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
protected function parseData($data, $options)
|
protected function parseData($data, $options)
|
||||||
{
|
{
|
||||||
@@ -497,7 +499,7 @@ abstract class Builder
|
|||||||
/**
|
/**
|
||||||
* limit分析
|
* limit分析
|
||||||
* @access protected
|
* @access protected
|
||||||
* @param mixed $lmit
|
* @param mixed $limit
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
protected function parseLimit($limit)
|
protected function parseLimit($limit)
|
||||||
@@ -549,7 +551,11 @@ abstract class Builder
|
|||||||
foreach ($order as $key => $val) {
|
foreach ($order as $key => $val) {
|
||||||
if (is_numeric($key)) {
|
if (is_numeric($key)) {
|
||||||
if ('[rand]' == $val) {
|
if ('[rand]' == $val) {
|
||||||
$array[] = $this->parseRand();
|
if (method_exists($this, 'parseRand')) {
|
||||||
|
$array[] = $this->parseRand();
|
||||||
|
} else {
|
||||||
|
throw new BadMethodCallException('method not exists:' . get_class($this) . '-> parseRand');
|
||||||
|
}
|
||||||
} elseif (false === strpos($val, '(')) {
|
} elseif (false === strpos($val, '(')) {
|
||||||
$array[] = $this->parseKey($val, $options);
|
$array[] = $this->parseKey($val, $options);
|
||||||
} else {
|
} else {
|
||||||
@@ -654,7 +660,7 @@ abstract class Builder
|
|||||||
/**
|
/**
|
||||||
* 设置锁机制
|
* 设置锁机制
|
||||||
* @access protected
|
* @access protected
|
||||||
* @param bool $locl
|
* @param bool $lock
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
protected function parseLock($lock = false)
|
protected function parseLock($lock = false)
|
||||||
@@ -728,6 +734,7 @@ abstract class Builder
|
|||||||
* @param array $options 表达式
|
* @param array $options 表达式
|
||||||
* @param bool $replace 是否replace
|
* @param bool $replace 是否replace
|
||||||
* @return string
|
* @return string
|
||||||
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public function insertAll($dataSet, $options = [], $replace = false)
|
public function insertAll($dataSet, $options = [], $replace = false)
|
||||||
{
|
{
|
||||||
@@ -775,7 +782,7 @@ abstract class Builder
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 生成slectinsert SQL
|
* 生成select insert SQL
|
||||||
* @access public
|
* @access public
|
||||||
* @param array $fields 数据
|
* @param array $fields 数据
|
||||||
* @param string $table 数据表
|
* @param string $table 数据表
|
||||||
@@ -796,7 +803,7 @@ abstract class Builder
|
|||||||
/**
|
/**
|
||||||
* 生成update SQL
|
* 生成update SQL
|
||||||
* @access public
|
* @access public
|
||||||
* @param array $fields 数据
|
* @param array $data 数据
|
||||||
* @param array $options 表达式
|
* @param array $options 表达式
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user