GPUdb C++ API  Version 6.0.1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends
create_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 __CREATE_TABLE_H__
7 #define __CREATE_TABLE_H__
8 
9 namespace gpudb
10 {
11 
29  {
30 
36  tableName(std::string()),
37  typeId(std::string()),
38  options(std::map<std::string, std::string>())
39  {
40  }
41 
132  CreateTableRequest(const std::string& tableName_, const std::string& typeId_, const std::map<std::string, std::string>& options_):
133  tableName( tableName_ ),
134  typeId( typeId_ ),
135  options( options_ )
136  {
137  }
138 
139  std::string tableName;
140  std::string typeId;
141  std::map<std::string, std::string> options;
142  };
143 }
144 
145 namespace avro
146 {
147  template<> struct codec_traits<gpudb::CreateTableRequest>
148  {
149  static void encode(Encoder& e, const gpudb::CreateTableRequest& v)
150  {
151  ::avro::encode(e, v.tableName);
152  ::avro::encode(e, v.typeId);
153  ::avro::encode(e, v.options);
154  }
155 
156  static void decode(Decoder& d, gpudb::CreateTableRequest& v)
157  {
158  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
159  {
160  const std::vector<size_t> fo = rd->fieldOrder();
161 
162  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
163  {
164  switch (*it)
165  {
166  case 0:
167  ::avro::decode(d, v.tableName);
168  break;
169 
170  case 1:
171  ::avro::decode(d, v.typeId);
172  break;
173 
174  case 2:
175  ::avro::decode(d, v.options);
176  break;
177 
178  default:
179  break;
180  }
181  }
182  }
183  else
184  {
185  ::avro::decode(d, v.tableName);
186  ::avro::decode(d, v.typeId);
187  ::avro::decode(d, v.options);
188  }
189  }
190  };
191 }
192 
193 namespace gpudb
194 {
195 
213  {
214 
220  tableName(std::string()),
221  typeId(std::string()),
222  isCollection(bool())
223  {
224  }
225 
226  std::string tableName;
227  std::string typeId;
229  };
230 }
231 
232 namespace avro
233 {
234  template<> struct codec_traits<gpudb::CreateTableResponse>
235  {
236  static void encode(Encoder& e, const gpudb::CreateTableResponse& v)
237  {
238  ::avro::encode(e, v.tableName);
239  ::avro::encode(e, v.typeId);
240  ::avro::encode(e, v.isCollection);
241  }
242 
243  static void decode(Decoder& d, gpudb::CreateTableResponse& v)
244  {
245  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
246  {
247  const std::vector<size_t> fo = rd->fieldOrder();
248 
249  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
250  {
251  switch (*it)
252  {
253  case 0:
254  ::avro::decode(d, v.tableName);
255  break;
256 
257  case 1:
258  ::avro::decode(d, v.typeId);
259  break;
260 
261  case 2:
262  ::avro::decode(d, v.isCollection);
263  break;
264 
265  default:
266  break;
267  }
268  }
269  }
270  else
271  {
272  ::avro::decode(d, v.tableName);
273  ::avro::decode(d, v.typeId);
274  ::avro::decode(d, v.isCollection);
275  }
276  }
277  };
278 }
279 
280 #endif
CreateTableRequest()
Constructs a CreateTableRequest object with default parameter values.
Definition: create_table.h:35
A set of input parameters for const.
Definition: create_table.h:28
CreateTableRequest(const std::string &tableName_, const std::string &typeId_, const std::map< std::string, std::string > &options_)
Constructs a CreateTableRequest object with the specified parameters.
Definition: create_table.h:132
CreateTableResponse()
Constructs a CreateTableResponse object with default parameter values.
Definition: create_table.h:219
A set of output parameters for const.
Definition: create_table.h:212
std::map< std::string, std::string > options
Definition: create_table.h:141