GPUdb C++ API  Version 7.0.19.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
lock_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 __LOCK_TABLE_H__
7 #define __LOCK_TABLE_H__
8 
9 namespace gpudb
10 {
11 
25  {
26 
31  tableName(std::string()),
32  lockType(std::string()),
33  options(std::map<std::string, std::string>())
34  {
35  }
36 
63  LockTableRequest(const std::string& tableName_, const std::string& lockType_, const std::map<std::string, std::string>& options_):
64  tableName( tableName_ ),
65  lockType( lockType_ ),
66  options( options_ )
67  {
68  }
69 
70  std::string tableName;
71  std::string lockType;
72  std::map<std::string, std::string> options;
73  };
74 }
75 
76 namespace avro
77 {
78  template<> struct codec_traits<gpudb::LockTableRequest>
79  {
80  static void encode(Encoder& e, const gpudb::LockTableRequest& v)
81  {
82  ::avro::encode(e, v.tableName);
83  ::avro::encode(e, v.lockType);
84  ::avro::encode(e, v.options);
85  }
86 
87  static void decode(Decoder& d, gpudb::LockTableRequest& v)
88  {
89  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
90  {
91  const std::vector<size_t> fo = rd->fieldOrder();
92 
93  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
94  {
95  switch (*it)
96  {
97  case 0:
98  ::avro::decode(d, v.tableName);
99  break;
100 
101  case 1:
102  ::avro::decode(d, v.lockType);
103  break;
104 
105  case 2:
106  ::avro::decode(d, v.options);
107  break;
108 
109  default:
110  break;
111  }
112  }
113  }
114  else
115  {
116  ::avro::decode(d, v.tableName);
117  ::avro::decode(d, v.lockType);
118  ::avro::decode(d, v.options);
119  }
120  }
121  };
122 }
123 
124 namespace gpudb
125 {
126 
140  {
141 
146  lockType(std::string()),
147  info(std::map<std::string, std::string>())
148  {
149  }
150 
151  std::string lockType;
152  std::map<std::string, std::string> info;
153  };
154 }
155 
156 namespace avro
157 {
158  template<> struct codec_traits<gpudb::LockTableResponse>
159  {
160  static void encode(Encoder& e, const gpudb::LockTableResponse& v)
161  {
162  ::avro::encode(e, v.lockType);
163  ::avro::encode(e, v.info);
164  }
165 
166  static void decode(Decoder& d, gpudb::LockTableResponse& v)
167  {
168  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
169  {
170  const std::vector<size_t> fo = rd->fieldOrder();
171 
172  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
173  {
174  switch (*it)
175  {
176  case 0:
177  ::avro::decode(d, v.lockType);
178  break;
179 
180  case 1:
181  ::avro::decode(d, v.info);
182  break;
183 
184  default:
185  break;
186  }
187  }
188  }
189  else
190  {
191  ::avro::decode(d, v.lockType);
192  ::avro::decode(d, v.info);
193  }
194  }
195  };
196 }
197 
198 #endif
std::map< std::string, std::string > info
Definition: lock_table.h:152
LockTableResponse()
Constructs a LockTableResponse object with default parameter values.
Definition: lock_table.h:145
std::map< std::string, std::string > options
Definition: lock_table.h:72
std::string tableName
Definition: lock_table.h:70
LockTableRequest(const std::string &tableName_, const std::string &lockType_, const std::map< std::string, std::string > &options_)
Constructs a LockTableRequest object with the specified parameters.
Definition: lock_table.h:63
std::string lockType
Definition: lock_table.h:71
A set of output parameters for const.
Definition: lock_table.h:139
LockTableRequest()
Constructs a LockTableRequest object with default parameter values.
Definition: lock_table.h:30
A set of input parameters for const.
Definition: lock_table.h:24