Loading...
Searching...
No Matches
TaQLNodeHandler.h
Go to the documentation of this file.
//# TaQLNodeHandler.h: Classes to handle the nodes in the raw TaQL parse tree
//# Copyright (C) 2005
//# Associated Universities, Inc. Washington DC, USA.
//#
//# This library is free software; you can redistribute it and/or modify it
//# under the terms of the GNU Library General Public License as published by
//# the Free Software Foundation; either version 2 of the License, or (at your
//# option) any later version.
//#
//# This library is distributed in the hope that it will be useful, but WITHOUT
//# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
//# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
//# License for more details.
//#
//# You should have received a copy of the GNU Library General Public License
//# along with this library; if not, write to the Free Software Foundation,
//# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
//#
//# Correspondence concerning AIPS++ should be addressed as follows:
//# Internet email: casa-feedback@nrao.edu.
//# Postal address: AIPS++ Project Office
//# National Radio Astronomy Observatory
//# 520 Edgemont Road
//# Charlottesville, VA 22903-2475 USA
#ifndef TABLES_TAQLNODEHANDLER_H
#define TABLES_TAQLNODEHANDLER_H
//# Includes
#include <casacore/casa/aips.h>
#include <casacore/tables/TaQL/TaQLNodeVisitor.h>
#include <casacore/tables/TaQL/TaQLNodeDer.h>
#include <casacore/tables/TaQL/TableParseQuery.h>
#include <casacore/tables/TaQL/ExprNode.h>
#include <casacore/tables/TaQL/ExprNodeSet.h>
#include <casacore/casa/Containers/Record.h>
#include <casacore/casa/Containers/ValueHolder.h>
#include <vector>
namespace casacore { //# NAMESPACE CASACORE - BEGIN
//# Forward Declarations
class TaQLNodeHRValue;
// <summary>
// Class to handle the nodes in the raw TaQL parse tree.
// </summary>
// <use visibility=local>
// <reviewed reviewer="" date="" tests="tTableGram">
// </reviewed>
// <prerequisite>
//# Classes you should understand before using this one.
// <li> <linkto class=TaQLNode>TaQLNode</linkto>
// <li> Note 199 describing
// <a href="../notes/199.html">
// TaQL</a>
// </prerequisite>
// <synopsis>
// TaQLNodeHandler is a specialization of class
// <linkto class=TaQLNodeVisitor>TaQLNodeVisitor</linkto>.
// It processes the raw TaQL parse tree generated by TableGram.
// The processing is done in a recursive way. It starts at the top
// (which is a SELECT, UPDATE, etc. expression) and the processing
// results of a query are stored in a TableParseQuery object.
// These objects are kept in a stack for possible nested queries.
// After a query is fully processed, it is executed. Usually the result
// is a table; only a CALC command gives a TableExprNode as result.
// </synopsis>
// <motivation>
// Separating the raw query parsing from the query processing has
// several advantages compared to the old situation where parsing
// and processing were combined.
// <ul>
// <li> The full command is parsed before any processing is done.
// So in case of a parse error, no possibly expensive processing
// has been done yet.
// <li> In the future query optimization can be done in an easier way.
// <li> Nested parsing is not possible. In case a Table is opened
// with a virtual TaQL column, the parsing of that TaQL string
// does not interfere with parsing the TaQL command.
// <li> It is possible to use expressions in the column list.
// That could not be done before, because the column list was
// parsed/processed before the table list.
// </ul>
// </motivation>
class TaQLNodeHandler : public TaQLNodeVisitor
{
public:
virtual ~TaQLNodeHandler();
// Handle and process the raw parse tree.
// The result contains a Table or TableExprNode object.
TaQLNodeResult handleTree (const TaQLNode& tree,
const std::vector<const Table*>&);
// Define the functions to visit each node type.
// <group>
virtual TaQLNodeResult visitConstNode (const TaQLConstNodeRep& node);
virtual TaQLNodeResult visitRegexNode (const TaQLRegexNodeRep& node);
virtual TaQLNodeResult visitUnaryNode (const TaQLUnaryNodeRep& node);
virtual TaQLNodeResult visitBinaryNode (const TaQLBinaryNodeRep& node);
virtual TaQLNodeResult visitMultiNode (const TaQLMultiNodeRep& node);
virtual TaQLNodeResult visitFuncNode (const TaQLFuncNodeRep& node);
virtual TaQLNodeResult visitRangeNode (const TaQLRangeNodeRep& node);
virtual TaQLNodeResult visitIndexNode (const TaQLIndexNodeRep& node);
virtual TaQLNodeResult visitKeyColNode (const TaQLKeyColNodeRep& node);
virtual TaQLNodeResult visitTableNode (const TaQLTableNodeRep& node);
virtual TaQLNodeResult visitColNode (const TaQLColNodeRep& node);
virtual TaQLNodeResult visitColumnsNode (const TaQLColumnsNodeRep& node);
virtual TaQLNodeResult visitJoinNode (const TaQLJoinNodeRep& node);
virtual TaQLNodeResult visitGroupNode (const TaQLGroupNodeRep& node);
virtual TaQLNodeResult visitSortKeyNode (const TaQLSortKeyNodeRep& node);
virtual TaQLNodeResult visitSortNode (const TaQLSortNodeRep& node);
virtual TaQLNodeResult visitLimitOffNode (const TaQLLimitOffNodeRep& node);
virtual TaQLNodeResult visitGivingNode (const TaQLGivingNodeRep& node);
virtual TaQLNodeResult visitUpdExprNode (const TaQLUpdExprNodeRep& node);
virtual TaQLNodeResult visitSelectNode (const TaQLSelectNodeRep& node);
virtual TaQLNodeResult visitUpdateNode (const TaQLUpdateNodeRep& node);
virtual TaQLNodeResult visitInsertNode (const TaQLInsertNodeRep& node);
virtual TaQLNodeResult visitDeleteNode (const TaQLDeleteNodeRep& node);
virtual TaQLNodeResult visitCountNode (const TaQLCountNodeRep& node);
virtual TaQLNodeResult visitCalcNode (const TaQLCalcNodeRep& node);
virtual TaQLNodeResult visitCreTabNode (const TaQLCreTabNodeRep& node);
virtual TaQLNodeResult visitColSpecNode (const TaQLColSpecNodeRep& node);
virtual TaQLNodeResult visitRecFldNode (const TaQLRecFldNodeRep& node);
virtual TaQLNodeResult visitUnitNode (const TaQLUnitNodeRep& node);
virtual TaQLNodeResult visitAltTabNode (const TaQLAltTabNodeRep& node);
virtual TaQLNodeResult visitAddColNode (const TaQLAddColNodeRep& node);
virtual TaQLNodeResult visitSetKeyNode (const TaQLSetKeyNodeRep& node);
virtual TaQLNodeResult visitRenDropNode (const TaQLRenDropNodeRep& node);
virtual TaQLNodeResult visitAddRowNode (const TaQLAddRowNodeRep& node);
virtual TaQLNodeResult visitConcTabNode (const TaQLConcTabNodeRep& node);
virtual TaQLNodeResult visitShowNode (const TaQLShowNodeRep& node);
virtual TaQLNodeResult visitCopyColNode (const TaQLCopyColNodeRep& node);
virtual TaQLNodeResult visitDropTabNode (const TaQLDropTabNodeRep& node);
// </group>
// Get the actual result object from the result.
static const TaQLNodeHRValue& getHR (const TaQLNodeResult&);
private:
// Push a new TableParseQuery on the stack.
TableParseQuery* pushStack (TableParseQuery::CommandType);
// Get the top of the TableParseQuery stack.
TableParseQuery* topStack() const;
// Pop the top from the TableParseQuery stack.
void popStack();
// Clear the select stack.
void clearStack();
// Handle the select command.
// Optionally the command is not executed (needed for the EXISTS operator).
TaQLNodeResult handleSelect (const TaQLSelectNodeRep& node, Bool doExec);
// Handle a table name or temptable number in the given node
// and put it in the value result.
void handleTableName (TaQLNodeHRValue* hrval, const TaQLNode& node);
// Handle a MultiNode containing table info.
void handleTables (const TaQLMultiNode&, Bool addToFromList=True);
// Handle a MultiNoide containing joins.
void handleJoins (const TaQLMultiNode& node);
// Make a ConcatTable from a nested set of tables.
Table makeConcatTable (const TaQLMultiNodeRep& node);
// Handle the WHERE clause.
void handleWhere (const TaQLNode&);
// Handle the HAVING clause.
void handleHaving (const TaQLNode&);
// Handle the UPDATE SET clause.
void handleUpdate (const TaQLMultiNode&);
// Handle the INSERT columns.
void handleInsCol (const TaQLMultiNode&);
// Handle the INSERT values.
void handleInsVal (const TaQLNode&);
// Handle the possible LIKE table DROP COLUMN part.
void handleLikeDrop (const TaQLMultiNode& node);
// Handle a column specification in a create table or add column.
void handleColSpecs (const TaQLMultiNode&);
// Handle a Multi RecFld representing a Record.
Record handleMultiRecFld (const TaQLNode& node);
// Handle the MSID function.
TableExprNode handleIdFunc (const TaQLFuncNodeRep& node);
//# Data members
//# Use vector instead of stack because random access is needed.
std::vector<TableParseQuery*> itsStack;
//# The temporary tables referred to by $i in the TaQL string.
std::vector<const Table*> itsTempTables;
};
// <summary>
// Class containing the result value of the handling of a TaQLNode.
// </summary>
// <use visibility=local>
// <reviewed reviewer="" date="" tests="tTableGram">
// </reviewed>
// <prerequisite>
//# Classes you should understand before using this one.
// <li> <linkto class=TaQLNode>TaQLNodeResult</linkto>
// <li> <linkto class=TaQLNode>TaQLNodeHandler</linkto>
// <li> Note 199 describing
// <a href="../notes/199.html">
// TaQL</a>
// </prerequisite>
// <synopsis>
// TaQLNodeHRValue is a specialization of class
// <linkto class=TaQLNodeResultRep>TaQLNodeResultRep</linkto>.
// It contains the values resulting from handling a particular node.
// The object is effectively a collection of all possible values that
// need to be returned. Which values are filled in, depends on which node
// has been processed.
// <note> The getHR function in TaQLNodeHandler is very useful to
// extract/cast the TaQLNodeHRValue object from the general
// TaQLNodeResult object.
// </note>
// </synopsis>
class TaQLNodeHRValue: public TaQLNodeResultRep
{
public:
TaQLNodeHRValue()
: itsInt(-1), itsElem(0), itsSet(0), itsNames(0) {}
TaQLNodeHRValue (const TableExprNode& expr)
: itsInt(-1), itsExpr(expr), itsElem(0), itsSet(0), itsNames(0) {}
~TaQLNodeHRValue() override = default;
// Get the values.
// <group>
Int getInt() const
{ return itsInt; }
const String& getString() const
{ return itsString; }
const String& getAlias() const
{ return itsAlias; }
const String& getNameMask() const
{ return itsNameMask; }
const String& getDtype() const
{ return itsDtype; }
const Record& getRecord() const
{ return itsRecord; }
const ValueHolder& getValueHolder() const
{ return itsVH; }
const Table& getTable() const
{ return itsTable; }
const TableExprNode& getExpr() const
{ return itsExpr; }
const TableExprNodeSetElem* getElem() const
{ return itsElem; }
const TableExprNodeSet& getExprSet() const
{ return *itsSet; }
const Vector<String>& getNames() const
{ return itsNames; }
// </group>
// Set the values.
// If a pointer is given, it takes over the pointer.
// <group>
void setInt (Int ival)
{ itsInt = ival; }
void setString (const String& str)
{ itsString = str; }
void setAlias (const String& alias)
{ itsAlias = alias; }
void setNameMask (const String& nameMask)
{ itsNameMask = nameMask; }
void setDtype (const String& dtype)
{ itsDtype = dtype; }
void setRecord (const Record& record)
{ itsRecord = record; }
void setValueHolder (const ValueHolder& vh)
{ itsVH = vh; }
void setTable (const Table& table)
{ itsTable = table; }
void setExpr (const TableExprNode& expr)
{ itsExpr = expr; }
void setElem (TableExprNodeSetElem* elem)
{ itsElem = elem; }
void setExprSet (TableExprNodeSet* set)
{ itsSet = set; }
void setNames (const Vector<String>& names)
{ itsNames = names; }
// </group>
private:
Int itsInt;
String itsString;
String itsAlias;
String itsNameMask;
String itsDtype;
Record itsRecord;
ValueHolder itsVH;
Table itsTable;
TableExprNode itsExpr;
TableExprNodeSetElem* itsElem; //# is counted in itsExpr
TableExprNodeSet* itsSet; //# is counted in itsExpr
Vector<String> itsNames;
};
//# This function can only be implemented after TaQLNodeHRValue is declared.
inline const TaQLNodeHRValue& TaQLNodeHandler::getHR (const TaQLNodeResult& res)
{
return dynamic_cast<const TaQLNodeHRValue&>(res.getRep());
}
} //# NAMESPACE CASACORE - END
#endif
casacore::String
String: the storage and methods of handling collections of characters.
Definition String.h:223
casacore::TaQLAddColNodeRep
Raw TaQL parse tree node defining an alter table add column command.
Definition TaQLNodeDer.h:1169
casacore::TaQLAddRowNodeRep
Raw TaQL parse tree node defining an alter table add rows command.
Definition TaQLNodeDer.h:1252
casacore::TaQLAltTabNodeRep
Raw TaQL parse tree node defining an alter table command.
Definition TaQLNodeDer.h:1138
casacore::TaQLBinaryNodeRep
Raw TaQL parse tree node defining a binary operator.
Definition TaQLNodeDer.h:190
casacore::TaQLCalcNodeRep
Raw TaQL parse tree node defining a calc command.
Definition TaQLNodeDer.h:975
casacore::TaQLColNodeRep
Raw TaQL parse tree node defining a select column expression.
Definition TaQLNodeDer.h:482
casacore::TaQLColSpecNodeRep
Raw TaQL parse tree node defining a create column specification.
Definition TaQLNodeDer.h:1045
casacore::TaQLColumnsNodeRep
Raw TaQL parse tree node defining a select column list.
Definition TaQLNodeDer.h:514
casacore::TaQLConcTabNodeRep
Raw TaQL parse tree node defining an alter table command.
Definition TaQLNodeDer.h:1279
casacore::TaQLConstNodeRep
Definition TaQLNodeDer.h:60
casacore::TaQLCopyColNodeRep
Raw TaQL parse tree node defining an alter table copy column command.
Definition TaQLNodeDer.h:1337
casacore::TaQLCountNodeRep
Raw TaQL parse tree node defining a count command.
Definition TaQLNodeDer.h:837
casacore::TaQLCreTabNodeRep
Raw TaQL parse tree node defining a create table command.
Definition TaQLNodeDer.h:1009
casacore::TaQLDeleteNodeRep
Raw TaQL parse tree node defining a delete command.
Definition TaQLNodeDer.h:942
casacore::TaQLDropTabNodeRep
Raw TaQL parse tree node defining a DROP TABLE command.
Definition TaQLNodeDer.h:1365
casacore::TaQLFuncNodeRep
Raw TaQL parse tree node defining a function.
Definition TaQLNodeDer.h:293
casacore::TaQLGivingNodeRep
Raw TaQL parse tree node defining a giving expression list.
Definition TaQLNodeDer.h:670
casacore::TaQLGroupNodeRep
Raw TaQL parse tree node defining a groupby list.
Definition TaQLNodeDer.h:543
casacore::TaQLIndexNodeRep
Raw TaQL parse tree node defining an index in a array.
Definition TaQLNodeDer.h:360
casacore::TaQLInsertNodeRep
Raw TaQL parse tree node defining an insert command.
Definition TaQLNodeDer.h:907
casacore::TaQLJoinNodeRep
Raw TaQL parse tree node defining a join operation.
Definition TaQLNodeDer.h:391
casacore::TaQLKeyColNodeRep
Raw TaQL parse tree node defining a keyword or column name.
Definition TaQLNodeDer.h:420
casacore::TaQLLimitOffNodeRep
Raw TaQL parse tree node defining a limit/offset expression.
Definition TaQLNodeDer.h:641
casacore::TaQLMultiNodeRep
Raw TaQL parse tree node defining a list of nodes.
Definition TaQLNodeDer.h:246
casacore::TaQLMultiNode
Envelope class for a node containing a list of nodes.
Definition TaQLNode.h:225
casacore::TaQLNodeHRValue
Class containing the result value of the handling of a TaQLNode.
Definition TaQLNodeHandler.h:245
casacore::TaQLNodeHRValue::setTable
void setTable(const Table &table)
Definition TaQLNodeHandler.h:298
casacore::TaQLNodeHRValue::~TaQLNodeHRValue
~TaQLNodeHRValue() override=default
casacore::TaQLNodeHRValue::setString
void setString(const String &str)
Definition TaQLNodeHandler.h:286
casacore::TaQLNodeHRValue::setExprSet
void setExprSet(TableExprNodeSet *set)
Definition TaQLNodeHandler.h:304
casacore::TaQLNodeHRValue::getNameMask
const String & getNameMask() const
Definition TaQLNodeHandler.h:261
casacore::TaQLNodeHRValue::getElem
const TableExprNodeSetElem * getElem() const
Definition TaQLNodeHandler.h:273
casacore::TaQLNodeHRValue::TaQLNodeHRValue
TaQLNodeHRValue()
Definition TaQLNodeHandler.h:247
casacore::TaQLNodeHRValue::itsTable
Table itsTable
Definition TaQLNodeHandler.h:318
casacore::TaQLNodeHRValue::TaQLNodeHRValue
TaQLNodeHRValue(const TableExprNode &expr)
Definition TaQLNodeHandler.h:249
casacore::TaQLNodeHRValue::getExpr
const TableExprNode & getExpr() const
Definition TaQLNodeHandler.h:271
casacore::TaQLNodeHRValue::itsVH
ValueHolder itsVH
Definition TaQLNodeHandler.h:317
casacore::TaQLNodeHRValue::itsRecord
Record itsRecord
Definition TaQLNodeHandler.h:316
casacore::TaQLNodeHRValue::getNames
const Vector< String > & getNames() const
Definition TaQLNodeHandler.h:277
casacore::TaQLNodeHRValue::itsString
String itsString
Definition TaQLNodeHandler.h:312
casacore::TaQLNodeHRValue::setNames
void setNames(const Vector< String > &names)
Definition TaQLNodeHandler.h:306
casacore::TaQLNodeHRValue::itsSet
TableExprNodeSet * itsSet
Definition TaQLNodeHandler.h:321
casacore::TaQLNodeHRValue::setRecord
void setRecord(const Record &record)
Definition TaQLNodeHandler.h:294
casacore::TaQLNodeHRValue::itsNames
Vector< String > itsNames
Definition TaQLNodeHandler.h:322
casacore::TaQLNodeHRValue::getExprSet
const TableExprNodeSet & getExprSet() const
Definition TaQLNodeHandler.h:275
casacore::TaQLNodeHRValue::setValueHolder
void setValueHolder(const ValueHolder &vh)
Definition TaQLNodeHandler.h:296
casacore::TaQLNodeHRValue::setNameMask
void setNameMask(const String &nameMask)
Definition TaQLNodeHandler.h:290
casacore::TaQLNodeHRValue::itsAlias
String itsAlias
Definition TaQLNodeHandler.h:313
casacore::TaQLNodeHRValue::setDtype
void setDtype(const String &dtype)
Definition TaQLNodeHandler.h:292
casacore::TaQLNodeHRValue::getValueHolder
const ValueHolder & getValueHolder() const
Definition TaQLNodeHandler.h:267
casacore::TaQLNodeHRValue::getRecord
const Record & getRecord() const
Definition TaQLNodeHandler.h:265
casacore::TaQLNodeHRValue::getDtype
const String & getDtype() const
Definition TaQLNodeHandler.h:263
casacore::TaQLNodeHRValue::itsExpr
TableExprNode itsExpr
Definition TaQLNodeHandler.h:319
casacore::TaQLNodeHRValue::itsInt
Int itsInt
Definition TaQLNodeHandler.h:311
casacore::TaQLNodeHRValue::setElem
void setElem(TableExprNodeSetElem *elem)
Definition TaQLNodeHandler.h:302
casacore::TaQLNodeHRValue::setExpr
void setExpr(const TableExprNode &expr)
Definition TaQLNodeHandler.h:300
casacore::TaQLNodeHRValue::setAlias
void setAlias(const String &alias)
Definition TaQLNodeHandler.h:288
casacore::TaQLNodeHRValue::setInt
void setInt(Int ival)
Set the values.
Definition TaQLNodeHandler.h:284
casacore::TaQLNodeHRValue::itsNameMask
String itsNameMask
Definition TaQLNodeHandler.h:314
casacore::TaQLNodeHRValue::itsDtype
String itsDtype
Definition TaQLNodeHandler.h:315
casacore::TaQLNodeHRValue::getTable
const Table & getTable() const
Definition TaQLNodeHandler.h:269
casacore::TaQLNodeHRValue::getInt
Int getInt() const
Get the values.
Definition TaQLNodeHandler.h:255
casacore::TaQLNodeHRValue::itsElem
TableExprNodeSetElem * itsElem
Definition TaQLNodeHandler.h:320
casacore::TaQLNodeHRValue::getAlias
const String & getAlias() const
Definition TaQLNodeHandler.h:259
casacore::TaQLNodeHRValue::getString
const String & getString() const
Definition TaQLNodeHandler.h:257
casacore::TaQLNodeHandler
Definition TaQLNodeHandler.h:94
casacore::TaQLNodeHandler::visitCopyColNode
virtual TaQLNodeResult visitCopyColNode(const TaQLCopyColNodeRep &node)
casacore::TaQLNodeHandler::visitTableNode
virtual TaQLNodeResult visitTableNode(const TaQLTableNodeRep &node)
casacore::TaQLNodeHandler::visitRangeNode
virtual TaQLNodeResult visitRangeNode(const TaQLRangeNodeRep &node)
casacore::TaQLNodeHandler::handleMultiRecFld
Record handleMultiRecFld(const TaQLNode &node)
Handle a Multi RecFld representing a Record.
casacore::TaQLNodeHandler::pushStack
TableParseQuery * pushStack(TableParseQuery::CommandType)
Push a new TableParseQuery on the stack.
casacore::TaQLNodeHandler::visitMultiNode
virtual TaQLNodeResult visitMultiNode(const TaQLMultiNodeRep &node)
casacore::TaQLNodeHandler::handleInsCol
void handleInsCol(const TaQLMultiNode &)
Handle the INSERT columns.
casacore::TaQLNodeHandler::handleColSpecs
void handleColSpecs(const TaQLMultiNode &)
Handle a column specification in a create table or add column.
casacore::TaQLNodeHandler::visitInsertNode
virtual TaQLNodeResult visitInsertNode(const TaQLInsertNodeRep &node)
casacore::TaQLNodeHandler::visitRegexNode
virtual TaQLNodeResult visitRegexNode(const TaQLRegexNodeRep &node)
casacore::TaQLNodeHandler::visitCalcNode
virtual TaQLNodeResult visitCalcNode(const TaQLCalcNodeRep &node)
casacore::TaQLNodeHandler::visitColNode
virtual TaQLNodeResult visitColNode(const TaQLColNodeRep &node)
casacore::TaQLNodeHandler::visitUnitNode
virtual TaQLNodeResult visitUnitNode(const TaQLUnitNodeRep &node)
casacore::TaQLNodeHandler::visitDropTabNode
virtual TaQLNodeResult visitDropTabNode(const TaQLDropTabNodeRep &node)
casacore::TaQLNodeHandler::topStack
TableParseQuery * topStack() const
Get the top of the TableParseQuery stack.
casacore::TaQLNodeHandler::handleHaving
void handleHaving(const TaQLNode &)
Handle the HAVING clause.
casacore::TaQLNodeHandler::visitJoinNode
virtual TaQLNodeResult visitJoinNode(const TaQLJoinNodeRep &node)
casacore::TaQLNodeHandler::visitFuncNode
virtual TaQLNodeResult visitFuncNode(const TaQLFuncNodeRep &node)
casacore::TaQLNodeHandler::visitColSpecNode
virtual TaQLNodeResult visitColSpecNode(const TaQLColSpecNodeRep &node)
casacore::TaQLNodeHandler::handleUpdate
void handleUpdate(const TaQLMultiNode &)
Handle the UPDATE SET clause.
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::clearStack
void clearStack()
Clear the select stack.
casacore::TaQLNodeHandler::handleTree
TaQLNodeResult handleTree(const TaQLNode &tree, const std::vector< const Table * > &)
Handle and process the raw parse tree.
casacore::TaQLNodeHandler::visitBinaryNode
virtual TaQLNodeResult visitBinaryNode(const TaQLBinaryNodeRep &node)
casacore::TaQLNodeHandler::visitDeleteNode
virtual TaQLNodeResult visitDeleteNode(const TaQLDeleteNodeRep &node)
casacore::TaQLNodeHandler::visitSortNode
virtual TaQLNodeResult visitSortNode(const TaQLSortNodeRep &node)
casacore::TaQLNodeHandler::visitShowNode
virtual TaQLNodeResult visitShowNode(const TaQLShowNodeRep &node)
casacore::TaQLNodeHandler::visitKeyColNode
virtual TaQLNodeResult visitKeyColNode(const TaQLKeyColNodeRep &node)
casacore::TaQLNodeHandler::visitSortKeyNode
virtual TaQLNodeResult visitSortKeyNode(const TaQLSortKeyNodeRep &node)
casacore::TaQLNodeHandler::handleLikeDrop
void handleLikeDrop(const TaQLMultiNode &node)
Handle the possible LIKE table DROP COLUMN part.
casacore::TaQLNodeHandler::makeConcatTable
Table makeConcatTable(const TaQLMultiNodeRep &node)
Make a ConcatTable from a nested set of tables.
casacore::TaQLNodeHandler::visitAddRowNode
virtual TaQLNodeResult visitAddRowNode(const TaQLAddRowNodeRep &node)
casacore::TaQLNodeHandler::visitColumnsNode
virtual TaQLNodeResult visitColumnsNode(const TaQLColumnsNodeRep &node)
casacore::TaQLNodeHandler::visitLimitOffNode
virtual TaQLNodeResult visitLimitOffNode(const TaQLLimitOffNodeRep &node)
casacore::TaQLNodeHandler::visitCreTabNode
virtual TaQLNodeResult visitCreTabNode(const TaQLCreTabNodeRep &node)
casacore::TaQLNodeHandler::visitRecFldNode
virtual TaQLNodeResult visitRecFldNode(const TaQLRecFldNodeRep &node)
casacore::TaQLNodeHandler::itsStack
std::vector< TableParseQuery * > itsStack
Definition TaQLNodeHandler.h:207
casacore::TaQLNodeHandler::visitConcTabNode
virtual TaQLNodeResult visitConcTabNode(const TaQLConcTabNodeRep &node)
casacore::TaQLNodeHandler::visitGivingNode
virtual TaQLNodeResult visitGivingNode(const TaQLGivingNodeRep &node)
casacore::TaQLNodeHandler::visitSelectNode
virtual TaQLNodeResult visitSelectNode(const TaQLSelectNodeRep &node)
casacore::TaQLNodeHandler::~TaQLNodeHandler
virtual ~TaQLNodeHandler()
casacore::TaQLNodeHandler::itsTempTables
std::vector< const Table * > itsTempTables
Definition TaQLNodeHandler.h:209
casacore::TaQLNodeHandler::visitIndexNode
virtual TaQLNodeResult visitIndexNode(const TaQLIndexNodeRep &node)
casacore::TaQLNodeHandler::visitCountNode
virtual TaQLNodeResult visitCountNode(const TaQLCountNodeRep &node)
casacore::TaQLNodeHandler::visitAltTabNode
virtual TaQLNodeResult visitAltTabNode(const TaQLAltTabNodeRep &node)
casacore::TaQLNodeHandler::handleTables
void handleTables(const TaQLMultiNode &, Bool addToFromList=True)
Handle a MultiNode containing table info.
casacore::TaQLNodeHandler::visitAddColNode
virtual TaQLNodeResult visitAddColNode(const TaQLAddColNodeRep &node)
casacore::TaQLNodeHandler::visitGroupNode
virtual TaQLNodeResult visitGroupNode(const TaQLGroupNodeRep &node)
casacore::TaQLNodeHandler::visitUnaryNode
virtual TaQLNodeResult visitUnaryNode(const TaQLUnaryNodeRep &node)
casacore::TaQLNodeHandler::visitUpdExprNode
virtual TaQLNodeResult visitUpdExprNode(const TaQLUpdExprNodeRep &node)
casacore::TaQLNodeHandler::popStack
void popStack()
Pop the top from the TableParseQuery stack.
casacore::TaQLNodeHandler::handleJoins
void handleJoins(const TaQLMultiNode &node)
Handle a MultiNoide containing joins.
casacore::TaQLNodeHandler::handleIdFunc
TableExprNode handleIdFunc(const TaQLFuncNodeRep &node)
Handle the MSID function.
casacore::TaQLNodeHandler::handleInsVal
void handleInsVal(const TaQLNode &)
Handle the INSERT values.
casacore::TaQLNodeHandler::visitSetKeyNode
virtual TaQLNodeResult visitSetKeyNode(const TaQLSetKeyNodeRep &node)
casacore::TaQLNodeHandler::getHR
static const TaQLNodeHRValue & getHR(const TaQLNodeResult &)
Get the actual result object from the result.
Definition TaQLNodeHandler.h:327
casacore::TaQLNodeHandler::handleSelect
TaQLNodeResult handleSelect(const TaQLSelectNodeRep &node, Bool doExec)
Handle the select command.
casacore::TaQLNodeHandler::visitRenDropNode
virtual TaQLNodeResult visitRenDropNode(const TaQLRenDropNodeRep &node)
casacore::TaQLNodeHandler::handleWhere
void handleWhere(const TaQLNode &)
Handle the WHERE clause.
casacore::TaQLNodeHandler::visitConstNode
virtual TaQLNodeResult visitConstNode(const TaQLConstNodeRep &node)
Define the functions to visit each node type.
casacore::TaQLNodeHandler::visitUpdateNode
virtual TaQLNodeResult visitUpdateNode(const TaQLUpdateNodeRep &node)
casacore::TaQLNodeResultRep::TaQLNodeResultRep
TaQLNodeResultRep()
Default constructor.
Definition TaQLNodeResult.h:65
casacore::TaQLNodeResult
Envelope class to hold the result of a visit to the node tree.
Definition TaQLNodeResult.h:105
casacore::TaQLNodeResult::getRep
const TaQLNodeResultRep & getRep() const
Get the actual underlying object.
Definition TaQLNodeResult.h:121
casacore::TaQLNodeVisitor
Definition TaQLNodeVisitor.h:72
casacore::TaQLNode
Definition TaQLNode.h:82
casacore::TaQLRangeNodeRep
Raw TaQL parse tree node defining a range.
Definition TaQLNodeDer.h:323
casacore::TaQLRecFldNodeRep
Raw TaQL parse tree node defining a record field.
Definition TaQLNodeDer.h:1076
casacore::TaQLRegexNodeRep
Raw TaQL parse tree node defining a constant regex value.
Definition TaQLNodeDer.h:117
casacore::TaQLRenDropNodeRep
Raw TaQL parse tree node defining an alter table rename or drop command.
Definition TaQLNodeDer.h:1197
casacore::TaQLSelectNodeRep
Raw TaQL parse tree node defining a select command.
Definition TaQLNodeDer.h:790
casacore::TaQLSetKeyNodeRep
Raw TaQL parse tree node defining an alter table set keyword command.
Definition TaQLNodeDer.h:1225
casacore::TaQLShowNodeRep
Raw TaQL parse tree node defining a show command.
Definition TaQLNodeDer.h:1310
casacore::TaQLSortKeyNodeRep
Raw TaQL parse tree node defining a sort key.
Definition TaQLNodeDer.h:575
casacore::TaQLSortNodeRep
Raw TaQL parse tree node defining a sort list.
Definition TaQLNodeDer.h:608
casacore::TaQLTableNodeRep
Raw TaQL parse tree node defining a table.
Definition TaQLNodeDer.h:450
casacore::TaQLUnaryNodeRep
Raw TaQL parse tree node defining a unary operator.
Definition TaQLNodeDer.h:153
casacore::TaQLUnitNodeRep
Raw TaQL parse tree node defining a unit.
Definition TaQLNodeDer.h:1110
casacore::TaQLUpdExprNodeRep
Raw TaQL parse tree node defining a column update expression.
Definition TaQLNodeDer.h:703
casacore::TaQLUpdateNodeRep
Raw TaQL parse tree node defining an update command.
Definition TaQLNodeDer.h:870
casacore::TableExprNodeSetElem
Class to hold the table expression nodes for an element in a set.
Definition ExprNodeSetElem.h:564
casacore::TableExprNodeSet
Definition ExprNodeSet.h:87
casacore::TableExprNode
Definition ExprNode.h:154
casacore::TableParseQuery
Definition TableParseQuery.h:94
casacore::TableParseQuery::CommandType
CommandType
Definition TableParseQuery.h:96
casacore::Table
Definition Table.h:157
casacore::ValueHolder
Definition ValueHolder.h:66
casacore::Vector
Definition Vector.h:82
casacore::Record
Record()
casacore
this file contains all the compiler specific defines
Definition mainpage.dox:28
casacore::set
void set(const T &val)
Definition Block.h:532
casacore::Int
int Int
Definition aipstype.h:48
casacore::Bool
bool Bool
Define the standard types used by Casacore.
Definition aipstype.h:40
casacore::True
const Bool True
Definition aipstype.h:41