GPUdb C++ API  Version 5.2.0.0
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 
32  {
33 
39  requestId(std::string()),
40  tableNames(std::vector<std::string>()),
41  columnName(std::string()),
42  min(double()),
43  max(double()),
44  options(std::map<std::string, std::string>())
45  {
46  }
47 
62  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):
63  requestId(requestId),
64  tableNames(tableNames),
65  columnName(columnName),
66  min(min),
67  max(max),
68  options(options)
69  {
70  }
71 
72  std::string requestId;
73  std::vector<std::string> tableNames;
74  std::string columnName;
75  double min;
76  double max;
77  std::map<std::string, std::string> options;
78  };
79 }
80 
81 namespace avro
82 {
83  template<> struct codec_traits<gpudb::CreateTriggerByRangeRequest>
84  {
85  static void encode(Encoder& e, const gpudb::CreateTriggerByRangeRequest& v)
86  {
87  ::avro::encode(e, v.requestId);
88  ::avro::encode(e, v.tableNames);
89  ::avro::encode(e, v.columnName);
90  ::avro::encode(e, v.min);
91  ::avro::encode(e, v.max);
92  ::avro::encode(e, v.options);
93  }
94 
95  static void decode(Decoder& d, gpudb::CreateTriggerByRangeRequest& v)
96  {
97  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
98  {
99  const std::vector<size_t> fo = rd->fieldOrder();
100 
101  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
102  {
103  switch (*it)
104  {
105  case 0:
106  ::avro::decode(d, v.requestId);
107  break;
108 
109  case 1:
110  ::avro::decode(d, v.tableNames);
111  break;
112 
113  case 2:
114  ::avro::decode(d, v.columnName);
115  break;
116 
117  case 3:
118  ::avro::decode(d, v.min);
119  break;
120 
121  case 4:
122  ::avro::decode(d, v.max);
123  break;
124 
125  case 5:
126  ::avro::decode(d, v.options);
127  break;
128 
129  default:
130  break;
131  }
132  }
133  }
134  else
135  {
136  ::avro::decode(d, v.requestId);
137  ::avro::decode(d, v.tableNames);
138  ::avro::decode(d, v.columnName);
139  ::avro::decode(d, v.min);
140  ::avro::decode(d, v.max);
141  ::avro::decode(d, v.options);
142  }
143  }
144  };
145 }
146 
147 namespace gpudb
148 {
149 
170  {
171 
177  triggerId(std::string())
178  {
179  }
180 
181  std::string triggerId;
182  };
183 }
184 
185 namespace avro
186 {
187  template<> struct codec_traits<gpudb::CreateTriggerByRangeResponse>
188  {
189  static void encode(Encoder& e, const gpudb::CreateTriggerByRangeResponse& v)
190  {
191  ::avro::encode(e, v.triggerId);
192  }
193 
194  static void decode(Decoder& d, gpudb::CreateTriggerByRangeResponse& v)
195  {
196  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
197  {
198  const std::vector<size_t> fo = rd->fieldOrder();
199 
200  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
201  {
202  switch (*it)
203  {
204  case 0:
205  ::avro::decode(d, v.triggerId);
206  break;
207 
208  default:
209  break;
210  }
211  }
212  }
213  else
214  {
215  ::avro::decode(d, v.triggerId);
216  }
217  }
218  };
219 }
220 
221 #endif
A set of input parameters for createTriggerByRange(const CreateTriggerByRangeRequest&) const...
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 createTriggerByRange(const CreateTriggerByRangeRequest&) const...
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.