sqlite-viewer-vscode icon indicating copy to clipboard operation
sqlite-viewer-vscode copied to clipboard

Reading Data In Wal Mode

Open sahin52 opened this issue 2 years ago • 2 comments
trafficstars

I created a new sqlite db with C# .Net Core EF Core.
I can add/read data without a problem. But much of the data is not shown in this extension, because the db is in WAL mode. image

I can read data with sqlite3 cli (https://sqlite.org/download.html -> sqlite-tools-win32-x86-3430100.zip) image But the data is old in this extension because of WAL mode image

I couldnt figure out how to disable wal mode either

sahin52 avatar Sep 14 '23 08:09 sahin52

I found a solution, but the issue still continues. For the people with the same problem, go to sqlite cli tool, or any other tool that you can write sql commands Run this command: PRAGMA journal_mode=DELETE; The sqlite database will turn into delete mode, which will disable wal and shm files, and show the data in the database, which will make you see all data with this extension

sahin52 avatar Sep 14 '23 08:09 sahin52

Same. I wish this plugin supported reading DBs with WAL.

pekeler avatar Mar 14 '24 09:03 pekeler

Yes, WAL support would be greatly appreciated

git-nico avatar May 01 '24 14:05 git-nico

Yes, want WAL support!

dourgulf avatar May 10 '24 06:05 dourgulf

I wish this plugin supported reading DBs with WAL.

~I wish it did too lol. Unfortunately it's not a simple fix~. I've written down what I know in a Discussion in case someone wants to get into the technical nitty-gritty: https://github.com/qwtel/sqlite-viewer-vscode/discussions/55

qwtel avatar May 11 '24 06:05 qwtel

I found a mostly simple fix after all. You can try it out using the v0.5.0 pre-release. You'll have to go to extensions, find SQLite Viewer and click "Switch to Pre-Release Version".

Please let me know if you encounter any issues. If it works as expected, please give this post a thumbs up or let me know some other way.

Getting this to work required quite a bit of restructuring as well as a custom SQLite VFS. There's potential for some unforeseen breakage.

Screenshot 2024-05-18 at 23 59 59

qwtel avatar May 18 '24 17:05 qwtel

Shipped on main channel in v0.5.5

qwtel avatar Jun 02 '24 02:06 qwtel