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