Provides methods for setting and retrieving certain connect time and configuration parameters. More...
#include <rw/db/db2clisrc/db2envh.h>
Public Member Functions | |
virtual SQLINTEGER | accessMode () const |
virtual RWDBStatus | accessMode (SQLINTEGER mode) |
virtual SQLINTEGER | connectType () const |
virtual RWDBStatus | connectType (SQLINTEGER type) |
size_t | maxBlobSize () const |
RWDBStatus | maxBlobSize (size_t rVal) |
virtual SQLINTEGER | maxConnections () const |
virtual RWDBStatus | maxConnections (SQLINTEGER value) |
size_t | maxStringSize () const |
RWDBStatus | maxStringSize (size_t rVal) |
virtual SQLINTEGER | syncPoint () const |
virtual RWDBStatus | syncPoint (SQLINTEGER value) |
SQLUINTEGER | timeout () const |
RWDBStatus | timeout (SQLUINTEGER val) |
bool | unicodeMode () const |
void | unicodeMode (bool enabled) |
Public Member Functions inherited from RWDBEnvironmentHandle | |
RWDBEnvironmentHandle () | |
bool | cacheResultSchemas () const |
bool | cacheResultSchemas (bool value) |
virtual bool | foreignKeysFromView () |
virtual bool | foreignKeysFromView (bool value) |
size_t | maxCachedResultSets () const |
size_t | maxCachedResultSets (size_t value) |
Class RWDBDB2CLILibEnvironmentHandle provides methods for setting and retrieving certain connect time and configuration parameters.
Please note that some connect time parameters are set only when a connection is established with the server. When the method returns a valid RWDBStatus for these parameters, it does not necessarily mean that the connection parameter has been accepted by the server. Appropriate error messages are fielded to the application only when a connection is established.
|
virtual |
Returns the current setting of the access mode. The default is SQL_MODE_READ_WRITE
.
|
virtual |
Sets the connection mode for all new connections. The value of mode can be either SQL_MODE_READ_ONLY
or SQL_MODE_READ_WRITE
. Please refer to the DB2 CLI documentation from IBM for detailed information.
SQL_ATTR_ACCESS_MODE
attribute affects only connections opened after that point. Connections that are already open are not affected.
|
virtual |
Returns the connection type. Possible values are SQL_CONCURRENT_TRANS
and SQL_COORDINATED_TRANS
. (See connectType(SQLINTEGER type) for the meaning of these connection types.)
The default value is SQL_CONCURRENT_TRANS
.
|
virtual |
Sets the connection type. Possible values are SQL_CONCURRENT_TRANS
, which means that applications operate in an uncoordinated distributed environment, or SQL_COORDINATED_TRANS
which means processing is coordinated. The connect type can only be set when no connections are open. Please refer to your DB2CLI documentation for detailed information about this setting.
size_t RWDBDB2CLILibEnvironmentHandle::maxBlobSize | ( | ) | const |
Returns the maximum byte length of blobs retrieved. The default is 128,000.
RWDBStatus RWDBDB2CLILibEnvironmentHandle::maxBlobSize | ( | size_t | rVal | ) |
Sets the maximum byte length of blobs retrieved, to rVal.
If the size of the blob data column being fetched is greater than the value last set, then an attempt is made to fetch the data in parts. If this is not possible, then the data is truncated to rVal bytes.
|
virtual |
Returns the maximum number of concurrent connections. The default value is 0, meaning that the application is allowed to set up as many connections as system resources permit.
|
virtual |
Set the maximum number of concurrent connections. This attribute can be set only when no connections are opened. Returns a RWDBStatus indicating whether the operation was successful.
The default value of 0 allows the application to set up as many connections as system resources permit. Any other value indicates a limit on the number of connections.
size_t RWDBDB2CLILibEnvironmentHandle::maxStringSize | ( | ) | const |
Returns the maximum byte length of strings retrieved. The default is 128,000.
RWDBStatus RWDBDB2CLILibEnvironmentHandle::maxStringSize | ( | size_t | rVal | ) |
Sets the maximum byte length of strings retrieved, to rVal.
If the size of the string data column being fetched is greater than the value last set, then an attempt is made to fetch the data in parts. If this is not possible, then the data is truncated to rVal bytes.
|
virtual |
Returns the current setting of syncPoint
. The default value is SQL_ONEPHASE
.
|
virtual |
Sets how transactions are coordinated. Possible values for value are SQL_ONEPHASE
and SQL_TWOPHASE
. The sync point can be set only when no connections are open.
SQLUINTEGER RWDBDB2CLILibEnvironmentHandle::timeout | ( | ) | const |
Returns the current value for the maximum number of seconds to wait for an SQL statement to execute before returning to the application.
RWDBStatus RWDBDB2CLILibEnvironmentHandle::timeout | ( | SQLUINTEGER | val | ) |
Defines the length of time in seconds to wait for an SQL statement to execute before returning to the application.
The application can set this value any time. It takes effect for all open connections immediately upon being called.
bool RWDBDB2CLILibEnvironmentHandle::unicodeMode | ( | ) | const |
Returns whether the access module maps string data to type RWCString (the default) or to type RWBasicUString in support of the Unicode UTF-16 data standard. The default value is false
.
void RWDBDB2CLILibEnvironmentHandle::unicodeMode | ( | bool | enabled | ) |
Sets how the access module maps string data.
A setting of true
changes the default mapping when retrieving data, to RWBasicUString instead of RWCString.
Copyright © 2021 Rogue Wave Software, Inc., a Perforce company. All Rights Reserved. |