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 
224  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_):
225  tableName( tableName_ ),
226  sourceTableName( sourceTableName_ ),
227  fieldMap( fieldMap_ ),
228  options( options_ )
229  {
230  }
231 
238  std::string tableName;
239 
247  std::string sourceTableName;
248 
258  std::map<std::string, std::string> fieldMap;
259 
372  std::map<std::string, std::string> options;
373  };
374 } // end namespace gpudb
375 
376 namespace avro
377 {
378  template<> struct codec_traits<gpudb::AppendRecordsRequest>
379  {
380  static void encode(Encoder& e, const gpudb::AppendRecordsRequest& v)
381  {
382  ::avro::encode(e, v.tableName);
383  ::avro::encode(e, v.sourceTableName);
384  ::avro::encode(e, v.fieldMap);
385  ::avro::encode(e, v.options);
386  }
387 
388  static void decode(Decoder& d, gpudb::AppendRecordsRequest& v)
389  {
390  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
391  {
392  const std::vector<size_t> fo = rd->fieldOrder();
393 
394  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
395  {
396  switch (*it)
397  {
398  case 0:
399  ::avro::decode(d, v.tableName);
400  break;
401 
402  case 1:
403  ::avro::decode(d, v.sourceTableName);
404  break;
405 
406  case 2:
407  ::avro::decode(d, v.fieldMap);
408  break;
409 
410  case 3:
411  ::avro::decode(d, v.options);
412  break;
413 
414  default:
415  break;
416  }
417  }
418  }
419  else
420  {
421  ::avro::decode(d, v.tableName);
422  ::avro::decode(d, v.sourceTableName);
423  ::avro::decode(d, v.fieldMap);
424  ::avro::decode(d, v.options);
425  }
426  }
427  };
428 } // end namespace avro
429 
430 namespace gpudb
431 {
438  {
443  tableName(std::string()),
444  info(std::map<std::string, std::string>())
445  {
446  }
447 
448  std::string tableName;
449 
453  std::map<std::string, std::string> info;
454  };
455 } // end namespace gpudb
456 
457 namespace avro
458 {
459  template<> struct codec_traits<gpudb::AppendRecordsResponse>
460  {
461  static void encode(Encoder& e, const gpudb::AppendRecordsResponse& v)
462  {
463  ::avro::encode(e, v.tableName);
464  ::avro::encode(e, v.info);
465  }
466 
467  static void decode(Decoder& d, gpudb::AppendRecordsResponse& v)
468  {
469  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
470  {
471  const std::vector<size_t> fo = rd->fieldOrder();
472 
473  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
474  {
475  switch (*it)
476  {
477  case 0:
478  ::avro::decode(d, v.tableName);
479  break;
480 
481  case 1:
482  ::avro::decode(d, v.info);
483  break;
484 
485  default:
486  break;
487  }
488  }
489  }
490  else
491  {
492  ::avro::decode(d, v.tableName);
493  ::avro::decode(d, v.info);
494  }
495  }
496  };
497 } // end namespace avro
498 
499 #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.