GPUdb C++ API  Version 7.2.2.4
lock_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 __LOCK_TABLE_H__
7 #define __LOCK_TABLE_H__
8 
9 namespace gpudb
10 {
27  {
32  tableName(std::string()),
33  lockType(std::string()),
34  options(std::map<std::string, std::string>())
35  {
36  }
37 
74  LockTableRequest(const std::string& tableName_, const std::string& lockType_, const std::map<std::string, std::string>& options_):
75  tableName( tableName_ ),
76  lockType( lockType_ ),
77  options( options_ )
78  {
79  }
80 
88  std::string tableName;
89 
110  std::string lockType;
111 
115  std::map<std::string, std::string> options;
116  };
117 } // end namespace gpudb
118 
119 namespace avro
120 {
121  template<> struct codec_traits<gpudb::LockTableRequest>
122  {
123  static void encode(Encoder& e, const gpudb::LockTableRequest& v)
124  {
125  ::avro::encode(e, v.tableName);
126  ::avro::encode(e, v.lockType);
127  ::avro::encode(e, v.options);
128  }
129 
130  static void decode(Decoder& d, gpudb::LockTableRequest& v)
131  {
132  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
133  {
134  const std::vector<size_t> fo = rd->fieldOrder();
135 
136  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
137  {
138  switch (*it)
139  {
140  case 0:
141  ::avro::decode(d, v.tableName);
142  break;
143 
144  case 1:
145  ::avro::decode(d, v.lockType);
146  break;
147 
148  case 2:
149  ::avro::decode(d, v.options);
150  break;
151 
152  default:
153  break;
154  }
155  }
156  }
157  else
158  {
159  ::avro::decode(d, v.tableName);
160  ::avro::decode(d, v.lockType);
161  ::avro::decode(d, v.options);
162  }
163  }
164  };
165 } // end namespace avro
166 
167 namespace gpudb
168 {
174  {
179  lockType(std::string()),
180  info(std::map<std::string, std::string>())
181  {
182  }
183 
187  std::string lockType;
188 
192  std::map<std::string, std::string> info;
193  };
194 } // end namespace gpudb
195 
196 namespace avro
197 {
198  template<> struct codec_traits<gpudb::LockTableResponse>
199  {
200  static void encode(Encoder& e, const gpudb::LockTableResponse& v)
201  {
202  ::avro::encode(e, v.lockType);
203  ::avro::encode(e, v.info);
204  }
205 
206  static void decode(Decoder& d, gpudb::LockTableResponse& v)
207  {
208  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
209  {
210  const std::vector<size_t> fo = rd->fieldOrder();
211 
212  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
213  {
214  switch (*it)
215  {
216  case 0:
217  ::avro::decode(d, v.lockType);
218  break;
219 
220  case 1:
221  ::avro::decode(d, v.info);
222  break;
223 
224  default:
225  break;
226  }
227  }
228  }
229  else
230  {
231  ::avro::decode(d, v.lockType);
232  ::avro::decode(d, v.info);
233  }
234  }
235  };
236 } // end namespace avro
237 
238 #endif // __LOCK_TABLE_H__
std::map< std::string, std::string > info
Additional information.
Definition: lock_table.h:192
std::string lockType
Returns the lock state of the table.
Definition: lock_table.h:187
LockTableResponse()
Constructs a LockTableResponse object with default parameters.
Definition: lock_table.h:178
std::map< std::string, std::string > options
Optional parameters.
Definition: lock_table.h:115
std::string tableName
Name of the table to be locked, in [ schema_name. ]table_name format, using standard name resolution ...
Definition: lock_table.h:88
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:74
std::string lockType
The type of lock being applied to the table.
Definition: lock_table.h:110
A set of results returned by GPUdb::lockTable.
Definition: lock_table.h:173
LockTableRequest()
Constructs a LockTableRequest object with default parameters.
Definition: lock_table.h:31
A set of parameters for GPUdb::lockTable.
Definition: lock_table.h:26