GPUdb C++ API  Version 6.0.1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends
alter_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 __ALTER_TABLE_H__
7 #define __ALTER_TABLE_H__
8 
9 namespace gpudb
10 {
11 
42  {
43 
49  tableName(std::string()),
50  action(std::string()),
51  value(std::string()),
52  options(std::map<std::string, std::string>())
53  {
54  }
55 
141  AlterTableRequest(const std::string& tableName_, const std::string& action_, const std::string& value_, const std::map<std::string, std::string>& options_):
142  tableName( tableName_ ),
143  action( action_ ),
144  value( value_ ),
145  options( options_ )
146  {
147  }
148 
149  std::string tableName;
150  std::string action;
151  std::string value;
152  std::map<std::string, std::string> options;
153  };
154 }
155 
156 namespace avro
157 {
158  template<> struct codec_traits<gpudb::AlterTableRequest>
159  {
160  static void encode(Encoder& e, const gpudb::AlterTableRequest& v)
161  {
162  ::avro::encode(e, v.tableName);
163  ::avro::encode(e, v.action);
164  ::avro::encode(e, v.value);
165  ::avro::encode(e, v.options);
166  }
167 
168  static void decode(Decoder& d, gpudb::AlterTableRequest& v)
169  {
170  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
171  {
172  const std::vector<size_t> fo = rd->fieldOrder();
173 
174  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
175  {
176  switch (*it)
177  {
178  case 0:
179  ::avro::decode(d, v.tableName);
180  break;
181 
182  case 1:
183  ::avro::decode(d, v.action);
184  break;
185 
186  case 2:
187  ::avro::decode(d, v.value);
188  break;
189 
190  case 3:
191  ::avro::decode(d, v.options);
192  break;
193 
194  default:
195  break;
196  }
197  }
198  }
199  else
200  {
201  ::avro::decode(d, v.tableName);
202  ::avro::decode(d, v.action);
203  ::avro::decode(d, v.value);
204  ::avro::decode(d, v.options);
205  }
206  }
207  };
208 }
209 
210 namespace gpudb
211 {
212 
243  {
244 
250  tableName(std::string()),
251  action(std::string()),
252  value(std::string())
253  {
254  }
255 
256  std::string tableName;
257  std::string action;
258  std::string value;
259  };
260 }
261 
262 namespace avro
263 {
264  template<> struct codec_traits<gpudb::AlterTableResponse>
265  {
266  static void encode(Encoder& e, const gpudb::AlterTableResponse& v)
267  {
268  ::avro::encode(e, v.tableName);
269  ::avro::encode(e, v.action);
270  ::avro::encode(e, v.value);
271  }
272 
273  static void decode(Decoder& d, gpudb::AlterTableResponse& v)
274  {
275  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
276  {
277  const std::vector<size_t> fo = rd->fieldOrder();
278 
279  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
280  {
281  switch (*it)
282  {
283  case 0:
284  ::avro::decode(d, v.tableName);
285  break;
286 
287  case 1:
288  ::avro::decode(d, v.action);
289  break;
290 
291  case 2:
292  ::avro::decode(d, v.value);
293  break;
294 
295  default:
296  break;
297  }
298  }
299  }
300  else
301  {
302  ::avro::decode(d, v.tableName);
303  ::avro::decode(d, v.action);
304  ::avro::decode(d, v.value);
305  }
306  }
307  };
308 }
309 
310 #endif
A set of output parameters for const.
Definition: alter_table.h:242
AlterTableResponse()
Constructs an AlterTableResponse object with default parameter values.
Definition: alter_table.h:249
std::map< std::string, std::string > options
Definition: alter_table.h:152
A set of input parameters for const.
Definition: alter_table.h:41
AlterTableRequest()
Constructs an AlterTableRequest object with default parameter values.
Definition: alter_table.h:48
AlterTableRequest(const std::string &tableName_, const std::string &action_, const std::string &value_, const std::map< std::string, std::string > &options_)
Constructs an AlterTableRequest object with the specified parameters.
Definition: alter_table.h:141