#include <TODBCServer.h>
Inheritance diagram for TODBCServer:
Public Member Functions | |
TODBCServer (const char *db, const char *uid, const char *pw) | |
virtual | ~TODBCServer () |
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 () |
Static Public Member Functions | |
static TList * | GetDrivers () |
static void | PrintDrivers () |
static TList * | GetDataSources () |
static void | PrintDataSources () |
Private Member Functions | |
Bool_t | ExtractErrors (SQLRETURN retcode, const char *method) |
Bool_t | EndTransaction (Bool_t commit) |
Static Private Member Functions | |
static TList * | ListData (Bool_t isdrivers) |
Private Attributes | |
SQLHENV | fHenv |
SQLHDBC | fHdbc |
TString | fServerInfo |
TString | fUserId |
Definition at line 32 of file TODBCServer.h.
TODBCServer::TODBCServer | ( | const char * | db, | |
const char * | uid, | |||
const char * | pw | |||
) |
TODBCServer::~TODBCServer | ( | ) | [virtual] |
Bool_t TODBCServer::ExtractErrors | ( | SQLRETURN | retcode, | |
const char * | method | |||
) | [private] |
Definition at line 338 of file TODBCServer.cxx.
References fHdbc, fHenv, i, kFALSE, kTRUE, len, TSQLServer::SetError(), and text().
Referenced by EndTransaction(), Exec(), GetColumns(), GetMaxIdentifierLength(), GetTableInfo(), GetTables(), Query(), SelectDataBase(), StartTransaction(), and Statement().
Definition at line 842 of file TODBCServer.cxx.
References CheckConnect, ExtractErrors(), fHdbc, kFALSE, kTRUE, and method.
Referenced by Commit(), and Rollback().
Definition at line 234 of file TODBCServer.cxx.
References TList::Add(), kTRUE, n, TCollection::SetOwner(), and strcpy().
Referenced by GetDataSources(), and GetDrivers().
TList * TODBCServer::GetDrivers | ( | ) | [static] |
Definition at line 286 of file TODBCServer.cxx.
References kTRUE, and ListData().
Referenced by PrintDrivers().
void TODBCServer::PrintDrivers | ( | ) | [static] |
TList * TODBCServer::GetDataSources | ( | ) | [static] |
Definition at line 312 of file TODBCServer.cxx.
References kFALSE, and ListData().
Referenced by PrintDataSources().
void TODBCServer::PrintDataSources | ( | ) | [static] |
void TODBCServer::Close | ( | Option_t * | opt = "" |
) | [virtual] |
Implements TSQLServer.
Definition at line 376 of file TODBCServer.cxx.
References fHdbc, fHenv, and TSQLServer::fPort.
Referenced by ~TODBCServer().
TSQLResult * TODBCServer::Query | ( | const char * | sql | ) | [virtual] |
Implements TSQLServer.
Definition at line 387 of file TODBCServer.cxx.
References CheckConnect, ExtractErrors(), and fHdbc.
Bool_t TODBCServer::Exec | ( | const char * | sql | ) | [virtual] |
Reimplemented from TSQLServer.
Definition at line 410 of file TODBCServer.cxx.
References CheckConnect, ExtractErrors(), and fHdbc.
TSQLStatement * TODBCServer::Statement | ( | const char * | sql, | |
Int_t | = 100 | |||
) | [virtual] |
Reimplemented from TSQLServer.
Definition at line 779 of file TODBCServer.cxx.
References CheckConnect, ExtractErrors(), TSQLServer::fErrorOut, fHdbc, and TSQLServer::SetError().
Bool_t TODBCServer::HasStatement | ( | ) | const [inline, virtual] |
Int_t TODBCServer::SelectDataBase | ( | const char * | dbname | ) | [virtual] |
Implements TSQLServer.
Definition at line 432 of file TODBCServer.cxx.
References CheckConnect, ExtractErrors(), TSQLServer::fDB, and fHdbc.
TSQLResult * TODBCServer::GetDataBases | ( | const char * | wild = 0 |
) | [virtual] |
TSQLResult * TODBCServer::GetTables | ( | const char * | dbname, | |
const char * | wild = 0 | |||
) | [virtual] |
Implements TSQLServer.
Definition at line 462 of file TODBCServer.cxx.
References CheckConnect, ExtractErrors(), fHdbc, and NULL.
Referenced by GetTablesList().
TList * TODBCServer::GetTablesList | ( | const char * | wild = 0 |
) | [virtual] |
Reimplemented from TSQLServer.
Definition at line 510 of file TODBCServer.cxx.
References TList::Add(), CheckConnect, GetTables(), kTRUE, row, and TCollection::SetOwner().
TSQLTableInfo * TODBCServer::GetTableInfo | ( | const char * | tablename | ) | [virtual] |
Reimplemented from TSQLServer.
Definition at line 544 of file TODBCServer.cxx.
References TList::Add(), CheckConnect, ExtractErrors(), fHdbc, 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, NULL, REM_LEN, and STR_LEN.
TSQLResult * TODBCServer::GetColumns | ( | const char * | dbname, | |
const char * | table, | |||
const char * | wild = 0 | |||
) | [virtual] |
Implements TSQLServer.
Definition at line 685 of file TODBCServer.cxx.
References CheckConnect, ExtractErrors(), fHdbc, and NULL.
Int_t TODBCServer::GetMaxIdentifierLength | ( | ) | [virtual] |
Reimplemented from TSQLServer.
Definition at line 709 of file TODBCServer.cxx.
References CheckConnect, ExtractErrors(), fHdbc, info, and NULL.
Int_t TODBCServer::CreateDataBase | ( | const char * | dbname | ) | [virtual] |
Int_t TODBCServer::DropDataBase | ( | const char * | dbname | ) | [virtual] |
Int_t TODBCServer::Reload | ( | ) | [virtual] |
Int_t TODBCServer::Shutdown | ( | ) | [virtual] |
const char * TODBCServer::ServerInfo | ( | ) | [virtual] |
Implements TSQLServer.
Definition at line 769 of file TODBCServer.cxx.
References CheckConnect, and fServerInfo.
Bool_t TODBCServer::StartTransaction | ( | ) | [virtual] |
Reimplemented from TSQLServer.
Definition at line 814 of file TODBCServer.cxx.
References CheckConnect, Commit(), ExtractErrors(), fHdbc, info, kFALSE, kTRUE, NULL, and TSQLServer::SetError().
Bool_t TODBCServer::Commit | ( | ) | [virtual] |
Reimplemented from TSQLServer.
Definition at line 860 of file TODBCServer.cxx.
References EndTransaction(), and kTRUE.
Referenced by StartTransaction().
Bool_t TODBCServer::Rollback | ( | ) | [virtual] |
Reimplemented from TSQLServer.
Definition at line 868 of file TODBCServer.cxx.
References EndTransaction(), and kFALSE.
SQLHENV TODBCServer::fHenv [private] |
SQLHDBC TODBCServer::fHdbc [private] |
Definition at line 36 of file TODBCServer.h.
Referenced by Close(), EndTransaction(), Exec(), ExtractErrors(), GetColumns(), GetMaxIdentifierLength(), GetTableInfo(), GetTables(), Query(), SelectDataBase(), StartTransaction(), and Statement().
TString TODBCServer::fServerInfo [private] |
TString TODBCServer::fUserId [private] |
Definition at line 38 of file TODBCServer.h.