GPUdb C++ API  Version 7.0.19.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
filter_by_value.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 __FILTER_BY_VALUE_H__
7 #define __FILTER_BY_VALUE_H__
8 
9 namespace gpudb
10 {
11 
28  {
29 
35  tableName(std::string()),
36  viewName(std::string()),
37  isString(bool()),
38  value(double()),
39  valueStr(std::string()),
40  columnName(std::string()),
41  options(std::map<std::string, std::string>())
42  {
43  }
44 
74  FilterByValueRequest(const std::string& tableName_, const std::string& viewName_, const bool isString_, const double value_, const std::string& valueStr_, const std::string& columnName_, const std::map<std::string, std::string>& options_):
75  tableName( tableName_ ),
76  viewName( viewName_ ),
77  isString( isString_ ),
78  value( value_ ),
79  valueStr( valueStr_ ),
80  columnName( columnName_ ),
81  options( options_ )
82  {
83  }
84 
85  std::string tableName;
86  std::string viewName;
87  bool isString;
88  double value;
89  std::string valueStr;
90  std::string columnName;
91  std::map<std::string, std::string> options;
92  };
93 }
94 
95 namespace avro
96 {
97  template<> struct codec_traits<gpudb::FilterByValueRequest>
98  {
99  static void encode(Encoder& e, const gpudb::FilterByValueRequest& v)
100  {
101  ::avro::encode(e, v.tableName);
102  ::avro::encode(e, v.viewName);
103  ::avro::encode(e, v.isString);
104  ::avro::encode(e, v.value);
105  ::avro::encode(e, v.valueStr);
106  ::avro::encode(e, v.columnName);
107  ::avro::encode(e, v.options);
108  }
109 
110  static void decode(Decoder& d, gpudb::FilterByValueRequest& v)
111  {
112  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
113  {
114  const std::vector<size_t> fo = rd->fieldOrder();
115 
116  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
117  {
118  switch (*it)
119  {
120  case 0:
121  ::avro::decode(d, v.tableName);
122  break;
123 
124  case 1:
125  ::avro::decode(d, v.viewName);
126  break;
127 
128  case 2:
129  ::avro::decode(d, v.isString);
130  break;
131 
132  case 3:
133  ::avro::decode(d, v.value);
134  break;
135 
136  case 4:
137  ::avro::decode(d, v.valueStr);
138  break;
139 
140  case 5:
141  ::avro::decode(d, v.columnName);
142  break;
143 
144  case 6:
145  ::avro::decode(d, v.options);
146  break;
147 
148  default:
149  break;
150  }
151  }
152  }
153  else
154  {
155  ::avro::decode(d, v.tableName);
156  ::avro::decode(d, v.viewName);
157  ::avro::decode(d, v.isString);
158  ::avro::decode(d, v.value);
159  ::avro::decode(d, v.valueStr);
160  ::avro::decode(d, v.columnName);
161  ::avro::decode(d, v.options);
162  }
163  }
164  };
165 }
166 
167 namespace gpudb
168 {
169 
186  {
187 
193  count(int64_t()),
194  info(std::map<std::string, std::string>())
195  {
196  }
197 
198  int64_t count;
199  std::map<std::string, std::string> info;
200  };
201 }
202 
203 namespace avro
204 {
205  template<> struct codec_traits<gpudb::FilterByValueResponse>
206  {
207  static void encode(Encoder& e, const gpudb::FilterByValueResponse& v)
208  {
209  ::avro::encode(e, v.count);
210  ::avro::encode(e, v.info);
211  }
212 
213  static void decode(Decoder& d, gpudb::FilterByValueResponse& v)
214  {
215  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
216  {
217  const std::vector<size_t> fo = rd->fieldOrder();
218 
219  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
220  {
221  switch (*it)
222  {
223  case 0:
224  ::avro::decode(d, v.count);
225  break;
226 
227  case 1:
228  ::avro::decode(d, v.info);
229  break;
230 
231  default:
232  break;
233  }
234  }
235  }
236  else
237  {
238  ::avro::decode(d, v.count);
239  ::avro::decode(d, v.info);
240  }
241  }
242  };
243 }
244 
245 #endif
std::map< std::string, std::string > info
FilterByValueRequest(const std::string &tableName_, const std::string &viewName_, const bool isString_, const double value_, const std::string &valueStr_, const std::string &columnName_, const std::map< std::string, std::string > &options_)
Constructs a FilterByValueRequest object with the specified parameters.
std::map< std::string, std::string > options
A set of output parameters for const.
A set of input parameters for const.
FilterByValueRequest()
Constructs a FilterByValueRequest object with default parameter values.
FilterByValueResponse()
Constructs a FilterByValueResponse object with default parameter values.