SuperSQL is an extension of the SQL language which allows you to easily and quickly structure the output of a relational database. Moreover, this language provides a large variety of layouts.
The SELECT clause of the SQL language is here replaced by the GENERATE clause. The syntax is GENERATE <media> <TFE> where the media is the ouptut language of the query and TFE is the Target Form Expression. For instance, the media can be HTML, or PDF, SWF, or Excel format. TFE represents the way the considered list will be displayed (which operator to choose).
Below is an introduction of the language. You can dynamically build some Target Form Expression or use the examples provided.
SuperSQL is intended to extend the SQL using (Target Form Expression) TFE in order to create a presentation document allowing various kinds of structure (HTML, XML, PDF, EXCEL ... for example). The figure on the left shows a system image of SuperSQL.
TFE is an extension of the target list of the SQL. The common attribute of a target list are separated by commas, but the structure of the output document is more complex than a list separated by commas. TFE therefore introduces several operators, the horizontal operator (fist dimension), the vertical operator (second dimension), and the depth operator (third dimension). Some special features are also available.
SuperSQL Query
We use the GENERATE clause instead of the SELECT clause to express a query in SuperSQL. Moreover, the sintax to use is specified below.
GENERATE |
<media> <TFE> |
FROM |
<from clause> |
WHERE |
<where clause> |
Operators
The comma
[
,
]
is the horizontal operator. The
[
!
]
is the vertocal operator. And the
[
%
]
is the depth operator. Indeed, the comma is generating an array where which column is one of the argument. The exclamative point is creating an array where each argument is a row. And if the media is HTML, the percent character is creating hyperlinks between arguments. In the last case, the left argument will be displayed on the first page, and the right one will be linked.
Generally, the left argument is considered as the parent, but you can change the priorities by using {} (curly braces)
Iterator
The horizontal iterator is
[ ],
. The vertical iterator is
[ ]!
. The depth iterator is
[ ]%
. The TFE is specified by a set of brackets.
Grouping
If you use the iterator in a nested relation, the iterator is then used to group the nested argument by the parent argument. You can then avoid the multiple display of the same result.
Decoration Operator
The last operator is the decoration operator, arobase
@
. By using this operator, you are able to specify a "decoration" for the result inside curly brackets {}.
We are sorry but the online tutorial in English is not ready, but don't worry, we are working on it ! :)