GPUdb C++ API  Version 7.1.10.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
show_functions.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_FUNCTIONS_H__
7 #define __SHOW_FUNCTIONS_H__
8 
9 namespace gpudb
10 {
11 
18  struct ShowFunctionsRequest
19  {
20 
26  ShowFunctionsRequest() :
27  names(std::vector<std::string>()),
28  options(std::map<std::string, std::string>())
29  {
30  }
31 
84  ShowFunctionsRequest(const std::vector<std::string>& names_, const std::map<std::string, std::string>& options_):
85  names( names_ ),
86  options( options_ )
87  {
88  }
89 
90  std::vector<std::string> names;
91  std::map<std::string, std::string> options;
92  };
93 }
94 
99 namespace avro
100 {
101  template<> struct codec_traits<gpudb::ShowFunctionsRequest>
102  {
103  static void encode(Encoder& e, const gpudb::ShowFunctionsRequest& v)
104  {
105  ::avro::encode(e, v.names);
106  ::avro::encode(e, v.options);
107  }
108 
109  static void decode(Decoder& d, gpudb::ShowFunctionsRequest& v)
110  {
111  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
112  {
113  const std::vector<size_t> fo = rd->fieldOrder();
114 
115  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
116  {
117  switch (*it)
118  {
119  case 0:
120  ::avro::decode(d, v.names);
121  break;
122 
123  case 1:
124  ::avro::decode(d, v.options);
125  break;
126 
127  default:
128  break;
129  }
130  }
131  }
132  else
133  {
134  ::avro::decode(d, v.names);
135  ::avro::decode(d, v.options);
136  }
137  }
138  };
139 }
140 
141 namespace gpudb
142 {
143 
150  struct ShowFunctionsResponse
151  {
152 
158  ShowFunctionsResponse() :
159  functionNames(std::vector<std::string>()),
160  returnTypes(std::vector<std::string>()),
161  parameters(std::vector<std::vector<std::string> >()),
162  optionalParameterCount(std::vector<int32_t>()),
163  flags(std::vector<int32_t>()),
164  typeSchemas(std::vector<std::string>()),
165  properties(std::vector<std::map<std::string, std::vector<std::string> > >()),
166  info(std::map<std::string, std::string>())
167  {
168  }
169 
170  std::vector<std::string> functionNames;
171  std::vector<std::string> returnTypes;
172  std::vector<std::vector<std::string> > parameters;
173  std::vector<int32_t> optionalParameterCount;
174  std::vector<int32_t> flags;
175  std::vector<std::string> typeSchemas;
176  std::vector<std::map<std::string, std::vector<std::string> > > properties;
177  std::map<std::string, std::string> info;
178  };
179 }
180 
185 namespace avro
186 {
187  template<> struct codec_traits<gpudb::ShowFunctionsResponse>
188  {
189  static void encode(Encoder& e, const gpudb::ShowFunctionsResponse& v)
190  {
191  ::avro::encode(e, v.functionNames);
192  ::avro::encode(e, v.returnTypes);
193  ::avro::encode(e, v.parameters);
194  ::avro::encode(e, v.optionalParameterCount);
195  ::avro::encode(e, v.flags);
196  ::avro::encode(e, v.typeSchemas);
197  ::avro::encode(e, v.properties);
198  ::avro::encode(e, v.info);
199  }
200 
201  static void decode(Decoder& d, gpudb::ShowFunctionsResponse& v)
202  {
203  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
204  {
205  const std::vector<size_t> fo = rd->fieldOrder();
206 
207  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
208  {
209  switch (*it)
210  {
211  case 0:
212  ::avro::decode(d, v.functionNames);
213  break;
214 
215  case 1:
216  ::avro::decode(d, v.returnTypes);
217  break;
218 
219  case 2:
220  ::avro::decode(d, v.parameters);
221  break;
222 
223  case 3:
224  ::avro::decode(d, v.optionalParameterCount);
225  break;
226 
227  case 4:
228  ::avro::decode(d, v.flags);
229  break;
230 
231  case 5:
232  ::avro::decode(d, v.typeSchemas);
233  break;
234 
235  case 6:
236  ::avro::decode(d, v.properties);
237  break;
238 
239  case 7:
240  ::avro::decode(d, v.info);
241  break;
242 
243  default:
244  break;
245  }
246  }
247  }
248  else
249  {
250  ::avro::decode(d, v.functionNames);
251  ::avro::decode(d, v.returnTypes);
252  ::avro::decode(d, v.parameters);
253  ::avro::decode(d, v.optionalParameterCount);
254  ::avro::decode(d, v.flags);
255  ::avro::decode(d, v.typeSchemas);
256  ::avro::decode(d, v.properties);
257  ::avro::decode(d, v.info);
258  }
259  }
260  };
261 }
262 
263 #endif