#include <TMySQLServer.h>
Inheritance diagram for TMySQLServer:
Public Member Functions | |
TMySQLServer (const char *db, const char *uid, const char *pw) | |
~TMySQLServer () | |
void | Close (Option_t *opt="") |
TSQLResult * | Query (const char *sql) |
Bool_t | Exec (const char *sql) |
TSQLStatement * | Statement (const char *sql, Int_t=100) |
Bool_t | HasStatement () const |
Int_t | SelectDataBase (const char *dbname) |
TSQLResult * | GetDataBases (const char *wild=0) |
TSQLResult * | GetTables (const char *dbname, const char *wild=0) |
TList * | GetTablesList (const char *wild=0) |
TSQLTableInfo * | GetTableInfo (const char *tablename) |
TSQLResult * | GetColumns (const char *dbname, const char *table, const char *wild=0) |
Int_t | GetMaxIdentifierLength () |
Int_t | CreateDataBase (const char *dbname) |
Int_t | DropDataBase (const char *dbname) |
Int_t | Reload () |
Int_t | Shutdown () |
const char * | ServerInfo () |
Bool_t | StartTransaction () |
Bool_t | Commit () |
Bool_t | Rollback () |
Bool_t | PingVerify () |
Int_t | Ping () |
Protected Attributes | |
MYSQL * | fMySQL |
TString | fInfo |
Definition at line 64 of file TMySQLServer.h.
TMySQLServer::TMySQLServer | ( | const char * | db, | |
const char * | uid, | |||
const char * | pw | |||
) |
TMySQLServer::~TMySQLServer | ( | ) |
Definition at line 227 of file TMySQLServer.cxx.
References Close(), fMySQL, and TSQLServer::IsConnected().
void TMySQLServer::Close | ( | Option_t * | opt = "" |
) | [virtual] |
Implements TSQLServer.
Definition at line 261 of file TMySQLServer.cxx.
References TSQLServer::ClearError(), fMySQL, and TSQLServer::fPort.
Referenced by ~TMySQLServer().
TSQLResult * TMySQLServer::Query | ( | const char * | sql | ) | [virtual] |
Implements TSQLServer.
Definition at line 275 of file TMySQLServer.cxx.
References CheckConnect, CheckErrNo, fMySQL, kFALSE, and kTRUE.
Referenced by GetColumns(), and GetTableInfo().
Bool_t TMySQLServer::Exec | ( | const char * | sql | ) | [virtual] |
Reimplemented from TSQLServer.
Definition at line 293 of file TMySQLServer.cxx.
References CheckConnect, CheckErrNo, fMySQL, TSQLServer::IsError(), kFALSE, and kTRUE.
TSQLStatement * TMySQLServer::Statement | ( | const char * | sql, | |
Int_t | = 100 | |||
) | [virtual] |
Reimplemented from TSQLServer.
Definition at line 706 of file TMySQLServer.cxx.
References CheckConnect, CheckErrNo, TSQLServer::ClearError(), TSQLServer::fErrorOut, fMySQL, kTRUE, and TSQLServer::SetError().
Bool_t TMySQLServer::HasStatement | ( | ) | const [virtual] |
Int_t TMySQLServer::SelectDataBase | ( | const char * | dbname | ) | [virtual] |
Implements TSQLServer.
Definition at line 307 of file TMySQLServer.cxx.
References CheckConnect, CheckErrNo, TSQLServer::fDB, fMySQL, and kTRUE.
Referenced by GetColumns(), and GetTables().
TSQLResult * TMySQLServer::GetDataBases | ( | const char * | wild = 0 |
) | [virtual] |
Implements TSQLServer.
Definition at line 321 of file TMySQLServer.cxx.
References CheckConnect, CheckErrNo, fMySQL, and kFALSE.
TSQLResult * TMySQLServer::GetTables | ( | const char * | dbname, | |
const char * | wild = 0 | |||
) | [virtual] |
Implements TSQLServer.
Definition at line 338 of file TMySQLServer.cxx.
References CheckConnect, CheckErrNo, fMySQL, kFALSE, and SelectDataBase().
TList * TMySQLServer::GetTablesList | ( | const char * | wild = 0 |
) | [virtual] |
Reimplemented from TSQLServer.
Definition at line 358 of file TMySQLServer.cxx.
References TList::Add(), CheckConnect, CheckErrNo, fMySQL, kFALSE, kTRUE, row, and TCollection::SetOwner().
TSQLTableInfo * TMySQLServer::GetTableInfo | ( | const char * | tablename | ) | [virtual] |
Reimplemented from TSQLServer.
Definition at line 394 of file TMySQLServer.cxx.
References TList::Add(), CheckConnect, CheckErrNo, comments, TString::Data(), flags, fMySQL, TString::Form(), TSQLResult::GetFieldCount(), TSQLResult::GetFieldName(), info, kFALSE, TSQLServer::kSQL_BINARY, TSQLServer::kSQL_CHAR, TSQLServer::kSQL_DOUBLE, TSQLServer::kSQL_FLOAT, TSQLServer::kSQL_INTEGER, TSQLServer::kSQL_NONE, TSQLServer::kSQL_NUMERIC, TSQLServer::kSQL_TIMESTAMP, TSQLServer::kSQL_VARCHAR, kTRUE, n, name, TSQLResult::Next(), Query(), row, TSQLServer::SetError(), and type.
TSQLResult * TMySQLServer::GetColumns | ( | const char * | dbname, | |
const char * | table, | |||
const char * | wild = 0 | |||
) | [virtual] |
Implements TSQLServer.
Definition at line 587 of file TMySQLServer.cxx.
References CheckConnect, TString::Data(), TString::Form(), Query(), and SelectDataBase().
Int_t TMySQLServer::GetMaxIdentifierLength | ( | ) | [inline, virtual] |
Int_t TMySQLServer::CreateDataBase | ( | const char * | dbname | ) | [virtual] |
Implements TSQLServer.
Definition at line 609 of file TMySQLServer.cxx.
References CheckConnect, CheckErrNo, fMySQL, Form(), and kFALSE.
Int_t TMySQLServer::DropDataBase | ( | const char * | dbname | ) | [virtual] |
Implements TSQLServer.
Definition at line 623 of file TMySQLServer.cxx.
References CheckConnect, CheckErrNo, fMySQL, Form(), and kFALSE.
Int_t TMySQLServer::Reload | ( | ) | [virtual] |
Implements TSQLServer.
Definition at line 638 of file TMySQLServer.cxx.
References CheckConnect, CheckErrNo, fMySQL, and kFALSE.
Int_t TMySQLServer::Shutdown | ( | ) | [virtual] |
Implements TSQLServer.
Definition at line 653 of file TMySQLServer.cxx.
References CheckConnect, CheckErrNo, fMySQL, and kFALSE.
const char * TMySQLServer::ServerInfo | ( | ) | [virtual] |
Implements TSQLServer.
Definition at line 675 of file TMySQLServer.cxx.
References CheckConnect, CheckErrNo, TString::Data(), fInfo, fMySQL, and kFALSE.
Bool_t TMySQLServer::StartTransaction | ( | ) | [virtual] |
Reimplemented from TSQLServer.
Definition at line 739 of file TMySQLServer.cxx.
References CheckConnect, kFALSE, and TSQLServer::StartTransaction().
Bool_t TMySQLServer::Commit | ( | ) | [virtual] |
Reimplemented from TSQLServer.
Definition at line 749 of file TMySQLServer.cxx.
References CheckConnect, CheckErrNo, TSQLServer::Commit(), fMySQL, kFALSE, and kTRUE.
Bool_t TMySQLServer::Rollback | ( | ) | [virtual] |
Reimplemented from TSQLServer.
Definition at line 771 of file TMySQLServer.cxx.
References CheckConnect, CheckErrNo, fMySQL, kFALSE, kTRUE, and TSQLServer::Rollback().
Bool_t TMySQLServer::PingVerify | ( | ) | [virtual] |
Reimplemented from TSQLServer.
Definition at line 793 of file TMySQLServer.cxx.
References CheckConnect, CheckErrNo, TObject::Error(), fMySQL, TObject::Info(), TSQLServer::IsError(), kFALSE, and kTRUE.
Int_t TMySQLServer::Ping | ( | ) | [virtual] |
Reimplemented from TSQLServer.
Definition at line 814 of file TMySQLServer.cxx.
References CheckConnect, fMySQL, and kFALSE.
MYSQL* TMySQLServer::fMySQL [protected] |
Definition at line 67 of file TMySQLServer.h.
Referenced by Close(), Commit(), CreateDataBase(), DropDataBase(), Exec(), GetDataBases(), GetTableInfo(), GetTables(), GetTablesList(), Ping(), PingVerify(), Query(), Reload(), Rollback(), SelectDataBase(), ServerInfo(), Shutdown(), Statement(), and ~TMySQLServer().
TString TMySQLServer::fInfo [protected] |