Skip to content

Provides a simple webpage from where you can run sql queries on your database.

License

Notifications You must be signed in to change notification settings

azitabh/cheese-ball

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CheeseBall

This is a simle rails engine that can be added into any rails project and can be used to run database statements.

Required Steps

Add the following line in your Gemfile

gem 'cheese_ball', git: 'git://github.com/azitabh/cheese-ball.git'

Run the customary bundle install command and that’s all. This will pull the latest code from master to your GEMHOME and you are ready to go. Just restart your rails server and you will be able to access the url at BASE_URL/cheese-ball.

You can put as much SQL statement in the text-area as is allowed in POST. SQL statements will be seperated assuming semicolon to be the identifier. All the statements will be run one-by-one.

All the changes will be rolled back in case the execution of one of the statements results in an error. Error will be displayed on the return screen.

All the changes will be rolled back in case the total no of matched rows exceeds 100. This will soon be configurable.

Cheers!!

Note

This is tested on ruby-2.0.0-p0 and Rails-4.0.0 only for mysql database only.

TODO

Write test cases.

Allow users to choose from identifiers(e.g.: ;, ===, \n etc)

Provide configuration options.(e.g.: max rows matched limit).

Test compatibility with other ruby/rails versions.

Add access-control.

License

This project rocks and uses MIT-LICENSE.

About

Provides a simple webpage from where you can run sql queries on your database.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published