GPUdb C++ API  Version 7.0.19.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
query_graph.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 __QUERY_GRAPH_H__
7 #define __QUERY_GRAPH_H__
8 
9 namespace gpudb
10 {
11 
45  {
46 
51  graphName(std::string()),
52  queries(std::vector<std::string>()),
53  restrictions(std::vector<std::string>()),
54  adjacencyTable(std::string()),
55  rings(int32_t()),
56  options(std::map<std::string, std::string>())
57  {
58  }
59 
205  QueryGraphRequest(const std::string& graphName_, const std::vector<std::string>& queries_, const std::vector<std::string>& restrictions_, const std::string& adjacencyTable_, const int32_t rings_, const std::map<std::string, std::string>& options_):
206  graphName( graphName_ ),
207  queries( queries_ ),
208  restrictions( restrictions_ ),
209  adjacencyTable( adjacencyTable_ ),
210  rings( rings_ ),
211  options( options_ )
212  {
213  }
214 
215  std::string graphName;
216  std::vector<std::string> queries;
217  std::vector<std::string> restrictions;
218  std::string adjacencyTable;
219  int32_t rings;
220  std::map<std::string, std::string> options;
221  };
222 }
223 
224 namespace avro
225 {
226  template<> struct codec_traits<gpudb::QueryGraphRequest>
227  {
228  static void encode(Encoder& e, const gpudb::QueryGraphRequest& v)
229  {
230  ::avro::encode(e, v.graphName);
231  ::avro::encode(e, v.queries);
232  ::avro::encode(e, v.restrictions);
233  ::avro::encode(e, v.adjacencyTable);
234  ::avro::encode(e, v.rings);
235  ::avro::encode(e, v.options);
236  }
237 
238  static void decode(Decoder& d, gpudb::QueryGraphRequest& v)
239  {
240  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
241  {
242  const std::vector<size_t> fo = rd->fieldOrder();
243 
244  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
245  {
246  switch (*it)
247  {
248  case 0:
249  ::avro::decode(d, v.graphName);
250  break;
251 
252  case 1:
253  ::avro::decode(d, v.queries);
254  break;
255 
256  case 2:
257  ::avro::decode(d, v.restrictions);
258  break;
259 
260  case 3:
261  ::avro::decode(d, v.adjacencyTable);
262  break;
263 
264  case 4:
265  ::avro::decode(d, v.rings);
266  break;
267 
268  case 5:
269  ::avro::decode(d, v.options);
270  break;
271 
272  default:
273  break;
274  }
275  }
276  }
277  else
278  {
279  ::avro::decode(d, v.graphName);
280  ::avro::decode(d, v.queries);
281  ::avro::decode(d, v.restrictions);
282  ::avro::decode(d, v.adjacencyTable);
283  ::avro::decode(d, v.rings);
284  ::avro::decode(d, v.options);
285  }
286  }
287  };
288 }
289 
290 namespace gpudb
291 {
292 
326  {
327 
333  result(bool()),
334  adjacencyListIntArray(std::vector<int64_t>()),
335  adjacencyListStringArray(std::vector<std::string>()),
336  adjacencyListWktArray(std::vector<std::string>()),
337  info(std::map<std::string, std::string>())
338  {
339  }
340 
341  bool result;
342  std::vector<int64_t> adjacencyListIntArray;
343  std::vector<std::string> adjacencyListStringArray;
344  std::vector<std::string> adjacencyListWktArray;
345  std::map<std::string, std::string> info;
346  };
347 }
348 
349 namespace avro
350 {
351  template<> struct codec_traits<gpudb::QueryGraphResponse>
352  {
353  static void encode(Encoder& e, const gpudb::QueryGraphResponse& v)
354  {
355  ::avro::encode(e, v.result);
356  ::avro::encode(e, v.adjacencyListIntArray);
357  ::avro::encode(e, v.adjacencyListStringArray);
358  ::avro::encode(e, v.adjacencyListWktArray);
359  ::avro::encode(e, v.info);
360  }
361 
362  static void decode(Decoder& d, gpudb::QueryGraphResponse& v)
363  {
364  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
365  {
366  const std::vector<size_t> fo = rd->fieldOrder();
367 
368  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
369  {
370  switch (*it)
371  {
372  case 0:
373  ::avro::decode(d, v.result);
374  break;
375 
376  case 1:
377  ::avro::decode(d, v.adjacencyListIntArray);
378  break;
379 
380  case 2:
381  ::avro::decode(d, v.adjacencyListStringArray);
382  break;
383 
384  case 3:
385  ::avro::decode(d, v.adjacencyListWktArray);
386  break;
387 
388  case 4:
389  ::avro::decode(d, v.info);
390  break;
391 
392  default:
393  break;
394  }
395  }
396  }
397  else
398  {
399  ::avro::decode(d, v.result);
400  ::avro::decode(d, v.adjacencyListIntArray);
401  ::avro::decode(d, v.adjacencyListStringArray);
402  ::avro::decode(d, v.adjacencyListWktArray);
403  ::avro::decode(d, v.info);
404  }
405  }
406  };
407 }
408 
409 #endif
QueryGraphResponse()
Constructs a QueryGraphResponse object with default parameter values.
Definition: query_graph.h:332
std::vector< std::string > restrictions
Definition: query_graph.h:217
std::vector< std::string > adjacencyListWktArray
Definition: query_graph.h:344
std::vector< std::string > queries
Definition: query_graph.h:216
std::vector< std::string > adjacencyListStringArray
Definition: query_graph.h:343
QueryGraphRequest()
Constructs a QueryGraphRequest object with default parameter values.
Definition: query_graph.h:50
std::string adjacencyTable
Definition: query_graph.h:218
std::map< std::string, std::string > info
Definition: query_graph.h:345
A set of output parameters for const.
Definition: query_graph.h:325
QueryGraphRequest(const std::string &graphName_, const std::vector< std::string > &queries_, const std::vector< std::string > &restrictions_, const std::string &adjacencyTable_, const int32_t rings_, const std::map< std::string, std::string > &options_)
Constructs a QueryGraphRequest object with the specified parameters.
Definition: query_graph.h:205
std::map< std::string, std::string > options
Definition: query_graph.h:220
A set of input parameters for const.
Definition: query_graph.h:44
std::vector< int64_t > adjacencyListIntArray
Definition: query_graph.h:342