ORE Studio 0.0.4
Loading...
Searching...
No Matches
Public Member Functions | List of all members
scoped_database_helper Class Reference

Provides database setup and cleanup utilities for tests. More...

#include <scoped_database_helper.hpp>

Collaboration diagram for scoped_database_helper:
Collaboration graph

Public Member Functions

 scoped_database_helper (const std::string &table_name, bool seed_rbac=false)
 Constructs a scoped database helper.
 
void seed_rbac ()
 Seeds minimal RBAC data for tests.
 
database::contextcontext ()
 Gets the database context.
 

Detailed Description

Provides database setup and cleanup utilities for tests.

Constructor & Destructor Documentation

◆ scoped_database_helper()

scoped_database_helper ( const std::string &  table_name,
bool  seed_rbac = false 
)
explicit

Constructs a scoped database helper.

Parameters
table_nameFully qualified table name to truncate (e.g., "ores.accounts")
seed_rbacIf true, seeds minimal RBAC data (Admin role with wildcard permission)

Member Function Documentation

◆ seed_rbac()

void seed_rbac ( )

Seeds minimal RBAC data for tests.

Call this if you need RBAC data but didn't pass seed_rbac=true to constructor.

Here is the caller graph for this function: