SourcePro C++ 12.0 |
SourcePro® C++ API Reference Guide |
SourcePro C++ Documentation Home |
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>
Public Member Functions | |
ub4 | prefetchSize () const |
ub4 | prefetchSize (ub4 newSize) |
size_t | piecewiseSize () const |
size_t | piecewiseSize (size_t size) |
ub4 | lobPrefetchSize () const |
ub4 | lobPrefetchSize (ub4 size) |
size_t | maximumBlobSize () const |
size_t | maximumBlobSize (size_t size) |
OCIError * | errorHandle () |
OCIEnv * | ociEnvh () |
OCISvcCtx * | ociServerContext () |
OCIServer * | serverHandle () |
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.
#include <rw/db/ocisrc/ocisysh.h> RWDBOCISystemHandle* sys = (RWDBOCISystemHandle*)myConnection.systemHandle();
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(); RWDBOCISystemHandle* handle = (RWDBOCISystemHandle*)ociConnect.systemHandle(); OCIEnv* env = handle->ociEnvh(); // use the OCIEnv pointer for Oracle OCI calls
OCIError* RWDBOCISystemHandle::errorHandle | ( | ) |
Returns a pointer to the OCIError
encapsulated by the respective RWDBConnection.
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 characeters (for CLOB) that should be prefetched. Setting size to 0 disables prefetching.
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.
size_t RWDBOCISystemHandle::maximumBlobSize | ( | size_t | size | ) |
Not used in the DB Access Module for Oracle OCI.
size_t RWDBOCISystemHandle::maximumBlobSize | ( | ) | const |
Not used in the DB Access Module for Oracle OCI.
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 | ( | 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.
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.
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 exeution. It affects the number of server round trips and has a direct effect on performance.
ub4 RWDBOCISystemHandle::prefetchSize | ( | ) | const [inline] |
Returns the current prefetch row size. The default value is 10.
OCIServer* RWDBOCISystemHandle::serverHandle | ( | ) |
Returns a pointer to the OCIServer
encapsulated by the respective RWDBConnection.
© Copyright Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave and SourcePro are registered trademarks of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.
Contact Rogue Wave about documentation or support issues.