OmniSciDB  c1a53651b2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Parser::IsNullExpr Class Reference

#include <ParserNode.h>

+ Inheritance diagram for Parser::IsNullExpr:
+ Collaboration diagram for Parser::IsNullExpr:

Public Member Functions

 IsNullExpr (bool n, Expr *a)
 
bool get_is_not () const
 
std::shared_ptr< Analyzer::Expranalyze (const Catalog_Namespace::Catalog &catalog, Analyzer::Query &query, TlistRefType allow_tlist_ref=TLIST_NONE) const override
 
std::string to_string () const override
 
- Public Member Functions inherited from Parser::Node
virtual ~Node ()
 

Private Attributes

bool is_not_
 
std::unique_ptr< Exprarg_
 

Additional Inherited Members

- Public Types inherited from Parser::Expr
enum  TlistRefType { TLIST_NONE, TLIST_REF, TLIST_COPY }
 

Detailed Description

Definition at line 345 of file ParserNode.h.

Constructor & Destructor Documentation

Parser::IsNullExpr::IsNullExpr ( bool  n,
Expr a 
)
inline

Definition at line 347 of file ParserNode.h.

347 : is_not_(n), arg_(a) {}
std::unique_ptr< Expr > arg_
Definition: ParserNode.h:357
constexpr double a
Definition: Utm.h:32
constexpr double n
Definition: Utm.h:38

Member Function Documentation

std::shared_ptr< Analyzer::Expr > Parser::IsNullExpr::analyze ( const Catalog_Namespace::Catalog catalog,
Analyzer::Query query,
TlistRefType  allow_tlist_ref = TLIST_NONE 
) const
overridevirtual

Implements Parser::Expr.

Definition at line 508 of file ParserNode.cpp.

References kBOOLEAN, kISNULL, kNOT, and run_benchmark_import::result.

511  {
512  auto arg_expr = arg_->analyze(catalog, query, allow_tlist_ref);
513  auto result = makeExpr<Analyzer::UOper>(kBOOLEAN, kISNULL, arg_expr);
514  if (is_not_) {
515  result = makeExpr<Analyzer::UOper>(kBOOLEAN, kNOT, result);
516  }
517  return result;
518 }
std::unique_ptr< Expr > arg_
Definition: ParserNode.h:357
Definition: sqldefs.h:38
bool Parser::IsNullExpr::get_is_not ( ) const
inline

Definition at line 348 of file ParserNode.h.

References is_not_.

348 { return is_not_; }
std::string Parser::IsNullExpr::to_string ( ) const
overridevirtual

Implements Parser::Expr.

Definition at line 2165 of file ParserNode.cpp.

2165  {
2166  std::string str = arg_->to_string();
2167  if (is_not_) {
2168  str += " IS NOT NULL";
2169  } else {
2170  str += " IS NULL";
2171  }
2172  return str;
2173 }
std::unique_ptr< Expr > arg_
Definition: ParserNode.h:357

Member Data Documentation

std::unique_ptr<Expr> Parser::IsNullExpr::arg_
private

Definition at line 357 of file ParserNode.h.

bool Parser::IsNullExpr::is_not_
private

Definition at line 356 of file ParserNode.h.

Referenced by get_is_not().


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