GPUdb C++ API  Version 7.0.19.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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 
118  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_):
119  tableName( tableName_ ),
120  sourceTableName( sourceTableName_ ),
121  fieldMap( fieldMap_ ),
122  options( options_ )
123  {
124  }
125 
126  std::string tableName;
127  std::string sourceTableName;
128  std::map<std::string, std::string> fieldMap;
129  std::map<std::string, std::string> options;
130  };
131 }
132 
133 namespace avro
134 {
135  template<> struct codec_traits<gpudb::AppendRecordsRequest>
136  {
137  static void encode(Encoder& e, const gpudb::AppendRecordsRequest& v)
138  {
139  ::avro::encode(e, v.tableName);
140  ::avro::encode(e, v.sourceTableName);
141  ::avro::encode(e, v.fieldMap);
142  ::avro::encode(e, v.options);
143  }
144 
145  static void decode(Decoder& d, gpudb::AppendRecordsRequest& v)
146  {
147  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
148  {
149  const std::vector<size_t> fo = rd->fieldOrder();
150 
151  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
152  {
153  switch (*it)
154  {
155  case 0:
156  ::avro::decode(d, v.tableName);
157  break;
158 
159  case 1:
160  ::avro::decode(d, v.sourceTableName);
161  break;
162 
163  case 2:
164  ::avro::decode(d, v.fieldMap);
165  break;
166 
167  case 3:
168  ::avro::decode(d, v.options);
169  break;
170 
171  default:
172  break;
173  }
174  }
175  }
176  else
177  {
178  ::avro::decode(d, v.tableName);
179  ::avro::decode(d, v.sourceTableName);
180  ::avro::decode(d, v.fieldMap);
181  ::avro::decode(d, v.options);
182  }
183  }
184  };
185 }
186 
187 namespace gpudb
188 {
189 
201  {
202 
208  tableName(std::string()),
209  info(std::map<std::string, std::string>())
210  {
211  }
212 
213  std::string tableName;
214  std::map<std::string, std::string> info;
215  };
216 }
217 
218 namespace avro
219 {
220  template<> struct codec_traits<gpudb::AppendRecordsResponse>
221  {
222  static void encode(Encoder& e, const gpudb::AppendRecordsResponse& v)
223  {
224  ::avro::encode(e, v.tableName);
225  ::avro::encode(e, v.info);
226  }
227 
228  static void decode(Decoder& d, gpudb::AppendRecordsResponse& v)
229  {
230  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
231  {
232  const std::vector<size_t> fo = rd->fieldOrder();
233 
234  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
235  {
236  switch (*it)
237  {
238  case 0:
239  ::avro::decode(d, v.tableName);
240  break;
241 
242  case 1:
243  ::avro::decode(d, v.info);
244  break;
245 
246  default:
247  break;
248  }
249  }
250  }
251  else
252  {
253  ::avro::decode(d, v.tableName);
254  ::avro::decode(d, v.info);
255  }
256  }
257  };
258 }
259 
260 #endif
AppendRecordsResponse()
Constructs an AppendRecordsResponse object with default parameter values.
A set of output parameters for const.
std::map< std::string, std::string > fieldMap
std::map< std::string, std::string > info
A set of input parameters for 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