26 ClassImp(TOracleStatement);
29 using namespace oracle::occi;
37 TOracleStatement::TOracleStatement(Environment* env, Connection* conn, Statement* stmt, Int_t niter, Bool_t errout) :
38 TSQLStatement(errout),
46 fNumIterations(niter),
49 fTimeFmt(TOracleServer::GetDatimeFormat())
52 fStmt->setPrefetchMemorySize(1000000);
53 fStmt->setPrefetchRowCount(niter);
54 fStmt->setMaxIterations(niter);
61 TOracleStatement::~TOracleStatement()
70 void TOracleStatement::Close(Option_t *)
77 fStmt->closeResultSet(fResult);
80 fConn->terminateStatement(fStmt);
92 #define CheckStatement(method, res) \
96 SetError(-1,"Statement is not correctly initialized",method); \
102 #define CheckSetPar(method) \
104 CheckStatement(method, kFALSE); \
105 if (!IsParSettMode()) { \
106 SetError(-1,"Parameters cannot be set for this statement", method); \
110 TString errmsg("Invalid parameter number "); \
112 SetError(-1,errmsg.Data(),method); \
117 #define CheckGetField(method, defres) \
120 if (!IsResultSet()) { \
121 SetError(-1,"There is no result set for statement", method); \
124 if ((npar<0) || (npar>=fBufferSize)) { \
125 TString errmsg("Invalid parameter number "); \
127 SetError(-1,errmsg.Data(),method); \
136 void TOracleStatement::SetBufferSize(Int_t size)
141 fBuffer =
new TBufferRec[size];
142 for (Int_t n=0;n<fBufferSize;n++) {
143 fBuffer[n].strbuf = 0;
144 fBuffer[n].strbufsize = -1;
145 fBuffer[n].namebuf = 0;
152 void TOracleStatement::CloseBuffer()
155 for (Int_t n=0;n<fBufferSize;n++) {
156 delete[] fBuffer[n].strbuf;
157 delete[] fBuffer[n].namebuf;
169 Bool_t TOracleStatement::Process()
171 CheckStatement(
"Process", kFALSE);
175 if (IsParSettMode()) {
176 fStmt->executeUpdate();
183 }
catch (SQLException &oraex) {
184 SetError(oraex.getErrorCode(), oraex.getMessage().c_str(),
"Process");
194 Int_t TOracleStatement::GetNumAffectedRows()
196 CheckStatement(
"GetNumAffectedRows", -1);
199 return fStmt->getUpdateCount();
200 }
catch (SQLException &oraex) {
201 SetError(oraex.getErrorCode(), oraex.getMessage().c_str(),
"GetNumAffectedRows");
211 Int_t TOracleStatement::GetNumParameters()
213 CheckStatement(
"GetNumParameters", -1);
215 Info(
"GetParametersNumber",
"Not implemented");
223 Bool_t TOracleStatement::SetNull(Int_t npar)
225 CheckSetPar(
"SetNull");
228 fStmt->setNull(npar+1, OCCIINT);
231 }
catch (SQLException &oraex) {
232 SetError(oraex.getErrorCode(), oraex.getMessage().c_str(),
"SetNull");
242 Bool_t TOracleStatement::SetInt(Int_t npar, Int_t value)
244 CheckSetPar(
"SetInt");
247 fStmt->setInt(npar+1, value);
250 }
catch (SQLException &oraex) {
251 SetError(oraex.getErrorCode(), oraex.getMessage().c_str(),
"SetInt");
260 Bool_t TOracleStatement::SetUInt(Int_t npar, UInt_t value)
262 CheckSetPar(
"SetUInt");
265 fStmt->setUInt(npar+1, value);
267 }
catch (SQLException &oraex) {
268 SetError(oraex.getErrorCode(), oraex.getMessage().c_str(),
"SetUInt");
277 Bool_t TOracleStatement::SetLong(Int_t npar, Long_t value)
279 CheckSetPar(
"SetLong");
282 fStmt->setNumber(npar+1, Number(value));
284 }
catch (SQLException &oraex) {
285 SetError(oraex.getErrorCode(), oraex.getMessage().c_str(),
"SetLong");
293 Bool_t TOracleStatement::SetLong64(Int_t npar, Long64_t value)
295 CheckSetPar(
"SetLong64");
298 fStmt->setNumber(npar+1, Number((
long double)value));
300 }
catch (SQLException &oraex) {
301 SetError(oraex.getErrorCode(), oraex.getMessage().c_str(),
"SetLong64");
309 Bool_t TOracleStatement::SetULong64(Int_t npar, ULong64_t value)
311 CheckSetPar(
"SetULong64");
314 fStmt->setNumber(npar+1, Number((
long double)value));
316 }
catch (SQLException &oraex) {
317 SetError(oraex.getErrorCode(), oraex.getMessage().c_str(),
"SetULong64");
325 Bool_t TOracleStatement::SetDouble(Int_t npar, Double_t value)
327 CheckSetPar(
"SetDouble");
330 fStmt->setDouble(npar+1, value);
332 }
catch (SQLException &oraex) {
333 SetError(oraex.getErrorCode(), oraex.getMessage().c_str(),
"SetDouble");
341 Bool_t TOracleStatement::SetString(Int_t npar,
const char* value, Int_t maxsize)
343 CheckSetPar(
"SetString");
348 if (fIterCounter==1) {
349 fStmt->setDatabaseNCHARParam(npar+1,
true);
350 fStmt->setMaxParamSize(npar+1, maxsize);
353 fStmt->setString(npar+1, value);
355 }
catch (SQLException &oraex) {
356 SetError(oraex.getErrorCode(), oraex.getMessage().c_str(),
"SetString");
364 Bool_t TOracleStatement::SetBinary(Int_t npar,
void* mem, Long_t size, Long_t maxsize)
366 CheckSetPar(
"SetBinary");
372 fStmt->setMaxParamSize(npar+1, maxsize);
374 Bytes buf((
unsigned char*) mem, size);
376 fStmt->setBytes(npar+1, buf);
380 }
catch (SQLException &oraex) {
381 SetError(oraex.getErrorCode(), oraex.getMessage().c_str(),
"SetBinary");
389 Bool_t TOracleStatement::SetDate(Int_t npar, Int_t year, Int_t month, Int_t day)
391 CheckSetPar(
"SetDate");
394 Date tm = fStmt->getDate(npar+1);
396 unsigned int o_month, o_day, o_hour, o_minute, o_second;
397 tm.getDate(o_year, o_month, o_day, o_hour, o_minute, o_second);
398 tm.setDate(year, month, day, o_hour, o_minute, o_second);
399 fStmt->setDate(npar+1, tm);
401 }
catch (SQLException &oraex) {
402 SetError(oraex.getErrorCode(), oraex.getMessage().c_str(),
"SetDate");
411 Bool_t TOracleStatement::SetTime(Int_t npar, Int_t hour, Int_t min, Int_t sec)
413 CheckSetPar(
"SetTime");
416 Date tm = fStmt->getDate(npar+1);
418 unsigned int o_month, o_day, o_hour, o_minute, o_second;
419 tm.getDate(o_year, o_month, o_day, o_hour, o_minute, o_second);
420 tm.setDate(o_year, o_month, o_day, hour, min, sec);
421 fStmt->setDate(npar+1, tm);
423 }
catch (SQLException &oraex) {
424 SetError(oraex.getErrorCode(), oraex.getMessage().c_str(),
"SetTime");
433 Bool_t TOracleStatement::SetDatime(Int_t npar, Int_t year, Int_t month, Int_t day, Int_t hour, Int_t min, Int_t sec)
435 CheckSetPar(
"SetDatime");
438 Date tm(fEnv, year, month, day, hour, min, sec);
439 fStmt->setDate(npar+1, tm);
441 }
catch (SQLException &oraex) {
442 SetError(oraex.getErrorCode(), oraex.getMessage().c_str(),
"SetDatime");
451 Bool_t TOracleStatement::SetTimestamp(Int_t npar, Int_t year, Int_t month, Int_t day, Int_t hour, Int_t min, Int_t sec, Int_t frac)
453 CheckSetPar(
"SetTimestamp");
456 Timestamp tm(fEnv, year, month, day, hour, min, sec, frac);
457 fStmt->setTimestamp(npar+1, tm);
459 }
catch (SQLException &oraex) {
460 SetError(oraex.getErrorCode(), oraex.getMessage().c_str(),
"SetTimestamp");
469 Bool_t TOracleStatement::SetVInt(Int_t npar,
const std::vector<Int_t> value,
const char* schemaName,
const char* typeName)
471 CheckSetPar(
"SetVInt");
474 setVector(fStmt, npar+1, value, schemaName, typeName);
476 }
catch (SQLException &oraex) {
477 SetError(oraex.getErrorCode(), oraex.getMessage().c_str(),
"SetVInt");
486 Bool_t TOracleStatement::SetVUInt(Int_t npar,
const std::vector<UInt_t> value,
const char* schemaName,
const char* typeName)
488 CheckSetPar(
"SetVUInt");
491 setVector(fStmt, npar+1, value, schemaName, typeName);
493 }
catch (SQLException &oraex) {
494 SetError(oraex.getErrorCode(), oraex.getMessage().c_str(),
"SetVUInt");
503 Bool_t TOracleStatement::SetVLong(Int_t npar,
const std::vector<Long_t> value,
const char* schemaName,
const char* typeName)
505 CheckSetPar(
"SetVLong");
508 std::vector<Number> nvec;
509 for (std::vector<Long_t>::const_iterator it = value.begin();
512 nvec.push_back(Number(*it));
514 setVector(fStmt, npar+1, nvec, schemaName, typeName);
516 }
catch (SQLException &oraex) {
517 SetError(oraex.getErrorCode(), oraex.getMessage().c_str(),
"SetVLong");
525 Bool_t TOracleStatement::SetVLong64(Int_t npar,
const std::vector<Long64_t> value,
const char* schemaName,
const char* typeName)
527 CheckSetPar(
"SetVLong64");
530 std::vector<Number> nvec;
531 for (std::vector<Long64_t>::const_iterator it = value.begin();
534 nvec.push_back(Number((
long double)*it));
536 setVector(fStmt, npar+1, nvec, schemaName, typeName);
538 }
catch (SQLException &oraex) {
539 SetError(oraex.getErrorCode(), oraex.getMessage().c_str(),
"SetVLong64");
547 Bool_t TOracleStatement::SetVULong64(Int_t npar, std::vector<ULong64_t> value,
const char* schemaName,
const char* typeName)
549 CheckSetPar(
"SetVULong64");
552 std::vector<Number> nvec;
553 for (std::vector<ULong64_t>::const_iterator it = value.begin();
556 nvec.push_back(Number((
long double)*it));
558 setVector(fStmt, npar+1, nvec, schemaName, typeName);
560 }
catch (SQLException &oraex) {
561 SetError(oraex.getErrorCode(), oraex.getMessage().c_str(),
"SetVULong64");
569 Bool_t TOracleStatement::SetVDouble(Int_t npar,
const std::vector<Double_t> value,
const char* schemaName,
const char* typeName)
571 CheckSetPar(
"SetVDouble");
574 setVector(fStmt, npar+1, value, schemaName, typeName);
576 }
catch (SQLException &oraex) {
577 SetError(oraex.getErrorCode(), oraex.getMessage().c_str(),
"SetVDouble");
585 Bool_t TOracleStatement::NextIteration()
587 CheckStatement(
"NextIteration", kFALSE);
592 if ((fIterCounter % fNumIterations == 0) && (fIterCounter>0)) {
593 fStmt->executeUpdate();
596 if (fIterCounter % fNumIterations != 0) {
597 fStmt->addIteration();
603 }
catch (SQLException &oraex) {
604 SetError(oraex.getErrorCode(), oraex.getMessage().c_str(),
"NextIteration");
613 Bool_t TOracleStatement::StoreResult()
615 CheckStatement(
"StoreResult", kFALSE);
618 if (fStmt->status() == Statement::RESULT_SET_AVAILABLE) {
619 fResult = fStmt->getResultSet();
620 fFieldInfo = (fResult==0) ? 0 :
new std::vector<MetaData>(fResult->getColumnListMetaData());
621 Int_t count = (fFieldInfo==0) ? 0 : fFieldInfo->size();
622 SetBufferSize(count);
623 if ((fResult!=0) && (count>0)) fWorkingMode = 2;
625 return IsResultSet();
627 }
catch (SQLException &oraex) {
628 SetError(oraex.getErrorCode(), oraex.getMessage().c_str(),
"StoreResult");
638 Bool_t TOracleStatement::SetMaxFieldSize(Int_t nfield, Long_t maxsize)
640 CheckStatement(
"SetMaxFieldSize", kFALSE);
644 fResult->setMaxColumnSize(nfield+1, maxsize);
646 fStmt->setMaxParamSize(nfield+1, maxsize);
648 }
catch (SQLException &oraex) {
649 SetError(oraex.getErrorCode(), oraex.getMessage().c_str(),
"SetMaxFieldSize");
658 Int_t TOracleStatement::GetNumFields()
660 return IsResultSet() ? fBufferSize : -1;
666 const char* TOracleStatement::GetFieldName(Int_t npar)
668 CheckGetField(
"GetFieldName", 0);
670 if (!IsResultSet() || (npar<0) || (npar>=fBufferSize))
return 0;
672 if (fBuffer[npar].namebuf!=0)
return fBuffer[npar].namebuf;
674 std::string buff = (*fFieldInfo)[npar].getString(MetaData::ATTR_NAME);
676 if (buff.length()==0)
return 0;
678 fBuffer[npar].namebuf =
new char[buff.length()+1];
680 strcpy(fBuffer[npar].namebuf, buff.c_str());
682 return fBuffer[npar].namebuf;
689 Bool_t TOracleStatement::NextResultRow()
694 SetError(-1,
"There is no result set for statement",
"NextResultRow");
698 if (fResult==0)
return kFALSE;
701 for (
int n=0;n<fBufferSize;n++) {
702 if (fBuffer[n].strbuf)
703 delete[] fBuffer[n].strbuf;
704 fBuffer[n].strbuf = 0;
705 fBuffer[n].strbufsize = -1;
707 if (fResult->next() == oracle::occi::ResultSet::END_OF_FETCH) {
713 }
catch (SQLException &oraex) {
714 SetError(oraex.getErrorCode(), oraex.getMessage().c_str(),
"NextResultRow");
716 if (oraex.getErrorCode()==32108)
717 Info(
"NextResultRow",
"Use TSQLStatement::SetMaxFieldSize() to solve a problem");
727 Bool_t TOracleStatement::IsNull(Int_t npar)
729 CheckGetField(
"IsNull", kFALSE);
732 return fResult->isNull(npar+1);
733 }
catch (SQLException &oraex) {
734 SetError(oraex.getErrorCode(), oraex.getMessage().c_str(),
"IsNull");
743 Int_t TOracleStatement::GetInt(Int_t npar)
745 CheckGetField(
"GetInt", 0);
750 if (!fResult->isNull(npar+1))
751 res = fResult->getInt(npar+1);
752 }
catch (SQLException &oraex) {
753 SetError(oraex.getErrorCode(), oraex.getMessage().c_str(),
"GetInt");
762 UInt_t TOracleStatement::GetUInt(Int_t npar)
764 CheckGetField(
"GetUInt", 0);
769 if (!fResult->isNull(npar+1))
770 res = fResult->getUInt(npar+1);
771 }
catch (SQLException &oraex) {
772 SetError(oraex.getErrorCode(), oraex.getMessage().c_str(),
"GetUInt");
782 Long_t TOracleStatement::GetLong(Int_t npar)
784 CheckGetField(
"GetLong", 0);
789 if (!fResult->isNull(npar+1))
790 res = (Long_t) fResult->getNumber(npar+1);
791 }
catch (SQLException &oraex) {
792 SetError(oraex.getErrorCode(), oraex.getMessage().c_str(),
"GetLong");
801 Long64_t TOracleStatement::GetLong64(Int_t npar)
803 CheckGetField(
"GetLong64", 0);
808 if (!fResult->isNull(npar+1))
809 res = (Long64_t) (
long double) fResult->getNumber(npar+1);
810 }
catch (SQLException &oraex) {
811 SetError(oraex.getErrorCode(), oraex.getMessage().c_str(),
"GetLong64");
820 ULong64_t TOracleStatement::GetULong64(Int_t npar)
822 CheckGetField(
"GetULong64", 0);
827 if (!fResult->isNull(npar+1))
828 res = (ULong64_t) (
long double) fResult->getNumber(npar+1);
829 }
catch (SQLException &oraex) {
830 SetError(oraex.getErrorCode(), oraex.getMessage().c_str(),
"GetULong64");
839 Double_t TOracleStatement::GetDouble(Int_t npar)
841 CheckGetField(
"GetDouble", 0.);
846 if (!fResult->isNull(npar+1))
847 res = fResult->getDouble(npar+1);
848 }
catch (SQLException &oraex) {
849 SetError(oraex.getErrorCode(), oraex.getMessage().c_str(),
"GetDouble");
858 const char* TOracleStatement::GetString(Int_t npar)
860 CheckGetField(
"GetString", 0);
862 if (fBuffer[npar].strbuf!=0)
return fBuffer[npar].strbuf;
865 if (fResult->isNull(npar+1))
return 0;
867 int datatype = (*fFieldInfo)[npar].getInt(MetaData::ATTR_DATA_TYPE);
873 int prec = (*fFieldInfo)[npar].getInt(MetaData::ATTR_PRECISION);
874 int scale = (*fFieldInfo)[npar].getInt(MetaData::ATTR_SCALE);
876 if ((scale == 0) || (prec == 0)) {
877 res = fResult->getString(npar+1);
879 double double_val = fResult->getDouble(npar+1);
881 snprintf(str_number,
sizeof(str_number), TSQLServer::GetFloatFormat(), double_val);
890 res = fResult->getString(npar+1);
893 res = (fResult->getDate(npar+1)).toText(fTimeFmt.Data());
896 case SQLT_TIMESTAMP_TZ:
897 case SQLT_TIMESTAMP_LTZ:
898 res = (fResult->getTimestamp(npar+1)).toText(fTimeFmt.Data(), 0);
901 res = fResult->getString(npar+1);
902 Info(
"getString",
"Type %d may not be supported", datatype);
905 int len = res.length();
908 fBuffer[npar].strbuf =
new char[len+1];
909 fBuffer[npar].strbufsize = len+1;
910 strcpy(fBuffer[npar].strbuf, res.c_str());
913 return fBuffer[npar].strbuf;
915 }
catch (SQLException &oraex) {
916 SetError(oraex.getErrorCode(), oraex.getMessage().c_str(),
"GetString");
928 Bool_t TOracleStatement::GetBinary(Int_t npar,
void* &mem, Long_t& size)
933 CheckGetField(
"GetBinary", kFALSE);
935 if (fBuffer[npar].strbufsize>=0) {
936 mem = fBuffer[npar].strbuf;
937 size = fBuffer[npar].strbufsize;
942 if (fResult->isNull(npar+1))
return kTRUE;
944 int datatype = (*fFieldInfo)[npar].getInt(MetaData::ATTR_DATA_TYPE);
948 Bytes parbytes = fResult->getBytes(npar+1);
950 size = parbytes.length();
952 fBuffer[npar].strbufsize = size;
957 fBuffer[npar].strbuf = (
char*) mem;
959 parbytes.getBytes((
unsigned char*) mem, size);
966 Blob parblob = fResult->getBlob(npar+1);
968 size = parblob.length();
970 fBuffer[npar].strbufsize = size;
975 fBuffer[npar].strbuf = (
char*) mem;
977 parblob.read(size, (
unsigned char*) mem, size);
984 Clob parclob = fResult->getClob(npar+1);
986 size = parclob.length();
988 fBuffer[npar].strbufsize = size;
993 fBuffer[npar].strbuf = (
char*) mem;
995 parclob.read(size, (
unsigned char*) mem, size);
1004 Bfile parbfile = fResult->getBfile(npar+1);
1006 size = parbfile.length();
1008 fBuffer[npar].strbufsize = size;
1013 fBuffer[npar].strbuf = (
char*) mem;
1015 parbfile.read(size, (
unsigned char*) mem, size);
1022 Error(
"GetBinary",
"Oracle data type %d not supported", datatype);
1023 SetError(-1,
"Unsupported type for binary convertion",
"GetBinary");
1029 }
catch (SQLException &oraex) {
1030 SetError(oraex.getErrorCode(), oraex.getMessage().c_str(),
"GetBinary");
1040 Bool_t TOracleStatement::GetDate(Int_t npar, Int_t& year, Int_t& month, Int_t& day)
1042 Int_t hour, min, sec;
1044 return GetDatime(npar, year, month, day, hour, min, sec);
1050 Bool_t TOracleStatement::GetTime(Int_t npar, Int_t& hour, Int_t& min, Int_t& sec)
1052 Int_t year, month, day;
1054 return GetDatime(npar, year, month, day, hour, min, sec);
1060 Bool_t TOracleStatement::GetDatime(Int_t npar, Int_t& year, Int_t& month, Int_t& day, Int_t& hour, Int_t& min, Int_t& sec)
1062 CheckGetField(
"GetDatime", kFALSE);
1065 if (!fResult->isNull(npar+1)) {
1066 int datatype = (*fFieldInfo)[npar].getInt(MetaData::ATTR_DATA_TYPE);
1068 if (datatype!=SQLT_DAT)
return kFALSE;
1070 Date tm = fResult->getDate(npar+1);
1072 unsigned int o_month, o_day, o_hour, o_minute, o_second;
1073 tm.getDate(o_year, o_month, o_day, o_hour, o_minute, o_second);
1074 year = (Int_t) o_year;
1075 month = (Int_t) o_month;
1076 day = (Int_t) o_day;
1077 hour = (Int_t) o_hour;
1078 min = (Int_t) o_minute;
1079 sec = (Int_t) o_second;
1082 }
catch (SQLException &oraex) {
1083 SetError(oraex.getErrorCode(), oraex.getMessage().c_str(),
"GetDatime");
1092 Bool_t TOracleStatement::GetTimestamp(Int_t npar, Int_t& year, Int_t& month, Int_t& day, Int_t& hour, Int_t& min, Int_t& sec, Int_t& frac)
1094 CheckGetField(
"GetTimestamp", kFALSE);
1097 if (!fResult->isNull(npar+1)) {
1098 int datatype = (*fFieldInfo)[npar].getInt(MetaData::ATTR_DATA_TYPE);
1100 if ((datatype!=SQLT_TIMESTAMP) &&
1101 (datatype!=SQLT_TIMESTAMP_TZ) &&
1102 (datatype!=SQLT_TIMESTAMP_LTZ))
return kFALSE;
1104 Timestamp tm = fResult->getTimestamp(npar+1);
1106 unsigned int o_month, o_day, o_hour, o_minute, o_second, o_frac;
1107 tm.getDate(o_year, o_month, o_day);
1108 tm.getTime(o_hour, o_minute, o_second, o_frac);
1109 year = (Int_t) o_year;
1110 month = (Int_t) o_month;
1111 day = (Int_t) o_day;
1112 hour = (Int_t) o_hour;
1113 min = (Int_t) o_minute;
1114 sec = (Int_t) o_second;
1115 frac = (Int_t) o_frac;
1118 }
catch (SQLException &oraex) {
1119 SetError(oraex.getErrorCode(), oraex.getMessage().c_str(),
"GetTimestamp");
1128 Bool_t TOracleStatement::GetVInt(Int_t npar, std::vector<Int_t> &value)
1130 CheckGetField(
"GetVInt", kFALSE);
1132 if (!fResult->isNull(npar+1))
1133 getVector(fResult, npar+1, value);
1135 }
catch (SQLException &oraex) {
1136 SetError(oraex.getErrorCode(), oraex.getMessage().c_str(),
"GetVInt");
1144 Bool_t TOracleStatement::GetVUInt(Int_t npar, std::vector<UInt_t> &value)
1146 CheckGetField(
"GetVUInt", kFALSE);
1148 if (!fResult->isNull(npar+1))
1149 getVector(fResult, npar+1, value);
1151 }
catch (SQLException &oraex) {
1152 SetError(oraex.getErrorCode(), oraex.getMessage().c_str(),
"GetVUInt");
1161 Bool_t TOracleStatement::GetVLong(Int_t npar, std::vector<Long_t> &value)
1163 CheckGetField(
"GetVLong", kFALSE);
1165 std::vector<Number> res;
1166 if (!fResult->isNull(npar+1))
1167 getVector(fResult, npar+1, res);
1168 for (std::vector<Number>::const_iterator it = res.begin();
1171 value.push_back((Long_t)*it);
1174 }
catch (SQLException &oraex) {
1175 SetError(oraex.getErrorCode(), oraex.getMessage().c_str(),
"GetVLong");
1183 Bool_t TOracleStatement::GetVLong64(Int_t npar, std::vector<Long64_t> &value)
1185 CheckGetField(
"GetVLong64", kFALSE);
1187 std::vector<Number> res;
1188 if (!fResult->isNull(npar+1))
1189 getVector(fResult, npar+1, res);
1190 for (std::vector<Number>::const_iterator it = res.begin();
1193 value.push_back((Long_t)*it);
1196 }
catch (SQLException &oraex) {
1197 SetError(oraex.getErrorCode(), oraex.getMessage().c_str(),
"GetVLong64");
1205 Bool_t TOracleStatement::GetVULong64(Int_t npar, std::vector<ULong64_t> &value)
1207 CheckGetField(
"GetVULong64", kFALSE);
1209 std::vector<Number> res;
1210 if (!fResult->isNull(npar+1))
1211 getVector(fResult, npar+1, res);
1212 for (std::vector<Number>::const_iterator it = res.begin();
1215 value.push_back((Long_t)(
long double)*it);
1218 }
catch (SQLException &oraex) {
1219 SetError(oraex.getErrorCode(), oraex.getMessage().c_str(),
"GetVULong64");
1227 Bool_t TOracleStatement::GetVDouble(Int_t npar, std::vector<Double_t> &value)
1229 CheckGetField(
"GetVDouble", kFALSE);
1231 if (!fResult->isNull(npar+1))
1232 getVector(fResult, npar+1, value);
1234 }
catch (SQLException &oraex) {
1235 SetError(oraex.getErrorCode(), oraex.getMessage().c_str(),
"GetVDouble");