GPUdb C++ API  Version 7.2.2.4
gpudb_wrapper.h
Go to the documentation of this file.
1 /*
2  * This file was autogenerated by the Kinetica schema processor.
3  *
4  * DO NOT EDIT DIRECTLY.
5  */
6 #ifndef __GPUDB_WRAPPER_H__
7 #define __GPUDB_WRAPPER_H__
8 
9 namespace gpudb
10 {
15  {
20  status(std::string()),
21  message(std::string()),
22  dataType(std::string()),
23  data(std::vector<uint8_t>()),
24  dataStr(std::string())
25  {
26  }
27 
28  std::string status;
29  std::string message;
30  std::string dataType;
31  std::vector<uint8_t> data;
32  std::string dataStr;
33  };
34 } // end namespace gpudb
35 
36 namespace avro
37 {
38  template<> struct codec_traits<gpudb::RawGpudbResponse>
39  {
40  static void encode(Encoder& e, const gpudb::RawGpudbResponse& v)
41  {
42  ::avro::encode(e, v.status);
43  ::avro::encode(e, v.message);
44  ::avro::encode(e, v.dataType);
45  ::avro::encode(e, v.data);
46  ::avro::encode(e, v.dataStr);
47  }
48 
49  static void decode(Decoder& d, gpudb::RawGpudbResponse& v)
50  {
51  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
52  {
53  const std::vector<size_t> fo = rd->fieldOrder();
54 
55  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
56  {
57  switch (*it)
58  {
59  case 0:
60  ::avro::decode(d, v.status);
61  break;
62 
63  case 1:
64  ::avro::decode(d, v.message);
65  break;
66 
67  case 2:
68  ::avro::decode(d, v.dataType);
69  break;
70 
71  case 3:
72  ::avro::decode(d, v.data);
73  break;
74 
75  case 4:
76  ::avro::decode(d, v.dataStr);
77  break;
78 
79  default:
80  break;
81  }
82  }
83  }
84  else
85  {
86  ::avro::decode(d, v.status);
87  ::avro::decode(d, v.message);
88  ::avro::decode(d, v.dataType);
89  ::avro::decode(d, v.data);
90  ::avro::decode(d, v.dataStr);
91  }
92  }
93  };
94 } // end namespace avro
95 
96 #endif // __GPUDB_WRAPPER_H__
RawGpudbResponse()
Constructs a RawGpudbResponse object with default parameters.
Definition: gpudb_wrapper.h:19
The wrapper used by the GPUdb server for all endpoint responses.
Definition: gpudb_wrapper.h:14
std::vector< uint8_t > data
Definition: gpudb_wrapper.h:31