GPUdb C++ API  Version 7.1.10.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
append_records.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 __APPEND_RECORDS_H__
7 #define __APPEND_RECORDS_H__
8 
9 namespace gpudb
10 {
11 
23  {
24 
30  tableName(std::string()),
31  sourceTableName(std::string()),
32  fieldMap(std::map<std::string, std::string>()),
33  options(std::map<std::string, std::string>())
34  {
35  }
36 
178  AppendRecordsRequest(const std::string& tableName_, const std::string& sourceTableName_, const std::map<std::string, std::string>& fieldMap_, const std::map<std::string, std::string>& options_):
179  tableName( tableName_ ),
180  sourceTableName( sourceTableName_ ),
181  fieldMap( fieldMap_ ),
182  options( options_ )
183  {
184  }
185 
186  std::string tableName;
187  std::string sourceTableName;
188  std::map<std::string, std::string> fieldMap;
189  std::map<std::string, std::string> options;
190  };
191 }
192 
193 namespace avro
194 {
195  template<> struct codec_traits<gpudb::AppendRecordsRequest>
196  {
197  static void encode(Encoder& e, const gpudb::AppendRecordsRequest& v)
198  {
199  ::avro::encode(e, v.tableName);
200  ::avro::encode(e, v.sourceTableName);
201  ::avro::encode(e, v.fieldMap);
202  ::avro::encode(e, v.options);
203  }
204 
205  static void decode(Decoder& d, gpudb::AppendRecordsRequest& v)
206  {
207  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
208  {
209  const std::vector<size_t> fo = rd->fieldOrder();
210 
211  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
212  {
213  switch (*it)
214  {
215  case 0:
216  ::avro::decode(d, v.tableName);
217  break;
218 
219  case 1:
220  ::avro::decode(d, v.sourceTableName);
221  break;
222 
223  case 2:
224  ::avro::decode(d, v.fieldMap);
225  break;
226 
227  case 3:
228  ::avro::decode(d, v.options);
229  break;
230 
231  default:
232  break;
233  }
234  }
235  }
236  else
237  {
238  ::avro::decode(d, v.tableName);
239  ::avro::decode(d, v.sourceTableName);
240  ::avro::decode(d, v.fieldMap);
241  ::avro::decode(d, v.options);
242  }
243  }
244  };
245 }
246 
247 namespace gpudb
248 {
249 
261  {
262 
268  tableName(std::string()),
269  info(std::map<std::string, std::string>())
270  {
271  }
272 
273  std::string tableName;
274  std::map<std::string, std::string> info;
275  };
276 }
277 
278 namespace avro
279 {
280  template<> struct codec_traits<gpudb::AppendRecordsResponse>
281  {
282  static void encode(Encoder& e, const gpudb::AppendRecordsResponse& v)
283  {
284  ::avro::encode(e, v.tableName);
285  ::avro::encode(e, v.info);
286  }
287 
288  static void decode(Decoder& d, gpudb::AppendRecordsResponse& v)
289  {
290  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
291  {
292  const std::vector<size_t> fo = rd->fieldOrder();
293 
294  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
295  {
296  switch (*it)
297  {
298  case 0:
299  ::avro::decode(d, v.tableName);
300  break;
301 
302  case 1:
303  ::avro::decode(d, v.info);
304  break;
305 
306  default:
307  break;
308  }
309  }
310  }
311  else
312  {
313  ::avro::decode(d, v.tableName);
314  ::avro::decode(d, v.info);
315  }
316  }
317  };
318 }
319 
320 #endif
AppendRecordsResponse()
Constructs an AppendRecordsResponse object with default parameter values.
A set of output parameters for const.
std::map< std::string, std::string > fieldMap
std::map< std::string, std::string > info
A set of input parameters for const.
AppendRecordsRequest()
Constructs an AppendRecordsRequest object with default parameter values.
AppendRecordsRequest(const std::string &tableName_, const std::string &sourceTableName_, const std::map< std::string, std::string > &fieldMap_, const std::map< std::string, std::string > &options_)
Constructs an AppendRecordsRequest object with the specified parameters.
std::map< std::string, std::string > options