SourcePro® API Reference Guide

 
Loading...
Searching...
No Matches
RWDBVector< T > Class Template Reference

Deprecated. Used as a buffer when transferring data between the application and the database. More...

#include <rw/db/dbvector.h>

Inheritance diagram for RWDBVector< T >:
RWDBTBuffer< T > RWDBAbstractBuffer

Additional Inherited Members

- Public Member Functions inherited from RWDBTBuffer< T >
 RWDBTBuffer (RWSize_T entries=1, RWSize_T width=0)
 
 RWDBTBuffer (T *data, RWDBNullIndicator *indicator, RWSize_T entries=1, RWSize_T width=0)
 
 RWDBTBuffer (T *data, RWSize_T entries=1, RWSize_T width=0)
 
virtual ~RWDBTBuffer ()
 
size_t entries () const
 
bool isNull (size_t index) const
 
T & operator[] (size_t index)
 
const T & operator[] (size_t index) const
 
RWDBColumn::ParamType paramType () const
 
void paramType (RWDBColumn::ParamType newType)
 
void setData (const T &newData)
 
void setData (size_t index, const T &newData)
 
void setNull ()
 
void setNull (size_t index)
 
void unsetNull ()
 
void unsetNull (size_t index)
 

Detailed Description

template<class T>
class RWDBVector< T >
Deprecated
As of SourcePro 6, use RWDBTBuffer instead.

Class RWDBVector is derived from RWDBTBuffer and is used to transfer data between the application and the database via classes RWDBBulkReader and RWDBBulkInserter.

Synopsis
#include <rw/db/dbvector.h>
RWDBVector<int> intVector(n);
Deprecated. Used as a buffer when transferring data between the application and the database.
Definition dbvector.h:66
Example

The following example uses an RWDBVector to insert an array of integers into a table. The 5th element in the array is inserted as NULL.

RWDBVector<int> intVector(n);
// Sets the 5th element to be null.
intVector.setNull(4); // 0 based array.
// Populates the arrays using a user-defined function.
setValues(intVector);
// Defines the inserter.
RWDBBulkInserter ins = tab.bulkInserter(connection);
// Shifts the arrays into the inserter.
ins << intVector;
// Inserts up to n values at a time.
RWDBStatus stat = ins.execute();
Used to insert an RWDBTBuffer array into a database table. (To insert scalar values,...
Definition bkins.h:73
RWDBResult execute()
Encapsulates the error state of an object or operation.
Definition status.h:80

Copyright © 2024 Rogue Wave Software, Inc., a Perforce company. All Rights Reserved.