Most DB vendors - although not all - support some sort of SQL command line tool. They are quite different from each other, and are somewhat difficult to support for a general-purpose, heterogenous DB product.To get around this problem, Wirekite implemented a simple SQL command line tool. The cmdline tool uses the same DSN or URL files for connecting that other Wirekite tools use. If you can connect to a database using the cmdline tool, the same DSN/URL file will work for connecting with other Wirekite tools.
Here’s an example of connecting and running the cmdline tool using Firebolt.
Copy
$ ./cmdline -d firebolt -c fi_url.txtfirebolt instance connect successful=> \h\i filename - load a file of SQL statments\o [filename] - write output to filename - \o [no-file] disables\d csv|list - change display format\p <num> - change number of rows per page: 0=no paging\r true|false - show row numbers\t - toggle show time\D - print current display settings\h - print this help info\c value-enclose-char value-separator-char row-end-char show-header:true|falseCSV format spec chars can be QUOTE, DOUBLEQUOTE, COMMA, SPACE, PIPE, NONE, NEWLINE, CRLF, other literals<ctrl>-D - exit=> create table example (a int, b int);ok=> insert into example values (1,1),(2,2),(3,3);ok=> select * from example;1: a: 11: b: 12: a: 22: b: 23: a: 33: b: 3=> \d csvdisplay type set to csv=> select * from example;'a','b''1','1''2','2''3','3'=> bye