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