#include <ParserNode.h>
Definition at line 1290 of file ParserNode.h.
◆ RenameColumnStmt()
Parser::RenameColumnStmt::RenameColumnStmt |
( |
std::string * |
tab, |
|
|
std::string * |
col, |
|
|
std::string * |
new_col_name |
|
) |
| |
|
inline |
Definition at line 1292 of file ParserNode.h.
std::unique_ptr< std::string > table
std::unique_ptr< std::string > new_column_name
std::unique_ptr< std::string > column
◆ execute()
Implements Parser::DDLStmt.
Definition at line 3846 of file ParserNode.cpp.
References CHECK, Parser::check_alter_table_privilege(), Catalog_Namespace::SessionInfo::getCatalog(), ddl_utils::TABLE, and ddl_utils::validate_table_type().
Referenced by omnisci.cursor.Cursor::executemany().
3849 const auto td_with_lock =
3851 catalog, *
table,
false);
3852 const auto td = td_with_lock();
3858 if (cd ==
nullptr) {
3859 throw std::runtime_error(
"Column " + *
column +
" does not exist.");
3861 if (catalog.getMetadataForColumn(td->tableId, *
new_column_name) !=
nullptr) {
3862 throw std::runtime_error(
"Column " + *
new_column_name +
" already exists.");
std::unique_ptr< std::string > table
std::unique_ptr< std::string > new_column_name
Catalog & getCatalog() const
specifies the content in-memory of a row in the column metadata table
void check_alter_table_privilege(const Catalog_Namespace::SessionInfo &session, const TableDescriptor *td)
std::unique_ptr< std::string > column
void validate_table_type(const TableDescriptor *td, const TableType expected_table_type, const std::string &command)
◆ column
std::unique_ptr<std::string> Parser::RenameColumnStmt::column |
|
private |
◆ new_column_name
std::unique_ptr<std::string> Parser::RenameColumnStmt::new_column_name |
|
private |
◆ table
std::unique_ptr<std::string> Parser::RenameColumnStmt::table |
|
private |
The documentation for this class was generated from the following files:
- /home/jenkins-slave/workspace/core-os-doxygen/Parser/ParserNode.h
- /home/jenkins-slave/workspace/core-os-doxygen/Parser/ParserNode.cpp