console tables 
Author Message
 console tables

Has anyone seen or developed a class for producing tables on the
console, a la pgsql, mysql data display?

culley



Wed, 16 Nov 2005 16:39:49 GMT  
 console tables

Quote:

> Has anyone seen or developed a class for producing tables on the
> console, a la pgsql, mysql data display?

> culley

ncurses may be a bit overkill for just a few tables... but there is an
ncurses library for ruby: http://ncurses-ruby.berlios.de/

--
dc -e
4dd*od3*dddn1-89danrn10-dan3+ann6*dan*2*an13dn1+dn2-dn3+5*ddan2/9+an13nap



Wed, 16 Nov 2005 22:02:04 GMT  
 console tables

Quote:

> Has anyone seen or developed a class for producing tables on the
> console, a la pgsql, mysql data display?

Have a look at DBI::Utils::TableFormatter in the ruby-dbi-all package.
Example of its use in sqlsh.rb :

        stmt = $dbconn.prepare(line)
        head = stmt.column_names
        next if head.empty?
        rows = stmt.fetch_all
        DBI::Utils::TableFormatter.ascii(head, rows)

Regards,

Brian.



Wed, 16 Nov 2005 22:28:40 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Hiding the DOS console on a console application on Windows

2. Q Porting HP Console-Based FORTRAN Program to Win32 Console

3. console mp3->wav decoder for $indows or GUI one which supports console

4. Spawning console programs with I/O redirection and (preferably no) visible console

5. Converting data from TPS table to MS SQL 7 table getting wrong values

6. Converting from TPS tables to MSSQL 2000 tables

7. Lookup to ODBC table repositions browse to 1st row in table

8. Classy(2) demo of creating a table class based upon a table structure

9. Generic Table -- Hash Table Implementation Module

10. Jump table without the table?

11. (or (gethash key table) (setf (gethash key table) new-value))

12. [incr Tcl] table widget v1.01 -- table-1.01.tar.gz

 

 
Powered by phpBB® Forum Software