OmniSciDB  c07336695a
Parser::DoubleLiteral Class Reference

#include <ParserNode.h>

+ Inheritance diagram for Parser::DoubleLiteral:
+ Collaboration diagram for Parser::DoubleLiteral:

Public Member Functions

 DoubleLiteral (double d)
double get_doubleval () 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

double doubleval

Additional Inherited Members

- Public Types inherited from Parser::Expr

Detailed Description

Definition at line 216 of file ParserNode.h.

Constructor & Destructor Documentation

◆ DoubleLiteral()

Parser::DoubleLiteral::DoubleLiteral ( double  d)

Definition at line 218 of file ParserNode.h.

218 : doubleval(d) {}
void d(const SQLTypes expected_type, const std::string &str)
Definition: ImportTest.cpp:268

Member Function Documentation

◆ analyze()

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

Implements Parser::Literal.

Definition at line 153 of file ParserNode.cpp.

References anonymous_namespace{ImportTest.cpp}::d(), Datum::doubleval, and kDOUBLE.

156  {
157  Datum d;
158  d.doubleval = doubleval;
159  return makeExpr<Analyzer::Constant>(kDOUBLE, false, d);
160 }
void d(const SQLTypes expected_type, const std::string &str)
Definition: ImportTest.cpp:268
double doubleval
Definition: sqltypes.h:128
+ Here is the call graph for this function:

◆ get_doubleval()

double Parser::DoubleLiteral::get_doubleval ( ) const

Definition at line 219 of file ParserNode.h.

References anonymous_namespace{UpdateMetadataTest.cpp}::query.

219 { return doubleval; }

◆ to_string()

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

Implements Parser::Literal.

Definition at line 224 of file ParserNode.h.

224  {
225  return boost::lexical_cast<std::string>(doubleval);
226  }

Member Data Documentation

◆ doubleval

double Parser::DoubleLiteral::doubleval

Definition at line 229 of file ParserNode.h.

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