Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-03 08:22:04

0001 // $Id: ODBCConnection.h,v 1.1.1.1 2004/02/18 20:58:02 dave Exp $
0002 
0003 #ifndef RDBC_ODBCConnection_h
0004 #define RDBC_ODBCConnection_h
0005 
0006 //
0007 //  ODBCConnection - connection to data base via ODBC
0008 //
0009 
0010 #ifndef RDBC_TSQLConnection_h
0011 #include <RDBC/TSQLConnection.h>
0012 #endif
0013 
0014 ////////////////////////////////////////////////////////////////////
0015 class ODBCConnection: public TSQLConnection
0016 {
0017 private:
0018    virtual ~ODBCConnection(); 
0019 public:
0020    Bool_t   GetAutoCommit(); 
0021    void     SetAutoCommit( Bool_t autoCommit = kTRUE );   
0022    TString  GetCatalog(); 
0023    void     SetCatalog( const TString& catalog );
0024    Bool_t   IsReadOnly(); 
0025    void     SetReadOnly( Bool_t readOnly = kTRUE );
0026    Bool_t   GetTrace();
0027    void     SetTrace( Bool_t trace = kTRUE );
0028    void     SetTraceFile( const TString& filename );
0029    TString  GetTraceFile();
0030    Int_t    GetTransactionIsolation(); 
0031    void     SetTransactionIsolation( Int_t level );
0032    TString  NativeSQL( const TString& sql ); 
0033    void     Close();
0034    void     Commit();
0035    void     Rollback();
0036    TSQLStatement* CreateStatement(); 
0037    TSQLStatement* CreateStatement( Int_t resultSetType, 
0038                                    Int_t resultSetConcurrency );
0039    TSQLPreparedStatement* PrepareStatement( const TString& sql );
0040    TSQLPreparedStatement* PrepareStatement( const TString& sql,
0041                                             Int_t resultSetType,
0042                                             Int_t resultSetConcurrency );
0043    TSQLCallableStatement* PrepareCall( const TString& sql );
0044    TSQLCallableStatement* PrepareCall( const TString& sql,
0045                                        Int_t resultSetType,
0046                                        Int_t resultSetConcurrency );
0047    TSQLDatabaseMetaData* GetMetaData();
0048    Bool_t HasBatchSupport();
0049 
0050 ///  methods below are private ...
0051 public:
0052     
0053    ODBCConnection( const TString& url, const TString& username, 
0054                    const TString& password ); 
0055    ODBCConnection( const TString& connectString );
0056 
0057    static Int_t   GetLoginTimeout();
0058    static void    SetLoginTimeout( Int_t seconds );
0059    static void    Shutdown();
0060    static TList*  RefreshDataSources(TList* datasoures);
0061    static TList*  RefreshDrivers(TList* drivers);  
0062 
0063 ClassDef(ODBCConnection,0)//A connection to a specific database. 
0064 };
0065 
0066 #endif // RDBC_ODBCConnection_h