OmniSciDB  dfae7c3b14
TargetValueConverterFactory Struct Reference

#include <TargetValueConvertersFactories.h>

Public Member Functions

std::unique_ptr< TargetValueConvertercreate (ConverterCreateParameter param)
 

Detailed Description

Definition at line 33 of file TargetValueConvertersFactories.h.

Member Function Documentation

◆ create()

std::unique_ptr< TargetValueConverter > TargetValueConverterFactory::create ( ConverterCreateParameter  param)

Definition at line 249 of file TargetValueConvertersFactories.cpp.

References ColumnDescriptor::columnType, SQLTypeInfo::get_type(), SQLTypeInfo::get_type_name(), kARRAY, kBIGINT, kBOOLEAN, kCHAR, kDATE, kDECIMAL, kDOUBLE, kFLOAT, kINT, kLINESTRING, kMULTIPOLYGON, kNUMERIC, kPOINT, kPOLYGON, kSMALLINT, kTEXT, kTIME, kTIMESTAMP, kTINYINT, kVARCHAR, and ConverterCreateParameter::target.

Referenced by Parser::InsertIntoTableAsSelectStmt::populateData(), and Fragmenter_Namespace::InsertOrderFragmenter::updateColumns().

250  {
251  static const std::map<SQLTypes,
252  std::function<std::unique_ptr<TargetValueConverter>(
253  ConverterCreateParameter param)>>
274 
275  auto factory = factories.find(param.target->columnType.get_type());
276 
277  if (factory != factories.end()) {
278  return factory->second(param);
279  } else {
280  throw std::runtime_error("Unsupported column type: " +
281  param.target->columnType.get_type_name());
282  }
283 }
Definition: sqltypes.h:51
SQLTypes
Definition: sqltypes.h:40
Definition: sqltypes.h:54
Definition: sqltypes.h:55
std::string get_type_name() const
Definition: sqltypes.h:362
Definition: sqltypes.h:43
HOST DEVICE SQLTypes get_type() const
Definition: sqltypes.h:259
Definition: sqltypes.h:47
SQLTypeInfo columnType
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

The documentation for this struct was generated from the following files: