C++ SDK Documentation
24.1.0
|
Iterator interface for reading rows in a Vertica block. More...
Public Member Functions | |
BlockReader (size_t narg, int rowcount, const int *indices) | |
void | copy (const VerticaBlock &other) |
Array::ArrayReader | getArrayRef (size_t idx) const |
Get a reference to an Array value from the input row. More... | |
const vbool * | getBoolPtr (size_t idx) const |
Get a pointer to a BOOLEAN value from the input row. More... | |
const vbool & | getBoolRef (size_t idx) const |
Get a reference to a BOOLEAN value from the input row. More... | |
template<class T > | |
const T * | getColPtr (size_t idx) const |
template<> | |
const VString * | getColPtr (size_t idx) const |
template<> | |
const VNumeric * | getColPtr (size_t idx) const |
template<> | |
const VUuid * | getColPtr (size_t idx) const |
template<> | |
const BlockReader * | getColPtr (size_t idx) const |
template<class T > | |
T * | getColPtrForWrite (size_t idx) |
template<> | |
VString * | getColPtrForWrite (size_t idx) |
template<> | |
VNumeric * | getColPtrForWrite (size_t idx) |
template<> | |
VUuid * | getColPtrForWrite (size_t idx) |
template<> | |
BlockWriter * | getColPtrForWrite (size_t idx) |
template<class T > | |
const T & | getColRef (size_t idx) const |
template<class T > | |
T & | getColRefForWrite (size_t idx) |
int | getColStride (size_t idx) const |
const EE::DataArea * | getDataArea (size_t idx) const |
const DateADT * | getDatePtr (size_t idx) const |
Get a pointer to a DATE value from the input row. More... | |
const DateADT & | getDateRef (size_t idx) const |
Get a reference to a DATE value from the input row. More... | |
const vfloat * | getFloatPtr (size_t idx) const |
Get a pointer to a FLOAT value from the input row. More... | |
const vfloat & | getFloatRef (size_t idx) const |
Get a reference to a FLOAT value from the input row. More... | |
const Interval * | getIntervalPtr (size_t idx) const |
Get a pointer to an INTERVAL value from the input row. More... | |
const Interval & | getIntervalRef (size_t idx) const |
Get a reference to an INTERVAL value from the input row. More... | |
const IntervalYM * | getIntervalYMPtr (size_t idx) const |
Get a pointer to a INTERVAL YEAR TO MONTH value from the input row. More... | |
const IntervalYM & | getIntervalYMRef (size_t idx) const |
Get a reference to an INTERVAL YEAR TO MONTH value from the input row. More... | |
const vint * | getIntPtr (size_t idx) const |
Get a pointer to an INTEGER value from the input row. More... | |
const vint & | getIntRef (size_t idx) const |
Get a reference to an INTEGER value from the input row. More... | |
size_t | getNumCols () const |
const VNumeric * | getNumericPtr (size_t idx) const |
Get a pointer to a VNumeric value from the input row. More... | |
const VNumeric & | getNumericRef (size_t idx) const |
Get a reference to a VNumeric value from the input row. More... | |
int | getNumRows () const |
int | getPosition () const |
const BlockReader * | getRowPtr (size_t idx) const |
Get a reference to a Row value from the input row. More... | |
const BlockReader & | getRowRef (size_t idx) const |
Get a reference to a Row value from the input row. More... | |
const VString * | getStringPtr (size_t idx) const |
Get a pointer to a VString value from the input row. More... | |
const VString & | getStringRef (size_t idx) const |
Get a reference to an VString value from the input row. More... | |
const TimeADT * | getTimePtr (size_t idx) const |
Get a pointer to a TIME value from the input row. More... | |
const TimeADT & | getTimeRef (size_t idx) const |
Get a reference to a TIME value from the input row. More... | |
const Timestamp * | getTimestampPtr (size_t idx) const |
Get a pointer to a TIMESTAMP value from the input row. More... | |
const Timestamp & | getTimestampRef (size_t idx) const |
Get a reference to a TIMESTAMP value from the input row. More... | |
const TimestampTz * | getTimestampTzPtr (size_t idx) const |
Get a pointer to a TIMESTAMP WITH TIMEZONE value from the input row. More... | |
const TimestampTz & | getTimestampTzRef (size_t idx) const |
Get a reference to a TIMESTAMP WITH TIMEZONE value from the input row. More... | |
const TimeTzADT * | getTimeTzPtr (size_t idx) const |
Get a pointer to a TIME WITH TIMEZONE value from the input row. More... | |
const TimeTzADT & | getTimeTzRef (size_t idx) const |
Get a reference to a TIME WITH TIMEZONE value from the input row. More... | |
const SizedColumnTypes & | getTypeMetaData () const |
SizedColumnTypes & | getTypeMetaData () |
const VUuid * | getUuidPtr (size_t idx) const |
Get a pointer to a VUuid value from the input row. More... | |
const VUuid & | getUuidRef (size_t idx) const |
Get a reference to a VUuid value from the input row. More... | |
void * | getVoidPtr (size_t idx=0) |
const void * | getVoidPtr (size_t idx=0) const |
bool | hasData () const |
bool | isNull (int col) const |
Check if the idx'th argument is null. More... | |
bool | next () |
bool | remaining () const |
virtual void | resetForDataAreaFlush () |
void | setDataArea (size_t idx, void *dataarea) |
Protected Member Functions | |
void | addCol (char *arg, int colstride, const Field &field) |
void | addCol (const char *arg, int colstride, const Field &field) |
bool | advanceToNextRow (bool recurIntoArrays) |
bool | checkStringUserBlockInfo (size_t idx) const |
bool | checkTimeUserBlockInfo (size_t idx) const |
EE::DataArea ** | getArrayIntermediateDataArea (size_t c) |
void | reset () |
void | resetIndex () |
void | setRowCount (int rowCount) |
void | validateStringColumn (size_t idx, const VString &s, size_t colLength) const |
Protected Attributes | |
std::vector< char * > | cols |
std::vector< int > | colstrides |
int | count |
std::vector< NestedBlockPtr > | ctWrappers |
int | index |
const int * | indices |
size_t | ncols |
int | nrows |
std::vector< BaseDataOID > | processBlockUserInfoVector |
std::vector< VString > | svWrappers |
SizedColumnTypes | typeMetaData |
std::vector< VUuid > | uuWrappers |
std::vector< VNumeric > | vnWrappers |
Friends | |
class | Array::ArrayReader |
class | EE::VEval |
class | VerticaBlockSerializer |
class | VerticaRInterface |
Iterator interface for reading rows in a Vertica block.
This class provides the input to the ScalarFunction.processBlock() function. You extract values from the input row using data type specific functions to extract each column value. You can also determine the number of columns and their data types, if your processBlock function does not have hard-coded input expectations.
|
protectedinherited |
Add the location for reading a particular argument.
arg | The base location to find data. |
colstride | The stride between data instances. |
field | metadata for the added column |
dt | The type of input. |
fieldname | the name of the field |
Referenced by Vertica::ParamReader::addParameter().
|
inlineprotectedinherited |
Array::ArrayReader Vertica::BlockReader::getArrayRef | ( | size_t | idx | ) | const |
Get a reference to an Array value from the input row.
idx | The column number to retrieve from the input row. |
|
inline |
Get a pointer to a BOOLEAN value from the input row.
idx | The column number in the input row to retrieve. |
Referenced by getBoolRef().
|
inline |
Get a reference to a BOOLEAN value from the input row.
idx | The column number to retrieve from the input row. |
Referenced by isNull().
|
inlineinherited |
|
inlineinherited |
Example: const vint a = arg_reader->getColRef<vint>(0);
|
inline |
Get a pointer to a DATE value from the input row.
idx | The column number in the input row to retrieve. |
Referenced by getDateRef().
|
inline |
Get a reference to a DATE value from the input row.
idx | The column number to retrieve from the input row. |
Referenced by isNull().
|
inline |
Get a pointer to a FLOAT value from the input row.
idx | The column number in the input row to retrieve. |
Referenced by getFloatRef().
|
inline |
Get a reference to a FLOAT value from the input row.
idx | The column number to retrieve from the input row. |
Referenced by isNull().
|
inline |
Get a pointer to an INTERVAL value from the input row.
idx | The column number in the input row to retrieve. |
Referenced by getIntervalRef().
|
inline |
Get a reference to an INTERVAL value from the input row.
idx | The column number to retrieve from the input row. |
Referenced by isNull().
|
inline |
Get a pointer to a INTERVAL YEAR TO MONTH value from the input row.
idx | The column number in the input row to retrieve. |
Referenced by getIntervalYMRef().
|
inline |
Get a reference to an INTERVAL YEAR TO MONTH value from the input row.
idx | The column number to retrieve from the input row. |
Referenced by isNull().
|
inline |
Get a pointer to an INTEGER value from the input row.
idx | The column number to retrieve from the input row. |
Example:
Referenced by getIntRef().
|
inline |
|
inlineinherited |
Referenced by Vertica::BlockWriter::copyFromInput(), isNull(), and Vertica::BlockWriter::setNull().
|
inline |
Get a pointer to a VNumeric value from the input row.
idx | The column number to retrieve from the input row. |
Referenced by getNumericRef().
|
inline |
|
inlineinherited |
|
inline |
|
inline |
Get a reference to a Row value from the input row.
idx | The column number to retrieve from the input row. |
Referenced by getRowRef().
|
inline |
Get a reference to a Row value from the input row.
idx | The column number to retrieve from the input row. |
|
inline |
Get a pointer to a VString value from the input row.
idx | The column number to retrieve from the input row. |
Referenced by getStringRef().
|
inline |
|
inline |
Get a pointer to a TIME value from the input row.
idx | The column number in the input row to retrieve. |
Referenced by getTimeRef().
|
inline |
Get a reference to a TIME value from the input row.
idx | The column number to retrieve from the input row. |
Referenced by isNull().
|
inline |
Get a pointer to a TIMESTAMP value from the input row.
idx | The column number in the input row to retrieve. |
Referenced by getTimestampRef().
|
inline |
Get a reference to a TIMESTAMP value from the input row.
idx | The column number to retrieve from the input row. |
Referenced by isNull().
|
inline |
Get a pointer to a TIMESTAMP WITH TIMEZONE value from the input row.
idx | The column number in the input row to retrieve. |
Referenced by getTimestampTzRef().
|
inline |
Get a reference to a TIMESTAMP WITH TIMEZONE value from the input row.
idx | The column number to retrieve from the input row. |
Referenced by isNull().
|
inline |
Get a pointer to a TIME WITH TIMEZONE value from the input row.
idx | The column number in the input row to retrieve. |
Referenced by getTimeTzRef().
|
inline |
Get a reference to a TIME WITH TIMEZONE value from the input row.
idx | The column number to retrieve from the input row. |
Referenced by isNull().
|
inlineinherited |
Referenced by Vertica::ParamReader::getType(), isNull(), and Vertica::BlockWriter::setNull().
|
inlineinherited |
|
inline |
Get a pointer to a VUuid value from the input row.
idx | The column number to retrieve from the input row. |
Referenced by getUuidRef().
|
inline |
|
inline |
Referenced by Vertica::copyBlockColumn().
|
inline |
Check if the idx'th argument is null.
col | The column number in the row to check for null |
|
inline |
Advance to the next record.
Referenced by Vertica::copyBlockColumn().
|
inlineinherited |
|
inlinevirtualinherited |
Virtual method to be called when the Data Area fills up in a load. Should be called from the StreamWriter
class.
Reimplemented in Vertica::StreamWriter.