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