OmniSciDB  ba1bac9284
 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 1202 of file ParserNode.h.

Constructor & Destructor Documentation

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

Definition at line 1204 of file ParserNode.h.

References options_, and table_.

1204  : table_(table) {
1205  if (!table_) {
1206  throw std::runtime_error("Table name is required for OPTIMIZE command.");
1207  }
1208  if (o) {
1209  for (const auto e : *o) {
1210  options_.emplace_back(e);
1211  }
1212  delete o;
1213  }
1214  }
std::unique_ptr< std::string > table_
Definition: ParserNode.h:1233
std::list< std::unique_ptr< NameValueAssign > > options_
Definition: ParserNode.h:1234

Member Function Documentation

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

Implements Parser::DDLStmt.

Definition at line 1227 of file ParserNode.h.

References CHECK.

Referenced by omnisci.cursor.Cursor::executemany().

1227  {
1228  // Should pass optimize params to the table optimizer
1229  CHECK(false);
1230  }
#define CHECK(condition)
Definition: Logger.h:206

+ Here is the caller graph for this function:

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

Definition at line 1216 of file ParserNode.h.

References table_.

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

Definition at line 1218 of file ParserNode.h.

References options_.

1218  {
1219  for (const auto& e : options_) {
1220  if (boost::iequals(*(e->get_name()), "VACUUM")) {
1221  return true;
1222  }
1223  }
1224  return false;
1225  }
std::list< std::unique_ptr< NameValueAssign > > options_
Definition: ParserNode.h:1234

Member Data Documentation

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

Definition at line 1234 of file ParserNode.h.

Referenced by OptimizeTableStmt(), and shouldVacuumDeletedRows().

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

Definition at line 1233 of file ParserNode.h.

Referenced by getTableName(), and OptimizeTableStmt().


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