TDbiInRowStream.cxx File Reference

#include <sstream>
#include "TDbiFieldType.hxx"
#include "TDbiInRowStream.hxx"
#include "TDbiString.hxx"
#include "TDbiStatement.hxx"
#include "TDbiTableMetaData.hxx"
#include <TSK_DBI_Log.hxx>
#include <MsgFormat.h>
#include "UtilString.hxx"
#include "TVldTimeStamp.hxx"
Include dependency graph for TDbiInRowStream.cxx:

Go to the source code of this file.

Defines

#define IN(t)   istringstream in(AsString(t)); in
#define IN2(t, m)
#define IN3(t)

Functions

 ClassImp (TDbiInRowStream) TDbiInRowStream

Define Documentation

#define IN (  )     istringstream in(AsString(t)); in

Definition at line 124 of file TDbiInRowStream.cxx.

Referenced by TDbiInRowStream::operator>>().

#define IN2 ( t,
 ) 
Value:
int col = CurColNum()-1;                  \
  if ( CurRowNum() == 0 ) {                 \
    istringstream in(AsString(t));          \
    in >> dest;                             \
  }                                         \
  else {                                    \
    dest = fTSQLStatement->m(col);          \
    IncrementCurCol();                      \
  }                                         \

Definition at line 129 of file TDbiInRowStream.cxx.

Referenced by TDbiInRowStream::operator>>().

#define IN3 (  ) 
Value:
int col = this->CurColNum()-1;                                      \
const TDbiFieldType& fType = this->ColFieldType(col+1);              \
if ( fType.GetSize() == 8 ) {                                       \
  dest=fTSQLStatement->GetUInt(col);                                \
}                                                                   \
else {                                                              \
  t dest_signed;                                                    \
  *this >> dest_signed;                                             \
  dest = dest_signed;                                               \
  if ( fType.GetSize() == 1 ) dest &= 0xff;                         \
  if ( fType.GetSize() == 2 ) dest &= 0xffff;                       \
  if ( fType.GetSize() == 4 ) dest &= 0xffffffff;                   \
}\

Definition at line 149 of file TDbiInRowStream.cxx.

Referenced by TDbiInRowStream::operator>>().


Function Documentation

ClassImp ( TDbiInRowStream   ) 
   
     Purpose:  Default constructor
   
     Arguments:
        stmtDb     in  TDbiStatement to be used for query.  May be zero.
        sql        in  The query to be applied to the statement.
        metaData   in  Meta data for query.
        tableProxy in  Source TDbiTableProxy.
        dbNo       in  Cascade no. of source.
   
     Return:    n/a
   
     Contact:   N. West
   
     Specification:-
     =============
   
     o  Create ResultSet for query.
   

Definition at line 19 of file TDbiInRowStream.cxx.

References SK_DBI_Trace.

00029                 : ctors, dtor, operators then in alphabetical order.
00030 
00031 
00032 //.....................................................................
00033 ///\verbatim
00034 ///
00035 ///  Purpose:  Default constructor
00036 ///
00037 ///  Arguments:
00038 ///     stmtDb     in  TDbiStatement to be used for query.  May be zero.
00039 ///     sql        in  The query to be applied to the statement.
00040 ///     metaData   in  Meta data for query.
00041 ///     tableProxy in  Source TDbiTableProxy.
00042 ///     dbNo       in  Cascade no. of source.
00043 ///
00044 ///  Return:    n/a
00045 ///
00046 ///  Contact:   N. West
00047 ///
00048 ///  Specification:-
00049 ///  =============
00050 ///
00051 ///  o  Create ResultSet for query.
00052 ///\endverbatim
00053 
00054 TDbiInRowStream::TDbiInRowStream(TDbiStatement* stmtDb,
00055                            const TDbiString& sql,
00056                            const TDbiTableMetaData* metaData,
00057                            const TDbiTableProxy* tableProxy,
00058                            UInt_t dbNo,
00059                            const string& fillOpts) :
00060 TDbiRowStream(metaData),
00061 fCurRow(0),
00062 fDbNo(dbNo),
00063 fStatement(stmtDb),
00064 fTSQLStatement(0),
00065 fExhausted(true),
00066 fTableProxy(tableProxy),
00067 fFillOpts(fillOpts)
00068 {
00069 
00070 
00071 //  Program Notes:-
00072 //  =============
00073 
00074 //  None.
00075 
00076 
00077   SK_DBI_Trace( "Creating TDbiInRowStream" << "  ");
00078 
00079   if ( stmtDb ) {
00080     fTSQLStatement = stmtDb->ExecuteQuery(sql.c_str());
00081     if ( fTSQLStatement && fTSQLStatement->NextResultRow() ) fExhausted = false;
00082   }
00083 
00084 }


Generated on 11 Aug 2013 for SKDatabase by  doxygen 1.6.1