8 #define SOCI_ORACLE_SOURCE 23 #pragma warning(disable:4355) 67 oracleType = SQLT_AFC;
71 oracleType = SQLT_INT;
75 oracleType = SQLT_INT;
79 oracleType = SQLT_FLT;
80 size =
sizeof(double);
86 oracleType = SQLT_STR;
88 buf_ =
new char[size];
92 oracleType = SQLT_STR;
94 buf_ =
new char[size];
98 oracleType = SQLT_DAT;
99 size = 7 *
sizeof(ub1);
100 buf_ =
new char[size];
107 oracleType = SQLT_RSET;
120 oracleType = SQLT_RDD;
133 oracleType = SQLT_BLOB;
135 blob *b =
static_cast<blob *
>(data);
146 sword res = OCIDefineByPos(statement_.stmtp_, &defnp_,
147 statement_.session_.errhp_,
148 position++, data, size, oracleType,
149 &indOCIHolder_, 0, &rCode_, OCI_DEFAULT);
151 if (res != OCI_SUCCESS)
169 bool gotData,
bool calledFromFetch,
indicator *ind)
177 if (indOCIHolder_ != -1)
179 std::string *s =
static_cast<std::string *
>(data_);
185 if (indOCIHolder_ != -1)
187 long long *v =
static_cast<long long *
>(data_);
188 *v = std::strtoll(buf_, NULL, 10);
193 if (indOCIHolder_ != -1)
195 unsigned long long *v =
static_cast<unsigned long long *
>(data_);
196 *v = std::strtoull(buf_, NULL, 10);
201 if (indOCIHolder_ != -1)
203 std::tm *t =
static_cast<std::tm *
>(data_);
205 ub1 *pos =
reinterpret_cast<ub1*
>(buf_);
207 t->tm_year = (*pos++ - 100) * 100;
208 t->tm_year += *pos++ - 2000;
209 t->tm_mon = *pos++ - 1;
211 t->tm_hour = *pos++ - 1;
212 t->tm_min = *pos++ - 1;
213 t->tm_sec = *pos++ - 1;
227 if (calledFromFetch ==
true && gotData ==
false)
237 if (indOCIHolder_ == 0)
241 else if (indOCIHolder_ == -1)
253 if (indOCIHolder_ == -1)
256 throw soci_error(
"Null value fetched and no indicator defined.");
265 OCIHandleFree(defnp_, OCI_HTYPE_DEFINE);
details::statement_backend * get_backend()
details::rowid_backend * get_backend()
void throw_oracle_soci_error(sword res, OCIError *errhp)
virtual oracle_standard_into_type_backend * make_into_type_backend()
virtual oracle_vector_into_type_backend * make_vector_into_type_backend()
details::blob_backend * get_backend()
virtual void define_by_pos(int &position, void *data, details::exchange_type type)
virtual void post_fetch(bool gotData, bool calledFromFetch, indicator *ind)
virtual oracle_vector_use_type_backend * make_vector_use_type_backend()
virtual oracle_standard_use_type_backend * make_use_type_backend()