GPUdb C++ API  Version 7.1.10.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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 
43  {
44 
49  tableName(std::string()),
50  options(std::map<std::string, std::string>())
51  {
52  }
53 
130  ShowTableRequest(const std::string& tableName_, const std::map<std::string, std::string>& options_):
131  tableName( tableName_ ),
132  options( options_ )
133  {
134  }
135 
136  std::string tableName;
137  std::map<std::string, std::string> options;
138  };
139 }
140 
141 namespace avro
142 {
143  template<> struct codec_traits<gpudb::ShowTableRequest>
144  {
145  static void encode(Encoder& e, const gpudb::ShowTableRequest& v)
146  {
147  ::avro::encode(e, v.tableName);
148  ::avro::encode(e, v.options);
149  }
150 
151  static void decode(Decoder& d, gpudb::ShowTableRequest& v)
152  {
153  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
154  {
155  const std::vector<size_t> fo = rd->fieldOrder();
156 
157  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
158  {
159  switch (*it)
160  {
161  case 0:
162  ::avro::decode(d, v.tableName);
163  break;
164 
165  case 1:
166  ::avro::decode(d, v.options);
167  break;
168 
169  default:
170  break;
171  }
172  }
173  }
174  else
175  {
176  ::avro::decode(d, v.tableName);
177  ::avro::decode(d, v.options);
178  }
179  }
180  };
181 }
182 
183 namespace gpudb
184 {
185 
217  {
218 
223  tableName(std::string()),
224  tableNames(std::vector<std::string>()),
225  tableDescriptions(std::vector<std::vector<std::string> >()),
226  typeIds(std::vector<std::string>()),
227  typeSchemas(std::vector<std::string>()),
228  typeLabels(std::vector<std::string>()),
229  properties(std::vector<std::map<std::string, std::vector<std::string> > >()),
230  additionalInfo(std::vector<std::map<std::string, std::string> >()),
231  sizes(std::vector<int64_t>()),
232  fullSizes(std::vector<int64_t>()),
233  joinSizes(std::vector<double>()),
234  totalSize(int64_t()),
235  totalFullSize(int64_t()),
236  info(std::map<std::string, std::string>())
237  {
238  }
239 
240  std::string tableName;
241  std::vector<std::string> tableNames;
242  std::vector<std::vector<std::string> > tableDescriptions;
243  std::vector<std::string> typeIds;
244  std::vector<std::string> typeSchemas;
245  std::vector<std::string> typeLabels;
246  std::vector<std::map<std::string, std::vector<std::string> > > properties;
247  std::vector<std::map<std::string, std::string> > additionalInfo;
248  std::vector<int64_t> sizes;
249  std::vector<int64_t> fullSizes;
250  std::vector<double> joinSizes;
251  int64_t totalSize;
252  int64_t totalFullSize;
253  std::map<std::string, std::string> info;
254  };
255 }
256 
257 namespace avro
258 {
259  template<> struct codec_traits<gpudb::ShowTableResponse>
260  {
261  static void encode(Encoder& e, const gpudb::ShowTableResponse& v)
262  {
263  ::avro::encode(e, v.tableName);
264  ::avro::encode(e, v.tableNames);
265  ::avro::encode(e, v.tableDescriptions);
266  ::avro::encode(e, v.typeIds);
267  ::avro::encode(e, v.typeSchemas);
268  ::avro::encode(e, v.typeLabels);
269  ::avro::encode(e, v.properties);
270  ::avro::encode(e, v.additionalInfo);
271  ::avro::encode(e, v.sizes);
272  ::avro::encode(e, v.fullSizes);
273  ::avro::encode(e, v.joinSizes);
274  ::avro::encode(e, v.totalSize);
275  ::avro::encode(e, v.totalFullSize);
276  ::avro::encode(e, v.info);
277  }
278 
279  static void decode(Decoder& d, gpudb::ShowTableResponse& v)
280  {
281  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
282  {
283  const std::vector<size_t> fo = rd->fieldOrder();
284 
285  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
286  {
287  switch (*it)
288  {
289  case 0:
290  ::avro::decode(d, v.tableName);
291  break;
292 
293  case 1:
294  ::avro::decode(d, v.tableNames);
295  break;
296 
297  case 2:
298  ::avro::decode(d, v.tableDescriptions);
299  break;
300 
301  case 3:
302  ::avro::decode(d, v.typeIds);
303  break;
304 
305  case 4:
306  ::avro::decode(d, v.typeSchemas);
307  break;
308 
309  case 5:
310  ::avro::decode(d, v.typeLabels);
311  break;
312 
313  case 6:
314  ::avro::decode(d, v.properties);
315  break;
316 
317  case 7:
318  ::avro::decode(d, v.additionalInfo);
319  break;
320 
321  case 8:
322  ::avro::decode(d, v.sizes);
323  break;
324 
325  case 9:
326  ::avro::decode(d, v.fullSizes);
327  break;
328 
329  case 10:
330  ::avro::decode(d, v.joinSizes);
331  break;
332 
333  case 11:
334  ::avro::decode(d, v.totalSize);
335  break;
336 
337  case 12:
338  ::avro::decode(d, v.totalFullSize);
339  break;
340 
341  case 13:
342  ::avro::decode(d, v.info);
343  break;
344 
345  default:
346  break;
347  }
348  }
349  }
350  else
351  {
352  ::avro::decode(d, v.tableName);
353  ::avro::decode(d, v.tableNames);
354  ::avro::decode(d, v.tableDescriptions);
355  ::avro::decode(d, v.typeIds);
356  ::avro::decode(d, v.typeSchemas);
357  ::avro::decode(d, v.typeLabels);
358  ::avro::decode(d, v.properties);
359  ::avro::decode(d, v.additionalInfo);
360  ::avro::decode(d, v.sizes);
361  ::avro::decode(d, v.fullSizes);
362  ::avro::decode(d, v.joinSizes);
363  ::avro::decode(d, v.totalSize);
364  ::avro::decode(d, v.totalFullSize);
365  ::avro::decode(d, v.info);
366  }
367  }
368  };
369 }
370 
371 #endif
ShowTableRequest()
Constructs a ShowTableRequest object with default parameter values.
Definition: show_table.h:48
std::vector< double > joinSizes
Definition: show_table.h:250
std::vector< std::map< std::string, std::string > > additionalInfo
Definition: show_table.h:247
std::vector< std::string > typeLabels
Definition: show_table.h:245
std::vector< int64_t > fullSizes
Definition: show_table.h:249
std::map< std::string, std::string > info
Definition: show_table.h:253
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:130
std::vector< std::string > typeSchemas
Definition: show_table.h:244
std::vector< std::map< std::string, std::vector< std::string > > > properties
Definition: show_table.h:246
A set of input parameters for const.
Definition: show_table.h:42
std::vector< std::vector< std::string > > tableDescriptions
Definition: show_table.h:242
ShowTableResponse()
Constructs a ShowTableResponse object with default parameter values.
Definition: show_table.h:222
std::map< std::string, std::string > options
Definition: show_table.h:137
std::vector< std::string > tableNames
Definition: show_table.h:241
std::vector< std::string > typeIds
Definition: show_table.h:243
A set of output parameters for const.
Definition: show_table.h:216
std::vector< int64_t > sizes
Definition: show_table.h:248