Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ability to stream data #30

Open
deptyped opened this issue Apr 14, 2024 · 1 comment
Open

Add ability to stream data #30

deptyped opened this issue Apr 14, 2024 · 1 comment

Comments

@deptyped
Copy link
Owner

deptyped commented Apr 14, 2024

For example, to iterate over all users:

const users = await prisma.user
  .paginate()
  .toStream({
    limit: 25, // batch size
  });

for await (const user of users) {
  console.log(user); // {id: 1, name: 'John Doe'}
}
@KATT
Copy link
Contributor

KATT commented Apr 16, 2024

https://github.com/etabits/prisma-cursorstream

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants