GPUdb C++ API  Version 7.2.2.4
has_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 __HAS_SCHEMA_H__
7 #define __HAS_SCHEMA_H__
8 
9 namespace gpudb
10 {
18  {
23  schemaName(std::string()),
24  options(std::map<std::string, std::string>())
25  {
26  }
27 
38  HasSchemaRequest(const std::string& schemaName_, const std::map<std::string, std::string>& options_):
39  schemaName( schemaName_ ),
40  options( options_ )
41  {
42  }
43 
49  std::string schemaName;
50 
54  std::map<std::string, std::string> options;
55  };
56 } // end namespace gpudb
57 
58 namespace avro
59 {
60  template<> struct codec_traits<gpudb::HasSchemaRequest>
61  {
62  static void encode(Encoder& e, const gpudb::HasSchemaRequest& v)
63  {
64  ::avro::encode(e, v.schemaName);
65  ::avro::encode(e, v.options);
66  }
67 
68  static void decode(Decoder& d, gpudb::HasSchemaRequest& v)
69  {
70  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
71  {
72  const std::vector<size_t> fo = rd->fieldOrder();
73 
74  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
75  {
76  switch (*it)
77  {
78  case 0:
79  ::avro::decode(d, v.schemaName);
80  break;
81 
82  case 1:
83  ::avro::decode(d, v.options);
84  break;
85 
86  default:
87  break;
88  }
89  }
90  }
91  else
92  {
93  ::avro::decode(d, v.schemaName);
94  ::avro::decode(d, v.options);
95  }
96  }
97  };
98 } // end namespace avro
99 
100 namespace gpudb
101 {
107  {
112  schemaName(std::string()),
113  schemaExists(bool()),
114  info(std::map<std::string, std::string>())
115  {
116  }
117 
121  std::string schemaName;
122 
132 
136  std::map<std::string, std::string> info;
137  };
138 } // end namespace gpudb
139 
140 namespace avro
141 {
142  template<> struct codec_traits<gpudb::HasSchemaResponse>
143  {
144  static void encode(Encoder& e, const gpudb::HasSchemaResponse& v)
145  {
146  ::avro::encode(e, v.schemaName);
147  ::avro::encode(e, v.schemaExists);
148  ::avro::encode(e, v.info);
149  }
150 
151  static void decode(Decoder& d, gpudb::HasSchemaResponse& v)
152  {
153  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
154  {
155  const std::vector<size_t> fo = rd->fieldOrder();
156 
157  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
158  {
159  switch (*it)
160  {
161  case 0:
162  ::avro::decode(d, v.schemaName);
163  break;
164 
165  case 1:
166  ::avro::decode(d, v.schemaExists);
167  break;
168 
169  case 2:
170  ::avro::decode(d, v.info);
171  break;
172 
173  default:
174  break;
175  }
176  }
177  }
178  else
179  {
180  ::avro::decode(d, v.schemaName);
181  ::avro::decode(d, v.schemaExists);
182  ::avro::decode(d, v.info);
183  }
184  }
185  };
186 } // end namespace avro
187 
188 #endif // __HAS_SCHEMA_H__
A set of parameters for GPUdb::hasSchema.
Definition: has_schema.h:17
std::map< std::string, std::string > options
Optional parameters.
Definition: has_schema.h:54
HasSchemaResponse()
Constructs a HasSchemaResponse object with default parameters.
Definition: has_schema.h:111
std::string schemaName
Value of schemaName.
Definition: has_schema.h:121
A set of results returned by GPUdb::hasSchema.
Definition: has_schema.h:106
std::map< std::string, std::string > info
Additional information.
Definition: has_schema.h:136
std::string schemaName
Name of the schema to check for existence, in root, using standard name resolution rules.
Definition: has_schema.h:49
bool schemaExists
Indicates whether the schema exists or not.
Definition: has_schema.h:131
HasSchemaRequest(const std::string &schemaName_, const std::map< std::string, std::string > &options_)
Constructs a HasSchemaRequest object with the specified parameters.
Definition: has_schema.h:38
HasSchemaRequest()
Constructs a HasSchemaRequest object with default parameters.
Definition: has_schema.h:22