GPUdb C++ API  Version 7.2.2.4
create_table_monitor.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 __CREATE_TABLE_MONITOR_H__
7 #define __CREATE_TABLE_MONITOR_H__
8 
9 namespace gpudb
10 {
37  {
43  tableName(std::string()),
44  options(std::map<std::string, std::string>())
45  {
46  }
47 
175  CreateTableMonitorRequest(const std::string& tableName_, const std::map<std::string, std::string>& options_):
176  tableName( tableName_ ),
177  options( options_ )
178  {
179  }
180 
187  std::string tableName;
188 
269  std::map<std::string, std::string> options;
270  };
271 } // end namespace gpudb
272 
273 namespace avro
274 {
275  template<> struct codec_traits<gpudb::CreateTableMonitorRequest>
276  {
277  static void encode(Encoder& e, const gpudb::CreateTableMonitorRequest& v)
278  {
279  ::avro::encode(e, v.tableName);
280  ::avro::encode(e, v.options);
281  }
282 
283  static void decode(Decoder& d, gpudb::CreateTableMonitorRequest& v)
284  {
285  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
286  {
287  const std::vector<size_t> fo = rd->fieldOrder();
288 
289  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
290  {
291  switch (*it)
292  {
293  case 0:
294  ::avro::decode(d, v.tableName);
295  break;
296 
297  case 1:
298  ::avro::decode(d, v.options);
299  break;
300 
301  default:
302  break;
303  }
304  }
305  }
306  else
307  {
308  ::avro::decode(d, v.tableName);
309  ::avro::decode(d, v.options);
310  }
311  }
312  };
313 } // end namespace avro
314 
315 namespace gpudb
316 {
323  {
329  topicId(std::string()),
330  tableName(std::string()),
331  typeSchema(std::string()),
332  info(std::map<std::string, std::string>())
333  {
334  }
335 
339  std::string topicId;
340 
345  std::string tableName;
346 
351  std::string typeSchema;
352 
383  std::map<std::string, std::string> info;
384  };
385 } // end namespace gpudb
386 
387 namespace avro
388 {
389  template<> struct codec_traits<gpudb::CreateTableMonitorResponse>
390  {
391  static void encode(Encoder& e, const gpudb::CreateTableMonitorResponse& v)
392  {
393  ::avro::encode(e, v.topicId);
394  ::avro::encode(e, v.tableName);
395  ::avro::encode(e, v.typeSchema);
396  ::avro::encode(e, v.info);
397  }
398 
399  static void decode(Decoder& d, gpudb::CreateTableMonitorResponse& v)
400  {
401  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
402  {
403  const std::vector<size_t> fo = rd->fieldOrder();
404 
405  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
406  {
407  switch (*it)
408  {
409  case 0:
410  ::avro::decode(d, v.topicId);
411  break;
412 
413  case 1:
414  ::avro::decode(d, v.tableName);
415  break;
416 
417  case 2:
418  ::avro::decode(d, v.typeSchema);
419  break;
420 
421  case 3:
422  ::avro::decode(d, v.info);
423  break;
424 
425  default:
426  break;
427  }
428  }
429  }
430  else
431  {
432  ::avro::decode(d, v.topicId);
433  ::avro::decode(d, v.tableName);
434  ::avro::decode(d, v.typeSchema);
435  ::avro::decode(d, v.info);
436  }
437  }
438  };
439 } // end namespace avro
440 
441 #endif // __CREATE_TABLE_MONITOR_H__
std::map< std::string, std::string > options
Optional parameters.
A set of results returned by GPUdb::createTableMonitor.
std::string tableName
Value of tableName.
std::string topicId
The ZMQ topic ID to subscribe to for table events.
std::string tableName
Name of the table to monitor, in [ schema_name. ]table_name format, using standard name resolution ru...
CreateTableMonitorResponse()
Constructs a CreateTableMonitorResponse object with default parameters.
A set of parameters for GPUdb::createTableMonitor.
CreateTableMonitorRequest()
Constructs a CreateTableMonitorRequest object with default parameters.
CreateTableMonitorRequest(const std::string &tableName_, const std::map< std::string, std::string > &options_)
Constructs a CreateTableMonitorRequest object with the specified parameters.
std::map< std::string, std::string > info
Additional information.
std::string typeSchema
JSON Avro schema of the table, for use in decoding published records.