#include <TOracleRow.h>
◆ TOracleRow() [1/2]
| TOracleRow::TOracleRow |
( |
ResultSet * |
rs, |
|
|
std::vector< MetaData > * |
fieldMetaData |
|
) |
| |
◆ TOracleRow() [2/2]
| TOracleRow::TOracleRow |
( |
UInt_t |
updateCount | ) |
|
std::vector< std::string > * fFields
Definition: TOracleRow.h:36
Int_t fResultType
Definition: TOracleRow.h:38
UInt_t fUpdateCount
Definition: TOracleRow.h:37
UInt_t fFieldCount
Definition: TOracleRow.h:35
◆ ~TOracleRow()
| TOracleRow::~TOracleRow |
( |
| ) |
|
void Close(Option_t *opt="")
Definition: TOracleRow.cxx:54
◆ Close()
| void TOracleRow::Close |
( |
Option_t * |
opt = "" | ) |
|
std::vector< MetaData > * fFieldInfo
Definition: TOracleRow.h:34
ResultSet * fResult
Definition: TOracleRow.h:33
◆ GetField()
| const char * TOracleRow::GetField |
( |
Int_t |
field | ) |
|
200 Error(
"TOracleRow",
"GetField(): out-of-range or No RowData/ResultSet/MetaData");
203 return (*
fFields)[field].c_str();
Bool_t IsValid(Int_t field)
Definition: TOracleRow.cxx:70
◆ GetFieldLength()
| ULong_t TOracleRow::GetFieldLength |
( |
Int_t |
field | ) |
|
93 MetaData fieldMD = (*fFieldInfo)[field];
95 return fieldMD.getInt(MetaData::ATTR_DATA_SIZE);
◆ GetRowData()
| int TOracleRow::GetRowData |
( |
| ) |
|
|
protected |
111 Error(
"GetRowData()",
"Empty row, resultset or MetaData");
114 int fDataType, fDataSize, fPrecision, fScale;
115 char str_number[1024];
116 int int_val;
double double_val;
float float_val;
122 fDataType = (*fFieldInfo)[i].getInt(MetaData::ATTR_DATA_TYPE);
123 fDataSize = (*fFieldInfo)[i].getInt(MetaData::ATTR_DATA_SIZE);
124 fPrecision = (*fFieldInfo)[i].getInt(MetaData::ATTR_PRECISION);
125 fScale = (*fFieldInfo)[i].getInt(MetaData::ATTR_SCALE);
128 if (fScale == 0 || fPrecision == 0) {
129 int_val =
fResult->getInt(i+1);
130 sprintf(str_number,
"%d", int_val);
131 }
else if (fPrecision != 0 && fScale == -127) {
132 double_val =
fResult->getDouble(i+1);
133 sprintf(str_number,
"%lf", double_val);
134 }
else if (fScale > 0) {
135 float_val =
fResult->getFloat(i+1);
136 sprintf(str_number,
"%f", float_val);
138 (*fFields)[i] = str_number;
142 (*fFields)[i] =
fResult->getString(i+1);
147 (*fFields)[i] = (
fResult->getTimestamp(i+1)).toText(
"MM/DD/YYYY, HH24:MI:SS",0);
151 (*fFields)[i] =
fResult->getString(i+1);
154 Error(
"GetRowData()",
"Oracle type %d not supported.", fDataType);
160 }
catch (SQLException &oraex) {
161 Error(
"GetRowData()", (oraex.getMessage()).c_str());
◆ GetRowData2()
| int TOracleRow::GetRowData2 |
( |
| ) |
|
|
protected |
177 Error(
"GetRowData2()",
"Empty row, resultset or MetaData");
186 (*fFields)[i] =
fResult->getString(i+1);
190 }
catch (SQLException &oraex) {
191 Error(
"GetRowData2()", (oraex.getMessage()).c_str());
◆ IsValid()
| Bool_t TOracleRow::IsValid |
( |
Int_t |
field | ) |
|
|
private |
75 Error(
"IsValid",
"row closed");
78 if (field < 0 || field >= (Int_t)
fFieldInfo->size()) {
79 Error(
"IsValid",
"field index out of bounds");
◆ fFieldCount
| UInt_t TOracleRow::fFieldCount |
|
private |
◆ fFieldInfo
| std::vector<MetaData>* TOracleRow::fFieldInfo |
|
private |
◆ fFields
| std::vector<std::string>* TOracleRow::fFields |
|
private |
◆ fResult
| ResultSet* TOracleRow::fResult |
|
private |
◆ fResultType
| Int_t TOracleRow::fResultType |
|
private |
◆ fUpdateCount
| UInt_t TOracleRow::fUpdateCount |
|
private |
The documentation for this class was generated from the following files: