How to start a transaction?

Help
maranos
2011-02-25
2013-04-22
  • maranos

    maranos - 2011-02-25

    Hi,

    the current mysql module contains two methods to finish a transaction (commit, rollback). But how can I start one?

    Thanks,
    maranos

     
  • phalaaxx

    phalaaxx - 2011-02-26

    Hi,

    Unfortunately PEP249 does not specify a method to start a transaction. You are free to execute a BEGIN (or START TRANSACTION) statement, however this will likely do nothing on a non-transactional engine like MyISAM,

    Your question leads me to another one - PEP249 says:
    "Note that if the database supports an auto-commit feature, this must be initially off. An interface method may be provided to turn it back on."

    To be honest, mypysql may not follow this strictly, I'll have to check this further  and make a fix if necessary.

    Best wishes,
    Bozhin

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks