GPUdb C++ API  Version 5.2.0.0
get_records_by_series.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 __GET_RECORDS_BY_SERIES_H__
7 #define __GET_RECORDS_BY_SERIES_H__
8 
9 namespace gpudb
10 {
11 
30  {
31 
37  tableName(std::string()),
38  worldTableName(std::string()),
39  offset(int32_t()),
40  limit(int32_t()),
41  encoding(std::string("binary")),
42  options(std::map<std::string, std::string>())
43  {
44  }
45 
73  GetRecordsBySeriesRequest(const std::string& tableName, const std::string& worldTableName, const int32_t offset, const int32_t limit, const std::map<std::string, std::string>& options):
74  tableName(tableName),
75  worldTableName(worldTableName),
76  offset(offset),
77  limit(limit),
78  encoding("binary"),
79  options(options)
80  {
81  }
82 
114  GetRecordsBySeriesRequest(const std::string& tableName, const std::string& worldTableName, const int32_t offset, const int32_t limit, const std::string& encoding, const std::map<std::string, std::string>& options):
115  tableName(tableName),
116  worldTableName(worldTableName),
117  offset(offset),
118  limit(limit),
119  encoding(encoding),
120  options(options)
121  {
122  }
123 
124  std::string tableName;
125  std::string worldTableName;
126  int32_t offset;
127  int32_t limit;
128  std::string encoding;
129  std::map<std::string, std::string> options;
130  };
131 }
132 
133 namespace avro
134 {
135  template<> struct codec_traits<gpudb::GetRecordsBySeriesRequest>
136  {
137  static void encode(Encoder& e, const gpudb::GetRecordsBySeriesRequest& v)
138  {
139  ::avro::encode(e, v.tableName);
140  ::avro::encode(e, v.worldTableName);
141  ::avro::encode(e, v.offset);
142  ::avro::encode(e, v.limit);
143  ::avro::encode(e, v.encoding);
144  ::avro::encode(e, v.options);
145  }
146 
147  static void decode(Decoder& d, gpudb::GetRecordsBySeriesRequest& v)
148  {
149  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
150  {
151  const std::vector<size_t> fo = rd->fieldOrder();
152 
153  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
154  {
155  switch (*it)
156  {
157  case 0:
158  ::avro::decode(d, v.tableName);
159  break;
160 
161  case 1:
162  ::avro::decode(d, v.worldTableName);
163  break;
164 
165  case 2:
166  ::avro::decode(d, v.offset);
167  break;
168 
169  case 3:
170  ::avro::decode(d, v.limit);
171  break;
172 
173  case 4:
174  ::avro::decode(d, v.encoding);
175  break;
176 
177  case 5:
178  ::avro::decode(d, v.options);
179  break;
180 
181  default:
182  break;
183  }
184  }
185  }
186  else
187  {
188  ::avro::decode(d, v.tableName);
189  ::avro::decode(d, v.worldTableName);
190  ::avro::decode(d, v.offset);
191  ::avro::decode(d, v.limit);
192  ::avro::decode(d, v.encoding);
193  ::avro::decode(d, v.options);
194  }
195  }
196  };
197 }
198 
199 namespace gpudb
200 {
201 
220  {
221 
227  tableNames(std::vector<std::string>()),
228  typeNames(std::vector<std::string>()),
229  typeSchemas(std::vector<std::string>()),
230  listRecordsBinary(std::vector<std::vector<std::vector<uint8_t> > >()),
231  listRecordsJson(std::vector<std::vector<std::string> >())
232  {
233  }
234 
235  std::vector<std::string> tableNames;
236  std::vector<std::string> typeNames;
237  std::vector<std::string> typeSchemas;
238  std::vector<std::vector<std::vector<uint8_t> > > listRecordsBinary;
239  std::vector<std::vector<std::string> > listRecordsJson;
240  };
241 }
242 
243 namespace avro
244 {
245  template<> struct codec_traits<gpudb::RawGetRecordsBySeriesResponse>
246  {
247  static void encode(Encoder& e, const gpudb::RawGetRecordsBySeriesResponse& v)
248  {
249  ::avro::encode(e, v.tableNames);
250  ::avro::encode(e, v.typeNames);
251  ::avro::encode(e, v.typeSchemas);
252  ::avro::encode(e, v.listRecordsBinary);
253  ::avro::encode(e, v.listRecordsJson);
254  }
255 
256  static void decode(Decoder& d, gpudb::RawGetRecordsBySeriesResponse& v)
257  {
258  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
259  {
260  const std::vector<size_t> fo = rd->fieldOrder();
261 
262  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
263  {
264  switch (*it)
265  {
266  case 0:
267  ::avro::decode(d, v.tableNames);
268  break;
269 
270  case 1:
271  ::avro::decode(d, v.typeNames);
272  break;
273 
274  case 2:
275  ::avro::decode(d, v.typeSchemas);
276  break;
277 
278  case 3:
279  ::avro::decode(d, v.listRecordsBinary);
280  break;
281 
282  case 4:
283  ::avro::decode(d, v.listRecordsJson);
284  break;
285 
286  default:
287  break;
288  }
289  }
290  }
291  else
292  {
293  ::avro::decode(d, v.tableNames);
294  ::avro::decode(d, v.typeNames);
295  ::avro::decode(d, v.typeSchemas);
296  ::avro::decode(d, v.listRecordsBinary);
297  ::avro::decode(d, v.listRecordsJson);
298  }
299  }
300  };
301 }
302 
303 namespace gpudb
304 {
305 
326  template<typename T> struct GetRecordsBySeriesResponse
327  {
328 
334  tableNames(std::vector<std::string>()),
335  typeNames(std::vector<std::string>()),
336  typeSchemas(std::vector<std::string>()),
337  data(std::vector<std::vector<T> >())
338  {
339  }
340 
341  std::vector<std::string> tableNames;
342  std::vector<std::string> typeNames;
343  std::vector<std::string> typeSchemas;
344  std::vector<std::vector<T> > data;
345  };
346 }
347 
348 #endif
RawGetRecordsBySeriesResponse()
Constructs a RawGetRecordsBySeriesResponse object with default parameter values.
std::map< std::string, std::string > options
A set of output parameters for getRecordsBySeriesRaw(const GetRecordsBySeriesRequest&) const...
GetRecordsBySeriesResponse()
Constructs a GetRecordsBySeriesResponse object with default parameter values.
A set of input parameters for getRecordsBySeriesRaw(const GetRecordsBySeriesRequest&) const...
GetRecordsBySeriesRequest(const std::string &tableName, const std::string &worldTableName, const int32_t offset, const int32_t limit, const std::string &encoding, const std::map< std::string, std::string > &options)
Constructs a GetRecordsBySeriesRequest object with the specified parameters.
A set of output parameters for getRecordsBySeries(const GetRecordsBySeriesRequest&) const...
std::vector< std::vector< T > > data
std::vector< std::vector< std::string > > listRecordsJson
GetRecordsBySeriesRequest(const std::string &tableName, const std::string &worldTableName, const int32_t offset, const int32_t limit, const std::map< std::string, std::string > &options)
Constructs a GetRecordsBySeriesRequest object with the specified parameters.
std::vector< std::vector< std::vector< uint8_t > > > listRecordsBinary
GetRecordsBySeriesRequest()
Constructs a GetRecordsBySeriesRequest object with default parameter values.
std::vector< std::string > typeSchemas
std::vector< std::string > tableNames
std::vector< std::string > typeNames