GPUdb C++ API  Version 7.2.2.4
append_records.h
Go to the documentation of this file.
1 /*
2  * This file was autogenerated by the Kinetica schema processor.
3  *
4  * DO NOT EDIT DIRECTLY.
5  */
6 #ifndef __APPEND_RECORDS_H__
7 #define __APPEND_RECORDS_H__
8 
9 namespace gpudb
10 {
23  {
28  tableName(std::string()),
29  sourceTableName(std::string()),
30  fieldMap(std::map<std::string, std::string>()),
31  options(std::map<std::string, std::string>())
32  {
33  }
34 
212  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_):
213  tableName( tableName_ ),
214  sourceTableName( sourceTableName_ ),
215  fieldMap( fieldMap_ ),
216  options( options_ )
217  {
218  }
219 
226  std::string tableName;
227 
235  std::string sourceTableName;
236 
246  std::map<std::string, std::string> fieldMap;
247 
352  std::map<std::string, std::string> options;
353  };
354 } // end namespace gpudb
355 
356 namespace avro
357 {
358  template<> struct codec_traits<gpudb::AppendRecordsRequest>
359  {
360  static void encode(Encoder& e, const gpudb::AppendRecordsRequest& v)
361  {
362  ::avro::encode(e, v.tableName);
363  ::avro::encode(e, v.sourceTableName);
364  ::avro::encode(e, v.fieldMap);
365  ::avro::encode(e, v.options);
366  }
367 
368  static void decode(Decoder& d, gpudb::AppendRecordsRequest& v)
369  {
370  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
371  {
372  const std::vector<size_t> fo = rd->fieldOrder();
373 
374  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
375  {
376  switch (*it)
377  {
378  case 0:
379  ::avro::decode(d, v.tableName);
380  break;
381 
382  case 1:
383  ::avro::decode(d, v.sourceTableName);
384  break;
385 
386  case 2:
387  ::avro::decode(d, v.fieldMap);
388  break;
389 
390  case 3:
391  ::avro::decode(d, v.options);
392  break;
393 
394  default:
395  break;
396  }
397  }
398  }
399  else
400  {
401  ::avro::decode(d, v.tableName);
402  ::avro::decode(d, v.sourceTableName);
403  ::avro::decode(d, v.fieldMap);
404  ::avro::decode(d, v.options);
405  }
406  }
407  };
408 } // end namespace avro
409 
410 namespace gpudb
411 {
418  {
423  tableName(std::string()),
424  info(std::map<std::string, std::string>())
425  {
426  }
427 
428  std::string tableName;
429 
433  std::map<std::string, std::string> info;
434  };
435 } // end namespace gpudb
436 
437 namespace avro
438 {
439  template<> struct codec_traits<gpudb::AppendRecordsResponse>
440  {
441  static void encode(Encoder& e, const gpudb::AppendRecordsResponse& v)
442  {
443  ::avro::encode(e, v.tableName);
444  ::avro::encode(e, v.info);
445  }
446 
447  static void decode(Decoder& d, gpudb::AppendRecordsResponse& v)
448  {
449  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
450  {
451  const std::vector<size_t> fo = rd->fieldOrder();
452 
453  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
454  {
455  switch (*it)
456  {
457  case 0:
458  ::avro::decode(d, v.tableName);
459  break;
460 
461  case 1:
462  ::avro::decode(d, v.info);
463  break;
464 
465  default:
466  break;
467  }
468  }
469  }
470  else
471  {
472  ::avro::decode(d, v.tableName);
473  ::avro::decode(d, v.info);
474  }
475  }
476  };
477 } // end namespace avro
478 
479 #endif // __APPEND_RECORDS_H__
AppendRecordsResponse()
Constructs an AppendRecordsResponse object with default parameters.
A set of results returned by GPUdb::appendRecords.
std::map< std::string, std::string > fieldMap
Contains the mapping of column names from the target table (specified by tableName) as the keys,...
std::map< std::string, std::string > info
Additional information.
A set of parameters for GPUdb::appendRecords.
AppendRecordsRequest()
Constructs an AppendRecordsRequest object with default parameters.
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
Optional parameters.
std::string tableName
The table name for the records to be appended, in [ schema_name.
std::string sourceTableName
The source table name to get records from, in [ schema_name.