picosql - picoSQL command line client


Corso Italia, 178 - 56125 Pisa
Telefono/fax 050 46380
e-mail picosoft@picosoft.it

picosql is a simple program that allows you to query a picoSQL database. Its use is extremely simply: picosql get the SQL query to execute from the first argument in the command line and puts the results on the standard output. This kind of use allows an optimal flexibility in Unix/Linux environments, allowing the creation of piped filters. As first argument, you can put the word tables and, in that case, you get the list of all the tables in the database. An example of use is the following:

picosql "select cognome, nome from autore where cognome like 'B%'"
Because you don't need supply any login information, you need some environment variables setted in a appropriate way. Note: You can find a script in the distribution, picosql.sh (or picosql.bat under Windows systems) which is already configured to access the test database.

3 environment variables are evaluated:
PICOSQL_DSN
Name of the DSN to use. Default value is "default".
PICOSQL_USR
User name. Default value is ""
PICOSQL_PWD
Password. Default value is ""

If you use this program in Unix/Linux environment you must check the correctness of picosql.ini, while if use this program you must check the configuration in the registry file. See Accessing the DB, for more information.

Shell DB test

The distribution contains some Unix/Linux scripts (.sh extension) and Windows scripts (.bat extension) under the directory bin. Theese scripts allow you to delete, recreate and reload the test database.

There are also 4 scripts to create, load data, select data and drop the table EXAMPLE.