OmniSciDB  c07336695a
Parser::UpdateStmt Class Reference

#include <ParserNode.h>

+ Inheritance diagram for Parser::UpdateStmt:
+ Collaboration diagram for Parser::UpdateStmt:

Public Member Functions

 UpdateStmt (std::string *t, std::list< Assignment *> *a, Expr *w)
 
const std::string * get_table () const
 
const std::list< std::unique_ptr< Assignment > > & get_assignment_list () const
 
const Exprget_where_clause () const
 
void analyze (const Catalog_Namespace::Catalog &catalog, Analyzer::Query &query) const override
 
- Public Member Functions inherited from Parser::Node
virtual ~Node ()
 

Private Attributes

std::unique_ptr< std::string > table
 
std::list< std::unique_ptr< Assignment > > assignment_list
 
std::unique_ptr< Exprwhere_clause
 

Detailed Description

Definition at line 1881 of file ParserNode.h.

Constructor & Destructor Documentation

◆ UpdateStmt()

Parser::UpdateStmt::UpdateStmt ( std::string *  t,
std::list< Assignment *> *  a,
Expr w 
)
inline

Definition at line 1883 of file ParserNode.h.

References CHECK.

1884  : table(t), where_clause(w) {
1885  CHECK(a);
1886  for (const auto e : *a) {
1887  assignment_list.emplace_back(e);
1888  }
1889  delete a;
1890  }
std::unique_ptr< std::string > table
Definition: ParserNode.h:1900
std::unique_ptr< Expr > where_clause
Definition: ParserNode.h:1902
std::list< std::unique_ptr< Assignment > > assignment_list
Definition: ParserNode.h:1901
#define CHECK(condition)
Definition: Logger.h:187

Member Function Documentation

◆ analyze()

void Parser::UpdateStmt::analyze ( const Catalog_Namespace::Catalog catalog,
Analyzer::Query query 
) const
overridevirtual

Implements Parser::DMLStmt.

Definition at line 1868 of file ParserNode.cpp.

1869  {
1870  throw std::runtime_error("UPDATE statement not supported yet.");
1871 }

◆ get_assignment_list()

const std::list<std::unique_ptr<Assignment> >& Parser::UpdateStmt::get_assignment_list ( ) const
inline

Definition at line 1892 of file ParserNode.h.

1892  {
1893  return assignment_list;
1894  }
std::list< std::unique_ptr< Assignment > > assignment_list
Definition: ParserNode.h:1901

◆ get_table()

const std::string* Parser::UpdateStmt::get_table ( ) const
inline

Definition at line 1891 of file ParserNode.h.

1891 { return table.get(); }
std::unique_ptr< std::string > table
Definition: ParserNode.h:1900

◆ get_where_clause()

const Expr* Parser::UpdateStmt::get_where_clause ( ) const
inline

Definition at line 1895 of file ParserNode.h.

References anonymous_namespace{UpdateMetadataTest.cpp}::query.

1895 { return where_clause.get(); }
std::unique_ptr< Expr > where_clause
Definition: ParserNode.h:1902

Member Data Documentation

◆ assignment_list

std::list<std::unique_ptr<Assignment> > Parser::UpdateStmt::assignment_list
private

Definition at line 1901 of file ParserNode.h.

◆ table

std::unique_ptr<std::string> Parser::UpdateStmt::table
private

Definition at line 1900 of file ParserNode.h.

◆ where_clause

std::unique_ptr<Expr> Parser::UpdateStmt::where_clause
private

Definition at line 1902 of file ParserNode.h.


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