Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ODBCConnection.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file ODBCConnection.h
1 // $Id: ODBCConnection.h,v 1.1.1.1 2004/02/18 20:58:02 dave Exp $
2 
3 #ifndef RDBC_ODBCConnection_h
4 #define RDBC_ODBCConnection_h
5 
6 //
7 // ODBCConnection - connection to data base via ODBC
8 //
9 
10 #ifndef RDBC_TSQLConnection_h
11 #include <RDBC/TSQLConnection.h>
12 #endif
13 
16 {
17 private:
18  virtual ~ODBCConnection();
19 public:
20  Bool_t GetAutoCommit();
21  void SetAutoCommit( Bool_t autoCommit = kTRUE );
22  TString GetCatalog();
23  void SetCatalog( const TString& catalog );
24  Bool_t IsReadOnly();
25  void SetReadOnly( Bool_t readOnly = kTRUE );
26  Bool_t GetTrace();
27  void SetTrace( Bool_t trace = kTRUE );
28  void SetTraceFile( const TString& filename );
29  TString GetTraceFile();
30  Int_t GetTransactionIsolation();
31  void SetTransactionIsolation( Int_t level );
32  TString NativeSQL( const TString& sql );
33  void Close();
34  void Commit();
35  void Rollback();
37  TSQLStatement* CreateStatement( Int_t resultSetType,
38  Int_t resultSetConcurrency );
39  TSQLPreparedStatement* PrepareStatement( const TString& sql );
40  TSQLPreparedStatement* PrepareStatement( const TString& sql,
41  Int_t resultSetType,
42  Int_t resultSetConcurrency );
43  TSQLCallableStatement* PrepareCall( const TString& sql );
44  TSQLCallableStatement* PrepareCall( const TString& sql,
45  Int_t resultSetType,
46  Int_t resultSetConcurrency );
48  Bool_t HasBatchSupport();
49 
51 public:
52 
53  ODBCConnection( const TString& url, const TString& username,
54  const TString& password );
55  ODBCConnection( const TString& connectString );
56 
57  static Int_t GetLoginTimeout();
58  static void SetLoginTimeout( Int_t seconds );
59  static void Shutdown();
60  static TList* RefreshDataSources(TList* datasoures);
61  static TList* RefreshDrivers(TList* drivers);
62 
63 ClassDef(ODBCConnection,0)//A connection to a specific database.
64 };
65 
66 #endif // RDBC_ODBCConnection_h