OmniSciDB  0fdbebe030
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Parser::DropUserStmt Class Reference

#include <ParserNode.h>

+ Inheritance diagram for Parser::DropUserStmt:
+ Collaboration diagram for Parser::DropUserStmt:

Public Member Functions

 DropUserStmt (std::string *n)
auto const & getUserName ()
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 > user_name

Detailed Description

Definition at line 1947 of file ParserNode.h.

Constructor & Destructor Documentation

Parser::DropUserStmt::DropUserStmt ( std::string *  n)

Definition at line 1949 of file ParserNode.h.

1949 : user_name(n) {}
std::unique_ptr< std::string > user_name
Definition: ParserNode.h:1954

Member Function Documentation

void Parser::DropUserStmt::execute ( const Catalog_Namespace::SessionInfo session)

Implements Parser::DDLStmt.

Definition at line 4644 of file ParserNode.cpp.

References Catalog_Namespace::SessionInfo::get_currentUser(), and Catalog_Namespace::UserMetadata::isSuper.

4644  {
4645  if (!session.get_currentUser().isSuper) {
4646  throw std::runtime_error("Only super user can drop users.");
4647  }
4648  SysCatalog::instance().dropUser(*user_name);
4649 }
std::unique_ptr< std::string > user_name
Definition: ParserNode.h:1954
const UserMetadata & get_currentUser() const
Definition: SessionInfo.h:79
std::atomic< bool > isSuper
Definition: SysCatalog.h:96

+ Here is the call graph for this function:

auto const& Parser::DropUserStmt::getUserName ( )

Definition at line 1950 of file ParserNode.h.

References user_name.

1950 { return user_name; }
std::unique_ptr< std::string > user_name
Definition: ParserNode.h:1954

Member Data Documentation

std::unique_ptr<std::string> Parser::DropUserStmt::user_name

Definition at line 1954 of file ParserNode.h.

Referenced by getUserName().

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