GPUdb C++ API  Version 7.1.10.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
create_table_external.h
Go to the documentation of this file.
1 /*
2  * This file was autogenerated by the GPUdb schema processor.
3  *
4  * DO NOT EDIT DIRECTLY.
5  */
6 #ifndef __CREATE_TABLE_EXTERNAL_H__
7 #define __CREATE_TABLE_EXTERNAL_H__
8 
9 namespace gpudb
10 {
11 
33  {
34 
40  tableName(std::string()),
41  filepaths(std::vector<std::string>()),
42  modifyColumns(std::map<std::string, std::map<std::string, std::string> >()),
43  createTableOptions(std::map<std::string, std::string>()),
44  options(std::map<std::string, std::string>())
45  {
46  }
47 
979  CreateTableExternalRequest(const std::string& tableName_, const std::vector<std::string>& filepaths_, const std::map<std::string, std::map<std::string, std::string> >& modifyColumns_, const std::map<std::string, std::string>& createTableOptions_, const std::map<std::string, std::string>& options_):
980  tableName( tableName_ ),
981  filepaths( filepaths_ ),
982  modifyColumns( modifyColumns_ ),
983  createTableOptions( createTableOptions_ ),
984  options( options_ )
985  {
986  }
987 
988  std::string tableName;
989  std::vector<std::string> filepaths;
990  std::map<std::string, std::map<std::string, std::string> > modifyColumns;
991  std::map<std::string, std::string> createTableOptions;
992  std::map<std::string, std::string> options;
993  };
994 }
995 
996 namespace avro
997 {
998  template<> struct codec_traits<gpudb::CreateTableExternalRequest>
999  {
1000  static void encode(Encoder& e, const gpudb::CreateTableExternalRequest& v)
1001  {
1002  ::avro::encode(e, v.tableName);
1003  ::avro::encode(e, v.filepaths);
1004  ::avro::encode(e, v.modifyColumns);
1005  ::avro::encode(e, v.createTableOptions);
1006  ::avro::encode(e, v.options);
1007  }
1008 
1009  static void decode(Decoder& d, gpudb::CreateTableExternalRequest& v)
1010  {
1011  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
1012  {
1013  const std::vector<size_t> fo = rd->fieldOrder();
1014 
1015  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
1016  {
1017  switch (*it)
1018  {
1019  case 0:
1020  ::avro::decode(d, v.tableName);
1021  break;
1022 
1023  case 1:
1024  ::avro::decode(d, v.filepaths);
1025  break;
1026 
1027  case 2:
1028  ::avro::decode(d, v.modifyColumns);
1029  break;
1030 
1031  case 3:
1032  ::avro::decode(d, v.createTableOptions);
1033  break;
1034 
1035  case 4:
1036  ::avro::decode(d, v.options);
1037  break;
1038 
1039  default:
1040  break;
1041  }
1042  }
1043  }
1044  else
1045  {
1046  ::avro::decode(d, v.tableName);
1047  ::avro::decode(d, v.filepaths);
1048  ::avro::decode(d, v.modifyColumns);
1049  ::avro::decode(d, v.createTableOptions);
1050  ::avro::decode(d, v.options);
1051  }
1052  }
1053  };
1054 }
1055 
1056 namespace gpudb
1057 {
1058 
1080  {
1081 
1087  tableName(std::string()),
1088  typeId(std::string()),
1089  typeDefinition(std::string()),
1090  typeLabel(std::string()),
1091  typeProperties(std::map<std::string, std::vector<std::string> >()),
1092  countInserted(int64_t()),
1093  countSkipped(int64_t()),
1094  countUpdated(int64_t()),
1095  info(std::map<std::string, std::string>()),
1096  files(std::vector<std::string>())
1097  {
1098  }
1099 
1100  std::string tableName;
1101  std::string typeId;
1102  std::string typeDefinition;
1103  std::string typeLabel;
1104  std::map<std::string, std::vector<std::string> > typeProperties;
1105  int64_t countInserted;
1106  int64_t countSkipped;
1107  int64_t countUpdated;
1108  std::map<std::string, std::string> info;
1109  std::vector<std::string> files;
1110  };
1111 }
1112 
1113 namespace avro
1114 {
1115  template<> struct codec_traits<gpudb::CreateTableExternalResponse>
1116  {
1117  static void encode(Encoder& e, const gpudb::CreateTableExternalResponse& v)
1118  {
1119  ::avro::encode(e, v.tableName);
1120  ::avro::encode(e, v.typeId);
1121  ::avro::encode(e, v.typeDefinition);
1122  ::avro::encode(e, v.typeLabel);
1123  ::avro::encode(e, v.typeProperties);
1124  ::avro::encode(e, v.countInserted);
1125  ::avro::encode(e, v.countSkipped);
1126  ::avro::encode(e, v.countUpdated);
1127  ::avro::encode(e, v.info);
1128  ::avro::encode(e, v.files);
1129  }
1130 
1131  static void decode(Decoder& d, gpudb::CreateTableExternalResponse& v)
1132  {
1133  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
1134  {
1135  const std::vector<size_t> fo = rd->fieldOrder();
1136 
1137  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
1138  {
1139  switch (*it)
1140  {
1141  case 0:
1142  ::avro::decode(d, v.tableName);
1143  break;
1144 
1145  case 1:
1146  ::avro::decode(d, v.typeId);
1147  break;
1148 
1149  case 2:
1150  ::avro::decode(d, v.typeDefinition);
1151  break;
1152 
1153  case 3:
1154  ::avro::decode(d, v.typeLabel);
1155  break;
1156 
1157  case 4:
1158  ::avro::decode(d, v.typeProperties);
1159  break;
1160 
1161  case 5:
1162  ::avro::decode(d, v.countInserted);
1163  break;
1164 
1165  case 6:
1166  ::avro::decode(d, v.countSkipped);
1167  break;
1168 
1169  case 7:
1170  ::avro::decode(d, v.countUpdated);
1171  break;
1172 
1173  case 8:
1174  ::avro::decode(d, v.info);
1175  break;
1176 
1177  case 9:
1178  ::avro::decode(d, v.files);
1179  break;
1180 
1181  default:
1182  break;
1183  }
1184  }
1185  }
1186  else
1187  {
1188  ::avro::decode(d, v.tableName);
1189  ::avro::decode(d, v.typeId);
1190  ::avro::decode(d, v.typeDefinition);
1191  ::avro::decode(d, v.typeLabel);
1192  ::avro::decode(d, v.typeProperties);
1193  ::avro::decode(d, v.countInserted);
1194  ::avro::decode(d, v.countSkipped);
1195  ::avro::decode(d, v.countUpdated);
1196  ::avro::decode(d, v.info);
1197  ::avro::decode(d, v.files);
1198  }
1199  }
1200  };
1201 }
1202 
1203 #endif
A set of input parameters for const.
std::map< std::string, std::string > info
CreateTableExternalResponse()
Constructs a CreateTableExternalResponse object with default parameter values.
CreateTableExternalRequest()
Constructs a CreateTableExternalRequest object with default parameter values.
CreateTableExternalRequest(const std::string &tableName_, const std::vector< std::string > &filepaths_, const std::map< std::string, std::map< std::string, std::string > > &modifyColumns_, const std::map< std::string, std::string > &createTableOptions_, const std::map< std::string, std::string > &options_)
Constructs a CreateTableExternalRequest object with the specified parameters.
std::map< std::string, std::string > createTableOptions
std::map< std::string, std::map< std::string, std::string > > modifyColumns
A set of output parameters for const.
std::vector< std::string > filepaths
std::map< std::string, std::vector< std::string > > typeProperties
std::map< std::string, std::string > options