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