How can I use rollback?

Asked by sanraj

I want to execute multiple queries.
and if operation fails I want to rollback the changes.

Thanks in adv.................

Question information

English Edit question
PySQLPool Edit question
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Nikoleta Verbeck (nerdynick) said :

For now the only way is to execute a rollback query like you would do directly in mysql. I have added a blueprint for this to add a method to the PySQLQuery class to make this easier as well as improve the support for transactions in multi-thread applications. If you can confirm that this works, this will help me with completing the blueprint.

Please note that if you are using a Multi-Thread app that transactions may be a bit buggy in that 2+ threads have the possibility of sharing a single transaction. I do have a complete set of blueprints mapping out the increases support for this in the next release. I have also added the blueprint mentioned above as a dependence of the next release as well as a commit method for PySQLQuery class.

Can you help with this problem?

Provide an answer of your own, or ask sanraj for more information if necessary.

To post a message you must log in.