Rogue Wave banner
Previous fileTop of DocumentContentsIndexNext file

RWDBTable



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

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, that is, 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 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,
          RWBoolean 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, 
          RWBoolean 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,
            RWBoolean unique = TRUE, 
            RWBoolean clustered = TRUE);
RWDBStatus
createIndex(const RWCString& name,
            const RWDBSchema& columns,
            const RWDBConnection& connection,
            RWBoolean unique = TRUE,
            RWBoolean 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;
RWBoolean
exists(RWBoolean forceLookup = FALSE);
RWBoolean
exists(const RWDBConnection& connection, 
       RWBoolean forceLookup = FALSE);
virtual RWBoolean 
fetchSchema();
virtual RWBoolean
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(size_t cache=1) const;

NOTE:A cache of 0 is not allowed. If 0 is passed in for this parameter, the parameter is set to 1. Setting the cache parameter greater than one can adversely affect transactions. Check your access library documentation for limitations and warnings.
RWDBInserter
inserter(const RWDBSchema& columnList) const;

NOTE:A cache of 0 is not allowed. If 0 is passed in for this parameter, the parameter is set to 1. Setting the cache parameter greater than one can adversely affect transactions. Check your access library documentation for limitations and warnings.
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;
RWBoolean
isReady() const;
RWBoolean
isValid() const;
RWBoolean
isView() const;
RWBoolean
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(size_t cache=0) const;

NOTE:When cache is 0, an acceptable default is selected by your access library. Please check your access library documentation for limitations on the cache size.
RWDBReader
reader(const RWDBConnection& connection, 
       size_t cache=0) const;

NOTE:When cache is 0, an acceptable default is selected by your access library. Please check your access library documentation for limitations on the cache size.
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:Datebase 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 DocumentContentsIndexNext file

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