GPUdb C++ API  Version 6.2.0.3
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 
83  DeleteRecordsRequest(const std::string& tableName_, const std::vector<std::string>& expressions_, const std::map<std::string, std::string>& options_):
84  tableName( tableName_ ),
85  expressions( expressions_ ),
86  options( options_ )
87  {
88  }
89 
90  std::string tableName;
91  std::vector<std::string> expressions;
92  std::map<std::string, std::string> options;
93  };
94 }
95 
96 namespace avro
97 {
98  template<> struct codec_traits<gpudb::DeleteRecordsRequest>
99  {
100  static void encode(Encoder& e, const gpudb::DeleteRecordsRequest& v)
101  {
102  ::avro::encode(e, v.tableName);
103  ::avro::encode(e, v.expressions);
104  ::avro::encode(e, v.options);
105  }
106 
107  static void decode(Decoder& d, gpudb::DeleteRecordsRequest& v)
108  {
109  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
110  {
111  const std::vector<size_t> fo = rd->fieldOrder();
112 
113  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
114  {
115  switch (*it)
116  {
117  case 0:
118  ::avro::decode(d, v.tableName);
119  break;
120 
121  case 1:
122  ::avro::decode(d, v.expressions);
123  break;
124 
125  case 2:
126  ::avro::decode(d, v.options);
127  break;
128 
129  default:
130  break;
131  }
132  }
133  }
134  else
135  {
136  ::avro::decode(d, v.tableName);
137  ::avro::decode(d, v.expressions);
138  ::avro::decode(d, v.options);
139  }
140  }
141  };
142 }
143 
144 namespace gpudb
145 {
146 
161  {
162 
168  countDeleted(int64_t()),
169  countsDeleted(std::vector<int64_t>())
170  {
171  }
172 
173  int64_t countDeleted;
174  std::vector<int64_t> countsDeleted;
175  };
176 }
177 
178 namespace avro
179 {
180  template<> struct codec_traits<gpudb::DeleteRecordsResponse>
181  {
182  static void encode(Encoder& e, const gpudb::DeleteRecordsResponse& v)
183  {
184  ::avro::encode(e, v.countDeleted);
185  ::avro::encode(e, v.countsDeleted);
186  }
187 
188  static void decode(Decoder& d, gpudb::DeleteRecordsResponse& v)
189  {
190  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
191  {
192  const std::vector<size_t> fo = rd->fieldOrder();
193 
194  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
195  {
196  switch (*it)
197  {
198  case 0:
199  ::avro::decode(d, v.countDeleted);
200  break;
201 
202  case 1:
203  ::avro::decode(d, v.countsDeleted);
204  break;
205 
206  default:
207  break;
208  }
209  }
210  }
211  else
212  {
213  ::avro::decode(d, v.countDeleted);
214  ::avro::decode(d, v.countsDeleted);
215  }
216  }
217  };
218 }
219 
220 #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.