GPUdb C++ API  Version 7.2.2.4
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 
411  CreateProjectionRequest(const std::string& tableName_, const std::string& projectionName_, const std::vector<std::string>& columnNames_, const std::map<std::string, std::string>& options_):
412  tableName( tableName_ ),
413  projectionName( projectionName_ ),
414  columnNames( columnNames_ ),
415  options( options_ )
416  {
417  }
418 
427  std::string tableName;
428 
437  std::string projectionName;
438 
444  std::vector<std::string> columnNames;
445 
672  std::map<std::string, std::string> options;
673  };
674 } // end namespace gpudb
675 
676 namespace avro
677 {
678  template<> struct codec_traits<gpudb::CreateProjectionRequest>
679  {
680  static void encode(Encoder& e, const gpudb::CreateProjectionRequest& v)
681  {
682  ::avro::encode(e, v.tableName);
683  ::avro::encode(e, v.projectionName);
684  ::avro::encode(e, v.columnNames);
685  ::avro::encode(e, v.options);
686  }
687 
688  static void decode(Decoder& d, gpudb::CreateProjectionRequest& v)
689  {
690  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
691  {
692  const std::vector<size_t> fo = rd->fieldOrder();
693 
694  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
695  {
696  switch (*it)
697  {
698  case 0:
699  ::avro::decode(d, v.tableName);
700  break;
701 
702  case 1:
703  ::avro::decode(d, v.projectionName);
704  break;
705 
706  case 2:
707  ::avro::decode(d, v.columnNames);
708  break;
709 
710  case 3:
711  ::avro::decode(d, v.options);
712  break;
713 
714  default:
715  break;
716  }
717  }
718  }
719  else
720  {
721  ::avro::decode(d, v.tableName);
722  ::avro::decode(d, v.projectionName);
723  ::avro::decode(d, v.columnNames);
724  ::avro::decode(d, v.options);
725  }
726  }
727  };
728 } // end namespace avro
729 
730 namespace gpudb
731 {
738  {
744  projectionName(std::string()),
745  info(std::map<std::string, std::string>())
746  {
747  }
748 
753  std::string projectionName;
754 
768  std::map<std::string, std::string> info;
769  };
770 } // end namespace gpudb
771 
772 namespace avro
773 {
774  template<> struct codec_traits<gpudb::CreateProjectionResponse>
775  {
776  static void encode(Encoder& e, const gpudb::CreateProjectionResponse& v)
777  {
778  ::avro::encode(e, v.projectionName);
779  ::avro::encode(e, v.info);
780  }
781 
782  static void decode(Decoder& d, gpudb::CreateProjectionResponse& v)
783  {
784  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
785  {
786  const std::vector<size_t> fo = rd->fieldOrder();
787 
788  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
789  {
790  switch (*it)
791  {
792  case 0:
793  ::avro::decode(d, v.projectionName);
794  break;
795 
796  case 1:
797  ::avro::decode(d, v.info);
798  break;
799 
800  default:
801  break;
802  }
803  }
804  }
805  else
806  {
807  ::avro::decode(d, v.projectionName);
808  ::avro::decode(d, v.info);
809  }
810  }
811  };
812 } // end namespace avro
813 
814 #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.