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