SourcePro® API Reference Guide

 
List of all members | Public Member Functions
RWDBEnvironmentHandle Class Reference

Abstract base class from which all vendor-specific environment handles must derive. Environment handles are methods that can set or retrieve certain configuration parameters. More...

#include <rw/db/envhandl.h>

Inheritance diagram for RWDBEnvironmentHandle:
RWDBDB2CLILibEnvironmentHandle RWDBMsSqlLibEnvironmentHandle RWDBMySqlLibEnvironmentHandle RWDBOCIEnvironmentHandle RWDBODBCLibEnvironmentHandle RWDBPGSEnvironmentHandle RWDBSybCtLibEnvironmentHandle

Public Member Functions

 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)
 

Detailed Description

RWDBEnvironmentHandle is a base class from which a family of implementation-specific classes is derived. RWDBDatabase::environmentHandle() returns a pointer to this base class. To set connect time configuration parameters or configuration properties for an entire application, the application downcasts this pointer to the appropriate type, and uses its implementation-specific features. The configuration parameters that an application can set vary widely among vendors. Please see the guide for your Access Module.

DB XA Module: Also see the chapter on using access modules with DB XA functionality in the DB XA Module User's Guide.

Note
You must link the appropriate DB Access Module directly with your application in order to downcast an instance of RWDBEnvironmentHandle to a particular database type. Using this class reduces the portability of your application.
Synopsis
#include <rw/db/envhandl.h>

Constructor & Destructor Documentation

RWDBEnvironmentHandle::RWDBEnvironmentHandle ( )

Constructs an empty RWDBEnvironmentHandle. This constructor is provided as a convenience. A usable RWDBEnvironmentHandle should be produced by an RWDBDatabase. See the guide for your Access Module for specific details on how to use the methods of class RWDBEnvironmentHandle.

DB XA Module: Also see the chapter on using access modules with DB XA functionality in the DB XA Module User's Guide.

Member Function Documentation

bool RWDBEnvironmentHandle::cacheResultSchemas ( ) const

Returns the state of the flag that controls whether to install and use result schema caching.

bool RWDBEnvironmentHandle::cacheResultSchemas ( bool  value)

Enables or disables result schema caching. Result schema caching can improve performance, but should not be used when database schemas are dynamic. See Section 9.5, "Result Schema Caching," in the DB Interface Module User's Guide.

virtual bool RWDBEnvironmentHandle::foreignKeysFromView ( )
virtual

Returns false.

If this functionality is implemented by the Access Module specific derived class, this function shall return true if a higher-performance version of RWDBTable::foreignKeys() is used. Returns false otherwise.

Reimplemented in RWDBOCIEnvironmentHandle.

virtual bool RWDBEnvironmentHandle::foreignKeysFromView ( bool  value)
virtual

Returns false.

If this functionality is implemented by the Access Module specific derived class, passing value as true enables a higher-performance version of RWDBTable::foreignKeys() to be used. Passing false enables the standard version of RWDBTable::foreignKeys() to be used. Returns the previous value.

Reimplemented in RWDBOCIEnvironmentHandle.

size_t RWDBEnvironmentHandle::maxCachedResultSets ( ) const

Returns the maximum number of result sets being cached from execution of an SQL query. Result sets are cached by SourcePro DB when using a Data Manipulation class.

size_t RWDBEnvironmentHandle::maxCachedResultSets ( size_t  value)

Limits the number of result sets that are cached from execution of an SQL query to value. Caching result sets improves performance for subsequent executions of the same SQL, but if the SQL returns a large number of result sets, or some number of very large sets, memory usage can become an issue. The result sets are cached by SourcePro DB when using a Data Manipulation class. The default value is 100.

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