GPUdb C++ API  Version 7.2.2.4
clear_table.h
Go to the documentation of this file.
1 /*
2  * This file was autogenerated by the Kinetica schema processor.
3  *
4  * DO NOT EDIT DIRECTLY.
5  */
6 #ifndef __CLEAR_TABLE_H__
7 #define __CLEAR_TABLE_H__
8 
9 namespace gpudb
10 {
21  {
26  tableName(std::string()),
27  authorization(std::string()),
28  options(std::map<std::string, std::string>())
29  {
30  }
31 
72  ClearTableRequest(const std::string& tableName_, const std::string& authorization_, const std::map<std::string, std::string>& options_):
73  tableName( tableName_ ),
74  authorization( authorization_ ),
75  options( options_ )
76  {
77  }
78 
88  std::string tableName;
89 
94  std::string authorization;
95 
115  std::map<std::string, std::string> options;
116  };
117 } // end namespace gpudb
118 
119 namespace avro
120 {
121  template<> struct codec_traits<gpudb::ClearTableRequest>
122  {
123  static void encode(Encoder& e, const gpudb::ClearTableRequest& v)
124  {
125  ::avro::encode(e, v.tableName);
126  ::avro::encode(e, v.authorization);
127  ::avro::encode(e, v.options);
128  }
129 
130  static void decode(Decoder& d, gpudb::ClearTableRequest& v)
131  {
132  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
133  {
134  const std::vector<size_t> fo = rd->fieldOrder();
135 
136  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
137  {
138  switch (*it)
139  {
140  case 0:
141  ::avro::decode(d, v.tableName);
142  break;
143 
144  case 1:
145  ::avro::decode(d, v.authorization);
146  break;
147 
148  case 2:
149  ::avro::decode(d, v.options);
150  break;
151 
152  default:
153  break;
154  }
155  }
156  }
157  else
158  {
159  ::avro::decode(d, v.tableName);
160  ::avro::decode(d, v.authorization);
161  ::avro::decode(d, v.options);
162  }
163  }
164  };
165 } // end namespace avro
166 
167 namespace gpudb
168 {
174  {
179  tableName(std::string()),
180  info(std::map<std::string, std::string>())
181  {
182  }
183 
188  std::string tableName;
189 
193  std::map<std::string, std::string> info;
194  };
195 } // end namespace gpudb
196 
197 namespace avro
198 {
199  template<> struct codec_traits<gpudb::ClearTableResponse>
200  {
201  static void encode(Encoder& e, const gpudb::ClearTableResponse& v)
202  {
203  ::avro::encode(e, v.tableName);
204  ::avro::encode(e, v.info);
205  }
206 
207  static void decode(Decoder& d, gpudb::ClearTableResponse& v)
208  {
209  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
210  {
211  const std::vector<size_t> fo = rd->fieldOrder();
212 
213  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
214  {
215  switch (*it)
216  {
217  case 0:
218  ::avro::decode(d, v.tableName);
219  break;
220 
221  case 1:
222  ::avro::decode(d, v.info);
223  break;
224 
225  default:
226  break;
227  }
228  }
229  }
230  else
231  {
232  ::avro::decode(d, v.tableName);
233  ::avro::decode(d, v.info);
234  }
235  }
236  };
237 } // end namespace avro
238 
239 #endif // __CLEAR_TABLE_H__
std::map< std::string, std::string > info
Additional information.
Definition: clear_table.h:193
A set of parameters for GPUdb::clearTable.
Definition: clear_table.h:20
ClearTableRequest(const std::string &tableName_, const std::string &authorization_, const std::map< std::string, std::string > &options_)
Constructs a ClearTableRequest object with the specified parameters.
Definition: clear_table.h:72
A set of results returned by GPUdb::clearTable.
Definition: clear_table.h:173
ClearTableResponse()
Constructs a ClearTableResponse object with default parameters.
Definition: clear_table.h:178
std::string tableName
Name of the table to be cleared, in [ schema_name. ]table_name format, using standard name resolution...
Definition: clear_table.h:88
std::string authorization
No longer used.
Definition: clear_table.h:94
std::string tableName
Value of tableName for a given table, or 'ALL CLEARED' in case of clearing all tables.
Definition: clear_table.h:188
std::map< std::string, std::string > options
Optional parameters.
Definition: clear_table.h:115
ClearTableRequest()
Constructs a ClearTableRequest object with default parameters.
Definition: clear_table.h:25