jSQLsh - Jim Tcl SQLite Shell

The jSQLsh project at https://github.com/LStinson/jSQLsh provides a small but powerful shell for sqlite, modelled after psql

The creator, Lorance Stinson, wanted an sqlite command shell which addressed some of the deficiencies of the native sqlite command shell, so he decided to create his own with Jim Tcl.

To run it, you simply need jimsh built with sqlite3 and readline support. For example, to build a version of jimsh with these extensions included statically:

$ ./configure --with-ext="sqlite3 rlprompt"
...
$ make
...

And then try it out:

$ ./jimsh jsqlsh
Welcome to the SQLite Shell in Jim TCL 0.72.
Opening the database ':memory:'.
To execute a query type '/'. For help type '/h'.
:memory: (0 rows, 0 changes) # /h
Commands:
  /A(UTO)     Toggle the auto option state.
  /c(lear)    Clear the query buffer
  /D(EBUG)    Toggle the debug option state.
  /d          Display all objects in the database.
  /d[itv]     Display all indexes (/di) / tables (/dt) / views (/dv).
  /d OBJ      Describe the object OBJ.
  /ds OBJ     Displays the schema for the object OBJ.
  /e(dit)     Edit the query buffer.
  /go | /     Execute the query in the query buffer.
  /h(elp)     Print this help text.
  /o(pen)     Open a database file, change directories and list files.
  /P(AGER)    Toggle the page option state.
  /p(rint)    Print the query buffer.
  /s(et)      Set/List configuration options. '/s OPTION VALUE'
              Values are treated as TCL strings and can be quoted.
  /Q(uiet)    Toggle the quiet option state.
  /q(uit)     Quit  (Also Ctrl-D)
  /u(ser)     Display the user macros.
  /u(ser)#    Copy user macro # into the query buffer.
  /u(ser)# -  Copy the query buffer, or supplied text, into macro #.
:memory: (0 rows, 0 changes) # 

Steve Bennett (steveb@workware.net.au)


comments powered by Disqus