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

RWDBBulkInserter

Module:  DB Interface Module   Group:  Bulk Classes


Does not inherit

Local Index

Members

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 class RWDBTBuffer<T> is used for inserting all types of data, including numeric types, dates, strings and binary data.

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);

NOTE -- Please use RWDBTBuffer<T> for binding data using above method.
RWDBBulkInserter&
operator<<(RWDBDateVector& dateVector);

Public Member Functions

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


Previous fileTop of DocumentContentsIndex pageNext file

© Copyright Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave and SourcePro are registered trademarks of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.
Contact Rogue Wave about documentation or support issues.