GPUdb C++ API  Version 6.2.0.3
append_records.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 __APPEND_RECORDS_H__
7 #define __APPEND_RECORDS_H__
8 
9 namespace gpudb
10 {
11 
23  {
24 
30  tableName(std::string()),
31  sourceTableName(std::string()),
32  fieldMap(std::map<std::string, std::string>()),
33  options(std::map<std::string, std::string>())
34  {
35  }
36 
122  AppendRecordsRequest(const std::string& tableName_, const std::string& sourceTableName_, const std::map<std::string, std::string>& fieldMap_, const std::map<std::string, std::string>& options_):
123  tableName( tableName_ ),
124  sourceTableName( sourceTableName_ ),
125  fieldMap( fieldMap_ ),
126  options( options_ )
127  {
128  }
129 
130  std::string tableName;
131  std::string sourceTableName;
132  std::map<std::string, std::string> fieldMap;
133  std::map<std::string, std::string> options;
134  };
135 }
136 
137 namespace avro
138 {
139  template<> struct codec_traits<gpudb::AppendRecordsRequest>
140  {
141  static void encode(Encoder& e, const gpudb::AppendRecordsRequest& v)
142  {
143  ::avro::encode(e, v.tableName);
144  ::avro::encode(e, v.sourceTableName);
145  ::avro::encode(e, v.fieldMap);
146  ::avro::encode(e, v.options);
147  }
148 
149  static void decode(Decoder& d, gpudb::AppendRecordsRequest& v)
150  {
151  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
152  {
153  const std::vector<size_t> fo = rd->fieldOrder();
154 
155  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
156  {
157  switch (*it)
158  {
159  case 0:
160  ::avro::decode(d, v.tableName);
161  break;
162 
163  case 1:
164  ::avro::decode(d, v.sourceTableName);
165  break;
166 
167  case 2:
168  ::avro::decode(d, v.fieldMap);
169  break;
170 
171  case 3:
172  ::avro::decode(d, v.options);
173  break;
174 
175  default:
176  break;
177  }
178  }
179  }
180  else
181  {
182  ::avro::decode(d, v.tableName);
183  ::avro::decode(d, v.sourceTableName);
184  ::avro::decode(d, v.fieldMap);
185  ::avro::decode(d, v.options);
186  }
187  }
188  };
189 }
190 
191 namespace gpudb
192 {
193 
205  {
206 
212  tableName(std::string())
213  {
214  }
215 
216  std::string tableName;
217  };
218 }
219 
220 namespace avro
221 {
222  template<> struct codec_traits<gpudb::AppendRecordsResponse>
223  {
224  static void encode(Encoder& e, const gpudb::AppendRecordsResponse& v)
225  {
226  ::avro::encode(e, v.tableName);
227  }
228 
229  static void decode(Decoder& d, gpudb::AppendRecordsResponse& v)
230  {
231  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
232  {
233  const std::vector<size_t> fo = rd->fieldOrder();
234 
235  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
236  {
237  switch (*it)
238  {
239  case 0:
240  ::avro::decode(d, v.tableName);
241  break;
242 
243  default:
244  break;
245  }
246  }
247  }
248  else
249  {
250  ::avro::decode(d, v.tableName);
251  }
252  }
253  };
254 }
255 
256 #endif
AppendRecordsResponse()
Constructs an AppendRecordsResponse object with default parameter values.
A set of output parameters for appendRecords(const AppendRecordsRequest&) const.
std::map< std::string, std::string > fieldMap
A set of input parameters for appendRecords(const AppendRecordsRequest&) const.
AppendRecordsRequest()
Constructs an AppendRecordsRequest object with default parameter values.
AppendRecordsRequest(const std::string &tableName_, const std::string &sourceTableName_, const std::map< std::string, std::string > &fieldMap_, const std::map< std::string, std::string > &options_)
Constructs an AppendRecordsRequest object with the specified parameters.
std::map< std::string, std::string > options