OmniSciDB  06b3bd477c
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
DBObject.h File Reference
#include <string>
#include <unordered_set>
#include "Shared/Logger.h"
+ Include dependency graph for DBObject.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  DBObjectKey
 
struct  DatabasePrivileges
 
struct  TablePrivileges
 
struct  DashboardPrivileges
 
struct  ViewPrivileges
 
struct  ServerPrivileges
 
struct  AccessPrivileges
 
class  DBObject
 

Namespaces

 Catalog_Namespace
 

Enumerations

enum  DBObjectType {
  AbstractDBObjectType = 0, DatabaseDBObjectType, TableDBObjectType, DashboardDBObjectType,
  ViewDBObjectType, ServerDBObjectType
}
 

Functions

std::string DBObjectTypeToString (DBObjectType type)
 
DBObjectType DBObjectTypeFromString (const std::string &type)
 

Enumeration Type Documentation

Enumerator
AbstractDBObjectType 
DatabaseDBObjectType 
TableDBObjectType 
DashboardDBObjectType 
ViewDBObjectType 
ServerDBObjectType 

Definition at line 42 of file DBObject.h.

Function Documentation

DBObjectType DBObjectTypeFromString ( const std::string &  type)

Definition at line 99 of file DBObject.cpp.

References DashboardDBObjectType, DatabaseDBObjectType, ServerDBObjectType, TableDBObjectType, and ViewDBObjectType.

Referenced by Parser::GrantPrivilegesStmt::execute(), Parser::RevokePrivilegesStmt::execute(), and Parser::ShowPrivilegesStmt::execute().

99  {
100  if (type.compare("DATABASE") == 0) {
101  return DatabaseDBObjectType;
102  } else if (type.compare("TABLE") == 0) {
103  return TableDBObjectType;
104  } else if (type.compare("DASHBOARD") == 0) {
105  return DashboardDBObjectType;
106  } else if (type.compare("VIEW") == 0) {
107  return ViewDBObjectType;
108  } else if (type.compare("SERVER") == 0) {
109  return ServerDBObjectType;
110  } else {
111  throw std::runtime_error("DB object type " + type + " is not supported.");
112  }
113 }

+ Here is the caller graph for this function:

std::string DBObjectTypeToString ( DBObjectType  type)