OmniSciDB
a5dc49c757
|
#include <SessionInfo.h>
Public Member Functions | |
SessionInfo (std::shared_ptr< Catalog > cat, const UserMetadata &user, const ExecutorDeviceType t, const std::string &sid) | |
SessionInfo (const SessionInfo &s) | |
Catalog & | getCatalog () const |
std::shared_ptr< Catalog > | get_catalog_ptr () const |
void | set_catalog_ptr (std::shared_ptr< Catalog > c) |
const UserMetadata & | get_currentUser () const |
const ExecutorDeviceType | get_executor_device_type () const |
void | set_executor_device_type (ExecutorDeviceType t) |
std::string | get_session_id () const |
time_t | get_last_used_time () const |
void | update_last_used_time () |
bool | checkDBAccessPrivileges (const DBObjectType &permissionType, const AccessPrivileges &privs, const std::string &objectName="") const |
time_t | get_start_time () const |
std::string const & | get_public_session_id () const |
operator std::string () const | |
std::string const & | get_connection_info () const |
void | set_connection_info (const std::string &connection) |
heavyai::shared_mutex & | getLock () |
Private Member Functions | |
std::string | public_session_id () const |
Private Attributes | |
std::shared_ptr< Catalog > | catalog_ |
UserMetadata | currentUser_ |
std::atomic< ExecutorDeviceType > | executor_device_type_ |
const std::string | session_id_ |
std::atomic< time_t > | last_used_time_ |
std::atomic< time_t > | start_time_ |
const std::string | public_session_id_ |
std::string | connection_info_ |
heavyai::shared_mutex | mtx_ |
Definition at line 47 of file SessionInfo.h.
|
inline |
Definition at line 49 of file SessionInfo.h.
|
inline |
Definition at line 60 of file SessionInfo.h.
bool Catalog_Namespace::SessionInfo::checkDBAccessPrivileges | ( | const DBObjectType & | permissionType, |
const AccessPrivileges & | privs, | ||
const std::string & | objectName = "" |
||
) | const |
Definition at line 24 of file SessionInfo.cpp.
References cat(), Catalog_Namespace::SysCatalog::checkPrivileges(), DatabaseDBObjectType, get_currentUser(), getCatalog(), and Catalog_Namespace::SysCatalog::instance().
Referenced by Parser::CreateTableStmt::execute(), Parser::CreateDataframeStmt::execute(), Parser::CreateTableAsSelectStmt::execute(), Parser::DropTableStmt::execute(), Parser::DumpTableStmt::execute(), Parser::RestoreTableStmt::execute(), Parser::CreateViewStmt::execute(), Parser::DropViewStmt::execute(), and Parser::InsertValuesStmt::execute().
|
inline |
Definition at line 80 of file SessionInfo.h.
References catalog_, and mtx_.
|
inline |
Definition at line 103 of file SessionInfo.h.
References connection_info_.
|
inline |
Definition at line 88 of file SessionInfo.h.
References currentUser_.
Referenced by Parser::check_alter_table_privilege(), anonymous_namespace{Calcite.cpp}::check_db_access(), DBHandler::check_table_load_privileges(), checkDBAccessPrivileges(), anonymous_namespace{Calcite.cpp}::checkPermissionForTables(), Parser::CreateTableStmt::execute(), Parser::CreateDataframeStmt::execute(), Parser::CreateTableAsSelectStmt::execute(), Parser::TruncateTableStmt::execute(), Parser::RenameDBStmt::execute(), Parser::RenameUserStmt::execute(), Parser::CopyTableStmt::execute(), Parser::CreateRoleStmt::execute(), Parser::DropRoleStmt::execute(), Parser::GrantPrivilegesStmt::execute(), Parser::RevokePrivilegesStmt::execute(), Parser::ShowPrivilegesStmt::execute(), Parser::GrantRoleStmt::execute(), Parser::RevokeRoleStmt::execute(), Parser::CreateViewStmt::execute(), Parser::CreateDBStmt::execute(), Parser::DropDBStmt::execute(), Parser::CreateUserStmt::execute(), Parser::AlterUserStmt::execute(), Parser::DropUserStmt::execute(), DBHandler::get_tables_impl(), Calcite::getCompletionHints(), DBHandler::hasTableAccessPrivileges(), import_export::ForeignDataImporter::importGeneral(), DBHandler::interruptQuery(), is_allowed_on_dashboard(), query_state::operator<<(), DBHandler::set_execution_mode_nolock(), DBHandler::user_can_access_table(), Parser::anonymous_namespace{ParserNode.cpp}::user_can_access_table(), and DBHandler::validateDashboardIdsForSharing().
|
inline |
Definition at line 89 of file SessionInfo.h.
References executor_device_type_.
|
inline |
Definition at line 94 of file SessionInfo.h.
References last_used_time_.
|
inline |
Definition at line 101 of file SessionInfo.h.
References public_session_id_.
Referenced by Catalog_Namespace::operator<<(), and query_state::operator<<().
|
inline |
Definition at line 93 of file SessionInfo.h.
References session_id_.
Referenced by DBHandler::convertResultSet(), Parser::CopyTableStmt::execute(), Parser::ExportQueryStmt::execute(), Calcite::getCompletionHints(), import_export::import_thread_delimited(), import_export::import_thread_shapefile(), import_export::Importer::importDelimited(), import_export::Importer::importGDALGeo(), import_export::Importer::importGDALRaster(), and DBHandler::interruptQuery().
|
inline |
Definition at line 100 of file SessionInfo.h.
References start_time_.
Referenced by public_session_id().
|
inline |
Definition at line 75 of file SessionInfo.h.
References catalog_, CHECK, and mtx_.
Referenced by Parser::check_alter_table_privilege(), Parser::AddColumnStmt::check_executable(), DBHandler::check_table_load_privileges(), checkDBAccessPrivileges(), Fragmenter_Namespace::LocalInsertConnector::checkpoint(), Parser::create_stmt_for_query(), Parser::CreateTableStmt::execute(), Parser::CreateDataframeStmt::execute(), Parser::CreateTableAsSelectStmt::execute(), Parser::DropTableStmt::execute(), Parser::TruncateTableStmt::execute(), Parser::OptimizeTableStmt::execute(), Parser::RenameTableStmt::execute(), Parser::RenameColumnStmt::execute(), Parser::AddColumnStmt::execute(), Parser::DropColumnStmt::execute(), Parser::AlterTableParamStmt::execute(), Parser::DumpTableStmt::execute(), Parser::RestoreTableStmt::execute(), Parser::CopyTableStmt::execute(), Parser::GrantPrivilegesStmt::execute(), Parser::RevokePrivilegesStmt::execute(), Parser::ShowPrivilegesStmt::execute(), Parser::CreateViewStmt::execute(), Parser::DropViewStmt::execute(), Parser::InsertValuesStmt::execute(), Parser::CreateTableStmt::executeDryRun(), RelAlgExecutor::executeSimpleInsert(), import_export::ForeignDataImporter::finalize(), import_export::anonymous_namespace{ForeignDataImporter.cpp}::get_proxy_foreign_table_fragment_size(), DBHandler::get_tables_impl(), DBHandler::get_tables_meta_impl(), Calcite::getCompletionHints(), DBHandler::hasTableAccessPrivileges(), import_export::ForeignDataImporter::importGeneral(), Fragmenter_Namespace::InsertDataLoader::insertChunks(), Fragmenter_Namespace::LocalInsertConnector::insertChunksToLeaf(), Fragmenter_Namespace::InsertDataLoader::insertData(), Fragmenter_Namespace::LocalInsertConnector::insertDataToLeaf(), DBHandler::interruptQuery(), is_allowed_on_dashboard(), query_state::operator<<(), DBHandler::prepare_loader_generic(), Fragmenter_Namespace::LocalInsertConnector::rollback(), DBHandler::user_can_access_table(), Parser::anonymous_namespace{ParserNode.cpp}::user_can_access_table(), and DBHandler::validateDashboardIdsForSharing().
|
inline |
|
inline |
Definition at line 102 of file SessionInfo.h.
References public_session_id_.
|
private |
Definition at line 43 of file SessionInfo.cpp.
References get_start_time(), session_id_, and run_benchmark_import::start_time.
|
inline |
Definition at line 84 of file SessionInfo.h.
References catalog_, and mtx_.
|
inline |
Definition at line 104 of file SessionInfo.h.
References connection_info_.
|
inline |
Definition at line 92 of file SessionInfo.h.
References executor_device_type_.
Referenced by DBHandler::set_execution_mode_nolock().
|
inline |
Definition at line 95 of file SessionInfo.h.
References last_used_time_.
|
private |
Definition at line 111 of file SessionInfo.h.
Referenced by get_catalog_ptr(), getCatalog(), and set_catalog_ptr().
|
private |
Definition at line 119 of file SessionInfo.h.
Referenced by get_connection_info(), and set_connection_info().
|
private |
Definition at line 112 of file SessionInfo.h.
Referenced by get_currentUser().
|
private |
Definition at line 113 of file SessionInfo.h.
Referenced by get_executor_device_type(), and set_executor_device_type().
|
private |
Definition at line 115 of file SessionInfo.h.
Referenced by get_last_used_time(), and update_last_used_time().
|
mutableprivate |
Definition at line 121 of file SessionInfo.h.
Referenced by get_catalog_ptr(), getCatalog(), getLock(), and set_catalog_ptr().
|
private |
Definition at line 117 of file SessionInfo.h.
Referenced by get_public_session_id(), and operator std::string().
|
private |
Definition at line 114 of file SessionInfo.h.
Referenced by get_session_id(), and public_session_id().
|
private |
Definition at line 116 of file SessionInfo.h.
Referenced by get_start_time().