GPUdb C++ API  Version 6.0.1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends
insert_records_random.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 __INSERT_RECORDS_RANDOM_H__
7 #define __INSERT_RECORDS_RANDOM_H__
8 
9 namespace gpudb
10 {
11 
27  {
28 
34  tableName(std::string()),
35  count(int64_t()),
36  options(std::map<std::string, std::map<std::string, double> >())
37  {
38  }
39 
250  InsertRecordsRandomRequest(const std::string& tableName_, const int64_t count_, const std::map<std::string, std::map<std::string, double> >& options_):
251  tableName( tableName_ ),
252  count( count_ ),
253  options( options_ )
254  {
255  }
256 
257  std::string tableName;
258  int64_t count;
259  std::map<std::string, std::map<std::string, double> > options;
260  };
261 }
262 
263 namespace avro
264 {
265  template<> struct codec_traits<gpudb::InsertRecordsRandomRequest>
266  {
267  static void encode(Encoder& e, const gpudb::InsertRecordsRandomRequest& v)
268  {
269  ::avro::encode(e, v.tableName);
270  ::avro::encode(e, v.count);
271  ::avro::encode(e, v.options);
272  }
273 
274  static void decode(Decoder& d, gpudb::InsertRecordsRandomRequest& v)
275  {
276  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
277  {
278  const std::vector<size_t> fo = rd->fieldOrder();
279 
280  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
281  {
282  switch (*it)
283  {
284  case 0:
285  ::avro::decode(d, v.tableName);
286  break;
287 
288  case 1:
289  ::avro::decode(d, v.count);
290  break;
291 
292  case 2:
293  ::avro::decode(d, v.options);
294  break;
295 
296  default:
297  break;
298  }
299  }
300  }
301  else
302  {
303  ::avro::decode(d, v.tableName);
304  ::avro::decode(d, v.count);
305  ::avro::decode(d, v.options);
306  }
307  }
308  };
309 }
310 
311 namespace gpudb
312 {
313 
329  {
330 
336  tableName(std::string()),
337  count(int64_t())
338  {
339  }
340 
341  std::string tableName;
342  int64_t count;
343  };
344 }
345 
346 namespace avro
347 {
348  template<> struct codec_traits<gpudb::InsertRecordsRandomResponse>
349  {
350  static void encode(Encoder& e, const gpudb::InsertRecordsRandomResponse& v)
351  {
352  ::avro::encode(e, v.tableName);
353  ::avro::encode(e, v.count);
354  }
355 
356  static void decode(Decoder& d, gpudb::InsertRecordsRandomResponse& v)
357  {
358  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
359  {
360  const std::vector<size_t> fo = rd->fieldOrder();
361 
362  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
363  {
364  switch (*it)
365  {
366  case 0:
367  ::avro::decode(d, v.tableName);
368  break;
369 
370  case 1:
371  ::avro::decode(d, v.count);
372  break;
373 
374  default:
375  break;
376  }
377  }
378  }
379  else
380  {
381  ::avro::decode(d, v.tableName);
382  ::avro::decode(d, v.count);
383  }
384  }
385  };
386 }
387 
388 #endif
InsertRecordsRandomRequest()
Constructs an InsertRecordsRandomRequest object with default parameter values.
InsertRecordsRandomRequest(const std::string &tableName_, const int64_t count_, const std::map< std::string, std::map< std::string, double > > &options_)
Constructs an InsertRecordsRandomRequest object with the specified parameters.
A set of output parameters for const.
std::map< std::string, std::map< std::string, double > > options
InsertRecordsRandomResponse()
Constructs an InsertRecordsRandomResponse object with default parameter values.
A set of input parameters for const.