GPUdb C++ API  Version 7.1.10.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
alter_schema.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 __ALTER_SCHEMA_H__
7 #define __ALTER_SCHEMA_H__
8 
9 namespace gpudb
10 {
11 
21  {
22 
28  schemaName(std::string()),
29  action(std::string()),
30  value(std::string()),
31  options(std::map<std::string, std::string>())
32  {
33  }
34 
55  AlterSchemaRequest(const std::string& schemaName_, const std::string& action_, const std::string& value_, const std::map<std::string, std::string>& options_):
56  schemaName( schemaName_ ),
57  action( action_ ),
58  value( value_ ),
59  options( options_ )
60  {
61  }
62 
63  std::string schemaName;
64  std::string action;
65  std::string value;
66  std::map<std::string, std::string> options;
67  };
68 }
69 
70 namespace avro
71 {
72  template<> struct codec_traits<gpudb::AlterSchemaRequest>
73  {
74  static void encode(Encoder& e, const gpudb::AlterSchemaRequest& v)
75  {
76  ::avro::encode(e, v.schemaName);
77  ::avro::encode(e, v.action);
78  ::avro::encode(e, v.value);
79  ::avro::encode(e, v.options);
80  }
81 
82  static void decode(Decoder& d, gpudb::AlterSchemaRequest& v)
83  {
84  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
85  {
86  const std::vector<size_t> fo = rd->fieldOrder();
87 
88  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
89  {
90  switch (*it)
91  {
92  case 0:
93  ::avro::decode(d, v.schemaName);
94  break;
95 
96  case 1:
97  ::avro::decode(d, v.action);
98  break;
99 
100  case 2:
101  ::avro::decode(d, v.value);
102  break;
103 
104  case 3:
105  ::avro::decode(d, v.options);
106  break;
107 
108  default:
109  break;
110  }
111  }
112  }
113  else
114  {
115  ::avro::decode(d, v.schemaName);
116  ::avro::decode(d, v.action);
117  ::avro::decode(d, v.value);
118  ::avro::decode(d, v.options);
119  }
120  }
121  };
122 }
123 
124 namespace gpudb
125 {
126 
136  {
137 
143  schemaName(std::string()),
144  info(std::map<std::string, std::string>())
145  {
146  }
147 
148  std::string schemaName;
149  std::map<std::string, std::string> info;
150  };
151 }
152 
153 namespace avro
154 {
155  template<> struct codec_traits<gpudb::AlterSchemaResponse>
156  {
157  static void encode(Encoder& e, const gpudb::AlterSchemaResponse& v)
158  {
159  ::avro::encode(e, v.schemaName);
160  ::avro::encode(e, v.info);
161  }
162 
163  static void decode(Decoder& d, gpudb::AlterSchemaResponse& v)
164  {
165  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
166  {
167  const std::vector<size_t> fo = rd->fieldOrder();
168 
169  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
170  {
171  switch (*it)
172  {
173  case 0:
174  ::avro::decode(d, v.schemaName);
175  break;
176 
177  case 1:
178  ::avro::decode(d, v.info);
179  break;
180 
181  default:
182  break;
183  }
184  }
185  }
186  else
187  {
188  ::avro::decode(d, v.schemaName);
189  ::avro::decode(d, v.info);
190  }
191  }
192  };
193 }
194 
195 #endif
A set of input parameters for const.
Definition: alter_schema.h:20
AlterSchemaRequest(const std::string &schemaName_, const std::string &action_, const std::string &value_, const std::map< std::string, std::string > &options_)
Constructs an AlterSchemaRequest object with the specified parameters.
Definition: alter_schema.h:55
std::map< std::string, std::string > options
Definition: alter_schema.h:66
AlterSchemaRequest()
Constructs an AlterSchemaRequest object with default parameter values.
Definition: alter_schema.h:27
AlterSchemaResponse()
Constructs an AlterSchemaResponse object with default parameter values.
Definition: alter_schema.h:142
A set of output parameters for const.
Definition: alter_schema.h:135
std::map< std::string, std::string > info
Definition: alter_schema.h:149