GPUdb C++ API  Version 5.2.0.0
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 
60  FilterRequest(const std::string& tableName, const std::string& viewName, const std::string& expression, const std::map<std::string, std::string>& options):
61  tableName(tableName),
62  viewName(viewName),
63  expression(expression),
64  options(options)
65  {
66  }
67 
68  std::string tableName;
69  std::string viewName;
70  std::string expression;
71  std::map<std::string, std::string> options;
72  };
73 }
74 
75 namespace avro
76 {
77  template<> struct codec_traits<gpudb::FilterRequest>
78  {
79  static void encode(Encoder& e, const gpudb::FilterRequest& v)
80  {
81  ::avro::encode(e, v.tableName);
82  ::avro::encode(e, v.viewName);
83  ::avro::encode(e, v.expression);
84  ::avro::encode(e, v.options);
85  }
86 
87  static void decode(Decoder& d, gpudb::FilterRequest& v)
88  {
89  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
90  {
91  const std::vector<size_t> fo = rd->fieldOrder();
92 
93  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
94  {
95  switch (*it)
96  {
97  case 0:
98  ::avro::decode(d, v.tableName);
99  break;
100 
101  case 1:
102  ::avro::decode(d, v.viewName);
103  break;
104 
105  case 2:
106  ::avro::decode(d, v.expression);
107  break;
108 
109  case 3:
110  ::avro::decode(d, v.options);
111  break;
112 
113  default:
114  break;
115  }
116  }
117  }
118  else
119  {
120  ::avro::decode(d, v.tableName);
121  ::avro::decode(d, v.viewName);
122  ::avro::decode(d, v.expression);
123  ::avro::decode(d, v.options);
124  }
125  }
126  };
127 }
128 
129 namespace gpudb
130 {
131 
147  {
148 
153  count(int64_t())
154  {
155  }
156 
157  int64_t count;
158  };
159 }
160 
161 namespace avro
162 {
163  template<> struct codec_traits<gpudb::FilterResponse>
164  {
165  static void encode(Encoder& e, const gpudb::FilterResponse& v)
166  {
167  ::avro::encode(e, v.count);
168  }
169 
170  static void decode(Decoder& d, gpudb::FilterResponse& v)
171  {
172  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
173  {
174  const std::vector<size_t> fo = rd->fieldOrder();
175 
176  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
177  {
178  switch (*it)
179  {
180  case 0:
181  ::avro::decode(d, v.count);
182  break;
183 
184  default:
185  break;
186  }
187  }
188  }
189  else
190  {
191  ::avro::decode(d, v.count);
192  }
193  }
194  };
195 }
196 
197 #endif
std::map< std::string, std::string > options
Definition: filter.h:71
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:152
A set of input parameters for filter(const FilterRequest&) const.
Definition: filter.h:26
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:60
std::string viewName
Definition: filter.h:69
std::string tableName
Definition: filter.h:68
A set of output parameters for filter(const FilterRequest&) const.
Definition: filter.h:146
std::string expression
Definition: filter.h:70