OmniSciDB  5ade3759e0
anonymous_namespace{DBObjectPrivilegesTest.cpp} Namespace Reference

Functions

template<class T >
v (const TargetValue &r)
 
void run_ddl_statement (const std::string &query)
 
std::unique_ptr< QRget_qr_for_user (const std::string &user_name, const Catalog_Namespace::UserMetadata &user_metadata)
 
void compare_user_lists (const std::vector< std::string > &expected, const std::list< Catalog_Namespace::UserMetadata > &actual)
 

Variables

std::shared_ptr< Calciteg_calcite
 
Catalog_Namespace::UserMetadata user
 
std::vector< DBObjectprivObjects
 
auto & sys_cat = Catalog_Namespace::SysCatalog::instance()
 

Function Documentation

◆ compare_user_lists()

void anonymous_namespace{DBObjectPrivilegesTest.cpp}::compare_user_lists ( const std::vector< std::string > &  expected,
const std::list< Catalog_Namespace::UserMetadata > &  actual 
)

Definition at line 2167 of file DBObjectPrivilegesTest.cpp.

References user, and Catalog_Namespace::UserMetadata::userName.

Referenced by TEST().

2168  {
2169  ASSERT_EQ(expected.size(), actual.size());
2170  size_t i = 0;
2171  for (const auto user : actual) {
2172  ASSERT_EQ(expected[i++], user.userName);
2173  }
2174 }
+ Here is the caller graph for this function:

◆ get_qr_for_user()

std::unique_ptr<QR> anonymous_namespace{DBObjectPrivilegesTest.cpp}::get_qr_for_user ( const std::string &  user_name,
const Catalog_Namespace::UserMetadata user_metadata 
)

Definition at line 1521 of file DBObjectPrivilegesTest.cpp.

References CPU, Catalog_Namespace::Catalog::get(), and session.

Referenced by TEST().

1523  {
1524  auto session = std::make_unique<Catalog_Namespace::SessionInfo>(
1526  user_metadata,
1528  "");
1529  return std::make_unique<QR>(std::move(session));
1530 }
static std::shared_ptr< Catalog > get(const std::string &dbName)
Definition: Catalog.cpp:2988
TSessionId session
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ run_ddl_statement()

void anonymous_namespace{DBObjectPrivilegesTest.cpp}::run_ddl_statement ( const std::string &  query)
inline

Definition at line 41 of file DBObjectPrivilegesTest.cpp.

References QueryRunner::QueryRunner::get(), and QueryRunner::QueryRunner::runDDLStatement().

41  {
43 }
virtual void runDDLStatement(const std::string &)
static QueryRunner * get()
Definition: QueryRunner.h:115
+ Here is the call graph for this function:

◆ v()

template<class T >
T anonymous_namespace{DBObjectPrivilegesTest.cpp}::v ( const TargetValue r)

Definition at line 33 of file DBObjectPrivilegesTest.cpp.

References CHECK.

33  {
34  auto scalar_r = boost::get<ScalarTargetValue>(&r);
35  CHECK(scalar_r);
36  auto p = boost::get<T>(scalar_r);
37  CHECK(p);
38  return *p;
39 }
#define CHECK(condition)
Definition: Logger.h:187

Variable Documentation

◆ g_calcite

std::shared_ptr<Calcite> anonymous_namespace{DBObjectPrivilegesTest.cpp}::g_calcite

Definition at line 25 of file DBObjectPrivilegesTest.cpp.

Referenced by main(), and TEST_F().

◆ privObjects

◆ sys_cat

◆ user

Catalog_Namespace::UserMetadata anonymous_namespace{DBObjectPrivilegesTest.cpp}::user

Definition at line 27 of file DBObjectPrivilegesTest.cpp.

Referenced by Catalog_Namespace::SysCatalog::checkPrivileges(), compare_user_lists(), Catalog_Namespace::SysCatalog::createDatabase(), Catalog_Namespace::SysCatalog::createUser(), Users::drop_users(), Catalog_Namespace::SysCatalog::dropUser(), Parser::RenameUserStmt::execute(), Parser::CreateDBStmt::execute(), Parser::AlterUserStmt::execute(), MapDHandler::get_databases(), MapDHandler::get_db_objects_for_grantee(), com.mapd.tests.MapdTestClient::getClient(), Calcite::getCompletionHints(), com.mapd.parser.server.CalciteServerHandler::getCompletionHints(), Catalog_Namespace::anonymous_namespace{Catalog.cpp}::getUserFromId(), QueryRunner::QueryRunner::init(), is_allowed_on_dashboard(), main(), Catalog_Namespace::SysCatalog::migrateDBAccessPrivileges(), Catalog_Namespace::SysCatalog::migratePrivileges(), Catalog_Namespace::SysCatalog::populateRoleDbObjects(), com.mapd.parser.server.CalciteServerHandler::process(), Calcite::processImpl(), QueryRunner::QueryRunner::QueryRunner(), MapDHandler::replace_dashboard(), com.mapd.tests.CatalogConcurrencyTest::run_test(), com.mapd.tests.EagainConcurrencyTest::run_test(), com.mapd.tests.SelectCopyFromDeleteConcurrencyTest::run_test(), run_warmup_queries(), com.mapd.tests.UpdateDeleteInsertConcurrencyTest::runTest(), com.mapd.tests.EagainConcurrencyTest::runTest(), com.mapd.tests.CatalogConcurrencyTest::runTest(), com.mapd.tests.SelectCopyFromDeleteConcurrencyTest::runTest(), and Users::setup_users().