casacore
|
Class to handle the nodes in the raw TaQL parse tree. More...
#include <TaQLNodeHandler.h>
Static Public Member Functions | |
static const TaQLNodeHRValue & | getHR (const TaQLNodeResult &) |
Get the actual result object from the result. More... | |
Private Member Functions | |
TableParseSelect * | pushStack (TableParseSelect::CommandType) |
Push a new TableParseSelect on the stack. More... | |
TableParseSelect * | topStack () const |
Get the top of the TableParseSelect stack. More... | |
void | popStack () |
Pop the top from the TableParseSelect stack. More... | |
void | clearStack () |
Clear the select stack. More... | |
TaQLNodeResult | handleSelect (const TaQLSelectNodeRep &node, Bool doExec) |
Handle the select command. More... | |
void | handleTables (const TaQLMultiNode &) |
Handle a MultiNode containing table info. More... | |
void | handleWhere (const TaQLNode &) |
Handle the WHERE clause. More... | |
void | handleHaving (const TaQLNode &) |
Handle the HAVING clause. More... | |
void | handleUpdate (const TaQLMultiNode &) |
Handle the UPDATE SET clause. More... | |
void | handleInsCol (const TaQLMultiNode &) |
Handle the INSERT columns. More... | |
void | handleInsVal (const TaQLNode &) |
Handle the INSERT values. More... | |
void | handleColSpec (const TaQLMultiNode &) |
Handle a column specification in a create table. More... | |
Record | handleRecord (const TaQLMultiNodeRep *) |
Handle a record specification. More... | |
void | handleRecFld (const TaQLNode &, Record &) |
Handle a record field and add it to the Record. More... | |
void | handleMultiRecFld (const String &fldName, const TaQLMultiNodeRep *node, Record &rec) |
Handle a record field with multiple values and add it to the Record. More... | |
int | checkConstDtype (int dt1, int dt2) |
Determine 'highest' constant data type and check if they match. More... | |
Private Attributes | |
std::vector< TableParseSelect * > | itsStack |
std::vector< const Table * > | itsTempTables |
Additional Inherited Members | |
![]() | |
TaQLNodeResult | visitNode (const TaQLNode &node) |
A convenience function to visit the given node using this visitor. More... | |
Class to handle the nodes in the raw TaQL parse tree.
Internal
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.
Separating the raw query parsing from the query processing has several advantages compared to the old situation where parsing and processing were combined.
Definition at line 94 of file TaQLNodeHandler.h.
|
virtual |
|
private |
Determine 'highest' constant data type and check if they match.
|
private |
Clear the select stack.
|
inlinestatic |
Get the actual result object from the result.
Definition at line 306 of file TaQLNodeHandler.h.
References casacore::TaQLNodeResult::getRep().
|
private |
Handle a column specification in a create table.
|
private |
Handle the HAVING clause.
|
private |
Handle the INSERT columns.
|
private |
Handle the INSERT values.
|
private |
Handle a record field with multiple values and add it to the Record.
The field can be a record or a vector of values.
Handle a record field and add it to the Record.
|
private |
Handle a record specification.
|
private |
Handle the select command.
Optionally the command is not executed (needed for the EXISTS operator).
|
private |
Handle a MultiNode containing table info.
TaQLNodeResult casacore::TaQLNodeHandler::handleTree | ( | const TaQLNode & | tree, |
const std::vector< const Table * > & | |||
) |
Handle and process the raw parse tree.
The result contains a Table or TableExprNode object.
|
private |
Handle the UPDATE SET clause.
|
private |
Handle the WHERE clause.
|
private |
Pop the top from the TableParseSelect stack.
|
private |
Push a new TableParseSelect on the stack.
|
private |
Get the top of the TableParseSelect stack.
|
virtual |
Implements casacore::TaQLNodeVisitor.
|
virtual |
Implements casacore::TaQLNodeVisitor.
|
virtual |
Implements casacore::TaQLNodeVisitor.
|
virtual |
Implements casacore::TaQLNodeVisitor.
|
virtual |
Implements casacore::TaQLNodeVisitor.
|
virtual |
Define the functions to visit each node type.
Implements casacore::TaQLNodeVisitor.
|
virtual |
Implements casacore::TaQLNodeVisitor.
|
virtual |
Implements casacore::TaQLNodeVisitor.
|
virtual |
Implements casacore::TaQLNodeVisitor.
|
virtual |
Implements casacore::TaQLNodeVisitor.
|
virtual |
Implements casacore::TaQLNodeVisitor.
|
virtual |
Implements casacore::TaQLNodeVisitor.
|
virtual |
Implements casacore::TaQLNodeVisitor.
|
virtual |
Implements casacore::TaQLNodeVisitor.
|
virtual |
Implements casacore::TaQLNodeVisitor.
|
virtual |
Implements casacore::TaQLNodeVisitor.
|
virtual |
Implements casacore::TaQLNodeVisitor.
|
virtual |
Implements casacore::TaQLNodeVisitor.
|
virtual |
Implements casacore::TaQLNodeVisitor.
|
virtual |
Implements casacore::TaQLNodeVisitor.
|
virtual |
Implements casacore::TaQLNodeVisitor.
|
virtual |
Implements casacore::TaQLNodeVisitor.
|
virtual |
Implements casacore::TaQLNodeVisitor.
|
virtual |
Implements casacore::TaQLNodeVisitor.
|
virtual |
Implements casacore::TaQLNodeVisitor.
|
virtual |
Implements casacore::TaQLNodeVisitor.
|
virtual |
Implements casacore::TaQLNodeVisitor.
|
virtual |
Implements casacore::TaQLNodeVisitor.
|
virtual |
Implements casacore::TaQLNodeVisitor.
|
private |
Definition at line 196 of file TaQLNodeHandler.h.
|
private |
Definition at line 198 of file TaQLNodeHandler.h.