Script's query handling

Hi,

I though that every single query in a script would run inside it’s own transaction, but recently speaking with a developer, he told me that once he had deadlock issues and they solved it by placing every single query inside an explicit transaction.

I would like to know if Ignition run all the query of a single script inside the same transaction.

Thanks for your time.

No, you would need to use system.db.beginTransaction if you wanted behavior like that.

1 Like

Ok thank you Kevin.
So by default every single query run on his own transaction.
Is this correct?

No. They don't run in transactions at all, unless the DB itself auto-wraps them.

3 Likes