20using namespace oracle::occi;
67 Error(
"IsValid",
"row closed");
71 Error(
"IsValid",
"field index out of bounds");
85 MetaData fieldMD = (*fFieldInfo)[field];
87 return fieldMD.getInt(MetaData::ATTR_DATA_SIZE);
95 Error(
"TOracleRow",
"GetField(): out-of-range or No RowData/ResultSet/MetaData");
114 char str_number[200];
116 int fPrecision, fScale, fDataType;
122 if (
fResult->isNull(field+1))
continue;
124 fDataType = (*fFieldInfo)[field].getInt(MetaData::ATTR_DATA_TYPE);
128 fPrecision = (*fFieldInfo)[field].getInt(MetaData::ATTR_PRECISION);
129 fScale = (*fFieldInfo)[field].getInt(MetaData::ATTR_SCALE);
131 if ((fScale == 0) || (fPrecision == 0)) {
132 res =
fResult->getString(field+1);
134 double_val =
fResult->getDouble(field+1);
144 res =
fResult->getString(field+1);
150 case SQLT_TIMESTAMP_TZ:
151 case SQLT_TIMESTAMP_LTZ:
156 res =
fResult->getString(field+1);
159 Error(
"GetRowData",
"Oracle type %d was not yet tested - please inform ROOT developers", fDataType);
163 int len = res.length();
170 }
catch (SQLException &oraex) {
171 Error(
"GetRowData",
"%s", (oraex.getMessage()).c_str());
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
TOracleRow(const TOracleRow &)
~TOracleRow()
Destroy row object.
Bool_t IsValid(Int_t field)
Check if row is open and field index within range.
void Close(Option_t *opt="")
Close row.
ULong_t GetFieldLength(Int_t field)
Get length in bytes of specified field.
const char * GetField(Int_t field)
std::vector< oracle::occi::MetaData > * fFieldInfo
oracle::occi::ResultSet * fResult
static const char * GetDatimeFormat()
return value of actul convertion format from timestamps or date to string
static const char * GetFloatFormat()
return current printf format for float/double members, default "%e"