30 Error(
"initResultSet",
"construction: empty statement");
34 if (stmt->status() == oracle::occi::Statement::RESULT_SET_AVAILABLE) {
39 }
else if (stmt->status() == oracle::occi::Statement::UPDATE_COUNT_AVAILABLE) {
46 }
catch (oracle::occi::SQLException &oraex) {
47 Error(
"initResultSet",
"%s", (oraex.getMessage()).c_str());
86 if (!tableName || !conn) {
87 Error(
"TOracleResult",
"construction: empty input parameter");
89 oracle::occi::MetaData connMD = conn->getMetaData(tableName, oracle::occi::MetaData::PTYPE_TABLE);
90 fFieldInfo =
new std::vector<oracle::occi::MetaData>(connMD.getVector(oracle::occi::MetaData::ATTR_LIST_COLUMNS));
136 Error(
"IsValid",
"field index out of bounds");
157 fNameBuffer = (*fFieldInfo)[field].getString(oracle::occi::MetaData::ATTR_NAME);
177 if (
fResult->next() != oracle::occi::ResultSet::END_OF_FETCH) {
182 }
catch (oracle::occi::SQLException &oraex) {
183 Error(
"Next",
"%s", (oraex.getMessage()).c_str());
208 while ((res =
Next()) !=
nullptr) {
void Add(TObject *obj) override
TObject * Remove(TObject *obj) override
Remove object from the list.
TObject * First() const override
Return the first object in the list. Returns 0 when list is empty.
void Delete(Option_t *option="") override
Remove all objects from the list AND delete all heap based objects.
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.
TOracleResult(const TOracleResult &)=delete
oracle::occi::Connection * fConn
oracle::occi::ResultSet * fResult