mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-07 15:12:48 +08:00
改进Query类的chunk方法 支持参数绑定
This commit is contained in:
@@ -1720,6 +1720,7 @@ class Query
|
|||||||
{
|
{
|
||||||
$column = $column ?: $this->getPk();
|
$column = $column ?: $this->getPk();
|
||||||
$options = $this->getOptions();
|
$options = $this->getOptions();
|
||||||
|
$bind = $this->bind;
|
||||||
$resultSet = $this->limit($count)->order($column, 'asc')->select();
|
$resultSet = $this->limit($count)->order($column, 'asc')->select();
|
||||||
|
|
||||||
while (!empty($resultSet)) {
|
while (!empty($resultSet)) {
|
||||||
@@ -1730,6 +1731,7 @@ class Query
|
|||||||
$lastId = is_array($end) ? $end[$column] : $end->$column;
|
$lastId = is_array($end) ? $end[$column] : $end->$column;
|
||||||
$resultSet = $this->options($options)
|
$resultSet = $this->options($options)
|
||||||
->limit($count)
|
->limit($count)
|
||||||
|
->bind($bind)
|
||||||
->where($column, '>', $lastId)
|
->where($column, '>', $lastId)
|
||||||
->order($column, 'asc')
|
->order($column, 'asc')
|
||||||
->select();
|
->select();
|
||||||
|
|||||||
Reference in New Issue
Block a user