OmniSciDB  b24e664e58
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros 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 1600 of file ParserNode.h.

Constructor & Destructor Documentation

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

Definition at line 1602 of file ParserNode.h.

1602 : select_expr(e), alias(r) {}
std::unique_ptr< Expr > select_expr
Definition: ParserNode.h:1608
std::unique_ptr< std::string > alias
Definition: ParserNode.h:1609

Member Function Documentation

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

Definition at line 1604 of file ParserNode.h.

References alias.

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

Definition at line 1603 of file ParserNode.h.

References select_expr.

1603 { return select_expr.get(); }
std::unique_ptr< Expr > select_expr
Definition: ParserNode.h:1608
std::string Parser::SelectEntry::to_string ( ) const

Definition at line 1315 of file ParserNode.cpp.

1315  {
1316  std::string str = select_expr->to_string();
1317  if (alias != nullptr) {
1318  str += " AS " + *alias;
1319  }
1320  return str;
1321 }
std::unique_ptr< Expr > select_expr
Definition: ParserNode.h:1608
std::unique_ptr< std::string > alias
Definition: ParserNode.h:1609

Member Data Documentation

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

Definition at line 1609 of file ParserNode.h.

Referenced by get_alias().

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

Definition at line 1608 of file ParserNode.h.

Referenced by get_select_expr().


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