@@ -342,7 +342,7 @@ public function setAlias($alias)
342
342
/**
343
343
* Create an existent CI Query Builder instance with Model features for query purpose.
344
344
*
345
- * @param bookl $withAll withAll() switch helper
345
+ * @param boolean $withAll withAll() switch helper
346
346
* @return object CI_DB_query_builder
347
347
* @example
348
348
* $posts = $this->PostModel->find()
@@ -573,6 +573,7 @@ public function update($attributes, $condition=NULL)
573
573
* Update a batch of update queries into combined query strings.
574
574
*
575
575
* @param array $dataSet [[[Attributes], [Condition]], ]
576
+ * @param boolean $withAll withAll() switch helper
576
577
* @param integer $maxLenth MySQL max_allowed_packet
577
578
* @return integer Count of sucessful query pack(s)
578
579
* @example
@@ -581,7 +582,7 @@ public function update($attributes, $condition=NULL)
581
582
* [['title'=>'A2', 'modified'=>'1'], ['id'=>2]],
582
583
* ];);
583
584
*/
584
- public function batchUpdate (Array $ dataSet , $ maxLength =4 *1024 *1024 )
585
+ public function batchUpdate (Array $ dataSet , $ withAll = false , $ maxLength =4 *1024 *1024 )
585
586
{
586
587
$ count = 0 ;
587
588
$ sqlBatch = '' ;
@@ -591,6 +592,10 @@ public function batchUpdate(Array $dataSet, $maxLength=4*1024*1024)
591
592
// Data format
592
593
list ($ attributes , $ condition ) = $ each ;
593
594
595
+ // WithAll helper
596
+ if ($ withAll ===true ) {
597
+ $ this ->withAll ();
598
+ }
594
599
// Model Condition
595
600
$ query = $ this ->_findByCondition ($ condition );
596
601
0 commit comments