TaQLNodeHandler.h

Classes

TaQLNodeHandler -- Class to handle the nodes in the raw TaQL parse tree. (full description)
TaQLNodeHRValue -- Class containing the result value of the handling of a TaQLNode. (full description)

class TaQLNodeHandler : public TaQLNodeVisitor

Interface

Public Members
virtual ~TaQLNodeHandler()
TaQLNodeResult handleTree (const TaQLNode& tree, const std::vector<const vector*>&)
virtual TaQLNodeResult visitConstNode (const TaQLConstNodeRep& 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 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 visitCalcNode (const TaQLCalcNodeRep& node)
virtual TaQLNodeResult visitCreTabNode (const TaQLCreTabNodeRep& node)
virtual TaQLNodeResult visitColSpecNode (const TaQLColSpecNodeRep& node)
virtual TaQLNodeResult visitRecFldNode (const TaQLRecFldNodeRep& node)
static const TaQLNodeHRValue& getHR (const TaQLNodeResult&)
Private Members
TableParseSelect* pushStack (TableParseSelect::CommandType)
TableParseSelect* topStack() const
void popStack()
void clearStack()
TaQLNodeResult handleSelect (const TaQLSelectNodeRep& node, Bool doExec)
void handleTables (const TaQLMultiNode&)
void handleWhere (const TaQLNode&)
void handleUpdate (const TaQLMultiNode&)
void handleInsCol (const TaQLMultiNode&)
void handleInsVal (const TaQLNode&)
void handleColSpec (const TaQLMultiNode&)
Record handleRecord (const TaQLMultiNodeRep*)
void handleRecFld (const TaQLNode&, Record&)
void handleMultiRecFld (const String& fldName, const TaQLMultiNodeRep* node, Record& rec)
int checkConstDtype (int dt1, int dt2)

Description

Review Status

Programs:
Tests:

Prerequisite

Synopsis

TaQLNodeHandler is a specialization of class TaQLNodeVisitor. 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 TableParseSelect 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.

Motivation

Separating the raw query parsing from the query processing has several advantages compared to the old situation where parsing and processing were combined.