base class for the BLOB/CLOB data holders OCIPL::OciLob and OCIPL::OciClob More...
#include <ocipl.h>


Public Member Functions | |
| OciLob (OciConnection &conn) | |
| OciLob (OciConnection &conn, OCILobLocator *loc) | |
| OciLob (const OciLob &other) | |
| ~OciLob () | |
| boolean | operator== (const OciLob &other) const |
| void | clear () |
| void * | get_ref () |
| const void * | get_ptr () const |
| ub4 | get_chunk_size () |
| void | copy (const OciLob &src, ub4 amount, ub4 dst_offset, ub4 src_offset) |
| void | append (const OciLob &src) |
| void | trim (ub4 newlen=0) |
| ub4 | erase (ub4 offset, ub4 amount) |
| void | enable_buffering () |
| void | disable_buffering () |
| void | flush (ub4 flag=OCI_LOB_BUFFER_NOFREE) |
| bool | is_null () const |
| bool | is_not_null () const |
| const SqlInd & | ind () const |
| SqlInd & | ind () |
Protected Attributes | |
| OciConnection & | _conn |
| OCILobLocator * | _loc |
| SqlInd | _ind |
Friends | |
| struct | OciOpenLob |
base class for the BLOB/CLOB data holders OCIPL::OciLob and OCIPL::OciClob
Definition at line 1959 of file ocipl.h.
| OCIPL::OciLob::OciLob | ( | OciConnection & | conn ) | [inline] |
Definition at line 1963 of file ocipl.h.
References OCIPL::OciConnection::_env, and OCIPL::oci_check_error().
: _conn(conn) { sword res = OCIDescriptorAlloc(conn._env, (dvoid**)&_loc, OCI_DTYPE_LOB, 0, NULL); oci_check_error(conn._env, res); }

| OCIPL::OciLob::OciLob | ( | OciConnection & | conn, |
| OCILobLocator * | loc | ||
| ) | [inline] |
| OCIPL::OciLob::OciLob | ( | const OciLob & | other ) | [inline] |
Definition at line 1976 of file ocipl.h.
References _loc, and OCIPL::oci_check_error().
: _conn(other._conn) { sword res = OCIDescriptorAlloc(_conn._env, (dvoid**)&_loc, OCI_DTYPE_LOB, 0, NULL); oci_check_error(_conn._env._errh, res); #if ORACLE_VERSION>=81 res = OCILobLocatorAssign(_conn._ctx, _conn._env._errh, other._loc, &_loc); #else res = OCILobAssign(_conn._env, _conn._env._errh, other._loc, &_loc); // no support for temporary LOBs #endif oci_check_error(_conn._env._errh, res); clear(); }

| OCIPL::OciLob::~OciLob | ( | ) | [inline] |
Definition at line 1992 of file ocipl.h.
References OCIPL::oci_check_error().
{
#if ORACLE_VERSION>=81
// According to the Oracle 10g documentation we should try to free
// implicit created temporary LOBs as soon as possible.
if (is_temporary()) {
sword res = OCILobFreeTemporary(_conn._ctx, _conn._env._errh, _loc);
oci_check_error(_conn._env._errh, res);
}
#endif
sword res = OCIDescriptorFree(_loc, OCI_DTYPE_LOB);
oci_check_error(_conn._env._errh, res);
}

| void OCIPL::OciLob::append | ( | const OciLob & | src ) | [inline] |
Definition at line 2080 of file ocipl.h.
References _loc, and OCIPL::oci_check_error().
{
sword res = OCILobAppend(_conn._ctx, _conn._env._errh, _loc, src._loc);
oci_check_error(_conn._env._errh, res);
}

| void OCIPL::OciLob::clear | ( | ) | [inline] |
Definition at line 2018 of file ocipl.h.
References OCIPL::oci_check_error().
{
ub4 lobEmpty = 0;
sword res = OCIAttrSet(_loc, OCI_DTYPE_LOB, &lobEmpty, 0, OCI_ATTR_LOBEMPTY, _conn._env._errh);
oci_check_error(_conn._env._errh, res);
}

| void OCIPL::OciLob::copy | ( | const OciLob & | src, |
| ub4 | amount, | ||
| ub4 | dst_offset, | ||
| ub4 | src_offset | ||
| ) | [inline] |
Definition at line 2074 of file ocipl.h.
References _loc, and OCIPL::oci_check_error().
{
sword res = OCILobCopy(_conn._ctx, _conn._env._errh, _loc, src._loc, amount, dst_offset, src_offset);
oci_check_error(_conn._env._errh, res);
}

| void OCIPL::OciLob::disable_buffering | ( | ) | [inline] |
Definition at line 2107 of file ocipl.h.
References OCIPL::oci_check_error().
{
sword res = OCILobDisableBuffering(_conn._ctx, _conn._env._errh, _loc);
oci_check_error(_conn._env._errh, res);
}

| void OCIPL::OciLob::enable_buffering | ( | ) | [inline] |
Definition at line 2101 of file ocipl.h.
References OCIPL::oci_check_error().
{
sword res = OCILobEnableBuffering(_conn._ctx, _conn._env._errh, _loc);
oci_check_error(_conn._env._errh, res);
}

| ub4 OCIPL::OciLob::erase | ( | ub4 | offset, |
| ub4 | amount | ||
| ) | [inline] |
Definition at line 2092 of file ocipl.h.
References OCIPL::oci_check_error().
{
sword res = OCILobErase(_conn._ctx, _conn._env._errh, _loc, &amount, offset);
oci_check_error(_conn._env._errh, res);
return amount;
}

| void OCIPL::OciLob::flush | ( | ub4 | flag = OCI_LOB_BUFFER_NOFREE ) |
[inline] |
Definition at line 2113 of file ocipl.h.
References OCIPL::oci_check_error().
{
sword res = OCILobFlushBuffer(_conn._ctx, _conn._env._errh, _loc, flag);
oci_check_error(_conn._env._errh, res);
}

| ub4 OCIPL::OciLob::get_chunk_size | ( | ) | [inline] |
Definition at line 2031 of file ocipl.h.
References OCIPL::oci_check_error().
{
ub4 len;
sword res = OCILobGetLength(_conn._ctx, _conn._env._errh, _loc, &len);
oci_check_error(_conn._env._errh, res);
return len;
}

| const void* OCIPL::OciLob::get_ptr | ( | ) | const [inline] |
| SqlInd& OCIPL::SqlValue::ind | ( | ) | [inline, inherited] |
| const SqlInd& OCIPL::SqlValue::ind | ( | ) | const [inline, inherited] |
Definition at line 1244 of file ocipl.h.
Referenced by OCIPL::BindInput::BindInput(), OCIPL::BindOutput::BindOutput(), OCIPL::DefinePar::DefinePar(), OCIPL::OciDate::OciDate(), OCIPL::OciDateArray::set_date(), OCIPL::SqlDateTimeArray::set_datetime(), and OCIPL::SqlNumberArray::set_number().
{return _ind;}

| bool OCIPL::SqlValue::is_not_null | ( | ) | const [inline, inherited] |
Definition at line 1242 of file ocipl.h.
Referenced by OCIPL::SqlInt::operator int().
{return _ind.is_not_null();}

| bool OCIPL::SqlValue::is_null | ( | ) | const [inline, inherited] |
| boolean OCIPL::OciLob::operator== | ( | const OciLob & | other ) | const [inline] |
Definition at line 2007 of file ocipl.h.
References _loc, and OCIPL::oci_check_error().
{
boolean is_equal;
sword res = OCILobIsEqual(_conn._env, _loc, other._loc, &is_equal);
oci_check_error(_conn._env._errh, res);
return is_equal;
}

| void OCIPL::OciLob::trim | ( | ub4 | newlen = 0 ) |
[inline] |
Definition at line 2086 of file ocipl.h.
References OCIPL::oci_check_error().
{
sword res = OCILobTrim(_conn._ctx, _conn._env._errh, _loc, newlen);
oci_check_error(_conn._env._errh, res);
}

OciConnection& OCIPL::OciLob::_conn [protected] |
SqlInd OCIPL::SqlValue::_ind [protected, inherited] |
Definition at line 1248 of file ocipl.h.
Referenced by OCIPL::OciDate::OciDate(), OCIPL::SqlString::operator=(), and OCIPL::SqlNumber::SqlNumber().
OCILobLocator* OCIPL::OciLob::_loc [protected] |
1.7.2