28 #ifndef TABLES_TAQLNODEDER_H
29 #define TABLES_TAQLNODEDER_H
32 #include <casacore/casa/aips.h>
33 #include <casacore/tables/TaQL/TaQLNode.h>
34 #include <casacore/casa/BasicSL/Complex.h>
35 #include <casacore/casa/BasicSL/String.h>
36 #include <casacore/casa/Utilities/Regex.h>
37 #include <casacore/casa/Quanta/MVTime.h>
38 #include <casacore/casa/Containers/Block.h>
85 virtual void show (std::ostream& os)
const override;
123 Bool ignoreBlanks,
Int maxDistance);
125 virtual void show (std::ostream& os)
const override;
165 virtual void show (std::ostream& os)
const override;
219 virtual void show (std::ostream& os)
const override;
266 virtual void show (std::ostream& os)
const override;
300 virtual void show (std::ostream& os)
const override;
332 virtual void show (std::ostream& os)
const override;
364 virtual void show (std::ostream& os)
const override;
394 virtual void show (std::ostream& os)
const override;
423 virtual void show (std::ostream& os)
const override;
453 virtual void show (std::ostream& os)
const override;
486 virtual void show (std::ostream& os)
const override;
517 virtual void show (std::ostream& os)
const override;
549 virtual void show (std::ostream& os)
const override;
582 virtual void show (std::ostream& os)
const override;
614 virtual void show (std::ostream& os)
const override;
644 virtual void show (std::ostream& os)
const override;
674 virtual void show (std::ostream& os)
const override;
714 virtual void show (std::ostream& os)
const override;
759 virtual void show (std::ostream& os)
const override;
876 virtual void show (std::ostream& os)
const override;
914 virtual void show (std::ostream& os)
const override;
947 virtual void show (std::ostream& os)
const override;
980 virtual void show (std::ostream& os)
const override;
1049 virtual void show (std::ostream& os)
const override;
1083 virtual void show (std::ostream& os)
const override;
1113 virtual void show (std::ostream& os)
const override;
1172 virtual void show (std::ostream& os)
const override;
1200 virtual void show (std::ostream& os)
const override;
1228 virtual void show (std::ostream& os)
const override;
1255 virtual void show (std::ostream& os)
const override;
1313 virtual void show (std::ostream& os)
const override;
1340 virtual void show (std::ostream& os)
const override;
1368 virtual void show (std::ostream& os)
const override;
Normal or Gaussian distribution.
String: the storage and methods of handling collections of characters.
Raw TaQL parse tree node defining an alter table add column command.
virtual TaQLNodeResult visit(TaQLNodeVisitor &) const override
Visit a node for tree traversal.
TaQLAddColNodeRep(const TaQLMultiNode &cols, const TaQLMultiNode &dminfo)
virtual void show(std::ostream &os) const override
Print the object in an ostream.
static TaQLNode restore(AipsIO &aio)
virtual void save(AipsIO &aio) const override
Save the object.
Raw TaQL parse tree node defining an alter table add rows command.
virtual void save(AipsIO &aio) const override
Save the object.
virtual void show(std::ostream &os) const override
Print the object in an ostream.
virtual TaQLNodeResult visit(TaQLNodeVisitor &) const override
Visit a node for tree traversal.
static TaQLNode restore(AipsIO &aio)
TaQLAddRowNodeRep(const TaQLNode &nrow)
Raw TaQL parse tree node defining an alter table command.
static TaQLNode restore(AipsIO &aio)
virtual void save(AipsIO &aio) const override
Save the object.
TaQLMultiNode itsCommands
virtual TaQLNodeResult visit(TaQLNodeVisitor &) const override
Visit a node for tree traversal.
TaQLAltTabNodeRep(const TaQLMultiNode &with, const TaQLNode &table, const TaQLMultiNode &from, const TaQLMultiNode &commands)
virtual void showDerived(std::ostream &os) const override
Raw TaQL parse tree node defining a binary operator.
virtual void show(std::ostream &os) const override
Print the object in an ostream.
virtual void save(AipsIO &aio) const override
Save the object.
TaQLBinaryNodeRep(Type type, const TaQLNode &left, const TaQLNode &right)
virtual TaQLNodeResult visit(TaQLNodeVisitor &) const override
Visit a node for tree traversal.
static TaQLBinaryNodeRep * handleRegex(const TaQLNode &left, const TaQLRegexNode ®ex)
Handle a comparison wih a regex.
static TaQLNode restore(AipsIO &aio)
Type
Do not change the values of this enum, as objects might be persistent.
Raw TaQL parse tree node defining a calc command.
virtual TaQLNodeResult visit(TaQLNodeVisitor &) const override
Visit a node for tree traversal.
virtual void save(AipsIO &aio) const override
Save the object.
TaQLCalcNodeRep(const TaQLMultiNode &withTables, const TaQLMultiNode &fromTables, const TaQLNode &expr, const TaQLNode &where, const TaQLNode &sort, const TaQLNode &limitoff)
static TaQLNode restore(AipsIO &aio)
virtual void show(std::ostream &os) const override
Print the object in an ostream.
Raw TaQL parse tree node defining a select column expression.
static TaQLNode restore(AipsIO &aio)
virtual TaQLNodeResult visit(TaQLNodeVisitor &) const override
Visit a node for tree traversal.
virtual void show(std::ostream &os) const override
Print the object in an ostream.
virtual void save(AipsIO &aio) const override
Save the object.
TaQLColNodeRep(const TaQLNode &expr, const String &name, const String &nameMask, const String &dtype)
Raw TaQL parse tree node defining a create column specification.
virtual void save(AipsIO &aio) const override
Save the object.
TaQLColSpecNodeRep(const String &name, const String &likeCol, const String &dtype, const TaQLMultiNode &spec)
static TaQLNode restore(AipsIO &aio)
virtual TaQLNodeResult visit(TaQLNodeVisitor &) const override
Visit a node for tree traversal.
virtual void show(std::ostream &os) const override
Print the object in an ostream.
Raw TaQL parse tree node defining a select column list.
virtual void save(AipsIO &aio) const override
Save the object.
virtual void show(std::ostream &os) const override
Print the object in an ostream.
TaQLColumnsNodeRep(Bool distinct, const TaQLMultiNode &nodes)
virtual TaQLNodeResult visit(TaQLNodeVisitor &) const override
Visit a node for tree traversal.
static TaQLNode restore(AipsIO &aio)
Raw TaQL parse tree node defining an alter table command.
virtual void save(AipsIO &aio) const override
Save the object.
TaQLConcTabNodeRep(const String &tableName, const TaQLMultiNode &tables, const TaQLMultiNode &subtableNames)
virtual void showDerived(std::ostream &os) const override
virtual TaQLNodeResult visit(TaQLNodeVisitor &) const override
Visit a node for tree traversal.
static TaQLNode restore(AipsIO &aio)
TaQLMultiNode itsSubTables
TaQLConstNodeRep(Bool value)
Type
Do not change the values of this enum, as objects might be persistent.
TaQLConstNodeRep(Int64 value)
virtual void save(AipsIO &aio) const override
Save the object.
virtual TaQLNodeResult visit(TaQLNodeVisitor &) const override
Visit a node for tree traversal.
static TaQLNode restore(AipsIO &aio)
const String & getString() const
virtual void show(std::ostream &os) const override
Print the object in an ostream.
TaQLConstNodeRep(const String &value, Bool isTableName=False)
TaQLConstNodeRep(Int64 value, const String &subTableName)
const String & getUnit() const
TaQLConstNodeRep(Double value)
TaQLConstNodeRep(const MVTime &value)
TaQLConstNodeRep(DComplex value)
TaQLConstNodeRep(Double value, const String &unit)
Raw TaQL parse tree node defining an alter table copy column command.
virtual void save(AipsIO &aio) const override
Save the object.
TaQLCopyColNodeRep(const TaQLMultiNode &names, const TaQLMultiNode &dminfo)
virtual void show(std::ostream &os) const override
Print the object in an ostream.
virtual TaQLNodeResult visit(TaQLNodeVisitor &) const override
Visit a node for tree traversal.
static TaQLNode restore(AipsIO &aio)
Raw TaQL parse tree node defining a count command.
virtual void showDerived(std::ostream &os) const override
virtual void save(AipsIO &aio) const override
Save the object.
virtual TaQLNodeResult visit(TaQLNodeVisitor &) const override
Visit a node for tree traversal.
static TaQLNode restore(AipsIO &aio)
TaQLCountNodeRep(const TaQLMultiNode &with, const TaQLNode &columns, const TaQLMultiNode &tables, const TaQLNode &where)
Raw TaQL parse tree node defining a create table command.
virtual TaQLNodeResult visit(TaQLNodeVisitor &) const override
Visit a node for tree traversal.
virtual void save(AipsIO &aio) const override
Save the object.
virtual void showDerived(std::ostream &os) const override
static TaQLNode restore(AipsIO &aio)
TaQLMultiNode itsLikeDrop
TaQLCreTabNodeRep(const TaQLMultiNode &with, const TaQLNode &giving, const TaQLMultiNode &likeDrop, const TaQLMultiNode &cols, const TaQLNode &limit, const TaQLMultiNode &dminfo)
Raw TaQL parse tree node defining a delete command.
virtual void save(AipsIO &aio) const override
Save the object.
TaQLDeleteNodeRep(const TaQLMultiNode &with, const TaQLMultiNode &tables, const TaQLNode &where, const TaQLNode &sort, const TaQLNode &limitoff)
static TaQLNode restore(AipsIO &aio)
virtual void show(std::ostream &os) const override
Print the object in an ostream.
virtual TaQLNodeResult visit(TaQLNodeVisitor &) const override
Visit a node for tree traversal.
Raw TaQL parse tree node defining a DROP TABLE command.
static TaQLNode restore(AipsIO &aio)
virtual TaQLNodeResult visit(TaQLNodeVisitor &) const override
Visit a node for tree traversal.
TaQLDropTabNodeRep(const TaQLMultiNode &with, const TaQLMultiNode &tables)
virtual void show(std::ostream &os) const override
Print the object in an ostream.
virtual void save(AipsIO &aio) const override
Save the object.
Raw TaQL parse tree node defining a function.
virtual void show(std::ostream &os) const override
Print the object in an ostream.
virtual void save(AipsIO &aio) const override
Save the object.
TaQLFuncNodeRep(const String &name, const TaQLMultiNode &args)
virtual TaQLNodeResult visit(TaQLNodeVisitor &) const override
Visit a node for tree traversal.
TaQLFuncNodeRep(const String &name)
static TaQLNode restore(AipsIO &aio)
Raw TaQL parse tree node defining a giving expression list.
TaQLMultiNode itsExprList
virtual void save(AipsIO &aio) const override
Save the object.
virtual void show(std::ostream &os) const override
Print the object in an ostream.
TaQLGivingNodeRep(const TaQLMultiNode &exprlist)
static TaQLNode restore(AipsIO &aio)
TaQLGivingNodeRep(const String &name, const TaQLMultiNode &type)
virtual TaQLNodeResult visit(TaQLNodeVisitor &) const override
Visit a node for tree traversal.
Raw TaQL parse tree node defining a groupby list.
virtual void show(std::ostream &os) const override
Print the object in an ostream.
virtual TaQLNodeResult visit(TaQLNodeVisitor &) const override
Visit a node for tree traversal.
TaQLGroupNodeRep(Type type, const TaQLMultiNode &nodes)
Type
Do not change the values of this enum, as objects might be persistent.
static TaQLNode restore(AipsIO &aio)
virtual void save(AipsIO &aio) const override
Save the object.
Raw TaQL parse tree node defining an index in a array.
virtual void save(AipsIO &aio) const override
Save the object.
static TaQLNode restore(AipsIO &aio)
TaQLIndexNodeRep(const TaQLNode &start, const TaQLNode &end, const TaQLNode &incr)
virtual void show(std::ostream &os) const override
Print the object in an ostream.
virtual TaQLNodeResult visit(TaQLNodeVisitor &) const override
Visit a node for tree traversal.
Raw TaQL parse tree node defining an insert command.
TaQLInsertNodeRep(const TaQLMultiNode &with, const TaQLMultiNode &tables, const TaQLMultiNode &columns, const TaQLNode &values, const TaQLNode &limit)
TaQLInsertNodeRep(const TaQLMultiNode &with, const TaQLMultiNode &tables, const TaQLMultiNode &insert)
virtual void save(AipsIO &aio) const override
Save the object.
virtual TaQLNodeResult visit(TaQLNodeVisitor &) const override
Visit a node for tree traversal.
virtual void show(std::ostream &os) const override
Print the object in an ostream.
static TaQLNode restore(AipsIO &aio)
Raw TaQL parse tree node defining a join operation.
TaQLJoinNodeRep(const TaQLMultiNode &tables, const TaQLNode &condition)
virtual TaQLNodeResult visit(TaQLNodeVisitor &) const override
Visit a node for tree traversal.
static TaQLNode restore(AipsIO &aio)
virtual void show(std::ostream &os) const override
Print the object in an ostream.
virtual void save(AipsIO &aio) const override
Save the object.
Raw TaQL parse tree node defining a keyword or column name.
static TaQLNode restore(AipsIO &aio)
virtual void show(std::ostream &os) const override
Print the object in an ostream.
TaQLKeyColNodeRep(const String &name, const String &nameMask=String())
virtual void save(AipsIO &aio) const override
Save the object.
virtual TaQLNodeResult visit(TaQLNodeVisitor &) const override
Visit a node for tree traversal.
Raw TaQL parse tree node defining a limit/offset expression.
static TaQLNode restore(AipsIO &aio)
virtual TaQLNodeResult visit(TaQLNodeVisitor &) const override
Visit a node for tree traversal.
virtual void save(AipsIO &aio) const override
Save the object.
virtual void show(std::ostream &os) const override
Print the object in an ostream.
TaQLLimitOffNodeRep(const TaQLNode &limit, const TaQLNode &offset)
Raw TaQL parse tree node defining a list of nodes.
void setSeparator(uInt incr, const String &sep)
const std::vector< TaQLNode > & getNodes() const
TaQLMultiNodeRep(const String &prefix, const String &postfix, Bool isSetOrArray=False)
void setSeparator(const String &sep)
virtual void show(std::ostream &os) const override
Print the object in an ostream.
static TaQLMultiNode restore(AipsIO &aio)
TaQLMultiNodeRep(Bool isSetOrArray=False)
void setPPFix(const String &prefix, const String &postfix)
virtual void save(AipsIO &aio) const override
Save the object.
void add(const TaQLNode &node)
virtual TaQLNodeResult visit(TaQLNodeVisitor &) const override
Visit a node for tree traversal.
std::vector< TaQLNode > itsNodes
Envelope class for a node containing a list of nodes.
char nodeType() const
Get the node type of the derived class.
Envelope class to hold the result of a visit to the node tree.
Raw TaQL parse tree node defining a selection command.
virtual void showDerived(std::ostream &os) const =0
void restoreSuper(AipsIO &aio)
Bool getNoExecute() const
void saveSuper(AipsIO &aio) const
Bool getFromExecute() const
TaQLQueryNodeRep(int nodeType)
virtual void show(std::ostream &os) const override
Print the object in an ostream.
Raw TaQL parse tree node defining a range.
virtual void save(AipsIO &aio) const override
Save the object.
TaQLRangeNodeRep(const TaQLNode &end, Bool rightClosed)
virtual void show(std::ostream &os) const override
Print the object in an ostream.
TaQLRangeNodeRep(Bool leftClosed, const TaQLNode &start)
static TaQLNode restore(AipsIO &aio)
virtual TaQLNodeResult visit(TaQLNodeVisitor &) const override
Visit a node for tree traversal.
TaQLRangeNodeRep(Bool leftClosed, TaQLNode start, const TaQLNode &end, Bool rightClosed)
Raw TaQL parse tree node defining a record field.
static TaQLNode restore(AipsIO &aio)
TaQLRecFldNodeRep(const String &name, const TaQLRecFldNodeRep &)
virtual TaQLNodeResult visit(TaQLNodeVisitor &) const override
Visit a node for tree traversal.
virtual void save(AipsIO &aio) const override
Save the object.
virtual void show(std::ostream &os) const override
Print the object in an ostream.
TaQLRecFldNodeRep(const String &name, const TaQLNode &values, const String &dtype)
TaQLRecFldNodeRep(const String &name, const String &fromName, const String &dtype)
Raw TaQL parse tree node defining a constant regex value.
static TaQLNode restore(AipsIO &aio)
virtual void save(AipsIO &aio) const override
Save the object.
TaQLRegexNodeRep(const String &value)
virtual TaQLNodeResult visit(TaQLNodeVisitor &) const override
Visit a node for tree traversal.
virtual void show(std::ostream &os) const override
Print the object in an ostream.
TaQLRegexNodeRep(const String &value, Bool caseInsensitive, Bool negate, Bool ignoreBlanks, Int maxDistance)
Envelope class for a node containing a constant regex value.
Raw TaQL parse tree node defining an alter table rename or drop command.
virtual TaQLNodeResult visit(TaQLNodeVisitor &) const override
Visit a node for tree traversal.
virtual void save(AipsIO &aio) const override
Save the object.
static TaQLNode restore(AipsIO &aio)
virtual void show(std::ostream &os) const override
Print the object in an ostream.
TaQLRenDropNodeRep(Int type, const TaQLMultiNode &cols)
Raw TaQL parse tree node defining a select command.
virtual void save(AipsIO &aio) const override
Save the object.
TaQLSelectNodeRep(const TaQLNode &columns, const TaQLMultiNode &withTables, const TaQLNode &where, const TaQLNode &groupby, const TaQLNode &having, const TaQLNode &sort, const TaQLNode &limitoff, const TaQLNode &giving, const TaQLMultiNode &dminfo)
virtual void showDerived(std::ostream &os) const override
TaQLSelectNodeRep(const TaQLNode &columns, const TaQLMultiNode &withTables, const TaQLMultiNode &fromTables, const TaQLNode &join, const TaQLNode &where, const TaQLNode &groupby, const TaQLNode &having, const TaQLNode &sort, const TaQLNode &limitoff, const TaQLNode &giving, const TaQLMultiNode &dminfo)
static TaQLNode restore(AipsIO &aio)
virtual TaQLNodeResult visit(TaQLNodeVisitor &) const override
Visit a node for tree traversal.
Raw TaQL parse tree node defining an alter table set keyword command.
virtual void show(std::ostream &os) const override
Print the object in an ostream.
virtual TaQLNodeResult visit(TaQLNodeVisitor &) const override
Visit a node for tree traversal.
static TaQLNode restore(AipsIO &aio)
TaQLSetKeyNodeRep(const TaQLMultiNode &keyvals)
virtual void save(AipsIO &aio) const override
Save the object.
Raw TaQL parse tree node defining a show command.
virtual TaQLNodeResult visit(TaQLNodeVisitor &) const override
Visit a node for tree traversal.
TaQLShowNodeRep(const TaQLMultiNode &names)
virtual void show(std::ostream &os) const override
Print the object in an ostream.
virtual void save(AipsIO &aio) const override
Save the object.
static TaQLNode restore(AipsIO &aio)
Raw TaQL parse tree node defining a sort key.
TaQLSortKeyNodeRep(Type type, const TaQLNode &child)
virtual void save(AipsIO &aio) const override
Save the object.
static TaQLNode restore(AipsIO &aio)
Type
Do not change the values of this enum, as objects might be persistent.
virtual void show(std::ostream &os) const override
Print the object in an ostream.
virtual TaQLNodeResult visit(TaQLNodeVisitor &) const override
Visit a node for tree traversal.
Raw TaQL parse tree node defining a sort list.
virtual void save(AipsIO &aio) const override
Save the object.
Type
Do not change the values of this enum, as objects might be persistent.
TaQLSortNodeRep(Bool unique, Type type, const TaQLMultiNode &keys)
virtual void show(std::ostream &os) const override
Print the object in an ostream.
virtual TaQLNodeResult visit(TaQLNodeVisitor &) const override
Visit a node for tree traversal.
static TaQLNode restore(AipsIO &aio)
Raw TaQL parse tree node defining a table.
static TaQLNode restore(AipsIO &aio)
virtual void save(AipsIO &aio) const override
Save the object.
virtual TaQLNodeResult visit(TaQLNodeVisitor &) const override
Visit a node for tree traversal.
virtual void show(std::ostream &os) const override
Print the object in an ostream.
TaQLTableNodeRep(const TaQLNode &table, const String &alias)
Raw TaQL parse tree node defining a unary operator.
Type
Do not change the values of this enum, as objects might be persistent.
virtual void show(std::ostream &os) const override
Print the object in an ostream.
virtual void save(AipsIO &aio) const override
Save the object.
TaQLUnaryNodeRep(Type type, const TaQLNode &child)
virtual TaQLNodeResult visit(TaQLNodeVisitor &) const override
Visit a node for tree traversal.
static TaQLNode restore(AipsIO &aio)
Raw TaQL parse tree node defining a unit.
virtual TaQLNodeResult visit(TaQLNodeVisitor &) const override
Visit a node for tree traversal.
virtual void show(std::ostream &os) const override
Print the object in an ostream.
static TaQLNode restore(AipsIO &aio)
virtual void save(AipsIO &aio) const override
Save the object.
TaQLUnitNodeRep(const String &unit, const TaQLNode &child)
Raw TaQL parse tree node defining a column update expression.
TaQLUpdExprNodeRep(const String &name, const String &nameMask, const TaQLMultiNode &indices, const TaQLNode &expr)
virtual TaQLNodeResult visit(TaQLNodeVisitor &) const override
Visit a node for tree traversal.
TaQLUpdExprNodeRep(const String &name, const String &nameMask, const TaQLMultiNode &indices1, const TaQLMultiNode &indices2, const TaQLNode &expr)
virtual void save(AipsIO &aio) const override
Save the object.
static TaQLNode restore(AipsIO &aio)
TaQLMultiNode itsIndices1
virtual void show(std::ostream &os) const override
Print the object in an ostream.
TaQLUpdExprNodeRep(const String &name, const String &nameMask, const TaQLNode &expr)
TaQLMultiNode itsIndices2
Raw TaQL parse tree node defining an update command.
virtual void save(AipsIO &aio) const override
Save the object.
static TaQLNode restore(AipsIO &aio)
virtual TaQLNodeResult visit(TaQLNodeVisitor &) const override
Visit a node for tree traversal.
TaQLUpdateNodeRep(const TaQLMultiNode &with, const TaQLMultiNode &tables, const TaQLMultiNode &update, const TaQLMultiNode &from, const TaQLNode &where, const TaQLNode &sort, const TaQLNode &limitoff)
virtual void show(std::ostream &os) const override
Print the object in an ostream.
std::complex< Double > DComplex
this file contains all the compiler specific defines
long long Int64
Define the extra non-standard types used by Casacore (like proposed uSize, Size)
TableExprNode regex(const TableExprNode &node)
Functions for regular expression matching and pattern matching.
bool Bool
Define the standard types used by Casacore.
LatticeExprNode value(const LatticeExprNode &expr)
This function returns the value of the expression without a mask.