OmniSciDB  1dac507f6e
 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  AccessPrivileges
 
class  DBObject
 

Namespaces

 Catalog_Namespace
 

Enumerations

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

Functions

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

Enumeration Type Documentation

Enumerator
AbstractDBObjectType 
DatabaseDBObjectType 
TableDBObjectType 
DashboardDBObjectType 
ViewDBObjectType 

Definition at line 42 of file DBObject.h.

Function Documentation

DBObjectType DBObjectTypeFromString ( const std::string &  type)

Definition at line 88 of file DBObject.cpp.

References DashboardDBObjectType, DatabaseDBObjectType, TableDBObjectType, and ViewDBObjectType.

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

88  {
89  if (type.compare("DATABASE") == 0) {
90  return DatabaseDBObjectType;
91  } else if (type.compare("TABLE") == 0) {
92  return TableDBObjectType;
93  } else if (type.compare("DASHBOARD") == 0) {
94  return DashboardDBObjectType;
95  } else if (type.compare("VIEW") == 0) {
96  return ViewDBObjectType;
97  } else {
98  throw std::runtime_error("DB object type " + type + " is not supported.");
99  }
100 }

+ Here is the caller graph for this function:

std::string DBObjectTypeToString ( DBObjectType  type)