OmniSciDB  c07336695a
TargetValueConverterFactory Struct Reference

#include <TargetValueConvertersFactories.h>

Public Member Functions

std::unique_ptr< TargetValueConvertercreate (ConverterCreateParameter param)

Detailed Description

Definition at line 32 of file TargetValueConvertersFactories.h.

Member Function Documentation

◆ create()

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

Definition at line 226 of file TargetValueConvertersFactories.cpp.

References ColumnDescriptor::columnType, SQLTypeInfoCore< TYPE_FACET_PACK >::get_type(), SQLTypeInfoCore< TYPE_FACET_PACK >::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().

227  {
228  static const std::map<SQLTypes,
229  std::function<std::unique_ptr<TargetValueConverter>(
230  ConverterCreateParameter param)>>
252  auto factory = factories.find(>columnType.get_type());
254  if (factory != factories.end()) {
255  return factory->second(param);
256  } else {
257  throw std::runtime_error("Unsupported column type: " +
259  }
260 }
Definition: sqltypes.h:51
Definition: sqltypes.h:40
HOST DEVICE SQLTypes get_type() const
Definition: sqltypes.h:319
std::string get_type_name() const
Definition: sqltypes.h:422
Definition: sqltypes.h:54
Definition: sqltypes.h:55
Definition: sqltypes.h:43
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: