Nested transactions with SQLAlchemy and sqlite

后端 未结 3 1695
悲哀的现实
悲哀的现实 2020-12-11 04:20

I\'m writing an application in Python using SQLAlchemy (and Elixir) with SQLite as the database backend. I start a new transaction using the code session.begin_transac

3条回答
  •  时光取名叫无心
    2020-12-11 04:52

    SQLAlchemy uses pysqlite to interact with an SQLite database, if I'm not mistaken pysqlite will by default wrap up any query you send it in a transaction.

    The answer might lie in correctly setting the isolation level when you connect.

    Some discussion about that over here

提交回复
热议问题