GPUdb C++ API  Version 7.1.10.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
has_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 __HAS_SCHEMA_H__
7 #define __HAS_SCHEMA_H__
8 
9 namespace gpudb
10 {
11 
19  {
20 
25  schemaName(std::string()),
26  options(std::map<std::string, std::string>())
27  {
28  }
29 
40  HasSchemaRequest(const std::string& schemaName_, const std::map<std::string, std::string>& options_):
41  schemaName( schemaName_ ),
42  options( options_ )
43  {
44  }
45 
46  std::string schemaName;
47  std::map<std::string, std::string> options;
48  };
49 }
50 
51 namespace avro
52 {
53  template<> struct codec_traits<gpudb::HasSchemaRequest>
54  {
55  static void encode(Encoder& e, const gpudb::HasSchemaRequest& v)
56  {
57  ::avro::encode(e, v.schemaName);
58  ::avro::encode(e, v.options);
59  }
60 
61  static void decode(Decoder& d, gpudb::HasSchemaRequest& v)
62  {
63  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
64  {
65  const std::vector<size_t> fo = rd->fieldOrder();
66 
67  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
68  {
69  switch (*it)
70  {
71  case 0:
72  ::avro::decode(d, v.schemaName);
73  break;
74 
75  case 1:
76  ::avro::decode(d, v.options);
77  break;
78 
79  default:
80  break;
81  }
82  }
83  }
84  else
85  {
86  ::avro::decode(d, v.schemaName);
87  ::avro::decode(d, v.options);
88  }
89  }
90  };
91 }
92 
93 namespace gpudb
94 {
95 
103  {
104 
109  schemaName(std::string()),
110  schemaExists(bool()),
111  info(std::map<std::string, std::string>())
112  {
113  }
114 
115  std::string schemaName;
117  std::map<std::string, std::string> info;
118  };
119 }
120 
121 namespace avro
122 {
123  template<> struct codec_traits<gpudb::HasSchemaResponse>
124  {
125  static void encode(Encoder& e, const gpudb::HasSchemaResponse& v)
126  {
127  ::avro::encode(e, v.schemaName);
128  ::avro::encode(e, v.schemaExists);
129  ::avro::encode(e, v.info);
130  }
131 
132  static void decode(Decoder& d, gpudb::HasSchemaResponse& v)
133  {
134  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
135  {
136  const std::vector<size_t> fo = rd->fieldOrder();
137 
138  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
139  {
140  switch (*it)
141  {
142  case 0:
143  ::avro::decode(d, v.schemaName);
144  break;
145 
146  case 1:
147  ::avro::decode(d, v.schemaExists);
148  break;
149 
150  case 2:
151  ::avro::decode(d, v.info);
152  break;
153 
154  default:
155  break;
156  }
157  }
158  }
159  else
160  {
161  ::avro::decode(d, v.schemaName);
162  ::avro::decode(d, v.schemaExists);
163  ::avro::decode(d, v.info);
164  }
165  }
166  };
167 }
168 
169 #endif
A set of input parameters for const.
Definition: has_schema.h:18
std::map< std::string, std::string > options
Definition: has_schema.h:47
HasSchemaResponse()
Constructs a HasSchemaResponse object with default parameter values.
Definition: has_schema.h:108
A set of output parameters for const.
Definition: has_schema.h:102
std::map< std::string, std::string > info
Definition: has_schema.h:117
std::string schemaName
Definition: has_schema.h:46
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:40
HasSchemaRequest()
Constructs a HasSchemaRequest object with default parameter values.
Definition: has_schema.h:24