GPUdb C++ API  Version 7.2.3.0
create_projection.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 __CREATE_PROJECTION_H__
7 #define __CREATE_PROJECTION_H__
8 
9 namespace gpudb
10 {
50  {
55  tableName(std::string()),
56  projectionName(std::string()),
57  columnNames(std::vector<std::string>()),
58  options(std::map<std::string, std::string>())
59  {
60  }
61 
418  CreateProjectionRequest(const std::string& tableName_, const std::string& projectionName_, const std::vector<std::string>& columnNames_, const std::map<std::string, std::string>& options_):
419  tableName( tableName_ ),
420  projectionName( projectionName_ ),
421  columnNames( columnNames_ ),
422  options( options_ )
423  {
424  }
425 
434  std::string tableName;
435 
444  std::string projectionName;
445 
451  std::vector<std::string> columnNames;
452 
684  std::map<std::string, std::string> options;
685  };
686 } // end namespace gpudb
687 
688 namespace avro
689 {
690  template<> struct codec_traits<gpudb::CreateProjectionRequest>
691  {
692  static void encode(Encoder& e, const gpudb::CreateProjectionRequest& v)
693  {
694  ::avro::encode(e, v.tableName);
695  ::avro::encode(e, v.projectionName);
696  ::avro::encode(e, v.columnNames);
697  ::avro::encode(e, v.options);
698  }
699 
700  static void decode(Decoder& d, gpudb::CreateProjectionRequest& v)
701  {
702  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
703  {
704  const std::vector<size_t> fo = rd->fieldOrder();
705 
706  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
707  {
708  switch (*it)
709  {
710  case 0:
711  ::avro::decode(d, v.tableName);
712  break;
713 
714  case 1:
715  ::avro::decode(d, v.projectionName);
716  break;
717 
718  case 2:
719  ::avro::decode(d, v.columnNames);
720  break;
721 
722  case 3:
723  ::avro::decode(d, v.options);
724  break;
725 
726  default:
727  break;
728  }
729  }
730  }
731  else
732  {
733  ::avro::decode(d, v.tableName);
734  ::avro::decode(d, v.projectionName);
735  ::avro::decode(d, v.columnNames);
736  ::avro::decode(d, v.options);
737  }
738  }
739  };
740 } // end namespace avro
741 
742 namespace gpudb
743 {
750  {
756  projectionName(std::string()),
757  info(std::map<std::string, std::string>())
758  {
759  }
760 
765  std::string projectionName;
766 
780  std::map<std::string, std::string> info;
781  };
782 } // end namespace gpudb
783 
784 namespace avro
785 {
786  template<> struct codec_traits<gpudb::CreateProjectionResponse>
787  {
788  static void encode(Encoder& e, const gpudb::CreateProjectionResponse& v)
789  {
790  ::avro::encode(e, v.projectionName);
791  ::avro::encode(e, v.info);
792  }
793 
794  static void decode(Decoder& d, gpudb::CreateProjectionResponse& v)
795  {
796  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
797  {
798  const std::vector<size_t> fo = rd->fieldOrder();
799 
800  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
801  {
802  switch (*it)
803  {
804  case 0:
805  ::avro::decode(d, v.projectionName);
806  break;
807 
808  case 1:
809  ::avro::decode(d, v.info);
810  break;
811 
812  default:
813  break;
814  }
815  }
816  }
817  else
818  {
819  ::avro::decode(d, v.projectionName);
820  ::avro::decode(d, v.info);
821  }
822  }
823  };
824 } // end namespace avro
825 
826 #endif // __CREATE_PROJECTION_H__
std::string projectionName
Value of projectionName.
std::string tableName
Name of the existing table on which the projection is to be applied, in [ schema_name....
CreateProjectionResponse()
Constructs a CreateProjectionResponse object with default parameters.
A set of results returned by GPUdb::createProjection.
std::string projectionName
Name of the projection to be created, in [ schema_name. ]table_name format, using standard name resol...
std::map< std::string, std::string > options
Optional parameters.
CreateProjectionRequest()
Constructs a CreateProjectionRequest object with default parameters.
CreateProjectionRequest(const std::string &tableName_, const std::string &projectionName_, const std::vector< std::string > &columnNames_, const std::map< std::string, std::string > &options_)
Constructs a CreateProjectionRequest object with the specified parameters.
std::map< std::string, std::string > info
Additional information.
std::vector< std::string > columnNames
List of columns from tableName to be included in the projection.
A set of parameters for GPUdb::createProjection.