GPUdb C++ API  Version 7.1.10.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
create_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 __CREATE_SCHEMA_H__
7 #define __CREATE_SCHEMA_H__
8 
9 namespace gpudb
10 {
11 
22  {
23 
29  schemaName(std::string()),
30  options(std::map<std::string, std::string>())
31  {
32  }
33 
57  CreateSchemaRequest(const std::string& schemaName_, const std::map<std::string, std::string>& options_):
58  schemaName( schemaName_ ),
59  options( options_ )
60  {
61  }
62 
63  std::string schemaName;
64  std::map<std::string, std::string> options;
65  };
66 }
67 
68 namespace avro
69 {
70  template<> struct codec_traits<gpudb::CreateSchemaRequest>
71  {
72  static void encode(Encoder& e, const gpudb::CreateSchemaRequest& v)
73  {
74  ::avro::encode(e, v.schemaName);
75  ::avro::encode(e, v.options);
76  }
77 
78  static void decode(Decoder& d, gpudb::CreateSchemaRequest& v)
79  {
80  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
81  {
82  const std::vector<size_t> fo = rd->fieldOrder();
83 
84  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
85  {
86  switch (*it)
87  {
88  case 0:
89  ::avro::decode(d, v.schemaName);
90  break;
91 
92  case 1:
93  ::avro::decode(d, v.options);
94  break;
95 
96  default:
97  break;
98  }
99  }
100  }
101  else
102  {
103  ::avro::decode(d, v.schemaName);
104  ::avro::decode(d, v.options);
105  }
106  }
107  };
108 }
109 
110 namespace gpudb
111 {
112 
123  {
124 
130  schemaName(std::string()),
131  info(std::map<std::string, std::string>())
132  {
133  }
134 
135  std::string schemaName;
136  std::map<std::string, std::string> info;
137  };
138 }
139 
140 namespace avro
141 {
142  template<> struct codec_traits<gpudb::CreateSchemaResponse>
143  {
144  static void encode(Encoder& e, const gpudb::CreateSchemaResponse& v)
145  {
146  ::avro::encode(e, v.schemaName);
147  ::avro::encode(e, v.info);
148  }
149 
150  static void decode(Decoder& d, gpudb::CreateSchemaResponse& v)
151  {
152  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
153  {
154  const std::vector<size_t> fo = rd->fieldOrder();
155 
156  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
157  {
158  switch (*it)
159  {
160  case 0:
161  ::avro::decode(d, v.schemaName);
162  break;
163 
164  case 1:
165  ::avro::decode(d, v.info);
166  break;
167 
168  default:
169  break;
170  }
171  }
172  }
173  else
174  {
175  ::avro::decode(d, v.schemaName);
176  ::avro::decode(d, v.info);
177  }
178  }
179  };
180 }
181 
182 #endif
std::map< std::string, std::string > info
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:57
A set of input parameters for const.
Definition: create_schema.h:21
A set of output parameters for const.
CreateSchemaResponse()
Constructs a CreateSchemaResponse object with default parameter values.
CreateSchemaRequest()
Constructs a CreateSchemaRequest object with default parameter values.
Definition: create_schema.h:28
std::map< std::string, std::string > options
Definition: create_schema.h:64