SourcePro® API Reference Guide

 
Loading...
Searching...
No Matches
RWDBStringVector Class Reference

Deprecated. Transfers character arrays of width width between the application and the database. More...

#include <rw/db/dbvector.h>

Inheritance diagram for RWDBStringVector:
RWDBTBuffer< T > RWDBAbstractBuffer

Public Member Functions

 RWDBStringVector (size_t width, size_t length)
 
size_t length () const
 
RWDBStringVectorElement operator[] (size_t i)
 
- 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

Deprecated
As of SourcePro 6, use RWDBTBuffer and RWCString instead.

RWDBStringVector instances are used to transfer character arrays of width width between the application and the database via classes RWDBBulkReader and RWDBBulkInserter. Note that it is the user's responsibility to ensure that the elements of the vectors are null terminated, and so the width of each element should be set to accommodate this additional character.

Synopsis
#include <rw/db/dbvector.h>
RWDBStringVector stringVector(width, length);
Deprecated. Transfers character arrays of width width between the application and the database.
Definition dbvector.h:434
size_t length() const
Definition dbvector.h:454
Example

In the following example, the ith element of an RWDBStringVector is set to the string "Hello";

RWDBStringVector stringVector(width, length);
stringVector[i] = RWCString("Hello");
Offers powerful and convenient facilities for manipulating strings.
Definition stdcstring.h:826

Constructor & Destructor Documentation

◆ RWDBStringVector()

RWDBStringVector::RWDBStringVector ( size_t width,
size_t length )
inline

Constructs an RWDBStringVector of length elements, each of whose elements is width wide.

Member Function Documentation

◆ length()

size_t RWDBStringVector::length ( ) const
inline

Returns the number of elements in self.

◆ operator[]()

RWDBStringVectorElement RWDBStringVector::operator[] ( size_t i)
inline

Returns an RWDBStringVectorElement instance holding a reference to the i th element of self.

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