GPUdb C++ API  Version 7.1.10.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
create_delta_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 __CREATE_DELTA_TABLE_H__
7 #define __CREATE_DELTA_TABLE_H__
8 
9 namespace gpudb
10 {
11 
18  struct CreateDeltaTableRequest
19  {
20 
26  CreateDeltaTableRequest() :
27  deltaTableName(std::string()),
28  tableName(std::string()),
29  options(std::map<std::string, std::string>())
30  {
31  }
32 
43  CreateDeltaTableRequest(const std::string& deltaTableName_, const std::string& tableName_, const std::map<std::string, std::string>& options_):
44  deltaTableName( deltaTableName_ ),
45  tableName( tableName_ ),
46  options( options_ )
47  {
48  }
49 
50  std::string deltaTableName;
51  std::string tableName;
52  std::map<std::string, std::string> options;
53  };
54 }
55 
60 namespace avro
61 {
62  template<> struct codec_traits<gpudb::CreateDeltaTableRequest>
63  {
64  static void encode(Encoder& e, const gpudb::CreateDeltaTableRequest& v)
65  {
66  ::avro::encode(e, v.deltaTableName);
67  ::avro::encode(e, v.tableName);
68  ::avro::encode(e, v.options);
69  }
70 
71  static void decode(Decoder& d, gpudb::CreateDeltaTableRequest& 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.deltaTableName);
83  break;
84 
85  case 1:
86  ::avro::decode(d, v.tableName);
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.deltaTableName);
101  ::avro::decode(d, v.tableName);
102  ::avro::decode(d, v.options);
103  }
104  }
105  };
106 }
107 
108 namespace gpudb
109 {
110 
117  struct CreateDeltaTableResponse
118  {
119 
125  CreateDeltaTableResponse() :
126  deltaTableName(std::string()),
127  info(std::map<std::string, std::string>())
128  {
129  }
130 
131  std::string deltaTableName;
132  std::map<std::string, std::string> info;
133  };
134 }
135 
140 namespace avro
141 {
142  template<> struct codec_traits<gpudb::CreateDeltaTableResponse>
143  {
144  static void encode(Encoder& e, const gpudb::CreateDeltaTableResponse& v)
145  {
146  ::avro::encode(e, v.deltaTableName);
147  ::avro::encode(e, v.info);
148  }
149 
150  static void decode(Decoder& d, gpudb::CreateDeltaTableResponse& v)
151  {
152  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
153  {
154  const std::vector<size_t> fo = rd->fieldOrder();
155 
156  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
157  {
158  switch (*it)
159  {
160  case 0:
161  ::avro::decode(d, v.deltaTableName);
162  break;
163 
164  case 1:
165  ::avro::decode(d, v.info);
166  break;
167 
168  default:
169  break;
170  }
171  }
172  }
173  else
174  {
175  ::avro::decode(d, v.deltaTableName);
176  ::avro::decode(d, v.info);
177  }
178  }
179  };
180 }
181 
182 #endif