Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

Is there a Foreach method like with gopg/pg? #840

Closed
adelowo opened this issue May 30, 2023 · 1 comment
Closed

Is there a Foreach method like with gopg/pg? #840

adelowo opened this issue May 30, 2023 · 1 comment

Comments

@adelowo
Copy link

adelowo commented May 30, 2023

Hi, I was hoping i could find a Foreach method that exists in go-pg/pg https://pkg.go.dev/github.com/go-pg/pg/v10#example-DB.Model-ForEach

What is the right way to do that with bun?

@vmihailenco
Copy link
Member

You can replace ForEach with sql.Rows and db.ScanRow.

@uptrace uptrace locked and limited conversation to collaborators May 31, 2023
@vmihailenco vmihailenco converted this issue into discussion #841 May 31, 2023

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants