|  | C++ SDK Documentation
    24.2.0
    | 
Provides write access to a set of named parameters. This class extends ParamReader to add type-specific methods to write values. More...


| Public Member Functions | |
| ParamWriter (VTAllocator *allocator=NULL) | |
| void | addParameter (std::string paramName, const char *arg, const VerticaType &dt) | 
| void | clearParameter (std::string fieldName) | 
| 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... | |
| VString & | getLongStringRef (std::string fieldName) | 
| Allocates a new VString object to use as output. Sets it to be a 32mb LONG type by default.  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... | |
| VNumeric & | getNumericRef (std::string fieldName) | 
| Allocate a new VNumeric object to use as output.  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... | |
| VString & | getStringRef (std::string fieldName) | 
| Allocates a new VString object to use as output.  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 | 
| VUuid & | getUuidRef (std::string fieldName) | 
| Allocate a new VUuid object to use as output.  More... | |
| 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 | 
| virtual void | resetForDataAreaFlush () | 
| void | setAllocator (VTAllocator *allocator) | 
| Sets the allocator to be used to allocate variable size param values such as VString. Given allocator live longer than this ParamWriter.  More... | |
| void | setBool (std::string fieldName, vbool r) | 
| Adds a BOOLEAN value to the output row.  More... | |
| void | setDataArea (size_t idx, void *dataarea) | 
| void | setDate (std::string fieldName, DateADT r) | 
| Adds a BOOLEAN value to the output row.  More... | |
| void | setFloat (std::string fieldName, vfloat r) | 
| Adds a FLOAT value to the output row.  More... | |
| void | setInt (std::string fieldName, vint r) | 
| Adds an INTEGER value to the output row.  More... | |
| void | setInterval (std::string fieldName, Interval r, int32 precision, int32 range) | 
| Adds an INTERVAL value to the output row.  More... | |
| void | setIntervalYM (std::string fieldName, IntervalYM r, int32 range) | 
| Adds an INTERVAL YEAR TO MONTH value to the output row.  More... | |
| void | setTime (std::string fieldName, TimeADT r, int32 precision) | 
| Adds a TIME value to the output row.  More... | |
| void | setTimestamp (std::string fieldName, Timestamp r, int32 precision) | 
| Adds a TIMESTAMP value to the output row.  More... | |
| void | setTimestampTz (std::string fieldName, TimestampTz r, int32 precision) | 
| Adds a TIMESTAMP WITH TIMEZONE value to the output row.  More... | |
| void | setTimeTz (std::string fieldName, TimeTzADT r, int32 precision) | 
| Adds a TIME WITH TIMEZONE value to the output row.  More... | |
| 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 write access to a set of named parameters. This class extends ParamReader to add type-specific methods to write 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 Vertica::ParamReader::addParameter().
| 
 | inlineinherited | 
Add a parameter to the block and stores it name and corresponding index in the paramNameToIndex map
| 
 | inlineprotectedinherited | 
| 
 | inlineinherited | 
Get a pointer to a BOOLEAN value from the input row.
| paramName | The name of the parameter to retrieve | 
Referenced by Vertica::ParamReader::getBoolRef().
| 
 | inlineinherited | 
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);
| 
 | inlineinherited | 
Get a pointer to a DATE value from the input row.
| paramName | The name of the parameter to retrieve | 
Referenced by Vertica::ParamReader::getDateRef().
| 
 | inlineinherited | 
Get a reference to a DATE value from the input row.
| paramName | The name of the parameter to retrieve | 
| 
 | inlineinherited | 
Get a pointer to a FLOAT value from the input row.
| paramName | The name of the parameter to retrieve | 
Referenced by Vertica::ParamReader::getFloatRef().
| 
 | inlineinherited | 
Get a reference to a FLOAT value from the input row.
| paramName | The name of the parameter to retrieve | 
| 
 | inlineinherited | 
Get a pointer to an INTERVAL value from the input row.
| paramName | The name of the parameter to retrieve | 
Referenced by Vertica::ParamReader::getIntervalRef().
| 
 | inlineinherited | 
Get a reference to an INTERVAL value from the input row.
| paramName | The name of the parameter to retrieve | 
| 
 | inlineinherited | 
Get a pointer to a INTERVAL YEAR TO MONTH value from the input row.
| paramName | The name of the parameter to retrieve | 
Referenced by Vertica::ParamReader::getIntervalYMRef().
| 
 | inlineinherited | 
Get a reference to an INTERVAL YEAR TO MONTH value from the input row.
| paramName | The name of the parameter to retrieve | 
| 
 | inlineinherited | 
Get a pointer to an INTEGER value from the input row.
| paramName | The name of the parameter to retrieve | 
Example:
Referenced by Vertica::ParamReader::getIntRef().
| 
 | inlineinherited | 
Get a reference to an INTEGER value from the input row.
| paramName | The name of the parameter to retrieve | 
Example:
| 
 | inline | 
| 
 | inlineinherited | 
Referenced by Vertica::BlockWriter::copyFromInput(), Vertica::BlockReader::isNull(), and Vertica::BlockWriter::setNull().
| 
 | inlineinherited | 
Get a pointer to a VNumeric value from the input row.
| paramName | The name of the parameter to retrieve | 
Referenced by Vertica::ParamReader::getNumericRef().
| 
 | inlineinherited | 
| 
 | inline | 
| 
 | inlineinherited | 
| 
 | inlineinherited | 
Get a pointer to a VString value from the input row.
| paramName | The name of the parameter to retrieve | 
Referenced by Vertica::ParamReader::getStringRef().
| 
 | inlineinherited | 
| 
 | inline | 
| 
 | inlineinherited | 
Get a pointer to a TIME value from the input row.
| paramName | The name of the parameter to retrieve | 
Referenced by Vertica::ParamReader::getTimeRef().
| 
 | inlineinherited | 
Get a reference to a TIME value from the input row.
| paramName | The name of the parameter to retrieve | 
| 
 | inlineinherited | 
Get a pointer to a TIMESTAMP value from the input row.
| paramName | The name of the parameter to retrieve | 
Referenced by Vertica::ParamReader::getTimestampRef().
| 
 | inlineinherited | 
Get a reference to a TIMESTAMP value from the input row.
| paramName | The name of the parameter to retrieve | 
| 
 | inlineinherited | 
Get a pointer to a TIMESTAMP WITH TIMEZONE value from the input row.
| paramName | The name of the parameter to retrieve | 
Referenced by Vertica::ParamReader::getTimestampTzRef().
| 
 | inlineinherited | 
Get a reference to a TIMESTAMP WITH TIMEZONE value from the input row.
| paramName | The name of the parameter to retrieve | 
| 
 | inlineinherited | 
Get a pointer to a TIME WITH TIMEZONE value from the input row.
| paramName | The name of the parameter to retrieve | 
Referenced by Vertica::ParamReader::getTimeTzRef().
| 
 | inlineinherited | 
Get a reference to a TIME WITH TIMEZONE value from the input row.
| paramName | The name of the parameter to retrieve | 
| 
 | inlineinherited | 
Referenced by Vertica::ParamReader::getType(), Vertica::BlockReader::isNull(), and Vertica::BlockWriter::setNull().
| 
 | inlineinherited | 
| 
 | inlineinherited | 
| 
 | inline | 
| 
 | 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.
| 
 | inline | 
Sets the allocator to be used to allocate variable size param values such as VString. Given allocator live longer than this ParamWriter.
| allocator | Used to allocate param values. | 
| 
 | inline | 
Adds a BOOLEAN value to the output row.
| r | The BOOLEAN value to insert into the output row. | 
| 
 | inline | 
Adds a BOOLEAN value to the output row.
| r | The BOOLEAN value to insert into the output row. | 
| 
 | inline | 
Adds a FLOAT value to the output row.
| r | The FLOAT value to insert into the output row. | 
| 
 | inline | 
Adds an INTEGER value to the output row.
Setter methods
| r | The INTEGER value to insert into the output row. | 
| 
 | inline | 
Adds an INTERVAL value to the output row.
| r | The INTERVAL value to insert into the output row. | 
| 
 | inline | 
Adds an INTERVAL YEAR TO MONTH value to the output row.
| r | The INTERVAL YEAR TO MONTH value to insert into the output row. | 
Adds a TIME value to the output row.
| r | The TIME value to insert into the output row. | 
| 
 | inline | 
Adds a TIMESTAMP value to the output row.
| r | The TIMESTAMP value to insert into the output row. | 
| 
 | inline | 
Adds a TIMESTAMP WITH TIMEZONE value to the output row.
| r | The TIMESTAMP WITH TIMEZONE value to insert into the output row. | 
Adds a TIME WITH TIMEZONE value to the output row.
| r | The TIME WITH TIMEZONE value to insert into the output row. | 
| 
 | inherited | 
Bookkeepinp to make a parameter and its position in the block
Referenced by Vertica::ParamReader::addParameter(), Vertica::ParamReader::containsParameter(), Vertica::ParamReader::copy(), getLongStringRef(), getNumericRef(), Vertica::ParamReader::getParamNames(), getStringRef(), getUuidRef(), and Vertica::ParamReader::isEmpty().