28 #ifndef TABLES_TAQLNODEHANDLER_H
29 #define TABLES_TAQLNODEHANDLER_H
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>
45 class TaQLNodeHRValue;
103 const std::vector<const Table*>&);
String: the storage and methods of handling collections of characters.
Raw TaQL parse tree node defining an alter table add column command.
Raw TaQL parse tree node defining an alter table add rows command.
Raw TaQL parse tree node defining an alter table command.
Raw TaQL parse tree node defining a binary operator.
Raw TaQL parse tree node defining a calc command.
Raw TaQL parse tree node defining a select column expression.
Raw TaQL parse tree node defining a create column specification.
Raw TaQL parse tree node defining a select column list.
Raw TaQL parse tree node defining an alter table command.
Raw TaQL parse tree node defining an alter table copy column command.
Raw TaQL parse tree node defining a count command.
Raw TaQL parse tree node defining a create table command.
Raw TaQL parse tree node defining a delete command.
Raw TaQL parse tree node defining a DROP TABLE command.
Raw TaQL parse tree node defining a function.
Raw TaQL parse tree node defining a giving expression list.
Raw TaQL parse tree node defining a groupby list.
Raw TaQL parse tree node defining an index in a array.
Raw TaQL parse tree node defining an insert command.
Raw TaQL parse tree node defining a join operation.
Raw TaQL parse tree node defining a keyword or column name.
Raw TaQL parse tree node defining a limit/offset expression.
Raw TaQL parse tree node defining a list of nodes.
Envelope class for a node containing a list of nodes.
Class containing the result value of the handling of a TaQLNode.
void setTable(const Table &table)
void setString(const String &str)
void setExprSet(TableExprNodeSet *set)
TaQLNodeHRValue(const TableExprNode &expr)
const String & getDtype() const
const Record & getRecord() const
const String & getString() const
const TableExprNodeSet & getExprSet() const
const Vector< String > * getNames() const
TableExprNodeSet * itsSet
const Table & getTable() const
Vector< String > * itsNames
const TableExprNode & getExpr() const
const String & getAlias() const
const TableExprNodeSetElem * getElem() const
void setRecord(const Record &record)
void setValueHolder(const ValueHolder &vh)
void setNameMask(const String &nameMask)
const String & getNameMask() const
void setDtype(const String &dtype)
void setElem(TableExprNodeSetElem *elem)
void setExpr(const TableExprNode &expr)
void setAlias(const String &alias)
virtual ~TaQLNodeHRValue()
void setInt(Int ival)
Set the values.
Int getInt() const
Get the values.
TableExprNodeSetElem * itsElem
void setNames(Vector< String > *names)
const ValueHolder & getValueHolder() const
std::vector< TableParseSelect * > itsStack
virtual TaQLNodeResult visitCopyColNode(const TaQLCopyColNodeRep &node)
virtual TaQLNodeResult visitTableNode(const TaQLTableNodeRep &node)
virtual TaQLNodeResult visitRangeNode(const TaQLRangeNodeRep &node)
Record handleMultiRecFld(const TaQLNode &node)
Handle a Multi RecFld representing a Record.
virtual TaQLNodeResult visitMultiNode(const TaQLMultiNodeRep &node)
void handleInsCol(const TaQLMultiNode &)
Handle the INSERT columns.
void handleColSpecs(const TaQLMultiNode &)
Handle a column specification in a create table or add column.
virtual TaQLNodeResult visitInsertNode(const TaQLInsertNodeRep &node)
virtual TaQLNodeResult visitRegexNode(const TaQLRegexNodeRep &node)
virtual TaQLNodeResult visitCalcNode(const TaQLCalcNodeRep &node)
virtual TaQLNodeResult visitColNode(const TaQLColNodeRep &node)
virtual TaQLNodeResult visitUnitNode(const TaQLUnitNodeRep &node)
virtual TaQLNodeResult visitDropTabNode(const TaQLDropTabNodeRep &node)
void handleHaving(const TaQLNode &)
Handle the HAVING clause.
virtual TaQLNodeResult visitJoinNode(const TaQLJoinNodeRep &node)
virtual TaQLNodeResult visitFuncNode(const TaQLFuncNodeRep &node)
virtual TaQLNodeResult visitColSpecNode(const TaQLColSpecNodeRep &node)
void handleUpdate(const TaQLMultiNode &)
Handle the UPDATE SET clause.
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.
void clearStack()
Clear the select stack.
TaQLNodeResult handleTree(const TaQLNode &tree, const std::vector< const Table * > &)
Handle and process the raw parse tree.
virtual TaQLNodeResult visitBinaryNode(const TaQLBinaryNodeRep &node)
virtual TaQLNodeResult visitDeleteNode(const TaQLDeleteNodeRep &node)
virtual TaQLNodeResult visitSortNode(const TaQLSortNodeRep &node)
virtual TaQLNodeResult visitShowNode(const TaQLShowNodeRep &node)
TableParseSelect * topStack() const
Get the top of the TableParseSelect stack.
virtual TaQLNodeResult visitKeyColNode(const TaQLKeyColNodeRep &node)
virtual TaQLNodeResult visitSortKeyNode(const TaQLSortKeyNodeRep &node)
void handleLikeDrop(const TaQLMultiNode &node)
Handle the possible LIKE table DROP COLUMN part.
Table makeConcatTable(const TaQLMultiNodeRep &node)
Make a ConcatTable from a nested set of tables.
virtual TaQLNodeResult visitAddRowNode(const TaQLAddRowNodeRep &node)
virtual TaQLNodeResult visitColumnsNode(const TaQLColumnsNodeRep &node)
virtual TaQLNodeResult visitLimitOffNode(const TaQLLimitOffNodeRep &node)
virtual TaQLNodeResult visitCreTabNode(const TaQLCreTabNodeRep &node)
TableParseSelect * pushStack(TableParseSelect::CommandType)
Push a new TableParseSelect on the stack.
virtual TaQLNodeResult visitRecFldNode(const TaQLRecFldNodeRep &node)
virtual TaQLNodeResult visitConcTabNode(const TaQLConcTabNodeRep &node)
virtual TaQLNodeResult visitGivingNode(const TaQLGivingNodeRep &node)
virtual TaQLNodeResult visitSelectNode(const TaQLSelectNodeRep &node)
virtual ~TaQLNodeHandler()
std::vector< const Table * > itsTempTables
virtual TaQLNodeResult visitIndexNode(const TaQLIndexNodeRep &node)
virtual TaQLNodeResult visitCountNode(const TaQLCountNodeRep &node)
virtual TaQLNodeResult visitAltTabNode(const TaQLAltTabNodeRep &node)
void handleTables(const TaQLMultiNode &, Bool addToFromList=True)
Handle a MultiNode containing table info.
virtual TaQLNodeResult visitAddColNode(const TaQLAddColNodeRep &node)
virtual TaQLNodeResult visitGroupNode(const TaQLGroupNodeRep &node)
virtual TaQLNodeResult visitUnaryNode(const TaQLUnaryNodeRep &node)
virtual TaQLNodeResult visitUpdExprNode(const TaQLUpdExprNodeRep &node)
void popStack()
Pop the top from the TableParseSelect stack.
void handleInsVal(const TaQLNode &)
Handle the INSERT values.
virtual TaQLNodeResult visitSetKeyNode(const TaQLSetKeyNodeRep &node)
static const TaQLNodeHRValue & getHR(const TaQLNodeResult &)
Get the actual result object from the result.
TaQLNodeResult handleSelect(const TaQLSelectNodeRep &node, Bool doExec)
Handle the select command.
virtual TaQLNodeResult visitRenDropNode(const TaQLRenDropNodeRep &node)
void handleWhere(const TaQLNode &)
Handle the WHERE clause.
virtual TaQLNodeResult visitConstNode(const TaQLConstNodeRep &node)
Define the functions to visit each node type.
virtual TaQLNodeResult visitUpdateNode(const TaQLUpdateNodeRep &node)
Envelope class to hold the result of a visit to the node tree.
const TaQLNodeResultRep * getRep() const
Get the actual underlying object.
Raw TaQL parse tree node defining a range.
Raw TaQL parse tree node defining a record field.
Raw TaQL parse tree node defining a constant regex value.
Raw TaQL parse tree node defining an alter table rename or drop command.
Raw TaQL parse tree node defining a select command.
Raw TaQL parse tree node defining an alter table set keyword command.
Raw TaQL parse tree node defining a show command.
Raw TaQL parse tree node defining a sort key.
Raw TaQL parse tree node defining a sort list.
Raw TaQL parse tree node defining a table.
Raw TaQL parse tree node defining a unary operator.
Raw TaQL parse tree node defining a unit.
Raw TaQL parse tree node defining a column update expression.
Raw TaQL parse tree node defining an update command.
Class to hold multiple table expression nodes.
Select-class for flex/bison scanner/parser for TableParse.
this file contains all the compiler specific defines
bool Bool
Define the standard types used by Casacore.