OmniSciDB  b24e664e58
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros 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 SQLTypeInfoCore< TYPE_FACET_PACK >::get_elem_type(), SQLTypeInfoCore< TYPE_FACET_PACK >::get_notnull(), NullAwareValidator< INNER_VALIDATOR >::inner_validator_, SQLTypeInfoCore< TYPE_FACET_PACK >::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
bool is_array() const
Definition: sqltypes.h:485
HOST DEVICE bool get_notnull() const
Definition: sqltypes.h:333
SQLTypeInfoCore get_elem_type() const
Definition: sqltypes.h:659

+ 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: