The standard DBTools.h++ interface protects you from many of the details associated with accessing relational databases in C++. Datatype conversion, SQL statement generation, and memory allocation are all performed automatically, and this benefit serves most customers well. If you are one of a growing number of developers who write advanced, highest-performance systems, however, you may be willing to trade ease of coding for more control over the details. The DBTools.h++ Open SQL API, called simply Open SQL, was designed for you.
Open SQL is an alternative DBTools.h++ API that allows you to control SQL statements directly. It encapsulates the semantics for statement execution, parameter binding, and results fetching provided by each database vendor into a vendor-independent interface. The operations you perform with Open SQL translate directly to the primitive operations provided by each database, yet the API is consistent across all vendors.
Specifically, Open SQL is a database-portable set of three classes:
RWDBOSql encapsulates an SQL statement and its input and output bindings.
RWDBTBuffer<T>, a template class, encapsulates buffers of data that can be bound to the SQL statement.
RWDBMultiRow adds row semantics to collections of RWDBTBuffers.
The Open SQL classes are described in Section 12.3; using these classes is explained in Chapter 13. Before pursuing the details, however, we suggest that you skim the following section to determine whether Open SQL fits your coding requirements.
©Copyright 2000, Rogue Wave Software, Inc.
Contact Rogue Wave about documentation or support issues.