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 
432  CreateProjectionRequest(const std::string& tableName_, const std::string& projectionName_, const std::vector<std::string>& columnNames_, const std::map<std::string, std::string>& options_):
433  tableName( tableName_ ),
434  projectionName( projectionName_ ),
435  columnNames( columnNames_ ),
436  options( options_ )
437  {
438  }
439 
448  std::string tableName;
449 
458  std::string projectionName;
459 
465  std::vector<std::string> columnNames;
466 
707  std::map<std::string, std::string> options;
708  };
709 } // end namespace gpudb
710 
711 namespace avro
712 {
713  template<> struct codec_traits<gpudb::CreateProjectionRequest>
714  {
715  static void encode(Encoder& e, const gpudb::CreateProjectionRequest& v)
716  {
717  ::avro::encode(e, v.tableName);
718  ::avro::encode(e, v.projectionName);
719  ::avro::encode(e, v.columnNames);
720  ::avro::encode(e, v.options);
721  }
722 
723  static void decode(Decoder& d, gpudb::CreateProjectionRequest& v)
724  {
725  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
726  {
727  const std::vector<size_t> fo = rd->fieldOrder();
728 
729  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
730  {
731  switch (*it)
732  {
733  case 0:
734  ::avro::decode(d, v.tableName);
735  break;
736 
737  case 1:
738  ::avro::decode(d, v.projectionName);
739  break;
740 
741  case 2:
742  ::avro::decode(d, v.columnNames);
743  break;
744 
745  case 3:
746  ::avro::decode(d, v.options);
747  break;
748 
749  default:
750  break;
751  }
752  }
753  }
754  else
755  {
756  ::avro::decode(d, v.tableName);
757  ::avro::decode(d, v.projectionName);
758  ::avro::decode(d, v.columnNames);
759  ::avro::decode(d, v.options);
760  }
761  }
762  };
763 } // end namespace avro
764 
765 namespace gpudb
766 {
773  {
779  projectionName(std::string()),
780  info(std::map<std::string, std::string>())
781  {
782  }
783 
788  std::string projectionName;
789 
803  std::map<std::string, std::string> info;
804  };
805 } // end namespace gpudb
806 
807 namespace avro
808 {
809  template<> struct codec_traits<gpudb::CreateProjectionResponse>
810  {
811  static void encode(Encoder& e, const gpudb::CreateProjectionResponse& v)
812  {
813  ::avro::encode(e, v.projectionName);
814  ::avro::encode(e, v.info);
815  }
816 
817  static void decode(Decoder& d, gpudb::CreateProjectionResponse& v)
818  {
819  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
820  {
821  const std::vector<size_t> fo = rd->fieldOrder();
822 
823  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
824  {
825  switch (*it)
826  {
827  case 0:
828  ::avro::decode(d, v.projectionName);
829  break;
830 
831  case 1:
832  ::avro::decode(d, v.info);
833  break;
834 
835  default:
836  break;
837  }
838  }
839  }
840  else
841  {
842  ::avro::decode(d, v.projectionName);
843  ::avro::decode(d, v.info);
844  }
845  }
846  };
847 } // end namespace avro
848 
849 #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.