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

#include <ParserNode.h>

+ Inheritance diagram for Parser::SelectEntry:
+ Collaboration diagram for Parser::SelectEntry:

Public Member Functions

 SelectEntry (Expr *e, std::string *r)
 
const Exprget_select_expr () const
 
const std::string * get_alias () const
 
std::string to_string () const
 
- Public Member Functions inherited from Parser::Node
virtual ~Node ()
 

Private Attributes

std::unique_ptr< Exprselect_expr_
 
std::unique_ptr< std::string > alias_
 

Detailed Description

Definition at line 1704 of file ParserNode.h.

Constructor & Destructor Documentation

Parser::SelectEntry::SelectEntry ( Expr e,
std::string *  r 
)
inline

Definition at line 1706 of file ParserNode.h.

1706 : select_expr_(e), alias_(r) {}
std::unique_ptr< Expr > select_expr_
Definition: ParserNode.h:1712
std::unique_ptr< std::string > alias_
Definition: ParserNode.h:1713

Member Function Documentation

const std::string* Parser::SelectEntry::get_alias ( ) const
inline

Definition at line 1708 of file ParserNode.h.

References alias_.

1708 { return alias_.get(); }
std::unique_ptr< std::string > alias_
Definition: ParserNode.h:1713
const Expr* Parser::SelectEntry::get_select_expr ( ) const
inline

Definition at line 1707 of file ParserNode.h.

References select_expr_.

1707 { return select_expr_.get(); }
std::unique_ptr< Expr > select_expr_
Definition: ParserNode.h:1712
std::string Parser::SelectEntry::to_string ( ) const

Definition at line 2127 of file ParserNode.cpp.

2127  {
2128  std::string str = select_expr_->to_string();
2129  if (alias_ != nullptr) {
2130  str += " AS " + *alias_;
2131  }
2132  return str;
2133 }
std::unique_ptr< Expr > select_expr_
Definition: ParserNode.h:1712
std::unique_ptr< std::string > alias_
Definition: ParserNode.h:1713

Member Data Documentation

std::unique_ptr<std::string> Parser::SelectEntry::alias_
private

Definition at line 1713 of file ParserNode.h.

Referenced by get_alias().

std::unique_ptr<Expr> Parser::SelectEntry::select_expr_
private

Definition at line 1712 of file ParserNode.h.

Referenced by get_select_expr().


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