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> 103 virtual void show (std::ostream& os)
const;
141 Bool ignoreBlanks,
Int maxDistance)
143 itsValue(value), itsCaseInsensitive(caseInsensitive), itsNegate(negate),
144 itsIgnoreBlanks(ignoreBlanks), itsMaxDistance(maxDistance) {}
147 virtual void show (std::ostream& os)
const;
187 itsType(type), itsChild(child) {}
190 virtual void show (std::ostream& os)
const;
244 itsType(type), itsLeft(left), itsRight(right) {}
247 virtual void show (std::ostream& os)
const;
283 itsIsSetOrArray(isSetOrArray),
284 itsPrefix(prefix), itsPostfix(postfix) {}
287 { itsIsSetOrArray =
True; }
289 { itsPrefix = prefix; itsPostfix = postfix; }
291 { itsNodes.push_back (node); }
295 virtual void show (std::ostream& os)
const;
325 itsName(name), itsArgs(
False) {}
328 itsName(name), itsArgs(args) {}
331 virtual void show (std::ostream& os)
const;
361 itsLeftClosed(leftClosed), itsStart(start),
362 itsEnd(end), itsRightClosed(rightClosed) {}
365 itsLeftClosed(leftClosed), itsStart(start),
366 itsEnd(), itsRightClosed(
False) {}
369 itsLeftClosed(
False), itsStart(),
370 itsEnd(end), itsRightClosed(rightClosed) {}
373 virtual void show (std::ostream& os)
const;
405 itsStart(start), itsEnd(end), itsIncr(incr) {}
408 virtual void show (std::ostream& os)
const;
438 itsTables(tables), itsCondition(condition) {}
441 virtual void show (std::ostream& os)
const;
473 virtual void show (std::ostream& os)
const;
502 itsTable(table), itsAlias(alias) {}
505 virtual void show (std::ostream& os)
const;
538 itsExpr(expr), itsName(name), itsDtype(
checkDataType(dtype)) {}
541 virtual void show (std::ostream& os)
const;
571 itsDistinct(distinct), itsNodes(nodes) {}
574 virtual void show (std::ostream& os)
const;
606 itsType(type), itsNodes(nodes) {}
609 virtual void show (std::ostream& os)
const;
642 itsType(type), itsChild(child) {}
645 virtual void show (std::ostream& os)
const;
677 itsUnique(unique),
itsType(type), itsKeys(keys) {}
680 virtual void show (std::ostream& os)
const;
710 itsLimit(limit), itsOffset(offset) {}
713 virtual void show (std::ostream& os)
const;
744 itsExprList (exprlist) {}
747 virtual void show (std::ostream& os)
const;
788 itsName(name), itsIndices(indices), itsExpr(expr) {}
791 virtual void show (std::ostream& os)
const;
824 { itsBrackets =
True; }
826 { itsNoExecute =
True; }
828 { itsFromExecute =
True; }
830 {
return itsBrackets; }
832 {
return itsNoExecute; }
834 {
return itsFromExecute; }
835 virtual void show (std::ostream& os)
const;
837 virtual void saveSuper (
AipsIO& aio)
const;
838 virtual void restoreSuper (
AipsIO& aio);
840 virtual void showDerived (std::ostream& os)
const = 0;
874 virtual void showDerived (std::ostream& os)
const;
911 virtual void showDerived (std::ostream& os)
const;
944 itsTables(tables), itsUpdate(update), itsFrom(from),
945 itsWhere(where), itsSort(sort), itsLimitOff(limitoff) {}
948 virtual void show (std::ostream& os)
const;
982 itsTables(tables), itsColumns(columns), itsValues(values) {}
986 virtual void show (std::ostream& os)
const;
1016 itsTables(tables), itsWhere(where),
1017 itsSort(sort), itsLimitOff(limitoff) {}
1020 virtual void show (std::ostream& os)
const;
1052 itsTables(tables), itsExpr(expr),
1053 itsWhere(where), itsSort(sort), itsLimitOff(limitoff) {}
1056 virtual void show (std::ostream& os)
const;
1088 itsName(name), itsColumns(cols), itsDataMans(dataMans) {}
1091 virtual void show (std::ostream& os)
const;
1122 itsName(name), itsDtype(
checkDataType(dtype)), itsSpec(spec) {}
1125 virtual void show (std::ostream& os)
const;
1154 itsName(name), itsValues(values) {}
1157 virtual void show (std::ostream& os)
const;
1185 itsUnit(unit), itsChild(child) {}
1188 virtual void show (std::ostream& os)
const;
Raw TaQL parse tree node defining a selection command.
TaQLRangeNodeRep(Bool leftClosed, TaQLNode start, const TaQLNode &end, Bool rightClosed)
TaQLJoinNodeRep(const TaQLMultiNode &tables, const TaQLNode &condition)
TaQLCalcNodeRep(const TaQLMultiNode &tables, const TaQLNode &expr, const TaQLNode &where, const TaQLNode &sort, const TaQLNode &limitoff)
long long Int64
Define the extra non-standard types used by Casacore (like proposed uSize, Size)
Raw TaQL parse tree node defining a count command.
TaQLRangeNodeRep(const TaQLNode &end, Bool rightClosed)
static TaQLConstNodeRep * restore(AipsIO &aio)
TaQLColSpecNodeRep(const String &name, const String &dtype, const TaQLMultiNode &spec)
TaQLRegexNodeRep(const String &value, Bool caseInsensitive, Bool negate, Bool ignoreBlanks, Int maxDistance)
Raw TaQL parse tree node defining a select command.
TaQLTableNodeRep(const TaQLNode &table, const String &alias)
TaQLUnaryNodeRep(Type type, const TaQLNode &child)
Raw TaQL parse tree node defining an update command.
const std::vector< TaQLNode > & getNodes() const
AipsIO is the object persistency mechanism of Casacore.
TaQLConstNodeRep(Bool value)
TaQLInsertNodeRep(const TaQLMultiNode &tables, const TaQLMultiNode &columns, const TaQLNode &values)
TaQLColumnsNodeRep(Bool distinct, const TaQLMultiNode &nodes)
virtual TaQLNodeResult visit(TaQLNodeVisitor &) const
Visit a node for tree traversal.
char nodeType() const
Get the node type of the derived class.
void setPPFix(const String &prefix, const String &postfix)
const String & getString() const
virtual void show(std::ostream &os) const
Print the object in an ostream.
Raw TaQL parse tree node defining a range.
Raw TaQL parse tree node defining a constant value.
Raw TaQL parse tree node defining a create table command.
TaQLRangeNodeRep(Bool leftClosed, const TaQLNode &start)
TaQLKeyColNodeRep(const String &name)
TaQLConstNodeRep(const MVTime &value)
Raw TaQL parse tree node defining an index in a array.
Raw TaQL parse tree node defining a calc command.
virtual ~TaQLConstNodeRep()
TaQLUpdateNodeRep(const TaQLMultiNode &tables, const TaQLMultiNode &update, const TaQLMultiNode &from, const TaQLNode &where, const TaQLNode &sort, const TaQLNode &limitoff)
virtual void save(AipsIO &aio) const
Save the object.
Raw TaQL parse tree node defining a list of nodes.
TaQLGivingNodeRep(const String &name, Int type)
Constructor for restore.
TaQLMultiNodeRep(const String &prefix, const String &postfix, Bool isSetOrArray=False)
TaQLUpdExprNodeRep(const String &name, const TaQLMultiNode &indices, const TaQLNode &expr)
TaQLCreTabNodeRep(const String &name, const TaQLMultiNode &cols, const TaQLMultiNode &dataMans)
TaQLGivingNodeRep(const TaQLMultiNode &exprlist)
TaQLColNodeRep(const TaQLNode &expr, const String &name, const String &dtype)
const String & getUnit() const
TaQLFuncNodeRep(const String &name, const TaQLMultiNode &args)
Raw TaQL parse tree node defining a delete command.
TaQLConstNodeRep(const String &value, Bool isTableName=False)
Envelope class for a node containing a select command.
Raw TaQL parse tree node defining a table.
Bool getNoExecute() const
Raw TaQL parse tree node defining a groupby list.
Raw TaQL parse tree node defining a giving expression list.
Envelope class for a node containing a constant regex value.
Raw TaQL parse tree node defining a unary operator.
Raw TaQL parse tree node defining a constant regex value.
Normal or Gaussian distribution.
Raw TaQL parse tree node defining a record field.
std::complex< Double > DComplex
Raw TaQL parse tree node defining a keyword or column name.
TaQLFuncNodeRep(const String &name)
TaQLIndexNodeRep(const TaQLNode &start, const TaQLNode &end, const TaQLNode &incr)
bool Bool
Define the standard types used by Casacore.
Raw TaQL parse tree node defining a function.
TaQLRecFldNodeRep(const String &name, const TaQLNode &values)
Raw TaQL parse tree node defining a create column specification.
TaQLBinaryNodeRep(Type type, const TaQLNode &left, const TaQLNode &right)
Raw TaQL parse tree node defining a unit.
Raw TaQL parse tree node defining a column update expression.
TaQLUnitNodeRep(const String &unit, const TaQLNode &child)
TaQLConstNodeRep(Double value)
Type
Do not change the values of this enum, as objects might be persistent.
TaQLMultiNode itsDataMans
TaQLConstNodeRep(Int64 value, Bool isTableName=False)
TableExprNode regex(const TableExprNode &node)
Functions for regular expression matching and pattern matching.
Type
Do not change the values of this enum, as objects might be persistent.
TaQLGroupNodeRep(Type type, const TaQLMultiNode &nodes)
Envelope class to hold the result of a visit to the node tree.
TaQLMultiNode itsExprList
3=plain, 4=plain_big, 5=plain_little, 6=plain_local
Raw TaQL parse tree node defining a limit/offset expression.
TaQLConstNodeRep(DComplex value)
std::vector< TaQLNode > itsNodes
Raw TaQL parse tree node defining a sort key.
TaQLLimitOffNodeRep(const TaQLNode &limit, const TaQLNode &offset)
Raw TaQL parse tree node defining a sort list.
Type
Do not change the values of this enum, as objects might be persistent.
String: the storage and methods of handling collections of characters.
Raw TaQL parse tree node defining a select column expression.
Raw TaQL parse tree node defining a select column list.
Raw TaQL parse tree node defining a join operation.
Envelope class for a node in the raw TaQL parse tree.
TaQLSortKeyNodeRep(Type type, const TaQLNode &child)
TaQLConstNodeRep(Double value, const String &unit)
Class to visit the nodes in the raw TaQL parse tree.
TaQLSortNodeRep(Bool unique, Type type, const TaQLMultiNode &keys)
Type
Do not change the values of this enum, as objects might be persistent.
Type
Do not change the values of this enum, as objects might be persistent.
#define TaQLNode_LimitOff
Class to handle date/time type conversions and I/O.
Raw TaQL parse tree node defining a binary operator.
this file contains all the compiler specific defines
LatticeExprNode value(const LatticeExprNode &expr)
This function returns the value of the expression without a mask.
Representation of a node in the raw TaQL parse tree.
Raw TaQL parse tree node defining an insert command.
TaQLDeleteNodeRep(const TaQLMultiNode &tables, const TaQLNode &where, const TaQLNode &sort, const TaQLNode &limitoff)
TaQLMultiNodeRep(Bool isSetOrArray=False)
void add(const TaQLNode &node)
Type
Do not change the values of this enum, as objects might be persistent.
Bool getFromExecute() const
static String checkDataType(const String &)
Check the data type string and return its standard form.