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