OmniSciDB
85c2d10cdc
|
#include <DBObject.h>
Private Attributes | |
std::string | objectName_ |
DBObjectType | objectType_ |
DBObjectKey | objectKey_ |
AccessPrivileges | objectPrivs_ |
int32_t | ownerId_ |
Definition at line 196 of file DBObject.h.
DBObject::DBObject | ( | const std::string & | name, |
const DBObjectType & | objectAndPermissionType | ||
) |
Definition at line 117 of file DBObject.cpp.
References objectKey_, objectType_, ownerId_, and DBObjectKey::permissionType.
DBObject::DBObject | ( | const int32_t | id, |
const DBObjectType & | objectAndPermissionType | ||
) |
Definition at line 124 of file DBObject.cpp.
References DBObjectKey::objectId, objectKey_, objectType_, ownerId_, and DBObjectKey::permissionType.
|
inline |
Definition at line 200 of file DBObject.h.
Definition at line 132 of file DBObject.cpp.
References copyPrivileges(), objectKey_, objectType_, and setObjectKey().
|
inline |
Definition at line 207 of file DBObject.h.
Definition at line 139 of file DBObject.cpp.
References objectPrivs_.
Referenced by DBObject().
|
inline |
Definition at line 211 of file DBObject.h.
References objectName_.
Referenced by loadKey(), and serialize_db_object().
|
inline |
load key not called?
Definition at line 213 of file DBObject.h.
References CHECK, DBObjectKey::dbId, and objectKey_.
Referenced by Grantee::checkPrivileges(), DBHandler::get_db_object_privs(), DBHandler::has_object_privilege(), Grantee::hasAnyPrivileges(), Catalog_Namespace::SysCatalog::revokeDBObjectPrivilegesFromAll_unsafe(), and serialize_db_object().
|
inline |
|
inline |
Definition at line 218 of file DBObject.h.
References objectPrivs_.
Referenced by Parser::ShowPrivilegesStmt::execute(), DBHandler::get_dashboard_impl(), hasAnyPrivs(), hasEnoughPrivs(), and serialize_db_object().
|
inline |
Definition at line 212 of file DBObject.h.
References objectType_.
Referenced by serialize_db_object().
Definition at line 223 of file DBObject.h.
References updatePrivileges().
void DBObject::loadKey | ( | ) |
Definition at line 181 of file DBObject.cpp.
References CHECK, DatabaseDBObjectType, DBObjectKey::dbId, Catalog_Namespace::DBMetadata::dbId, Catalog_Namespace::DBMetadata::dbOwner, getName(), Catalog_Namespace::SysCatalog::instance(), objectKey_, objectType_, and ownerId_.
Referenced by Parser::check_alter_table_privilege(), DBHandler::check_table_load_privileges(), DBHandler::connect(), Parser::TruncateTableStmt::execute(), Parser::CopyTableStmt::execute(), Parser::ShowCreateTableStmt::execute(), Catalog_Namespace::Catalog::filterTableByTypeAndUser(), DBHandler::get_db_object_privs(), Catalog_Namespace::SysCatalog::getDatabaseListForUser(), Catalog_Namespace::Catalog::getForeignServersForUser(), DBHandler::has_object_privilege(), DBHandler::hasTableAccessPrivileges(), DBHandler::internal_connect(), loadKey(), Catalog_Namespace::SysCatalog::revokeDBObjectPrivilegesFromAll_unsafe(), Catalog_Namespace::SysCatalog::switchDatabase(), and DBHandler::user_can_access_table().
void DBObject::loadKey | ( | const Catalog_Namespace::Catalog & | catalog | ) |
Definition at line 196 of file DBObject.cpp.
References CHECK, DashboardDBObjectType, DatabaseDBObjectType, DBObjectKey::dbId, Catalog_Namespace::DBMetadata::dbId, Catalog_Namespace::DBMetadata::dbOwner, Catalog_Namespace::Catalog::getCurrentDB(), Catalog_Namespace::Catalog::getForeignServer(), Catalog_Namespace::Catalog::getMetadataForDashboard(), Catalog_Namespace::Catalog::getMetadataForTable(), getName(), loadKey(), DBObjectKey::objectId, objectKey_, objectName_, objectType_, ownerId_, ServerDBObjectType, test_readcsv::table, TableDBObjectType, to_string(), and ViewDBObjectType.
|
inline |
Definition at line 220 of file DBObject.h.
References objectPrivs_, and AccessPrivileges::reset().
Definition at line 147 of file DBObject.cpp.
References objectPrivs_, and AccessPrivileges::privileges.
|
inline |
Definition at line 210 of file DBObject.h.
References setup::name, and objectName_.
Referenced by Catalog_Namespace::SysCatalog::migrateDBAccessPrivileges().
|
inline |
Definition at line 217 of file DBObject.h.
References objectKey_.
Referenced by Catalog_Namespace::SysCatalog::createRole_unsafe(), DBObject(), Catalog_Namespace::Catalog::recordOwnershipOfObjectsInObjectPermissions(), and Catalog_Namespace::SysCatalog::renameDBObject().
void DBObject::setObjectType | ( | const DBObjectType & | objectType | ) |
Definition at line 154 of file DBObject.cpp.
References objectType_.
Referenced by Catalog_Namespace::SysCatalog::migrateDBAccessPrivileges().
|
inline |
Definition at line 227 of file DBObject.h.
References ownerId_.
Referenced by Catalog_Namespace::Catalog::recordOwnershipOfObjectsInObjectPermissions().
void DBObject::setPermissionType | ( | const DBObjectType & | permissionType | ) |
Definition at line 151 of file DBObject.cpp.
References objectKey_, and DBObjectKey::permissionType.
Referenced by Catalog_Namespace::SysCatalog::grantAllOnDatabase_unsafe().
|
inline |
Definition at line 219 of file DBObject.h.
References objectPrivs_.
Referenced by Parser::check_alter_table_privilege(), DBHandler::check_table_load_privileges(), DBHandler::connect(), Parser::TruncateTableStmt::execute(), Parser::CopyTableStmt::execute(), Catalog_Namespace::SysCatalog::getDatabaseListForUser(), Catalog_Namespace::SysCatalog::grantAllOnDatabase_unsafe(), DBHandler::internal_connect(), Catalog_Namespace::Catalog::recordOwnershipOfObjectsInObjectPermissions(), Catalog_Namespace::SysCatalog::revokeDBObjectPrivilegesFromAll_unsafe(), Catalog_Namespace::SysCatalog::switchDatabase(), and DBHandler::user_can_access_table().
std::vector< std::string > DBObject::toString | ( | ) | const |
Definition at line 158 of file DBObject.cpp.
References CHECK, DashboardDBObjectType, DatabaseDBObjectType, DBObjectKey::dbId, DBObjectKey::objectId, objectKey_, DBObjectKey::permissionType, ServerDBObjectType, TableDBObjectType, to_string(), and ViewDBObjectType.
Definition at line 143 of file DBObject.cpp.
References objectPrivs_, and AccessPrivileges::privileges.
Referenced by grantPrivileges(), and Catalog_Namespace::SysCatalog::migrateDBAccessPrivileges().
|
inline |
Definition at line 232 of file DBObject.h.
References AbstractDBObjectType, DBObjectKey::dbId, objectKey_, objectType_, and DBObjectKey::permissionType.
|
private |
Definition at line 240 of file DBObject.h.
Referenced by DBObject(), getObjectKey(), loadKey(), setObjectKey(), setPermissionType(), toString(), and valid().
|
private |
Definition at line 238 of file DBObject.h.
|
private |
Definition at line 241 of file DBObject.h.
Referenced by copyPrivileges(), getPrivileges(), resetPrivileges(), revokePrivileges(), setPrivileges(), and updatePrivileges().
|
private |
Definition at line 239 of file DBObject.h.
Referenced by DBObject(), getType(), loadKey(), setObjectType(), and valid().
|
private |
Definition at line 242 of file DBObject.h.
Referenced by DBObject(), getOwner(), loadKey(), and setOwner().