17using namespace oracle::occi;
27 Error(
"initResultSet",
"construction: empty statement");
31 if (stmt->status() == Statement::RESULT_SET_AVAILABLE) {
36 }
else if (stmt->status() == Statement::UPDATE_COUNT_AVAILABLE) {
43 }
catch (SQLException &oraex) {
44 Error(
"initResultSet",
"%s", (oraex.getMessage()).c_str());
83 if (!tableName || !conn) {
84 Error(
"TOracleResult",
"construction: empty input parameter");
86 MetaData connMD = conn->getMetaData(tableName, MetaData::PTYPE_TABLE);
87 fFieldInfo =
new vector<MetaData>(connMD.getVector(MetaData::ATTR_LIST_COLUMNS));
133 Error(
"IsValid",
"field index out of bounds");
154 fNameBuffer = (*fFieldInfo)[field].getString(MetaData::ATTR_NAME);
174 if (
fResult->next() != oracle::occi::ResultSet::END_OF_FETCH) {
179 }
catch (SQLException &oraex) {
180 Error(
"Next",
"%s", (oraex.getMessage()).c_str());
205 while ((res =
Next()) !=
nullptr) {
virtual void Add(TObject *obj)
virtual TObject * Remove(TObject *obj)
Remove object from the list.
virtual void Delete(Option_t *option="")
Remove all objects from the list AND delete all heap based objects.
virtual TObject * First() const
Return the first object in the list. Returns 0 when list is empty.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
Bool_t IsValid(Int_t field)
Check if result set is open and field index within range.
Int_t GetRowCount() const final
TSQLRow * Next() final
Get next query result row.
oracle::occi::Statement * fStmt
std::vector< oracle::occi::MetaData > * fFieldInfo
const char * GetFieldName(Int_t field) final
Get name of specified field.
void initResultSet(oracle::occi::Statement *stmt)
Oracle query result.
void Close(Option_t *opt="") final
Close query result.
~TOracleResult()
Cleanup Oracle query result.
Int_t GetFieldCount() final
Get number of fields in result.
oracle::occi::Connection * fConn
oracle::occi::ResultSet * fResult
TOracleResult(const TOracleResult &)