Rogue Wave banner
Previous fileTop of DocumentContentsIndex pageNext file
DB Interface Module User's Guide
Rogue Wave web site:  Home Page  |  Main Documentation Page

3.1 Kinds of Classes

The DB Interface Module provides the classes you need for data manipulation, error handling, expression formation, database connection, and database portability. As discussed in Chapter 2, "Design Overview," SourcePro DB uses a two-module architecture. The DB Interface Module encapsulates database operations and data manipulation, while each database-dependent DB Access Module connects to its related database to normalize its data types.

The DB Interface Module provides both a standard interface, which shields you from SQL, and an alternative interface called Open SQL, which allows you to directly execute SQL statements. For more information on the Open SQL interface, see Section 3.1.6, "Open SQL Classes,", and Chapter 15, "Using the Open SQL Classes." This chapter summarizes the different kinds of classes in the DB Interface Module.

3.1.1 Data Type Classes

SourcePro DB insulates your applications from the variations in data types defined in different databases. Chapter 7, "The Data Model," explains in detail how this is done. Applications written with the DB Interface Module work with the primitive C++ data types, plus these additional types:

The classes RWCString, RWDate, RWTime, RWDateTime, RWDecimalPortable, RWWString, and RWBasicUString are from the Essential Tools Module of SourcePro Core; all other classes are in the DB Interface Module. Please see their respective sections in the Essential Tools Module User's Guide and in this guide. For class descriptions, see the SourcePro C++ API Reference Guide.

3.1.2 Database Classes

The database classes are the heart of the DB Interface Module. This powerful set of classes is designed to encapsulate common database objects.

Most database classes are explained in Chapter 4, "The Database Classes." Detailed information for each class is in the SourcePro C++ API Reference Guide.

3.1.3 Data Manipulation Classes

Also essential to the DB Interface Module are the data manipulation classes, which encapsulate common database operations.

3.1.4 Expression Classes

Class RWDBExpr is a base class for a family of classes in the DB Interface Module that allow you to program SQL expressions in C++. Instances of these expressions are usually created anonymously. For example, the following fragment instantiates several RWDBExpr objects:

3.1.5 Bulk Classes

The alternative classes RWDBBulkReader and RWDBBulkInserter are designed to help improve application performance. RWDBBulkReader and RWDBBulkInserter implement reading (fetching) and writing (inserting) directly to and from arrays supplied by an application.

The template class RWDBTBuffer<T> works with the bulk read and write classes and can handle most of the supported data types. For possible data type limitations, see the relevant Access Module User's Guide.

Examples using RWDBBulkReader and RWDBBulkInserter are described in Chapter 8, "Bulk Reading and Writing." Detailed explanations of each class are in the SourcePro C++ API Reference Guide.


Classes RWDBStringVector, RWDBStringVectorElement, RDBBinaryVector, RWDBBinaryVectorElement, RWDBDecimalVector, RWDBDecimalVectorElement, RWDBDateVector, RWDBVendorDate and RWDBVector<T> are deprecated. Please use the template class RWDBTBuffer<T> instead.

3.1.6 Open SQL Classes

The Open SQL interface contains several classes that give you direct control over the execution of SQL statements and the data that is bound to them.

The Open SQL interface is described in detail in Chapter 14, "Defining Open SQL," and Chapter 15, "Using the Open SQL Classes."

3.1.7 Utility and Diagnostics Classes

The utility and diagnostics classes have specific jobs to perform.

The SourcePro C++ API Reference Guide and the DB Access Module guides contain more information on all the classes described here.

3.1.8 Callback Classes

Classes RWDBDatabaseCallback and RWDBDatabaseCallbackImp allow you to execute your code at particular callback locations while allocating and deallocating database-specific environment handles. With use of database callbacks, you can customize the database environment handles to your needs.

Classes RWDBConnCallback and RWDBConnCallbackImp allow users to execute their code at particular callback locations while allocating, deallocating, connecting and disconnecting database specific connection handles. With use of connection callbacks, you can customize the database connection handles to your needs.

Most callback classes are explained in Chapter 10, "Callbacks." Detailed information for each class is in the SourcePro C++ API Reference Guide.



Previous fileTop of DocumentContentsNo linkNext file

Copyright © Rogue Wave Software, Inc. All Rights Reserved.

The Rogue Wave name and logo, and SourcePro, are registered trademarks of Rogue Wave Software. All other trademarks are the property of their respective owners.
Provide feedback to Rogue Wave about its documentation.