Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Refactor the query execution code in Execute Query tab #1181
This is an attempt to start refactoring one of my most dreaded bits of code in DB4S. It's still not awesome but it's definitely starting to become easier to understand.
As with the last PRs, I'll leave this here for a couple of days for feedback and will merge this afterwards.
Ok, I've reverted most of the changes and changed this PR to only include less drastic changes
Before this we made the assumption that statements starting with SELECT are read-only and that all other statements would write to the database. This isn't true for reading PRAGMA statements and for recursive statements (starting with WITH). After the proposed changes the assumption is that statements which return data (including empty result sets) are read-only and that statements which don't return data might make changes to the database. I'm not 100% sure that this is always the case, so I'll leave this some more days open for discussion.
And please ignore the first three commits which were added today. They are only listed here because I'm stupid