-
-
Notifications
You must be signed in to change notification settings - Fork 233
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
ScanRows in *bun.Tx #586
Comments
It is possible, but You can do something like this: rows, err := tx.Query(...)
if err != nil {
panic(err)
}
err = db.ScanRows(ctx, rows, dest) We can add |
Thanks for the answer. The issue is that we try to abstract away both We're switching from go-pg to Bun right now and it is possible to execute So the only solution for our approach is to have this interface extended. |
I have the same issue. There are many areas where the API differences between go-pg and bun make it impossible to do things that were possible in go-pg. Apply() is another place: #888 |
This issue has been automatically marked as stale because it has not had activity in the last 30 days. If there is no update within the next 7 days, this issue will be closed. |
Hello @vmihailenco
From docs I understand that it's possible to execute a custom query and scan the results into a custom model.
But that's only possible to do on
*bun.DB
, but not on*bun.Tx
because although Tx has Query() method, it doesn't have ScanRows().Is there a specific reason for that? Or it's actually possible to extend
*bun.Tx
with ScanRows() method and also add this method tobun.IDB
?The text was updated successfully, but these errors were encountered: