OmniSciDB  c07336695a
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 1499 of file ParserNode.h.

Constructor & Destructor Documentation

◆ SelectEntry()

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

Definition at line 1501 of file ParserNode.h.

1501 : select_expr(e), alias(r) {}
std::unique_ptr< Expr > select_expr
Definition: ParserNode.h:1507
std::unique_ptr< std::string > alias
Definition: ParserNode.h:1508

Member Function Documentation

◆ get_alias()

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

Definition at line 1503 of file ParserNode.h.

References to_string().

1503 { return alias.get(); }
std::unique_ptr< std::string > alias
Definition: ParserNode.h:1508
+ Here is the call graph for this function:

◆ get_select_expr()

const Expr* Parser::SelectEntry::get_select_expr ( ) const
inline

Definition at line 1502 of file ParserNode.h.

1502 { return select_expr.get(); }
std::unique_ptr< Expr > select_expr
Definition: ParserNode.h:1507

◆ to_string()

std::string Parser::SelectEntry::to_string ( ) const

Definition at line 1300 of file ParserNode.cpp.

1300  {
1301  std::string str = select_expr->to_string();
1302  if (alias != nullptr) {
1303  str += " AS " + *alias;
1304  }
1305  return str;
1306 }
std::unique_ptr< Expr > select_expr
Definition: ParserNode.h:1507
std::unique_ptr< std::string > alias
Definition: ParserNode.h:1508

Member Data Documentation

◆ alias

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

Definition at line 1508 of file ParserNode.h.

◆ select_expr

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

Definition at line 1507 of file ParserNode.h.


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