OmniSciDB  c07336695a
Parser::OptimizeTableStmt Class Reference

#include <ParserNode.h>

+ Inheritance diagram for Parser::OptimizeTableStmt:
+ Collaboration diagram for Parser::OptimizeTableStmt:

Public Member Functions

 OptimizeTableStmt (std::string *table, std::list< NameValueAssign *> *o)
 
const std::string getTableName () const
 
bool shouldVacuumDeletedRows () const
 
void execute (const Catalog_Namespace::SessionInfo &session) override
 
- Public Member Functions inherited from Parser::DDLStmt
void setColumnDescriptor (ColumnDescriptor &cd, const ColumnDef *coldef)
 
- Public Member Functions inherited from Parser::Node
virtual ~Node ()
 

Private Attributes

std::unique_ptr< std::string > table_
 
std::list< std::unique_ptr< NameValueAssign > > options_
 

Detailed Description

Definition at line 1118 of file ParserNode.h.

Constructor & Destructor Documentation

◆ OptimizeTableStmt()

Parser::OptimizeTableStmt::OptimizeTableStmt ( std::string *  table,
std::list< NameValueAssign *> *  o 
)
inline

Definition at line 1120 of file ParserNode.h.

1120  : table_(table) {
1121  if (!table_) {
1122  throw std::runtime_error("Table name is required for OPTIMIZE command.");
1123  }
1124  if (o) {
1125  for (const auto e : *o) {
1126  options_.emplace_back(e);
1127  }
1128  delete o;
1129  }
1130  }
std::unique_ptr< std::string > table_
Definition: ParserNode.h:1149
std::list< std::unique_ptr< NameValueAssign > > options_
Definition: ParserNode.h:1150

Member Function Documentation

◆ execute()

void Parser::OptimizeTableStmt::execute ( const Catalog_Namespace::SessionInfo session)
inlineoverridevirtual

Implements Parser::DDLStmt.

Definition at line 1143 of file ParserNode.h.

References CHECK.

1143  {
1144  // Should pass optimize params to the table optimizer
1145  CHECK(false);
1146  }
#define CHECK(condition)
Definition: Logger.h:187

◆ getTableName()

const std::string Parser::OptimizeTableStmt::getTableName ( ) const
inline

Definition at line 1132 of file ParserNode.h.

1132 { return *(table_.get()); }
std::unique_ptr< std::string > table_
Definition: ParserNode.h:1149

◆ shouldVacuumDeletedRows()

bool Parser::OptimizeTableStmt::shouldVacuumDeletedRows ( ) const
inline

Definition at line 1134 of file ParserNode.h.

1134  {
1135  for (const auto& e : options_) {
1136  if (boost::iequals(*(e->get_name()), "VACUUM")) {
1137  return true;
1138  }
1139  }
1140  return false;
1141  }
std::list< std::unique_ptr< NameValueAssign > > options_
Definition: ParserNode.h:1150

Member Data Documentation

◆ options_

std::list<std::unique_ptr<NameValueAssign> > Parser::OptimizeTableStmt::options_
private

Definition at line 1150 of file ParserNode.h.

◆ table_

std::unique_ptr<std::string> Parser::OptimizeTableStmt::table_
private

Definition at line 1149 of file ParserNode.h.


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