GPUdb C++ API  Version 5.2.0.0
has_table.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 __HAS_TABLE_H__
7 #define __HAS_TABLE_H__
8 
9 namespace gpudb
10 {
11 
19  {
20 
25  tableName(std::string()),
26  options(std::map<std::string, std::string>())
27  {
28  }
29 
38  HasTableRequest(const std::string& tableName, const std::map<std::string, std::string>& options):
39  tableName(tableName),
40  options(options)
41  {
42  }
43 
44  std::string tableName;
45  std::map<std::string, std::string> options;
46  };
47 }
48 
49 namespace avro
50 {
51  template<> struct codec_traits<gpudb::HasTableRequest>
52  {
53  static void encode(Encoder& e, const gpudb::HasTableRequest& v)
54  {
55  ::avro::encode(e, v.tableName);
56  ::avro::encode(e, v.options);
57  }
58 
59  static void decode(Decoder& d, gpudb::HasTableRequest& v)
60  {
61  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
62  {
63  const std::vector<size_t> fo = rd->fieldOrder();
64 
65  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
66  {
67  switch (*it)
68  {
69  case 0:
70  ::avro::decode(d, v.tableName);
71  break;
72 
73  case 1:
74  ::avro::decode(d, v.options);
75  break;
76 
77  default:
78  break;
79  }
80  }
81  }
82  else
83  {
84  ::avro::decode(d, v.tableName);
85  ::avro::decode(d, v.options);
86  }
87  }
88  };
89 }
90 
91 namespace gpudb
92 {
93 
101  {
102 
107  tableName(std::string()),
108  tableExists(bool())
109  {
110  }
111 
112  std::string tableName;
114  };
115 }
116 
117 namespace avro
118 {
119  template<> struct codec_traits<gpudb::HasTableResponse>
120  {
121  static void encode(Encoder& e, const gpudb::HasTableResponse& v)
122  {
123  ::avro::encode(e, v.tableName);
124  ::avro::encode(e, v.tableExists);
125  }
126 
127  static void decode(Decoder& d, gpudb::HasTableResponse& v)
128  {
129  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
130  {
131  const std::vector<size_t> fo = rd->fieldOrder();
132 
133  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
134  {
135  switch (*it)
136  {
137  case 0:
138  ::avro::decode(d, v.tableName);
139  break;
140 
141  case 1:
142  ::avro::decode(d, v.tableExists);
143  break;
144 
145  default:
146  break;
147  }
148  }
149  }
150  else
151  {
152  ::avro::decode(d, v.tableName);
153  ::avro::decode(d, v.tableExists);
154  }
155  }
156  };
157 }
158 
159 #endif
std::string tableName
Definition: has_table.h:112
A set of input parameters for hasTable(const HasTableRequest&) const.
Definition: has_table.h:18
std::map< std::string, std::string > options
Definition: has_table.h:45
HasTableRequest(const std::string &tableName, const std::map< std::string, std::string > &options)
Constructs a HasTableRequest object with the specified parameters.
Definition: has_table.h:38
std::string tableName
Definition: has_table.h:44
HasTableRequest()
Constructs a HasTableRequest object with default parameter values.
Definition: has_table.h:24
HasTableResponse()
Constructs a HasTableResponse object with default parameter values.
Definition: has_table.h:106
A set of output parameters for hasTable(const HasTableRequest&) const.
Definition: has_table.h:100