yy0931 / sqlite3-editor

https://marketplace.visualstudio.com/items?itemName=yy0931.vscode-sqlite3-editor
GNU General Public License v3.0
838 stars 6 forks source link

despite pragmas are defined, makes dbs read-only. #60

Closed tolgaulas closed 2 months ago

tolgaulas commented 2 months ago

Despite the below vs-code settings, openening a file in sqlite3-editor locks the file for writing by other processes vscode:

    "sqlite3-editor.connection.setupQueries": {
        ".*": "PRAGMA foreign_keys = ON; PRAGMA busy_timeout = 1000; PRAGMA cache_size = -1; PRAGMA journal_mode = WAL; PRAGMA synchronous = NORMAL;"
    },

error:

Type: SQLite3Exception
Code: 8
Message: attempt to write a readonly database

closing the file in the sqlite3-editor, removes this error.

yy0931 commented 2 months ago

I cannot reproduce that error, so I cannot fix it.

It is strange that you're not receiving the usual database is locked error but instead attempt to write a readonly database, and I'm not sure what causes that.