GPUdb C++ API  Version 7.2.2.4
alter_schema.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 __ALTER_SCHEMA_H__
7 #define __ALTER_SCHEMA_H__
8 
9 namespace gpudb
10 {
21  {
26  schemaName(std::string()),
27  action(std::string()),
28  value(std::string()),
29  options(std::map<std::string, std::string>())
30  {
31  }
32 
59  AlterSchemaRequest(const std::string& schemaName_, const std::string& action_, const std::string& value_, const std::map<std::string, std::string>& options_):
60  schemaName( schemaName_ ),
61  action( action_ ),
62  value( value_ ),
63  options( options_ )
64  {
65  }
66 
70  std::string schemaName;
71 
85  std::string action;
86 
93  std::string value;
94 
98  std::map<std::string, std::string> options;
99  };
100 } // end namespace gpudb
101 
102 namespace avro
103 {
104  template<> struct codec_traits<gpudb::AlterSchemaRequest>
105  {
106  static void encode(Encoder& e, const gpudb::AlterSchemaRequest& v)
107  {
108  ::avro::encode(e, v.schemaName);
109  ::avro::encode(e, v.action);
110  ::avro::encode(e, v.value);
111  ::avro::encode(e, v.options);
112  }
113 
114  static void decode(Decoder& d, gpudb::AlterSchemaRequest& v)
115  {
116  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
117  {
118  const std::vector<size_t> fo = rd->fieldOrder();
119 
120  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
121  {
122  switch (*it)
123  {
124  case 0:
125  ::avro::decode(d, v.schemaName);
126  break;
127 
128  case 1:
129  ::avro::decode(d, v.action);
130  break;
131 
132  case 2:
133  ::avro::decode(d, v.value);
134  break;
135 
136  case 3:
137  ::avro::decode(d, v.options);
138  break;
139 
140  default:
141  break;
142  }
143  }
144  }
145  else
146  {
147  ::avro::decode(d, v.schemaName);
148  ::avro::decode(d, v.action);
149  ::avro::decode(d, v.value);
150  ::avro::decode(d, v.options);
151  }
152  }
153  };
154 } // end namespace avro
155 
156 namespace gpudb
157 {
164  {
169  schemaName(std::string()),
170  info(std::map<std::string, std::string>())
171  {
172  }
173 
177  std::string schemaName;
178 
182  std::map<std::string, std::string> info;
183  };
184 } // end namespace gpudb
185 
186 namespace avro
187 {
188  template<> struct codec_traits<gpudb::AlterSchemaResponse>
189  {
190  static void encode(Encoder& e, const gpudb::AlterSchemaResponse& v)
191  {
192  ::avro::encode(e, v.schemaName);
193  ::avro::encode(e, v.info);
194  }
195 
196  static void decode(Decoder& d, gpudb::AlterSchemaResponse& v)
197  {
198  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
199  {
200  const std::vector<size_t> fo = rd->fieldOrder();
201 
202  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
203  {
204  switch (*it)
205  {
206  case 0:
207  ::avro::decode(d, v.schemaName);
208  break;
209 
210  case 1:
211  ::avro::decode(d, v.info);
212  break;
213 
214  default:
215  break;
216  }
217  }
218  }
219  else
220  {
221  ::avro::decode(d, v.schemaName);
222  ::avro::decode(d, v.info);
223  }
224  }
225  };
226 } // end namespace avro
227 
228 #endif // __ALTER_SCHEMA_H__
std::string schemaName
Name of the schema to be altered.
Definition: alter_schema.h:70
A set of parameters for GPUdb::alterSchema.
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:59
std::map< std::string, std::string > options
Optional parameters.
Definition: alter_schema.h:98
AlterSchemaRequest()
Constructs an AlterSchemaRequest object with default parameters.
Definition: alter_schema.h:25
std::string value
The value of the modification, depending on action.
Definition: alter_schema.h:93
AlterSchemaResponse()
Constructs an AlterSchemaResponse object with default parameters.
Definition: alter_schema.h:168
std::string schemaName
Value of schemaName.
Definition: alter_schema.h:177
std::string action
Modification operation to be applied.
Definition: alter_schema.h:85
A set of results returned by GPUdb::alterSchema.
Definition: alter_schema.h:163
std::map< std::string, std::string > info
Additional information.
Definition: alter_schema.h:182