Rogue Wave banner
Previous fileTop of DocumentContentsIndexNext file

7.1 The Bulk Classes

In Section 4.4.2 and Section 4.7, we saw how data can be read using RWDBReader and inserted using RWDBInserter. DBTools.h++ also provides the alternative classes RWDBBulkReader and RWDBBulkInserter, which implement reading and inserting (writing) directly from arrays supplied by an application. If your underlying database supports array processing and your application reads and writes large amounts of data at a time, these classes can increase your application performance relative to RWDBReader and RWDBInserter.

RWDBReaders and RWDBInserters convert the data passing through them to scalar RWDBValues, which manipulate data by value. In contrast, classes RWDBBulkInserter and RWDBBulkReader bind the vectors of values passed through them by reference directly to the underlying vendor API. You must take care that the arrays shifted into RWDBBulkInserters and RWDBBulkReaders remain in scope for the duration of the RWDBBulkInserter or RWDBBulkReader. DBTools.h++ includes special vector classes for use with RWDBBulkInserters and RWDBBulkReaders.


Previous fileTop of DocumentContentsIndexNext file

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