18 #pragma warning(disable:4355) 28 sword res = OCIDescriptorAlloc(session.
envhp_,
29 reinterpret_cast<dvoid**>(&
lobp_), OCI_DTYPE_LOB, 0, 0);
30 if (res != OCI_SUCCESS)
32 throw soci_error(
"Cannot allocate the LOB locator");
38 OCIDescriptorFree(
lobp_, OCI_DTYPE_LOB);
48 if (res != OCI_SUCCESS)
53 return static_cast<std::size_t
>(len);
57 std::size_t offset,
char *buf, std::size_t toRead)
59 ub4 amt =
static_cast<ub4
>(toRead);
62 static_cast<ub4>(offset), reinterpret_cast<dvoid*>(buf),
64 if (res != OCI_SUCCESS)
69 return static_cast<std::size_t
>(amt);
73 std::size_t offset,
char const *buf, std::size_t toWrite)
75 ub4 amt =
static_cast<ub4
>(toWrite);
78 static_cast<ub4>(offset),
79 reinterpret_cast<dvoid*>(const_cast<char*>(buf)),
80 amt, OCI_ONE_PIECE, 0, 0, 0, 0);
81 if (res != OCI_SUCCESS)
86 return static_cast<std::size_t
>(amt);
91 ub4 amt =
static_cast<ub4
>(toWrite);
94 &amt, reinterpret_cast<dvoid*>(const_cast<char*>(buf)),
95 amt, OCI_ONE_PIECE, 0, 0, 0, 0);
96 if (res != OCI_SUCCESS)
101 return static_cast<std::size_t
>(amt);
107 static_cast<ub4>(newLen));
108 if (res != OCI_SUCCESS)
oracle_blob_backend(oracle_session_backend &session)
virtual std::size_t append(char const *buf, std::size_t toWrite)
virtual std::size_t write(std::size_t offset, char const *buf, std::size_t toWrite)
void throw_oracle_soci_error(sword res, OCIError *errhp)
oracle_session_backend & session_
virtual void trim(std::size_t newLen)
virtual std::size_t read(std::size_t offset, char *buf, std::size_t toRead)
virtual std::size_t get_len()