OmniSciDB  04ee39c94c
DashboardObject Struct Reference
+ Inheritance diagram for DashboardObject:
+ Collaboration diagram for DashboardObject:

Public Member Functions

void setup_dashboards ()
 
void drop_dashboards ()
 
 DashboardObject ()
 
 ~DashboardObject () override
 

Public Attributes

const std::string dname1 = "ChampionsLeague"
 
const std::string dname2 = "Europa"
 
const std::string dstate = "active"
 
const std::string dhash = "image00"
 
const std::string dmeta = "Chelsea are champions"
 
int id
 
Users user_
 
Roles role_
 
DashboardDescriptor vd1
 

Detailed Description

Definition at line 199 of file DBObjectPrivilegesTest.cpp.

Constructor & Destructor Documentation

◆ DashboardObject()

DashboardObject::DashboardObject ( )
inlineexplicit

Definition at line 235 of file DBObjectPrivilegesTest.cpp.

References drop_dashboards().

235  {
236  drop_dashboards();
238  }
+ Here is the call graph for this function:

◆ ~DashboardObject()

DashboardObject::~DashboardObject ( )
inlineoverride

Definition at line 240 of file DBObjectPrivilegesTest.cpp.

References drop_dashboards().

+ Here is the call graph for this function:

Member Function Documentation

◆ drop_dashboards()

void DashboardObject::drop_dashboards ( )
inline

Definition at line 226 of file DBObjectPrivilegesTest.cpp.

References CHECK, QueryRunner::QueryRunner::get(), QueryRunner::QueryRunner::getSession(), and session.

226  {
227  auto session = QR::get()->getSession();
228  CHECK(session);
229  auto& cat = session->getCatalog();
230  if (cat.getMetadataForDashboard(id)) {
231  cat.deleteMetadataForDashboard(id);
232  }
233  }
static QueryRunner * get()
Definition: QueryRunner.h:115
#define CHECK(condition)
Definition: Logger.h:187
TSessionId session
Catalog_Namespace::SessionInfo * getSession() const
Definition: QueryRunner.h:124
+ Here is the call graph for this function:

◆ setup_dashboards()

void DashboardObject::setup_dashboards ( )
inline

Definition at line 211 of file DBObjectPrivilegesTest.cpp.

References CHECK, DashboardDBObjectType, DashboardDescriptor::dashboardMetadata, DashboardDescriptor::dashboardName, DashboardDescriptor::dashboardState, QueryRunner::QueryRunner::get(), QueryRunner::QueryRunner::getSession(), DashboardDescriptor::imageHash, session, anonymous_namespace{DBObjectPrivilegesTest.cpp}::sys_cat, DashboardDescriptor::user, and DashboardDescriptor::userId.

211  {
212  auto session = QR::get()->getSession();
213  CHECK(session);
214  auto& cat = session->getCatalog();
217  vd1.imageHash = dhash;
219  vd1.userId = session->get_currentUser().userId;
220  vd1.user = session->get_currentUser().userName;
221  id = cat.createDashboard(vd1);
222  sys_cat.createDBObject(
223  session->get_currentUser(), dname1, DBObjectType::DashboardDBObjectType, cat, id);
224  }
const std::string dname1
const std::string dhash
const std::string dmeta
DashboardDescriptor vd1
static QueryRunner * get()
Definition: QueryRunner.h:115
#define CHECK(condition)
Definition: Logger.h:187
TSessionId session
const std::string dstate
Catalog_Namespace::SessionInfo * getSession() const
Definition: QueryRunner.h:124
+ Here is the call graph for this function:

Member Data Documentation

◆ dhash

const std::string DashboardObject::dhash = "image00"

Definition at line 203 of file DBObjectPrivilegesTest.cpp.

◆ dmeta

const std::string DashboardObject::dmeta = "Chelsea are champions"

Definition at line 204 of file DBObjectPrivilegesTest.cpp.

◆ dname1

const std::string DashboardObject::dname1 = "ChampionsLeague"

Definition at line 200 of file DBObjectPrivilegesTest.cpp.

◆ dname2

const std::string DashboardObject::dname2 = "Europa"

Definition at line 201 of file DBObjectPrivilegesTest.cpp.

◆ dstate

const std::string DashboardObject::dstate = "active"

Definition at line 202 of file DBObjectPrivilegesTest.cpp.

◆ id

int DashboardObject::id

Definition at line 205 of file DBObjectPrivilegesTest.cpp.

◆ role_

Roles DashboardObject::role_

Definition at line 207 of file DBObjectPrivilegesTest.cpp.

◆ user_

Users DashboardObject::user_

Definition at line 206 of file DBObjectPrivilegesTest.cpp.

◆ vd1

DashboardDescriptor DashboardObject::vd1

Definition at line 209 of file DBObjectPrivilegesTest.cpp.


The documentation for this struct was generated from the following file: