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

#include <TargetValueConvertersFactories.h>

Public Member Functions

< TargetValueConverter
create (ConverterCreateParameter param)

Detailed Description

Definition at line 40 of file TargetValueConvertersFactories.h.

Member Function Documentation

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

Definition at line 262 of file TargetValueConvertersFactories.cpp.

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

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

263  {
264  static const std::map<SQLTypes,
265  std::function<std::unique_ptr<TargetValueConverter>(
266  ConverterCreateParameter param)>>
267  factories{
291  auto factory = factories.find(>columnType.get_type());
293  if (factory != factories.end()) {
294  return factory->second(param);
295  } else {
296  throw std::runtime_error("Unsupported column type: " +
298  }
299 }
Definition: sqltypes.h:66
Definition: sqltypes.h:55
HOST DEVICE SQLTypes get_type() const
Definition: sqltypes.h:381
Definition: sqltypes.h:69
Definition: sqltypes.h:70
std::string get_type_name() const
Definition: sqltypes.h:507
Definition: sqltypes.h:58
Definition: sqltypes.h:62
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: