GPUdb C++ API  Version 5.2.0.0
create_union.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_UNION_H__
7 #define __CREATE_UNION_H__
8 
9 namespace gpudb
10 {
11 
22  {
23 
29  tableName(std::string()),
30  tableNames(std::vector<std::string>()),
31  inputColumnNames(std::vector<std::vector<std::string> >()),
32  outputColumnNames(std::vector<std::string>()),
33  options(std::map<std::string, std::string>())
34  {
35  }
36 
61  CreateUnionRequest(const std::string& tableName, const std::vector<std::string>& tableNames, const std::vector<std::vector<std::string> >& inputColumnNames, const std::vector<std::string>& outputColumnNames, const std::map<std::string, std::string>& options):
62  tableName(tableName),
63  tableNames(tableNames),
65  outputColumnNames(outputColumnNames),
66  options(options)
67  {
68  }
69 
70  std::string tableName;
71  std::vector<std::string> tableNames;
72  std::vector<std::vector<std::string> > inputColumnNames;
73  std::vector<std::string> outputColumnNames;
74  std::map<std::string, std::string> options;
75  };
76 }
77 
78 namespace avro
79 {
80  template<> struct codec_traits<gpudb::CreateUnionRequest>
81  {
82  static void encode(Encoder& e, const gpudb::CreateUnionRequest& v)
83  {
84  ::avro::encode(e, v.tableName);
85  ::avro::encode(e, v.tableNames);
86  ::avro::encode(e, v.inputColumnNames);
87  ::avro::encode(e, v.outputColumnNames);
88  ::avro::encode(e, v.options);
89  }
90 
91  static void decode(Decoder& d, gpudb::CreateUnionRequest& v)
92  {
93  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
94  {
95  const std::vector<size_t> fo = rd->fieldOrder();
96 
97  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
98  {
99  switch (*it)
100  {
101  case 0:
102  ::avro::decode(d, v.tableName);
103  break;
104 
105  case 1:
106  ::avro::decode(d, v.tableNames);
107  break;
108 
109  case 2:
110  ::avro::decode(d, v.inputColumnNames);
111  break;
112 
113  case 3:
114  ::avro::decode(d, v.outputColumnNames);
115  break;
116 
117  case 4:
118  ::avro::decode(d, v.options);
119  break;
120 
121  default:
122  break;
123  }
124  }
125  }
126  else
127  {
128  ::avro::decode(d, v.tableName);
129  ::avro::decode(d, v.tableNames);
130  ::avro::decode(d, v.inputColumnNames);
131  ::avro::decode(d, v.outputColumnNames);
132  ::avro::decode(d, v.options);
133  }
134  }
135  };
136 }
137 
138 namespace gpudb
139 {
140 
151  {
152 
158  tableName(std::string())
159  {
160  }
161 
162  std::string tableName;
163  };
164 }
165 
166 namespace avro
167 {
168  template<> struct codec_traits<gpudb::CreateUnionResponse>
169  {
170  static void encode(Encoder& e, const gpudb::CreateUnionResponse& v)
171  {
172  ::avro::encode(e, v.tableName);
173  }
174 
175  static void decode(Decoder& d, gpudb::CreateUnionResponse& v)
176  {
177  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
178  {
179  const std::vector<size_t> fo = rd->fieldOrder();
180 
181  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
182  {
183  switch (*it)
184  {
185  case 0:
186  ::avro::decode(d, v.tableName);
187  break;
188 
189  default:
190  break;
191  }
192  }
193  }
194  else
195  {
196  ::avro::decode(d, v.tableName);
197  }
198  }
199  };
200 }
201 
202 #endif
std::vector< std::string > tableNames
Definition: create_union.h:71
CreateUnionResponse()
Constructs a CreateUnionResponse object with default parameter values.
Definition: create_union.h:157
A set of input parameters for createUnion(const CreateUnionRequest&) const.
Definition: create_union.h:21
std::vector< std::string > outputColumnNames
Definition: create_union.h:73
std::map< std::string, std::string > options
Definition: create_union.h:74
A set of output parameters for createUnion(const CreateUnionRequest&) const.
Definition: create_union.h:150
std::vector< std::vector< std::string > > inputColumnNames
Definition: create_union.h:72
CreateUnionRequest(const std::string &tableName, const std::vector< std::string > &tableNames, const std::vector< std::vector< std::string > > &inputColumnNames, const std::vector< std::string > &outputColumnNames, const std::map< std::string, std::string > &options)
Constructs a CreateUnionRequest object with the specified parameters.
Definition: create_union.h:61
CreateUnionRequest()
Constructs a CreateUnionRequest object with default parameter values.
Definition: create_union.h:28