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