SourcePro® API Reference Guide

 
Loading...
Searching...
No Matches

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

#include <rw/db/pgssrc/pgssysh.h>

Inheritance diagram for RWDBPGSSystemHandle:
RWDBSystemHandle

Public Member Functions

PGconn * dbc () const
 
unsigned long rowsPerCursorFetch () const
 
RWDBStatus rowsPerCursorFetch (unsigned long value)
 
unsigned long serverVersion () const
 

Detailed Description

Class RWDBPGSSystemHandle provides methods for setting and retrieving options that affect performance. It also contains the PGconn used by the RWDBConnection.

Note
Use of this class reduces an application's portability.
Synopsis
#include <rw/db/pgssrc/pgssysh.h>
(RWDBPGSSystemHandle*)myConnection.systemHandle();
Provides a mechanism for making direct calls to the PostgreSQL API, and some methods for setting acce...
Definition pgssysh.h:65
Example
If it is necessary for your application to make calls directly to the PostgreSQL libpq API, proceed as in the following example.
#include <rw/db/pgssrc/pgsdefs.h>
#include <rw/db/pgssrc/pgssysh.h>
RWDBConnection connect = myDbase.connection();
PGconn* dbc = handle->dbc();
// Use dbc for PostgreSQL libpq API calls.
Represents an explicit database connection object that can be used in place of the implicit database ...
Definition connect.h:81
RWDBSystemHandle * systemHandle() const
PGconn * dbc() const
Definition pgssysh.h:102

Member Function Documentation

◆ dbc()

PGconn * RWDBPGSSystemHandle::dbc ( ) const
inline

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

◆ rowsPerCursorFetch() [1/2]

unsigned long RWDBPGSSystemHandle::rowsPerCursorFetch ( ) const

Returns the number of rows that will be fetched from the server with cursor result sets in a single call. The default value is 10.

◆ rowsPerCursorFetch() [2/2]

RWDBStatus RWDBPGSSystemHandle::rowsPerCursorFetch ( unsigned long value)

Sets value to the number of rows to be fetched from the server with cursor result sets in a single call, and returns an RWDBStatus indicating whether the operation succeeded.

◆ serverVersion()

unsigned long RWDBPGSSystemHandle::serverVersion ( ) const

Returns the version of the server we're connected to.

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