rasdaman complete source
qtinsert.hh
Go to the documentation of this file.
1 #ifndef __QTINSERT_HH__
2 #define __QTINSERT_HH___
3 
4 #include "qlparser/qtexecute.hh"
7 #include "qlparser/qtmddcfgop.hh"
8 #include "qlparser/qtdata.hh"
10 
11 #include "rasodmg/stattiling.hh"
13 
14 #ifndef CPPSTDLIB
15 #include <ospace/string.h> // STL<ToolKit>
16 #else
17 #include <string>
18 #endif
19 #include <iostream>
20 
21 /*
22 * This file is part of rasdaman community.
23 *
24 * Rasdaman community is free software: you can redistribute it and/or modify
25 * it under the terms of the GNU General Public License as published by
26 * the Free Software Foundation, either version 3 of the License, or
27 * (at your option) any later version.
28 *
29 * Rasdaman community is distributed in the hope that it will be useful,
30 * but WITHOUT ANY WARRANTY; without even the implied warranty of
31 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
32 * GNU General Public License for more details.
33 *
34 * You should have received a copy of the GNU General Public License
35 * along with rasdaman community. If not, see <http://www.gnu.org/licenses/>.
36 *
37 * Copyright 2003, 2004, 2005, 2006, 2007, 2008, 2009 Peter Baumann /
38 rasdaman GmbH.
39 *
40 * For more information please see <http://www.rasdaman.org>
41 * or contact Peter Baumann via <baumann@rasdaman.com>.
42 */
43 /*************************************************************
44  *
45  *
46  * COMMENTS:
47  *
48  ************************************************************/
49 
50 //@ManMemo: Module: {\bf qlparser}
51 
56 class QtInsert : public QtExecute
57 {
58 public:
60  QtInsert( const std::string& initCollectionName, QtOperation* initSource );
61 
62  QtInsert(const std::string& initCollectionName, QtOperation* initSource, QtOperation* storage);
63 
65  QtInsert (const std::string& initCollectionName, QtData* data );
66 
68  virtual ~QtInsert();
69 
71  virtual int evaluate();
72 
74  virtual QtNodeList* getChilds( QtChildType flag );
75 
77  virtual void printTree( int tab, std::ostream& s = std::cout, QtChildType mode = QT_ALL_NODES );
78 
80  virtual void printAlgebraicExpression( std::ostream& s = std::cout );
81 
83  inline virtual const QtNodeType getNodeType() const;
84 
86  inline virtual void setInput( QtOperation* child, QtOperation* input);
87 
90 
92  r_Data_Format getDataFormat(QtMDDConfig* config);
93  r_Index_Type getIndexType(QtMDDConfig* config);
94  r_Tiling_Scheme getTilingScheme(QtMDDConfig* cfg);
95  vector<r_Minterval> getIntervals(QtMDDConfig* cfg);
96  r_Minterval getTileConfig(QtMDDConfig* cfg);
97 
98  void setStorageLayout(StorageLayout* layout);
99 
101 // virtual void preOptimize();
106  virtual void checkType();
108 
109 private:
111  QtOperation* source;
112 
114  QtData* dataToInsert;
115 
116  // Storage and Tiling type
117  QtOperation* stgLayout;
118 
120  std::string collectionName;
121 
123  static const QtNodeType nodeType;
124 };
125 
126 #include "qlparser/qtinsert.icc"
127 
128 #endif
129 
std::list< QtNode * > QtNodeList
list of QtNode pointers
Definition: qtnode.hh:91
virtual ~QtInsert()
virtual destructor
Definition: qtdata.hh:83
virtual void printTree(int tab, std::ostream &s=std::cout, QtChildType mode=QT_ALL_NODES)
prints the tree
QtChildType
Definition: qtnode.hh:186
QtNodeType
Definition: qtnode.hh:93
Definition: qtinsert.hh:56
virtual int evaluate()
method for evaluating the node
virtual const QtNodeType getNodeType() const
method for identification of nodes
virtual void checkType()
pre optimization
r_Minterval getTileConfig(QtMDDConfig *cfg)
Definition: qtmddconfig.hh:49
r_Index_Type getIndexType(QtMDDConfig *config)
virtual QtNodeList * getChilds(QtChildType flag)
return childs of the node
virtual void printAlgebraicExpression(std::ostream &s=std::cout)
prints the algebraic expression
virtual void setInput(QtOperation *child, QtOperation *input)
method for query rewrite
r_Data_Format getDataFormat(QtMDDConfig *config)
tiling functions
Definition: qtoperation.hh:57
vector< r_Minterval > getIntervals(QtMDDConfig *cfg)
QtOperation * getSource()
returns source
Definition: sstoragelayout.hh:65
Definition: qtexecute.hh:41
Definition: qtnode.hh:190
r_Tiling_Scheme getTilingScheme(QtMDDConfig *cfg)
void setStorageLayout(StorageLayout *layout)
QtInsert(const std::string &initCollectionName, QtOperation *initSource)
constructor getting name of collection and insert expression