Harpo Database access class. The class query MySQL database. Deal with (single !) Harpo Database and it tables Remote access to mysql server via ssh ssh -L 3306:llrharpo.in2p3.fr:3306 llrgate01.in2p3.fr mysql access mysql -h 127.0.0.1 -u reader -p harpo reco access: ADD to .cfg rundb: { dburl = "mysql://127.0.0.1/harpo"; dbuser = "reader"; dbpasswd = "ro"; }; TMYSQLxxx res == NULL -> query error res->GetRowCount() == 0 -> ok for command without ruturn (NO SELECT) More...
#include <HarpoDB.h>
Public Member Functions | |
HarpoDB () | |
virtual | ~HarpoDB () |
Bool_t | Open (const TString *DbUrl=NULL) |
Bool_t | Close () |
Bool_t | GetTable (const TString name, HarpoDBTable *table) |
Bool_t | GetTable (const TString name, HarpoDBTable &table) |
Bool_t | ExecQuery (const TString sql, dbResults *list=NULL) |
void | list () |
TList * | GetListOfTables () |
Static Public Member Functions | |
static void | SetUser (TString u, TString p) |
static void | SetDBUrl (const TString &DbUrl) |
static TSQLServer * | GetDBServer () |
static const char * | GetDBName () |
Private Attributes | |
TList * | fTables |
Static Private Attributes | |
static TSQLServer * | db = (TSQLServer *) NULL |
static TString | dbUrl = TString("mysql://llrharpo.in2p3.fr/harpo") |
static TString | dbuser = TString("reader") |
static TString | dbpw = TString("ro") |
Harpo Database access class. The class query MySQL database. Deal with (single !) Harpo Database and it tables Remote access to mysql server via ssh ssh -L 3306:llrharpo.in2p3.fr:3306 llrgate01.in2p3.fr mysql access mysql -h 127.0.0.1 -u reader -p harpo reco access: ADD to .cfg rundb: { dburl = "mysql://127.0.0.1/harpo"; dbuser = "reader"; dbpasswd = "ro"; }; TMYSQLxxx res == NULL -> query error res->GetRowCount() == 0 -> ok for command without ruturn (NO SELECT)
Bool_t HarpoDB::Close | ( | ) |
Bool_t HarpoDB::ExecQuery | ( | const TString | sql, |
dbResults * | list = NULL |
||
) |
|
static |
Definition at line 55 of file HarpoDB.cxx.
|
inlinestatic |
|
inline |
Bool_t HarpoDB::GetTable | ( | const TString | name, |
HarpoDBTable & | table | ||
) |
void HarpoDB::list | ( | ) |
Bool_t HarpoDB::Open | ( | const TString * | DbUrl = NULL | ) |
|
inlinestatic |
|
static |
|
staticprivate |
|
staticprivate |