TaQLNodeDer.h

Go to the documentation of this file.
00001 //# TaQLNodeDer.h: Specialized nodes in the raw TaQL parse tree
00002 //# Copyright (C) 2005
00003 //# Associated Universities, Inc. Washington DC, USA.
00004 //#
00005 //# This library is free software; you can redistribute it and/or modify it
00006 //# under the terms of the GNU Library General Public License as published by
00007 //# the Free Software Foundation; either version 2 of the License, or (at your
00008 //# option) any later version.
00009 //#
00010 //# This library is distributed in the hope that it will be useful, but WITHOUT
00011 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00012 //# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Library General Public
00013 //# License for more details.
00014 //#
00015 //# You should have received a copy of the GNU Library General Public License
00016 //# along with this library; if not, write to the Free Software Foundation,
00017 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
00018 //#
00019 //# Correspondence concerning AIPS++ should be addressed as follows:
00020 //#        Internet email: aips2-request@nrao.edu.
00021 //#        Postal address: AIPS++ Project Office
00022 //#                        National Radio Astronomy Observatory
00023 //#                        520 Edgemont Road
00024 //#                        Charlottesville, VA 22903-2475 USA
00025 //#
00026 //# $Id$
00027 
00028 #ifndef TABLES_TAQLNODEDER_H
00029 #define TABLES_TAQLNODEDER_H
00030 
00031 //# Includes
00032 #include <casacore/casa/aips.h>
00033 #include <casacore/tables/TaQL/TaQLNode.h>
00034 #include <casacore/casa/BasicSL/Complex.h>
00035 #include <casacore/casa/BasicSL/String.h>
00036 #include <casacore/casa/Utilities/Regex.h>
00037 #include <casacore/casa/Quanta/MVTime.h>
00038 #include <casacore/casa/Containers/Block.h>
00039 #include <vector>
00040 #include <iostream>
00041 
00042 namespace casacore { //# NAMESPACE CASACORE - BEGIN
00043 
00044 
00045 // <summary>
00046 // Raw TaQL parse tree node defining a constant value.
00047 // </summary>
00048 // <use visibility=local>
00049 // <reviewed reviewer="" date="" tests="tTaQLNode">
00050 // </reviewed>
00051 // <prerequisite>
00052 //# Classes you should understand before using this one.
00053 //   <li> <linkto class=TaQLNodeRep>TaQLNodeRep</linkto>
00054 // </prerequisite>
00055 // <synopsis> 
00056 // This class is a TaQLNodeRep holding a constant expression or a table name.
00057 // The types supported are Bool, Int, Double, DComplex, String, and MVTime.
00058 // Note that a keyword or column name is represented by TaQLKeyColNodeRep.
00059 // </synopsis> 
00060 
00061 class TaQLConstNodeRep: public TaQLNodeRep
00062 {
00063 public:
00064   // Do not change the values of this enum, as objects might be persistent.
00065   enum Type {CTBool   =0,
00066              CTInt    =1,
00067              CTReal   =2,
00068              CTComplex=3,
00069              CTString =4,
00070              CTTime   =5};
00071   explicit TaQLConstNodeRep (Bool value);
00072   explicit TaQLConstNodeRep (Int64 value, Bool isTableName=False);
00073   explicit TaQLConstNodeRep (Double value);
00074   explicit TaQLConstNodeRep (Double value, const String& unit);
00075   explicit TaQLConstNodeRep (DComplex value);
00076   explicit TaQLConstNodeRep (const String& value, Bool isTableName=False);
00077   explicit TaQLConstNodeRep (const MVTime& value);
00078   virtual ~TaQLConstNodeRep();
00079   void setIsTableName()
00080     { itsIsTableName = True; }
00081   const String& getString() const;
00082   const String& getUnit() const
00083     { return itsUnit; }
00084   virtual TaQLNodeResult visit (TaQLNodeVisitor&) const;
00085   virtual void show (std::ostream& os) const;
00086   virtual void save (AipsIO& aio) const;
00087   static TaQLConstNodeRep* restore (AipsIO& aio);
00088 
00089   Type     itsType;
00090   Bool     itsIsTableName;
00091   Bool     itsBValue;
00092   Int64    itsIValue;
00093   Double   itsRValue;
00094   DComplex itsCValue;
00095   String   itsSValue;
00096   MVTime   itsTValue;
00097   String   itsUnit;
00098 };
00099 
00100 
00101 // <summary>
00102 // Raw TaQL parse tree node defining a constant regex value.
00103 // </summary>
00104 // <use visibility=local>
00105 // <reviewed reviewer="" date="" tests="tTaQLNode">
00106 // </reviewed>
00107 // <prerequisite>
00108 //# Classes you should understand before using this one.
00109 //   <li> <linkto class=TaQLNodeRep>TaQLNodeRep</linkto>
00110 // </prerequisite>
00111 // <synopsis> 
00112 // This class is a TaQLNodeRep holding a constant regex/pattern value.
00113 // Part of the regex are the delimiters (like p//).
00114 // It also holds if the regex is case-insensitive and if a match or no match
00115 // operator is given.
00116 // </synopsis> 
00117 
00118 class TaQLRegexNodeRep: public TaQLNodeRep
00119 {
00120 public:
00121   explicit TaQLRegexNodeRep (const String& value);
00122   TaQLRegexNodeRep (const String& value, Bool caseInsensitive, Bool negate,
00123                     Bool ignoreBlanks, Int maxDistance);
00124   virtual ~TaQLRegexNodeRep();
00125   virtual TaQLNodeResult visit (TaQLNodeVisitor&) const;
00126   virtual void show (std::ostream& os) const;
00127   virtual void save (AipsIO& aio) const;
00128   static TaQLRegexNodeRep* restore (AipsIO& aio);
00129 
00130   String itsValue;
00131   Bool   itsCaseInsensitive;
00132   Bool   itsNegate;             //# True means !~
00133   //# The following members are only used for distance.
00134   Bool   itsIgnoreBlanks;
00135   Int    itsMaxDistance;
00136 };
00137 
00138 
00139 // <summary>
00140 // Raw TaQL parse tree node defining a unary operator.
00141 // </summary>
00142 // <use visibility=local>
00143 // <reviewed reviewer="" date="" tests="tTaQLNode">
00144 // </reviewed>
00145 // <prerequisite>
00146 //# Classes you should understand before using this one.
00147 //   <li> <linkto class=TaQLNodeRep>TaQLNodeRep</linkto>
00148 // </prerequisite>
00149 // <synopsis> 
00150 // This class is a TaQLNodeRep holding a unary operator and operand.
00151 // The operators supported are -, ~, NOT, EXISTS, and NOT EXISTS.
00152 // Note the unary operator + is superfluous and is ignored by the parser.
00153 // </synopsis> 
00154 
00155 class TaQLUnaryNodeRep: public TaQLNodeRep
00156 {
00157 public:
00158   // Do not change the values of this enum, as objects might be persistent.
00159   enum Type {U_MINUS    =0,
00160              U_NOT      =1,
00161              U_EXISTS   =2,
00162              U_NOTEXISTS=3,
00163              U_BITNOT   =4};
00164   TaQLUnaryNodeRep (Type type, const TaQLNode& child);
00165   virtual ~TaQLUnaryNodeRep();
00166   virtual TaQLNodeResult visit (TaQLNodeVisitor&) const;
00167   virtual void show (std::ostream& os) const;
00168   virtual void save (AipsIO& aio) const;
00169   static TaQLUnaryNodeRep* restore (AipsIO& aio);
00170 
00171   Type     itsType;
00172   TaQLNode itsChild;
00173 };
00174 
00175 
00176 // <summary>
00177 // Raw TaQL parse tree node defining a binary operator.
00178 // </summary>
00179 // <use visibility=local>
00180 // <reviewed reviewer="" date="" tests="tTaQLNode">
00181 // </reviewed>
00182 // <prerequisite>
00183 //# Classes you should understand before using this one.
00184 //   <li> <linkto class=TaQLNodeRep>TaQLNodeRep</linkto>
00185 // </prerequisite>
00186 // <synopsis> 
00187 // This class is a TaQLNodeRep holding a binary operator and operands.
00188 // All standard mathematical (including % and ^), relational, bit, and logical
00189 // operators are supported. Furthermore operator IN and the INDEX operator
00190 // (for indexing in an array) are supported.
00191 // </synopsis> 
00192 
00193 class TaQLBinaryNodeRep: public TaQLNodeRep
00194 {
00195 public:
00196   // Do not change the values of this enum, as objects might be persistent.
00197   enum Type {B_PLUS  =0,
00198              B_MINUS =1,
00199              B_TIMES =2,
00200              B_DIVIDE=3,
00201              B_MODULO=4,
00202              B_POWER =5,
00203              B_EQ    =6,
00204              B_NE    =7,
00205              B_GT    =8,
00206              B_GE    =9,
00207              B_LT    =10,
00208              B_LE    =11,
00209              B_OR    =12,
00210              B_AND   =13,
00211              B_IN    =14,
00212              B_INDEX =15,
00213              B_DIVIDETRUNC=16,
00214              B_EQREGEX    =17,
00215              B_NEREGEX    =18,
00216              B_BITAND     =19,
00217              B_BITXOR     =20,
00218              B_BITOR      =21};
00219   TaQLBinaryNodeRep (Type type, const TaQLNode& left, const TaQLNode& right);
00220   virtual ~TaQLBinaryNodeRep();
00221   virtual TaQLNodeResult visit (TaQLNodeVisitor&) const;
00222   virtual void show (std::ostream& os) const;
00223   virtual void save (AipsIO& aio) const;
00224   static TaQLBinaryNodeRep* restore (AipsIO& aio);
00225   // Handle a comparison wih a regex. The operator (~ or !~) is extracted
00226   // from the regex.
00227   static TaQLBinaryNodeRep* handleRegex (const TaQLNode& left,
00228                                          const TaQLRegexNode& regex);
00229 
00230   Type     itsType;
00231   TaQLNode itsLeft;
00232   TaQLNode itsRight;
00233 };
00234 
00235 
00236 // <summary>
00237 // Raw TaQL parse tree node defining a list of nodes.
00238 // </summary>
00239 // <use visibility=local>
00240 // <reviewed reviewer="" date="" tests="tTaQLNode">
00241 // </reviewed>
00242 // <prerequisite>
00243 //# Classes you should understand before using this one.
00244 //   <li> <linkto class=TaQLNodeRep>TaQLNodeRep</linkto>
00245 // </prerequisite>
00246 // <synopsis> 
00247 // This class is a TaQLNodeRep holding a list of heterogeneous nodes.
00248 // </synopsis> 
00249 
00250 class TaQLMultiNodeRep: public TaQLNodeRep
00251 {
00252 public:
00253   explicit TaQLMultiNodeRep (Bool isSetOrArray=False);
00254   TaQLMultiNodeRep(const String& prefix, const String& postfix,
00255                    Bool isSetOrArray=False);
00256   virtual ~TaQLMultiNodeRep();
00257   void setIsSetOrArray()
00258     { itsIsSetOrArray = True; }
00259   void setPPFix (const String& prefix, const String& postfix)
00260     { itsPrefix = prefix; itsPostfix = postfix; }
00261   void setSeparator (const String& sep)
00262     { itsSep = sep; }
00263   void setSeparator (uInt incr, const String& sep)
00264   { itsIncr = incr; itsSep2 = sep; }
00265   void add (const TaQLNode& node)
00266     { itsNodes.push_back (node); }
00267   const std::vector<TaQLNode>& getNodes() const
00268     { return itsNodes; }
00269   virtual TaQLNodeResult visit (TaQLNodeVisitor&) const;
00270   virtual void show (std::ostream& os) const;
00271   virtual void save (AipsIO& aio) const;
00272   static TaQLMultiNodeRep* restore (AipsIO& aio);
00273 
00274   std::vector<TaQLNode> itsNodes;
00275   Bool   itsIsSetOrArray;
00276   String itsPrefix;
00277   String itsPostfix;
00278   String itsSep;
00279   String itsSep2;
00280   uInt   itsIncr;
00281 };
00282 
00283 
00284 // <summary>
00285 // Raw TaQL parse tree node defining a function.
00286 // </summary>
00287 // <use visibility=local>
00288 // <reviewed reviewer="" date="" tests="tTaQLNode">
00289 // </reviewed>
00290 // <prerequisite>
00291 //# Classes you should understand before using this one.
00292 //   <li> <linkto class=TaQLNodeRep>TaQLNodeRep</linkto>
00293 // </prerequisite>
00294 // <synopsis> 
00295 // This class is a TaQLNodeRep holding a function name and its arguments.
00296 // </synopsis> 
00297 
00298 class TaQLFuncNodeRep: public TaQLNodeRep
00299 {
00300 public:
00301   TaQLFuncNodeRep (const String& name);
00302   TaQLFuncNodeRep (const String& name, const TaQLMultiNode& args);
00303   virtual ~TaQLFuncNodeRep();
00304   virtual TaQLNodeResult visit (TaQLNodeVisitor&) const;
00305   virtual void show (std::ostream& os) const;
00306   virtual void save (AipsIO& aio) const;
00307   static TaQLFuncNodeRep* restore (AipsIO& aio);
00308 
00309   String        itsName;
00310   TaQLMultiNode itsArgs;
00311 };
00312 
00313 
00314 // <summary>
00315 // Raw TaQL parse tree node defining a range.
00316 // </summary>
00317 // <use visibility=local>
00318 // <reviewed reviewer="" date="" tests="tTaQLNode">
00319 // </reviewed>
00320 // <prerequisite>
00321 //# Classes you should understand before using this one.
00322 //   <li> <linkto class=TaQLNodeRep>TaQLNodeRep</linkto>
00323 // </prerequisite>
00324 // <synopsis> 
00325 // This class is a TaQLNodeRep holding the optional start and end values
00326 // of a range (i.e. an interval) and flags if the range is open or closed.
00327 // </synopsis> 
00328 
00329 class TaQLRangeNodeRep: public TaQLNodeRep
00330 {
00331 public:
00332   TaQLRangeNodeRep (Bool leftClosed, TaQLNode start,
00333                     const TaQLNode& end, Bool rightClosed);
00334   TaQLRangeNodeRep (Bool leftClosed, const TaQLNode& start);
00335   TaQLRangeNodeRep (const TaQLNode& end, Bool rightClosed);
00336   virtual ~TaQLRangeNodeRep();
00337   virtual TaQLNodeResult visit (TaQLNodeVisitor&) const;
00338   virtual void show (std::ostream& os) const;
00339   virtual void save (AipsIO& aio) const;
00340   static TaQLRangeNodeRep* restore (AipsIO& aio);
00341 
00342   Bool     itsLeftClosed;
00343   TaQLNode itsStart;
00344   TaQLNode itsEnd;
00345   Bool     itsRightClosed;
00346 };
00347 
00348 
00349 // <summary>
00350 // Raw TaQL parse tree node defining an index in a array.
00351 // </summary>
00352 // <use visibility=local>
00353 // <reviewed reviewer="" date="" tests="tTaQLNode">
00354 // </reviewed>
00355 // <prerequisite>
00356 //# Classes you should understand before using this one.
00357 //   <li> <linkto class=TaQLNodeRep>TaQLNodeRep</linkto>
00358 // </prerequisite>
00359 // <synopsis> 
00360 // This class is a TaQLNodeRep holding the optional start, end, and incr
00361 // values of an index in an array.
00362 // </synopsis> 
00363 
00364 class TaQLIndexNodeRep: public TaQLNodeRep
00365 {
00366 public:
00367   TaQLIndexNodeRep (const TaQLNode& start, const TaQLNode& end,
00368                     const TaQLNode& incr);
00369   virtual ~TaQLIndexNodeRep();
00370   virtual TaQLNodeResult visit (TaQLNodeVisitor&) const;
00371   virtual void show (std::ostream& os) const;
00372   virtual void save (AipsIO& aio) const;
00373   static TaQLIndexNodeRep* restore (AipsIO& aio);
00374 
00375   TaQLNode itsStart;
00376   TaQLNode itsEnd;
00377   TaQLNode itsIncr;
00378 };
00379 
00380 
00381 // <summary>
00382 // Raw TaQL parse tree node defining a join operation.
00383 // </summary>
00384 // <use visibility=local>
00385 // <reviewed reviewer="" date="" tests="tTaQLNode">
00386 // </reviewed>
00387 // <prerequisite>
00388 //# Classes you should understand before using this one.
00389 //   <li> <linkto class=TaQLNodeRep>TaQLNodeRep</linkto>
00390 // </prerequisite>
00391 // <synopsis> 
00392 // This class is a TaQLNodeRep holding the expressions of a join operation.
00393 // This is, however, a placeholder and not implemented yet.
00394 // </synopsis> 
00395 
00396 class TaQLJoinNodeRep: public TaQLNodeRep
00397 {
00398 public:
00399   TaQLJoinNodeRep (const TaQLMultiNode& tables, const TaQLNode& condition);
00400   virtual ~TaQLJoinNodeRep();
00401   virtual TaQLNodeResult visit (TaQLNodeVisitor&) const;
00402   virtual void show (std::ostream& os) const;
00403   virtual void save (AipsIO& aio) const;
00404   static TaQLJoinNodeRep* restore (AipsIO& aio);
00405 
00406   TaQLMultiNode itsTables;
00407   TaQLNode      itsCondition;
00408 };
00409 
00410 
00411 // <summary>
00412 // Raw TaQL parse tree node defining a keyword or column name.
00413 // </summary>
00414 // <use visibility=local>
00415 // <reviewed reviewer="" date="" tests="tTaQLNode">
00416 // </reviewed>
00417 // <prerequisite>
00418 //# Classes you should understand before using this one.
00419 //   <li> <linkto class=TaQLNodeRep>TaQLNodeRep</linkto>
00420 // </prerequisite>
00421 // <synopsis> 
00422 // This class is a TaQLNodeRep holding the name of a keyword or column.
00423 // The name can contain . and :: delimiters for scoping.
00424 // </synopsis> 
00425 
00426 class TaQLKeyColNodeRep: public TaQLNodeRep
00427 {
00428 public:
00429   TaQLKeyColNodeRep (const String& name, const String& nameMask = String());
00430   virtual ~TaQLKeyColNodeRep();
00431   virtual TaQLNodeResult visit (TaQLNodeVisitor&) const;
00432   virtual void show (std::ostream& os) const;
00433   virtual void save (AipsIO& aio) const;
00434   static TaQLKeyColNodeRep* restore (AipsIO& aio);
00435 
00436   String itsName;
00437   String itsNameMask;
00438 };
00439 
00440 
00441 // <summary>
00442 // Raw TaQL parse tree node defining a table.
00443 // </summary>
00444 // <use visibility=local>
00445 // <reviewed reviewer="" date="" tests="tTaQLNode">
00446 // </reviewed>
00447 // <prerequisite>
00448 //# Classes you should understand before using this one.
00449 //   <li> <linkto class=TaQLNodeRep>TaQLNodeRep</linkto>
00450 // </prerequisite>
00451 // <synopsis> 
00452 // This class is a TaQLNodeRep holding the info defining a table.
00453 // It can be a constant value holding a name or it can be a subquery.
00454 // Furthermore the alias of the table is defined (which can be empty).
00455 // </synopsis> 
00456 
00457 class TaQLTableNodeRep: public TaQLNodeRep
00458 {
00459 public:
00460   TaQLTableNodeRep (const TaQLNode& table, const String& alias);
00461   virtual ~TaQLTableNodeRep();
00462   virtual TaQLNodeResult visit (TaQLNodeVisitor&) const;
00463   virtual void show (std::ostream& os) const;
00464   virtual void save (AipsIO& aio) const;
00465   static TaQLTableNodeRep* restore (AipsIO& aio);
00466 
00467   TaQLNode itsTable;
00468   String   itsAlias;
00469 };
00470 
00471 
00472 // <summary>
00473 // Raw TaQL parse tree node defining a select column expression.
00474 // </summary>
00475 // <use visibility=local>
00476 // <reviewed reviewer="" date="" tests="tTaQLNode">
00477 // </reviewed>
00478 // <prerequisite>
00479 //# Classes you should understand before using this one.
00480 //   <li> <linkto class=TaQLNodeRep>TaQLNodeRep</linkto>
00481 // </prerequisite>
00482 // <synopsis> 
00483 // This class is a TaQLNodeRep holding a column expression in the
00484 // column list of the select clause.
00485 // A new column name and data type can be defined for the column (expression).
00486 // The expression can be a wildcarded column name (a regex) preceeded by
00487 // ~ or !~ (meaning include or exclude).
00488 // </synopsis> 
00489 
00490 class TaQLColNodeRep: public TaQLNodeRep
00491 {
00492 public:
00493   TaQLColNodeRep (const TaQLNode& expr, const String& name,
00494                   const String& nameMask, const String& dtype);
00495   virtual ~TaQLColNodeRep();
00496   virtual TaQLNodeResult visit (TaQLNodeVisitor&) const;
00497   virtual void show (std::ostream& os) const;
00498   virtual void save (AipsIO& aio) const;
00499   static TaQLColNodeRep* restore (AipsIO& aio);
00500 
00501   TaQLNode itsExpr;
00502   String   itsName;
00503   String   itsNameMask;
00504   String   itsDtype;
00505 };
00506 
00507 
00508 // <summary>
00509 // Raw TaQL parse tree node defining a select column list.
00510 // </summary>
00511 // <use visibility=local>
00512 // <reviewed reviewer="" date="" tests="tTaQLNode">
00513 // </reviewed>
00514 // <prerequisite>
00515 //# Classes you should understand before using this one.
00516 //   <li> <linkto class=TaQLNodeRep>TaQLNodeRep</linkto>
00517 // </prerequisite>
00518 // <synopsis> 
00519 // This class is a TaQLNodeRep holding a select column list.
00520 // It also defines if the result must be distinct (unique)
00521 // </synopsis> 
00522 
00523 class TaQLColumnsNodeRep: public TaQLNodeRep
00524 {
00525 public:
00526   TaQLColumnsNodeRep (Bool distinct, const TaQLMultiNode& nodes);
00527   virtual ~TaQLColumnsNodeRep();
00528   virtual TaQLNodeResult visit (TaQLNodeVisitor&) const;
00529   virtual void show (std::ostream& os) const;
00530   virtual void save (AipsIO& aio) const;
00531   static TaQLColumnsNodeRep* restore (AipsIO& aio);
00532 
00533   Bool          itsDistinct;
00534   TaQLMultiNode itsNodes;
00535 };
00536 
00537 
00538 // <summary>
00539 // Raw TaQL parse tree node defining a groupby list.
00540 // </summary>
00541 // <use visibility=local>
00542 // <reviewed reviewer="" date="" tests="tTaQLNode">
00543 // </reviewed>
00544 // <prerequisite>
00545 //# Classes you should understand before using this one.
00546 //   <li> <linkto class=TaQLNodeRep>TaQLNodeRep</linkto>
00547 // </prerequisite>
00548 // <synopsis> 
00549 // This class is a TaQLNodeRep holding a groupby list with the optional
00550 // ROLLUP qualifier.
00551 // </synopsis> 
00552 
00553 class TaQLGroupNodeRep: public TaQLNodeRep
00554 {
00555 public:
00556   // Do not change the values of this enum, as objects might be persistent.
00557   enum Type {Normal=0,
00558              Rollup=1};  //# in the future type Cube could be added
00559   TaQLGroupNodeRep (Type type, const TaQLMultiNode& nodes);
00560   virtual ~TaQLGroupNodeRep();
00561   virtual TaQLNodeResult visit (TaQLNodeVisitor&) const;
00562   virtual void show (std::ostream& os) const;
00563   virtual void save (AipsIO& aio) const;
00564   static TaQLGroupNodeRep* restore (AipsIO& aio);
00565 
00566   Type          itsType;
00567   TaQLMultiNode itsNodes;
00568 };
00569 
00570 
00571 // <summary>
00572 // Raw TaQL parse tree node defining a sort key.
00573 // </summary>
00574 // <use visibility=local>
00575 // <reviewed reviewer="" date="" tests="tTaQLNode">
00576 // </reviewed>
00577 // <prerequisite>
00578 //# Classes you should understand before using this one.
00579 //   <li> <linkto class=TaQLNodeRep>TaQLNodeRep</linkto>
00580 // </prerequisite>
00581 // <synopsis> 
00582 // This class is a TaQLNodeRep holding a sort key and the optional order
00583 // in which this key must be sorted.
00584 // </synopsis> 
00585 
00586 class TaQLSortKeyNodeRep: public TaQLNodeRep
00587 {
00588 public:
00589   // Do not change the values of this enum, as objects might be persistent.
00590   enum Type {Ascending =0,
00591              Descending=1,
00592              None      =2};
00593   TaQLSortKeyNodeRep (Type type, const TaQLNode& child);
00594   virtual ~TaQLSortKeyNodeRep();
00595   virtual TaQLNodeResult visit (TaQLNodeVisitor&) const;
00596   virtual void show (std::ostream& os) const;
00597   virtual void save (AipsIO& aio) const;
00598   static TaQLSortKeyNodeRep* restore (AipsIO& aio);
00599 
00600   Type     itsType;
00601   TaQLNode itsChild;
00602 };
00603 
00604 
00605 // <summary>
00606 // Raw TaQL parse tree node defining a sort list.
00607 // </summary>
00608 // <use visibility=local>
00609 // <reviewed reviewer="" date="" tests="tTaQLNode">
00610 // </reviewed>
00611 // <prerequisite>
00612 //# Classes you should understand before using this one.
00613 //   <li> <linkto class=TaQLNodeRep>TaQLNodeRep</linkto>
00614 // </prerequisite>
00615 // <synopsis> 
00616 // This class is a TaQLNodeRep holding a sort list and the default order
00617 // for each individual sort key.
00618 // </synopsis> 
00619 
00620 class TaQLSortNodeRep: public TaQLNodeRep
00621 {
00622 public:
00623   // Do not change the values of this enum, as objects might be persistent.
00624   enum Type {Ascending =0,
00625              Descending=1};
00626   TaQLSortNodeRep (Bool unique, Type type, const TaQLMultiNode& keys);
00627   virtual ~TaQLSortNodeRep();
00628   virtual TaQLNodeResult visit (TaQLNodeVisitor&) const;
00629   virtual void show (std::ostream& os) const;
00630   virtual void save (AipsIO& aio) const;
00631   static TaQLSortNodeRep* restore (AipsIO& aio);
00632 
00633   Bool          itsUnique;
00634   Type          itsType;
00635   TaQLMultiNode itsKeys;
00636 };
00637 
00638 
00639 // <summary>
00640 // Raw TaQL parse tree node defining a limit/offset expression.
00641 // </summary>
00642 // <use visibility=local>
00643 // <reviewed reviewer="" date="" tests="tTaQLNode">
00644 // </reviewed>
00645 // <prerequisite>
00646 //# Classes you should understand before using this one.
00647 //   <li> <linkto class=TaQLNodeRep>TaQLNodeRep</linkto>
00648 // </prerequisite>
00649 // <synopsis> 
00650 // This class is a TaQLNodeRep holding the optional expressions for the
00651 // LIMIT and OFFSET clause.
00652 // </synopsis> 
00653 
00654 class TaQLLimitOffNodeRep: public TaQLNodeRep
00655 {
00656 public:
00657   TaQLLimitOffNodeRep (const TaQLNode& limit, const TaQLNode& offset);
00658   virtual ~TaQLLimitOffNodeRep();
00659   virtual TaQLNodeResult visit (TaQLNodeVisitor&) const;
00660   virtual void show (std::ostream& os) const;
00661   virtual void save (AipsIO& aio) const;
00662   static TaQLLimitOffNodeRep* restore (AipsIO& aio);
00663 
00664   TaQLNode itsLimit;
00665   TaQLNode itsOffset;
00666 };
00667 
00668 
00669 // <summary>
00670 // Raw TaQL parse tree node defining a giving expression list.
00671 // </summary>
00672 // <use visibility=local>
00673 // <reviewed reviewer="" date="" tests="tTaQLNode">
00674 // </reviewed>
00675 // <prerequisite>
00676 //# Classes you should understand before using this one.
00677 //   <li> <linkto class=TaQLNodeRep>TaQLNodeRep</linkto>
00678 // </prerequisite>
00679 // <synopsis> 
00680 // This class is a TaQLNodeRep holding the values for a GIVING clause.
00681 // The value can be a table name or a list of expressions.
00682 // </synopsis> 
00683 
00684 class TaQLGivingNodeRep: public TaQLNodeRep
00685 {
00686 public:
00687   explicit TaQLGivingNodeRep (const String& name, const TaQLMultiNode& type);
00688   explicit TaQLGivingNodeRep (const TaQLMultiNode& exprlist);
00689   virtual ~TaQLGivingNodeRep();
00690   virtual TaQLNodeResult visit (TaQLNodeVisitor&) const;
00691   virtual void show (std::ostream& os) const;
00692   virtual void save (AipsIO& aio) const;
00693   static TaQLGivingNodeRep* restore (AipsIO& aio);
00694 
00695   String        itsName;
00696   TaQLMultiNode itsType;
00697   TaQLMultiNode itsExprList;
00698 };
00699 
00700 
00701 // <summary>
00702 // Raw TaQL parse tree node defining a column update expression.
00703 // </summary>
00704 // <use visibility=local>
00705 // <reviewed reviewer="" date="" tests="tTaQLNode">
00706 // </reviewed>
00707 // <prerequisite>
00708 //# Classes you should understand before using this one.
00709 //   <li> <linkto class=TaQLNodeRep>TaQLNodeRep</linkto>
00710 // </prerequisite>
00711 // <synopsis> 
00712 // This class is a TaQLNodeRep holding the values for an update expression.
00713 // It defines the column name and the expression for the new value.
00714 // Optionally an index can be defined in case the column contains array
00715 // values for which only some values need to be updated.
00716 // </synopsis> 
00717 
00718 class TaQLUpdExprNodeRep: public TaQLNodeRep
00719 {
00720 public:
00721   TaQLUpdExprNodeRep (const String& name, const String& nameMask,
00722                       const TaQLNode& expr);
00723   TaQLUpdExprNodeRep (const String& name, const String& nameMask,
00724                       const TaQLMultiNode& indices,
00725                       const TaQLNode& expr);
00726   TaQLUpdExprNodeRep (const String& name, const String& nameMask,
00727                       const TaQLMultiNode& indices1,
00728                       const TaQLMultiNode& indices2,
00729                       const TaQLNode& expr);
00730   virtual ~TaQLUpdExprNodeRep();
00731   virtual TaQLNodeResult visit (TaQLNodeVisitor&) const;
00732   virtual void show (std::ostream& os) const;
00733   virtual void save (AipsIO& aio) const;
00734   static TaQLUpdExprNodeRep* restore (AipsIO& aio);
00735 
00736   String        itsName;
00737   String        itsNameMask;
00738   TaQLMultiNode itsIndices1;     //# indices or mask
00739   TaQLMultiNode itsIndices2;     //# mask or indices
00740   TaQLNode      itsExpr;
00741 };
00742 
00743 
00744 // <summary>
00745 // Raw TaQL parse tree node defining a selection command.
00746 // </summary>
00747 // <use visibility=local>
00748 // <reviewed reviewer="" date="" tests="tTaQLNode">
00749 // </reviewed>
00750 // <prerequisite>
00751 //# Classes you should understand before using this one.
00752 //   <li> <linkto class=TaQLNodeRep>TaQLNodeRep</linkto>
00753 // </prerequisite>
00754 // <synopsis> 
00755 // This class is an abstract TaQLNodeRep for a selection command that can
00756 // also be used as a subquery.
00757 // It holds flags telling if and how the select command must be
00758 // executed when the node is visited for TaQLNodeHandler.
00759 // </synopsis> 
00760 
00761 class TaQLQueryNodeRep: public TaQLNodeRep
00762 {
00763 public:
00764   TaQLQueryNodeRep (int nodeType);
00765   virtual ~TaQLQueryNodeRep();
00766   void setBrackets()
00767     { itsBrackets = True; }
00768   void setNoExecute()
00769     { itsNoExecute = True; }
00770   void setFromExecute()
00771     { itsFromExecute = True; }
00772   Bool getBrackets() const
00773     { return itsBrackets; }
00774   Bool getNoExecute() const
00775     { return itsNoExecute; }
00776   Bool getFromExecute() const
00777     { return itsFromExecute; }
00778   virtual void show (std::ostream& os) const;
00779 protected:
00780   virtual void saveSuper (AipsIO& aio) const;
00781   virtual void restoreSuper (AipsIO& aio);
00782 private:
00783   virtual void showDerived (std::ostream& os) const = 0;
00784   Bool itsBrackets;
00785   Bool itsNoExecute;    //# no execute in EXISTS operator
00786   Bool itsFromExecute;  //# special execute in FROM
00787 };
00788 
00789 
00790 // <summary>
00791 // Raw TaQL parse tree node defining a select command.
00792 // </summary>
00793 // <use visibility=local>
00794 // <reviewed reviewer="" date="" tests="tTaQLNode">
00795 // </reviewed>
00796 // <prerequisite>
00797 //# Classes you should understand before using this one.
00798 //   <li> <linkto class=TaQLNodeRep>TaQLNodeRep</linkto>
00799 // </prerequisite>
00800 // <synopsis> 
00801 // This class is a TaQLNodeRep holding the different parts of a
00802 // select expression.
00803 // It also holds flags telling if and how the select command must be
00804 // executed when the node is visited for TaQLNodeHandler.
00805 // </synopsis> 
00806 
00807 class TaQLSelectNodeRep: public TaQLQueryNodeRep
00808 {
00809 public:
00810   TaQLSelectNodeRep (const TaQLNode& columns, const TaQLNode& where,
00811                      const TaQLNode& groupby, const TaQLNode& having,
00812                      const TaQLNode& sort, const TaQLNode& limitoff,
00813                      const TaQLNode& giving, const TaQLMultiNode& dminfo);
00814   TaQLSelectNodeRep (const TaQLNode& columns, const TaQLMultiNode& tables,
00815                      const TaQLNode& join, const TaQLNode& where,
00816                      const TaQLNode& groupby, const TaQLNode& having,
00817                      const TaQLNode& sort, const TaQLNode& limitoff,
00818                      const TaQLNode& giving, const TaQLMultiNode& dminfo);
00819   virtual ~TaQLSelectNodeRep();
00820   virtual TaQLNodeResult visit (TaQLNodeVisitor&) const;
00821   virtual void showDerived (std::ostream& os) const;
00822   virtual void save (AipsIO& aio) const;
00823   static TaQLSelectNodeRep* restore (AipsIO& aio);
00824 
00825   TaQLNode      itsColumns;
00826   TaQLMultiNode itsTables;
00827   TaQLNode      itsJoin;
00828   TaQLNode      itsWhere;
00829   TaQLNode      itsGroupby;
00830   TaQLNode      itsHaving;
00831   TaQLNode      itsSort;
00832   TaQLNode      itsLimitOff;
00833   TaQLNode      itsGiving;
00834   TaQLMultiNode itsDMInfo;
00835 };
00836 
00837 
00838 // <summary>
00839 // Raw TaQL parse tree node defining a count command.
00840 // </summary>
00841 // <use visibility=local>
00842 // <reviewed reviewer="" date="" tests="tTaQLNode">
00843 // </reviewed>
00844 // <prerequisite>
00845 //# Classes you should understand before using this one.
00846 //   <li> <linkto class=TaQLNodeRep>TaQLNodeRep</linkto>
00847 // </prerequisite>
00848 // <synopsis> 
00849 // This class is a TaQLNodeRep holding the parts for a count command.
00850 // </synopsis> 
00851 
00852 class TaQLCountNodeRep: public TaQLQueryNodeRep
00853 {
00854 public:
00855   TaQLCountNodeRep (const TaQLNode& columns, const TaQLMultiNode& tables,
00856                     const TaQLNode& where);
00857   virtual ~TaQLCountNodeRep();
00858   virtual TaQLNodeResult visit (TaQLNodeVisitor&) const;
00859   virtual void showDerived (std::ostream& os) const;
00860   virtual void save (AipsIO& aio) const;
00861   static TaQLCountNodeRep* restore (AipsIO& aio);
00862 
00863   TaQLNode      itsColumns;
00864   TaQLMultiNode itsTables;
00865   TaQLNode      itsWhere;
00866 };
00867 
00868 
00869 // <summary>
00870 // Raw TaQL parse tree node defining an update command.
00871 // </summary>
00872 // <use visibility=local>
00873 // <reviewed reviewer="" date="" tests="tTaQLNode">
00874 // </reviewed>
00875 // <prerequisite>
00876 //# Classes you should understand before using this one.
00877 //   <li> <linkto class=TaQLNodeRep>TaQLNodeRep</linkto>
00878 // </prerequisite>
00879 // <synopsis> 
00880 // This class is a TaQLNodeRep holding the parts for an update command.
00881 // The tables to be used can be defined in two parts: the main one in
00882 // the UPDATE clause, possible other ones in the FROM command.
00883 // </synopsis> 
00884 
00885 class TaQLUpdateNodeRep: public TaQLNodeRep
00886 {
00887 public:
00888   TaQLUpdateNodeRep (const TaQLMultiNode& tables, const TaQLMultiNode& update,
00889                      const TaQLMultiNode& from, const TaQLNode& where,
00890                      const TaQLNode& sort, const TaQLNode& limitoff);
00891   virtual ~TaQLUpdateNodeRep();
00892   virtual TaQLNodeResult visit (TaQLNodeVisitor&) const;
00893   virtual void show (std::ostream& os) const;
00894   virtual void save (AipsIO& aio) const;
00895   static TaQLUpdateNodeRep* restore (AipsIO& aio);
00896 
00897   TaQLMultiNode itsTables;
00898   TaQLMultiNode itsUpdate;
00899   TaQLMultiNode itsFrom;
00900   TaQLNode      itsWhere;
00901   TaQLNode      itsSort;
00902   TaQLNode      itsLimitOff;
00903 };
00904 
00905 
00906 // <summary>
00907 // Raw TaQL parse tree node defining an insert command.
00908 // </summary>
00909 // <use visibility=local>
00910 // <reviewed reviewer="" date="" tests="tTaQLNode">
00911 // </reviewed>
00912 // <prerequisite>
00913 //# Classes you should understand before using this one.
00914 //   <li> <linkto class=TaQLNodeRep>TaQLNodeRep</linkto>
00915 // </prerequisite>
00916 // <synopsis> 
00917 // This class is a TaQLNodeRep holding the parts for an insert command.
00918 // The values cvan be a list of expressions or a subquery.
00919 // </synopsis> 
00920 
00921 class TaQLInsertNodeRep: public TaQLNodeRep
00922 {
00923 public:
00924   TaQLInsertNodeRep (const TaQLMultiNode& tables, const TaQLMultiNode& columns,
00925                      const TaQLNode& values, const TaQLNode& limit);
00926   TaQLInsertNodeRep (const TaQLMultiNode& tables, const TaQLMultiNode& insert);
00927   virtual ~TaQLInsertNodeRep();
00928   virtual TaQLNodeResult visit (TaQLNodeVisitor&) const;
00929   virtual void show (std::ostream& os) const;
00930   virtual void save (AipsIO& aio) const;
00931   static TaQLInsertNodeRep* restore (AipsIO& aio);
00932 
00933   TaQLMultiNode itsTables;
00934   TaQLMultiNode itsColumns;
00935   TaQLNode      itsValues;
00936   TaQLNode      itsLimit;
00937 };
00938 
00939 
00940 // <summary>
00941 // Raw TaQL parse tree node defining a delete command.
00942 // </summary>
00943 // <use visibility=local>
00944 // <reviewed reviewer="" date="" tests="tTaQLNode">
00945 // </reviewed>
00946 // <prerequisite>
00947 //# Classes you should understand before using this one.
00948 //   <li> <linkto class=TaQLNodeRep>TaQLNodeRep</linkto>
00949 // </prerequisite>
00950 // <synopsis> 
00951 // This class is a TaQLNodeRep holding the parts for a delete command.
00952 // </synopsis> 
00953 
00954 class TaQLDeleteNodeRep: public TaQLNodeRep
00955 {
00956 public:
00957   TaQLDeleteNodeRep (const TaQLMultiNode& tables, const TaQLNode& where,
00958                      const TaQLNode& sort, const TaQLNode& limitoff);
00959   virtual ~TaQLDeleteNodeRep();
00960   virtual TaQLNodeResult visit (TaQLNodeVisitor&) const;
00961   virtual void show (std::ostream& os) const;
00962   virtual void save (AipsIO& aio) const;
00963   static TaQLDeleteNodeRep* restore (AipsIO& aio);
00964 
00965   TaQLMultiNode itsTables;
00966   TaQLNode      itsWhere;
00967   TaQLNode      itsSort;
00968   TaQLNode      itsLimitOff;
00969 };
00970 
00971 
00972 // <summary>
00973 // Raw TaQL parse tree node defining a calc command.
00974 // </summary>
00975 // <use visibility=local>
00976 // <reviewed reviewer="" date="" tests="tTaQLNode">
00977 // </reviewed>
00978 // <prerequisite>
00979 //# Classes you should understand before using this one.
00980 //   <li> <linkto class=TaQLNodeRep>TaQLNodeRep</linkto>
00981 // </prerequisite>
00982 // <synopsis> 
00983 // This class is a TaQLNodeRep holding the parts of the calc command.
00984 // </synopsis> 
00985 
00986 class TaQLCalcNodeRep: public TaQLNodeRep
00987 {
00988 public:
00989   TaQLCalcNodeRep (const TaQLMultiNode& tables, const TaQLNode& expr,
00990                    const TaQLNode& where,
00991                    const TaQLNode& sort, const TaQLNode& limitoff);
00992   virtual ~TaQLCalcNodeRep();
00993   virtual TaQLNodeResult visit (TaQLNodeVisitor&) const;
00994   virtual void show (std::ostream& os) const;
00995   virtual void save (AipsIO& aio) const;
00996   static TaQLCalcNodeRep* restore (AipsIO& aio);
00997 
00998   TaQLMultiNode itsTables;
00999   TaQLNode      itsExpr;
01000   TaQLNode      itsWhere;
01001   TaQLNode      itsSort;
01002   TaQLNode      itsLimitOff;
01003 };
01004 
01005 
01006 // <summary>
01007 // Raw TaQL parse tree node defining a create table command.
01008 // </summary>
01009 // <use visibility=local>
01010 // <reviewed reviewer="" date="" tests="tTaQLNode">
01011 // </reviewed>
01012 // <prerequisite>
01013 //# Classes you should understand before using this one.
01014 //   <li> <linkto class=TaQLNodeRep>TaQLNodeRep</linkto>
01015 // </prerequisite>
01016 // <synopsis> 
01017 // This class is a TaQLNodeRep holding the parts of the create table command.
01018 // </synopsis> 
01019 
01020 class TaQLCreTabNodeRep: public TaQLQueryNodeRep
01021 {
01022 public:
01023   TaQLCreTabNodeRep (const TaQLNode& giving, const TaQLMultiNode& cols,
01024                      const TaQLNode& limit, const TaQLMultiNode& dminfo);
01025   virtual ~TaQLCreTabNodeRep();
01026   virtual TaQLNodeResult visit (TaQLNodeVisitor&) const;
01027   virtual void showDerived (std::ostream& os) const;
01028   virtual void save (AipsIO& aio) const;
01029   static TaQLCreTabNodeRep* restore (AipsIO& aio);
01030 
01031   TaQLNode      itsGiving;
01032   TaQLMultiNode itsColumns;
01033   TaQLNode      itsLimit;
01034   TaQLMultiNode itsDMInfo;
01035 };
01036 
01037 
01038 // <summary>
01039 // Raw TaQL parse tree node defining a create column specification.
01040 // </summary>
01041 // <use visibility=local>
01042 // <reviewed reviewer="" date="" tests="tTaQLNode">
01043 // </reviewed>
01044 // <prerequisite>
01045 //# Classes you should understand before using this one.
01046 //   <li> <linkto class=TaQLNodeRep>TaQLNodeRep</linkto>
01047 // </prerequisite>
01048 // <synopsis> 
01049 // This class is a TaQLNodeRep holding the parts of a column specification
01050 // in the create table command.
01051 // </synopsis> 
01052 
01053 class TaQLColSpecNodeRep: public TaQLNodeRep
01054 {
01055 public:
01056   TaQLColSpecNodeRep (const String& name, const String& dtype,
01057                       const TaQLMultiNode& spec);
01058   virtual ~TaQLColSpecNodeRep();
01059   virtual TaQLNodeResult visit (TaQLNodeVisitor&) const;
01060   virtual void show (std::ostream& os) const;
01061   virtual void save (AipsIO& aio) const;
01062   static TaQLColSpecNodeRep* restore (AipsIO& aio);
01063 
01064   String        itsName;
01065   String        itsDtype;
01066   TaQLMultiNode itsSpec;
01067 };
01068 
01069 
01070 // <summary>
01071 // Raw TaQL parse tree node defining a record field.
01072 // </summary>
01073 // <use visibility=local>
01074 // <reviewed reviewer="" date="" tests="tTaQLNode">
01075 // </reviewed>
01076 // <prerequisite>
01077 //# Classes you should understand before using this one.
01078 //   <li> <linkto class=TaQLNodeRep>TaQLNodeRep</linkto>
01079 // </prerequisite>
01080 // <synopsis> 
01081 // This class is a TaQLNodeRep holding the parts of a record field.
01082 // </synopsis> 
01083 
01084 class TaQLRecFldNodeRep: public TaQLNodeRep
01085 {
01086 public:
01087   TaQLRecFldNodeRep (const String& name,
01088                      const TaQLNode& values, const String& dtype);
01089   TaQLRecFldNodeRep (const String& name, const TaQLRecFldNodeRep&);
01090   TaQLRecFldNodeRep (const String& name, const String& fromName,
01091                      const String& dtype);
01092   virtual ~TaQLRecFldNodeRep();
01093   virtual TaQLNodeResult visit (TaQLNodeVisitor&) const;
01094   virtual void show (std::ostream& os) const;
01095   virtual void save (AipsIO& aio) const;
01096   static TaQLRecFldNodeRep* restore (AipsIO& aio);
01097 
01098   String   itsName;
01099   String   itsFromName;
01100   String   itsDtype;
01101   TaQLNode itsValues;
01102 };
01103 
01104 
01105 // <summary>
01106 // Raw TaQL parse tree node defining a unit.
01107 // </summary>
01108 // <use visibility=local>
01109 // <reviewed reviewer="" date="" tests="tTaQLNode">
01110 // </reviewed>
01111 // <prerequisite>
01112 //# Classes you should understand before using this one.
01113 //   <li> <linkto class=TaQLNodeRep>TaQLNodeRep</linkto>
01114 // </prerequisite>
01115 // <synopsis> 
01116 // This class is a TaQLNodeRep holding the parts of a record field.
01117 // </synopsis> 
01118 
01119 class TaQLUnitNodeRep: public TaQLNodeRep
01120 {
01121 public:
01122   TaQLUnitNodeRep (const String& unit, const TaQLNode& child);
01123   virtual ~TaQLUnitNodeRep();
01124   virtual TaQLNodeResult visit (TaQLNodeVisitor&) const;
01125   virtual void show (std::ostream& os) const;
01126   virtual void save (AipsIO& aio) const;
01127   static TaQLUnitNodeRep* restore (AipsIO& aio);
01128 
01129   String   itsUnit;
01130   TaQLNode itsChild;
01131 };
01132 
01133 
01134 // <summary>
01135 // Raw TaQL parse tree node defining an alter table command.
01136 // </summary>
01137 // <use visibility=local>
01138 // <reviewed reviewer="" date="" tests="tTaQLNode">
01139 // </reviewed>
01140 // <prerequisite>
01141 //# Classes you should understand before using this one.
01142 //   <li> <linkto class=TaQLNodeRep>TaQLNodeRep</linkto>
01143 // </prerequisite>
01144 // <synopsis> 
01145 // This class is a TaQLNodeRep holding the parts of the alter table command.
01146 // </synopsis> 
01147 
01148 class TaQLAltTabNodeRep: public TaQLQueryNodeRep
01149 {
01150 public:
01151   TaQLAltTabNodeRep (const TaQLNode& table,
01152                      const TaQLMultiNode& from,
01153                      const TaQLMultiNode& commands);
01154   virtual ~TaQLAltTabNodeRep();
01155   virtual TaQLNodeResult visit (TaQLNodeVisitor&) const;
01156   virtual void showDerived (std::ostream& os) const;
01157   virtual void save (AipsIO& aio) const;
01158   static TaQLAltTabNodeRep* restore (AipsIO& aio);
01159 
01160   TaQLNode      itsTable;
01161   TaQLMultiNode itsFrom;
01162   TaQLMultiNode itsCommands;
01163 };
01164 
01165 
01166 // <summary>
01167 // Raw TaQL parse tree node defining an alter table add column command.
01168 // </summary>
01169 // <use visibility=local>
01170 // <reviewed reviewer="" date="" tests="tTaQLNode">
01171 // </reviewed>
01172 // <prerequisite>
01173 //# Classes you should understand before using this one.
01174 //   <li> <linkto class=TaQLNodeRep>TaQLNodeRep</linkto>
01175 // </prerequisite>
01176 // <synopsis> 
01177 // This class is a TaQLNodeRep holding the parts of the add column subcommand.
01178 // </synopsis> 
01179 
01180 class TaQLAddColNodeRep: public TaQLNodeRep
01181 {
01182 public:
01183   TaQLAddColNodeRep (const TaQLMultiNode& cols, const TaQLMultiNode& dminfo);
01184   virtual ~TaQLAddColNodeRep();
01185   virtual TaQLNodeResult visit (TaQLNodeVisitor&) const;
01186   virtual void show (std::ostream& os) const;
01187   virtual void save (AipsIO& aio) const;
01188   static TaQLAddColNodeRep* restore (AipsIO& aio);
01189 
01190   TaQLMultiNode itsColumns;
01191   TaQLMultiNode itsDMInfo;
01192 };
01193 
01194 
01195 // <summary>
01196 // Raw TaQL parse tree node defining an alter table rename or drop command.
01197 // </summary>
01198 // <use visibility=local>
01199 // <reviewed reviewer="" date="" tests="tTaQLNode">
01200 // </reviewed>
01201 // <prerequisite>
01202 //# Classes you should understand before using this one.
01203 //   <li> <linkto class=TaQLNodeRep>TaQLNodeRep</linkto>
01204 // </prerequisite>
01205 // <synopsis> 
01206 // This class is a TaQLNodeRep holding the parts of the rename or drop subcommand.
01207 // </synopsis> 
01208 
01209 class TaQLRenDropNodeRep: public TaQLNodeRep
01210 {
01211 public:
01212   TaQLRenDropNodeRep (Int type, const TaQLMultiNode& cols);
01213   virtual ~TaQLRenDropNodeRep();
01214   virtual TaQLNodeResult visit (TaQLNodeVisitor&) const;
01215   virtual void show (std::ostream& os) const;
01216   virtual void save (AipsIO& aio) const;
01217   static TaQLRenDropNodeRep* restore (AipsIO& aio);
01218 
01219   Int           itsType;
01220   TaQLMultiNode itsNames;
01221 };
01222 
01223 
01224 // <summary>
01225 // Raw TaQL parse tree node defining an alter table set keyword command.
01226 // </summary>
01227 // <use visibility=local>
01228 // <reviewed reviewer="" date="" tests="tTaQLNode">
01229 // </reviewed>
01230 // <prerequisite>
01231 //# Classes you should understand before using this one.
01232 //   <li> <linkto class=TaQLNodeRep>TaQLNodeRep</linkto>
01233 // </prerequisite>
01234 // <synopsis> 
01235 // This class is a TaQLNodeRep holding the parts of the set keyword subcommand.
01236 // </synopsis> 
01237 
01238 class TaQLSetKeyNodeRep: public TaQLNodeRep
01239 {
01240 public:
01241   TaQLSetKeyNodeRep (const TaQLMultiNode& keyvals);
01242   virtual ~TaQLSetKeyNodeRep();
01243   virtual TaQLNodeResult visit (TaQLNodeVisitor&) const;
01244   virtual void show (std::ostream& os) const;
01245   virtual void save (AipsIO& aio) const;
01246   static TaQLSetKeyNodeRep* restore (AipsIO& aio);
01247 
01248   TaQLMultiNode itsKeyVals;
01249 };
01250 
01251 
01252 // <summary>
01253 // Raw TaQL parse tree node defining an alter table add rows command.
01254 // </summary>
01255 // <use visibility=local>
01256 // <reviewed reviewer="" date="" tests="tTaQLNode">
01257 // </reviewed>
01258 // <prerequisite>
01259 //# Classes you should understand before using this one.
01260 //   <li> <linkto class=TaQLNodeRep>TaQLNodeRep</linkto>
01261 // </prerequisite>
01262 // <synopsis> 
01263 // This class is a TaQLNodeRep holding the parts of the add rows subcommand.
01264 // </synopsis> 
01265 
01266 class TaQLAddRowNodeRep: public TaQLNodeRep
01267 {
01268 public:
01269   TaQLAddRowNodeRep (const TaQLNode& nrow);
01270   virtual ~TaQLAddRowNodeRep();
01271   virtual TaQLNodeResult visit (TaQLNodeVisitor&) const;
01272   virtual void show (std::ostream& os) const;
01273   virtual void save (AipsIO& aio) const;
01274   static TaQLAddRowNodeRep* restore (AipsIO& aio);
01275 
01276   TaQLNode itsNRow;
01277 };
01278 
01279 
01280 // <summary>
01281 // Raw TaQL parse tree node defining an alter table command.
01282 // </summary>
01283 // <use visibility=local>
01284 // <reviewed reviewer="" date="" tests="tTaQLNode">
01285 // </reviewed>
01286 // <prerequisite>
01287 //# Classes you should understand before using this one.
01288 //   <li> <linkto class=TaQLNodeRep>TaQLNodeRep</linkto>
01289 // </prerequisite>
01290 // <synopsis> 
01291 // This class is a TaQLNodeRep holding the parts of the alter table command.
01292 // </synopsis> 
01293 
01294 class TaQLConcTabNodeRep: public TaQLQueryNodeRep
01295 {
01296 public:
01297   TaQLConcTabNodeRep (const String& tableName,
01298                       const TaQLMultiNode& tables,
01299                       const TaQLMultiNode& subtableNames);
01300   virtual ~TaQLConcTabNodeRep();
01301   virtual TaQLNodeResult visit (TaQLNodeVisitor&) const;
01302   virtual void showDerived (std::ostream& os) const;
01303   virtual void save (AipsIO& aio) const;
01304   static TaQLConcTabNodeRep* restore (AipsIO& aio);
01305 
01306   String        itsTableName;
01307   TaQLMultiNode itsTables;
01308   TaQLMultiNode itsSubTables;
01309 };
01310 
01311 
01312 // <summary>
01313 // Raw TaQL parse tree node defining a show command.
01314 // </summary>
01315 // <use visibility=local>
01316 // <reviewed reviewer="" date="" tests="tTaQLNode">
01317 // </reviewed>
01318 // <prerequisite>
01319 //# Classes you should understand before using this one.
01320 //   <li> <linkto class=TaQLNodeRep>TaQLNodeRep</linkto>
01321 // </prerequisite>
01322 // <synopsis> 
01323 // This class is a TaQLNodeRep holding the parts of the show command.
01324 // </synopsis> 
01325 
01326 class TaQLShowNodeRep: public TaQLNodeRep
01327 {
01328 public:
01329   TaQLShowNodeRep (const TaQLMultiNode& names);
01330   virtual ~TaQLShowNodeRep();
01331   virtual TaQLNodeResult visit (TaQLNodeVisitor&) const;
01332   virtual void show (std::ostream& os) const;
01333   virtual void save (AipsIO& aio) const;
01334   static TaQLShowNodeRep* restore (AipsIO& aio);
01335 
01336   TaQLMultiNode itsNames;
01337 };
01338 
01339 
01340 } //# NAMESPACE CASACORE - END
01341 
01342 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 31 Aug 2016 for casa by  doxygen 1.6.1