OmniSciDB  04ee39c94c
ArraysConverterFactory Struct Reference

Public Member Functions

std::unique_ptr< TargetValueConverteroperator() (ConverterCreateParameter param)
 

Detailed Description

Definition at line 170 of file TargetValueConvertersFactories.cpp.

Member Function Documentation

◆ operator()()

std::unique_ptr<TargetValueConverter> ArraysConverterFactory::operator() ( ConverterCreateParameter  param)
inline

Definition at line 171 of file TargetValueConvertersFactories.cpp.

References ColumnDescriptor::columnType, SQLTypeInfoCore< TYPE_FACET_PACK >::get_elem_type(), kBIGINT, kBOOLEAN, kCHAR, kDATE, kDECIMAL, kDOUBLE, kENCODING_DICT, kENCODING_NONE, kFLOAT, kINT, kNUMERIC, kSMALLINT, kTEXT, kTIME, kTIMESTAMP, kTINYINT, kVARCHAR, and ConverterCreateParameter::target.

171  {
172  const static std::map<std::tuple<SQLTypes, EncodingType>,
173  std::function<std::unique_ptr<TargetValueConverter>(
174  ConverterCreateParameter param)>>
175  array_converter_factories{
178  {{kINT, kENCODING_NONE},
190  {{kDATE, kENCODING_NONE},
192  {{kTIME, kENCODING_NONE},
200  {{kTEXT, kENCODING_DICT},
202  {{kCHAR, kENCODING_DICT},
206 
207  auto elem_type = param.target->columnType.get_elem_type();
208  auto factory = array_converter_factories.find(
209  {elem_type.get_type(), elem_type.get_compression()});
210 
211  if (factory != array_converter_factories.end()) {
212  return factory->second(param);
213  }
214 
215  throw std::runtime_error("Unsupported array column type");
216  }
Definition: sqltypes.h:51
SQLTypeInfoCore get_elem_type() const
Definition: sqltypes.h:632
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:

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