GPUdb C++ API  Version 7.2.2.4
delete_records.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 __DELETE_RECORDS_H__
7 #define __DELETE_RECORDS_H__
8 
9 namespace gpudb
10 {
28  {
33  tableName(std::string()),
34  expressions(std::vector<std::string>()),
35  options(std::map<std::string, std::string>())
36  {
37  }
38 
103  DeleteRecordsRequest(const std::string& tableName_, const std::vector<std::string>& expressions_, const std::map<std::string, std::string>& options_):
104  tableName( tableName_ ),
105  expressions( expressions_ ),
106  options( options_ )
107  {
108  }
109 
117  std::string tableName;
118 
127  std::vector<std::string> expressions;
128 
164  std::map<std::string, std::string> options;
165  };
166 } // end namespace gpudb
167 
168 namespace avro
169 {
170  template<> struct codec_traits<gpudb::DeleteRecordsRequest>
171  {
172  static void encode(Encoder& e, const gpudb::DeleteRecordsRequest& v)
173  {
174  ::avro::encode(e, v.tableName);
175  ::avro::encode(e, v.expressions);
176  ::avro::encode(e, v.options);
177  }
178 
179  static void decode(Decoder& d, gpudb::DeleteRecordsRequest& v)
180  {
181  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
182  {
183  const std::vector<size_t> fo = rd->fieldOrder();
184 
185  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
186  {
187  switch (*it)
188  {
189  case 0:
190  ::avro::decode(d, v.tableName);
191  break;
192 
193  case 1:
194  ::avro::decode(d, v.expressions);
195  break;
196 
197  case 2:
198  ::avro::decode(d, v.options);
199  break;
200 
201  default:
202  break;
203  }
204  }
205  }
206  else
207  {
208  ::avro::decode(d, v.tableName);
209  ::avro::decode(d, v.expressions);
210  ::avro::decode(d, v.options);
211  }
212  }
213  };
214 } // end namespace avro
215 
216 namespace gpudb
217 {
224  {
229  countDeleted(int64_t()),
230  countsDeleted(std::vector<int64_t>()),
231  info(std::map<std::string, std::string>())
232  {
233  }
234 
238  int64_t countDeleted;
239 
243  std::vector<int64_t> countsDeleted;
244 
248  std::map<std::string, std::string> info;
249  };
250 } // end namespace gpudb
251 
252 namespace avro
253 {
254  template<> struct codec_traits<gpudb::DeleteRecordsResponse>
255  {
256  static void encode(Encoder& e, const gpudb::DeleteRecordsResponse& v)
257  {
258  ::avro::encode(e, v.countDeleted);
259  ::avro::encode(e, v.countsDeleted);
260  ::avro::encode(e, v.info);
261  }
262 
263  static void decode(Decoder& d, gpudb::DeleteRecordsResponse& v)
264  {
265  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
266  {
267  const std::vector<size_t> fo = rd->fieldOrder();
268 
269  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
270  {
271  switch (*it)
272  {
273  case 0:
274  ::avro::decode(d, v.countDeleted);
275  break;
276 
277  case 1:
278  ::avro::decode(d, v.countsDeleted);
279  break;
280 
281  case 2:
282  ::avro::decode(d, v.info);
283  break;
284 
285  default:
286  break;
287  }
288  }
289  }
290  else
291  {
292  ::avro::decode(d, v.countDeleted);
293  ::avro::decode(d, v.countsDeleted);
294  ::avro::decode(d, v.info);
295  }
296  }
297  };
298 } // end namespace avro
299 
300 #endif // __DELETE_RECORDS_H__
A set of results returned by GPUdb::deleteRecords.
std::map< std::string, std::string > info
Additional information.
std::vector< int64_t > countsDeleted
Total number of records deleted per expression.
int64_t countDeleted
Total number of records deleted across all expressions.
std::map< std::string, std::string > options
Optional parameters.
DeleteRecordsRequest(const std::string &tableName_, const std::vector< std::string > &expressions_, const std::map< std::string, std::string > &options_)
Constructs a DeleteRecordsRequest object with the specified parameters.
A set of parameters for GPUdb::deleteRecords.
DeleteRecordsRequest()
Constructs a DeleteRecordsRequest object with default parameters.
std::string tableName
Name of the table from which to delete records, in [ schema_name.
std::vector< std::string > expressions
A list of the actual predicates, one for each select; format should follow the guidelines provided he...
DeleteRecordsResponse()
Constructs a DeleteRecordsResponse object with default parameters.