Is it possible to open a locked sqlite database in read only mode?

后端 未结 2 1912
逝去的感伤
逝去的感伤 2021-02-13 12:56

I\'d like to open the chromium site data (in ~/.config/chromium/Default) with python-sqlite3 but it gets locked whenever chromium is running, which is understandable since trans

2条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-02-13 13:38

    I believe it depends on the lock set by the transaction.

    http://www.sqlite.org/lockingv3.html#shared_lock http://www.sqlite.org/lang_transaction.html

    SQLite exclusive transactions lock both read and write where immediate and deferred transactions will still allow readers.

    So it really depends on the transactions used by Chromium.

提交回复
热议问题