Prisma client extension function to find many results in batches.
NOTE: Requires Prisma 4.7.0 or later with
previewFeatures = ["clientExtensions"]
in schema.prisma. https://www.prisma.io/docs/concepts/components/prisma-client/client-extensions
client.MODEL_NAME.findInBatches({ maxPages: Infinity, take: 1000, ...query }, callbackFn);