GPUdb C++ API  Version 6.0.1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends
show_table.h
Go to the documentation of this file.
1 /*
2  * This file was autogenerated by the GPUdb schema processor.
3  *
4  * DO NOT EDIT DIRECTLY.
5  */
6 #ifndef __SHOW_TABLE_H__
7 #define __SHOW_TABLE_H__
8 
9 namespace gpudb
10 {
11 
34  {
35 
40  tableName(std::string()),
41  options(std::map<std::string, std::string>())
42  {
43  }
44 
85  ShowTableRequest(const std::string& tableName_, const std::map<std::string, std::string>& options_):
86  tableName( tableName_ ),
87  options( options_ )
88  {
89  }
90 
91  std::string tableName;
92  std::map<std::string, std::string> options;
93  };
94 }
95 
96 namespace avro
97 {
98  template<> struct codec_traits<gpudb::ShowTableRequest>
99  {
100  static void encode(Encoder& e, const gpudb::ShowTableRequest& v)
101  {
102  ::avro::encode(e, v.tableName);
103  ::avro::encode(e, v.options);
104  }
105 
106  static void decode(Decoder& d, gpudb::ShowTableRequest& v)
107  {
108  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
109  {
110  const std::vector<size_t> fo = rd->fieldOrder();
111 
112  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
113  {
114  switch (*it)
115  {
116  case 0:
117  ::avro::decode(d, v.tableName);
118  break;
119 
120  case 1:
121  ::avro::decode(d, v.options);
122  break;
123 
124  default:
125  break;
126  }
127  }
128  }
129  else
130  {
131  ::avro::decode(d, v.tableName);
132  ::avro::decode(d, v.options);
133  }
134  }
135  };
136 }
137 
138 namespace gpudb
139 {
140 
163  {
164 
169  tableName(std::string()),
170  tableNames(std::vector<std::string>()),
171  tableDescriptions(std::vector<std::vector<std::string> >()),
172  typeIds(std::vector<std::string>()),
173  typeSchemas(std::vector<std::string>()),
174  typeLabels(std::vector<std::string>()),
175  properties(std::vector<std::map<std::string, std::vector<std::string> > >()),
176  additionalInfo(std::vector<std::map<std::string, std::string> >()),
177  sizes(std::vector<int64_t>()),
178  fullSizes(std::vector<int64_t>()),
179  joinSizes(std::vector<double>()),
180  totalSize(int64_t()),
181  totalFullSize(int64_t())
182  {
183  }
184 
185  std::string tableName;
186  std::vector<std::string> tableNames;
187  std::vector<std::vector<std::string> > tableDescriptions;
188  std::vector<std::string> typeIds;
189  std::vector<std::string> typeSchemas;
190  std::vector<std::string> typeLabels;
191  std::vector<std::map<std::string, std::vector<std::string> > > properties;
192  std::vector<std::map<std::string, std::string> > additionalInfo;
193  std::vector<int64_t> sizes;
194  std::vector<int64_t> fullSizes;
195  std::vector<double> joinSizes;
196  int64_t totalSize;
197  int64_t totalFullSize;
198  };
199 }
200 
201 namespace avro
202 {
203  template<> struct codec_traits<gpudb::ShowTableResponse>
204  {
205  static void encode(Encoder& e, const gpudb::ShowTableResponse& v)
206  {
207  ::avro::encode(e, v.tableName);
208  ::avro::encode(e, v.tableNames);
209  ::avro::encode(e, v.tableDescriptions);
210  ::avro::encode(e, v.typeIds);
211  ::avro::encode(e, v.typeSchemas);
212  ::avro::encode(e, v.typeLabels);
213  ::avro::encode(e, v.properties);
214  ::avro::encode(e, v.additionalInfo);
215  ::avro::encode(e, v.sizes);
216  ::avro::encode(e, v.fullSizes);
217  ::avro::encode(e, v.joinSizes);
218  ::avro::encode(e, v.totalSize);
219  ::avro::encode(e, v.totalFullSize);
220  }
221 
222  static void decode(Decoder& d, gpudb::ShowTableResponse& v)
223  {
224  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
225  {
226  const std::vector<size_t> fo = rd->fieldOrder();
227 
228  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
229  {
230  switch (*it)
231  {
232  case 0:
233  ::avro::decode(d, v.tableName);
234  break;
235 
236  case 1:
237  ::avro::decode(d, v.tableNames);
238  break;
239 
240  case 2:
241  ::avro::decode(d, v.tableDescriptions);
242  break;
243 
244  case 3:
245  ::avro::decode(d, v.typeIds);
246  break;
247 
248  case 4:
249  ::avro::decode(d, v.typeSchemas);
250  break;
251 
252  case 5:
253  ::avro::decode(d, v.typeLabels);
254  break;
255 
256  case 6:
257  ::avro::decode(d, v.properties);
258  break;
259 
260  case 7:
261  ::avro::decode(d, v.additionalInfo);
262  break;
263 
264  case 8:
265  ::avro::decode(d, v.sizes);
266  break;
267 
268  case 9:
269  ::avro::decode(d, v.fullSizes);
270  break;
271 
272  case 10:
273  ::avro::decode(d, v.joinSizes);
274  break;
275 
276  case 11:
277  ::avro::decode(d, v.totalSize);
278  break;
279 
280  case 12:
281  ::avro::decode(d, v.totalFullSize);
282  break;
283 
284  default:
285  break;
286  }
287  }
288  }
289  else
290  {
291  ::avro::decode(d, v.tableName);
292  ::avro::decode(d, v.tableNames);
293  ::avro::decode(d, v.tableDescriptions);
294  ::avro::decode(d, v.typeIds);
295  ::avro::decode(d, v.typeSchemas);
296  ::avro::decode(d, v.typeLabels);
297  ::avro::decode(d, v.properties);
298  ::avro::decode(d, v.additionalInfo);
299  ::avro::decode(d, v.sizes);
300  ::avro::decode(d, v.fullSizes);
301  ::avro::decode(d, v.joinSizes);
302  ::avro::decode(d, v.totalSize);
303  ::avro::decode(d, v.totalFullSize);
304  }
305  }
306  };
307 }
308 
309 #endif
ShowTableRequest()
Constructs a ShowTableRequest object with default parameter values.
Definition: show_table.h:39
std::vector< double > joinSizes
Definition: show_table.h:195
std::vector< std::map< std::string, std::string > > additionalInfo
Definition: show_table.h:192
std::vector< std::string > typeLabels
Definition: show_table.h:190
std::vector< int64_t > fullSizes
Definition: show_table.h:194
ShowTableRequest(const std::string &tableName_, const std::map< std::string, std::string > &options_)
Constructs a ShowTableRequest object with the specified parameters.
Definition: show_table.h:85
std::vector< std::string > typeSchemas
Definition: show_table.h:189
std::vector< std::map< std::string, std::vector< std::string > > > properties
Definition: show_table.h:191
A set of input parameters for const.
Definition: show_table.h:33
std::vector< std::vector< std::string > > tableDescriptions
Definition: show_table.h:187
ShowTableResponse()
Constructs a ShowTableResponse object with default parameter values.
Definition: show_table.h:168
std::string tableName
Definition: show_table.h:91
std::map< std::string, std::string > options
Definition: show_table.h:92
std::vector< std::string > tableNames
Definition: show_table.h:186
std::vector< std::string > typeIds
Definition: show_table.h:188
A set of output parameters for const.
Definition: show_table.h:162
std::vector< int64_t > sizes
Definition: show_table.h:193