casacore
Loading...
Searching...
No Matches
TaQL.h
Go to the documentation of this file.
1//# TaQL.h: The TaQL module - Casacore data querying
2//# Copyright (C) 1994-2010
3//# Associated Universities, Inc. Washington DC, USA.
4//#
5//# This library is free software; you can redistribute it and/or modify it
6//# under the terms of the GNU Library General Public License as published by
7//# the Free Software Foundation; either version 2 of the License, or (at your
8//# option) any later version.
9//#
10//# This library is distributed in the hope that it will be useful, but WITHOUT
11//# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12//# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
13//# License for more details.
14//#
15//# You should have received a copy of the GNU Library General Public License
16//# along with this library; if not, write to the Free Software Foundation,
17//# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
18//#
19//# Correspondence concerning AIPS++ should be addressed as follows:
20//# Internet email: casa-feedback@nrao.edu.
21//# Postal address: AIPS++ Project Office
22//# National Radio Astronomy Observatory
23//# 520 Edgemont Road
24//# Charlottesville, VA 22903-2475 USA
25
26#ifndef TABLES_TAQL_H
27#define TABLES_TAQL_H
28
29//# Includes
30//# table expressions (for selection of rows)
31#include <casacore/casa/aips.h>
32#include <casacore/tables/TaQL/ExprNode.h>
33#include <casacore/tables/TaQL/ExprNodeSet.h>
34#include <casacore/tables/TaQL/TableParse.h>
35
36
37namespace casacore { //# NAMESPACE CASACORE - BEGIN
38
39 // <module>
40
41 // <summary>
42 // TaQL is the query language for Casacore tables
43 // </summary>
44
45 // <use visibility=export>
46
47 // <reviewed reviewer="jhorstko" date="1994/08/30" tests="" demos="">
48 // </reviewed>
49
50 // <prerequisite>
51 // <li> <linkto module="Tables:description">Tables</linkto> module
52 // </prerequisite>
53
54 // <etymology>
55 // "TaQL" is the Table Query Language. Its pronounciation rhymes with bagel.
56 // </etymology>
57
58 // <synopsis>
59 // TaQL is an SQL-like language to query a Casacore table.
60 // Amongst its options are row select, sort, update, and delete.
61 // <br>Some more information is given in the description of the
62 // <linkto module="Tables:select and sort">Tables module</linkto>.
63 // A detailed description is given in <A HREF="../notes/199.html">note 199</A>.
64 //
65 // The high-level interface is using a TaQL command as described in
66 // <A HREF="../notes/199.html">note 199</A>. Such a command can be given
67 // in C++ (using TableParse.h), Python or the shell program 'taql'.
68 // The code for parsing and executing TaQL commands is quite complex.
69 // Processing a command consists of two steps.
70 // <ol>
71 // <li>
72 // First a command is parsed using 'flex' and 'bison'. The file TableGram.ll
73 // is used by 'flex' to recognize the tokens in the command. The file
74 // TableGram.yy defines the grammar which is used by bison to invoke
75 // actions on the recognized parts of the command. These actions
76 // consist of building a parse tree by means of class TaQLNode and
77 // associated classes. In this way the command is syntactically checked.
78 // <li>
79 // If the parsing is done successfully, the command is executed
80 // by walking through the parse tree using class TaQLNodeHandler.
81 // In its turn that class invokes functions in class TableParseQuery
82 // to check (semantically) and execute commands such as SELECT, UPDATE, etc..
83 // Note that subqueries are executed before the entire parse tree has
84 // been walked through, thus before possible later semantic errors are
85 // detected.
86 // <br>Expressions in the parse tree are converted to expression trees
87 // using the various TableExprNode classes. Expression trees are evaluated
88 // for each row in a table. Note that expressions can be used in many
89 // parts of a TaQL command.
90 // Functions in a command are handled by TableParseFunc.
91 // </ol>
92 //
93 // Expression trees can also be generated directly in C++ using class
94 // TableExprNode which is overloaded for many operators and functions
95 // (such as sin, max, etc.). In fact, TaQLNodeHandler uses this code.
96 // For example:
97 // <example>
98 // <srcblock>
99 // Table tab("my.ms");
100 // Table selection (tab(tab.col("ANTENNA1") == tab.col("ANTENNA2") &&
101 // tab.col("SPECTRAL_WINDOW_ID") == 0));
102 // </srcblock>
103 // creates a (reference) table containing the autocorrelations of the
104 // first spectral window in "my.ms".
105 // </example>
106 // </synopsis>
107 // </module>
108
109} //# NAMESPACE CASACORE - END
110
111#endif
this file contains all the compiler specific defines
Definition mainpage.dox:28