The DB Access Module for PostgreSQL returns an environment handle that has the type RWDBPGSEnvironmentHandle. This handle provides methods that an application can use to set or retrieve certain connect time and configuration parameters.
Connect time parameters are not set until a connection is established with the server. When a method returns a valid RWDBStatus, it doesn't necessarily mean that the connection parameter was accepted by the server. Appropriate error messages are fielded to the application only when a connection is established.
NOTE -- Connect time parameters are not set until a connection is established with the server.
The DB Access Module for PostgreSQL has not implemented the virtual functions foreignKeysFromView() and foreignKeysFromView(bool value) from the base class RWDBEnvronmentHandle.
Both functions are therefore no-ops which return false.
The following example shows how to gain access to RWDBPGSEnvironmentHandle. Note that the application must be compiled with an include path to the PostgreSQL libpq include files.
#include <rw/db/pgssrc/pgsenvh.h> RWDBEnvironmentHandle* enH = adb.environmentHandle(); RWDBPGSEnvironmentHandle* pgsH = (RWDBPGSEnvironmentHandle*)enH;
The connectTimeout() method defines the length of time in seconds that the PostgreSQL libpq library waits for a login response when making a connection attempt.
void connectTimeout(int value); int connectTimeout() const;
The serviceName() method defines a service name to be used in the connect string passed to PQconnectdb. It specifies a service name that holds the additional connection parameters. Please see the PostgreSQL documentation for more details.
void serviceName(const RWCString& name); RWCString serviceName() const;
The binaryAsLo() method tells the DB Access Module for PostgreSQL to map RWDBBlob to the user-defined datatype LO when selecting data or performing queries.
void binaryAsLo(bool flag); bool binaryAsLo() const;
© 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.