GPUdb C++ API  Version 7.2.2.4
has_proc.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 __HAS_PROC_H__
7 #define __HAS_PROC_H__
8 
9 namespace gpudb
10 {
18  {
23  procName(std::string()),
24  options(std::map<std::string, std::string>())
25  {
26  }
27 
35  HasProcRequest(const std::string& procName_, const std::map<std::string, std::string>& options_):
36  procName( procName_ ),
37  options( options_ )
38  {
39  }
40 
44  std::string procName;
45 
49  std::map<std::string, std::string> options;
50  };
51 } // end namespace gpudb
52 
53 namespace avro
54 {
55  template<> struct codec_traits<gpudb::HasProcRequest>
56  {
57  static void encode(Encoder& e, const gpudb::HasProcRequest& v)
58  {
59  ::avro::encode(e, v.procName);
60  ::avro::encode(e, v.options);
61  }
62 
63  static void decode(Decoder& d, gpudb::HasProcRequest& v)
64  {
65  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
66  {
67  const std::vector<size_t> fo = rd->fieldOrder();
68 
69  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
70  {
71  switch (*it)
72  {
73  case 0:
74  ::avro::decode(d, v.procName);
75  break;
76 
77  case 1:
78  ::avro::decode(d, v.options);
79  break;
80 
81  default:
82  break;
83  }
84  }
85  }
86  else
87  {
88  ::avro::decode(d, v.procName);
89  ::avro::decode(d, v.options);
90  }
91  }
92  };
93 } // end namespace avro
94 
95 namespace gpudb
96 {
102  {
107  procName(std::string()),
108  procExists(bool()),
109  info(std::map<std::string, std::string>())
110  {
111  }
112 
116  std::string procName;
117 
127 
131  std::map<std::string, std::string> info;
132  };
133 } // end namespace gpudb
134 
135 namespace avro
136 {
137  template<> struct codec_traits<gpudb::HasProcResponse>
138  {
139  static void encode(Encoder& e, const gpudb::HasProcResponse& v)
140  {
141  ::avro::encode(e, v.procName);
142  ::avro::encode(e, v.procExists);
143  ::avro::encode(e, v.info);
144  }
145 
146  static void decode(Decoder& d, gpudb::HasProcResponse& v)
147  {
148  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
149  {
150  const std::vector<size_t> fo = rd->fieldOrder();
151 
152  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
153  {
154  switch (*it)
155  {
156  case 0:
157  ::avro::decode(d, v.procName);
158  break;
159 
160  case 1:
161  ::avro::decode(d, v.procExists);
162  break;
163 
164  case 2:
165  ::avro::decode(d, v.info);
166  break;
167 
168  default:
169  break;
170  }
171  }
172  }
173  else
174  {
175  ::avro::decode(d, v.procName);
176  ::avro::decode(d, v.procExists);
177  ::avro::decode(d, v.info);
178  }
179  }
180  };
181 } // end namespace avro
182 
183 #endif // __HAS_PROC_H__
std::map< std::string, std::string > options
Optional parameters.
Definition: has_proc.h:49
std::string procName
Name of the proc to check for existence.
Definition: has_proc.h:44
std::string procName
Value of procName.
Definition: has_proc.h:116
bool procExists
Indicates whether the proc exists or not.
Definition: has_proc.h:126
A set of parameters for GPUdb::hasProc.
Definition: has_proc.h:17
HasProcResponse()
Constructs a HasProcResponse object with default parameters.
Definition: has_proc.h:106
HasProcRequest()
Constructs a HasProcRequest object with default parameters.
Definition: has_proc.h:22
HasProcRequest(const std::string &procName_, const std::map< std::string, std::string > &options_)
Constructs a HasProcRequest object with the specified parameters.
Definition: has_proc.h:35
A set of results returned by GPUdb::hasProc.
Definition: has_proc.h:101
std::map< std::string, std::string > info
Additional information.
Definition: has_proc.h:131