Reload the current database? #8563
Replies: 2 comments 1 reply
-
There isn't such an option yet. If you're in an edit-code, create-database, query-database cycle I find it's best to create db1, db2, ... so each db change is loading a new one, not removing and re-adding an old one. |
Beta Was this translation helpful? Give feedback.
-
We have some ongoing discussions of how to best improve this user experience. A "reload" command does sound like an obvious thing to do from the outside, but there are some technical problem with making it work. Of course it could work at least as well as "close the database and open it again", but that itself is not guaranteed to work well. The workflow we officially support is that you're supposed to close the database in VSC before you delete and overwrite it. As long as the database is "open", the underlying query engine might be in a state where it thinks it needs to clean up after itself in a database directory at close. Then if that directory has been deleted and replaced with something else, the intended "clean-up" might instead end up breaking something in the new database. This doesn't happen often, but the risk is there. We are looking at a way to detect the sudden disappearance of the database underneath the engine, but it seems to be difficult to do it reliably without very platform-dependent hacks. As long as that hasn't been solved, we're loath to create an UI option that makes it look like it is okay to wait with notifying VCS until you have replaced the database. (And once we find a solution, the UI option might not be needed after all -- one might hope that if we can detect the database disappearing, we could react by transparently reopening it). |
Beta Was this translation helpful? Give feedback.
-
The database is not reloaded when I run
codeql database create
and create the database in the same directory. I had to remove and open the database again, is this expected behavior?Is it possible to do a reload instead of "remove and add"? Looks like there's no such context menu:
Beta Was this translation helpful? Give feedback.
All reactions