GPUdb C++ API  Version 7.2.2.4
create_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 __CREATE_SCHEMA_H__
7 #define __CREATE_SCHEMA_H__
8 
9 namespace gpudb
10 {
22  {
27  schemaName(std::string()),
28  options(std::map<std::string, std::string>())
29  {
30  }
31 
61  CreateSchemaRequest(const std::string& schemaName_, const std::map<std::string, std::string>& options_):
62  schemaName( schemaName_ ),
63  options( options_ )
64  {
65  }
66 
71  std::string schemaName;
72 
91  std::map<std::string, std::string> options;
92  };
93 } // end namespace gpudb
94 
95 namespace avro
96 {
97  template<> struct codec_traits<gpudb::CreateSchemaRequest>
98  {
99  static void encode(Encoder& e, const gpudb::CreateSchemaRequest& v)
100  {
101  ::avro::encode(e, v.schemaName);
102  ::avro::encode(e, v.options);
103  }
104 
105  static void decode(Decoder& d, gpudb::CreateSchemaRequest& 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.schemaName);
117  break;
118 
119  case 1:
120  ::avro::decode(d, v.options);
121  break;
122 
123  default:
124  break;
125  }
126  }
127  }
128  else
129  {
130  ::avro::decode(d, v.schemaName);
131  ::avro::decode(d, v.options);
132  }
133  }
134  };
135 } // end namespace avro
136 
137 namespace gpudb
138 {
145  {
150  schemaName(std::string()),
151  info(std::map<std::string, std::string>())
152  {
153  }
154 
158  std::string schemaName;
159 
163  std::map<std::string, std::string> info;
164  };
165 } // end namespace gpudb
166 
167 namespace avro
168 {
169  template<> struct codec_traits<gpudb::CreateSchemaResponse>
170  {
171  static void encode(Encoder& e, const gpudb::CreateSchemaResponse& v)
172  {
173  ::avro::encode(e, v.schemaName);
174  ::avro::encode(e, v.info);
175  }
176 
177  static void decode(Decoder& d, gpudb::CreateSchemaResponse& v)
178  {
179  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
180  {
181  const std::vector<size_t> fo = rd->fieldOrder();
182 
183  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
184  {
185  switch (*it)
186  {
187  case 0:
188  ::avro::decode(d, v.schemaName);
189  break;
190 
191  case 1:
192  ::avro::decode(d, v.info);
193  break;
194 
195  default:
196  break;
197  }
198  }
199  }
200  else
201  {
202  ::avro::decode(d, v.schemaName);
203  ::avro::decode(d, v.info);
204  }
205  }
206  };
207 } // end namespace avro
208 
209 #endif // __CREATE_SCHEMA_H__
std::map< std::string, std::string > info
Additional information.
CreateSchemaRequest(const std::string &schemaName_, const std::map< std::string, std::string > &options_)
Constructs a CreateSchemaRequest object with the specified parameters.
Definition: create_schema.h:61
A set of parameters for GPUdb::createSchema.
Definition: create_schema.h:21
A set of results returned by GPUdb::createSchema.
CreateSchemaResponse()
Constructs a CreateSchemaResponse object with default parameters.
CreateSchemaRequest()
Constructs a CreateSchemaRequest object with default parameters.
Definition: create_schema.h:26
std::map< std::string, std::string > options
Optional parameters.
Definition: create_schema.h:91
std::string schemaName
Value of schemaName.
std::string schemaName
Name of the schema to be created.
Definition: create_schema.h:71