OmniSciDB  a5dc49c757
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DashboardDescriptor.h File Reference
#include <cstdint>
#include <regex>
#include <string>
#include "../Shared/sqldefs.h"
+ Include dependency graph for DashboardDescriptor.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  DashboardDescriptor
 

Functions

static const std::string SYSTEM_ROLE_TAG ("#dash_system_role")
 specifies the content in-memory of a row in the dashboard More...
 
std::string generate_dashboard_system_rolename (const std::string &db_id, const std::string &dash_id)
 
std::vector< std::string > parse_underlying_dashboard_objects (const std::string &meta)
 

Function Documentation

std::string generate_dashboard_system_rolename ( const std::string &  db_id,
const std::string &  dash_id 
)
inline

Definition at line 45 of file DashboardDescriptor.h.

References SYSTEM_ROLE_TAG().

Referenced by Catalog_Namespace::Catalog::buildDashboardsMapUnlocked(), Catalog_Namespace::Catalog::createDashboard(), Catalog_Namespace::Catalog::createDashboardSystemRoles(), and Catalog_Namespace::Catalog::replaceDashboard().

46  {
47  return db_id + "_" + dash_id + SYSTEM_ROLE_TAG;
48 }
static const std::string SYSTEM_ROLE_TAG("#dash_system_role")
specifies the content in-memory of a row in the dashboard

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

std::vector<std::string> parse_underlying_dashboard_objects ( const std::string &  meta)
inline

Parses underlying Tables/Views

Definition at line 50 of file DashboardDescriptor.h.

Referenced by Catalog_Namespace::Catalog::parseDashboardObjects().

51  {
53  std::regex extract_objects_expr(".*table\":\"(.*?)\"");
54  std::smatch match;
55  if (std::regex_search(meta, match, extract_objects_expr)) {
56  const std::string list = match[1];
57  std::vector<std::string> dash_objects;
58  std::regex individual_objects_expr(R"(\w+)");
59  std::sregex_iterator iter(list.begin(), list.end(), individual_objects_expr);
60  std::sregex_iterator end;
61  while (iter != end) {
62  dash_objects.push_back((*iter)[0]);
63  ++iter;
64  }
65  return dash_objects;
66  }
67  return {};
68 }

+ Here is the caller graph for this function:

static const std::string SYSTEM_ROLE_TAG ( "#dash_system_role"  )
static

specifies the content in-memory of a row in the dashboard

DashboardDescriptor

Referenced by generate_dashboard_system_rolename(), and Catalog_Namespace::SysCatalog::isDashboardSystemRole().

+ Here is the caller graph for this function: