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