-
as described above, I need to batch process some data in a static method. I originally wanted to use
As shown in the above code, the pagy method is not working properly. What should I do? Thank you so much. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
That does not explain anything useful to help you. BTW, it looks like you are using pagy to update records... which it's like using a bazooka to kill a fly. You just need to loop through your collection in chunks of n records at the time. You should not use pagy to do that. There are many different ways to do that: an easy one is using |
Beta Was this translation helpful? Give feedback.
I missed that part
It's less efficient, but you can loop through batches anyway if you do it by yourself, with OFFSET and LIMIT