OmniSciDB  2e3a973ef4
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 1164 of file ParserNode.h.

Constructor & Destructor Documentation

◆ OptimizeTableStmt()

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

Definition at line 1166 of file ParserNode.h.

1166  : table_(table) {
1167  if (!table_) {
1168  throw std::runtime_error("Table name is required for OPTIMIZE command.");
1169  }
1170  if (o) {
1171  for (const auto e : *o) {
1172  options_.emplace_back(e);
1173  }
1174  delete o;
1175  }
1176  }
std::unique_ptr< std::string > table_
Definition: ParserNode.h:1195
std::list< std::unique_ptr< NameValueAssign > > options_
Definition: ParserNode.h:1196

Member Function Documentation

◆ execute()

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

Implements Parser::DDLStmt.

Definition at line 1189 of file ParserNode.h.

References CHECK.

1189  {
1190  // Should pass optimize params to the table optimizer
1191  CHECK(false);
1192  }
#define CHECK(condition)
Definition: Logger.h:197

◆ getTableName()

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

Definition at line 1178 of file ParserNode.h.

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

◆ shouldVacuumDeletedRows()

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

Definition at line 1180 of file ParserNode.h.

1180  {
1181  for (const auto& e : options_) {
1182  if (boost::iequals(*(e->get_name()), "VACUUM")) {
1183  return true;
1184  }
1185  }
1186  return false;
1187  }
std::list< std::unique_ptr< NameValueAssign > > options_
Definition: ParserNode.h:1196

Member Data Documentation

◆ options_

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

Definition at line 1196 of file ParserNode.h.

◆ table_

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

Definition at line 1195 of file ParserNode.h.


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