SourcePro® API Reference Guide

Product Documentation:
   SourcePro
Documentation Home
List of all members | Public Member Functions

Provides a mechanism for making direct calls to the Oracle OCI API, and some methods for setting access module-specific properties. More...

#include <rw/db/ocisrc/ocisysh.h>

Inheritance diagram for RWDBOCISystemHandle:
RWDBSystemHandle

Public Member Functions

OCIError * errorHandle ()
 
ub4 lobPrefetchSize () const
 
ub4 lobPrefetchSize (ub4 size)
 
size_t maximumBlobSize () const
 
size_t maximumBlobSize (size_t size)
 
OCIEnv * ociEnvh ()
 
OCISvcCtx * ociServerContext ()
 
size_t piecewiseSize () const
 
size_t piecewiseSize (size_t size)
 
ub4 prefetchSize () const
 
ub4 prefetchSize (ub4 newSize)
 
OCIServer * serverHandle ()
 

Detailed Description

Class RWDBOCISystemHandle provides methods for setting and retrieving options that affect performance. It also contains the OCI handles OCIError, OCIEnv, OCISvcCtx, and OCIServer used by the RWDBConnection.

Note
Use of this class reduces an application's portability.
Synopsis
#include <rw/db/ocisrc/ocisysh.h>
(RWDBOCISystemHandle*)myConnection.systemHandle();
Example
If it is necessary for your application to make calls directly to OCI, proceed as in the following example. Please be aware of the complications associated with making direct OCI calls, as the internal logic of the DB Access Module for Oracle OCI is not used. Also note that your application must be compiled with an include path to the include files of the DB Access Module for Oracle OCI.
#include <rw/db/ocisrc/ocisysh.h>
RWDBConnection ociConnect = myDbase.connection();
OCIEnv* env = handle->ociEnvh();
// use the OCIEnv pointer for Oracle OCI calls

Member Function Documentation

OCIError* RWDBOCISystemHandle::errorHandle ( )

Returns a pointer to the OCIError encapsulated by the respective RWDBConnection.

ub4 RWDBOCISystemHandle::lobPrefetchSize ( ) const

Returns the size, in bytes (for BLOB) or characters (for CLOB), of LOB data that will be cached by the Oracle client to facilitate faster retrieval of LOB data. The default is 0, meaning this feature is disabled by default.

Note
This option is only supported on Oracle 11.x clients and newer.
ub4 RWDBOCISystemHandle::lobPrefetchSize ( ub4  size)

When fetching large character or binary data (CLOB or BLOB) the Oracle client can cache data to facilitate faster retrieval of LOB columns. Set size to the amount of data per row in bytes (for BLOB) or characters (for CLOB) that should be prefetched. Setting size to 0 disables prefetching.

Note
This option is only supported on Oracle 11.x clients and newer. Usage of this method with older Oracle clients will result in a RWDBStatus::invalidUsage error.
size_t RWDBOCISystemHandle::maximumBlobSize ( ) const
Deprecated:
As of SourcePro 11, this setting is not used in the DB Access Module for Oracle OCI.

Returns the size of the memory buffer used when retrieving large-sized data (LONG/LONG RAW or CLOB/BLOB). The default size is 32kb - 1.

size_t RWDBOCISystemHandle::maximumBlobSize ( size_t  size)
Deprecated:
As of SourcePro 11, this setting is not used in the DB Access Module for Oracle OCI.

Sets the size of the memory buffer used when retrieving large-sized data (LONG/LONG RAW or CLOB/BLOB). The default size is 32kb - 1.

OCIEnv* RWDBOCISystemHandle::ociEnvh ( )

Returns a pointer to the OCIEnv encapsulated by the respective RWDBConnection.

OCISvcCtx* RWDBOCISystemHandle::ociServerContext ( )

Returns a pointer to the OCISvcCtx encapsulated by the respective RWDBConnection. Each RWDBConnection maintains a separate OCISvcCtx.

size_t RWDBOCISystemHandle::piecewiseSize ( ) const

Returns the size of chunks, in bytes, used to send or receive large blocks of data (LONG, LONG RAW, CLOB, BLOB, or SYS.XMLTYPE). The default is 32768.

size_t RWDBOCISystemHandle::piecewiseSize ( size_t  size)

When fetching or sending large character or binary data (LONG, LONG RAW, CLOB, BLOB, or SYS.XMLTYPE), data is sent or received in size bytes at a time. Returns the previous setting.

ub4 RWDBOCISystemHandle::prefetchSize ( ) const
inline

Returns the current prefetch row size. The default value is 10.

ub4 RWDBOCISystemHandle::prefetchSize ( ub4  newSize)
inline

Sets the prefetch row size to newSize. Returns the previously used prefetch row size.

The prefetch row size is used to set the OCI statement attribute OCI_ATTR_PREFETCH_ROWS for every execution. This attribute controls the number of rows an Oracle client prefetches from an Oracle server for the result set produced by the query execution. It affects the number of server round trips and has a direct effect on performance.

OCIServer* RWDBOCISystemHandle::serverHandle ( )

Returns a pointer to the OCIServer encapsulated by the respective RWDBConnection.

Copyright © 2021 Rogue Wave Software, Inc., a Perforce company. All Rights Reserved.