GPUdb C++ API  Version 6.2.0.3
create_materialized_view.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_MATERIALIZED_VIEW_H__
7 #define __CREATE_MATERIALIZED_VIEW_H__
8 
9 namespace gpudb
10 {
11 
29  {
30 
36  tableName(std::string()),
37  options(std::map<std::string, std::string>())
38  {
39  }
40 
118  CreateMaterializedViewRequest(const std::string& tableName_, const std::map<std::string, std::string>& options_):
119  tableName( tableName_ ),
120  options( options_ )
121  {
122  }
123 
124  std::string tableName;
125  std::map<std::string, std::string> options;
126  };
127 }
128 
129 namespace avro
130 {
131  template<> struct codec_traits<gpudb::CreateMaterializedViewRequest>
132  {
133  static void encode(Encoder& e, const gpudb::CreateMaterializedViewRequest& v)
134  {
135  ::avro::encode(e, v.tableName);
136  ::avro::encode(e, v.options);
137  }
138 
139  static void decode(Decoder& d, gpudb::CreateMaterializedViewRequest& v)
140  {
141  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
142  {
143  const std::vector<size_t> fo = rd->fieldOrder();
144 
145  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
146  {
147  switch (*it)
148  {
149  case 0:
150  ::avro::decode(d, v.tableName);
151  break;
152 
153  case 1:
154  ::avro::decode(d, v.options);
155  break;
156 
157  default:
158  break;
159  }
160  }
161  }
162  else
163  {
164  ::avro::decode(d, v.tableName);
165  ::avro::decode(d, v.options);
166  }
167  }
168  };
169 }
170 
171 namespace gpudb
172 {
173 
191  {
192 
198  tableName(std::string()),
199  viewId(std::string())
200  {
201  }
202 
203  std::string tableName;
204  std::string viewId;
205  };
206 }
207 
208 namespace avro
209 {
210  template<> struct codec_traits<gpudb::CreateMaterializedViewResponse>
211  {
212  static void encode(Encoder& e, const gpudb::CreateMaterializedViewResponse& v)
213  {
214  ::avro::encode(e, v.tableName);
215  ::avro::encode(e, v.viewId);
216  }
217 
218  static void decode(Decoder& d, gpudb::CreateMaterializedViewResponse& v)
219  {
220  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
221  {
222  const std::vector<size_t> fo = rd->fieldOrder();
223 
224  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
225  {
226  switch (*it)
227  {
228  case 0:
229  ::avro::decode(d, v.tableName);
230  break;
231 
232  case 1:
233  ::avro::decode(d, v.viewId);
234  break;
235 
236  default:
237  break;
238  }
239  }
240  }
241  else
242  {
243  ::avro::decode(d, v.tableName);
244  ::avro::decode(d, v.viewId);
245  }
246  }
247  };
248 }
249 
250 #endif
CreateMaterializedViewRequest()
Constructs a CreateMaterializedViewRequest object with default parameter values.
A set of output parameters for createMaterializedView(const CreateMaterializedViewRequest&) const...
A set of input parameters for createMaterializedView(const CreateMaterializedViewRequest&) const...
CreateMaterializedViewResponse()
Constructs a CreateMaterializedViewResponse object with default parameter values. ...
CreateMaterializedViewRequest(const std::string &tableName_, const std::map< std::string, std::string > &options_)
Constructs a CreateMaterializedViewRequest object with the specified parameters.
std::map< std::string, std::string > options