Rogue Wave banner
Previous fileTop of DocumentContentsIndex pageNo next file
DB XA Module Reference Guide
Rogue Wave web site:  Home Page  |  Main Documentation Page

RWDBTable

Module:  DB Interface Module   Group:  Database Classes


Does not inherit

Local Index

Members

Synopsis

#include <rw/db/table.h>

RWDBTable myTable = myDbase.table("tableName");
RWDBTable myMemTable = myDbase.memTable("tableName");
RWDBResult myResult = mySelecter.execute();
 //or deleter.execute() or updater.execute() or inserter.execute() or
 //storedProc.execute()
RWDBTable myResultTable = myResult.table();

Description

RWDBTable is a base class from which a family of classes derive. RWDBTable represents a table of information whose actual location is transparent. The data may reside in a database table or in program memory, or may be an SQL table expression, a collection of rows returned from a database query. The three kinds of tables to which RWDBTable provides an interface are:

RWDBTable is designed around the Interface / Implementation paradigm. An RWDBTable instance is an interface to a reference-counted implementation; copy constructors and assignment operators produce additional references to a shared implementation. An RWDBTable's implementation is a base class from which a family of table implementations is derived. Each implementation except that of RWDBMemTable is in turn a base class from which a family of database-specific table implementations derive.

Public Constructors

RWDBTable();
RWDBTable(const RWDBTable& table);

Public Member Operators

RWDBTable& 
operator=(const RWDBTable& table);
RWDBColumn
operator[](const RWCString& name) const;
RWDBColumn
operator[](size_t position) const;

Public Member Functions

void
acquire() const;
RWDBStatus
addColumn(const RWDBColumn& column);
RWDBStatus
addColumn(const RWDBColumn& column,
          const RWDBConnection& connection);
RWDBStatus
addColumn(const RWCString& name, 
          RWDBValue::ValueType type = RWDBValue::NoType,
          long storageLength = 0,
          int nativeType = -1, 
          int precision = -1, 
          int scale = -1,
          bool nullAllowed = true, 
          RWDBColumn::ParamType paramType = 
                                RWDBColumn::notAParameter); 
RWDBStatus
addColumn(const RWCString& name,
          const RWDBConnection& connection, 
          RWDBValue::ValueType type = RWDBValue::NoType, 
          long storageLength = 0,
          int nativeType = -1,
          int precision = -1,
          int scale = -1, 
          bool nullAllowed = true,
          RWDBColumn::ParamType paramType = 
                                RWDBColumn::notAParameter);
RWDBBulkInserter
bulkInserter(const RWDBConnection& conn);
RWDBBulkReader
bulkReader(const RWDBConnection& conn);
RWDBColumn
column(const RWCString& name) const;

NOTE -- Database tables will not return valid column and schema information until fetchSchema() is called.
RWDBColumn
column(const RWCString& name,
       RWCString::caseCompare caseCompare) const;

NOTE -- Database tables will not return valid column and schema information until fetchSchema() is called.
RWDBColumn
column(size_t index) const;

NOTE -- Database tables will not return valid column and schema information until fetchSchema() is called.
RWDBStatus
createIndex(const RWCString& name,
            const RWDBSchema& columns,
            bool unique = true, 
            bool clustered = true);
RWDBStatus
createIndex(const RWCString& name,
            const RWDBSchema& columns,
            const RWDBConnection& connection,
            bool unique = true,
            bool clustered = true);
RWDBCursor
cursor(RWDBCursor::CursorType = RWDBCursor::Sequential, 
       RWDBCursor::CursorAccess = RWDBCursor::Read) const;
RWDBCursor
cursor(const RWDBConnection& connection,
       RWDBCursor::CursorType = RWDBCursor::Sequential, 
       RWDBCursor::CursorAccess = RWDBCursor::Read) const;
RWDBCursor
cursor(const RWDBSchema& updateCols,
       RWDBCursor::CursorType type = RWDBCursor::Sequential,
       RWDBCursor::CursorAccess access = RWDBCursor::Read)
       const;
RWDBCursor
cursor(const RWDBSchema& updateCols, 
       const RWDBConnection& connection,
       RWDBCursor::CursorType type = RWDBCursor::Sequential,
       RWDBCursor::CursorAccess access = RWDBCursor::Read) 
      const;
RWDBDatabase
database() const;
RWDBDeleter
deleter() const;
RWDBDeleter
deleter(const RWDBCriterion& criterion)const;
RWDBStatus
drop();
RWDBStatus
drop(const RWDBConnection& connection);
RWDBStatus
dropColumn(const RWDBColumn& column);
RWDBStatus
dropColumn(const RWDBColumn& column, 
           const RWDBConnection& connection);
RWDBStatus
dropIndex(const RWCString& name);
RWDBStatus
dropIndex(const RWCString& name, 
          const RWDBConnection& connection);
RWDBStatus::ErrorHandler
errorHandler() const;
bool
exists(bool forceLookup = false);
bool
exists(const RWDBConnection& connection, 
       bool forceLookup = false);
virtual bool 
fetchSchema();
virtual bool
fetchSchema(const RWDBConnection& connection);
RWDBStatus
foreignKeys( const RWDBConnection& conn, 
             const RWCString& refName, 
             RWDBForeignKeyList& keyList); 
RWDBStatus
foreignKeys(const RWCString& refName, 
            RWDBForeignKeyList& keyList); 
RWDBStatus
grant(const RWCString& privilege, const RWCString& user);
RWDBStatus
grant(const RWCString& privilege, 
      const RWDBSchema& columnList,
      const RWCString& user);
RWDBStatus
grant(const RWCString& privilege,
      const RWCString& user,
      const RWDBConnection& connection);
RWDBStatus
grant(const RWCString& privilege, 
      const RWDBSchema& columnList,
      const RWCString& user,
      const RWDBConnection& connection);
size_t
index(const RWCString& name) const;
size_t
index(const RWDBColumn& column) const;
size_t
index(const RWCString& name,
      RWCString::caseCompare caseCompare) const;
RWDBInserter
inserter() const;
RWDBInserter
inserter(const RWDBSchema& columnList) const;
RWDBInserter
inserter(const RWDBSelector& select) const;
RWDBInserter
inserter(const RWDBSelector& select, 
         const RWDBSchema& columnList) const; 
RWDBInserter
inserter(const RWDBCompoundSelector& select) const;
RWDBInserter
inserter(const RWDBCompoundSelector& select, 
         const RWDBSchema& columnList) const;
bool
isReady() const;
bool
isValid() const;
bool
isView() const;
bool
isView(const RWDBConnection& connection) const;
RWCString
name() const;
RWDBTable&
name(RWCString& name);
size_t
numberOfColumns() const;
RWDBSchema 
primaryKey(); 
RWDBSchema
primaryKey(const RWDBConnection& conn); 
RWDBReader
reader() const;
RWDBReader
reader(const RWDBConnection& connection) const;
RWDBStatus
referredToBy(RWDBForeignKeyList& keyList);
RWDBStatus
referredToBy(const RWDBConnection& conn, 
            RWDBForeignKeyList& keyList);
void
release() const;
RWDBStatus
revoke(const RWCString& privilege, const RWCString& user);
RWDBStatus
revoke(const RWCString& privilege,
       const RWDBSchema& columnList, 
       const RWCString& user);
RWDBStatus
revoke(const RWCString& privilege,
       const RWCString& user, 
       const RWDBConnection& connection);
RWDBStatus
revoke(const RWCString& privilege, 
       const RWDBSchema& columnList, 
       const RWCString& user,
       const RWDBConnection& connection);
RWDBSchema
schema() const;

NOTE -- Database tables will not return valid column and schema information until fetchSchema() is called.
void 
setErrorHandler(RWDBStatus::errorHandler errorHandler);
RWDBStatus
status() const;
RWCString
tag() const;
RWDBTable&
tag(const RWCString newTag);
RWDBUpdater
updater() const;
RWDBUpdater
updater(const RWDBCriterion& criterion) const;


Previous fileTop of DocumentContentsIndex pageNo next file

© 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.