mulgara - semantic store

skip navigation


iTQL Shell

The iTQLTM shell is a console-based, interactive shell, allowing users to issue iTQL commands to Mulgara. Alternatively, multiple commands can be executed sequentially using iTQL script files.

The interpreter supports several command line options that make working with large numbers of queries easier. You can run the shell as a stand-alone application (packaged in a fully-self-contained executable JAR file), or invoke it directly via API calls. iTQL commands sent to the iTQL interpreter return results directly to the console, whereas iTQL commands sent via the communication methods listed above return answers as native Java objects (in the case of direct API calls) or in XML.

You must have the correct version of JavaTM software installed in order to run Mulgara and the iTQL shell. You can check the version you have installed by typing at a command line:

$ java -version

Something similar to the following should display:

java version "1.4.2_04"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_04-b05)
Java HotSpot(TM) Client VM (build 1.4.2_04-b05, mixed mode)

If the above does not display, add <JAVA_HOME>/bin, where <JAVA_HOME> is the location where J2SETM is installed, to your PATH (in the appropriate way for your shell).

Note - You must use J2SE 1.4.2 or higher. Mulgara does not run on beta 2 or prior.

How you start the iTQL shell depends on your platform. To start the iTQL shell from a:

Starting iTQL with the executable jar file allows you to pass arguments to the shell, changing the way iTQL operates. See the iTQL Shell Options section for more information about these arguments.

After starting iTQL, a message similar to the following displays:

iTQL Command Line Interface
copyright (C) 2001-2004 Tucana Technologies Inc.

Type "help ;", then enter for help.


The last line is the iTQL prompt. This is where you issue iTQL commands.

To display a list of iTQL commands:


To display detailed help for a particular command:

iTQL>help command;

Where command is the name of the iTQL command.

The following example queries a model named documents on a Mulgara server on the machine to find the URLs and titles of all documents.

iTQL>select $url $title
from <rmi://>
where ($url $y <> )
and ( $url <> $node )
and ( $node <> $title );

Note - iTQL supports the AND and OR operators as well as standards such as XML namespaces and URIs.

The following is an example of submitting the above query to the iTQL shell.

iTQL>select $url $title
from rmi://
where ($url $y <> )
and ( $url <> $node )
and ( $node <> $title ) ;

2 columns: url title (2 rows)
title="Expect lower rate of gain in the value of homes"
title="District Court refuses to certify class alleging notice violations"

Valid XHTML 1.0 TransitionalValid CSS 3.0!