gtksql(1) - Linux man page

Name

GtkSQL - SQL database interface

Syntax

gtksql [-h] [-s "script" ] [-f scriptfile]

Description

GtkSQL is an interactive SQL interface to various databases. Currently, MySQL and PostgreSQL are supported.

A script interface is provided using the LUA script language. The program configuration and workspace files are saved as LUA scripts.

NOTE: It is possible to compile GtkSQL without LUA support. If you do this, saved workspaces and scripts will not be supported.

Options

-h>
Show command-line help.
-s <script>
Runs <script> directly.
-f <scriptfile>
Loads and runs a script from <scriptfile>.

Files

/usr/bin/gtksql

Environment Variables

HOME
Specifies the home directory

Examples

Connect to the "billing" database on the MySQL server myserver.com.

gtksql -s 'connect("mysql://myserver.com/billing")'

Connect to the same server as the user fred, with password password:

gtksql -s 'connect("mysql://fred:password@myserver.com/billing")'

And the same with a PostgreSQL server:

gtksql -s 'connect("postgresql://fred:password@myserver.com/billing")'

Scripts

Scripts are straight text files. It uses the LUA engine, which is documented at http://www.lua.org. All of the standard LUA functions are available. In addition to these, GtkSQL adds the following functions:

-h
Show command-line help.
addquery(<querytext>)
Adds a query containing the given text.
connect(<url>)
Connects to the given url.
deleteQueries()
Removes all existing queries.
exit()
Exits the program.
help()
Displays simple help on the LUA script functions.
loadQuery(<queryfile>)
Opens a new query and loads the file into it.
moveWindow(x, y)
Move the window to the position given. The x and y locations refer to the distance of the top left of the GtkSQL window, from the top left of the screen.
sizeWindow(width, height)
Resize the window. Note that there is a minimum size built into the application. The minimum size depends on the screen size of the various buttons etc.

Authors

Darryl Luff <djluff@users.sourceforge.net>

See Also

None.