GPUdb C++ API  Version 6.2.0.3
filter.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_H__
7 #define __FILTER_H__
8 
9 namespace gpudb
10 {
11 
28  {
29 
34  tableName(std::string()),
35  viewName(std::string()),
36  expression(std::string()),
37  options(std::map<std::string, std::string>())
38  {
39  }
40 
78  FilterRequest(const std::string& tableName_, const std::string& viewName_, const std::string& expression_, const std::map<std::string, std::string>& options_):
79  tableName( tableName_ ),
80  viewName( viewName_ ),
81  expression( expression_ ),
82  options( options_ )
83  {
84  }
85 
86  std::string tableName;
87  std::string viewName;
88  std::string expression;
89  std::map<std::string, std::string> options;
90  };
91 }
92 
93 namespace avro
94 {
95  template<> struct codec_traits<gpudb::FilterRequest>
96  {
97  static void encode(Encoder& e, const gpudb::FilterRequest& v)
98  {
99  ::avro::encode(e, v.tableName);
100  ::avro::encode(e, v.viewName);
101  ::avro::encode(e, v.expression);
102  ::avro::encode(e, v.options);
103  }
104 
105  static void decode(Decoder& d, gpudb::FilterRequest& v)
106  {
107  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
108  {
109  const std::vector<size_t> fo = rd->fieldOrder();
110 
111  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
112  {
113  switch (*it)
114  {
115  case 0:
116  ::avro::decode(d, v.tableName);
117  break;
118 
119  case 1:
120  ::avro::decode(d, v.viewName);
121  break;
122 
123  case 2:
124  ::avro::decode(d, v.expression);
125  break;
126 
127  case 3:
128  ::avro::decode(d, v.options);
129  break;
130 
131  default:
132  break;
133  }
134  }
135  }
136  else
137  {
138  ::avro::decode(d, v.tableName);
139  ::avro::decode(d, v.viewName);
140  ::avro::decode(d, v.expression);
141  ::avro::decode(d, v.options);
142  }
143  }
144  };
145 }
146 
147 namespace gpudb
148 {
149 
166  {
167 
172  count(int64_t())
173  {
174  }
175 
176  int64_t count;
177  };
178 }
179 
180 namespace avro
181 {
182  template<> struct codec_traits<gpudb::FilterResponse>
183  {
184  static void encode(Encoder& e, const gpudb::FilterResponse& v)
185  {
186  ::avro::encode(e, v.count);
187  }
188 
189  static void decode(Decoder& d, gpudb::FilterResponse& v)
190  {
191  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
192  {
193  const std::vector<size_t> fo = rd->fieldOrder();
194 
195  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
196  {
197  switch (*it)
198  {
199  case 0:
200  ::avro::decode(d, v.count);
201  break;
202 
203  default:
204  break;
205  }
206  }
207  }
208  else
209  {
210  ::avro::decode(d, v.count);
211  }
212  }
213  };
214 }
215 
216 #endif
std::map< std::string, std::string > options
Definition: filter.h:89
FilterRequest()
Constructs a FilterRequest object with default parameter values.
Definition: filter.h:33
FilterResponse()
Constructs a FilterResponse object with default parameter values.
Definition: filter.h:171
A set of input parameters for filter(const FilterRequest&) const.
Definition: filter.h:27
std::string viewName
Definition: filter.h:87
std::string tableName
Definition: filter.h:86
A set of output parameters for filter(const FilterRequest&) const.
Definition: filter.h:165
std::string expression
Definition: filter.h:88
FilterRequest(const std::string &tableName_, const std::string &viewName_, const std::string &expression_, const std::map< std::string, std::string > &options_)
Constructs a FilterRequest object with the specified parameters.
Definition: filter.h:78