GPUdb C++ API  Version 6.2.0.3
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  {
148  }
149 
150  std::string lockType;
151  };
152 }
153 
154 namespace avro
155 {
156  template<> struct codec_traits<gpudb::LockTableResponse>
157  {
158  static void encode(Encoder& e, const gpudb::LockTableResponse& v)
159  {
160  ::avro::encode(e, v.lockType);
161  }
162 
163  static void decode(Decoder& d, gpudb::LockTableResponse& v)
164  {
165  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
166  {
167  const std::vector<size_t> fo = rd->fieldOrder();
168 
169  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
170  {
171  switch (*it)
172  {
173  case 0:
174  ::avro::decode(d, v.lockType);
175  break;
176 
177  default:
178  break;
179  }
180  }
181  }
182  else
183  {
184  ::avro::decode(d, v.lockType);
185  }
186  }
187  };
188 }
189 
190 #endif
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 lockTable(const LockTableRequest&) 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 lockTable(const LockTableRequest&) const.
Definition: lock_table.h:24