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 (Int64 value, Bool isTableName=False)
76  itsType(CTInt), itsIsTableName(isTableName), itsIValue(value),
77  itsRValue(value), itsCValue(value,0.) {}
81  itsCValue(value,0.) {}
82  explicit TaQLConstNodeRep (Double value, const String& unit)
85  itsCValue(value,0.), itsUnit(unit) {}
89  explicit TaQLConstNodeRep (const String& value, Bool isTableName=False)
91  itsType(CTString), itsIsTableName(isTableName), itsSValue(value) {}
92  explicit TaQLConstNodeRep (const MVTime& value)
95  itsRValue(value), itsCValue(value,0.), itsTValue(value) {}
96  virtual ~TaQLConstNodeRep();
98  { itsIsTableName = True; }
99  const String& getString() const;
100  const String& getUnit() const
101  { return itsUnit; }
102  virtual TaQLNodeResult visit (TaQLNodeVisitor&) const;
103  virtual void show (std::ostream& os) const;
104  virtual void save (AipsIO& aio) const;
105  static TaQLConstNodeRep* restore (AipsIO& aio);
106 
116 };
117 
118 
119 // <summary>
120 // Raw TaQL parse tree node defining a constant regex value.
121 // </summary>
122 // <use visibility=local>
123 // <reviewed reviewer="" date="" tests="tTaQLNode">
124 // </reviewed>
125 // <prerequisite>
126 //# Classes you should understand before using this one.
127 // <li> <linkto class=TaQLNodeRep>TaQLNodeRep</linkto>
128 // </prerequisite>
129 // <synopsis>
130 // This class is a TaQLNodeRep holding a constant regex/pattern value.
131 // Part of the regex are the delimiters (like p//).
132 // It also holds if the regex is case-insensitive and if a match or no match
133 // operator is given.
134 // </synopsis>
135 
137 {
138 public:
139  explicit TaQLRegexNodeRep (const String& value);
140  TaQLRegexNodeRep (const String& value, Bool caseInsensitive, Bool negate,
141  Bool ignoreBlanks, Int maxDistance)
143  itsValue(value), itsCaseInsensitive(caseInsensitive), itsNegate(negate),
144  itsIgnoreBlanks(ignoreBlanks), itsMaxDistance(maxDistance) {}
145  virtual ~TaQLRegexNodeRep();
146  virtual TaQLNodeResult visit (TaQLNodeVisitor&) const;
147  virtual void show (std::ostream& os) const;
148  virtual void save (AipsIO& aio) const;
149  static TaQLRegexNodeRep* restore (AipsIO& aio);
150 
153  Bool itsNegate; //# True means !~
154  //# The following members are only used for distance.
157 };
158 
159 
160 // <summary>
161 // Raw TaQL parse tree node defining a unary operator.
162 // </summary>
163 // <use visibility=local>
164 // <reviewed reviewer="" date="" tests="tTaQLNode">
165 // </reviewed>
166 // <prerequisite>
167 //# Classes you should understand before using this one.
168 // <li> <linkto class=TaQLNodeRep>TaQLNodeRep</linkto>
169 // </prerequisite>
170 // <synopsis>
171 // This class is a TaQLNodeRep holding a unary operator and operand.
172 // The operators supported are -, ~, NOT, EXISTS, and NOT EXISTS.
173 // Note the unary operator + is superfluous and is ignored by the parser.
174 // </synopsis>
175 
177 {
178 public:
179  // Do not change the values of this enum, as objects might be persistent.
180  enum Type {U_MINUS =0,
181  U_NOT =1,
182  U_EXISTS =2,
183  U_NOTEXISTS=3,
184  U_BITNOT =4};
185  TaQLUnaryNodeRep (Type type, const TaQLNode& child)
187  itsType(type), itsChild(child) {}
188  virtual ~TaQLUnaryNodeRep();
189  virtual TaQLNodeResult visit (TaQLNodeVisitor&) const;
190  virtual void show (std::ostream& os) const;
191  virtual void save (AipsIO& aio) const;
192  static TaQLUnaryNodeRep* restore (AipsIO& aio);
193 
196 };
197 
198 
199 // <summary>
200 // Raw TaQL parse tree node defining a binary operator.
201 // </summary>
202 // <use visibility=local>
203 // <reviewed reviewer="" date="" tests="tTaQLNode">
204 // </reviewed>
205 // <prerequisite>
206 //# Classes you should understand before using this one.
207 // <li> <linkto class=TaQLNodeRep>TaQLNodeRep</linkto>
208 // </prerequisite>
209 // <synopsis>
210 // This class is a TaQLNodeRep holding a binary operator and operands.
211 // All standard mathematical (including % and ^), relational, bit, and logical
212 // operators are supported. Furthermore operator IN and the INDEX operator
213 // (for indexing in an array) are supported.
214 // </synopsis>
215 
217 {
218 public:
219  // Do not change the values of this enum, as objects might be persistent.
220  enum Type {B_PLUS =0,
221  B_MINUS =1,
222  B_TIMES =2,
223  B_DIVIDE=3,
224  B_MODULO=4,
225  B_POWER =5,
226  B_EQ =6,
227  B_NE =7,
228  B_GT =8,
229  B_GE =9,
230  B_LT =10,
231  B_LE =11,
232  B_OR =12,
233  B_AND =13,
234  B_IN =14,
235  B_INDEX =15,
236  B_DIVIDETRUNC=16,
237  B_EQREGEX =17,
238  B_NEREGEX =18,
239  B_BITAND =19,
240  B_BITXOR =20,
241  B_BITOR =21};
242  TaQLBinaryNodeRep (Type type, const TaQLNode& left, const TaQLNode& right)
244  itsType(type), itsLeft(left), itsRight(right) {}
245  virtual ~TaQLBinaryNodeRep();
246  virtual TaQLNodeResult visit (TaQLNodeVisitor&) const;
247  virtual void show (std::ostream& os) const;
248  virtual void save (AipsIO& aio) const;
249  static TaQLBinaryNodeRep* restore (AipsIO& aio);
250  // Handle a comparison wih a regex. The operator (~ or !~) is extracted
251  // from the regex.
252  static TaQLBinaryNodeRep* handleRegex (const TaQLNode& left,
253  const TaQLRegexNode& regex);
254 
258 };
259 
260 
261 // <summary>
262 // Raw TaQL parse tree node defining a list of nodes.
263 // </summary>
264 // <use visibility=local>
265 // <reviewed reviewer="" date="" tests="tTaQLNode">
266 // </reviewed>
267 // <prerequisite>
268 //# Classes you should understand before using this one.
269 // <li> <linkto class=TaQLNodeRep>TaQLNodeRep</linkto>
270 // </prerequisite>
271 // <synopsis>
272 // This class is a TaQLNodeRep holding a list of heterogeneous nodes.
273 // </synopsis>
274 
276 {
277 public:
278  explicit TaQLMultiNodeRep (Bool isSetOrArray=False)
279  : TaQLNodeRep (TaQLNode_Multi), itsIsSetOrArray(isSetOrArray) {}
280  TaQLMultiNodeRep(const String& prefix, const String& postfix,
281  Bool isSetOrArray=False)
283  itsIsSetOrArray(isSetOrArray),
284  itsPrefix(prefix), itsPostfix(postfix) {}
285  virtual ~TaQLMultiNodeRep();
287  { itsIsSetOrArray = True; }
288  void setPPFix (const String& prefix, const String& postfix)
289  { itsPrefix = prefix; itsPostfix = postfix; }
290  void add (const TaQLNode& node)
291  { itsNodes.push_back (node); }
292  const std::vector<TaQLNode>& getNodes() const
293  { return itsNodes; }
294  virtual TaQLNodeResult visit (TaQLNodeVisitor&) const;
295  virtual void show (std::ostream& os) const;
296  virtual void save (AipsIO& aio) const;
297  static TaQLMultiNodeRep* restore (AipsIO& aio);
298 
299  std::vector<TaQLNode> itsNodes;
303 };
304 
305 
306 // <summary>
307 // Raw TaQL parse tree node defining a function.
308 // </summary>
309 // <use visibility=local>
310 // <reviewed reviewer="" date="" tests="tTaQLNode">
311 // </reviewed>
312 // <prerequisite>
313 //# Classes you should understand before using this one.
314 // <li> <linkto class=TaQLNodeRep>TaQLNodeRep</linkto>
315 // </prerequisite>
316 // <synopsis>
317 // This class is a TaQLNodeRep holding a function name and its arguments.
318 // </synopsis>
319 
321 {
322 public:
323  TaQLFuncNodeRep (const String& name)
325  itsName(name), itsArgs(False) {}
326  TaQLFuncNodeRep (const String& name, const TaQLMultiNode& args)
328  itsName(name), itsArgs(args) {}
329  virtual ~TaQLFuncNodeRep();
330  virtual TaQLNodeResult visit (TaQLNodeVisitor&) const;
331  virtual void show (std::ostream& os) const;
332  virtual void save (AipsIO& aio) const;
333  static TaQLFuncNodeRep* restore (AipsIO& aio);
334 
337 };
338 
339 
340 // <summary>
341 // Raw TaQL parse tree node defining a range.
342 // </summary>
343 // <use visibility=local>
344 // <reviewed reviewer="" date="" tests="tTaQLNode">
345 // </reviewed>
346 // <prerequisite>
347 //# Classes you should understand before using this one.
348 // <li> <linkto class=TaQLNodeRep>TaQLNodeRep</linkto>
349 // </prerequisite>
350 // <synopsis>
351 // This class is a TaQLNodeRep holding the optional start and end values
352 // of a range (i.e. an interval) and flags if the range is open or closed.
353 // </synopsis>
354 
356 {
357 public:
358  TaQLRangeNodeRep (Bool leftClosed, TaQLNode start,
359  const TaQLNode& end, Bool rightClosed)
361  itsLeftClosed(leftClosed), itsStart(start),
362  itsEnd(end), itsRightClosed(rightClosed) {}
363  TaQLRangeNodeRep (Bool leftClosed, const TaQLNode& start)
365  itsLeftClosed(leftClosed), itsStart(start),
366  itsEnd(), itsRightClosed(False) {}
367  TaQLRangeNodeRep (const TaQLNode& end, Bool rightClosed)
369  itsLeftClosed(False), itsStart(),
370  itsEnd(end), itsRightClosed(rightClosed) {}
371  virtual ~TaQLRangeNodeRep();
372  virtual TaQLNodeResult visit (TaQLNodeVisitor&) const;
373  virtual void show (std::ostream& os) const;
374  virtual void save (AipsIO& aio) const;
375  static TaQLRangeNodeRep* restore (AipsIO& aio);
376 
381 };
382 
383 
384 // <summary>
385 // Raw TaQL parse tree node defining an index in a array.
386 // </summary>
387 // <use visibility=local>
388 // <reviewed reviewer="" date="" tests="tTaQLNode">
389 // </reviewed>
390 // <prerequisite>
391 //# Classes you should understand before using this one.
392 // <li> <linkto class=TaQLNodeRep>TaQLNodeRep</linkto>
393 // </prerequisite>
394 // <synopsis>
395 // This class is a TaQLNodeRep holding the optional start, end, and incr
396 // values of an index in an array.
397 // </synopsis>
398 
400 {
401 public:
402  TaQLIndexNodeRep (const TaQLNode& start, const TaQLNode& end,
403  const TaQLNode& incr)
405  itsStart(start), itsEnd(end), itsIncr(incr) {}
406  virtual ~TaQLIndexNodeRep();
407  virtual TaQLNodeResult visit (TaQLNodeVisitor&) const;
408  virtual void show (std::ostream& os) const;
409  virtual void save (AipsIO& aio) const;
410  static TaQLIndexNodeRep* restore (AipsIO& aio);
411 
415 };
416 
417 
418 // <summary>
419 // Raw TaQL parse tree node defining a join operation.
420 // </summary>
421 // <use visibility=local>
422 // <reviewed reviewer="" date="" tests="tTaQLNode">
423 // </reviewed>
424 // <prerequisite>
425 //# Classes you should understand before using this one.
426 // <li> <linkto class=TaQLNodeRep>TaQLNodeRep</linkto>
427 // </prerequisite>
428 // <synopsis>
429 // This class is a TaQLNodeRep holding the expressions of a join operation.
430 // This is, however, a placeholder and not implemented yet.
431 // </synopsis>
432 
434 {
435 public:
436  TaQLJoinNodeRep (const TaQLMultiNode& tables, const TaQLNode& condition)
438  itsTables(tables), itsCondition(condition) {}
439  virtual ~TaQLJoinNodeRep();
440  virtual TaQLNodeResult visit (TaQLNodeVisitor&) const;
441  virtual void show (std::ostream& os) const;
442  virtual void save (AipsIO& aio) const;
443  static TaQLJoinNodeRep* restore (AipsIO& aio);
444 
447 };
448 
449 
450 // <summary>
451 // Raw TaQL parse tree node defining a keyword or column name.
452 // </summary>
453 // <use visibility=local>
454 // <reviewed reviewer="" date="" tests="tTaQLNode">
455 // </reviewed>
456 // <prerequisite>
457 //# Classes you should understand before using this one.
458 // <li> <linkto class=TaQLNodeRep>TaQLNodeRep</linkto>
459 // </prerequisite>
460 // <synopsis>
461 // This class is a TaQLNodeRep holding the name of a keyword or column.
462 // The name can contain . and :: delimiters for scoping.
463 // </synopsis>
464 
466 {
467 public:
468  TaQLKeyColNodeRep (const String& name)
470  itsName(name) {}
471  virtual ~TaQLKeyColNodeRep();
472  virtual TaQLNodeResult visit (TaQLNodeVisitor&) const;
473  virtual void show (std::ostream& os) const;
474  virtual void save (AipsIO& aio) const;
475  static TaQLKeyColNodeRep* restore (AipsIO& aio);
476 
478 };
479 
480 
481 // <summary>
482 // Raw TaQL parse tree node defining a table.
483 // </summary>
484 // <use visibility=local>
485 // <reviewed reviewer="" date="" tests="tTaQLNode">
486 // </reviewed>
487 // <prerequisite>
488 //# Classes you should understand before using this one.
489 // <li> <linkto class=TaQLNodeRep>TaQLNodeRep</linkto>
490 // </prerequisite>
491 // <synopsis>
492 // This class is a TaQLNodeRep holding the info defining a table.
493 // It can be a constant value holding a name or it can be a subquery.
494 // Furthermore the alias of the table is defined (which can be empty).
495 // </synopsis>
496 
498 {
499 public:
500  TaQLTableNodeRep (const TaQLNode& table, const String& alias)
502  itsTable(table), itsAlias(alias) {}
503  virtual ~TaQLTableNodeRep();
504  virtual TaQLNodeResult visit (TaQLNodeVisitor&) const;
505  virtual void show (std::ostream& os) const;
506  virtual void save (AipsIO& aio) const;
507  static TaQLTableNodeRep* restore (AipsIO& aio);
508 
511 };
512 
513 
514 // <summary>
515 // Raw TaQL parse tree node defining a select column expression.
516 // </summary>
517 // <use visibility=local>
518 // <reviewed reviewer="" date="" tests="tTaQLNode">
519 // </reviewed>
520 // <prerequisite>
521 //# Classes you should understand before using this one.
522 // <li> <linkto class=TaQLNodeRep>TaQLNodeRep</linkto>
523 // </prerequisite>
524 // <synopsis>
525 // This class is a TaQLNodeRep holding a column expression in the
526 // column list of the select clause.
527 // A new column name and data type can be defined for the column (expression).
528 // The expression can be a wildcarded column name (a regex) preceeded by
529 // ~ or !~ (meaning include or exclude).
530 // </synopsis>
531 
533 {
534 public:
535  TaQLColNodeRep (const TaQLNode& expr, const String& name,
536  const String& dtype)
538  itsExpr(expr), itsName(name), itsDtype(checkDataType(dtype)) {}
539  virtual ~TaQLColNodeRep();
540  virtual TaQLNodeResult visit (TaQLNodeVisitor&) const;
541  virtual void show (std::ostream& os) const;
542  virtual void save (AipsIO& aio) const;
543  static TaQLColNodeRep* restore (AipsIO& aio);
544 
548 };
549 
550 
551 // <summary>
552 // Raw TaQL parse tree node defining a select column list.
553 // </summary>
554 // <use visibility=local>
555 // <reviewed reviewer="" date="" tests="tTaQLNode">
556 // </reviewed>
557 // <prerequisite>
558 //# Classes you should understand before using this one.
559 // <li> <linkto class=TaQLNodeRep>TaQLNodeRep</linkto>
560 // </prerequisite>
561 // <synopsis>
562 // This class is a TaQLNodeRep holding a select column list.
563 // It also defines if the result must be distinct (unique)
564 // </synopsis>
565 
567 {
568 public:
569  TaQLColumnsNodeRep (Bool distinct, const TaQLMultiNode& nodes)
571  itsDistinct(distinct), itsNodes(nodes) {}
572  virtual ~TaQLColumnsNodeRep();
573  virtual TaQLNodeResult visit (TaQLNodeVisitor&) const;
574  virtual void show (std::ostream& os) const;
575  virtual void save (AipsIO& aio) const;
576  static TaQLColumnsNodeRep* restore (AipsIO& aio);
577 
580 };
581 
582 
583 // <summary>
584 // Raw TaQL parse tree node defining a groupby list.
585 // </summary>
586 // <use visibility=local>
587 // <reviewed reviewer="" date="" tests="tTaQLNode">
588 // </reviewed>
589 // <prerequisite>
590 //# Classes you should understand before using this one.
591 // <li> <linkto class=TaQLNodeRep>TaQLNodeRep</linkto>
592 // </prerequisite>
593 // <synopsis>
594 // This class is a TaQLNodeRep holding a groupby list with the optional
595 // ROLLUP qualifier.
596 // </synopsis>
597 
599 {
600 public:
601  // Do not change the values of this enum, as objects might be persistent.
602  enum Type {Normal=0,
603  Rollup=1}; //# in the future type Cube could be added
604  TaQLGroupNodeRep (Type type, const TaQLMultiNode& nodes)
606  itsType(type), itsNodes(nodes) {}
607  virtual ~TaQLGroupNodeRep();
608  virtual TaQLNodeResult visit (TaQLNodeVisitor&) const;
609  virtual void show (std::ostream& os) const;
610  virtual void save (AipsIO& aio) const;
611  static TaQLGroupNodeRep* restore (AipsIO& aio);
612 
615 };
616 
617 
618 // <summary>
619 // Raw TaQL parse tree node defining a sort key.
620 // </summary>
621 // <use visibility=local>
622 // <reviewed reviewer="" date="" tests="tTaQLNode">
623 // </reviewed>
624 // <prerequisite>
625 //# Classes you should understand before using this one.
626 // <li> <linkto class=TaQLNodeRep>TaQLNodeRep</linkto>
627 // </prerequisite>
628 // <synopsis>
629 // This class is a TaQLNodeRep holding a sort key and the optional order
630 // in which this key must be sorted.
631 // </synopsis>
632 
634 {
635 public:
636  // Do not change the values of this enum, as objects might be persistent.
637  enum Type {Ascending =0,
638  Descending=1,
639  None =2};
640  TaQLSortKeyNodeRep (Type type, const TaQLNode& child)
642  itsType(type), itsChild(child) {}
643  virtual ~TaQLSortKeyNodeRep();
644  virtual TaQLNodeResult visit (TaQLNodeVisitor&) const;
645  virtual void show (std::ostream& os) const;
646  virtual void save (AipsIO& aio) const;
647  static TaQLSortKeyNodeRep* restore (AipsIO& aio);
648 
651 };
652 
653 
654 // <summary>
655 // Raw TaQL parse tree node defining a sort list.
656 // </summary>
657 // <use visibility=local>
658 // <reviewed reviewer="" date="" tests="tTaQLNode">
659 // </reviewed>
660 // <prerequisite>
661 //# Classes you should understand before using this one.
662 // <li> <linkto class=TaQLNodeRep>TaQLNodeRep</linkto>
663 // </prerequisite>
664 // <synopsis>
665 // This class is a TaQLNodeRep holding a sort list and the default order
666 // for each individual sort key.
667 // </synopsis>
668 
670 {
671 public:
672  // Do not change the values of this enum, as objects might be persistent.
673  enum Type {Ascending =0,
674  Descending=1};
675  TaQLSortNodeRep (Bool unique, Type type, const TaQLMultiNode& keys)
677  itsUnique(unique), itsType(type), itsKeys(keys) {}
678  virtual ~TaQLSortNodeRep();
679  virtual TaQLNodeResult visit (TaQLNodeVisitor&) const;
680  virtual void show (std::ostream& os) const;
681  virtual void save (AipsIO& aio) const;
682  static TaQLSortNodeRep* restore (AipsIO& aio);
683 
687 };
688 
689 
690 // <summary>
691 // Raw TaQL parse tree node defining a limit/offset expression.
692 // </summary>
693 // <use visibility=local>
694 // <reviewed reviewer="" date="" tests="tTaQLNode">
695 // </reviewed>
696 // <prerequisite>
697 //# Classes you should understand before using this one.
698 // <li> <linkto class=TaQLNodeRep>TaQLNodeRep</linkto>
699 // </prerequisite>
700 // <synopsis>
701 // This class is a TaQLNodeRep holding the optional expressions for the
702 // LIMIT and OFFSET clause.
703 // </synopsis>
704 
706 {
707 public:
708  TaQLLimitOffNodeRep (const TaQLNode& limit, const TaQLNode& offset)
710  itsLimit(limit), itsOffset(offset) {}
711  virtual ~TaQLLimitOffNodeRep();
712  virtual TaQLNodeResult visit (TaQLNodeVisitor&) const;
713  virtual void show (std::ostream& os) const;
714  virtual void save (AipsIO& aio) const;
715  static TaQLLimitOffNodeRep* restore (AipsIO& aio);
716 
719 };
720 
721 
722 // <summary>
723 // Raw TaQL parse tree node defining a giving expression list.
724 // </summary>
725 // <use visibility=local>
726 // <reviewed reviewer="" date="" tests="tTaQLNode">
727 // </reviewed>
728 // <prerequisite>
729 //# Classes you should understand before using this one.
730 // <li> <linkto class=TaQLNodeRep>TaQLNodeRep</linkto>
731 // </prerequisite>
732 // <synopsis>
733 // This class is a TaQLNodeRep holding the values for a GIVING clause.
734 // The value can be a table name or a list of expressions.
735 // </synopsis>
736 
738 {
739 public:
740  explicit TaQLGivingNodeRep (const String& name, const String& type);
741  explicit TaQLGivingNodeRep (const TaQLMultiNode& exprlist)
743  itsType (-1),
744  itsExprList (exprlist) {}
745  virtual ~TaQLGivingNodeRep();
746  virtual TaQLNodeResult visit (TaQLNodeVisitor&) const;
747  virtual void show (std::ostream& os) const;
748  virtual void save (AipsIO& aio) const;
749  static TaQLGivingNodeRep* restore (AipsIO& aio);
750  // Constructor for restore.
751  TaQLGivingNodeRep (const String& name, Int type)
753  itsName (name),
754  itsType (type) {}
755 
757  Int itsType; // -1=exprlist 0=undefined, 1=memory, 2=scratch
758  // 3=plain, 4=plain_big, 5=plain_little,
759  // 6=plain_local
761 };
762 
763 
764 // <summary>
765 // Raw TaQL parse tree node defining a column update expression.
766 // </summary>
767 // <use visibility=local>
768 // <reviewed reviewer="" date="" tests="tTaQLNode">
769 // </reviewed>
770 // <prerequisite>
771 //# Classes you should understand before using this one.
772 // <li> <linkto class=TaQLNodeRep>TaQLNodeRep</linkto>
773 // </prerequisite>
774 // <synopsis>
775 // This class is a TaQLNodeRep holding the values for an update expression.
776 // It defines the column name and the expression for the new value.
777 // Optionally an index can be defined in case the column contains array
778 // values for which only some values need to be updated.
779 // </synopsis>
780 
782 {
783 public:
784  explicit TaQLUpdExprNodeRep (const String& name,
785  const TaQLMultiNode& indices,
786  const TaQLNode& expr)
788  itsName(name), itsIndices(indices), itsExpr(expr) {}
789  virtual ~TaQLUpdExprNodeRep();
790  virtual TaQLNodeResult visit (TaQLNodeVisitor&) const;
791  virtual void show (std::ostream& os) const;
792  virtual void save (AipsIO& aio) const;
793  static TaQLUpdExprNodeRep* restore (AipsIO& aio);
794 
798 };
799 
800 
801 // <summary>
802 // Raw TaQL parse tree node defining a selection command.
803 // </summary>
804 // <use visibility=local>
805 // <reviewed reviewer="" date="" tests="tTaQLNode">
806 // </reviewed>
807 // <prerequisite>
808 //# Classes you should understand before using this one.
809 // <li> <linkto class=TaQLNodeRep>TaQLNodeRep</linkto>
810 // </prerequisite>
811 // <synopsis>
812 // This class is an abstract TaQLNodeRep for a selection command that can
813 // also be used as a subquery.
814 // It holds flags telling if and how the select command must be
815 // executed when the node is visited for TaQLNodeHandler.
816 // </synopsis>
817 
819 {
820 public:
822  virtual ~TaQLQueryNodeRep();
823  void setBrackets()
824  { itsBrackets = True; }
826  { itsNoExecute = True; }
828  { itsFromExecute = True; }
830  { return itsBrackets; }
832  { return itsNoExecute; }
834  { return itsFromExecute; }
835  virtual void show (std::ostream& os) const;
836 protected:
837  virtual void saveSuper (AipsIO& aio) const;
838  virtual void restoreSuper (AipsIO& aio);
839 private:
840  virtual void showDerived (std::ostream& os) const = 0;
842  Bool itsNoExecute; //# no execute in EXISTS operator
843  Bool itsFromExecute; //# special execute in FROM
844 };
845 
846 
847 // <summary>
848 // Raw TaQL parse tree node defining a select command.
849 // </summary>
850 // <use visibility=local>
851 // <reviewed reviewer="" date="" tests="tTaQLNode">
852 // </reviewed>
853 // <prerequisite>
854 //# Classes you should understand before using this one.
855 // <li> <linkto class=TaQLNodeRep>TaQLNodeRep</linkto>
856 // </prerequisite>
857 // <synopsis>
858 // This class is a TaQLNodeRep holding the different parts of a
859 // select expression.
860 // It also holds flags telling if and how the select command must be
861 // executed when the node is visited for TaQLNodeHandler.
862 // </synopsis>
863 
865 {
866 public:
867  TaQLSelectNodeRep (const TaQLNode& columns, const TaQLMultiNode& tables,
868  const TaQLNode& join, const TaQLNode& where,
869  const TaQLNode& groupby, const TaQLNode& having,
870  const TaQLNode& sort, const TaQLNode& limitoff,
871  const TaQLNode& giving);
872  virtual ~TaQLSelectNodeRep();
873  virtual TaQLNodeResult visit (TaQLNodeVisitor&) const;
874  virtual void showDerived (std::ostream& os) const;
875  virtual void save (AipsIO& aio) const;
876  static TaQLSelectNodeRep* restore (AipsIO& aio);
877 
887 };
888 
889 
890 // <summary>
891 // Raw TaQL parse tree node defining a count 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 a count command.
902 // </synopsis>
903 
905 {
906 public:
907  TaQLCountNodeRep (const TaQLNode& columns, const TaQLMultiNode& tables,
908  const TaQLNode& where);
909  virtual ~TaQLCountNodeRep();
910  virtual TaQLNodeResult visit (TaQLNodeVisitor&) const;
911  virtual void showDerived (std::ostream& os) const;
912  virtual void save (AipsIO& aio) const;
913  static TaQLCountNodeRep* restore (AipsIO& aio);
914 
918 };
919 
920 
921 // <summary>
922 // Raw TaQL parse tree node defining an update command.
923 // </summary>
924 // <use visibility=local>
925 // <reviewed reviewer="" date="" tests="tTaQLNode">
926 // </reviewed>
927 // <prerequisite>
928 //# Classes you should understand before using this one.
929 // <li> <linkto class=TaQLNodeRep>TaQLNodeRep</linkto>
930 // </prerequisite>
931 // <synopsis>
932 // This class is a TaQLNodeRep holding the parts for an update command.
933 // The tables to be used can be defined in two parts: the main one in
934 // the UPDATE clause, possible other ones in the FROM command.
935 // </synopsis>
936 
938 {
939 public:
940  TaQLUpdateNodeRep (const TaQLMultiNode& tables, const TaQLMultiNode& update,
941  const TaQLMultiNode& from, const TaQLNode& where,
942  const TaQLNode& sort, const TaQLNode& limitoff)
944  itsTables(tables), itsUpdate(update), itsFrom(from),
945  itsWhere(where), itsSort(sort), itsLimitOff(limitoff) {}
946  virtual ~TaQLUpdateNodeRep();
947  virtual TaQLNodeResult visit (TaQLNodeVisitor&) const;
948  virtual void show (std::ostream& os) const;
949  virtual void save (AipsIO& aio) const;
950  static TaQLUpdateNodeRep* restore (AipsIO& aio);
951 
958 };
959 
960 
961 // <summary>
962 // Raw TaQL parse tree node defining an insert command.
963 // </summary>
964 // <use visibility=local>
965 // <reviewed reviewer="" date="" tests="tTaQLNode">
966 // </reviewed>
967 // <prerequisite>
968 //# Classes you should understand before using this one.
969 // <li> <linkto class=TaQLNodeRep>TaQLNodeRep</linkto>
970 // </prerequisite>
971 // <synopsis>
972 // This class is a TaQLNodeRep holding the parts for an insert command.
973 // The values cvan be a list of expressions or a subquery.
974 // </synopsis>
975 
977 {
978 public:
979  TaQLInsertNodeRep (const TaQLMultiNode& tables, const TaQLMultiNode& columns,
980  const TaQLNode& values)
982  itsTables(tables), itsColumns(columns), itsValues(values) {}
983  TaQLInsertNodeRep (const TaQLMultiNode& tables, const TaQLMultiNode& insert);
984  virtual ~TaQLInsertNodeRep();
985  virtual TaQLNodeResult visit (TaQLNodeVisitor&) const;
986  virtual void show (std::ostream& os) const;
987  virtual void save (AipsIO& aio) const;
988  static TaQLInsertNodeRep* restore (AipsIO& aio);
989 
993 };
994 
995 
996 // <summary>
997 // Raw TaQL parse tree node defining a delete command.
998 // </summary>
999 // <use visibility=local>
1000 // <reviewed reviewer="" date="" tests="tTaQLNode">
1001 // </reviewed>
1002 // <prerequisite>
1003 //# Classes you should understand before using this one.
1004 // <li> <linkto class=TaQLNodeRep>TaQLNodeRep</linkto>
1005 // </prerequisite>
1006 // <synopsis>
1007 // This class is a TaQLNodeRep holding the parts for a delete command.
1008 // </synopsis>
1009 
1011 {
1012 public:
1013  TaQLDeleteNodeRep (const TaQLMultiNode& tables, const TaQLNode& where,
1014  const TaQLNode& sort, const TaQLNode& limitoff)
1016  itsTables(tables), itsWhere(where),
1017  itsSort(sort), itsLimitOff(limitoff) {}
1018  virtual ~TaQLDeleteNodeRep();
1019  virtual TaQLNodeResult visit (TaQLNodeVisitor&) const;
1020  virtual void show (std::ostream& os) const;
1021  virtual void save (AipsIO& aio) const;
1022  static TaQLDeleteNodeRep* restore (AipsIO& aio);
1023 
1028 };
1029 
1030 
1031 // <summary>
1032 // Raw TaQL parse tree node defining a calc command.
1033 // </summary>
1034 // <use visibility=local>
1035 // <reviewed reviewer="" date="" tests="tTaQLNode">
1036 // </reviewed>
1037 // <prerequisite>
1038 //# Classes you should understand before using this one.
1039 // <li> <linkto class=TaQLNodeRep>TaQLNodeRep</linkto>
1040 // </prerequisite>
1041 // <synopsis>
1042 // This class is a TaQLNodeRep holding the parts of the calc command.
1043 // </synopsis>
1044 
1046 {
1047 public:
1048  TaQLCalcNodeRep (const TaQLMultiNode& tables, const TaQLNode& expr,
1049  const TaQLNode& where,
1050  const TaQLNode& sort, const TaQLNode& limitoff)
1052  itsTables(tables), itsExpr(expr),
1053  itsWhere(where), itsSort(sort), itsLimitOff(limitoff) {}
1054  virtual ~TaQLCalcNodeRep();
1055  virtual TaQLNodeResult visit (TaQLNodeVisitor&) const;
1056  virtual void show (std::ostream& os) const;
1057  virtual void save (AipsIO& aio) const;
1058  static TaQLCalcNodeRep* restore (AipsIO& aio);
1059 
1065 };
1066 
1067 
1068 // <summary>
1069 // Raw TaQL parse tree node defining a create table command.
1070 // </summary>
1071 // <use visibility=local>
1072 // <reviewed reviewer="" date="" tests="tTaQLNode">
1073 // </reviewed>
1074 // <prerequisite>
1075 //# Classes you should understand before using this one.
1076 // <li> <linkto class=TaQLNodeRep>TaQLNodeRep</linkto>
1077 // </prerequisite>
1078 // <synopsis>
1079 // This class is a TaQLNodeRep holding the parts of the create table command.
1080 // </synopsis>
1081 
1083 {
1084 public:
1085  TaQLCreTabNodeRep (const String& name, const TaQLMultiNode& cols,
1086  const TaQLMultiNode& dataMans)
1088  itsName(name), itsColumns(cols), itsDataMans(dataMans) {}
1089  virtual ~TaQLCreTabNodeRep();
1090  virtual TaQLNodeResult visit (TaQLNodeVisitor&) const;
1091  virtual void show (std::ostream& os) const;
1092  virtual void save (AipsIO& aio) const;
1093  static TaQLCreTabNodeRep* restore (AipsIO& aio);
1094 
1098 };
1099 
1100 
1101 // <summary>
1102 // Raw TaQL parse tree node defining a create column specification.
1103 // </summary>
1104 // <use visibility=local>
1105 // <reviewed reviewer="" date="" tests="tTaQLNode">
1106 // </reviewed>
1107 // <prerequisite>
1108 //# Classes you should understand before using this one.
1109 // <li> <linkto class=TaQLNodeRep>TaQLNodeRep</linkto>
1110 // </prerequisite>
1111 // <synopsis>
1112 // This class is a TaQLNodeRep holding the parts of a column specification
1113 // in the create table command.
1114 // </synopsis>
1115 
1117 {
1118 public:
1119  TaQLColSpecNodeRep (const String& name, const String& dtype,
1120  const TaQLMultiNode& spec)
1122  itsName(name), itsDtype(checkDataType(dtype)), itsSpec(spec) {}
1123  virtual ~TaQLColSpecNodeRep();
1124  virtual TaQLNodeResult visit (TaQLNodeVisitor&) const;
1125  virtual void show (std::ostream& os) const;
1126  virtual void save (AipsIO& aio) const;
1127  static TaQLColSpecNodeRep* restore (AipsIO& aio);
1128 
1132 };
1133 
1134 
1135 // <summary>
1136 // Raw TaQL parse tree node defining a record field.
1137 // </summary>
1138 // <use visibility=local>
1139 // <reviewed reviewer="" date="" tests="tTaQLNode">
1140 // </reviewed>
1141 // <prerequisite>
1142 //# Classes you should understand before using this one.
1143 // <li> <linkto class=TaQLNodeRep>TaQLNodeRep</linkto>
1144 // </prerequisite>
1145 // <synopsis>
1146 // This class is a TaQLNodeRep holding the parts of a record field.
1147 // </synopsis>
1148 
1150 {
1151 public:
1152  TaQLRecFldNodeRep (const String& name, const TaQLNode& values)
1154  itsName(name), itsValues(values) {}
1155  virtual ~TaQLRecFldNodeRep();
1156  virtual TaQLNodeResult visit (TaQLNodeVisitor&) const;
1157  virtual void show (std::ostream& os) const;
1158  virtual void save (AipsIO& aio) const;
1159  static TaQLRecFldNodeRep* restore (AipsIO& aio);
1160 
1163 };
1164 
1165 
1166 // <summary>
1167 // Raw TaQL parse tree node defining a unit.
1168 // </summary>
1169 // <use visibility=local>
1170 // <reviewed reviewer="" date="" tests="tTaQLNode">
1171 // </reviewed>
1172 // <prerequisite>
1173 //# Classes you should understand before using this one.
1174 // <li> <linkto class=TaQLNodeRep>TaQLNodeRep</linkto>
1175 // </prerequisite>
1176 // <synopsis>
1177 // This class is a TaQLNodeRep holding the parts of a record field.
1178 // </synopsis>
1179 
1181 {
1182 public:
1183  TaQLUnitNodeRep (const String& unit, const TaQLNode& child)
1185  itsUnit(unit), itsChild(child) {}
1186  virtual ~TaQLUnitNodeRep();
1187  virtual TaQLNodeResult visit (TaQLNodeVisitor&) const;
1188  virtual void show (std::ostream& os) const;
1189  virtual void save (AipsIO& aio) const;
1190  static TaQLUnitNodeRep* restore (AipsIO& aio);
1191 
1194 };
1195 
1196 
1197 } //# NAMESPACE CASACORE - END
1198 
1199 #endif
#define TaQLNode_KeyCol
Definition: TaQLNodeRep.h:91
Raw TaQL parse tree node defining a selection command.
Definition: TaQLNodeDer.h:818
#define TaQLNode_Range
Definition: TaQLNodeRep.h:89
TaQLRangeNodeRep(Bool leftClosed, TaQLNode start, const TaQLNode &end, Bool rightClosed)
Definition: TaQLNodeDer.h:358
TaQLJoinNodeRep(const TaQLMultiNode &tables, const TaQLNode &condition)
Definition: TaQLNodeDer.h:436
#define TaQLNode_Groupby
Definition: TaQLNodeRep.h:112
TaQLCalcNodeRep(const TaQLMultiNode &tables, const TaQLNode &expr, const TaQLNode &where, const TaQLNode &sort, const TaQLNode &limitoff)
Definition: TaQLNodeDer.h:1048
long long Int64
Define the extra non-standard types used by Casacore (like proposed uSize, Size)
Definition: aipsxtype.h:38
Raw TaQL parse tree node defining a count command.
Definition: TaQLNodeDer.h:904
int Int
Definition: aipstype.h:47
TaQLRangeNodeRep(const TaQLNode &end, Bool rightClosed)
Definition: TaQLNodeDer.h:367
static TaQLConstNodeRep * restore(AipsIO &aio)
#define TaQLNode_Binary
Definition: TaQLNodeRep.h:86
#define TaQLNode_Delete
Definition: TaQLNodeRep.h:104
TaQLColSpecNodeRep(const String &name, const String &dtype, const TaQLMultiNode &spec)
Definition: TaQLNodeDer.h:1119
TaQLRegexNodeRep(const String &value, Bool caseInsensitive, Bool negate, Bool ignoreBlanks, Int maxDistance)
Definition: TaQLNodeDer.h:140
#define TaQLNode_UpdExpr
Definition: TaQLNodeRep.h:100
Raw TaQL parse tree node defining a select command.
Definition: TaQLNodeDer.h:864
TaQLTableNodeRep(const TaQLNode &table, const String &alias)
Definition: TaQLNodeDer.h:500
TaQLUnaryNodeRep(Type type, const TaQLNode &child)
Definition: TaQLNodeDer.h:185
Raw TaQL parse tree node defining an update command.
Definition: TaQLNodeDer.h:937
const std::vector< TaQLNode > & getNodes() const
Definition: TaQLNodeDer.h:292
AipsIO is the object persistency mechanism of Casacore.
Definition: AipsIO.h:168
TaQLConstNodeRep(Bool value)
Definition: TaQLNodeDer.h:71
TaQLInsertNodeRep(const TaQLMultiNode &tables, const TaQLMultiNode &columns, const TaQLNode &values)
Definition: TaQLNodeDer.h:979
TaQLColumnsNodeRep(Bool distinct, const TaQLMultiNode &nodes)
Definition: TaQLNodeDer.h:569
virtual TaQLNodeResult visit(TaQLNodeVisitor &) const
Visit a node for tree traversal.
char nodeType() const
Get the node type of the derived class.
Definition: TaQLNodeRep.h:135
void setPPFix(const String &prefix, const String &postfix)
Definition: TaQLNodeDer.h:288
const String & getString() const
virtual void show(std::ostream &os) const
Print the object in an ostream.
#define TaQLNode_Insert
Definition: TaQLNodeRep.h:103
Raw TaQL parse tree node defining a range.
Definition: TaQLNodeDer.h:355
#define TaQLNode_Unit
Definition: TaQLNodeRep.h:109
Raw TaQL parse tree node defining a constant value.
Definition: TaQLNodeDer.h:61
Raw TaQL parse tree node defining a create table command.
Definition: TaQLNodeDer.h:1082
#define TaQLNode_Index
Definition: TaQLNodeRep.h:90
TaQLRangeNodeRep(Bool leftClosed, const TaQLNode &start)
Definition: TaQLNodeDer.h:363
TaQLKeyColNodeRep(const String &name)
Definition: TaQLNodeDer.h:468
TaQLConstNodeRep(const MVTime &value)
Definition: TaQLNodeDer.h:92
Raw TaQL parse tree node defining an index in a array.
Definition: TaQLNodeDer.h:399
Raw TaQL parse tree node defining a calc command.
Definition: TaQLNodeDer.h:1045
#define TaQLNode_Col
Definition: TaQLNodeRep.h:93
#define TaQLNode_Unary
Definition: TaQLNodeRep.h:85
TaQLUpdateNodeRep(const TaQLMultiNode &tables, const TaQLMultiNode &update, const TaQLMultiNode &from, const TaQLNode &where, const TaQLNode &sort, const TaQLNode &limitoff)
Definition: TaQLNodeDer.h:940
virtual void save(AipsIO &aio) const
Save the object.
Raw TaQL parse tree node defining a list of nodes.
Definition: TaQLNodeDer.h:275
TaQLGivingNodeRep(const String &name, Int type)
Constructor for restore.
Definition: TaQLNodeDer.h:751
TaQLMultiNodeRep(const String &prefix, const String &postfix, Bool isSetOrArray=False)
Definition: TaQLNodeDer.h:280
TaQLUpdExprNodeRep(const String &name, const TaQLMultiNode &indices, const TaQLNode &expr)
Definition: TaQLNodeDer.h:784
#define TaQLNode_Update
Definition: TaQLNodeRep.h:102
TaQLCreTabNodeRep(const String &name, const TaQLMultiNode &cols, const TaQLMultiNode &dataMans)
Definition: TaQLNodeDer.h:1085
TaQLGivingNodeRep(const TaQLMultiNode &exprlist)
Definition: TaQLNodeDer.h:741
#define TaQLNode_Table
Definition: TaQLNodeRep.h:92
#define TaQLNode_Sort
Definition: TaQLNodeRep.h:97
TaQLColNodeRep(const TaQLNode &expr, const String &name, const String &dtype)
Definition: TaQLNodeDer.h:535
const String & getUnit() const
Definition: TaQLNodeDer.h:100
TaQLFuncNodeRep(const String &name, const TaQLMultiNode &args)
Definition: TaQLNodeDer.h:326
#define TaQLNode_Func
Definition: TaQLNodeRep.h:88
Raw TaQL parse tree node defining a delete command.
Definition: TaQLNodeDer.h:1010
TaQLConstNodeRep(const String &value, Bool isTableName=False)
Definition: TaQLNodeDer.h:89
#define TaQLNode_Join
Definition: TaQLNodeRep.h:95
Envelope class for a node containing a select command.
Definition: TaQLNode.h:223
Raw TaQL parse tree node defining a table.
Definition: TaQLNodeDer.h:497
#define TaQLNode_Columns
Definition: TaQLNodeRep.h:94
Raw TaQL parse tree node defining a groupby list.
Definition: TaQLNodeDer.h:598
Raw TaQL parse tree node defining a giving expression list.
Definition: TaQLNodeDer.h:737
Envelope class for a node containing a constant regex value.
Definition: TaQLNode.h:200
Raw TaQL parse tree node defining a unary operator.
Definition: TaQLNodeDer.h:176
Raw TaQL parse tree node defining a constant regex value.
Definition: TaQLNodeDer.h:136
Normal or Gaussian distribution.
Definition: Random.h:997
Raw TaQL parse tree node defining a record field.
Definition: TaQLNodeDer.h:1149
double Double
Definition: aipstype.h:52
Raw TaQL parse tree node defining a keyword or column name.
Definition: TaQLNodeDer.h:465
#define TaQLNode_SortKey
Definition: TaQLNodeRep.h:96
TaQLFuncNodeRep(const String &name)
Definition: TaQLNodeDer.h:323
TaQLIndexNodeRep(const TaQLNode &start, const TaQLNode &end, const TaQLNode &incr)
Definition: TaQLNodeDer.h:402
#define TaQLNode_CreTab
Definition: TaQLNodeRep.h:106
bool Bool
Define the standard types used by Casacore.
Definition: aipstype.h:39
Raw TaQL parse tree node defining a function.
Definition: TaQLNodeDer.h:320
TaQLRecFldNodeRep(const String &name, const TaQLNode &values)
Definition: TaQLNodeDer.h:1152
Raw TaQL parse tree node defining a create column specification.
Definition: TaQLNodeDer.h:1116
TaQLBinaryNodeRep(Type type, const TaQLNode &left, const TaQLNode &right)
Definition: TaQLNodeDer.h:242
const Bool False
Definition: aipstype.h:41
#define TaQLNode_Const
Definition: TaQLNodeRep.h:84
Raw TaQL parse tree node defining a unit.
Definition: TaQLNodeDer.h:1180
Raw TaQL parse tree node defining a column update expression.
Definition: TaQLNodeDer.h:781
TaQLUnitNodeRep(const String &unit, const TaQLNode &child)
Definition: TaQLNodeDer.h:1183
TaQLConstNodeRep(Double value)
Definition: TaQLNodeDer.h:78
Type
Do not change the values of this enum, as objects might be persistent.
Definition: TaQLNodeDer.h:637
#define TaQLNode_RecFld
Definition: TaQLNodeRep.h:108
TaQLConstNodeRep(Int64 value, Bool isTableName=False)
Definition: TaQLNodeDer.h:74
TableExprNode regex(const TableExprNode &node)
Functions for regular expression matching and pattern matching.
Definition: ExprNode.h:1540
#define TaQLNode_Giving
Definition: TaQLNodeRep.h:99
Type
Do not change the values of this enum, as objects might be persistent.
Definition: TaQLNodeDer.h:220
TaQLGroupNodeRep(Type type, const TaQLMultiNode &nodes)
Definition: TaQLNodeDer.h:604
Envelope class to hold the result of a visit to the node tree.
TaQLMultiNode itsExprList
3=plain, 4=plain_big, 5=plain_little, 6=plain_local
Definition: TaQLNodeDer.h:760
#define TaQLNode_Regex
Definition: TaQLNodeRep.h:110
Raw TaQL parse tree node defining a limit/offset expression.
Definition: TaQLNodeDer.h:705
TaQLConstNodeRep(DComplex value)
Definition: TaQLNodeDer.h:86
std::vector< TaQLNode > itsNodes
Definition: TaQLNodeDer.h:299
Raw TaQL parse tree node defining a sort key.
Definition: TaQLNodeDer.h:633
TaQLLimitOffNodeRep(const TaQLNode &limit, const TaQLNode &offset)
Definition: TaQLNodeDer.h:708
Raw TaQL parse tree node defining a sort list.
Definition: TaQLNodeDer.h:669
Type
Do not change the values of this enum, as objects might be persistent.
Definition: TaQLNodeDer.h:180
String: the storage and methods of handling collections of characters.
Definition: String.h:223
Raw TaQL parse tree node defining a select column expression.
Definition: TaQLNodeDer.h:532
Raw TaQL parse tree node defining a select column list.
Definition: TaQLNodeDer.h:566
Raw TaQL parse tree node defining a join operation.
Definition: TaQLNodeDer.h:433
Envelope class for a node in the raw TaQL parse tree.
Definition: TaQLNode.h:81
#define TaQLNode_Calc
Definition: TaQLNodeRep.h:105
TaQLSortKeyNodeRep(Type type, const TaQLNode &child)
Definition: TaQLNodeDer.h:640
TaQLConstNodeRep(Double value, const String &unit)
Definition: TaQLNodeDer.h:82
Class to visit the nodes in the raw TaQL parse tree.
TaQLSortNodeRep(Bool unique, Type type, const TaQLMultiNode &keys)
Definition: TaQLNodeDer.h:675
Type
Do not change the values of this enum, as objects might be persistent.
Definition: TaQLNodeDer.h:673
Type
Do not change the values of this enum, as objects might be persistent.
Definition: TaQLNodeDer.h:65
#define TaQLNode_LimitOff
Definition: TaQLNodeRep.h:98
#define TaQLNode_Multi
Definition: TaQLNodeRep.h:87
Class to handle date/time type conversions and I/O.
Definition: MVTime.h:266
const Bool True
Definition: aipstype.h:40
Raw TaQL parse tree node defining a binary operator.
Definition: TaQLNodeDer.h:216
this file contains all the compiler specific defines
Definition: mainpage.dox:28
LatticeExprNode value(const LatticeExprNode &expr)
This function returns the value of the expression without a mask.
Representation of a node in the raw TaQL parse tree.
Definition: TaQLNodeRep.h:76
Raw TaQL parse tree node defining an insert command.
Definition: TaQLNodeDer.h:976
TaQLDeleteNodeRep(const TaQLMultiNode &tables, const TaQLNode &where, const TaQLNode &sort, const TaQLNode &limitoff)
Definition: TaQLNodeDer.h:1013
#define TaQLNode_ColSpec
Definition: TaQLNodeRep.h:107
TaQLMultiNodeRep(Bool isSetOrArray=False)
Definition: TaQLNodeDer.h:278
void add(const TaQLNode &node)
Definition: TaQLNodeDer.h:290
Type
Do not change the values of this enum, as objects might be persistent.
Definition: TaQLNodeDer.h:602
static String checkDataType(const String &)
Check the data type string and return its standard form.