Coder Social home page Coder Social logo

dbqueryexecutor's Introduction

DbQueryExecutor

Mysql and PostgreSql query executor written in python.

How to use?

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.

Configure db:

Open query.xml,

<SQL DATABASE="PSQL"> <!-- MYSQL or PSQL -->
  <DB>db name</DB>
  <HOST>localhost</HOST>
  <USER>user</USER>
  <PASSWORD>password</PASSWORD>

Write sql queries:

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.

Run executor

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.

Issue

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 :)

Copyright

Do what every you want.

Buy me a drink:

Bitcoin: 1JVQnkuKTWA6i4AMXFsksdJgt4B3o1yfgA

dbqueryexecutor's People

Contributors

milannz avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.