GPUdb C++ API  Version 7.2.2.4
show_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 __SHOW_SCHEMA_H__
7 #define __SHOW_SCHEMA_H__
8 
9 namespace gpudb
10 {
20  {
25  schemaName(std::string()),
26  options(std::map<std::string, std::string>())
27  {
28  }
29 
61  ShowSchemaRequest(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 
92  std::map<std::string, std::string> options;
93  };
94 } // end namespace gpudb
95 
96 namespace avro
97 {
98  template<> struct codec_traits<gpudb::ShowSchemaRequest>
99  {
100  static void encode(Encoder& e, const gpudb::ShowSchemaRequest& v)
101  {
102  ::avro::encode(e, v.schemaName);
103  ::avro::encode(e, v.options);
104  }
105 
106  static void decode(Decoder& d, gpudb::ShowSchemaRequest& v)
107  {
108  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
109  {
110  const std::vector<size_t> fo = rd->fieldOrder();
111 
112  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
113  {
114  switch (*it)
115  {
116  case 0:
117  ::avro::decode(d, v.schemaName);
118  break;
119 
120  case 1:
121  ::avro::decode(d, v.options);
122  break;
123 
124  default:
125  break;
126  }
127  }
128  }
129  else
130  {
131  ::avro::decode(d, v.schemaName);
132  ::avro::decode(d, v.options);
133  }
134  }
135  };
136 } // end namespace avro
137 
138 namespace gpudb
139 {
145  {
150  schemaName(std::string()),
151  schemaNames(std::vector<std::string>()),
152  schemaTables(std::vector<std::vector<std::string> >()),
153  additionalInfo(std::vector<std::map<std::string, std::string> >()),
154  info(std::map<std::string, std::string>())
155  {
156  }
157 
161  std::string schemaName;
162 
166  std::vector<std::string> schemaNames;
167 
172  std::vector<std::vector<std::string> > schemaTables;
173 
178  std::vector<std::map<std::string, std::string> > additionalInfo;
179 
183  std::map<std::string, std::string> info;
184  };
185 } // end namespace gpudb
186 
187 namespace avro
188 {
189  template<> struct codec_traits<gpudb::ShowSchemaResponse>
190  {
191  static void encode(Encoder& e, const gpudb::ShowSchemaResponse& v)
192  {
193  ::avro::encode(e, v.schemaName);
194  ::avro::encode(e, v.schemaNames);
195  ::avro::encode(e, v.schemaTables);
196  ::avro::encode(e, v.additionalInfo);
197  ::avro::encode(e, v.info);
198  }
199 
200  static void decode(Decoder& d, gpudb::ShowSchemaResponse& v)
201  {
202  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
203  {
204  const std::vector<size_t> fo = rd->fieldOrder();
205 
206  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
207  {
208  switch (*it)
209  {
210  case 0:
211  ::avro::decode(d, v.schemaName);
212  break;
213 
214  case 1:
215  ::avro::decode(d, v.schemaNames);
216  break;
217 
218  case 2:
219  ::avro::decode(d, v.schemaTables);
220  break;
221 
222  case 3:
223  ::avro::decode(d, v.additionalInfo);
224  break;
225 
226  case 4:
227  ::avro::decode(d, v.info);
228  break;
229 
230  default:
231  break;
232  }
233  }
234  }
235  else
236  {
237  ::avro::decode(d, v.schemaName);
238  ::avro::decode(d, v.schemaNames);
239  ::avro::decode(d, v.schemaTables);
240  ::avro::decode(d, v.additionalInfo);
241  ::avro::decode(d, v.info);
242  }
243  }
244  };
245 } // end namespace avro
246 
247 #endif // __SHOW_SCHEMA_H__
std::string schemaName
Value of schemaName.
Definition: show_schema.h:161
std::string schemaName
Name of the schema for which to retrieve the information.
Definition: show_schema.h:71
A set of parameters for GPUdb::showSchema.
Definition: show_schema.h:19
std::map< std::string, std::string > info
Additional information.
Definition: show_schema.h:183
ShowSchemaResponse()
Constructs a ShowSchemaResponse object with default parameters.
Definition: show_schema.h:149
ShowSchemaRequest()
Constructs a ShowSchemaRequest object with default parameters.
Definition: show_schema.h:24
std::vector< std::vector< std::string > > schemaTables
An array of arrays containing a list of tables in each of the respective schemaNames.
Definition: show_schema.h:172
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:61
std::vector< std::map< std::string, std::string > > additionalInfo
Additional information about the respective tables in schemaNames.
Definition: show_schema.h:178
std::vector< std::string > schemaNames
A list of all schema names for which information is returned.
Definition: show_schema.h:166
std::map< std::string, std::string > options
Optional parameters.
Definition: show_schema.h:92
A set of results returned by GPUdb::showSchema.
Definition: show_schema.h:144