GPUdb C++ API  Version 7.2.2.4
create_delta_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 __CREATE_DELTA_TABLE_H__
7 #define __CREATE_DELTA_TABLE_H__
8 
9 namespace gpudb
10 {
12  struct CreateDeltaTableRequest
13  {
14  CreateDeltaTableRequest() :
15  deltaTableName(std::string()),
16  tableName(std::string()),
17  options(std::map<std::string, std::string>())
18  {
19  }
20 
21  CreateDeltaTableRequest(const std::string& deltaTableName_, const std::string& tableName_, const std::map<std::string, std::string>& options_):
22  deltaTableName( deltaTableName_ ),
23  tableName( tableName_ ),
24  options( options_ )
25  {
26  }
27 
28  std::string deltaTableName;
29  std::string tableName;
30  std::map<std::string, std::string> options;
31  };
32 } // end namespace gpudb
33 
34 namespace avro
35 {
36  template<> struct codec_traits<gpudb::CreateDeltaTableRequest>
37  {
38  static void encode(Encoder& e, const gpudb::CreateDeltaTableRequest& v)
39  {
40  ::avro::encode(e, v.deltaTableName);
41  ::avro::encode(e, v.tableName);
42  ::avro::encode(e, v.options);
43  }
44 
45  static void decode(Decoder& d, gpudb::CreateDeltaTableRequest& v)
46  {
47  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
48  {
49  const std::vector<size_t> fo = rd->fieldOrder();
50 
51  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
52  {
53  switch (*it)
54  {
55  case 0:
56  ::avro::decode(d, v.deltaTableName);
57  break;
58 
59  case 1:
60  ::avro::decode(d, v.tableName);
61  break;
62 
63  case 2:
64  ::avro::decode(d, v.options);
65  break;
66 
67  default:
68  break;
69  }
70  }
71  }
72  else
73  {
74  ::avro::decode(d, v.deltaTableName);
75  ::avro::decode(d, v.tableName);
76  ::avro::decode(d, v.options);
77  }
78  }
79  };
80 } // end namespace avro
81 
82 namespace gpudb
83 {
85  struct CreateDeltaTableResponse
86  {
87  CreateDeltaTableResponse() :
88  deltaTableName(std::string()),
89  info(std::map<std::string, std::string>())
90  {
91  }
92 
93  std::string deltaTableName;
94  std::map<std::string, std::string> info;
95  };
96 } // end namespace gpudb
97 
98 namespace avro
99 {
100  template<> struct codec_traits<gpudb::CreateDeltaTableResponse>
101  {
102  static void encode(Encoder& e, const gpudb::CreateDeltaTableResponse& v)
103  {
104  ::avro::encode(e, v.deltaTableName);
105  ::avro::encode(e, v.info);
106  }
107 
108  static void decode(Decoder& d, gpudb::CreateDeltaTableResponse& v)
109  {
110  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
111  {
112  const std::vector<size_t> fo = rd->fieldOrder();
113 
114  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
115  {
116  switch (*it)
117  {
118  case 0:
119  ::avro::decode(d, v.deltaTableName);
120  break;
121 
122  case 1:
123  ::avro::decode(d, v.info);
124  break;
125 
126  default:
127  break;
128  }
129  }
130  }
131  else
132  {
133  ::avro::decode(d, v.deltaTableName);
134  ::avro::decode(d, v.info);
135  }
136  }
137  };
138 } // end namespace avro
139 
140 #endif // __CREATE_DELTA_TABLE_H__