Replies: 1 comment
-
Start your transaction as normal, and then pass the tx, _ := db.BeginTx(ctx, nil)
users, err := models.Users.Query().All(ctx, tx) If you're using err := db.RunInTx(ctx, nil, func(ctx context.Context, tx bob.Executor) {
users, err := models.Users.Query().All(ctx, tx)
}) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
How do I perform an SQL transaction? I want to insert data into two tables in a single transaction, but I can't find any documents that refer to it.
Beta Was this translation helpful? Give feedback.
All reactions