GPUdb C++ API  Version 6.1.0.0
delete_records.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 __DELETE_RECORDS_H__
7 #define __DELETE_RECORDS_H__
8 
9 namespace gpudb
10 {
11 
26  {
27 
33  tableName(std::string()),
34  expressions(std::vector<std::string>()),
35  options(std::map<std::string, std::string>())
36  {
37  }
38 
68  DeleteRecordsRequest(const std::string& tableName_, const std::vector<std::string>& expressions_, const std::map<std::string, std::string>& options_):
69  tableName( tableName_ ),
70  expressions( expressions_ ),
71  options( options_ )
72  {
73  }
74 
75  std::string tableName;
76  std::vector<std::string> expressions;
77  std::map<std::string, std::string> options;
78  };
79 }
80 
81 namespace avro
82 {
83  template<> struct codec_traits<gpudb::DeleteRecordsRequest>
84  {
85  static void encode(Encoder& e, const gpudb::DeleteRecordsRequest& v)
86  {
87  ::avro::encode(e, v.tableName);
88  ::avro::encode(e, v.expressions);
89  ::avro::encode(e, v.options);
90  }
91 
92  static void decode(Decoder& d, gpudb::DeleteRecordsRequest& v)
93  {
94  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
95  {
96  const std::vector<size_t> fo = rd->fieldOrder();
97 
98  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
99  {
100  switch (*it)
101  {
102  case 0:
103  ::avro::decode(d, v.tableName);
104  break;
105 
106  case 1:
107  ::avro::decode(d, v.expressions);
108  break;
109 
110  case 2:
111  ::avro::decode(d, v.options);
112  break;
113 
114  default:
115  break;
116  }
117  }
118  }
119  else
120  {
121  ::avro::decode(d, v.tableName);
122  ::avro::decode(d, v.expressions);
123  ::avro::decode(d, v.options);
124  }
125  }
126  };
127 }
128 
129 namespace gpudb
130 {
131 
146  {
147 
153  countDeleted(int64_t()),
154  countsDeleted(std::vector<int64_t>())
155  {
156  }
157 
158  int64_t countDeleted;
159  std::vector<int64_t> countsDeleted;
160  };
161 }
162 
163 namespace avro
164 {
165  template<> struct codec_traits<gpudb::DeleteRecordsResponse>
166  {
167  static void encode(Encoder& e, const gpudb::DeleteRecordsResponse& v)
168  {
169  ::avro::encode(e, v.countDeleted);
170  ::avro::encode(e, v.countsDeleted);
171  }
172 
173  static void decode(Decoder& d, gpudb::DeleteRecordsResponse& v)
174  {
175  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
176  {
177  const std::vector<size_t> fo = rd->fieldOrder();
178 
179  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
180  {
181  switch (*it)
182  {
183  case 0:
184  ::avro::decode(d, v.countDeleted);
185  break;
186 
187  case 1:
188  ::avro::decode(d, v.countsDeleted);
189  break;
190 
191  default:
192  break;
193  }
194  }
195  }
196  else
197  {
198  ::avro::decode(d, v.countDeleted);
199  ::avro::decode(d, v.countsDeleted);
200  }
201  }
202  };
203 }
204 
205 #endif
A set of output parameters for deleteRecords(const DeleteRecordsRequest&) const.
std::vector< int64_t > countsDeleted
std::map< std::string, std::string > options
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 input parameters for deleteRecords(const DeleteRecordsRequest&) const.
DeleteRecordsRequest()
Constructs a DeleteRecordsRequest object with default parameter values.
std::vector< std::string > expressions
DeleteRecordsResponse()
Constructs a DeleteRecordsResponse object with default parameter values.