Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
TSQLStatement.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file TSQLStatement.h
1 // $Id: TSQLStatement.h,v 1.1.1.1 2004/02/18 20:58:02 dave Exp $
2 
3 #ifndef RDBC_TSQLStatement_h
4 #define RDBC_TSQLStatement_h
5 
6 //
7 // Implementation of SQL Statements
8 //
9 
10 #ifndef RDBC_TSQL_h
11 #include <RDBC/TSQL.h>
12 #endif
13 #ifndef ROOT_TObject
14 #include "TObject.h"
15 #endif
16 
17 class TSQLResultSet;
18 class TSQLConnection;
19 class TList;
21 class TSQLStatement: public TObject, public TSQL
22 {
23 protected:
24  TList* fBatches; // list of batches
25  TSQLResultSet* fCurrentResult; // current result set
26  TSQLConnection* fConnection; // connection that owns this
27 
28  TSQLStatement( TSQLConnection* con, void* imp=0 );
29 
30 public:
31  // override TObject's
32  virtual void Execute (const char *, const char *, int *) {}
33  virtual void Execute (TMethod *, TObjArray *, int *) {}
34 
35  virtual ~TSQLStatement();
36  virtual TSQLResultSet* ExecuteQuery( const TString& sql="" ) = 0;
37  virtual Int_t ExecuteUpdate( const TString& sql="" ) = 0;
38  virtual Bool_t Execute( const TString& sql="" ) = 0;
39  virtual TSQLResultSet* GetResultSet() = 0;
40  virtual Bool_t GetMoreResults() = 0;
41  virtual void Close() = 0;
42  virtual void Cancel() = 0;
43  virtual Int_t GetMaxFieldSize() = 0;
44  virtual void SetMaxFieldSize( Int_t max ) = 0;
45  virtual Int_t GetMaxRows() = 0;
46  virtual void SetMaxRows( Int_t max ) = 0;
47  virtual Bool_t GetEscapeProcessing() = 0;
48  virtual void SetEscapeProcessing( Bool_t enable = kTRUE ) = 0;
49  virtual Int_t GetQueryTimeout() = 0;
50  virtual void SetQueryTimeout( Int_t seconds ) = 0;
51  virtual Int_t GetUpdateCount() = 0;
52  virtual void SetCursorName( const TString& name ) = 0;
53  virtual void AddBatch( const TString& sql ) = 0;
54  virtual void ClearBatch() = 0;
55  virtual Int_t* ExecuteBatch() = 0;
56  virtual Int_t GetFetchDirection() = 0;
57  virtual void SetFetchDirection( Int_t direction ) = 0;
58  virtual Int_t GetFetchSize() = 0;
59  virtual void SetFetchSize(Int_t rows) = 0;
60  virtual Int_t GetResultSetConcurrency() = 0;
61  virtual Int_t GetResultSetType() = 0;
62 
64 
65 ClassDef(TSQLStatement,0)//Class used for executing a SQL statement and obtaining the results produced by it
66 };
67 
68 #endif // RDBC_TSQLStatement