GPUdb C++ API  Version 7.1.10.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 
66  LockTableRequest(const std::string& tableName_, const std::string& lockType_, const std::map<std::string, std::string>& options_):
67  tableName( tableName_ ),
68  lockType( lockType_ ),
69  options( options_ )
70  {
71  }
72 
73  std::string tableName;
74  std::string lockType;
75  std::map<std::string, std::string> options;
76  };
77 }
78 
79 namespace avro
80 {
81  template<> struct codec_traits<gpudb::LockTableRequest>
82  {
83  static void encode(Encoder& e, const gpudb::LockTableRequest& v)
84  {
85  ::avro::encode(e, v.tableName);
86  ::avro::encode(e, v.lockType);
87  ::avro::encode(e, v.options);
88  }
89 
90  static void decode(Decoder& d, gpudb::LockTableRequest& v)
91  {
92  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
93  {
94  const std::vector<size_t> fo = rd->fieldOrder();
95 
96  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
97  {
98  switch (*it)
99  {
100  case 0:
101  ::avro::decode(d, v.tableName);
102  break;
103 
104  case 1:
105  ::avro::decode(d, v.lockType);
106  break;
107 
108  case 2:
109  ::avro::decode(d, v.options);
110  break;
111 
112  default:
113  break;
114  }
115  }
116  }
117  else
118  {
119  ::avro::decode(d, v.tableName);
120  ::avro::decode(d, v.lockType);
121  ::avro::decode(d, v.options);
122  }
123  }
124  };
125 }
126 
127 namespace gpudb
128 {
129 
143  {
144 
149  lockType(std::string()),
150  info(std::map<std::string, std::string>())
151  {
152  }
153 
154  std::string lockType;
155  std::map<std::string, std::string> info;
156  };
157 }
158 
159 namespace avro
160 {
161  template<> struct codec_traits<gpudb::LockTableResponse>
162  {
163  static void encode(Encoder& e, const gpudb::LockTableResponse& v)
164  {
165  ::avro::encode(e, v.lockType);
166  ::avro::encode(e, v.info);
167  }
168 
169  static void decode(Decoder& d, gpudb::LockTableResponse& v)
170  {
171  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
172  {
173  const std::vector<size_t> fo = rd->fieldOrder();
174 
175  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
176  {
177  switch (*it)
178  {
179  case 0:
180  ::avro::decode(d, v.lockType);
181  break;
182 
183  case 1:
184  ::avro::decode(d, v.info);
185  break;
186 
187  default:
188  break;
189  }
190  }
191  }
192  else
193  {
194  ::avro::decode(d, v.lockType);
195  ::avro::decode(d, v.info);
196  }
197  }
198  };
199 }
200 
201 #endif
std::map< std::string, std::string > info
Definition: lock_table.h:155
LockTableResponse()
Constructs a LockTableResponse object with default parameter values.
Definition: lock_table.h:148
std::map< std::string, std::string > options
Definition: lock_table.h:75
std::string tableName
Definition: lock_table.h:73
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:66
std::string lockType
Definition: lock_table.h:74
A set of output parameters for const.
Definition: lock_table.h:142
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