The Accidental Rubyist

invalid byte sequence in UTF-8

Sample: SQL Client in ruby ncurses

with 3 comments

I am putting up a small SQL Client made in about 3 hours using rbcurse. The idea of course was to see deficiencies in the library, and yes, for adhoc queries auto_sizing of columns is required. Need to work on that.

quick dirty sql client

quick dirty sql client

The demo shows a textarea, enter a query and press Run to see the results in a table. The listbox on top-right shows the tables in the database, pressing Space on any will show its columns in the second list. Pressing Enter will display its data in the table.

The idea of the columns is to select columns and have the names be pushed to the textarea, or auto-generate SQL’s.Similar to sqlminus (sourceforge project).

I will put in some more work on this, just to find out how rbcurse can be improved more.

Image Link
Video Link.

Advertisements

Written by totalrecall

February 14, 2009 at 12:50 am

Posted in ncurses, rbcurse, ruby

3 Responses

Subscribe to comments with RSS.

  1. That looks great do you know of any other ncurses command line sql clients?

    rado

    April 28, 2009 at 10:06 pm

  2. This is cool! Can you put the code up on github?

    Carlo Cabanilla

    June 5, 2010 at 4:29 am

  3. It is present on github on http://github.com/rkumar/rbcurse/tree/master19 in the examples folder as sqlm.rb and sqlc.rb.

    You will need to install the rbcurse gem for that. And also ncurses of course.

    thx.

    totalrecall

    June 5, 2010 at 9:37 am


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: