Method to set transaction isolation level

Issue #443 resolved
Former user created an issue

It would be useful to set transaction isolation level from python code in a server independent manner. Backends without such a thing should simply ignore this setting. I did not write an implementation, since I'm not sure exactly where to add this code.

Comments (8)

  1. Mike Bayer repo owner

    neither am i. closest thing you can do for now is write your own connect() function which sets it on each connection. also afaik psycopg2 is the only DBAPI that supports transaction isolation in any way.

  2. Michael Trier

    mssql also support setting the transaction isolation level, unless I'm not understanding what is desired here.

  3. Former user Account Deleted

    I have an initial patch for the psycopg2 part of this. Instead of adding a method on Connection I moved connect() from only inside DefaultEngineStrategy.create to the dialects. This way the dbapi.connect() call is not executed directly but deferred to the dialect.

    I'm not sure about mssql; I don't have access to that.

  4. Log in to comment