Mysql and PostgreSql query executor written in python.
Firstly install dependencies and python if you don't have, create or use existing query.xml file located in root together with py scripts. All queries written in query.xml will be executed, also it is very important to configure db in this file.
Open query.xml,
<SQL DATABASE="PSQL"> <!-- MYSQL or PSQL -->
<DB>db name</DB>
<HOST>localhost</HOST>
<USER>user</USER>
<PASSWORD>password</PASSWORD>
Open query.xml,
in tag write sql queries. For example:
<INSERT>INSERT INTO role (name, description) VALUES ('user_user', 'User')</INSERT>
<SELECT>SELECT * FROM role</SELECT>
<DELETE>DELETE FROM role</DELETE>
and etc.
Once you have query.xml populated, all you need is to run db_query_executor.py script or mysql_executor.py for mysql db and psql_executor.py for postgressql. But i suggest to use db_query_executor.py.
Feel free to open issue if you have problem i'll take a look. Also feel free to ask if you have any questions or you want to pull request :)
Do what every you want.
Bitcoin: 1JVQnkuKTWA6i4AMXFsksdJgt4B3o1yfgA