C++ SDK Documentation
12.0.3
|
Provides read access to a set of named parameters. This class provides type-specific methods to retrieve values. More...
Public Member Functions | |
ParamReader (size_t nparams) | |
void | addParameter (std::string paramName, const char *arg, const VerticaType &dt) |
bool | containsParameter (std::string paramName) const |
Function to see if the ParamReader has a value for the parameter. | |
void | copy (const VerticaBlock &other) |
void | copy (const ParamReader &other) |
Copy the other ParamReader. Discard any existing parameters TODO: create an alternate version that only copies if this ParamReader is empty, is a no-op if they are non-empty and the same, and error if they are non-empty and different. | |
const vbool * | getBoolPtr (std::string paramName) const |
Get a pointer to a BOOLEAN value from the input row. More... | |
const vbool & | getBoolRef (std::string paramName) 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 (std::string paramName) const |
Get a pointer to a DATE value from the input row. More... | |
const DateADT & | getDateRef (std::string paramName) const |
Get a reference to a DATE value from the input row. More... | |
const vfloat * | getFloatPtr (std::string paramName) const |
Get a pointer to a FLOAT value from the input row. More... | |
const vfloat & | getFloatRef (std::string paramName) const |
Get a reference to a FLOAT value from the input row. More... | |
size_t | getIndex (std::string paramName) const |
const Interval * | getIntervalPtr (std::string paramName) const |
Get a pointer to an INTERVAL value from the input row. More... | |
const Interval & | getIntervalRef (std::string paramName) const |
Get a reference to an INTERVAL value from the input row. More... | |
const IntervalYM * | getIntervalYMPtr (std::string paramName) const |
Get a pointer to a INTERVAL YEAR TO MONTH value from the input row. More... | |
const IntervalYM & | getIntervalYMRef (std::string paramName) const |
Get a reference to an INTERVAL YEAR TO MONTH value from the input row. More... | |
const vint * | getIntPtr (std::string paramName) const |
Get a pointer to an INTEGER value from the input row. More... | |
const vint & | getIntRef (std::string paramName) const |
Get a reference to an INTEGER value from the input row. More... | |
size_t | getNumCols () const |
const VNumeric * | getNumericPtr (std::string paramName) const |
Get a pointer to a VNumeric value from the input row. More... | |
const VNumeric & | getNumericRef (std::string paramName) const |
Get a reference to a VNumeric value from the input row. More... | |
int | getNumRows () const |
std::vector< std::string > | getParamNames () const |
Return the names of all parameters stored in this ParamReader. | |
const VString * | getStringPtr (std::string paramName) const |
Get a pointer to a VString value from the input row. More... | |
const VString & | getStringRef (std::string paramName) const |
Get a reference to an VString value from the input row. More... | |
const TimeADT * | getTimePtr (std::string paramName) const |
Get a pointer to a TIME value from the input row. More... | |
const TimeADT & | getTimeRef (std::string paramName) const |
Get a reference to a TIME value from the input row. More... | |
const Timestamp * | getTimestampPtr (std::string paramName) const |
Get a pointer to a TIMESTAMP value from the input row. More... | |
const Timestamp & | getTimestampRef (std::string paramName) const |
Get a reference to a TIMESTAMP value from the input row. More... | |
const TimestampTz * | getTimestampTzPtr (std::string paramName) const |
Get a pointer to a TIMESTAMP WITH TIMEZONE value from the input row. More... | |
const TimestampTz & | getTimestampTzRef (std::string paramName) const |
Get a reference to a TIMESTAMP WITH TIMEZONE value from the input row. More... | |
const TimeTzADT * | getTimeTzPtr (std::string paramName) const |
Get a pointer to a TIME WITH TIMEZONE value from the input row. More... | |
const TimeTzADT & | getTimeTzRef (std::string paramName) const |
Get a reference to a TIME WITH TIMEZONE value from the input row. More... | |
VerticaType | getType (std::string paramName) const |
Return the type of the given parameter. | |
const SizedColumnTypes & | getTypeMetaData () const |
SizedColumnTypes & | getTypeMetaData () |
VUuid * | getUuidPtr (std::string paramName) const |
Get a pointer to a VUuid value from the input row. More... | |
const VUuid & | getUuidRef (std::string paramName) const |
void * | getVoidPtr (size_t idx=0) |
const void * | getVoidPtr (size_t idx=0) const |
bool | isEmpty () const |
Returns true if there are no parameters. | |
bool | remaining () const |
void | setDataArea (size_t idx, void *dataarea) |
Public Attributes | |
std::map< std::string, size_t > | paramNameToIndex |
Protected Member Functions | |
void | addCol (char *arg, int colstride, const Field &field) |
void | addCol (const char *arg, int colstride, const Field &field) |
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 | VerticaBlockSerializer |
Provides read access to a set of named parameters. This class provides type-specific methods to retrieve values.
|
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 addParameter().
|
inline |
Add a parameter to the block and stores it name and corresponding index in the paramNameToIndex map
|
inlineprotectedinherited |
|
inline |
Get a pointer to a BOOLEAN value from the input row.
paramName | The name of the parameter to retrieve |
Referenced by getBoolRef().
|
inline |
Get a reference to a BOOLEAN value from the input row.
paramName | The name of the parameter to retrieve |
|
inlineinherited |
|
inlineinherited |
Example: const vint a = arg_reader->getColRef<vint>(0);
|
inline |
Get a pointer to a DATE value from the input row.
paramName | The name of the parameter to retrieve |
Referenced by getDateRef().
|
inline |
Get a reference to a DATE value from the input row.
paramName | The name of the parameter to retrieve |
|
inline |
Get a pointer to a FLOAT value from the input row.
paramName | The name of the parameter to retrieve |
Referenced by getFloatRef().
|
inline |
Get a reference to a FLOAT value from the input row.
paramName | The name of the parameter to retrieve |
|
inline |
Get a pointer to an INTERVAL value from the input row.
paramName | The name of the parameter to retrieve |
Referenced by getIntervalRef().
|
inline |
Get a reference to an INTERVAL value from the input row.
paramName | The name of the parameter to retrieve |
|
inline |
Get a pointer to a INTERVAL YEAR TO MONTH value from the input row.
paramName | The name of the parameter to retrieve |
Referenced by getIntervalYMRef().
|
inline |
Get a reference to an INTERVAL YEAR TO MONTH value from the input row.
paramName | The name of the parameter to retrieve |
|
inline |
Get a pointer to an INTEGER value from the input row.
paramName | The name of the parameter to retrieve |
Example:
Referenced by getIntRef().
|
inline |
Get a reference to an INTEGER value from the input row.
paramName | The name of the parameter to retrieve |
Example:
|
inlineinherited |
Referenced by Vertica::BlockWriter::copyFromInput(), Vertica::BlockReader::isNull(), and Vertica::BlockWriter::setNull().
|
inline |
Get a pointer to a VNumeric value from the input row.
paramName | The name of the parameter to retrieve |
Referenced by getNumericRef().
|
inline |
|
inlineinherited |
|
inline |
Get a pointer to a VString value from the input row.
paramName | The name of the parameter to retrieve |
Referenced by getStringRef().
|
inline |
|
inline |
Get a pointer to a TIME value from the input row.
paramName | The name of the parameter to retrieve |
Referenced by getTimeRef().
|
inline |
Get a reference to a TIME value from the input row.
paramName | The name of the parameter to retrieve |
|
inline |
Get a pointer to a TIMESTAMP value from the input row.
paramName | The name of the parameter to retrieve |
Referenced by getTimestampRef().
|
inline |
Get a reference to a TIMESTAMP value from the input row.
paramName | The name of the parameter to retrieve |
|
inline |
Get a pointer to a TIMESTAMP WITH TIMEZONE value from the input row.
paramName | The name of the parameter to retrieve |
Referenced by getTimestampTzRef().
|
inline |
Get a reference to a TIMESTAMP WITH TIMEZONE value from the input row.
paramName | The name of the parameter to retrieve |
|
inline |
Get a pointer to a TIME WITH TIMEZONE value from the input row.
paramName | The name of the parameter to retrieve |
Referenced by getTimeTzRef().
|
inline |
Get a reference to a TIME WITH TIMEZONE value from the input row.
paramName | The name of the parameter to retrieve |
|
inlineinherited |
Referenced by getType(), Vertica::BlockReader::isNull(), and Vertica::BlockWriter::setNull().
|
inlineinherited |
|
inline |
|
inlineinherited |
std::map<std::string, size_t> Vertica::ParamReader::paramNameToIndex |
Bookkeepinp to make a parameter and its position in the block
Referenced by addParameter(), containsParameter(), copy(), Vertica::ParamWriter::getLongStringRef(), Vertica::ParamWriter::getNumericRef(), getParamNames(), Vertica::ParamWriter::getStringRef(), Vertica::ParamWriter::getUuidRef(), and isEmpty().