GPUdb C++ API  Version 7.0.19.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
filter_by_string.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 __FILTER_BY_STRING_H__
7 #define __FILTER_BY_STRING_H__
8 
9 namespace gpudb
10 {
11 
24  {
25 
31  tableName(std::string()),
32  viewName(std::string()),
33  expression(std::string()),
34  mode(std::string()),
35  columnNames(std::vector<std::string>()),
36  options(std::map<std::string, std::string>())
37  {
38  }
39 
103  FilterByStringRequest(const std::string& tableName_, const std::string& viewName_, const std::string& expression_, const std::string& mode_, const std::vector<std::string>& columnNames_, const std::map<std::string, std::string>& options_):
104  tableName( tableName_ ),
105  viewName( viewName_ ),
106  expression( expression_ ),
107  mode( mode_ ),
108  columnNames( columnNames_ ),
109  options( options_ )
110  {
111  }
112 
113  std::string tableName;
114  std::string viewName;
115  std::string expression;
116  std::string mode;
117  std::vector<std::string> columnNames;
118  std::map<std::string, std::string> options;
119  };
120 }
121 
122 namespace avro
123 {
124  template<> struct codec_traits<gpudb::FilterByStringRequest>
125  {
126  static void encode(Encoder& e, const gpudb::FilterByStringRequest& v)
127  {
128  ::avro::encode(e, v.tableName);
129  ::avro::encode(e, v.viewName);
130  ::avro::encode(e, v.expression);
131  ::avro::encode(e, v.mode);
132  ::avro::encode(e, v.columnNames);
133  ::avro::encode(e, v.options);
134  }
135 
136  static void decode(Decoder& d, gpudb::FilterByStringRequest& v)
137  {
138  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
139  {
140  const std::vector<size_t> fo = rd->fieldOrder();
141 
142  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
143  {
144  switch (*it)
145  {
146  case 0:
147  ::avro::decode(d, v.tableName);
148  break;
149 
150  case 1:
151  ::avro::decode(d, v.viewName);
152  break;
153 
154  case 2:
155  ::avro::decode(d, v.expression);
156  break;
157 
158  case 3:
159  ::avro::decode(d, v.mode);
160  break;
161 
162  case 4:
163  ::avro::decode(d, v.columnNames);
164  break;
165 
166  case 5:
167  ::avro::decode(d, v.options);
168  break;
169 
170  default:
171  break;
172  }
173  }
174  }
175  else
176  {
177  ::avro::decode(d, v.tableName);
178  ::avro::decode(d, v.viewName);
179  ::avro::decode(d, v.expression);
180  ::avro::decode(d, v.mode);
181  ::avro::decode(d, v.columnNames);
182  ::avro::decode(d, v.options);
183  }
184  }
185  };
186 }
187 
188 namespace gpudb
189 {
190 
203  {
204 
210  count(int64_t()),
211  info(std::map<std::string, std::string>())
212  {
213  }
214 
215  int64_t count;
216  std::map<std::string, std::string> info;
217  };
218 }
219 
220 namespace avro
221 {
222  template<> struct codec_traits<gpudb::FilterByStringResponse>
223  {
224  static void encode(Encoder& e, const gpudb::FilterByStringResponse& v)
225  {
226  ::avro::encode(e, v.count);
227  ::avro::encode(e, v.info);
228  }
229 
230  static void decode(Decoder& d, gpudb::FilterByStringResponse& v)
231  {
232  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
233  {
234  const std::vector<size_t> fo = rd->fieldOrder();
235 
236  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
237  {
238  switch (*it)
239  {
240  case 0:
241  ::avro::decode(d, v.count);
242  break;
243 
244  case 1:
245  ::avro::decode(d, v.info);
246  break;
247 
248  default:
249  break;
250  }
251  }
252  }
253  else
254  {
255  ::avro::decode(d, v.count);
256  ::avro::decode(d, v.info);
257  }
258  }
259  };
260 }
261 
262 #endif
std::map< std::string, std::string > info
FilterByStringRequest(const std::string &tableName_, const std::string &viewName_, const std::string &expression_, const std::string &mode_, const std::vector< std::string > &columnNames_, const std::map< std::string, std::string > &options_)
Constructs a FilterByStringRequest object with the specified parameters.
FilterByStringResponse()
Constructs a FilterByStringResponse object with default parameter values.
A set of input parameters for const.
FilterByStringRequest()
Constructs a FilterByStringRequest object with default parameter values.
std::vector< std::string > columnNames
std::map< std::string, std::string > options
A set of output parameters for const.