Rogue Wave banner
Previous fileTop of DocumentContentsIndexNext file

RWDBBulkInserter



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

Synopsis

#include <rw/db/bkins.h>
#include <rw/db/table.h>

RWDBBulkInserter ins = table.bulkInserter(connection);

Description

Like RWDBInserter, RWDBBulkInserter is a class designed to insert data into database tables. The main difference between RWDBBulkInserter and RWDBInserter is that arrays of values are shifted into RWDBBulkInserter for each column in the table, while scalar values are shifted into RWDBInserter. These arrays are passed by reference and need to stay in scope for the duration of the inserter. The classes RWDBVector<T>, RWDBDateVector, RWDBStringVector, and RWDBBinaryVector are used for inserting simple numeric types, dates, strings, and binary data respectively.

RWDBBulkInserter is designed around the Interface/Implementation paradigm. An RWDBBulkInserter instance is an interface to a reference-counted implementation; copy constructors and assignment operators produce additional references to a shared implementation. An RWDBBulkInserter implementation is a base class from which a family of database-specific implementations is derived.

Example

The following example uses an RWDBBulkInserter to insert an array of strings and integers into a table.

Public Constructors

RWDBBulkInserter();
RWDBBulkInserter(const RWDBBulkInserter& ins);

Public Member Operators

RWDBBulkInserter&
operator=(const RWDBBulkInserter& ins);
RWDBBulkInserter&
operator[](size_t index);
RWDBBulkInserter&
operator[](const RWCString& columnName);
RWDBBulkInserter&
operator[](const RWDBColumn& column);
RWDBBulkInserter&
operator<<(RWDBAbstractBuffer& val);
RWDBBulkInserter&
operator<<(RWDBDateVector& dateVector);

Public Member Functions

RWDBResult
execute();
RWDBResult
execute(size_t iters);
RWBoolean
isValid() const;
RWDBStatus
status() const;


Previous fileTop of DocumentContentsIndexNext file

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