OmniSciDB  a5dc49c757
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
NullAwareValidator< INNER_VALIDATOR > Class Template Reference

#include <Encoder.h>

Public Member Functions

 NullAwareValidator (SQLTypeInfo type, INNER_VALIDATOR *inner_validator)
 
template<typename T >
void validate (T value)
 

Private Attributes

bool skip_null_check_
 
INNER_VALIDATOR * inner_validator_
 

Detailed Description

template<typename INNER_VALIDATOR>
class NullAwareValidator< INNER_VALIDATOR >

Definition at line 86 of file Encoder.h.

Constructor & Destructor Documentation

template<typename INNER_VALIDATOR>
NullAwareValidator< INNER_VALIDATOR >::NullAwareValidator ( SQLTypeInfo  type,
INNER_VALIDATOR *  inner_validator 
)
inline

Definition at line 88 of file Encoder.h.

References SQLTypeInfo::get_elem_type(), SQLTypeInfo::get_notnull(), NullAwareValidator< INNER_VALIDATOR >::inner_validator_, SQLTypeInfo::is_array(), and NullAwareValidator< INNER_VALIDATOR >::skip_null_check_.

88  {
89  if (type.is_array()) {
90  type = type.get_elem_type();
91  }
92 
94  inner_validator_ = inner_validator;
95  }
INNER_VALIDATOR * inner_validator_
Definition: Encoder.h:106
bool skip_null_check_
Definition: Encoder.h:105
HOST DEVICE bool get_notnull() const
Definition: sqltypes.h:398
SQLTypeInfo get_elem_type() const
Definition: sqltypes.h:977
bool is_array() const
Definition: sqltypes.h:585

+ Here is the call graph for this function:

Member Function Documentation

template<typename INNER_VALIDATOR>
template<typename T >
void NullAwareValidator< INNER_VALIDATOR >::validate ( value)
inline

Definition at line 98 of file Encoder.h.

References NullAwareValidator< INNER_VALIDATOR >::inner_validator_, and NullAwareValidator< INNER_VALIDATOR >::skip_null_check_.

Referenced by Fragmenter_Namespace::InsertOrderFragmenter::updateColumn().

98  {
99  if (skip_null_check_ || value != inline_int_null_value<T>()) {
100  inner_validator_->template validate<T>(value);
101  }
102  }
INNER_VALIDATOR * inner_validator_
Definition: Encoder.h:106
bool skip_null_check_
Definition: Encoder.h:105

+ Here is the caller graph for this function:

Member Data Documentation

template<typename INNER_VALIDATOR>
INNER_VALIDATOR* NullAwareValidator< INNER_VALIDATOR >::inner_validator_
private
template<typename INNER_VALIDATOR>
bool NullAwareValidator< INNER_VALIDATOR >::skip_null_check_
private

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