|
Class Reference for E1039 Core & Analysis Software
|
#include </dev/shm/kenichi/update-github-e1039-doc/e1039-core/packages/db_svc/DbSvc.h>
Classes | |
| class | VarList |
Public Types | |
| enum | SvrId_t { DB1, DB2, DB3, DB01, UIUC, LITE, LOCAL } |
| enum | UsrId_t { Guest, Prod } |
Public Member Functions | |
| DbSvc (const SvrId_t svr_id=DB1, const UsrId_t usr_id=Guest, const std::string my_cnf="") | |
| DbSvc (const SvrId_t svr_id, std::string dbfile) | |
| ~DbSvc () | |
| void | UseSchema (const char *name, const bool do_create=false, const bool do_drop=false) |
| void | UseSchema (const std::string name, const bool do_create=false, const bool do_drop=false) |
| void | DropTable (const char *name) |
| void | DropTable (const std::string name) |
| bool | HasTable (const char *name, const bool exit_on_false=false) |
| bool | HasTable (const std::string name, const bool exit_on_false=false) |
| void | CreateTable (const std::string name, const std::vector< std::string > list_var, const std::vector< std::string > list_type, const std::vector< std::string > list_key) |
| void | CreateTable (const std::string name, const int n_var, const char **list_var, const char **list_type, const int n_key=0, const char **list_key=0) |
| void | CreateTable (const std::string name, const VarList list) |
| TSQLServer * | Con () |
| TSQLStatement * | Process (const char *query) |
| TSQLStatement * | Process (const std::string query) |
| enum DbSvc::SvrId_t |
| enum DbSvc::UsrId_t |
| DbSvc::DbSvc | ( | const SvrId_t | svr_id = DB1, |
| const UsrId_t | usr_id = Guest, |
||
| const std::string | my_cnf = "" |
||
| ) |
Definition at line 39 of file DbSvc.cc.
References ExpandEnvironmentals(), FileExist(), and LogInfo.
Here is the call graph for this function:
|
explicit |
Definition at line 59 of file DbSvc.cc.
References ExpandEnvironmentals(), FileExist(), and LogInfo.
Here is the call graph for this function:
|
inline |
Definition at line 38 of file DbSvc.h.
Referenced by DecoStatusDb::RunFinished(), DecoStatusDb::RunStarted(), DecoStatusDb::RunUpdated(), ChanMapScaler::WriteDbTable(), CalibParamInTimeTaiwan::WriteDbTable(), CalibParamXT::WriteDbTable(), ChanMapTaiwan::WriteDbTable(), CalibParamInTimeV1495::WriteDbTable(), ChanMapV1495::WriteDbTable(), GeomParamPlane::WriteDbTable(), and ParamRunRange::WriteToDB().
Here is the caller graph for this function:| void DbSvc::CreateTable | ( | const std::string | name, |
| const std::vector< std::string > | list_var, | ||
| const std::vector< std::string > | list_type, | ||
| const std::vector< std::string > | list_key | ||
| ) |
Definition at line 132 of file DbSvc.cc.
Referenced by DecoStatusDb::InitTable(), ChanMapScaler::WriteDbTable(), CalibParamXT::WriteDbTable(), CalibParamInTimeTaiwan::WriteDbTable(), ChanMapTaiwan::WriteDbTable(), CalibParamInTimeV1495::WriteDbTable(), ChanMapV1495::WriteDbTable(), GeomParamPlane::WriteDbTable(), and ParamRunRange::WriteToDB().
Here is the caller graph for this function:| void DbSvc::CreateTable | ( | const std::string | name, |
| const int | n_var, | ||
| const char ** | list_var, | ||
| const char ** | list_type, | ||
| const int | n_key = 0, |
||
| const char ** | list_key = 0 |
||
| ) |
| void DbSvc::CreateTable | ( | const std::string | name, |
| const VarList | list | ||
| ) |
Definition at line 180 of file DbSvc.cc.
References DbSvc::VarList::Get(), and DbSvc::VarList::Size().
Here is the call graph for this function:| void DbSvc::DropTable | ( | const char * | name | ) |
Definition at line 112 of file DbSvc.cc.
Referenced by DecoStatusDb::InitTable(), ParamRunRange::WriteToDB(), and RunParamBase::WriteToDB().
Here is the caller graph for this function:
|
inline |
Definition at line 31 of file DbSvc.h.
References DropTable().
Referenced by DropTable().
Here is the call graph for this function:
Here is the caller graph for this function:| bool DbSvc::HasTable | ( | const char * | name, |
| const bool | exit_on_false = false |
||
| ) |
Definition at line 122 of file DbSvc.cc.
Referenced by DecoStatusDb::InitTable(), ParamRunRange::ReadFromDB(), and RunParamBase::ReadFromDB().
Here is the caller graph for this function:
|
inline |
Definition at line 33 of file DbSvc.h.
References HasTable().
Referenced by HasTable().
Here is the call graph for this function:
Here is the caller graph for this function:| TSQLStatement * DbSvc::Process | ( | const char * | query | ) |
This function runs Statement(), Process() and StoreResult() with error check. The return object (TSQLStatement*) must be deleted by user. Example: TSQLStatement* stmt = db_svc->Process(query); while (stmt->NextResultRow()) { int id = stmt->GetInt(0); int event = stmt->GetInt(1); } delete stmt;
Definition at line 206 of file DbSvc.cc.
Referenced by SQG4DipoleMagnetDetector::Construct(), ChanMapScaler::ReadDbTable(), CalibParamInTimeTaiwan::ReadDbTable(), CalibParamXT::ReadDbTable(), CalibParamInTimeV1495::ReadDbTable(), ChanMapTaiwan::ReadDbTable(), ChanMapV1495::ReadDbTable(), GeomParamPlane::ReadDbTable(), and ParamRunRange::ReadFromDB().
Here is the caller graph for this function:
|
inline |
| void DbSvc::UseSchema | ( | const char * | name, |
| const bool | do_create = false, |
||
| const bool | do_drop = false |
||
| ) |
Definition at line 82 of file DbSvc.cc.
Referenced by DecoError::AggregateData(), DecoStatusDb::DecoStatusDb(), ParamRunRange::ReadFromDB(), RunParamBase::ReadFromDB(), ParamRunRange::WriteToDB(), and RunParamBase::WriteToDB().
Here is the caller graph for this function:
|
inline |
Definition at line 28 of file DbSvc.h.
References UseSchema().
Referenced by UseSchema().
Here is the call graph for this function:
Here is the caller graph for this function: