Skip to content

Commit bb63be2

Browse files
committed
docs: resolve conflicts
Signed-off-by: memleakd <121398829+memleakd@users.noreply.github.com>
1 parent 5a43c4a commit bb63be2

4 files changed

Lines changed: 11 additions & 11 deletions

File tree

user_guide_src/source/models/model.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1044,7 +1044,7 @@ If you need to update or delete rows while processing them, use ``chunkById()``.
10441044
This method retrieves each chunk ordered by the model's primary key instead of using an offset,
10451045
so deleting or updating rows already processed will not cause later rows to be skipped.
10461046

1047-
.. literalinclude:: model/069.php
1047+
.. literalinclude:: model/071.php
10481048

10491049
chunkRowsById()
10501050
---------------
@@ -1053,7 +1053,7 @@ chunkRowsById()
10531053

10541054
If you want the entire ID-based chunk to be passed to the Closure at once, use ``chunkRowsById()``.
10551055

1056-
.. literalinclude:: model/070.php
1056+
.. literalinclude:: model/072.php
10571057

10581058
.. warning:: ID-based chunking needs the model to define a primary key, and that primary key must be selected.
10591059
If you customize the selected columns, make sure the primary key is included.

user_guide_src/source/models/model/070.php

Lines changed: 0 additions & 7 deletions
This file was deleted.
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22

33
$userModel->where('country', 'US')
4-
->chunkRowsById(100, static function ($rows) {
4+
->chunkById(100, static function ($data) {
55
// do something.
6-
// $rows is an array of rows representing a chunk of 100 items.
6+
// $data is a single row of data.
77
});
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?php
2+
3+
$userModel->where('country', 'US')
4+
->chunkRowsById(100, static function ($rows) {
5+
// do something.
6+
// $rows is an array of rows representing a chunk of 100 items.
7+
});

0 commit comments

Comments
 (0)