6 #ifndef __SHOW_FUNCTIONS_H__
7 #define __SHOW_FUNCTIONS_H__
18 struct ShowFunctionsRequest
26 ShowFunctionsRequest() :
27 options(std::map<std::string, std::string>())
42 ShowFunctionsRequest(
const std::map<std::string, std::string>& options_):
47 std::map<std::string, std::string> options;
57 template<>
struct codec_traits<gpudb::ShowFunctionsRequest>
59 static void encode(Encoder& e,
const gpudb::ShowFunctionsRequest& v)
61 ::avro::encode(e, v.options);
64 static void decode(Decoder& d, gpudb::ShowFunctionsRequest& v)
66 if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
68 const std::vector<size_t> fo = rd->fieldOrder();
70 for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
75 ::avro::decode(d, v.options);
85 ::avro::decode(d, v.options);
100 struct ShowFunctionsResponse
108 ShowFunctionsResponse() :
109 functionNames(std::vector<std::string>()),
110 returnTypes(std::vector<std::string>()),
111 parameters(std::vector<std::vector<std::string> >()),
112 optionalParameterCount(std::vector<int32_t>()),
113 flags(std::vector<int32_t>()),
114 info(std::map<std::string, std::string>())
118 std::vector<std::string> functionNames;
119 std::vector<std::string> returnTypes;
120 std::vector<std::vector<std::string> > parameters;
121 std::vector<int32_t> optionalParameterCount;
122 std::vector<int32_t> flags;
123 std::map<std::string, std::string> info;
133 template<>
struct codec_traits<gpudb::ShowFunctionsResponse>
135 static void encode(Encoder& e,
const gpudb::ShowFunctionsResponse& v)
137 ::avro::encode(e, v.functionNames);
138 ::avro::encode(e, v.returnTypes);
139 ::avro::encode(e, v.parameters);
140 ::avro::encode(e, v.optionalParameterCount);
141 ::avro::encode(e, v.flags);
142 ::avro::encode(e, v.info);
145 static void decode(Decoder& d, gpudb::ShowFunctionsResponse& v)
147 if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
149 const std::vector<size_t> fo = rd->fieldOrder();
151 for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
156 ::avro::decode(d, v.functionNames);
160 ::avro::decode(d, v.returnTypes);
164 ::avro::decode(d, v.parameters);
168 ::avro::decode(d, v.optionalParameterCount);
172 ::avro::decode(d, v.flags);
176 ::avro::decode(d, v.info);
186 ::avro::decode(d, v.functionNames);
187 ::avro::decode(d, v.returnTypes);
188 ::avro::decode(d, v.parameters);
189 ::avro::decode(d, v.optionalParameterCount);
190 ::avro::decode(d, v.flags);
191 ::avro::decode(d, v.info);