GPUdb C++ API  Version 5.2.0.0
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 
52  LockTableRequest(const std::string& tableName, const std::string& lockType, const std::map<std::string, std::string>& options):
53  tableName(tableName),
54  lockType(lockType),
55  options(options)
56  {
57  }
58 
59  std::string tableName;
60  std::string lockType;
61  std::map<std::string, std::string> options;
62  };
63 }
64 
65 namespace avro
66 {
67  template<> struct codec_traits<gpudb::LockTableRequest>
68  {
69  static void encode(Encoder& e, const gpudb::LockTableRequest& v)
70  {
71  ::avro::encode(e, v.tableName);
72  ::avro::encode(e, v.lockType);
73  ::avro::encode(e, v.options);
74  }
75 
76  static void decode(Decoder& d, gpudb::LockTableRequest& v)
77  {
78  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
79  {
80  const std::vector<size_t> fo = rd->fieldOrder();
81 
82  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
83  {
84  switch (*it)
85  {
86  case 0:
87  ::avro::decode(d, v.tableName);
88  break;
89 
90  case 1:
91  ::avro::decode(d, v.lockType);
92  break;
93 
94  case 2:
95  ::avro::decode(d, v.options);
96  break;
97 
98  default:
99  break;
100  }
101  }
102  }
103  else
104  {
105  ::avro::decode(d, v.tableName);
106  ::avro::decode(d, v.lockType);
107  ::avro::decode(d, v.options);
108  }
109  }
110  };
111 }
112 
113 namespace gpudb
114 {
115 
129  {
130 
135  lockType(std::string())
136  {
137  }
138 
139  std::string lockType;
140  };
141 }
142 
143 namespace avro
144 {
145  template<> struct codec_traits<gpudb::LockTableResponse>
146  {
147  static void encode(Encoder& e, const gpudb::LockTableResponse& v)
148  {
149  ::avro::encode(e, v.lockType);
150  }
151 
152  static void decode(Decoder& d, gpudb::LockTableResponse& v)
153  {
154  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
155  {
156  const std::vector<size_t> fo = rd->fieldOrder();
157 
158  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
159  {
160  switch (*it)
161  {
162  case 0:
163  ::avro::decode(d, v.lockType);
164  break;
165 
166  default:
167  break;
168  }
169  }
170  }
171  else
172  {
173  ::avro::decode(d, v.lockType);
174  }
175  }
176  };
177 }
178 
179 #endif
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:52
LockTableResponse()
Constructs a LockTableResponse object with default parameter values.
Definition: lock_table.h:134
std::map< std::string, std::string > options
Definition: lock_table.h:61
std::string tableName
Definition: lock_table.h:59
std::string lockType
Definition: lock_table.h:60
A set of output parameters for lockTable(const LockTableRequest&) const.
Definition: lock_table.h:128
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