GPUdb C++ API  Version 7.1.10.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
alter_table_columns.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 __ALTER_TABLE_COLUMNS_H__
7 #define __ALTER_TABLE_COLUMNS_H__
8 
9 namespace gpudb
10 {
11 
34  {
35 
41  tableName(std::string()),
42  columnAlterations(std::vector<std::map<std::string, std::string> >()),
43  options(std::map<std::string, std::string>())
44  {
45  }
46 
71  AlterTableColumnsRequest(const std::string& tableName_, const std::vector<std::map<std::string, std::string> >& columnAlterations_, const std::map<std::string, std::string>& options_):
72  tableName( tableName_ ),
73  columnAlterations( columnAlterations_ ),
74  options( options_ )
75  {
76  }
77 
78  std::string tableName;
79  std::vector<std::map<std::string, std::string> > columnAlterations;
80  std::map<std::string, std::string> options;
81  };
82 }
83 
84 namespace avro
85 {
86  template<> struct codec_traits<gpudb::AlterTableColumnsRequest>
87  {
88  static void encode(Encoder& e, const gpudb::AlterTableColumnsRequest& v)
89  {
90  ::avro::encode(e, v.tableName);
91  ::avro::encode(e, v.columnAlterations);
92  ::avro::encode(e, v.options);
93  }
94 
95  static void decode(Decoder& d, gpudb::AlterTableColumnsRequest& v)
96  {
97  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
98  {
99  const std::vector<size_t> fo = rd->fieldOrder();
100 
101  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
102  {
103  switch (*it)
104  {
105  case 0:
106  ::avro::decode(d, v.tableName);
107  break;
108 
109  case 1:
110  ::avro::decode(d, v.columnAlterations);
111  break;
112 
113  case 2:
114  ::avro::decode(d, v.options);
115  break;
116 
117  default:
118  break;
119  }
120  }
121  }
122  else
123  {
124  ::avro::decode(d, v.tableName);
125  ::avro::decode(d, v.columnAlterations);
126  ::avro::decode(d, v.options);
127  }
128  }
129  };
130 }
131 
132 namespace gpudb
133 {
134 
157  {
158 
164  tableName(std::string()),
165  typeId(std::string()),
166  typeDefinition(std::string()),
167  properties(std::map<std::string, std::vector<std::string> >()),
168  label(std::string()),
169  columnAlterations(std::vector<std::map<std::string, std::string> >()),
170  info(std::map<std::string, std::string>())
171  {
172  }
173 
174  std::string tableName;
175  std::string typeId;
176  std::string typeDefinition;
177  std::map<std::string, std::vector<std::string> > properties;
178  std::string label;
179  std::vector<std::map<std::string, std::string> > columnAlterations;
180  std::map<std::string, std::string> info;
181  };
182 }
183 
184 namespace avro
185 {
186  template<> struct codec_traits<gpudb::AlterTableColumnsResponse>
187  {
188  static void encode(Encoder& e, const gpudb::AlterTableColumnsResponse& v)
189  {
190  ::avro::encode(e, v.tableName);
191  ::avro::encode(e, v.typeId);
192  ::avro::encode(e, v.typeDefinition);
193  ::avro::encode(e, v.properties);
194  ::avro::encode(e, v.label);
195  ::avro::encode(e, v.columnAlterations);
196  ::avro::encode(e, v.info);
197  }
198 
199  static void decode(Decoder& d, gpudb::AlterTableColumnsResponse& v)
200  {
201  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
202  {
203  const std::vector<size_t> fo = rd->fieldOrder();
204 
205  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
206  {
207  switch (*it)
208  {
209  case 0:
210  ::avro::decode(d, v.tableName);
211  break;
212 
213  case 1:
214  ::avro::decode(d, v.typeId);
215  break;
216 
217  case 2:
218  ::avro::decode(d, v.typeDefinition);
219  break;
220 
221  case 3:
222  ::avro::decode(d, v.properties);
223  break;
224 
225  case 4:
226  ::avro::decode(d, v.label);
227  break;
228 
229  case 5:
230  ::avro::decode(d, v.columnAlterations);
231  break;
232 
233  case 6:
234  ::avro::decode(d, v.info);
235  break;
236 
237  default:
238  break;
239  }
240  }
241  }
242  else
243  {
244  ::avro::decode(d, v.tableName);
245  ::avro::decode(d, v.typeId);
246  ::avro::decode(d, v.typeDefinition);
247  ::avro::decode(d, v.properties);
248  ::avro::decode(d, v.label);
249  ::avro::decode(d, v.columnAlterations);
250  ::avro::decode(d, v.info);
251  }
252  }
253  };
254 }
255 
256 #endif
std::map< std::string, std::string > info
A set of input parameters for const.
std::vector< std::map< std::string, std::string > > columnAlterations
AlterTableColumnsRequest()
Constructs an AlterTableColumnsRequest object with default parameter values.
std::vector< std::map< std::string, std::string > > columnAlterations
A set of output parameters for const.
AlterTableColumnsResponse()
Constructs an AlterTableColumnsResponse object with default parameter values.
std::map< std::string, std::string > options
std::map< std::string, std::vector< std::string > > properties
AlterTableColumnsRequest(const std::string &tableName_, const std::vector< std::map< std::string, std::string > > &columnAlterations_, const std::map< std::string, std::string > &options_)
Constructs an AlterTableColumnsRequest object with the specified parameters.