Rogue Wave banner
Previous fileTop of DocumentContentsIndexNext file

RWDBDatabase



Data Type and Member Function Indexes
(exclusive of constructors and destructors)

Synopsis

#include <rw/db/dbase.h>
#include <rw/db/dbmgr.h>

RWDBDatabase dBase = 
  RWDBManager::database("accessLib", "Servername",
                        "Username", "PassWord",
                        "DatabaseName");

Description

RWDBDatabase manages connections with database servers. A database object represents a server, a user on that server, and a database opened for that user. Database objects are produced by the RWDBManager. Class RWDBDatabase provides an interface for obtaining database-specific objects and data definition language (DDL) concepts.

RWDBDatabase is designed around the Interface/Implementation paradigm. An RWDBDatabase instance is an interface to a reference-counted implementation; copy constructors and assignment operators produce additional references to a shared implementation. An RWDBDatabase implementation is a base class from which a family of database-specific implementations is derived.

Every valid RWDBDatabase implementation has a database type. For example, the database type might be SYBASE or ORACLE. Applications request RWDBDatabases of a particular type by specifying the type to the RWDBManager; once a valid RWDBDatabase instance is obtained, its implementation type is transparent to the application. Objects produced by an RWDBDatabase instance automatically have the same implementation type as the producer. For example, a SYBASE type RWDBDatabase automatically produces SYBASE type RWDBTables.

Public Enum and Defines

enum tableType{ UserTable = 1, SystemTable = 2, View = 4, 
                Synonym = 8 }
#define rwdbAllTypes SystemTable|UserTable|View|Synonym 

Public Constructors

RWDBDatabase();
RWDBDatabase(const RWDBDatabase& dbase);

Public Member Operators

RWDBDatabase&
operator=(const RWDBDatabase& dbase);
RWBoolean 
operator==(const RWDBDatabase& dbase) const;
RWBoolean
operator!=(const RWDBDatabase& dbase) const;

Public Member Functions

void
acquire() const;
RWCString::caseCompare
caseCompare() const;
RWCString::caseCompare
caseCompare(RWCString::caseCompare cmp);
static RWBoolean
connect() const;
static void
connect(RWBoolean enable);
RWDBConnection
connection(RWDBConnection::ConnectionType 
             type = RWDBConnection::Synchronous) const;
RWDBStatus
createProcedure(const RWCString& name, 
                const RWCString& sql) const;
RWDBStatus
createProcedure(const RWCString& name, const RWCString& sql,
                const RWDBConnection& connection) const;
RWDBStatus
createProcedure(const RWCString& name, const RWCString& sql,
                const RWDBSchema& params) const;
RWDBStatus
createProcedure(const RWCString& name, const RWCString& sql,
                const RWDBSchema& params, 
                const RWDBConnection& connection) const;
RWDBStatus
createProcedure(const RWDBStoredProc& proc) const;
RWDBStatus
createProcedure(const RWDBStoredProc& proc,
                const RWDBConnection& connection) const;
RWDBStatus
createTable(const RWDBTable& table) const;
RWDBStatus
createTable(const RWCString& name, 
            const RWDBSchema& schema) const;
RWDBStatus
createTable(const RWDBTable& table,
            const RWDBConnection& connection) const;
RWDBStatus
createTable(const RWCString& name, const RWDBSchema& schema,
            const RWDBConnection& connection) const;
RWDBStatus
createView(const RWCString& viewName,
           const RWDBSelectorBase& select) const;
RWDBStatus
createView(const RWCString& viewName, 
           const RWDBSchema& columnList,
           const RWDBSelectorBase& select) const;
RWDBStatus
createView(const RWCString& viewName, 
           const RWDBSelectorBase& select, 
           const RWDBConnection& connection) const;
RWDBStatus
createView(const RWCString& viewName,
           const RWDBSchema& columnList,
           const RWDBSelectorBase& select, 
           const RWDBConnection& connection) const;
RWDBStatus
createView(const RWCString& viewName, 
           const RWCString& sql) const;
RWDBStatus
createView(const RWCString& viewName, 
           const RWDBSchema& columnList,
           const RWCString& sql) const;
RWDBStatus
createView(const RWCString& viewName, RWCString& sql, 
           const RWDBConnection& connection) const;
RWDBStatus
createView(const RWCString& viewName, 
           const RWDBSchema& columnList,
           const RWCString& sql, 
           const RWDBConnection& connection) const;
RWDBCursor     
cursor(const RWCString& select, 
       const RWDBSchema& updateCols, 
       const RWDBConnection& connection,
       RWDBCursor::CursorType cursorType = 
                              RWDBCursor::Sequential, 
       RWDBCursor::CursorAccess cursorAccess = 
                              RWDBCursor::Read) const;
RWDBCursor     
cursor(const RWCString& select, 
       const RWDBSchema& updateCols,
       RWDBCursor::CursorType cursorType = 
                              RWDBCursor::Sequential, 
       RWDBCursor::CursorAccess cursorAccess = 
                              RWDBCursor::Read) const;
RWDBCursor
cursor(const RWDBSelector& selector,
       const RWDBSchema& updateCols,
       const RWDBConnection& connection,
       RWDBCursor::CursorType cursorType =
                              RWDBCursor::Sequential, 
       RWDBCursor::CursorAccess cursorAccess = 
                              RWDBCursor::Read) const;
RWDBCursor     
cursor(const RWDBSelector& selector, 
       const RWDBSchema& updateCols, 
       RWDBCursor::CursorType cursorType =
                              RWDBCursor::Sequential, 
       RWDBCursor::CursorAccess cursorAccess = 
                              RWDBCursor::Read) const;
RWDBCursor
cursor(const RWDBCompoundSelector& selector, 
       const RWDBSchema& updateCols, 
       const RWDBConnection& connection,
       RWDBCursor::CursorType cursorType =
                              RWDBCursor::Sequential, 
       RWDBCursor::CursorAccess cursorAccess = 
                              RWDBCursor::Read) const;
RWDBCursor
cursor(const RWDBCompoundSelector& selector, 
       const RWDBSchema& updateCols, 
       RWDBCursor::CursorType cursorType =
                              RWDBCursor::Sequential, 
       RWDBCursor::CursorAccess cursorAccess = 
                              RWDBCursor::Read) const;
RWDBCursor
cursor(const RWCString& sql, 
       RWDBCursor::CursorType cursorType =
                              RWDBCursor::Sequential, 
       RWDBCursor::CursorAccess cursorAccess = 
                              RWDBCursor::Read) const;
RWDBCursor
cursor(const RWCString& sql, 
       const RWDBConnection& connection, 
       RWDBCursor::CursorType cursorType =
                              RWDBCursor::Sequential, 
       RWDBCursor::CursorAccess cursorAccess = 
                              RWDBCursor::Read) const;
RWDBCursor
cursor(const RWDBSelector& select, 
       RWDBCursor::CursorType cursorType =
                              RWDBCursor::Sequential, 
       RWDBCursor::CursorAccess cursorAccess = 
                              RWDBCursor::Read) const;
RWDBCursor
cursor(const RWDBSelector& select, 
       const RWDBConnection& connection, 
       RWDBCursor::CursorType cursorType =
                              RWDBCursor::Sequential, 
       RWDBCursor::CursorAccess cursorAccess = 
                              RWDBCursor::Read) const;
RWDBCursor
cursor(const RWDBCompoundSelector& select,
       RWDBCursor::CursorType cursorType =
                              RWDBCursor::Sequential, 
       RWDBCursor::CursorAccess cursorAccess = 
                              RWDBCursor::Read) const;
RWDBCursor
cursor(const RWDBCompoundSelector& select, 
       const RWDBConnection& connection, 
       RWDBCursor::CursorType cursorType =
                              RWDBCursor::Sequential, 
       RWDBCursor::CursorAccess cursorAccess = 
                              RWDBCursor::Read) const;
RWDBDateVector
dateVector(size_t n);
RWCString
dbName() const;
RWDBTable
dbStoredProcedures() const;
RWDBTable
dbStoredProcedures(const RWCString& name) const;
RWDBTable
dbStoredProcedures(const RWCString& name, 
const RWCString& owner) const;
RWDBTable
dbStoredProcedures(const RWDBConnection& conn) const;
RWDBTable
dbStoredProcedures(const RWDBConnection& conn, 
const RWCString& name) const;
RWDBTable
dbStoredProcedures(const RWDBConnection& conn, 
const RWCString& name,
const RWCString& owner) const;
RWDBTable
dbTables(int type = rwdbAllTypes) const;
RWDBTable
dbTables(const RWCString& name, 
         int type = rwdbAllTypes) const;
RWDBTable
dbTables(const RWCString& name, const RWCString& owner, 
         int type = rwdbAllTypes) const;
RWDBTable
dbTables(const RWDBConnection& conn, 
         int type = rwdbAllTypes) const;
RWDBTable
dbTables(const RWDBConnection& conn, const RWCString& name,
         int type = rwdbAllTypes) const;
RWDBTable
dbTables(const RWDBConnection& conn, 
         const RWCString& name, const RWCString& owner,
         int type = rwdbAllTypes) const;
size_t
defaultConnections() const;
size_t
defaultConnections(size_t reqdConnections);
RWDBDeleter
deleter(const RWDBTable& table) const;
RWDBDeleter
deleter(const RWDBTable& table, 
        const RWDBCriterion& criterion) const;
RWDBStatus
dropView(const RWCString& viewName);
RWDBStatus
dropView(const RWCString& viewName,
         const RWDBConnection& connection);
RWDBStatus::ErrorHandler
errorHandler() const;
RWDBEnvironmentHandle*
environmentHandle() const;
RWDBInserter
inserter(const RWDBTable& table, size_t cache=1) const;

NOTE:When using access libraries that support an inserter cache, increasing the cache value can greatly improve performance. However, setting the cache parameter greater than one may adversely affect transactions. Check your access library documentation for limitations and warnings.
RWDBInserter
inserter(const RWDBTable& table, 
         const RWDBSchema& schema,
         size_t cache=1) const;

NOTE:When using access libraries that support an inserter cache, increasing the cache value can greatly improve performance. However, setting the cache parameter greater than one may adversely affect transactions. Check your access library documentation for limitations and warnings.
RWDBInserter
inserter(const RWDBTable& table,
         const RWDBSelector& selector)const;
RWDBInserter
inserter(const RWDBTable& table,
         const RWDBSelector& selector, 
         const RWDBSchema& columnList)const;
RWDBInserter
inserter(const RWDBTable& table, 
         const RWDBCompoundSelector& selector) const;
RWDBInserter
inserter(const RWDBTable& table, 
         const RWDBCompoundSelector & select, 
         const RWDBSchema& columnList)const;
RWBoolean
isReady() const;
RWBoolean
isValid() const;
RWDBMemTable
memTable(const RWCString& name, size_t capacity = 0) const;
RWDBMemTable
memTable(const RWCString& name,
         const RWDBConnection& connection, 
         size_t capacity=0);
RWCString
passWord() const;
const RWDBPhraseBook&
phraseBook() const;
void
release() const;
RWDBSelector
selector() const;
RWDBSelector
selector(const RWDBCriterion& criterion) const;
RWCString
serverName() const;
RWCString
serverType() const;
void
setErrorHandler(RWDBStatus::ErrorHandler handler);
RWDBStatus
status() const;
RWDBStoredProc
storedProc(const RWCString& name) const;
RWDBStoredProc
storedProc(const RWCString& name, 
           const RWDBConnection& connection) const;
RWDBStoredProc
storedProc(const RWCString& name, 
           const RWDBSchema& schema) const;
RWDBStoredProc
storedProc(const RWCString& name, 
           const RWDBConnection& connection
           const RWDBSchema& schema) const;
RWDBTable
table(const RWCString& name) const;
size_t
totalConnections() const;
RWDBTracer&
tracer();
RWDBUpdater
updater(const RWDBTable& table) const;
RWDBUpdater
updater(const RWDBTable& table, 
        const RWDBCriterion & criterion) const;
RWCString
userName() const;
RWCString
version() const;


Previous fileTop of DocumentContentsIndexNext file

©Copyright 1999, Rogue Wave Software, Inc.
Contact Rogue Wave about documentation or support issues.