Hi team,
I'd like to create a new plugin, I've thought a good name could be "Risky
SQL Inspector".
The idea of the plugin is to detect potential dangerous SQLs executed
against the database.
For example I am thinking this kind of validations:
1. When user clicks on commit SQL
2. Then plugin will validate SQL format and detect whether or not it is
risky for the database
3. Plugin validations will be, for instance:
3.a. Is SQL an update or delete?
3.a.1. Yes, then do it have a valid WHERE?
3.a.1.1. No, then bring up a confirm pop up explaining the
risk of executing an update or delete without a valid WHERE.
3.a.1.2. Has user confirmed that wants to commit SQL anyway?
Just Run it.
3.a.1.3. Has user cancelled the commit SQL? then don't run it.
3.b Is SQL a drop?
3.b.1. Yes, then show up confirm pop up explaining how drop will
potentially damage the database if it were wrong.
3.b.1.1. Has user confirmed wants to commit SQL anyway? Just
Run it.
3.b.1.2. Has user cancelled? Don't run it.
3.c. Is SQL different to Update, Delete or Drop?
3.c.1. Yes, then just run it.
What do you think?
Any feedback is very appreciated.
If you agree I'd like to code the plugin, but for that I will need access
to git repository to download the code.
Please let me know your thoughts.
Many thanks,
--
Abraham Alarcon
+56 9 63060197
abr...@gm...
|