#include <CalibDbConnection.h>
|
coral::IRelationalDomain & | domain (const std::string &connectionString) |
|
Definition at line 22 of file CalibDbConnection.h.
◆ CalibDbConnection()
MuonCalib::CalibDbConnection::CalibDbConnection |
( |
const std::string & |
ConnectionString, |
|
|
const std::string & |
WorkingSchema |
|
) |
| |
Definition at line 38 of file CalibDbConnection.cxx.
45 coral::IHandle<coral::IConnectionService> lookSvcH =
m_context->query<coral::IConnectionService>();
46 if (!lookSvcH.isValid()) {
47 m_context->loadComponent(
"CORAL/Services/ConnectionService");
48 lookSvcH =
m_context->query<coral::IConnectionService>();
50 if (!lookSvcH.isValid()) {
return; }
51 m_context->loadComponent(
"CORAL/Services/XMLAuthenticationService");
52 m_context->loadComponent(
"CORAL/Services/RelationalService");
◆ ~CalibDbConnection()
MuonCalib::CalibDbConnection::~CalibDbConnection |
( |
| ) |
|
|
virtual |
◆ Commit()
void MuonCalib::CalibDbConnection::Commit |
( |
| ) |
|
◆ DestroyQuery()
void MuonCalib::CalibDbConnection::DestroyQuery |
( |
coral::IQuery * |
query | ) |
|
◆ domain()
coral::IRelationalDomain & MuonCalib::CalibDbConnection::domain |
( |
const std::string & |
connectionString | ) |
|
|
private |
Definition at line 158 of file CalibDbConnection.cxx.
159 coral::IHandle<coral::IRelationalService> relationalService =
m_context->query<coral::IRelationalService>();
160 if (!relationalService.isValid()) {
161 throw std::runtime_error(
162 Form(
"File: %s, Line: %d\nCalibDbConnection::domain() - Could not locate the relational service!", __FILE__, __LINE__));
165 coral::IHandle<coral::IAuthenticationService> authenticationService =
m_context->query<coral::IAuthenticationService>();
166 if (!authenticationService.isValid()) {
167 throw std::runtime_error(
168 Form(
"File: %s, Line: %d\nCalibDbConnection::domain() - Could not locate the authentication service!", __FILE__, __LINE__));
171 const coral::IAuthenticationCredentials& credentials = authenticationService->credentials(connectionString);
172 m_username = credentials.valueForItem(
"user");
173 m_password = credentials.valueForItem(
"password");
176 return relationalService->domainForConnection(connectionString);
◆ GetConnectionString()
const std::string& MuonCalib::CalibDbConnection::GetConnectionString |
( |
| ) |
const |
|
inline |
◆ GetLogin()
void MuonCalib::CalibDbConnection::GetLogin |
( |
std::string & |
username, |
|
|
std::string & |
password |
|
) |
| const |
|
inline |
◆ GetQuery()
coral::IQuery * MuonCalib::CalibDbConnection::GetQuery |
( |
| ) |
|
◆ GetTableEditor()
coral::ITableDataEditor & MuonCalib::CalibDbConnection::GetTableEditor |
( |
const std::string & |
table_name | ) |
|
◆ OpenConnection()
bool MuonCalib::CalibDbConnection::OpenConnection |
( |
| ) |
|
Definition at line 68 of file CalibDbConnection.cxx.
74 coral::IHandle<coral::IConnectionService> lookSvcH =
m_context->query<coral::IConnectionService>();
75 m_context->loadComponent(
"CORAL/Services/ConnectionService");
76 lookSvcH =
m_context->query<coral::IConnectionService>();
78 if (!lookSvcH.isValid()) {
79 throw std::runtime_error(
80 Form(
"File: %s, Line: %d\nCalibDbConnection::OpenConnection() - Could not locate the connection service!", __FILE__,
88 }
catch (coral::SchemaException&
e) {
90 log << MSG::WARNING <<
"Schema exception : " <<
e.what() <<
endmsg;
◆ OpenTransaction()
void MuonCalib::CalibDbConnection::OpenTransaction |
( |
| ) |
|
◆ Rollback()
void MuonCalib::CalibDbConnection::Rollback |
( |
| ) |
|
◆ SetLogin()
void MuonCalib::CalibDbConnection::SetLogin |
( |
const std::string & |
username, |
|
|
const std::string & |
password |
|
) |
| |
|
inline |
◆ SetTargetUser()
void MuonCalib::CalibDbConnection::SetTargetUser |
( |
const std::string & |
target_user | ) |
|
|
inline |
◆ m_comp_loaded
bool MuonCalib::CalibDbConnection::m_comp_loaded |
|
private |
◆ m_connection_string
std::string MuonCalib::CalibDbConnection::m_connection_string |
|
private |
◆ m_context
coral::Context* MuonCalib::CalibDbConnection::m_context |
|
private |
◆ m_password
std::string MuonCalib::CalibDbConnection::m_password |
|
private |
◆ m_queries
std::set<coral::IQuery*> MuonCalib::CalibDbConnection::m_queries |
|
private |
◆ m_session
coral::ISessionProxy* MuonCalib::CalibDbConnection::m_session |
|
private |
◆ m_target_user
std::string MuonCalib::CalibDbConnection::m_target_user |
|
private |
◆ m_transaction
bool MuonCalib::CalibDbConnection::m_transaction |
|
private |
◆ m_username
std::string MuonCalib::CalibDbConnection::m_username |
|
private |
◆ m_working_schema
std::string MuonCalib::CalibDbConnection::m_working_schema |
|
private |
The documentation for this class was generated from the following files: