GPUdb C++ API  Version 7.2.2.4
has_table.h
Go to the documentation of this file.
1 /*
2  * This file was autogenerated by the Kinetica schema processor.
3  *
4  * DO NOT EDIT DIRECTLY.
5  */
6 #ifndef __HAS_TABLE_H__
7 #define __HAS_TABLE_H__
8 
9 namespace gpudb
10 {
18  {
23  tableName(std::string()),
24  options(std::map<std::string, std::string>())
25  {
26  }
27 
39  HasTableRequest(const std::string& tableName_, const std::map<std::string, std::string>& options_):
40  tableName( tableName_ ),
41  options( options_ )
42  {
43  }
44 
51  std::string tableName;
52 
56  std::map<std::string, std::string> options;
57  };
58 } // end namespace gpudb
59 
60 namespace avro
61 {
62  template<> struct codec_traits<gpudb::HasTableRequest>
63  {
64  static void encode(Encoder& e, const gpudb::HasTableRequest& v)
65  {
66  ::avro::encode(e, v.tableName);
67  ::avro::encode(e, v.options);
68  }
69 
70  static void decode(Decoder& d, gpudb::HasTableRequest& v)
71  {
72  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
73  {
74  const std::vector<size_t> fo = rd->fieldOrder();
75 
76  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
77  {
78  switch (*it)
79  {
80  case 0:
81  ::avro::decode(d, v.tableName);
82  break;
83 
84  case 1:
85  ::avro::decode(d, v.options);
86  break;
87 
88  default:
89  break;
90  }
91  }
92  }
93  else
94  {
95  ::avro::decode(d, v.tableName);
96  ::avro::decode(d, v.options);
97  }
98  }
99  };
100 } // end namespace avro
101 
102 namespace gpudb
103 {
109  {
114  tableName(std::string()),
115  tableExists(bool()),
116  info(std::map<std::string, std::string>())
117  {
118  }
119 
123  std::string tableName;
124 
134 
138  std::map<std::string, std::string> info;
139  };
140 } // end namespace gpudb
141 
142 namespace avro
143 {
144  template<> struct codec_traits<gpudb::HasTableResponse>
145  {
146  static void encode(Encoder& e, const gpudb::HasTableResponse& v)
147  {
148  ::avro::encode(e, v.tableName);
149  ::avro::encode(e, v.tableExists);
150  ::avro::encode(e, v.info);
151  }
152 
153  static void decode(Decoder& d, gpudb::HasTableResponse& v)
154  {
155  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
156  {
157  const std::vector<size_t> fo = rd->fieldOrder();
158 
159  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
160  {
161  switch (*it)
162  {
163  case 0:
164  ::avro::decode(d, v.tableName);
165  break;
166 
167  case 1:
168  ::avro::decode(d, v.tableExists);
169  break;
170 
171  case 2:
172  ::avro::decode(d, v.info);
173  break;
174 
175  default:
176  break;
177  }
178  }
179  }
180  else
181  {
182  ::avro::decode(d, v.tableName);
183  ::avro::decode(d, v.tableExists);
184  ::avro::decode(d, v.info);
185  }
186  }
187  };
188 } // end namespace avro
189 
190 #endif // __HAS_TABLE_H__
std::string tableName
Value of tableName.
Definition: has_table.h:123
A set of parameters for GPUdb::hasTable.
Definition: has_table.h:17
std::map< std::string, std::string > options
Optional parameters.
Definition: has_table.h:56
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:39
bool tableExists
Indicates whether the table exists or not.
Definition: has_table.h:133
std::string tableName
Name of the table to check for existence, in [ schema_name.
Definition: has_table.h:51
HasTableRequest()
Constructs a HasTableRequest object with default parameters.
Definition: has_table.h:22
HasTableResponse()
Constructs a HasTableResponse object with default parameters.
Definition: has_table.h:113
std::map< std::string, std::string > info
Additional information.
Definition: has_table.h:138
A set of results returned by GPUdb::hasTable.
Definition: has_table.h:108