Why doesn’t SQLite3 require a commit() call to save data in Python?

前端 未结 5 1282
轮回少年
轮回少年 2020-12-09 18:48

I read somewhere that to save data to a SQLite3 database in Python, the method commit of the connection object should be called. Yet I have never needed to do t

5条回答
  •  南方客
    南方客 (楼主)
    2020-12-09 19:25

    Python sqlite3 issues a BEGIN statement automatically before "INSERT" or "UPDATE". After that it automatically commits on any other command or db.close()

提交回复
热议问题