|-h>||Show command-line help.|
|Runs <script> directly.|
Loads and runs a script from <scriptfile>.
HOME Specifies the home directory
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:email@example.com/billing")
And the same with a PostgreSQL server:
gtksql -s connect("postgresql://fred:firstname.lastname@example.org/billing")
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.
Darryl Luff <email@example.com>
|Darryl Luff||GTKSQL (1)||0.4.5|