1 #ifndef FAIRDBCONNECTION
2 #define FAIRDBCONNECTION
4 #include "TSQLServer.h"
5 #include "TSQLStatement.h"
10 #if !defined(__CINT__) || defined(__MAKECINT__)
25 const string& user =
"",
26 const string& password =
"");
34 const string& GetUrl()
const;
35 const string&
GetUser()
const {
return fUser; }
39 Bool_t Close(Bool_t force = kFALSE);
41 TSQLServer* GetServer();
42 TSQLStatement* CreatePreparedStatement(
const string& sql);
44 Bool_t TableExists(
const string& tableName)
const;
45 void SetTableExists(
const string& tableName =
"");
46 void Connect() { this->ConnectStatement();}
50 --fNumConnectedStatements;
51 if ( ! fNumConnectedStatements ) { this->CloseIdleConnection(); }
53 void SetPermanent(Bool_t permanent = kTRUE) { fIsTemporary = ! permanent; }
56 Bool_t
IsClosed()
const {
return ! (fServer); }
60 Bool_t PrintExceptionLog(Int_t level = 3)
const;
61 void RecordException();
74 void CloseIdleConnection();