casacore
TaQLNodeHandler.h
Go to the documentation of this file.
1 //# TaQLNodeHandler.h: Classes to handle the nodes in the raw TaQL parse tree
2 //# Copyright (C) 2005
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: aips2-request@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 //# $Id$
27 
28 #ifndef TABLES_TAQLNODEHANDLER_H
29 #define TABLES_TAQLNODEHANDLER_H
30 
31 //# Includes
32 #include <casacore/casa/aips.h>
33 #include <casacore/tables/TaQL/TaQLNodeVisitor.h>
34 #include <casacore/tables/TaQL/TaQLNodeDer.h>
35 #include <casacore/tables/TaQL/TableParse.h>
36 #include <casacore/tables/TaQL/ExprNode.h>
37 #include <casacore/tables/TaQL/ExprNodeSet.h>
38 #include <casacore/casa/Containers/Record.h>
39 #include <casacore/casa/Containers/ValueHolder.h>
40 #include <vector>
41 
42 namespace casacore { //# NAMESPACE CASACORE - BEGIN
43 
44 //# Forward Declarations
45 class TaQLNodeHRValue;
46 
47 
48 // <summary>
49 // Class to handle the nodes in the raw TaQL parse tree.
50 // </summary>
51 
52 // <use visibility=local>
53 
54 // <reviewed reviewer="" date="" tests="tTableGram">
55 // </reviewed>
56 
57 // <prerequisite>
58 //# Classes you should understand before using this one.
59 // <li> <linkto class=TaQLNode>TaQLNode</linkto>
60 // <li> Note 199 describing
61 // <a href="../notes/199.html">
62 // TaQL</a>
63 // </prerequisite>
64 
65 // <synopsis>
66 // TaQLNodeHandler is a specialization of class
67 // <linkto class=TaQLNodeVisitor>TaQLNodeVisitor</linkto>.
68 // It processes the raw TaQL parse tree generated by TableGram.
69 // The processing is done in a recursive way. It starts at the top
70 // (which is a SELECT, UPDATE, etc. expression) and the processing
71 // results of a query are stored in a TableParseSelect object.
72 // These objects are kept in a stack for possible nested queries.
73 // After a query is fully processed, it is executed. Usually the result
74 // is a table; only a CALC command gives a TableExprNode as result.
75 // </synopsis>
76 
77 // <motivation>
78 // Separating the raw query parsing from the query processing has
79 // several advantages compared to the old situation where parsing
80 // and processing were combined.
81 // <ul>
82 // <li> The full command is parsed before any processing is done.
83 // So in case of a parse error, no possibly expensive processing
84 // has been done yet.
85 // <li> In the future query optimization can be done in an easier way.
86 // <li> Nested parsing is not possible. In case a Table is opened
87 // with a virtual TaQL column, the parsing of that TaQL string
88 // does not interfere with parsing the TaQL command.
89 // <li> It is possible to use expressions in the column list.
90 // That could not be done before, because the column list was
91 // parsed/processed before the table list.
92 // </ul>
93 // </motivation>
94 
96 {
97 public:
98  virtual ~TaQLNodeHandler();
99 
100  // Handle and process the raw parse tree.
101  // The result contains a Table or TableExprNode object.
102  TaQLNodeResult handleTree (const TaQLNode& tree,
103  const std::vector<const Table*>&);
104 
105  // Define the functions to visit each node type.
106  // <group>
107  virtual TaQLNodeResult visitConstNode (const TaQLConstNodeRep& node);
108  virtual TaQLNodeResult visitRegexNode (const TaQLRegexNodeRep& node);
109  virtual TaQLNodeResult visitUnaryNode (const TaQLUnaryNodeRep& node);
110  virtual TaQLNodeResult visitBinaryNode (const TaQLBinaryNodeRep& node);
111  virtual TaQLNodeResult visitMultiNode (const TaQLMultiNodeRep& node);
112  virtual TaQLNodeResult visitFuncNode (const TaQLFuncNodeRep& node);
113  virtual TaQLNodeResult visitRangeNode (const TaQLRangeNodeRep& node);
114  virtual TaQLNodeResult visitIndexNode (const TaQLIndexNodeRep& node);
115  virtual TaQLNodeResult visitKeyColNode (const TaQLKeyColNodeRep& node);
116  virtual TaQLNodeResult visitTableNode (const TaQLTableNodeRep& node);
117  virtual TaQLNodeResult visitColNode (const TaQLColNodeRep& node);
118  virtual TaQLNodeResult visitColumnsNode (const TaQLColumnsNodeRep& node);
119  virtual TaQLNodeResult visitJoinNode (const TaQLJoinNodeRep& node);
120  virtual TaQLNodeResult visitGroupNode (const TaQLGroupNodeRep& node);
121  virtual TaQLNodeResult visitSortKeyNode (const TaQLSortKeyNodeRep& node);
122  virtual TaQLNodeResult visitSortNode (const TaQLSortNodeRep& node);
124  virtual TaQLNodeResult visitGivingNode (const TaQLGivingNodeRep& node);
125  virtual TaQLNodeResult visitUpdExprNode (const TaQLUpdExprNodeRep& node);
126  virtual TaQLNodeResult visitSelectNode (const TaQLSelectNodeRep& node);
127  virtual TaQLNodeResult visitUpdateNode (const TaQLUpdateNodeRep& node);
128  virtual TaQLNodeResult visitInsertNode (const TaQLInsertNodeRep& node);
129  virtual TaQLNodeResult visitDeleteNode (const TaQLDeleteNodeRep& node);
130  virtual TaQLNodeResult visitCountNode (const TaQLCountNodeRep& node);
131  virtual TaQLNodeResult visitCalcNode (const TaQLCalcNodeRep& node);
132  virtual TaQLNodeResult visitCreTabNode (const TaQLCreTabNodeRep& node);
133  virtual TaQLNodeResult visitColSpecNode (const TaQLColSpecNodeRep& node);
134  virtual TaQLNodeResult visitRecFldNode (const TaQLRecFldNodeRep& node);
135  virtual TaQLNodeResult visitUnitNode (const TaQLUnitNodeRep& node);
136  virtual TaQLNodeResult visitAltTabNode (const TaQLAltTabNodeRep& node);
137  virtual TaQLNodeResult visitAddColNode (const TaQLAddColNodeRep& node);
138  virtual TaQLNodeResult visitSetKeyNode (const TaQLSetKeyNodeRep& node);
139  virtual TaQLNodeResult visitRenDropNode (const TaQLRenDropNodeRep& node);
140  virtual TaQLNodeResult visitAddRowNode (const TaQLAddRowNodeRep& node);
141  virtual TaQLNodeResult visitConcTabNode (const TaQLConcTabNodeRep& node);
142  virtual TaQLNodeResult visitShowNode (const TaQLShowNodeRep& node);
143  // </group>
144 
145  // Get the actual result object from the result.
146  static const TaQLNodeHRValue& getHR (const TaQLNodeResult&);
147 
148 private:
149  // Push a new TableParseSelect on the stack.
151 
152  // Get the top of the TableParseSelect stack.
153  TableParseSelect* topStack() const;
154 
155  // Pop the top from the TableParseSelect stack.
156  void popStack();
157 
158  // Clear the select stack.
159  void clearStack();
160 
161  // Handle the select command.
162  // Optionally the command is not executed (needed for the EXISTS operator).
163  TaQLNodeResult handleSelect (const TaQLSelectNodeRep& node, Bool doExec);
164 
165  // Handle a table name or temptable number in the given node
166  // and put it in the value result.
167  void handleTableName (TaQLNodeHRValue* hrval, const TaQLNode& node);
168 
169  // Handle a MultiNode containing table info.
170  void handleTables (const TaQLMultiNode&, Bool addToFromList=True);
171 
172  // Make a ConcatTable from a nested set of tables.
173  Table makeConcatTable (const TaQLMultiNodeRep& node);
174 
175  // Handle the WHERE clause.
176  void handleWhere (const TaQLNode&);
177 
178  // Handle the HAVING clause.
179  void handleHaving (const TaQLNode&);
180 
181  // Handle the UPDATE SET clause.
182  void handleUpdate (const TaQLMultiNode&);
183 
184  // Handle the INSERT columns.
185  void handleInsCol (const TaQLMultiNode&);
186 
187  // Handle the INSERT values.
188  void handleInsVal (const TaQLNode&);
189 
190  // Handle a column specification in a create table.
191  void handleColSpecs (const TaQLMultiNode&);
192 
193  // Handle a Multi RecFld representing a Record.
194  Record handleMultiRecFld (const TaQLNode& node);
195 
196 
197  //# Use vector instead of stack because it has random access
198  //# (which is used in TableParse.cc).
199  std::vector<TableParseSelect*> itsStack;
200  //# The temporary tables referred to by $i in the TaQL string.
201  std::vector<const Table*> itsTempTables;
202 };
203 
204 
205 // <summary>
206 // Class containing the result value of the handling of a TaQLNode.
207 // </summary>
208 
209 // <use visibility=local>
210 
211 // <reviewed reviewer="" date="" tests="tTableGram">
212 // </reviewed>
213 
214 // <prerequisite>
215 //# Classes you should understand before using this one.
216 // <li> <linkto class=TaQLNode>TaQLNodeResult</linkto>
217 // <li> <linkto class=TaQLNode>TaQLNodeHandler</linkto>
218 // <li> Note 199 describing
219 // <a href="../notes/199.html">
220 // TaQL</a>
221 // </prerequisite>
222 
223 // <synopsis>
224 // TaQLNodeHRValue is a specialization of class
225 // <linkto class=TaQLNodeResultRep>TaQLNodeResultRep</linkto>.
226 // It contains the values resulting from handling a particular node.
227 // The object is effectively a collection of all possible values that
228 // need to be returned. Which values are filled in, depends on which node
229 // has been processed.
230 // <note> The getHR function in TaQLNodeHandler is very useful to
231 // extract/cast the TaQLNodeHRValue object from the general
232 // TaQLNodeResult object.
233 // </note>
234 // </synopsis>
235 
237 {
238 public:
240  : itsInt(-1), itsElem(0), itsSet(0), itsNames(0) {}
242  : itsInt(-1), itsExpr(expr), itsElem(0), itsSet(0), itsNames(0) {}
243  virtual ~TaQLNodeHRValue();
244 
245  // Get the values.
246  // <group>
247  Int getInt() const
248  { return itsInt; }
249  const String& getString() const
250  { return itsString; }
251  const String& getAlias() const
252  { return itsAlias; }
253  const String& getNameMask() const
254  { return itsNameMask; }
255  const String& getDtype() const
256  { return itsDtype; }
257  const Record& getRecord() const
258  { return itsRecord; }
260  { return itsVH; }
261  const Table& getTable() const
262  { return itsTable; }
263  const TableExprNode& getExpr() const
264  { return itsExpr; }
266  { return itsElem; }
268  { return *itsSet; }
269  const Vector<String>* getNames() const
270  { return itsNames; }
271  // </group>
272 
273  // Set the values.
274  // If a pointer is given, it takes over the pointer.
275  // <group>
276  void setInt (Int ival)
277  { itsInt = ival; }
278  void setString (const String& str)
279  { itsString = str; }
280  void setAlias (const String& alias)
281  { itsAlias = alias; }
282  void setNameMask (const String& nameMask)
283  { itsNameMask = nameMask; }
284  void setDtype (const String& dtype)
285  { itsDtype = dtype; }
286  void setRecord (const Record& record)
287  { itsRecord = record; }
288  void setValueHolder (const ValueHolder& vh)
289  { itsVH = vh; }
290  void setTable (const Table& table)
291  { itsTable = table; }
292  void setExpr (const TableExprNode& expr)
293  { itsExpr = expr; }
295  { itsElem = elem; }
297  { itsSet = set; }
298  void setNames (Vector<String>* names)
299  { itsNames = names; }
300  // </group>
301 
302 private:
315 };
316 
317 
318 //# This function can only be implemented after TaQLNodeHRBase is declared.
320 {
321  return *(TaQLNodeHRValue*)(res.getRep());
322 }
323 
324 
325 
326 } //# NAMESPACE CASACORE - END
327 
328 #endif
casacore::TaQLNodeHandler::visitIndexNode
virtual TaQLNodeResult visitIndexNode(const TaQLIndexNodeRep &node)
casacore::TaQLNodeHandler::visitBinaryNode
virtual TaQLNodeResult visitBinaryNode(const TaQLBinaryNodeRep &node)
casacore::TaQLNodeHandler::handleTree
TaQLNodeResult handleTree(const TaQLNode &tree, const std::vector< const Table * > &)
Handle and process the raw parse tree.
casacore::TaQLNodeHRValue::itsExpr
TableExprNode itsExpr
Definition: TaQLNodeHandler.h:311
casacore::TaQLRangeNodeRep
Raw TaQL parse tree node defining a range.
Definition: TaQLNodeDer.h:330
casacore::TaQLNodeHandler::visitSortNode
virtual TaQLNodeResult visitSortNode(const TaQLSortNodeRep &node)
casacore::TaQLNodeHandler::visitShowNode
virtual TaQLNodeResult visitShowNode(const TaQLShowNodeRep &node)
casacore::TaQLNodeHandler::visitCreTabNode
virtual TaQLNodeResult visitCreTabNode(const TaQLCreTabNodeRep &node)
casacore::TaQLNodeHRValue::getElem
const TableExprNodeSetElem * getElem() const
Definition: TaQLNodeHandler.h:265
casacore::TableParseSelect::CommandType
CommandType
Definition: TableParse.h:384
casacore::TaQLNodeHandler::visitUnaryNode
virtual TaQLNodeResult visitUnaryNode(const TaQLUnaryNodeRep &node)
casacore::TaQLBinaryNodeRep
Raw TaQL parse tree node defining a binary operator.
Definition: TaQLNodeDer.h:194
casacore::TaQLKeyColNodeRep
Raw TaQL parse tree node defining a keyword or column name.
Definition: TaQLNodeDer.h:427
casacore::TaQLNodeHRValue::TaQLNodeHRValue
TaQLNodeHRValue(const TableExprNode &expr)
Definition: TaQLNodeHandler.h:241
casacore::TaQLNodeHandler::handleWhere
void handleWhere(const TaQLNode &)
Handle the WHERE clause.
casacore::TaQLRegexNodeRep
Raw TaQL parse tree node defining a constant regex value.
Definition: TaQLNodeDer.h:119
casacore::TaQLNodeHandler::visitMultiNode
virtual TaQLNodeResult visitMultiNode(const TaQLMultiNodeRep &node)
casacore::TaQLNodeHRValue::setString
void setString(const String &str)
Definition: TaQLNodeHandler.h:278
casacore::TaQLColumnsNodeRep
Raw TaQL parse tree node defining a select column list.
Definition: TaQLNodeDer.h:524
casacore::TaQLNodeHandler::handleMultiRecFld
Record handleMultiRecFld(const TaQLNode &node)
Handle a Multi RecFld representing a Record.
casacore::TaQLNodeHandler::~TaQLNodeHandler
virtual ~TaQLNodeHandler()
casacore::TaQLNodeHandler::visitTableNode
virtual TaQLNodeResult visitTableNode(const TaQLTableNodeRep &node)
casacore::TaQLCalcNodeRep
Raw TaQL parse tree node defining a calc command.
Definition: TaQLNodeDer.h:998
casacore::TaQLNodeHandler::visitSelectNode
virtual TaQLNodeResult visitSelectNode(const TaQLSelectNodeRep &node)
casacore::TaQLNodeHandler::visitColSpecNode
virtual TaQLNodeResult visitColSpecNode(const TaQLColSpecNodeRep &node)
casacore::TaQLNodeHandler::visitColumnsNode
virtual TaQLNodeResult visitColumnsNode(const TaQLColumnsNodeRep &node)
casacore::TaQLNodeHandler::visitRecFldNode
virtual TaQLNodeResult visitRecFldNode(const TaQLRecFldNodeRep &node)
casacore::TaQLNodeHRValue::getDtype
const String & getDtype() const
Definition: TaQLNodeHandler.h:255
casacore::TaQLNodeHandler::handleUpdate
void handleUpdate(const TaQLMultiNode &)
Handle the UPDATE SET clause.
casacore::TaQLNodeHRValue::~TaQLNodeHRValue
virtual ~TaQLNodeHRValue()
casacore::TaQLNodeHandler::visitRenDropNode
virtual TaQLNodeResult visitRenDropNode(const TaQLRenDropNodeRep &node)
casacore::TaQLNodeHandler::visitCalcNode
virtual TaQLNodeResult visitCalcNode(const TaQLCalcNodeRep &node)
casacore::TaQLGivingNodeRep
Raw TaQL parse tree node defining a giving expression list.
Definition: TaQLNodeDer.h:685
casacore::TaQLRecFldNodeRep
Raw TaQL parse tree node defining a record field.
Definition: TaQLNodeDer.h:1099
casacore::TaQLNodeHandler::visitUpdExprNode
virtual TaQLNodeResult visitUpdExprNode(const TaQLUpdExprNodeRep &node)
casacore::TaQLNodeHandler::handleColSpecs
void handleColSpecs(const TaQLMultiNode &)
Handle a column specification in a create table.
casacore::TableParseSelect
Select-class for flex/bison scanner/parser for TableParse.
Definition: TableParse.h:381
casacore::TaQLNodeHRValue::setNames
void setNames(Vector< String > *names)
Definition: TaQLNodeHandler.h:298
casacore::TaQLNodeHandler::handleSelect
TaQLNodeResult handleSelect(const TaQLSelectNodeRep &node, Bool doExec)
Handle the select command.
casacore::TaQLUpdateNodeRep
Raw TaQL parse tree node defining an update command.
Definition: TaQLNodeDer.h:890
casacore::TaQLNodeHandler::visitAltTabNode
virtual TaQLNodeResult visitAltTabNode(const TaQLAltTabNodeRep &node)
casacore::TaQLNodeHandler::visitConstNode
virtual TaQLNodeResult visitConstNode(const TaQLConstNodeRep &node)
Define the functions to visit each node type.
casacore::TaQLTableNodeRep
Raw TaQL parse tree node defining a table.
Definition: TaQLNodeDer.h:458
casacore::TaQLNodeHandler::makeConcatTable
Table makeConcatTable(const TaQLMultiNodeRep &node)
Make a ConcatTable from a nested set of tables.
casacore::TaQLNodeHandler::visitLimitOffNode
virtual TaQLNodeResult visitLimitOffNode(const TaQLLimitOffNodeRep &node)
casacore::TaQLNodeHandler::visitCountNode
virtual TaQLNodeResult visitCountNode(const TaQLCountNodeRep &node)
casacore::TaQLColNodeRep
Raw TaQL parse tree node defining a select column expression.
Definition: TaQLNodeDer.h:491
casacore::TaQLNodeResult::getRep
const TaQLNodeResultRep * getRep() const
Get the actual underlying object.
Definition: TaQLNodeResult.h:161
casacore::TaQLNodeHandler::visitSortKeyNode
virtual TaQLNodeResult visitSortKeyNode(const TaQLSortKeyNodeRep &node)
casacore::TaQLNode
Envelope class for a node in the raw TaQL parse tree.
Definition: TaQLNode.h:82
casacore::TaQLNodeHandler::handleInsCol
void handleInsCol(const TaQLMultiNode &)
Handle the INSERT columns.
casacore::TaQLNodeHandler::handleHaving
void handleHaving(const TaQLNode &)
Handle the HAVING clause.
casacore::TaQLNodeResult
Envelope class to hold the result of a visit to the node tree.
Definition: TaQLNodeResult.h:123
casacore::TaQLNodeHandler::popStack
void popStack()
Pop the top from the TableParseSelect stack.
casacore::TaQLConcTabNodeRep
Raw TaQL parse tree node defining an alter table command.
Definition: TaQLNodeDer.h:1310
casacore::TaQLNodeHandler::visitDeleteNode
virtual TaQLNodeResult visitDeleteNode(const TaQLDeleteNodeRep &node)
casacore::TaQLNodeHandler::handleInsVal
void handleInsVal(const TaQLNode &)
Handle the INSERT values.
casacore::TaQLAddColNodeRep
Raw TaQL parse tree node defining an alter table add column command.
Definition: TaQLNodeDer.h:1196
casacore::TaQLNodeHRValue::setAlias
void setAlias(const String &alias)
Definition: TaQLNodeHandler.h:280
casacore::TaQLNodeHandler::itsStack
std::vector< TableParseSelect * > itsStack
Definition: TaQLNodeHandler.h:199
casacore::TaQLNodeHRValue::setRecord
void setRecord(const Record &record)
Definition: TaQLNodeHandler.h:286
casacore::TaQLNodeResultRep
Abstract base class to hold the result of a visit to the node tree.
Definition: TaQLNodeResult.h:62
casacore::TaQLNodeHRValue::setValueHolder
void setValueHolder(const ValueHolder &vh)
Definition: TaQLNodeHandler.h:288
casacore::TaQLNodeHRValue::setElem
void setElem(TableExprNodeSetElem *elem)
Definition: TaQLNodeHandler.h:294
casacore::TaQLLimitOffNodeRep
Raw TaQL parse tree node defining a limit/offset expression.
Definition: TaQLNodeDer.h:655
casacore::TaQLNodeHandler
Class to handle the nodes in the raw TaQL parse tree.
Definition: TaQLNodeHandler.h:95
casacore::TaQLNodeHRValue::itsVH
ValueHolder itsVH
Definition: TaQLNodeHandler.h:309
casacore::TaQLNodeHRValue::getValueHolder
const ValueHolder & getValueHolder() const
Definition: TaQLNodeHandler.h:259
casacore::TaQLRenDropNodeRep
Raw TaQL parse tree node defining an alter table rename or drop command.
Definition: TaQLNodeDer.h:1225
casacore::TaQLNodeHandler::itsTempTables
std::vector< const Table * > itsTempTables
Definition: TaQLNodeHandler.h:201
casacore::TaQLNodeHandler::handleTableName
void handleTableName(TaQLNodeHRValue *hrval, const TaQLNode &node)
Handle a table name or temptable number in the given node and put it in the value result.
casacore::TaQLNodeHandler::visitInsertNode
virtual TaQLNodeResult visitInsertNode(const TaQLInsertNodeRep &node)
casacore::TaQLNodeHandler::clearStack
void clearStack()
Clear the select stack.
casacore::Table
Main interface class to a read/write table.
Definition: Table.h:153
casacore::TaQLNodeHRValue::itsAlias
String itsAlias
Definition: TaQLNodeHandler.h:305
casacore::TaQLNodeHandler::pushStack
TableParseSelect * pushStack(TableParseSelect::CommandType)
Push a new TableParseSelect on the stack.
casacore::TaQLInsertNodeRep
Raw TaQL parse tree node defining an insert command.
Definition: TaQLNodeDer.h:928
casacore::TaQLNodeHRValue::getInt
Int getInt() const
Get the values.
Definition: TaQLNodeHandler.h:247
casacore::TaQLNodeHRValue::getNameMask
const String & getNameMask() const
Definition: TaQLNodeHandler.h:253
casacore::TaQLNodeHRValue::setDtype
void setDtype(const String &dtype)
Definition: TaQLNodeHandler.h:284
casacore::TaQLNodeHRValue::itsNameMask
String itsNameMask
Definition: TaQLNodeHandler.h:306
casacore::TaQLMultiNode
Envelope class for a node containing a list of nodes.
Definition: TaQLNode.h:226
casacore::TaQLNodeHRValue::setNameMask
void setNameMask(const String &nameMask)
Definition: TaQLNodeHandler.h:282
casacore::TaQLNodeHandler::topStack
TableParseSelect * topStack() const
Get the top of the TableParseSelect stack.
casacore::TaQLNodeHandler::visitAddColNode
virtual TaQLNodeResult visitAddColNode(const TaQLAddColNodeRep &node)
casacore::TaQLNodeHandler::visitKeyColNode
virtual TaQLNodeResult visitKeyColNode(const TaQLKeyColNodeRep &node)
casacore::TaQLNodeHRValue::itsInt
Int itsInt
Definition: TaQLNodeHandler.h:303
casacore::TaQLNodeHandler::visitConcTabNode
virtual TaQLNodeResult visitConcTabNode(const TaQLConcTabNodeRep &node)
casacore::Int
int Int
Definition: aipstype.h:50
casacore
this file contains all the compiler specific defines
Definition: mainpage.dox:28
casacore::TaQLSelectNodeRep
Raw TaQL parse tree node defining a select command.
Definition: TaQLNodeDer.h:808
casacore::TaQLUnitNodeRep
Raw TaQL parse tree node defining a unit.
Definition: TaQLNodeDer.h:1134
casacore::TaQLNodeHandler::visitAddRowNode
virtual TaQLNodeResult visitAddRowNode(const TaQLAddRowNodeRep &node)
casacore::TaQLAltTabNodeRep
Raw TaQL parse tree node defining an alter table command.
Definition: TaQLNodeDer.h:1163
casacore::TableExprNodeSet
Class to hold multiple table expression nodes.
Definition: ExprNodeSet.h:311
casacore::TaQLSortNodeRep
Raw TaQL parse tree node defining a sort list.
Definition: TaQLNodeDer.h:621
casacore::True
const Bool True
Definition: aipstype.h:43
casacore::TaQLNodeHandler::handleTables
void handleTables(const TaQLMultiNode &, Bool addToFromList=True)
Handle a MultiNode containing table info.
casacore::TaQLNodeHRValue::getRecord
const Record & getRecord() const
Definition: TaQLNodeHandler.h:257
casacore::TaQLNodeHRValue::getExpr
const TableExprNode & getExpr() const
Definition: TaQLNodeHandler.h:263
casacore::TaQLFuncNodeRep
Raw TaQL parse tree node defining a function.
Definition: TaQLNodeDer.h:299
casacore::TaQLNodeHandler::visitSetKeyNode
virtual TaQLNodeResult visitSetKeyNode(const TaQLSetKeyNodeRep &node)
casacore::TableExprNode
Handle class for a table column expression tree.
Definition: ExprNode.h:155
casacore::TaQLNodeHandler::visitJoinNode
virtual TaQLNodeResult visitJoinNode(const TaQLJoinNodeRep &node)
casacore::TaQLNodeHRValue::getTable
const Table & getTable() const
Definition: TaQLNodeHandler.h:261
casacore::TaQLShowNodeRep
Raw TaQL parse tree node defining a show command.
Definition: TaQLNodeDer.h:1342
casacore::TaQLUpdExprNodeRep
Raw TaQL parse tree node defining a column update expression.
Definition: TaQLNodeDer.h:719
casacore::TaQLIndexNodeRep
Raw TaQL parse tree node defining an index in a array.
Definition: TaQLNodeDer.h:365
casacore::TaQLNodeHRValue::itsRecord
Record itsRecord
Definition: TaQLNodeHandler.h:308
casacore::TaQLNodeHandler::visitRegexNode
virtual TaQLNodeResult visitRegexNode(const TaQLRegexNodeRep &node)
casacore::TaQLNodeVisitor
Class to visit the nodes in the raw TaQL parse tree.
Definition: TaQLNodeVisitor.h:73
casacore::TaQLNodeHRValue::getString
const String & getString() const
Definition: TaQLNodeHandler.h:249
casacore::TaQLNodeHRValue::itsTable
Table itsTable
Definition: TaQLNodeHandler.h:310
casacore::TaQLNodeHRValue::setExpr
void setExpr(const TableExprNode &expr)
Definition: TaQLNodeHandler.h:292
casacore::TaQLConstNodeRep
Raw TaQL parse tree node defining a constant value.
Definition: TaQLNodeDer.h:61
casacore::TaQLNodeHandler::visitRangeNode
virtual TaQLNodeResult visitRangeNode(const TaQLRangeNodeRep &node)
casacore::TaQLNodeHandler::visitGivingNode
virtual TaQLNodeResult visitGivingNode(const TaQLGivingNodeRep &node)
casacore::TaQLNodeHRValue::itsString
String itsString
Definition: TaQLNodeHandler.h:304
casacore::TaQLAddRowNodeRep
Raw TaQL parse tree node defining an alter table add rows command.
Definition: TaQLNodeDer.h:1282
casacore::TaQLNodeHandler::visitFuncNode
virtual TaQLNodeResult visitFuncNode(const TaQLFuncNodeRep &node)
casacore::TaQLNodeHandler::visitUnitNode
virtual TaQLNodeResult visitUnitNode(const TaQLUnitNodeRep &node)
casacore::TaQLNodeHRValue::getNames
const Vector< String > * getNames() const
Definition: TaQLNodeHandler.h:269
casacore::TaQLJoinNodeRep
Raw TaQL parse tree node defining a join operation.
Definition: TaQLNodeDer.h:397
casacore::TaQLNodeHRValue::TaQLNodeHRValue
TaQLNodeHRValue()
Definition: TaQLNodeHandler.h:239
casacore::String
String: the storage and methods of handling collections of characters.
Definition: String.h:223
casacore::TaQLNodeHRValue::itsElem
TableExprNodeSetElem * itsElem
Definition: TaQLNodeHandler.h:312
casacore::Bool
bool Bool
Define the standard types used by Casacore.
Definition: aipstype.h:42
casacore::ValueHolder
A holder for a value of any basic Casacore data type.
Definition: ValueHolder.h:67
casacore::TaQLNodeHRValue::itsDtype
String itsDtype
Definition: TaQLNodeHandler.h:307
casacore::TaQLNodeHRValue
Class containing the result value of the handling of a TaQLNode.
Definition: TaQLNodeHandler.h:236
casacore::TaQLNodeHandler::visitUpdateNode
virtual TaQLNodeResult visitUpdateNode(const TaQLUpdateNodeRep &node)
casacore::TaQLNodeHRValue::itsSet
TableExprNodeSet * itsSet
Definition: TaQLNodeHandler.h:313
casacore::Record
A hierarchical collection of named fields of various types.
Definition: Record.h:180
casacore::Vector
A 1-D Specialization of the Array class.
Definition: ArrayIO.h:45
casacore::TaQLCountNodeRep
Raw TaQL parse tree node defining a count command.
Definition: TaQLNodeDer.h:856
casacore::TaQLNodeHRValue::itsNames
Vector< String > * itsNames
Definition: TaQLNodeHandler.h:314
casacore::TaQLNodeHandler::visitGroupNode
virtual TaQLNodeResult visitGroupNode(const TaQLGroupNodeRep &node)
casacore::TaQLNodeHRValue::getAlias
const String & getAlias() const
Definition: TaQLNodeHandler.h:251
casacore::TaQLNodeHRValue::setTable
void setTable(const Table &table)
Definition: TaQLNodeHandler.h:290
casacore::TaQLColSpecNodeRep
Raw TaQL parse tree node defining a create column specification.
Definition: TaQLNodeDer.h:1068
casacore::TaQLMultiNodeRep
Raw TaQL parse tree node defining a list of nodes.
Definition: TaQLNodeDer.h:251
casacore::TaQLNodeHRValue::setExprSet
void setExprSet(TableExprNodeSet *set)
Definition: TaQLNodeHandler.h:296
casacore::TaQLSetKeyNodeRep
Raw TaQL parse tree node defining an alter table set keyword command.
Definition: TaQLNodeDer.h:1254
casacore::TableExprNodeSetElem
Class to hold the table expression nodes for an element in a set.
Definition: ExprNodeSet.h:94
casacore::TaQLGroupNodeRep
Raw TaQL parse tree node defining a groupby list.
Definition: TaQLNodeDer.h:554
casacore::TaQLSortKeyNodeRep
Raw TaQL parse tree node defining a sort key.
Definition: TaQLNodeDer.h:587
casacore::TaQLUnaryNodeRep
Raw TaQL parse tree node defining a unary operator.
Definition: TaQLNodeDer.h:156
casacore::TaQLDeleteNodeRep
Raw TaQL parse tree node defining a delete command.
Definition: TaQLNodeDer.h:964
casacore::TaQLNodeHandler::getHR
static const TaQLNodeHRValue & getHR(const TaQLNodeResult &)
Get the actual result object from the result.
Definition: TaQLNodeHandler.h:319
casacore::TaQLCreTabNodeRep
Raw TaQL parse tree node defining a create table command.
Definition: TaQLNodeDer.h:1033
casacore::TaQLNodeHRValue::getExprSet
const TableExprNodeSet & getExprSet() const
Definition: TaQLNodeHandler.h:267
casacore::TaQLNodeHandler::visitColNode
virtual TaQLNodeResult visitColNode(const TaQLColNodeRep &node)
casacore::TaQLNodeHRValue::setInt
void setInt(Int ival)
Set the values.
Definition: TaQLNodeHandler.h:276