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

how can i insert manay records during a transaction? #4433

Open
jinkaz opened this issue Oct 22, 2024 · 1 comment
Open

how can i insert manay records during a transaction? #4433

jinkaz opened this issue Oct 22, 2024 · 1 comment

Comments

@jinkaz
Copy link

jinkaz commented Oct 22, 2024

for example,there are two models ,as creating ,when inserting action happen there maybe one of models insert a few records.
but i found ExecCtx method did't support bulk inserts.sqlx.NewBulkInserter that i think what is difficult to be compatible to ExecCtx .
maybe i's missed something userful .but rightnow i need some tips and help.thank u

@kesonan
Copy link
Collaborator

kesonan commented Nov 30, 2024

You can wrap a batch exec logic based on the transaction function

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