GPUdb C++ API  Version 7.2.2.4
create_trigger_by_range.h
Go to the documentation of this file.
1 /*
2  * This file was autogenerated by the Kinetica 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 {
34  {
40  requestId(std::string()),
41  tableNames(std::vector<std::string>()),
42  columnName(std::string()),
43  min(double()),
44  max(double()),
45  options(std::map<std::string, std::string>())
46  {
47  }
48 
68  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_):
69  requestId( requestId_ ),
70  tableNames( tableNames_ ),
71  columnName( columnName_ ),
72  min( min_ ),
73  max( max_ ),
74  options( options_ )
75  {
76  }
77 
82  std::string requestId;
83 
90  std::vector<std::string> tableNames;
91 
95  std::string columnName;
96 
100  double min;
101 
105  double max;
106 
110  std::map<std::string, std::string> options;
111  };
112 } // end namespace gpudb
113 
114 namespace avro
115 {
116  template<> struct codec_traits<gpudb::CreateTriggerByRangeRequest>
117  {
118  static void encode(Encoder& e, const gpudb::CreateTriggerByRangeRequest& v)
119  {
120  ::avro::encode(e, v.requestId);
121  ::avro::encode(e, v.tableNames);
122  ::avro::encode(e, v.columnName);
123  ::avro::encode(e, v.min);
124  ::avro::encode(e, v.max);
125  ::avro::encode(e, v.options);
126  }
127 
128  static void decode(Decoder& d, gpudb::CreateTriggerByRangeRequest& v)
129  {
130  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
131  {
132  const std::vector<size_t> fo = rd->fieldOrder();
133 
134  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
135  {
136  switch (*it)
137  {
138  case 0:
139  ::avro::decode(d, v.requestId);
140  break;
141 
142  case 1:
143  ::avro::decode(d, v.tableNames);
144  break;
145 
146  case 2:
147  ::avro::decode(d, v.columnName);
148  break;
149 
150  case 3:
151  ::avro::decode(d, v.min);
152  break;
153 
154  case 4:
155  ::avro::decode(d, v.max);
156  break;
157 
158  case 5:
159  ::avro::decode(d, v.options);
160  break;
161 
162  default:
163  break;
164  }
165  }
166  }
167  else
168  {
169  ::avro::decode(d, v.requestId);
170  ::avro::decode(d, v.tableNames);
171  ::avro::decode(d, v.columnName);
172  ::avro::decode(d, v.min);
173  ::avro::decode(d, v.max);
174  ::avro::decode(d, v.options);
175  }
176  }
177  };
178 } // end namespace avro
179 
180 namespace gpudb
181 {
188  {
194  triggerId(std::string()),
195  info(std::map<std::string, std::string>())
196  {
197  }
198 
203  std::string triggerId;
204 
208  std::map<std::string, std::string> info;
209  };
210 } // end namespace gpudb
211 
212 namespace avro
213 {
214  template<> struct codec_traits<gpudb::CreateTriggerByRangeResponse>
215  {
216  static void encode(Encoder& e, const gpudb::CreateTriggerByRangeResponse& v)
217  {
218  ::avro::encode(e, v.triggerId);
219  ::avro::encode(e, v.info);
220  }
221 
222  static void decode(Decoder& d, gpudb::CreateTriggerByRangeResponse& v)
223  {
224  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
225  {
226  const std::vector<size_t> fo = rd->fieldOrder();
227 
228  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
229  {
230  switch (*it)
231  {
232  case 0:
233  ::avro::decode(d, v.triggerId);
234  break;
235 
236  case 1:
237  ::avro::decode(d, v.info);
238  break;
239 
240  default:
241  break;
242  }
243  }
244  }
245  else
246  {
247  ::avro::decode(d, v.triggerId);
248  ::avro::decode(d, v.info);
249  }
250  }
251  };
252 } // end namespace avro
253 
254 #endif // __CREATE_TRIGGER_BY_RANGE_H__
A set of parameters for GPUdb::createTriggerByRange.
std::map< std::string, std::string > info
Additional information.
std::string triggerId
Value of requestId.
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.
std::vector< std::string > tableNames
Tables on which the trigger will be active, each in [ schema_name.
double max
The upper bound (inclusive) for the trigger range.
std::string columnName
Name of a numeric column_name on which the trigger is activated.
CreateTriggerByRangeRequest()
Constructs a CreateTriggerByRangeRequest object with default parameters.
CreateTriggerByRangeResponse()
Constructs a CreateTriggerByRangeResponse object with default parameters.
double min
The lower bound (inclusive) for the trigger range.
std::map< std::string, std::string > options
Optional parameters.
std::string requestId
User-created ID for the trigger.
A set of results returned by GPUdb::createTriggerByRange.