Getting Started | Documentation | Glish | Learn More | Programming | Contact Us |
Version 1.9 Build 1556 |
|
Package | display | |
Module | widgets |
include "taqlwidget.g"
The Table Query Language (TaQL)
is an SQL-like language for defining
commands to do selections and/or sorts on an AIPS++ table.
It offers a lot of power and flexibility, but the syntax is not
always clear. Furthermore, the names and data types of the columns
in the table might not be known. This makes it sometimes hard to
create a query command.
The TaQL widget is a Query-By-Example like widget to assist the
user in creating a TaQL command. Such a command consists of four
optional parts.
Constructor arguments control if the user can specify these parts
by enabling the appropriate parts of the widget.
All these parts can be filled in manually, but it is easier to use
the form at the top. It shows all available fields and if appropriate
also a check box to tell if the field has to added to select list.
It can also have a sort menu to add the field to the sort list.
To make the widget appear less overwhelming, the more advanced
features (like the OR button and the resulting entry boxes) are
hidden in a rollup.
The rollup also has an expand button to show what the TaQL string looks
like for the current contents of the form.
Constructing
the widget is driven by the description of the table columns
as given by the table function
getdesc().
Description
A check box for each column name lets the user define
the select-list. Pressing a button means that the column is added
to the select-list in the entry box at the bottom. Pressing again
removes it. It is also possible to edit the select-list directly.
Note that an empty select-list means that all columns are selected.
This part of the widget is always active and is meant to ease the
process of creating the where-expression.
The available columns and, if applicable, lists of possible values
are shown in a form. The popuphelp shows the data type, etc..
The user can fill in the form to create (part of) the where-expression.
Special buttons are available to create more complex where-expressions
with parentheses and AND, OR, and NOT operators by combining the
current contents of the form with the where-expression already
present in the entry box at the bottom.
It is also possible to edit the where-expression in the entry box directly.
The expand button is only giving information. Pressing it shows how
the current contents of the form convert to a where-expression
A listbox is shown for each column to let the user add or remove
the column to the sort-list in the entry box at the bottom.
The user can choose No Sort, Ascending, or Descending. The No Sort
choice removes the column from the sort-list.
It is also possible to edit the sort-list directly.
Each field is followed by an operator menu and
an entry box which can be used to
fill in values. Multiple values are possible separated by commas.
When a field can only have a limited set of values, the entry box
is preceeded by a menu from which the user can select values.
Fields of type string have some extra operators to compare the
field with a regular expression (or filename-like pattern).
It also has an option menu to make tell if case has to be ignored
(default no) and if the string has to be enclosed in quotes
(default yes). Note that in a TaQL command an unquoted string is
treated as the name of another field.
However, use of the widget is not limited to tables. As long
as a correct description is given, the widget can be used to create
query commands for other purposes as well.
Next: taqlwidget - Constructor
Up: widgets - Module
Previous: tapedeck.disable - Function
  Contents
  Index
Please send questions or comments about AIPS++ to aips2-request@nrao.edu.
Copyright © 1995-2000 Associated Universities Inc.,
Washington, D.C.
Return to AIPS++ Home Page
2006-10-15