GPUdb C++ API  Version 5.2.0.0
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 
27  {
28 
34  tableName(std::string()),
35  typeId(std::string()),
36  options(std::map<std::string, std::string>())
37  {
38  }
39 
97  CreateTableRequest(const std::string& tableName, const std::string& typeId, const std::map<std::string, std::string>& options):
98  tableName(tableName),
99  typeId(typeId),
100  options(options)
101  {
102  }
103 
104  std::string tableName;
105  std::string typeId;
106  std::map<std::string, std::string> options;
107  };
108 }
109 
110 namespace avro
111 {
112  template<> struct codec_traits<gpudb::CreateTableRequest>
113  {
114  static void encode(Encoder& e, const gpudb::CreateTableRequest& v)
115  {
116  ::avro::encode(e, v.tableName);
117  ::avro::encode(e, v.typeId);
118  ::avro::encode(e, v.options);
119  }
120 
121  static void decode(Decoder& d, gpudb::CreateTableRequest& v)
122  {
123  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
124  {
125  const std::vector<size_t> fo = rd->fieldOrder();
126 
127  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
128  {
129  switch (*it)
130  {
131  case 0:
132  ::avro::decode(d, v.tableName);
133  break;
134 
135  case 1:
136  ::avro::decode(d, v.typeId);
137  break;
138 
139  case 2:
140  ::avro::decode(d, v.options);
141  break;
142 
143  default:
144  break;
145  }
146  }
147  }
148  else
149  {
150  ::avro::decode(d, v.tableName);
151  ::avro::decode(d, v.typeId);
152  ::avro::decode(d, v.options);
153  }
154  }
155  };
156 }
157 
158 namespace gpudb
159 {
160 
176  {
177 
183  tableName(std::string()),
184  typeId(std::string()),
185  isCollection(bool())
186  {
187  }
188 
189  std::string tableName;
190  std::string typeId;
192  };
193 }
194 
195 namespace avro
196 {
197  template<> struct codec_traits<gpudb::CreateTableResponse>
198  {
199  static void encode(Encoder& e, const gpudb::CreateTableResponse& v)
200  {
201  ::avro::encode(e, v.tableName);
202  ::avro::encode(e, v.typeId);
203  ::avro::encode(e, v.isCollection);
204  }
205 
206  static void decode(Decoder& d, gpudb::CreateTableResponse& v)
207  {
208  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
209  {
210  const std::vector<size_t> fo = rd->fieldOrder();
211 
212  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
213  {
214  switch (*it)
215  {
216  case 0:
217  ::avro::decode(d, v.tableName);
218  break;
219 
220  case 1:
221  ::avro::decode(d, v.typeId);
222  break;
223 
224  case 2:
225  ::avro::decode(d, v.isCollection);
226  break;
227 
228  default:
229  break;
230  }
231  }
232  }
233  else
234  {
235  ::avro::decode(d, v.tableName);
236  ::avro::decode(d, v.typeId);
237  ::avro::decode(d, v.isCollection);
238  }
239  }
240  };
241 }
242 
243 #endif
CreateTableRequest()
Constructs a CreateTableRequest object with default parameter values.
Definition: create_table.h:33
A set of input parameters for createTable(const CreateTableRequest&) const.
Definition: create_table.h:26
CreateTableResponse()
Constructs a CreateTableResponse object with default parameter values.
Definition: create_table.h:182
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:97
A set of output parameters for createTable(const CreateTableRequest&) const.
Definition: create_table.h:175
std::map< std::string, std::string > options
Definition: create_table.h:106