GPUdb C++ API  Version 5.2.0.0
show_table_metadata.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_TABLE_METADATA_H__
7 #define __SHOW_TABLE_METADATA_H__
8 
9 namespace gpudb
10 {
11 
19  {
20 
26  tableNames(std::vector<std::string>()),
27  options(std::map<std::string, std::string>())
28  {
29  }
30 
42  ShowTableMetadataRequest(const std::vector<std::string>& tableNames, const std::map<std::string, std::string>& options):
43  tableNames(tableNames),
44  options(options)
45  {
46  }
47 
48  std::vector<std::string> tableNames;
49  std::map<std::string, std::string> options;
50  };
51 }
52 
53 namespace avro
54 {
55  template<> struct codec_traits<gpudb::ShowTableMetadataRequest>
56  {
57  static void encode(Encoder& e, const gpudb::ShowTableMetadataRequest& v)
58  {
59  ::avro::encode(e, v.tableNames);
60  ::avro::encode(e, v.options);
61  }
62 
63  static void decode(Decoder& d, gpudb::ShowTableMetadataRequest& v)
64  {
65  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
66  {
67  const std::vector<size_t> fo = rd->fieldOrder();
68 
69  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
70  {
71  switch (*it)
72  {
73  case 0:
74  ::avro::decode(d, v.tableNames);
75  break;
76 
77  case 1:
78  ::avro::decode(d, v.options);
79  break;
80 
81  default:
82  break;
83  }
84  }
85  }
86  else
87  {
88  ::avro::decode(d, v.tableNames);
89  ::avro::decode(d, v.options);
90  }
91  }
92  };
93 }
94 
95 namespace gpudb
96 {
97 
105  {
106 
112  tableNames(std::vector<std::string>()),
113  metadataMaps(std::vector<std::map<std::string, std::string> >())
114  {
115  }
116 
117  std::vector<std::string> tableNames;
118  std::vector<std::map<std::string, std::string> > metadataMaps;
119  };
120 }
121 
122 namespace avro
123 {
124  template<> struct codec_traits<gpudb::ShowTableMetadataResponse>
125  {
126  static void encode(Encoder& e, const gpudb::ShowTableMetadataResponse& v)
127  {
128  ::avro::encode(e, v.tableNames);
129  ::avro::encode(e, v.metadataMaps);
130  }
131 
132  static void decode(Decoder& d, gpudb::ShowTableMetadataResponse& 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.tableNames);
144  break;
145 
146  case 1:
147  ::avro::decode(d, v.metadataMaps);
148  break;
149 
150  default:
151  break;
152  }
153  }
154  }
155  else
156  {
157  ::avro::decode(d, v.tableNames);
158  ::avro::decode(d, v.metadataMaps);
159  }
160  }
161  };
162 }
163 
164 #endif
ShowTableMetadataRequest()
Constructs a ShowTableMetadataRequest object with default parameter values.
ShowTableMetadataRequest(const std::vector< std::string > &tableNames, const std::map< std::string, std::string > &options)
Constructs a ShowTableMetadataRequest object with the specified parameters.
A set of output parameters for showTableMetadata(const ShowTableMetadataRequest&) const...
A set of input parameters for showTableMetadata(const ShowTableMetadataRequest&) const.
ShowTableMetadataResponse()
Constructs a ShowTableMetadataResponse object with default parameter values.
std::vector< std::string > tableNames
std::vector< std::map< std::string, std::string > > metadataMaps
std::map< std::string, std::string > options
std::vector< std::string > tableNames