You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, ExecScript executes passed script within a SAVEPOINT transaction. This prevents certain commands from running, eg, vacuum, begin. These are commonly used commands in SQL scripts. Should we have a different version that does not automatically SAVEPOINT?
Thanks,
The text was updated successfully, but these errors were encountered:
@DrGo ExecScript runs a SAVEPOINT by design so that scripts can be run atomically. I understand there are certain operations you can't do inside of a transaction such as vacuuming, but why would you want to use BEGIN when you could just use SAVEPOINT or break up your script using the go APIs for nested transactions?
For the one off vacuum, which I generally do after a database migration, I just use sqlitex.Exec instead. Or rather ExecTransient because I don't think its a Stmt worth caching.
Can you expand on the usecase of having an ExecScript-like function that did not use a SAVEPOINT, or an option to not use it?
@crawshaw @AdamSLevy
Currently, ExecScript executes passed script within a SAVEPOINT transaction. This prevents certain commands from running, eg, vacuum, begin. These are commonly used commands in SQL scripts. Should we have a different version that does not automatically SAVEPOINT?
Thanks,
The text was updated successfully, but these errors were encountered: