wrapper for the OCIEnv handle More...
#include <ocipl.h>
Public Types | |
typedef OciSimpleHandle< OCIEnv > | super |
typedef OCIEnv | HandleType |
Public Member Functions | |
OciEnvAlloc (ub4 oci_mode=OCI_OBJECT) | |
operator HandleType * () | |
void | alloc (OCIEnv *envh) |
void | destroy () |
void | get_attribute (dvoid *attributep, ub4 *sizep, ub4 attrtype, OCIError *errh) |
Static Public Member Functions | |
static ub4 | get_type_id () |
static ub4 | get_attr_id () |
Protected Attributes | |
HandleType * | _handle |
OCIEnv * | _envh |
wrapper for the OCIEnv handle
Definition at line 533 of file ocipl.h.
typedef OCIEnv OCIPL::OciSimpleHandle< OCIEnv >::HandleType [inherited] |
typedef OciSimpleHandle<OCIEnv> OCIPL::OciEnvAlloc::super |
Reimplemented from OCIPL::OciSimpleHandle< OCIEnv >.
OCIPL::OciEnvAlloc::OciEnvAlloc | ( | ub4 | oci_mode = OCI_OBJECT ) |
[inline] |
Definition at line 538 of file ocipl.h.
{ #if ORACLE_VERSION>=81 #ifdef UNICODE sword res = OCIEnvNlsCreate(&_handle, oci_mode, 0/*ctxp*/, 0, 0, 0, 0/*xtramem_sz*/, 0/*usrmempp*/, OCI_UTF16ID, OCI_UTF16ID); #else sword res = OCIEnvCreate(&_handle, oci_mode, 0/*ctxp*/, 0, 0, 0, 0/*xtramem_sz*/, 0/*usrmempp*/); #endif //oci_check_error(res); #else sword res = OCIInitialize(oci_mode, 0/*ctxp*/, 0, 0, 0); //oci_check_error(res); OCIEnvInit(&_handle, OCI_DEFAULT, (size_t)0, (dvoid **) 0); #endif }
void OCIPL::OciSimpleHandle< OCIEnv >::alloc | ( | OCIEnv * | envh ) | [inline, inherited] |
Definition at line 445 of file ocipl.h.
{ // If we already manage a handle, free it. if (_handle) destroy(); _envh = envh; sword res = OCIHandleAlloc(envh, (dvoid**)&_handle, super::get_type_id(), 0, 0); oci_check_error(envh, res); }
void OCIPL::OciSimpleHandle< OCIEnv >::destroy | ( | ) | [inline, inherited] |
Definition at line 458 of file ocipl.h.
{ sword res = OCIHandleFree(_handle, super::get_type_id()); _handle = 0; if (_envh) { oci_check_error(_envh, res); _envh = 0; } }
static ub4 OCIPL::OciHandleID< OCIEnv >::get_attr_id | ( | ) | [static, inherited] |
void OCIPL::OciSimpleHandle< OCIEnv >::get_attribute | ( | dvoid * | attributep, |
ub4 * | sizep, | ||
ub4 | attrtype, | ||
OCIError * | errh | ||
) | [inline, inherited] |
Definition at line 470 of file ocipl.h.
{ sword res = OCIAttrGet(_handle, super::get_type_id(), attributep, sizep, attrtype, errh); oci_check_error(_envh, res); }
static ub4 OCIPL::OciHandleID< OCIEnv >::get_type_id | ( | ) | [static, inherited] |
OCIPL::OciSimpleHandle< OCIEnv >::operator HandleType * | ( | ) | [inline, inherited] |
OCIEnv* OCIPL::OciSimpleHandle< OCIEnv >::_envh [protected, inherited] |
HandleType* OCIPL::OciSimpleHandle< OCIEnv >::_handle [protected, inherited] |