OmniSciDB  b24e664e58
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
TargetValueConverterFactory Struct Reference

#include <TargetValueConvertersFactories.h>

Public Member Functions

std::unique_ptr
< TargetValueConverter
create (ConverterCreateParameter param)
 

Detailed Description

Definition at line 33 of file TargetValueConvertersFactories.h.

Member Function Documentation

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

Definition at line 227 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().

228  {
229  static const std::map<SQLTypes,
230  std::function<std::unique_ptr<TargetValueConverter>(
231  ConverterCreateParameter param)>>
252 
253  auto factory = factories.find(param.target->columnType.get_type());
254 
255  if (factory != factories.end()) {
256  return factory->second(param);
257  } else {
258  throw std::runtime_error("Unsupported column type: " +
259  param.target->columnType.get_type_name());
260  }
261 }
Definition: sqltypes.h:52
SQLTypes
Definition: sqltypes.h:41
std::string get_type_name() const
Definition: sqltypes.h:429
HOST DEVICE SQLTypes get_type() const
Definition: sqltypes.h:326
Definition: sqltypes.h:55
Definition: sqltypes.h:56
Definition: sqltypes.h:44
Definition: sqltypes.h:48
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: