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