casacore
TaQLNodeDer.h
Go to the documentation of this file.
1 //# TaQLNodeDer.h: Specialized nodes in the raw TaQL parse tree
2 //# Copyright (C) 2005
3 //# Associated Universities, Inc. Washington DC, USA.
4 //#
5 //# This library is free software; you can redistribute it and/or modify it
6 //# under the terms of the GNU Library General Public License as published by
7 //# the Free Software Foundation; either version 2 of the License, or (at your
8 //# option) any later version.
9 //#
10 //# This library is distributed in the hope that it will be useful, but WITHOUT
11 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 //# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
13 //# License for more details.
14 //#
15 //# You should have received a copy of the GNU Library General Public License
16 //# along with this library; if not, write to the Free Software Foundation,
17 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
18 //#
19 //# Correspondence concerning AIPS++ should be addressed as follows:
20 //# Internet email: aips2-request@nrao.edu.
21 //# Postal address: AIPS++ Project Office
22 //# National Radio Astronomy Observatory
23 //# 520 Edgemont Road
24 //# Charlottesville, VA 22903-2475 USA
25 //#
26 //# $Id$
27 
28 #ifndef TABLES_TAQLNODEDER_H
29 #define TABLES_TAQLNODEDER_H
30 
31 //# Includes
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>
39 #include <vector>
40 #include <iostream>
41 
42 namespace casacore { //# NAMESPACE CASACORE - BEGIN
43 
44 
45 // <summary>
46 // Raw TaQL parse tree node defining a constant value.
47 // </summary>
48 // <use visibility=local>
49 // <reviewed reviewer="" date="" tests="tTaQLNode">
50 // </reviewed>
51 // <prerequisite>
52 //# Classes you should understand before using this one.
53 // <li> <linkto class=TaQLNodeRep>TaQLNodeRep</linkto>
54 // </prerequisite>
55 // <synopsis>
56 // This class is a TaQLNodeRep holding a constant expression or a table name.
57 // The types supported are Bool, Int, Double, DComplex, String, and MVTime.
58 // Note that a keyword or column name is represented by TaQLKeyColNodeRep.
59 // </synopsis>
60 
62 {
63 public:
64  // Do not change the values of this enum, as objects might be persistent.
65  enum Type {CTBool =0,
66  CTInt =1,
67  CTReal =2,
70  CTTime =5};
74  explicit TaQLConstNodeRep (Double value, const String& unit);
76  explicit TaQLConstNodeRep (const String& value, Bool isTableName=False);
77  explicit TaQLConstNodeRep (const MVTime& value);
78  explicit TaQLConstNodeRep (Int64 value, const String& subTableName);
80  { itsIsTableName = True; }
81  const String& getString() const;
82  const String& getUnit() const
83  { return itsUnit; }
84  virtual TaQLNodeResult visit (TaQLNodeVisitor&) const override;
85  virtual void show (std::ostream& os) const override;
86  virtual void save (AipsIO& aio) const override;
87  static TaQLNode restore (AipsIO& aio);
88 
98 };
99 
100 
101 // <summary>
102 // Raw TaQL parse tree node defining a constant regex value.
103 // </summary>
104 // <use visibility=local>
105 // <reviewed reviewer="" date="" tests="tTaQLNode">
106 // </reviewed>
107 // <prerequisite>
108 //# Classes you should understand before using this one.
109 // <li> <linkto class=TaQLNodeRep>TaQLNodeRep</linkto>
110 // </prerequisite>
111 // <synopsis>
112 // This class is a TaQLNodeRep holding a constant regex/pattern value.
113 // Part of the regex are the delimiters (like p//).
114 // It also holds if the regex is case-insensitive and if a match or no match
115 // operator is given.
116 // </synopsis>
117 
119 {
120 public:
121  explicit TaQLRegexNodeRep (const String& value);
122  TaQLRegexNodeRep (const String& value, Bool caseInsensitive, Bool negate,
123  Bool ignoreBlanks, Int maxDistance);
124  virtual TaQLNodeResult visit (TaQLNodeVisitor&) const override;
125  virtual void show (std::ostream& os) const override;
126  virtual void save (AipsIO& aio) const override;
127  static TaQLNode restore (AipsIO& aio);
128 
131  Bool itsNegate; //# True means !~
132  //# The following members are only used for distance.
135 };
136 
137 
138 // <summary>
139 // Raw TaQL parse tree node defining a unary operator.
140 // </summary>
141 // <use visibility=local>
142 // <reviewed reviewer="" date="" tests="tTaQLNode">
143 // </reviewed>
144 // <prerequisite>
145 //# Classes you should understand before using this one.
146 // <li> <linkto class=TaQLNodeRep>TaQLNodeRep</linkto>
147 // </prerequisite>
148 // <synopsis>
149 // This class is a TaQLNodeRep holding a unary operator and operand.
150 // The operators supported are -, ~, NOT, EXISTS, and NOT EXISTS.
151 // Note the unary operator + is superfluous and is ignored by the parser.
152 // </synopsis>
153 
155 {
156 public:
157  // Do not change the values of this enum, as objects might be persistent.
158  enum Type {U_MINUS =0,
159  U_NOT =1,
162  U_BITNOT =4};
163  TaQLUnaryNodeRep (Type type, const TaQLNode& child);
164  virtual TaQLNodeResult visit (TaQLNodeVisitor&) const override;
165  virtual void show (std::ostream& os) const override;
166  virtual void save (AipsIO& aio) const override;
167  static TaQLNode restore (AipsIO& aio);
168 
171 };
172 
173 
174 // <summary>
175 // Raw TaQL parse tree node defining a binary operator.
176 // </summary>
177 // <use visibility=local>
178 // <reviewed reviewer="" date="" tests="tTaQLNode">
179 // </reviewed>
180 // <prerequisite>
181 //# Classes you should understand before using this one.
182 // <li> <linkto class=TaQLNodeRep>TaQLNodeRep</linkto>
183 // </prerequisite>
184 // <synopsis>
185 // This class is a TaQLNodeRep holding a binary operator and operands.
186 // All standard mathematical (including % and ^), relational, bit, and logical
187 // operators are supported. Furthermore operator IN and the INDEX operator
188 // (for indexing in an array) are supported.
189 // </synopsis>
190 
192 {
193 public:
194  // Do not change the values of this enum, as objects might be persistent.
195  enum Type {B_PLUS =0,
201  B_EQ =6,
202  B_NE =7,
203  B_GT =8,
204  B_GE =9,
205  B_LT =10,
206  B_LE =11,
207  B_OR =12,
208  B_AND =13,
209  B_IN =14,
210  B_INDEX =15,
214  B_BITAND =19,
215  B_BITXOR =20,
216  B_BITOR =21};
217  TaQLBinaryNodeRep (Type type, const TaQLNode& left, const TaQLNode& right);
218  virtual TaQLNodeResult visit (TaQLNodeVisitor&) const override;
219  virtual void show (std::ostream& os) const override;
220  virtual void save (AipsIO& aio) const override;
221  static TaQLNode restore (AipsIO& aio);
222  // Handle a comparison wih a regex. The operator (~ or !~) is extracted
223  // from the regex.
224  static TaQLBinaryNodeRep* handleRegex (const TaQLNode& left,
225  const TaQLRegexNode& regex);
226 
230 };
231 
232 
233 // <summary>
234 // Raw TaQL parse tree node defining a list of nodes.
235 // </summary>
236 // <use visibility=local>
237 // <reviewed reviewer="" date="" tests="tTaQLNode">
238 // </reviewed>
239 // <prerequisite>
240 //# Classes you should understand before using this one.
241 // <li> <linkto class=TaQLNodeRep>TaQLNodeRep</linkto>
242 // </prerequisite>
243 // <synopsis>
244 // This class is a TaQLNodeRep holding a list of heterogeneous nodes.
245 // </synopsis>
246 
248 {
249 public:
250  explicit TaQLMultiNodeRep (Bool isSetOrArray=False);
251  TaQLMultiNodeRep(const String& prefix, const String& postfix,
252  Bool isSetOrArray=False);
254  { itsIsSetOrArray = True; }
255  void setPPFix (const String& prefix, const String& postfix)
256  { itsPrefix = prefix; itsPostfix = postfix; }
257  void setSeparator (const String& sep)
258  { itsSep = sep; }
259  void setSeparator (uInt incr, const String& sep)
260  { itsIncr = incr; itsSep2 = sep; }
261  void add (const TaQLNode& node)
262  { itsNodes.push_back (node); }
263  const std::vector<TaQLNode>& getNodes() const
264  { return itsNodes; }
265  virtual TaQLNodeResult visit (TaQLNodeVisitor&) const override;
266  virtual void show (std::ostream& os) const override;
267  virtual void save (AipsIO& aio) const override;
268  static TaQLMultiNode restore (AipsIO& aio);
269 
270  std::vector<TaQLNode> itsNodes;
277 };
278 
279 
280 // <summary>
281 // Raw TaQL parse tree node defining a function.
282 // </summary>
283 // <use visibility=local>
284 // <reviewed reviewer="" date="" tests="tTaQLNode">
285 // </reviewed>
286 // <prerequisite>
287 //# Classes you should understand before using this one.
288 // <li> <linkto class=TaQLNodeRep>TaQLNodeRep</linkto>
289 // </prerequisite>
290 // <synopsis>
291 // This class is a TaQLNodeRep holding a function name and its arguments.
292 // </synopsis>
293 
295 {
296 public:
297  TaQLFuncNodeRep (const String& name);
298  TaQLFuncNodeRep (const String& name, const TaQLMultiNode& args);
299  virtual TaQLNodeResult visit (TaQLNodeVisitor&) const override;
300  virtual void show (std::ostream& os) const override;
301  virtual void save (AipsIO& aio) const override;
302  static TaQLNode restore (AipsIO& aio);
303 
306 };
307 
308 
309 // <summary>
310 // Raw TaQL parse tree node defining a range.
311 // </summary>
312 // <use visibility=local>
313 // <reviewed reviewer="" date="" tests="tTaQLNode">
314 // </reviewed>
315 // <prerequisite>
316 //# Classes you should understand before using this one.
317 // <li> <linkto class=TaQLNodeRep>TaQLNodeRep</linkto>
318 // </prerequisite>
319 // <synopsis>
320 // This class is a TaQLNodeRep holding the optional start and end values
321 // of a range (i.e. an interval) and flags if the range is open or closed.
322 // </synopsis>
323 
325 {
326 public:
327  TaQLRangeNodeRep (Bool leftClosed, TaQLNode start,
328  const TaQLNode& end, Bool rightClosed);
329  TaQLRangeNodeRep (Bool leftClosed, const TaQLNode& start);
330  TaQLRangeNodeRep (const TaQLNode& end, Bool rightClosed);
331  virtual TaQLNodeResult visit (TaQLNodeVisitor&) const override;
332  virtual void show (std::ostream& os) const override;
333  virtual void save (AipsIO& aio) const override;
334  static TaQLNode restore (AipsIO& aio);
335 
340 };
341 
342 
343 // <summary>
344 // Raw TaQL parse tree node defining an index in a array.
345 // </summary>
346 // <use visibility=local>
347 // <reviewed reviewer="" date="" tests="tTaQLNode">
348 // </reviewed>
349 // <prerequisite>
350 //# Classes you should understand before using this one.
351 // <li> <linkto class=TaQLNodeRep>TaQLNodeRep</linkto>
352 // </prerequisite>
353 // <synopsis>
354 // This class is a TaQLNodeRep holding the optional start, end, and incr
355 // values of an index in an array.
356 // </synopsis>
357 
359 {
360 public:
361  TaQLIndexNodeRep (const TaQLNode& start, const TaQLNode& end,
362  const TaQLNode& incr);
363  virtual TaQLNodeResult visit (TaQLNodeVisitor&) const override;
364  virtual void show (std::ostream& os) const override;
365  virtual void save (AipsIO& aio) const override;
366  static TaQLNode restore (AipsIO& aio);
367 
371 };
372 
373 
374 // <summary>
375 // Raw TaQL parse tree node defining a join operation.
376 // </summary>
377 // <use visibility=local>
378 // <reviewed reviewer="" date="" tests="tTaQLNode">
379 // </reviewed>
380 // <prerequisite>
381 //# Classes you should understand before using this one.
382 // <li> <linkto class=TaQLNodeRep>TaQLNodeRep</linkto>
383 // </prerequisite>
384 // <synopsis>
385 // This class is a TaQLNodeRep holding the expressions of a join operation.
386 // This is, however, a placeholder and not implemented yet.
387 // </synopsis>
388 
390 {
391 public:
392  TaQLJoinNodeRep (const TaQLMultiNode& tables, const TaQLNode& condition);
393  virtual TaQLNodeResult visit (TaQLNodeVisitor&) const override;
394  virtual void show (std::ostream& os) const override;
395  virtual void save (AipsIO& aio) const override;
396  static TaQLNode restore (AipsIO& aio);
397 
400 };
401 
402 
403 // <summary>
404 // Raw TaQL parse tree node defining a keyword or column name.
405 // </summary>
406 // <use visibility=local>
407 // <reviewed reviewer="" date="" tests="tTaQLNode">
408 // </reviewed>
409 // <prerequisite>
410 //# Classes you should understand before using this one.
411 // <li> <linkto class=TaQLNodeRep>TaQLNodeRep</linkto>
412 // </prerequisite>
413 // <synopsis>
414 // This class is a TaQLNodeRep holding the name of a keyword or column.
415 // The name can contain . and :: delimiters for scoping.
416 // </synopsis>
417 
419 {
420 public:
421  TaQLKeyColNodeRep (const String& name, const String& nameMask = String());
422  virtual TaQLNodeResult visit (TaQLNodeVisitor&) const override;
423  virtual void show (std::ostream& os) const override;
424  virtual void save (AipsIO& aio) const override;
425  static TaQLNode restore (AipsIO& aio);
426 
429 };
430 
431 
432 // <summary>
433 // Raw TaQL parse tree node defining a table.
434 // </summary>
435 // <use visibility=local>
436 // <reviewed reviewer="" date="" tests="tTaQLNode">
437 // </reviewed>
438 // <prerequisite>
439 //# Classes you should understand before using this one.
440 // <li> <linkto class=TaQLNodeRep>TaQLNodeRep</linkto>
441 // </prerequisite>
442 // <synopsis>
443 // This class is a TaQLNodeRep holding the info defining a table.
444 // It can be a constant value holding a name or it can be a subquery.
445 // Furthermore the alias of the table is defined (which can be empty).
446 // </synopsis>
447 
449 {
450 public:
451  TaQLTableNodeRep (const TaQLNode& table, const String& alias);
452  virtual TaQLNodeResult visit (TaQLNodeVisitor&) const override;
453  virtual void show (std::ostream& os) const override;
454  virtual void save (AipsIO& aio) const override;
455  static TaQLNode restore (AipsIO& aio);
456 
459 };
460 
461 
462 // <summary>
463 // Raw TaQL parse tree node defining a select column expression.
464 // </summary>
465 // <use visibility=local>
466 // <reviewed reviewer="" date="" tests="tTaQLNode">
467 // </reviewed>
468 // <prerequisite>
469 //# Classes you should understand before using this one.
470 // <li> <linkto class=TaQLNodeRep>TaQLNodeRep</linkto>
471 // </prerequisite>
472 // <synopsis>
473 // This class is a TaQLNodeRep holding a column expression in the
474 // column list of the select clause.
475 // A new column name and data type can be defined for the column (expression).
476 // The expression can be a wildcarded column name (a regex) preceeded by
477 // ~ or !~ (meaning include or exclude).
478 // </synopsis>
479 
481 {
482 public:
483  TaQLColNodeRep (const TaQLNode& expr, const String& name,
484  const String& nameMask, const String& dtype);
485  virtual TaQLNodeResult visit (TaQLNodeVisitor&) const override;
486  virtual void show (std::ostream& os) const override;
487  virtual void save (AipsIO& aio) const override;
488  static TaQLNode restore (AipsIO& aio);
489 
494 };
495 
496 
497 // <summary>
498 // Raw TaQL parse tree node defining a select column list.
499 // </summary>
500 // <use visibility=local>
501 // <reviewed reviewer="" date="" tests="tTaQLNode">
502 // </reviewed>
503 // <prerequisite>
504 //# Classes you should understand before using this one.
505 // <li> <linkto class=TaQLNodeRep>TaQLNodeRep</linkto>
506 // </prerequisite>
507 // <synopsis>
508 // This class is a TaQLNodeRep holding a select column list.
509 // It also defines if the result must be distinct (unique)
510 // </synopsis>
511 
513 {
514 public:
515  TaQLColumnsNodeRep (Bool distinct, const TaQLMultiNode& nodes);
516  virtual TaQLNodeResult visit (TaQLNodeVisitor&) const override;
517  virtual void show (std::ostream& os) const override;
518  virtual void save (AipsIO& aio) const override;
519  static TaQLNode restore (AipsIO& aio);
520 
523 };
524 
525 
526 // <summary>
527 // Raw TaQL parse tree node defining a groupby list.
528 // </summary>
529 // <use visibility=local>
530 // <reviewed reviewer="" date="" tests="tTaQLNode">
531 // </reviewed>
532 // <prerequisite>
533 //# Classes you should understand before using this one.
534 // <li> <linkto class=TaQLNodeRep>TaQLNodeRep</linkto>
535 // </prerequisite>
536 // <synopsis>
537 // This class is a TaQLNodeRep holding a groupby list with the optional
538 // ROLLUP qualifier.
539 // </synopsis>
540 
542 {
543 public:
544  // Do not change the values of this enum, as objects might be persistent.
545  enum Type {Normal=0,
546  Rollup=1}; //# in the future type Cube could be added
547  TaQLGroupNodeRep (Type type, const TaQLMultiNode& nodes);
548  virtual TaQLNodeResult visit (TaQLNodeVisitor&) const override;
549  virtual void show (std::ostream& os) const override;
550  virtual void save (AipsIO& aio) const override;
551  static TaQLNode restore (AipsIO& aio);
552 
555 };
556 
557 
558 // <summary>
559 // Raw TaQL parse tree node defining a sort key.
560 // </summary>
561 // <use visibility=local>
562 // <reviewed reviewer="" date="" tests="tTaQLNode">
563 // </reviewed>
564 // <prerequisite>
565 //# Classes you should understand before using this one.
566 // <li> <linkto class=TaQLNodeRep>TaQLNodeRep</linkto>
567 // </prerequisite>
568 // <synopsis>
569 // This class is a TaQLNodeRep holding a sort key and the optional order
570 // in which this key must be sorted.
571 // </synopsis>
572 
574 {
575 public:
576  // Do not change the values of this enum, as objects might be persistent.
577  enum Type {Ascending =0,
579  None =2};
580  TaQLSortKeyNodeRep (Type type, const TaQLNode& child);
581  virtual TaQLNodeResult visit (TaQLNodeVisitor&) const override;
582  virtual void show (std::ostream& os) const override;
583  virtual void save (AipsIO& aio) const override;
584  static TaQLNode restore (AipsIO& aio);
585 
588 };
589 
590 
591 // <summary>
592 // Raw TaQL parse tree node defining a sort list.
593 // </summary>
594 // <use visibility=local>
595 // <reviewed reviewer="" date="" tests="tTaQLNode">
596 // </reviewed>
597 // <prerequisite>
598 //# Classes you should understand before using this one.
599 // <li> <linkto class=TaQLNodeRep>TaQLNodeRep</linkto>
600 // </prerequisite>
601 // <synopsis>
602 // This class is a TaQLNodeRep holding a sort list and the default order
603 // for each individual sort key.
604 // </synopsis>
605 
607 {
608 public:
609  // Do not change the values of this enum, as objects might be persistent.
610  enum Type {Ascending =0,
612  TaQLSortNodeRep (Bool unique, Type type, const TaQLMultiNode& keys);
613  virtual TaQLNodeResult visit (TaQLNodeVisitor&) const override;
614  virtual void show (std::ostream& os) const override;
615  virtual void save (AipsIO& aio) const override;
616  static TaQLNode restore (AipsIO& aio);
617 
621 };
622 
623 
624 // <summary>
625 // Raw TaQL parse tree node defining a limit/offset expression.
626 // </summary>
627 // <use visibility=local>
628 // <reviewed reviewer="" date="" tests="tTaQLNode">
629 // </reviewed>
630 // <prerequisite>
631 //# Classes you should understand before using this one.
632 // <li> <linkto class=TaQLNodeRep>TaQLNodeRep</linkto>
633 // </prerequisite>
634 // <synopsis>
635 // This class is a TaQLNodeRep holding the optional expressions for the
636 // LIMIT and OFFSET clause.
637 // </synopsis>
638 
640 {
641 public:
642  TaQLLimitOffNodeRep (const TaQLNode& limit, const TaQLNode& offset);
643  virtual TaQLNodeResult visit (TaQLNodeVisitor&) const override;
644  virtual void show (std::ostream& os) const override;
645  virtual void save (AipsIO& aio) const override;
646  static TaQLNode restore (AipsIO& aio);
647 
650 };
651 
652 
653 // <summary>
654 // Raw TaQL parse tree node defining a giving expression list.
655 // </summary>
656 // <use visibility=local>
657 // <reviewed reviewer="" date="" tests="tTaQLNode">
658 // </reviewed>
659 // <prerequisite>
660 //# Classes you should understand before using this one.
661 // <li> <linkto class=TaQLNodeRep>TaQLNodeRep</linkto>
662 // </prerequisite>
663 // <synopsis>
664 // This class is a TaQLNodeRep holding the values for a GIVING clause.
665 // The value can be a table name or a list of expressions.
666 // </synopsis>
667 
669 {
670 public:
671  explicit TaQLGivingNodeRep (const String& name, const TaQLMultiNode& type);
672  explicit TaQLGivingNodeRep (const TaQLMultiNode& exprlist);
673  virtual TaQLNodeResult visit (TaQLNodeVisitor&) const override;
674  virtual void show (std::ostream& os) const override;
675  virtual void save (AipsIO& aio) const override;
676  static TaQLNode restore (AipsIO& aio);
677 
681 };
682 
683 
684 // <summary>
685 // Raw TaQL parse tree node defining a column update expression.
686 // </summary>
687 // <use visibility=local>
688 // <reviewed reviewer="" date="" tests="tTaQLNode">
689 // </reviewed>
690 // <prerequisite>
691 //# Classes you should understand before using this one.
692 // <li> <linkto class=TaQLNodeRep>TaQLNodeRep</linkto>
693 // </prerequisite>
694 // <synopsis>
695 // This class is a TaQLNodeRep holding the values for an update expression.
696 // It defines the column name and the expression for the new value.
697 // Optionally an index can be defined in case the column contains array
698 // values for which only some values need to be updated.
699 // </synopsis>
700 
702 {
703 public:
704  TaQLUpdExprNodeRep (const String& name, const String& nameMask,
705  const TaQLNode& expr);
706  TaQLUpdExprNodeRep (const String& name, const String& nameMask,
707  const TaQLMultiNode& indices,
708  const TaQLNode& expr);
709  TaQLUpdExprNodeRep (const String& name, const String& nameMask,
710  const TaQLMultiNode& indices1,
711  const TaQLMultiNode& indices2,
712  const TaQLNode& expr);
713  virtual TaQLNodeResult visit (TaQLNodeVisitor&) const override;
714  virtual void show (std::ostream& os) const override;
715  virtual void save (AipsIO& aio) const override;
716  static TaQLNode restore (AipsIO& aio);
717 
720  TaQLMultiNode itsIndices1; //# indices or mask
721  TaQLMultiNode itsIndices2; //# mask or indices
723 };
724 
725 
726 // <summary>
727 // Raw TaQL parse tree node defining a selection command.
728 // </summary>
729 // <use visibility=local>
730 // <reviewed reviewer="" date="" tests="tTaQLNode">
731 // </reviewed>
732 // <prerequisite>
733 //# Classes you should understand before using this one.
734 // <li> <linkto class=TaQLNodeRep>TaQLNodeRep</linkto>
735 // </prerequisite>
736 // <synopsis>
737 // This class is an abstract TaQLNodeRep for a selection command that can
738 // also be used as a subquery.
739 // It holds flags telling if and how the select command must be
740 // executed when the node is visited for TaQLNodeHandler.
741 // </synopsis>
742 
744 {
745 public:
747  void setBrackets()
748  { itsBrackets = True; }
750  { itsNoExecute = True; }
752  { itsFromExecute = True; }
754  { return itsBrackets; }
756  { return itsNoExecute; }
758  { return itsFromExecute; }
759  virtual void show (std::ostream& os) const override;
760 protected:
761  void saveSuper (AipsIO& aio) const;
762  void restoreSuper (AipsIO& aio);
763 private:
764  virtual void showDerived (std::ostream& os) const = 0;
766  Bool itsNoExecute; //# no execute in EXISTS operator
767  Bool itsFromExecute; //# special execute in FROM
768 };
769 
770 
771 // <summary>
772 // Raw TaQL parse tree node defining a select command.
773 // </summary>
774 // <use visibility=local>
775 // <reviewed reviewer="" date="" tests="tTaQLNode">
776 // </reviewed>
777 // <prerequisite>
778 //# Classes you should understand before using this one.
779 // <li> <linkto class=TaQLNodeRep>TaQLNodeRep</linkto>
780 // </prerequisite>
781 // <synopsis>
782 // This class is a TaQLNodeRep holding the different parts of a
783 // select expression.
784 // It also holds flags telling if and how the select command must be
785 // executed when the node is visited for TaQLNodeHandler.
786 // </synopsis>
787 
789 {
790 public:
791  TaQLSelectNodeRep (const TaQLNode& columns,
792  const TaQLMultiNode& withTables, const TaQLNode& where,
793  const TaQLNode& groupby, const TaQLNode& having,
794  const TaQLNode& sort, const TaQLNode& limitoff,
795  const TaQLNode& giving, const TaQLMultiNode& dminfo);
796  TaQLSelectNodeRep (const TaQLNode& columns,
797  const TaQLMultiNode& withTables, const TaQLMultiNode& fromTables,
798  const TaQLNode& join, const TaQLNode& where,
799  const TaQLNode& groupby, const TaQLNode& having,
800  const TaQLNode& sort, const TaQLNode& limitoff,
801  const TaQLNode& giving, const TaQLMultiNode& dminfo);
802  virtual TaQLNodeResult visit (TaQLNodeVisitor&) const override;
803  virtual void showDerived (std::ostream& os) const override;
804  virtual void save (AipsIO& aio) const override;
805  static TaQLNode restore (AipsIO& aio);
806 
818 };
819 
820 
821 // <summary>
822 // Raw TaQL parse tree node defining a count command.
823 // </summary>
824 // <use visibility=local>
825 // <reviewed reviewer="" date="" tests="tTaQLNode">
826 // </reviewed>
827 // <prerequisite>
828 //# Classes you should understand before using this one.
829 // <li> <linkto class=TaQLNodeRep>TaQLNodeRep</linkto>
830 // </prerequisite>
831 // <synopsis>
832 // This class is a TaQLNodeRep holding the parts for a count command.
833 // </synopsis>
834 
836 {
837 public:
838  TaQLCountNodeRep (const TaQLMultiNode& with, const TaQLNode& columns,
839  const TaQLMultiNode& tables, const TaQLNode& where);
840  virtual TaQLNodeResult visit (TaQLNodeVisitor&) const override;
841  virtual void showDerived (std::ostream& os) const override;
842  virtual void save (AipsIO& aio) const override;
843  static TaQLNode restore (AipsIO& aio);
844 
849 };
850 
851 
852 // <summary>
853 // Raw TaQL parse tree node defining an update command.
854 // </summary>
855 // <use visibility=local>
856 // <reviewed reviewer="" date="" tests="tTaQLNode">
857 // </reviewed>
858 // <prerequisite>
859 //# Classes you should understand before using this one.
860 // <li> <linkto class=TaQLNodeRep>TaQLNodeRep</linkto>
861 // </prerequisite>
862 // <synopsis>
863 // This class is a TaQLNodeRep holding the parts for an update command.
864 // The tables to be used can be defined in two parts: the main one in
865 // the UPDATE clause, possible other ones in the FROM command.
866 // </synopsis>
867 
869 {
870 public:
872  const TaQLMultiNode& tables, const TaQLMultiNode& update,
873  const TaQLMultiNode& from, const TaQLNode& where,
874  const TaQLNode& sort, const TaQLNode& limitoff);
875  virtual TaQLNodeResult visit (TaQLNodeVisitor&) const override;
876  virtual void show (std::ostream& os) const override;
877  virtual void save (AipsIO& aio) const override;
878  static TaQLNode restore (AipsIO& aio);
879 
887 };
888 
889 
890 // <summary>
891 // Raw TaQL parse tree node defining an insert command.
892 // </summary>
893 // <use visibility=local>
894 // <reviewed reviewer="" date="" tests="tTaQLNode">
895 // </reviewed>
896 // <prerequisite>
897 //# Classes you should understand before using this one.
898 // <li> <linkto class=TaQLNodeRep>TaQLNodeRep</linkto>
899 // </prerequisite>
900 // <synopsis>
901 // This class is a TaQLNodeRep holding the parts for an insert command.
902 // The values cvan be a list of expressions or a subquery.
903 // </synopsis>
904 
906 {
907 public:
908  TaQLInsertNodeRep (const TaQLMultiNode& with, const TaQLMultiNode& tables,
909  const TaQLMultiNode& columns,
910  const TaQLNode& values, const TaQLNode& limit);
911  TaQLInsertNodeRep (const TaQLMultiNode& with, const TaQLMultiNode& tables,
912  const TaQLMultiNode& insert);
913  virtual TaQLNodeResult visit (TaQLNodeVisitor&) const override;
914  virtual void show (std::ostream& os) const override;
915  virtual void save (AipsIO& aio) const override;
916  static TaQLNode restore (AipsIO& aio);
917 
923 };
924 
925 
926 // <summary>
927 // Raw TaQL parse tree node defining a delete command.
928 // </summary>
929 // <use visibility=local>
930 // <reviewed reviewer="" date="" tests="tTaQLNode">
931 // </reviewed>
932 // <prerequisite>
933 //# Classes you should understand before using this one.
934 // <li> <linkto class=TaQLNodeRep>TaQLNodeRep</linkto>
935 // </prerequisite>
936 // <synopsis>
937 // This class is a TaQLNodeRep holding the parts for a delete command.
938 // </synopsis>
939 
941 {
942 public:
943  TaQLDeleteNodeRep (const TaQLMultiNode& with, const TaQLMultiNode& tables,
944  const TaQLNode& where,
945  const TaQLNode& sort, const TaQLNode& limitoff);
946  virtual TaQLNodeResult visit (TaQLNodeVisitor&) const override;
947  virtual void show (std::ostream& os) const override;
948  virtual void save (AipsIO& aio) const override;
949  static TaQLNode restore (AipsIO& aio);
950 
956 };
957 
958 
959 // <summary>
960 // Raw TaQL parse tree node defining a calc command.
961 // </summary>
962 // <use visibility=local>
963 // <reviewed reviewer="" date="" tests="tTaQLNode">
964 // </reviewed>
965 // <prerequisite>
966 //# Classes you should understand before using this one.
967 // <li> <linkto class=TaQLNodeRep>TaQLNodeRep</linkto>
968 // </prerequisite>
969 // <synopsis>
970 // This class is a TaQLNodeRep holding the parts of the calc command.
971 // </synopsis>
972 
974 {
975 public:
976  TaQLCalcNodeRep (const TaQLMultiNode& withTables, const TaQLMultiNode& fromTables,
977  const TaQLNode& expr, const TaQLNode& where,
978  const TaQLNode& sort, const TaQLNode& limitoff);
979  virtual TaQLNodeResult visit (TaQLNodeVisitor&) const override;
980  virtual void show (std::ostream& os) const override;
981  virtual void save (AipsIO& aio) const override;
982  static TaQLNode restore (AipsIO& aio);
983 
990 };
991 
992 
993 // <summary>
994 // Raw TaQL parse tree node defining a create table command.
995 // </summary>
996 // <use visibility=local>
997 // <reviewed reviewer="" date="" tests="tTaQLNode">
998 // </reviewed>
999 // <prerequisite>
1000 //# Classes you should understand before using this one.
1001 // <li> <linkto class=TaQLNodeRep>TaQLNodeRep</linkto>
1002 // </prerequisite>
1003 // <synopsis>
1004 // This class is a TaQLNodeRep holding the parts of the create table command.
1005 // </synopsis>
1006 
1008 {
1009 public:
1011  const TaQLNode& giving, const TaQLMultiNode& likeDrop,
1012  const TaQLMultiNode& cols,
1013  const TaQLNode& limit, const TaQLMultiNode& dminfo);
1014  virtual TaQLNodeResult visit (TaQLNodeVisitor&) const override;
1015  virtual void showDerived (std::ostream& os) const override;
1016  virtual void save (AipsIO& aio) const override;
1017  static TaQLNode restore (AipsIO& aio);
1018 
1025 };
1026 
1027 
1028 // <summary>
1029 // Raw TaQL parse tree node defining a create column specification.
1030 // </summary>
1031 // <use visibility=local>
1032 // <reviewed reviewer="" date="" tests="tTaQLNode">
1033 // </reviewed>
1034 // <prerequisite>
1035 //# Classes you should understand before using this one.
1036 // <li> <linkto class=TaQLNodeRep>TaQLNodeRep</linkto>
1037 // </prerequisite>
1038 // <synopsis>
1039 // This class is a TaQLNodeRep holding the parts of a column specification
1040 // in the create table command.
1041 // </synopsis>
1042 
1044 {
1045 public:
1046  TaQLColSpecNodeRep (const String& name, const String& likeCol,
1047  const String& dtype, const TaQLMultiNode& spec);
1048  virtual TaQLNodeResult visit (TaQLNodeVisitor&) const override;
1049  virtual void show (std::ostream& os) const override;
1050  virtual void save (AipsIO& aio) const override;
1051  static TaQLNode restore (AipsIO& aio);
1052 
1057 };
1058 
1059 
1060 // <summary>
1061 // Raw TaQL parse tree node defining a record field.
1062 // </summary>
1063 // <use visibility=local>
1064 // <reviewed reviewer="" date="" tests="tTaQLNode">
1065 // </reviewed>
1066 // <prerequisite>
1067 //# Classes you should understand before using this one.
1068 // <li> <linkto class=TaQLNodeRep>TaQLNodeRep</linkto>
1069 // </prerequisite>
1070 // <synopsis>
1071 // This class is a TaQLNodeRep holding the parts of a record field.
1072 // </synopsis>
1073 
1075 {
1076 public:
1078  const TaQLNode& values, const String& dtype);
1080  TaQLRecFldNodeRep (const String& name, const String& fromName,
1081  const String& dtype);
1082  virtual TaQLNodeResult visit (TaQLNodeVisitor&) const override;
1083  virtual void show (std::ostream& os) const override;
1084  virtual void save (AipsIO& aio) const override;
1085  static TaQLNode restore (AipsIO& aio);
1086 
1091 };
1092 
1093 
1094 // <summary>
1095 // Raw TaQL parse tree node defining a unit.
1096 // </summary>
1097 // <use visibility=local>
1098 // <reviewed reviewer="" date="" tests="tTaQLNode">
1099 // </reviewed>
1100 // <prerequisite>
1101 //# Classes you should understand before using this one.
1102 // <li> <linkto class=TaQLNodeRep>TaQLNodeRep</linkto>
1103 // </prerequisite>
1104 // <synopsis>
1105 // This class is a TaQLNodeRep holding the parts of a record field.
1106 // </synopsis>
1107 
1109 {
1110 public:
1111  TaQLUnitNodeRep (const String& unit, const TaQLNode& child);
1112  virtual TaQLNodeResult visit (TaQLNodeVisitor&) const override;
1113  virtual void show (std::ostream& os) const override;
1114  virtual void save (AipsIO& aio) const override;
1115  static TaQLNode restore (AipsIO& aio);
1116 
1119 };
1120 
1121 
1122 // <summary>
1123 // Raw TaQL parse tree node defining an alter table command.
1124 // </summary>
1125 // <use visibility=local>
1126 // <reviewed reviewer="" date="" tests="tTaQLNode">
1127 // </reviewed>
1128 // <prerequisite>
1129 //# Classes you should understand before using this one.
1130 // <li> <linkto class=TaQLNodeRep>TaQLNodeRep</linkto>
1131 // </prerequisite>
1132 // <synopsis>
1133 // This class is a TaQLNodeRep holding the parts of the alter table command.
1134 // </synopsis>
1135 
1137 {
1138 public:
1139  TaQLAltTabNodeRep (const TaQLMultiNode& with, const TaQLNode& table,
1140  const TaQLMultiNode& from, const TaQLMultiNode& commands);
1141  virtual TaQLNodeResult visit (TaQLNodeVisitor&) const override;
1142  virtual void showDerived (std::ostream& os) const override;
1143  virtual void save (AipsIO& aio) const override;
1144  static TaQLNode restore (AipsIO& aio);
1145 
1150 };
1151 
1152 
1153 // <summary>
1154 // Raw TaQL parse tree node defining an alter table add column command.
1155 // </summary>
1156 // <use visibility=local>
1157 // <reviewed reviewer="" date="" tests="tTaQLNode">
1158 // </reviewed>
1159 // <prerequisite>
1160 //# Classes you should understand before using this one.
1161 // <li> <linkto class=TaQLNodeRep>TaQLNodeRep</linkto>
1162 // </prerequisite>
1163 // <synopsis>
1164 // This class is a TaQLNodeRep holding the parts of the add column subcommand.
1165 // </synopsis>
1166 
1168 {
1169 public:
1170  TaQLAddColNodeRep (const TaQLMultiNode& cols, const TaQLMultiNode& dminfo);
1171  virtual TaQLNodeResult visit (TaQLNodeVisitor&) const override;
1172  virtual void show (std::ostream& os) const override;
1173  virtual void save (AipsIO& aio) const override;
1174  static TaQLNode restore (AipsIO& aio);
1175 
1178 };
1179 
1180 
1181 // <summary>
1182 // Raw TaQL parse tree node defining an alter table rename or drop command.
1183 // </summary>
1184 // <use visibility=local>
1185 // <reviewed reviewer="" date="" tests="tTaQLNode">
1186 // </reviewed>
1187 // <prerequisite>
1188 //# Classes you should understand before using this one.
1189 // <li> <linkto class=TaQLNodeRep>TaQLNodeRep</linkto>
1190 // </prerequisite>
1191 // <synopsis>
1192 // This class is a TaQLNodeRep holding the parts of the rename or drop subcommand.
1193 // </synopsis>
1194 
1196 {
1197 public:
1198  TaQLRenDropNodeRep (Int type, const TaQLMultiNode& cols);
1199  virtual TaQLNodeResult visit (TaQLNodeVisitor&) const override;
1200  virtual void show (std::ostream& os) const override;
1201  virtual void save (AipsIO& aio) const override;
1202  static TaQLNode restore (AipsIO& aio);
1203 
1206 };
1207 
1208 
1209 // <summary>
1210 // Raw TaQL parse tree node defining an alter table set keyword command.
1211 // </summary>
1212 // <use visibility=local>
1213 // <reviewed reviewer="" date="" tests="tTaQLNode">
1214 // </reviewed>
1215 // <prerequisite>
1216 //# Classes you should understand before using this one.
1217 // <li> <linkto class=TaQLNodeRep>TaQLNodeRep</linkto>
1218 // </prerequisite>
1219 // <synopsis>
1220 // This class is a TaQLNodeRep holding the parts of the set keyword subcommand.
1221 // </synopsis>
1222 
1224 {
1225 public:
1227  virtual TaQLNodeResult visit (TaQLNodeVisitor&) const override;
1228  virtual void show (std::ostream& os) const override;
1229  virtual void save (AipsIO& aio) const override;
1230  static TaQLNode restore (AipsIO& aio);
1231 
1233 };
1234 
1235 
1236 // <summary>
1237 // Raw TaQL parse tree node defining an alter table add rows command.
1238 // </summary>
1239 // <use visibility=local>
1240 // <reviewed reviewer="" date="" tests="tTaQLNode">
1241 // </reviewed>
1242 // <prerequisite>
1243 //# Classes you should understand before using this one.
1244 // <li> <linkto class=TaQLNodeRep>TaQLNodeRep</linkto>
1245 // </prerequisite>
1246 // <synopsis>
1247 // This class is a TaQLNodeRep holding the parts of the add rows subcommand.
1248 // </synopsis>
1249 
1251 {
1252 public:
1254  virtual TaQLNodeResult visit (TaQLNodeVisitor&) const override;
1255  virtual void show (std::ostream& os) const override;
1256  virtual void save (AipsIO& aio) const override;
1257  static TaQLNode restore (AipsIO& aio);
1258 
1260 };
1261 
1262 
1263 // <summary>
1264 // Raw TaQL parse tree node defining an alter table command.
1265 // </summary>
1266 // <use visibility=local>
1267 // <reviewed reviewer="" date="" tests="tTaQLNode">
1268 // </reviewed>
1269 // <prerequisite>
1270 //# Classes you should understand before using this one.
1271 // <li> <linkto class=TaQLNodeRep>TaQLNodeRep</linkto>
1272 // </prerequisite>
1273 // <synopsis>
1274 // This class is a TaQLNodeRep holding the parts of the alter table command.
1275 // </synopsis>
1276 
1278 {
1279 public:
1280  TaQLConcTabNodeRep (const String& tableName,
1281  const TaQLMultiNode& tables,
1282  const TaQLMultiNode& subtableNames);
1283  virtual TaQLNodeResult visit (TaQLNodeVisitor&) const override;
1284  virtual void showDerived (std::ostream& os) const override;
1285  virtual void save (AipsIO& aio) const override;
1286  static TaQLNode restore (AipsIO& aio);
1287 
1291 };
1292 
1293 
1294 // <summary>
1295 // Raw TaQL parse tree node defining a show command.
1296 // </summary>
1297 // <use visibility=local>
1298 // <reviewed reviewer="" date="" tests="tTaQLNode">
1299 // </reviewed>
1300 // <prerequisite>
1301 //# Classes you should understand before using this one.
1302 // <li> <linkto class=TaQLNodeRep>TaQLNodeRep</linkto>
1303 // </prerequisite>
1304 // <synopsis>
1305 // This class is a TaQLNodeRep holding the parts of the show command.
1306 // </synopsis>
1307 
1309 {
1310 public:
1312  virtual TaQLNodeResult visit (TaQLNodeVisitor&) const override;
1313  virtual void show (std::ostream& os) const override;
1314  virtual void save (AipsIO& aio) const override;
1315  static TaQLNode restore (AipsIO& aio);
1316 
1318 };
1319 
1320 
1321 // <summary>
1322 // Raw TaQL parse tree node defining an alter table copy column command.
1323 // </summary>
1324 // <use visibility=local>
1325 // <reviewed reviewer="" date="" tests="tTaQLNode">
1326 // </reviewed>
1327 // <prerequisite>
1328 //# Classes you should understand before using this one.
1329 // <li> <linkto class=TaQLNodeRep>TaQLNodeRep</linkto>
1330 // </prerequisite>
1331 // <synopsis>
1332 // This class is a TaQLNodeRep holding the parts of the copy column subcommand.
1333 // </synopsis>
1334 
1336 {
1337 public:
1338  TaQLCopyColNodeRep (const TaQLMultiNode& names, const TaQLMultiNode& dminfo);
1339  virtual TaQLNodeResult visit (TaQLNodeVisitor&) const override;
1340  virtual void show (std::ostream& os) const override;
1341  virtual void save (AipsIO& aio) const override;
1342  static TaQLNode restore (AipsIO& aio);
1343 
1346 };
1347 
1348 
1349 // <summary>
1350 // Raw TaQL parse tree node defining a DROP TABLE command.
1351 // </summary>
1352 // <use visibility=local>
1353 // <reviewed reviewer="" date="" tests="tTaQLNode">
1354 // </reviewed>
1355 // <prerequisite>
1356 //# Classes you should understand before using this one.
1357 // <li> <linkto class=TaQLNodeRep>TaQLNodeRep</linkto>
1358 // </prerequisite>
1359 // <synopsis>
1360 // This class is a TaQLNodeRep holding the tables of a drop table command.
1361 // </synopsis>
1362 
1364 {
1365 public:
1366  TaQLDropTabNodeRep (const TaQLMultiNode& with, const TaQLMultiNode& tables);
1367  virtual TaQLNodeResult visit (TaQLNodeVisitor&) const override;
1368  virtual void show (std::ostream& os) const override;
1369  virtual void save (AipsIO& aio) const override;
1370  static TaQLNode restore (AipsIO& aio);
1371 
1374 };
1375 
1376 
1377 } //# NAMESPACE CASACORE - END
1378 
1379 #endif
Normal or Gaussian distribution.
Definition: Random.h:998
String: the storage and methods of handling collections of characters.
Definition: String.h:225
Raw TaQL parse tree node defining an alter table add column command.
Definition: TaQLNodeDer.h:1168
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.
Definition: TaQLNodeDer.h:1251
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.
Definition: TaQLNodeDer.h:1137
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.
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.
Definition: TaQLNodeDer.h:192
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 &regex)
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.
Definition: TaQLNodeDer.h:195
Raw TaQL parse tree node defining a calc command.
Definition: TaQLNodeDer.h:974
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.
Definition: TaQLNodeDer.h:481
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.
Definition: TaQLNodeDer.h:1044
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.
Definition: TaQLNodeDer.h:513
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.
Definition: TaQLNodeDer.h:1278
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)
Type
Do not change the values of this enum, as objects might be persistent.
Definition: TaQLNodeDer.h:65
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
Definition: TaQLNodeDer.h:82
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.
Definition: TaQLNodeDer.h:1336
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.
Definition: TaQLNodeDer.h:836
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.
Definition: TaQLNodeDer.h:1008
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)
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.
Definition: TaQLNodeDer.h:941
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.
Definition: TaQLNodeDer.h:1364
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.
Definition: TaQLNodeDer.h:295
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.
Definition: TaQLNodeDer.h:669
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.
Definition: TaQLNodeDer.h:542
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.
Definition: TaQLNodeDer.h:545
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.
Definition: TaQLNodeDer.h:359
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.
Definition: TaQLNodeDer.h:906
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.
Definition: TaQLNodeDer.h:390
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.
Definition: TaQLNodeDer.h:419
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.
Definition: TaQLNodeDer.h:640
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.
Definition: TaQLNodeDer.h:248
void setSeparator(uInt incr, const String &sep)
Definition: TaQLNodeDer.h:259
const std::vector< TaQLNode > & getNodes() const
Definition: TaQLNodeDer.h:263
TaQLMultiNodeRep(const String &prefix, const String &postfix, Bool isSetOrArray=False)
void setSeparator(const String &sep)
Definition: TaQLNodeDer.h:257
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)
Definition: TaQLNodeDer.h:255
virtual void save(AipsIO &aio) const override
Save the object.
void add(const TaQLNode &node)
Definition: TaQLNodeDer.h:261
virtual TaQLNodeResult visit(TaQLNodeVisitor &) const override
Visit a node for tree traversal.
std::vector< TaQLNode > itsNodes
Definition: TaQLNodeDer.h:270
Envelope class for a node containing a list of nodes.
Definition: TaQLNode.h:229
char nodeType() const
Get the node type of the derived class.
Definition: TaQLNodeRep.h:130
Envelope class to hold the result of a visit to the node tree.
Raw TaQL parse tree node defining a selection command.
Definition: TaQLNodeDer.h:744
virtual void showDerived(std::ostream &os) const =0
void restoreSuper(AipsIO &aio)
void saveSuper(AipsIO &aio) 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.
Definition: TaQLNodeDer.h:325
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.
Definition: TaQLNodeDer.h:1075
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.
Definition: TaQLNodeDer.h:119
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.
Definition: TaQLNode.h:206
Raw TaQL parse tree node defining an alter table rename or drop command.
Definition: TaQLNodeDer.h:1196
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.
Definition: TaQLNodeDer.h:789
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.
Definition: TaQLNodeDer.h:1224
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.
Definition: TaQLNodeDer.h:1309
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.
Definition: TaQLNodeDer.h:574
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.
Definition: TaQLNodeDer.h:577
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.
Definition: TaQLNodeDer.h:607
virtual void save(AipsIO &aio) const override
Save the object.
Type
Do not change the values of this enum, as objects might be persistent.
Definition: TaQLNodeDer.h:610
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.
Definition: TaQLNodeDer.h:449
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.
Definition: TaQLNodeDer.h:155
Type
Do not change the values of this enum, as objects might be persistent.
Definition: TaQLNodeDer.h:158
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.
Definition: TaQLNodeDer.h:1109
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.
Definition: TaQLNodeDer.h:702
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)
virtual void show(std::ostream &os) const override
Print the object in an ostream.
TaQLUpdExprNodeRep(const String &name, const String &nameMask, const TaQLNode &expr)
Raw TaQL parse tree node defining an update command.
Definition: TaQLNodeDer.h:869
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.
this file contains all the compiler specific defines
Definition: mainpage.dox:28
const Bool False
Definition: aipstype.h:44
unsigned int uInt
Definition: aipstype.h:51
long long Int64
Define the extra non-standard types used by Casacore (like proposed uSize, Size)
Definition: aipsxtype.h:38
TableExprNode regex(const TableExprNode &node)
Functions for regular expression matching and pattern matching.
Definition: ExprNode.h:1483
int Int
Definition: aipstype.h:50
bool Bool
Define the standard types used by Casacore.
Definition: aipstype.h:42
LatticeExprNode value(const LatticeExprNode &expr)
This function returns the value of the expression without a mask.
const Bool True
Definition: aipstype.h:43
double Double
Definition: aipstype.h:55