BOSS 7.0.4
BESIII Offline Software System
Loading...
Searching...
No Matches
rdbModel::ResultHandle Class Referenceabstract

#include <ResultHandle.h>

+ Inheritance diagram for rdbModel::ResultHandle:

Public Member Functions

 ResultHandle ()
 
virtual ~ResultHandle ()
 
virtual unsigned int getNRows () const =0
 Return number of rows in results.
 
virtual bool getRow (std::vector< std::string > &fields, unsigned int i=0, bool clear=true)=0
 
virtual bool getRowCon (char *par, unsigned long *treesize, unsigned int *runFrm, unsigned int *runTo, unsigned int i=0, bool clear=true)=0
 
virtual bool getRowPtrs (std::vector< std::string * > &fields, unsigned int i=0, bool clear=true)=0
 
 ResultHandle ()
 
virtual ~ResultHandle ()
 
virtual unsigned int getNRows () const =0
 Return number of rows in results.
 
virtual bool getRow (std::vector< std::string > &fields, unsigned int i=0, bool clear=true)=0
 
virtual bool getRowCon (char *par, unsigned long *treesize, unsigned int *runFrm, unsigned int *runTo, unsigned int i=0, bool clear=true)=0
 
virtual bool getRowPtrs (std::vector< std::string * > &fields, unsigned int i=0, bool clear=true)=0
 

Static Public Member Functions

static void cleanFieldPtrs (std::vector< std::string * > &fields)
 
static void cleanFieldPtrs (std::vector< std::string * > &fields)
 

Detailed Description

Pure virtual class representing results of a query. Each concrete implementation of Connection will have an associated concrete implementation of ResultHandle

Definition at line 15 of file Calibration/rdbModel/rdbModel-00-01-01/rdbModel/Db/ResultHandle.h.

Constructor & Destructor Documentation

◆ ResultHandle() [1/2]

rdbModel::ResultHandle::ResultHandle ( )
inline

◆ ~ResultHandle() [1/2]

virtual rdbModel::ResultHandle::~ResultHandle ( )
inlinevirtual

◆ ResultHandle() [2/2]

rdbModel::ResultHandle::ResultHandle ( )
inline

◆ ~ResultHandle() [2/2]

virtual rdbModel::ResultHandle::~ResultHandle ( )
inlinevirtual

Member Function Documentation

◆ cleanFieldPtrs() [1/2]

void rdbModel::ResultHandle::cleanFieldPtrs ( std::vector< std::string * > &  fields)
static

Definition at line 7 of file ResultHandle.cxx.

7 {
8 for (unsigned i = 0; i < fields.size(); i++) {
9 if (fields[i] != 0) delete fields[i];
10 }
11 fields.resize(0);
12 }

Referenced by rdbModel::Table::supersedeRow().

◆ cleanFieldPtrs() [2/2]

static void rdbModel::ResultHandle::cleanFieldPtrs ( std::vector< std::string * > &  fields)
static

◆ getNRows() [1/2]

virtual unsigned int rdbModel::ResultHandle::getNRows ( ) const
pure virtual

◆ getNRows() [2/2]

virtual unsigned int rdbModel::ResultHandle::getNRows ( ) const
pure virtual

Return number of rows in results.

Implemented in rdbModel::MysqlResults, and rdbModel::MysqlResults.

◆ getRow() [1/2]

virtual bool rdbModel::ResultHandle::getRow ( std::vector< std::string > &  fields,
unsigned int  i = 0,
bool  clear = true 
)
pure virtual

Get array of field values for ith row of result set

Implemented in rdbModel::MysqlResults, and rdbModel::MysqlResults.

Referenced by Coverage::checkType(), and calibUtil::Metadata::getReadInfo().

◆ getRow() [2/2]

virtual bool rdbModel::ResultHandle::getRow ( std::vector< std::string > &  fields,
unsigned int  i = 0,
bool  clear = true 
)
pure virtual

Get array of field values for ith row of result set

Implemented in rdbModel::MysqlResults, and rdbModel::MysqlResults.

◆ getRowCon() [1/2]

virtual bool rdbModel::ResultHandle::getRowCon ( char *  par,
unsigned long *  treesize,
unsigned int *  runFrm,
unsigned int *  runTo,
unsigned int  i = 0,
bool  clear = true 
)
pure virtual

◆ getRowCon() [2/2]

virtual bool rdbModel::ResultHandle::getRowCon ( char *  par,
unsigned long *  treesize,
unsigned int *  runFrm,
unsigned int *  runTo,
unsigned int  i = 0,
bool  clear = true 
)
pure virtual

◆ getRowPtrs() [1/2]

virtual bool rdbModel::ResultHandle::getRowPtrs ( std::vector< std::string * > &  fields,
unsigned int  i = 0,
bool  clear = true 
)
pure virtual

Get array of field values for ith row of result set. If a field value is NULL, return a zero ptr for that element of the array

--> It is the responsibility of the caller to delete the strings containing the field values. See service cleanFieldPtrs.

Implemented in rdbModel::MysqlResults, and rdbModel::MysqlResults.

Referenced by rdbModel::Table::supersedeRow().

◆ getRowPtrs() [2/2]

virtual bool rdbModel::ResultHandle::getRowPtrs ( std::vector< std::string * > &  fields,
unsigned int  i = 0,
bool  clear = true 
)
pure virtual

Get array of field values for ith row of result set. If a field value is NULL, return a zero ptr for that element of the array

--> It is the responsibility of the caller to delete the strings containing the field values. See service cleanFieldPtrs.

Implemented in rdbModel::MysqlResults, and rdbModel::MysqlResults.


The documentation for this class was generated from the following files: