GPUdb C++ API  Version 5.2.0.0
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 
44  {
45 
50  tableName(std::string()),
51  options(std::map<std::string, std::string>())
52  {
53  }
54 
79  ShowTableRequest(const std::string& tableName, const std::map<std::string, std::string>& options):
80  tableName(tableName),
81  options(options)
82  {
83  }
84 
85  std::string tableName;
86  std::map<std::string, std::string> options;
87  };
88 }
89 
90 namespace avro
91 {
92  template<> struct codec_traits<gpudb::ShowTableRequest>
93  {
94  static void encode(Encoder& e, const gpudb::ShowTableRequest& v)
95  {
96  ::avro::encode(e, v.tableName);
97  ::avro::encode(e, v.options);
98  }
99 
100  static void decode(Decoder& d, gpudb::ShowTableRequest& v)
101  {
102  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
103  {
104  const std::vector<size_t> fo = rd->fieldOrder();
105 
106  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
107  {
108  switch (*it)
109  {
110  case 0:
111  ::avro::decode(d, v.tableName);
112  break;
113 
114  case 1:
115  ::avro::decode(d, v.options);
116  break;
117 
118  default:
119  break;
120  }
121  }
122  }
123  else
124  {
125  ::avro::decode(d, v.tableName);
126  ::avro::decode(d, v.options);
127  }
128  }
129  };
130 }
131 
132 namespace gpudb
133 {
134 
167  {
168 
173  tableName(std::string()),
174  tableNames(std::vector<std::string>()),
175  tableDescriptions(std::vector<std::vector<std::string> >()),
176  typeIds(std::vector<std::string>()),
177  typeSchemas(std::vector<std::string>()),
178  typeLabels(std::vector<std::string>()),
179  properties(std::vector<std::map<std::string, std::vector<std::string> > >()),
180  additionalInfo(std::vector<std::map<std::string, std::string> >()),
181  sizes(std::vector<int64_t>()),
182  fullSizes(std::vector<int64_t>()),
183  joinSizes(std::vector<double>()),
184  totalSize(int64_t()),
185  totalFullSize(int64_t())
186  {
187  }
188 
189  std::string tableName;
190  std::vector<std::string> tableNames;
191  std::vector<std::vector<std::string> > tableDescriptions;
192  std::vector<std::string> typeIds;
193  std::vector<std::string> typeSchemas;
194  std::vector<std::string> typeLabels;
195  std::vector<std::map<std::string, std::vector<std::string> > > properties;
196  std::vector<std::map<std::string, std::string> > additionalInfo;
197  std::vector<int64_t> sizes;
198  std::vector<int64_t> fullSizes;
199  std::vector<double> joinSizes;
200  int64_t totalSize;
201  int64_t totalFullSize;
202  };
203 }
204 
205 namespace avro
206 {
207  template<> struct codec_traits<gpudb::ShowTableResponse>
208  {
209  static void encode(Encoder& e, const gpudb::ShowTableResponse& v)
210  {
211  ::avro::encode(e, v.tableName);
212  ::avro::encode(e, v.tableNames);
213  ::avro::encode(e, v.tableDescriptions);
214  ::avro::encode(e, v.typeIds);
215  ::avro::encode(e, v.typeSchemas);
216  ::avro::encode(e, v.typeLabels);
217  ::avro::encode(e, v.properties);
218  ::avro::encode(e, v.additionalInfo);
219  ::avro::encode(e, v.sizes);
220  ::avro::encode(e, v.fullSizes);
221  ::avro::encode(e, v.joinSizes);
222  ::avro::encode(e, v.totalSize);
223  ::avro::encode(e, v.totalFullSize);
224  }
225 
226  static void decode(Decoder& d, gpudb::ShowTableResponse& v)
227  {
228  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
229  {
230  const std::vector<size_t> fo = rd->fieldOrder();
231 
232  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
233  {
234  switch (*it)
235  {
236  case 0:
237  ::avro::decode(d, v.tableName);
238  break;
239 
240  case 1:
241  ::avro::decode(d, v.tableNames);
242  break;
243 
244  case 2:
245  ::avro::decode(d, v.tableDescriptions);
246  break;
247 
248  case 3:
249  ::avro::decode(d, v.typeIds);
250  break;
251 
252  case 4:
253  ::avro::decode(d, v.typeSchemas);
254  break;
255 
256  case 5:
257  ::avro::decode(d, v.typeLabels);
258  break;
259 
260  case 6:
261  ::avro::decode(d, v.properties);
262  break;
263 
264  case 7:
265  ::avro::decode(d, v.additionalInfo);
266  break;
267 
268  case 8:
269  ::avro::decode(d, v.sizes);
270  break;
271 
272  case 9:
273  ::avro::decode(d, v.fullSizes);
274  break;
275 
276  case 10:
277  ::avro::decode(d, v.joinSizes);
278  break;
279 
280  case 11:
281  ::avro::decode(d, v.totalSize);
282  break;
283 
284  case 12:
285  ::avro::decode(d, v.totalFullSize);
286  break;
287 
288  default:
289  break;
290  }
291  }
292  }
293  else
294  {
295  ::avro::decode(d, v.tableName);
296  ::avro::decode(d, v.tableNames);
297  ::avro::decode(d, v.tableDescriptions);
298  ::avro::decode(d, v.typeIds);
299  ::avro::decode(d, v.typeSchemas);
300  ::avro::decode(d, v.typeLabels);
301  ::avro::decode(d, v.properties);
302  ::avro::decode(d, v.additionalInfo);
303  ::avro::decode(d, v.sizes);
304  ::avro::decode(d, v.fullSizes);
305  ::avro::decode(d, v.joinSizes);
306  ::avro::decode(d, v.totalSize);
307  ::avro::decode(d, v.totalFullSize);
308  }
309  }
310  };
311 }
312 
313 #endif
ShowTableRequest()
Constructs a ShowTableRequest object with default parameter values.
Definition: show_table.h:49
std::vector< double > joinSizes
Definition: show_table.h:199
std::vector< std::map< std::string, std::string > > additionalInfo
Definition: show_table.h:196
std::vector< std::string > typeLabels
Definition: show_table.h:194
std::vector< int64_t > fullSizes
Definition: show_table.h:198
std::vector< std::string > typeSchemas
Definition: show_table.h:193
std::vector< std::map< std::string, std::vector< std::string > > > properties
Definition: show_table.h:195
A set of input parameters for showTable(const ShowTableRequest&) const.
Definition: show_table.h:43
std::vector< std::vector< std::string > > tableDescriptions
Definition: show_table.h:191
ShowTableResponse()
Constructs a ShowTableResponse object with default parameter values.
Definition: show_table.h:172
std::string tableName
Definition: show_table.h:85
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:79
std::map< std::string, std::string > options
Definition: show_table.h:86
std::vector< std::string > tableNames
Definition: show_table.h:190
std::vector< std::string > typeIds
Definition: show_table.h:192
A set of output parameters for showTable(const ShowTableRequest&) const.
Definition: show_table.h:166
std::vector< int64_t > sizes
Definition: show_table.h:197