OmniSciDB  b24e664e58
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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 1124 of file ParserNode.h.

Constructor & Destructor Documentation

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

Definition at line 1126 of file ParserNode.h.

References options_, and table_.

1126  : table_(table) {
1127  if (!table_) {
1128  throw std::runtime_error("Table name is required for OPTIMIZE command.");
1129  }
1130  if (o) {
1131  for (const auto e : *o) {
1132  options_.emplace_back(e);
1133  }
1134  delete o;
1135  }
1136  }
std::unique_ptr< std::string > table_
Definition: ParserNode.h:1155
std::list< std::unique_ptr< NameValueAssign > > options_
Definition: ParserNode.h:1156

Member Function Documentation

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

Implements Parser::DDLStmt.

Definition at line 1149 of file ParserNode.h.

References CHECK().

1149  {
1150  // Should pass optimize params to the table optimizer
1151  CHECK(false);
1152  }
CHECK(cgen_state)

+ Here is the call graph for this function:

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

Definition at line 1138 of file ParserNode.h.

References table_.

1138 { return *(table_.get()); }
std::unique_ptr< std::string > table_
Definition: ParserNode.h:1155
bool Parser::OptimizeTableStmt::shouldVacuumDeletedRows ( ) const
inline

Definition at line 1140 of file ParserNode.h.

References options_.

1140  {
1141  for (const auto& e : options_) {
1142  if (boost::iequals(*(e->get_name()), "VACUUM")) {
1143  return true;
1144  }
1145  }
1146  return false;
1147  }
std::list< std::unique_ptr< NameValueAssign > > options_
Definition: ParserNode.h:1156

Member Data Documentation

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

Definition at line 1156 of file ParserNode.h.

Referenced by OptimizeTableStmt(), and shouldVacuumDeletedRows().

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

Definition at line 1155 of file ParserNode.h.

Referenced by getTableName(), and OptimizeTableStmt().


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