GPUdb C++ API  Version 6.1.0.0
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 
105  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_):
106  tableName( tableName_ ),
107  sourceTableName( sourceTableName_ ),
108  fieldMap( fieldMap_ ),
109  options( options_ )
110  {
111  }
112 
113  std::string tableName;
114  std::string sourceTableName;
115  std::map<std::string, std::string> fieldMap;
116  std::map<std::string, std::string> options;
117  };
118 }
119 
120 namespace avro
121 {
122  template<> struct codec_traits<gpudb::AppendRecordsRequest>
123  {
124  static void encode(Encoder& e, const gpudb::AppendRecordsRequest& v)
125  {
126  ::avro::encode(e, v.tableName);
127  ::avro::encode(e, v.sourceTableName);
128  ::avro::encode(e, v.fieldMap);
129  ::avro::encode(e, v.options);
130  }
131 
132  static void decode(Decoder& d, gpudb::AppendRecordsRequest& v)
133  {
134  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
135  {
136  const std::vector<size_t> fo = rd->fieldOrder();
137 
138  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
139  {
140  switch (*it)
141  {
142  case 0:
143  ::avro::decode(d, v.tableName);
144  break;
145 
146  case 1:
147  ::avro::decode(d, v.sourceTableName);
148  break;
149 
150  case 2:
151  ::avro::decode(d, v.fieldMap);
152  break;
153 
154  case 3:
155  ::avro::decode(d, v.options);
156  break;
157 
158  default:
159  break;
160  }
161  }
162  }
163  else
164  {
165  ::avro::decode(d, v.tableName);
166  ::avro::decode(d, v.sourceTableName);
167  ::avro::decode(d, v.fieldMap);
168  ::avro::decode(d, v.options);
169  }
170  }
171  };
172 }
173 
174 namespace gpudb
175 {
176 
188  {
189 
195  tableName(std::string())
196  {
197  }
198 
199  std::string tableName;
200  };
201 }
202 
203 namespace avro
204 {
205  template<> struct codec_traits<gpudb::AppendRecordsResponse>
206  {
207  static void encode(Encoder& e, const gpudb::AppendRecordsResponse& v)
208  {
209  ::avro::encode(e, v.tableName);
210  }
211 
212  static void decode(Decoder& d, gpudb::AppendRecordsResponse& v)
213  {
214  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
215  {
216  const std::vector<size_t> fo = rd->fieldOrder();
217 
218  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
219  {
220  switch (*it)
221  {
222  case 0:
223  ::avro::decode(d, v.tableName);
224  break;
225 
226  default:
227  break;
228  }
229  }
230  }
231  else
232  {
233  ::avro::decode(d, v.tableName);
234  }
235  }
236  };
237 }
238 
239 #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