GPUdb C++ API  Version 5.2.0.0
execute_proc.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 __EXECUTE_PROC_H__
7 #define __EXECUTE_PROC_H__
8 
9 namespace gpudb
10 {
11 
19  {
20 
26  name(std::string()),
27  params(std::map<std::string, std::string>()),
28  binParams(std::map<std::string, std::vector<uint8_t> >()),
29  options(std::map<std::string, std::string>())
30  {
31  }
32 
48  ExecuteProcRequest(const std::string& name, const std::map<std::string, std::string>& params, const std::map<std::string, std::vector<uint8_t> >& binParams, const std::map<std::string, std::string>& options):
49  name(name),
50  params(params),
52  options(options)
53  {
54  }
55 
56  std::string name;
57  std::map<std::string, std::string> params;
58  std::map<std::string, std::vector<uint8_t> > binParams;
59  std::map<std::string, std::string> options;
60  };
61 }
62 
63 namespace avro
64 {
65  template<> struct codec_traits<gpudb::ExecuteProcRequest>
66  {
67  static void encode(Encoder& e, const gpudb::ExecuteProcRequest& v)
68  {
69  ::avro::encode(e, v.name);
70  ::avro::encode(e, v.params);
71  ::avro::encode(e, v.binParams);
72  ::avro::encode(e, v.options);
73  }
74 
75  static void decode(Decoder& d, gpudb::ExecuteProcRequest& v)
76  {
77  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
78  {
79  const std::vector<size_t> fo = rd->fieldOrder();
80 
81  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
82  {
83  switch (*it)
84  {
85  case 0:
86  ::avro::decode(d, v.name);
87  break;
88 
89  case 1:
90  ::avro::decode(d, v.params);
91  break;
92 
93  case 2:
94  ::avro::decode(d, v.binParams);
95  break;
96 
97  case 3:
98  ::avro::decode(d, v.options);
99  break;
100 
101  default:
102  break;
103  }
104  }
105  }
106  else
107  {
108  ::avro::decode(d, v.name);
109  ::avro::decode(d, v.params);
110  ::avro::decode(d, v.binParams);
111  ::avro::decode(d, v.options);
112  }
113  }
114  };
115 }
116 
117 namespace gpudb
118 {
119 
127  {
128 
134  results(std::map<std::string, std::string>()),
135  binResults(std::map<std::string, std::vector<uint8_t> >())
136  {
137  }
138 
139  std::map<std::string, std::string> results;
140  std::map<std::string, std::vector<uint8_t> > binResults;
141  };
142 }
143 
144 namespace avro
145 {
146  template<> struct codec_traits<gpudb::ExecuteProcResponse>
147  {
148  static void encode(Encoder& e, const gpudb::ExecuteProcResponse& v)
149  {
150  ::avro::encode(e, v.results);
151  ::avro::encode(e, v.binResults);
152  }
153 
154  static void decode(Decoder& d, gpudb::ExecuteProcResponse& v)
155  {
156  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
157  {
158  const std::vector<size_t> fo = rd->fieldOrder();
159 
160  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
161  {
162  switch (*it)
163  {
164  case 0:
165  ::avro::decode(d, v.results);
166  break;
167 
168  case 1:
169  ::avro::decode(d, v.binResults);
170  break;
171 
172  default:
173  break;
174  }
175  }
176  }
177  else
178  {
179  ::avro::decode(d, v.results);
180  ::avro::decode(d, v.binResults);
181  }
182  }
183  };
184 }
185 
186 #endif
ExecuteProcRequest(const std::string &name, const std::map< std::string, std::string > &params, const std::map< std::string, std::vector< uint8_t > > &binParams, const std::map< std::string, std::string > &options)
Constructs an ExecuteProcRequest object with the specified parameters.
Definition: execute_proc.h:48
ExecuteProcRequest()
Constructs an ExecuteProcRequest object with default parameter values.
Definition: execute_proc.h:25
std::map< std::string, std::string > params
Definition: execute_proc.h:57
A set of input parameters for executeProc(const ExecuteProcRequest&) const.
Definition: execute_proc.h:18
std::map< std::string, std::vector< uint8_t > > binParams
Definition: execute_proc.h:58
std::map< std::string, std::vector< uint8_t > > binResults
Definition: execute_proc.h:140
std::map< std::string, std::string > results
Definition: execute_proc.h:139
A set of output parameters for executeProc(const ExecuteProcRequest&) const.
Definition: execute_proc.h:126
std::map< std::string, std::string > options
Definition: execute_proc.h:59
ExecuteProcResponse()
Constructs an ExecuteProcResponse object with default parameter values.
Definition: execute_proc.h:133