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