GPUdb C++ API  Version 7.1.10.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
create_trigger_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 __CREATE_TRIGGER_BY_RANGE_H__
7 #define __CREATE_TRIGGER_BY_RANGE_H__
8 
9 namespace gpudb
10 {
11 
37  {
38 
44  requestId(std::string()),
45  tableNames(std::vector<std::string>()),
46  columnName(std::string()),
47  min(double()),
48  max(double()),
49  options(std::map<std::string, std::string>())
50  {
51  }
52 
72  CreateTriggerByRangeRequest(const std::string& requestId_, const std::vector<std::string>& tableNames_, const std::string& columnName_, const double min_, const double max_, const std::map<std::string, std::string>& options_):
73  requestId( requestId_ ),
74  tableNames( tableNames_ ),
75  columnName( columnName_ ),
76  min( min_ ),
77  max( max_ ),
78  options( options_ )
79  {
80  }
81 
82  std::string requestId;
83  std::vector<std::string> tableNames;
84  std::string columnName;
85  double min;
86  double max;
87  std::map<std::string, std::string> options;
88  };
89 }
90 
91 namespace avro
92 {
93  template<> struct codec_traits<gpudb::CreateTriggerByRangeRequest>
94  {
95  static void encode(Encoder& e, const gpudb::CreateTriggerByRangeRequest& v)
96  {
97  ::avro::encode(e, v.requestId);
98  ::avro::encode(e, v.tableNames);
99  ::avro::encode(e, v.columnName);
100  ::avro::encode(e, v.min);
101  ::avro::encode(e, v.max);
102  ::avro::encode(e, v.options);
103  }
104 
105  static void decode(Decoder& d, gpudb::CreateTriggerByRangeRequest& 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.requestId);
117  break;
118 
119  case 1:
120  ::avro::decode(d, v.tableNames);
121  break;
122 
123  case 2:
124  ::avro::decode(d, v.columnName);
125  break;
126 
127  case 3:
128  ::avro::decode(d, v.min);
129  break;
130 
131  case 4:
132  ::avro::decode(d, v.max);
133  break;
134 
135  case 5:
136  ::avro::decode(d, v.options);
137  break;
138 
139  default:
140  break;
141  }
142  }
143  }
144  else
145  {
146  ::avro::decode(d, v.requestId);
147  ::avro::decode(d, v.tableNames);
148  ::avro::decode(d, v.columnName);
149  ::avro::decode(d, v.min);
150  ::avro::decode(d, v.max);
151  ::avro::decode(d, v.options);
152  }
153  }
154  };
155 }
156 
157 namespace gpudb
158 {
159 
185  {
186 
192  triggerId(std::string()),
193  info(std::map<std::string, std::string>())
194  {
195  }
196 
197  std::string triggerId;
198  std::map<std::string, std::string> info;
199  };
200 }
201 
202 namespace avro
203 {
204  template<> struct codec_traits<gpudb::CreateTriggerByRangeResponse>
205  {
206  static void encode(Encoder& e, const gpudb::CreateTriggerByRangeResponse& v)
207  {
208  ::avro::encode(e, v.triggerId);
209  ::avro::encode(e, v.info);
210  }
211 
212  static void decode(Decoder& d, gpudb::CreateTriggerByRangeResponse& v)
213  {
214  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
215  {
216  const std::vector<size_t> fo = rd->fieldOrder();
217 
218  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
219  {
220  switch (*it)
221  {
222  case 0:
223  ::avro::decode(d, v.triggerId);
224  break;
225 
226  case 1:
227  ::avro::decode(d, v.info);
228  break;
229 
230  default:
231  break;
232  }
233  }
234  }
235  else
236  {
237  ::avro::decode(d, v.triggerId);
238  ::avro::decode(d, v.info);
239  }
240  }
241  };
242 }
243 
244 #endif
A set of input parameters for const.
std::map< std::string, std::string > info
CreateTriggerByRangeRequest(const std::string &requestId_, const std::vector< std::string > &tableNames_, const std::string &columnName_, const double min_, const double max_, const std::map< std::string, std::string > &options_)
Constructs a CreateTriggerByRangeRequest object with the specified parameters.
CreateTriggerByRangeRequest()
Constructs a CreateTriggerByRangeRequest object with default parameter values.
CreateTriggerByRangeResponse()
Constructs a CreateTriggerByRangeResponse object with default parameter values.
std::map< std::string, std::string > options
A set of output parameters for const.