Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Rahl commander is a tool for easilly manage db object like stored procedures and triggers
Python
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
app
assets
bin
config
example_assets
.gitattributes
.gitignore
README.md

README.md

RAHL COMMANDER for SQL

A command line tool to simplify the managment of DB objects and scripts in your project.

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Dependencies

  1. Python >= 3.3
  2. Python mysql.connector
  3. Mysql >= 5.1

Currently supports objects for

  1. Mysql

Currently supports auto completion for

  1. PHP + Eclipse

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Description

Many projects requires the usage of Stored Procedurs, Triggers, SQL Functions, Views and various scripts.
Rahl Commander (RCom)provides facilities and structure to manage all those pieces of code used in your project, but are not part of the main code base.

RCom will do the following for you:

  1. Build for you all or some of the objects into the DB of your choice.
  2. Will generate auto completion files for your IDE (how nice it is to get auto completion for a stored procedure in your PHP, heh?).
  3. Will give easy cleanup of the DB of all or some objects (Great for use in release scritps).
  4. Provide a simple cleanup tool of the code. You write a nice Stored Procedure. All indented and commented. But, when u copy it and try to run it through the command line, it craps out. All due to white space characters in the wrong place. RCom will generate a clean version for you to copy paste into the command line.

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Naming Conventions

  • APPDIR is where you checked out Rahl Commander.
  • ASSETS is the assets folder, right under APPDIR.
  • BIN is the bin folder right under APPDIR
  • CONFIG is APPDIR/config/__init__.py
  • IGNOREDIR is APPDIR/config/ignore_list.py

Installation

(I assume you have Python and the necessary mysql connector).
Currently supporting only manual (very simple) installation.

  1. Checkout/export the project where ever you want. This folder becomes APPDIR.
  2. Check your ASSETS folder has the following subfolders: autocompletion, functions, scripts, sp, triggers, views
  3. Open CONFIG and make sure the DB credentials are correct
  4. If not existing, create DB folders. For example, if u have a database named proddb and it has stored procedures and triggers, go to ASSETS/sp and create folder proddb. Then go to folder ASSETS/triggers and create folder proddb. So you end with ASSETS/sp/proddb and ASSETS/sp/triggers. (Check the examle_assets structure, which is setup for DBs dhara and dhara_views).
  5. Run the test.py under the BIN to see all is good.

You Are Done!

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Examples: CD to bin

  1. build all elements build.py --all

  2. drop all elements drop.py --all

  3. build all stored procedures build.py -s

  4. drop all triggers in DB dhara drop -t -ddhara

Something went wrong with that request. Please try again.