File indexing completed on 2025-08-03 08:22:05
0001
0002
0003 #ifndef RDBC_ODBCPreparedStatement_h
0004 #define RDBC_ODBCPreparedStatement_h
0005
0006 #ifndef RDBC_TSQLPreparedStatement_h
0007 #include <RDBC/TSQLPreparedStatement.h>
0008 #endif
0009
0010 #ifndef __CINT__
0011 #include <sstream>
0012 #include <boost/smart_ptr/shared_ptr.hpp>
0013 #include <vector>
0014 #endif
0015
0016
0017
0018
0019
0020
0021 class ODBCPreparedStatement: public TSQLPreparedStatement
0022 {
0023 friend class ODBCConnection;
0024
0025 protected:
0026 ODBCPreparedStatement( TSQLConnection* con, void* imp=0 );
0027
0028 public:
0029 virtual ~ODBCPreparedStatement();
0030
0031 void SetNull( Int_t parameterIndex, Int_t sqlType );
0032 void SetBoolean( Int_t parameterIndex,Bool_t x );
0033 void SetByte( Int_t parameterIndex,Char_t x );
0034 void SetShort( Int_t parameterIndex,Short_t x );
0035 void SetInt( Int_t parameterIndex,Int_t x );
0036 void SetLong(Int_t parameterIndex,Long_t x);
0037 void SetFloat(Int_t parameterIndex,Float_t x);
0038 void SetDouble( Int_t parameterIndex,Double_t x);
0039 void SetString(Int_t parameterIndex, const TString& x);
0040 void SetBytes(Int_t parameterIndex,const TArrayC& x);
0041 void SetDate(Int_t parameterIndex,const TSQLDate& x);
0042 void SetTime(Int_t parameterIndex,const TSQLTime& x);
0043 void SetTimestamp( Int_t parameterIndex,const TSQLTimestamp& x );
0044 void SetAsciiStream(Int_t parameterIndex,TBuffer* x,Int_t length);
0045 void SetBinaryStream( Int_t parameterIndex,TBuffer* x,Int_t length );
0046 void SetObject( Int_t parameterIndex,TObject* x );
0047 void ClearParameters();
0048
0049 using TSQLStatement::Execute;
0050 virtual Bool_t Execute( const TString& sql="" );
0051 virtual TSQLResultSet* ExecuteQuery( const TString& sql="" );
0052 virtual Int_t ExecuteUpdate( const TString& sql="" );
0053
0054
0055 TSQLResultSet* GetResultSet();
0056 Bool_t GetMoreResults();
0057 void Close();
0058 void Cancel();
0059 Int_t GetMaxFieldSize();
0060 void SetMaxFieldSize( Int_t max );
0061 Int_t GetMaxRows();
0062 void SetMaxRows( Int_t max );
0063 Bool_t GetEscapeProcessing();
0064 void SetEscapeProcessing( Bool_t enable = kTRUE );
0065 Int_t GetQueryTimeout();
0066 void SetQueryTimeout( Int_t seconds );
0067 Int_t GetUpdateCount();
0068 void SetCursorName( const TString& name );
0069 void AddBatch( const TString& sql );
0070 void ClearBatch();
0071 Int_t* ExecuteBatch();
0072 Int_t GetFetchDirection();
0073 void SetFetchDirection( Int_t direction );
0074 Int_t GetFetchSize();
0075 void SetFetchSize(Int_t rows);
0076 Int_t GetResultSetConcurrency();
0077 Int_t GetResultSetType();
0078
0079 private:
0080 #ifndef __CINT__
0081 std::vector < boost::shared_ptr<std::istream> > _vec_str_buf;
0082 #endif
0083
0084 ClassDef(ODBCPreparedStatement,0)
0085 };
0086
0087 #endif