GPUdb C++ API  Version 5.2.0.0
alter_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 __ALTER_TABLE_H__
7 #define __ALTER_TABLE_H__
8 
9 namespace gpudb
10 {
11 
40  {
41 
47  tableName(std::string()),
48  action(std::string()),
49  value(std::string()),
50  options(std::map<std::string, std::string>())
51  {
52  }
53 
72  AlterTableRequest(const std::string& tableName, const std::string& action, const std::string& value, const std::map<std::string, std::string>& options):
73  tableName(tableName),
74  action(action),
75  value(value),
76  options(options)
77  {
78  }
79 
80  std::string tableName;
81  std::string action;
82  std::string value;
83  std::map<std::string, std::string> options;
84  };
85 }
86 
87 namespace avro
88 {
89  template<> struct codec_traits<gpudb::AlterTableRequest>
90  {
91  static void encode(Encoder& e, const gpudb::AlterTableRequest& v)
92  {
93  ::avro::encode(e, v.tableName);
94  ::avro::encode(e, v.action);
95  ::avro::encode(e, v.value);
96  ::avro::encode(e, v.options);
97  }
98 
99  static void decode(Decoder& d, gpudb::AlterTableRequest& v)
100  {
101  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
102  {
103  const std::vector<size_t> fo = rd->fieldOrder();
104 
105  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
106  {
107  switch (*it)
108  {
109  case 0:
110  ::avro::decode(d, v.tableName);
111  break;
112 
113  case 1:
114  ::avro::decode(d, v.action);
115  break;
116 
117  case 2:
118  ::avro::decode(d, v.value);
119  break;
120 
121  case 3:
122  ::avro::decode(d, v.options);
123  break;
124 
125  default:
126  break;
127  }
128  }
129  }
130  else
131  {
132  ::avro::decode(d, v.tableName);
133  ::avro::decode(d, v.action);
134  ::avro::decode(d, v.value);
135  ::avro::decode(d, v.options);
136  }
137  }
138  };
139 }
140 
141 namespace gpudb
142 {
143 
172  {
173 
179  tableName(std::string()),
180  action(std::string()),
181  value(std::string())
182  {
183  }
184 
185  std::string tableName;
186  std::string action;
187  std::string value;
188  };
189 }
190 
191 namespace avro
192 {
193  template<> struct codec_traits<gpudb::AlterTableResponse>
194  {
195  static void encode(Encoder& e, const gpudb::AlterTableResponse& v)
196  {
197  ::avro::encode(e, v.tableName);
198  ::avro::encode(e, v.action);
199  ::avro::encode(e, v.value);
200  }
201 
202  static void decode(Decoder& d, gpudb::AlterTableResponse& v)
203  {
204  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
205  {
206  const std::vector<size_t> fo = rd->fieldOrder();
207 
208  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
209  {
210  switch (*it)
211  {
212  case 0:
213  ::avro::decode(d, v.tableName);
214  break;
215 
216  case 1:
217  ::avro::decode(d, v.action);
218  break;
219 
220  case 2:
221  ::avro::decode(d, v.value);
222  break;
223 
224  default:
225  break;
226  }
227  }
228  }
229  else
230  {
231  ::avro::decode(d, v.tableName);
232  ::avro::decode(d, v.action);
233  ::avro::decode(d, v.value);
234  }
235  }
236  };
237 }
238 
239 #endif
A set of output parameters for alterTable(const AlterTableRequest&) const.
Definition: alter_table.h:171
AlterTableResponse()
Constructs an AlterTableResponse object with default parameter values.
Definition: alter_table.h:178
std::map< std::string, std::string > options
Definition: alter_table.h:83
AlterTableRequest(const std::string &tableName, const std::string &action, const std::string &value, const std::map< std::string, std::string > &options)
Constructs an AlterTableRequest object with the specified parameters.
Definition: alter_table.h:72
A set of input parameters for alterTable(const AlterTableRequest&) const.
Definition: alter_table.h:39
AlterTableRequest()
Constructs an AlterTableRequest object with default parameter values.
Definition: alter_table.h:46