|  | C++ SDK Documentation
    24.2.0
    | 
Iterator interface for writing rows to a Vertica block. More...


| Public Member Functions | |
| BlockWriter (int rowcount) | |
| BlockWriter (char *outArr, int stride, int rowcount, const int *indices, const VerticaType &dt) | |
| int | capacity () const | 
| void | copy (const VerticaBlock &other) | 
| void | copyFromInput (size_t dstIdx, const BlockReader &vblock, size_t srcIdx) | 
| void | copyFromInput (const BlockReader &vblock) | 
| Array::ArrayWriter | getArrayRef (size_t idx=0) | 
| Get a handle for writing an output array value.  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 | 
| size_t | getNumCols () const | 
| VNumeric & | getNumericRef (size_t idx=0) | 
| Allocates a new VNumeric object to use as output.  More... | |
| int | getNumRows () const | 
| BlockWriter * | getRowPtr (size_t idx=0) | 
| Get a pointer for writing an output Row value.  More... | |
| BlockWriter & | getRowRef (size_t idx=0) | 
| Get a reference for writing an output Row value.  More... | |
| int | getRowsWritten () const | 
| VString * | getStringPtr (size_t idx=0) | 
| Get a pointer for writing output.  More... | |
| VString & | getStringRef (size_t idx=0) | 
| Allocates a new VString object to use as output.  More... | |
| const SizedColumnTypes & | getTypeMetaData () const | 
| SizedColumnTypes & | getTypeMetaData () | 
| VUuid & | getUuidRef (size_t idx=0) | 
| Allocates a new VUuid object to use as output.  More... | |
| void * | getVoidPtr (size_t idx=0) | 
| const void * | getVoidPtr (size_t idx=0) const | 
| bool | hasMoreSpace () const | 
| bool | next () | 
| Complete writing this row of output and move to the next row.  More... | |
| bool | remaining () const | 
| virtual void | resetForDataAreaFlush () | 
| void | setBool (vbool r) | 
| Adds a BOOLEAN value to the output row.  More... | |
| void | setBool (size_t idx, vbool r) | 
| Adds a BOOLEAN value to the indicated column of the output row.  More... | |
| void | setDataArea (size_t idx, void *dataarea) | 
| void | setDate (DateADT r) | 
| Adds a DATE value to the output row.  More... | |
| void | setDate (size_t idx, DateADT r) | 
| Adds a DATE value to the indicated column of the output row.  More... | |
| void | setFloat (vfloat r) | 
| Adds a FLOAT value to the output row.  More... | |
| void | setFloat (size_t idx, vfloat r) | 
| Adds a FLOAT value to the indicated column of the output row.  More... | |
| void | setInt (vint r) | 
| Adds an INTEGER value to the output row.  More... | |
| void | setInt (size_t idx, vint r) | 
| Adds an INTEGER value to the indicated column of the output row.  More... | |
| void | setInterval (Interval r) | 
| Adds an INTERVAL value to the output row.  More... | |
| void | setInterval (size_t idx, Interval r) | 
| Adds an INTERVAL value to the indicated column of the output row.  More... | |
| void | setIntervalYM (IntervalYM r) | 
| Adds an INTERVAL YEAR TO MONTH value to the output row.  More... | |
| void | setIntervalYM (size_t idx, IntervalYM r) | 
| Adds an INTERVAL YEAR TO MONTH value to the indicated column of the output row.  More... | |
| void | setNull (size_t idx=0, bool enforceNotNullProperty=true) | 
| Set the column to null.  More... | |
| void | setTime (TimeADT r) | 
| Adds a TIME value to the output row.  More... | |
| void | setTime (size_t idx, TimeADT r) | 
| Adds an TIME value to the indicated column of the output row.  More... | |
| void | setTimestamp (Timestamp r) | 
| Adds a TIMESTAMP value to the output row.  More... | |
| void | setTimestamp (size_t idx, Timestamp r) | 
| Adds an TIMESTAMP value to the indicated column of the output row.  More... | |
| void | setTimestampTz (TimestampTz r) | 
| Adds a TIMESTAMP WITH TIMEZONE value to the output row.  More... | |
| void | setTimestampTz (size_t idx, TimestampTz r) | 
| Adds an TIMESTAMP WITH TIMEZONE value to the indicated column of the output row.  More... | |
| void | setTimeTz (TimeTzADT r) | 
| Adds a TIME WITH TIMEZONE value to the output row.  More... | |
| void | setTimeTz (size_t idx, TimeTzADT r) | 
| Adds an TIME WITH TIMEZONE value to the indicated column of the output row.  More... | |
| void | throwIncorrectUsageError () | 
| 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 | Array::ArrayWriter | 
| class | EE::VEval | 
| class | PartitionWriter | 
Iterator interface for writing rows to a Vertica block.
This class provides the output rows that ScalarFunction.processBlock() writes to.
| 
 | 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().
| void Vertica::BlockWriter::copyFromInput | ( | size_t | dstIdx, | 
| const BlockReader & | vblock, | ||
| size_t | srcIdx | ||
| ) | 
Copies a column from the input reader to the output writer. Raises an error if the input and output data types are not compatible.
| dstIdx | The destination column index in the output writer (this) | 
| vblock | The source data block | 
| srcIdx | The source column index in the input reader | 
Referenced by Vertica::copyBlockColumn(), and copyFromInput().
| 
 | inline | 
Copy all columns from the source block to this block
| 
 | inlineprotectedinherited | 
| Array::ArrayWriter Vertica::BlockWriter::getArrayRef | ( | size_t | idx = 0 | ) | 
Get a handle for writing an output array value.
| idx | the output column | 
| 
 | inlineinherited | 
| 
 | inlineinherited | 
Example: const vint a = arg_reader->getColRef<vint>(0);
| 
 | inlineinherited | 
Referenced by copyFromInput(), Vertica::BlockReader::isNull(), and setNull().
| 
 | inline | 
| 
 | inlineinherited | 
| 
 | inline | 
Get a pointer for writing an output Row value.
| idx | the output column | 
| 
 | inline | 
Get a reference for writing an output Row value.
| idx | the output column | 
Referenced by getRowPtr(), and Vertica::PartitionWriter::getRowRef().
| 
 | inline | 
Get a pointer for writing output.
| idx | the output column | 
| 
 | inline | 
Allocates a new VString object to use as output.
| idx | the column to reference (default 0) | 
Referenced by getStringPtr(), and setNull().
| 
 | inlineinherited | 
Referenced by Vertica::ParamReader::getType(), Vertica::BlockReader::isNull(), and setNull().
| 
 | inlineinherited | 
| 
 | inline | 
| 
 | inline | 
Complete writing this row of output and move to the next row.
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.
| 
 | inline | 
Adds a BOOLEAN value to the output row.
| r | The BOOLEAN value to insert into the output row. | 
Referenced by setNull().
| 
 | inline | 
Adds a BOOLEAN value to the indicated column of the output row.
| idx | the column index | 
| r | the BOOLEAN value to insert | 
| 
 | inline | 
Adds a DATE value to the output row.
| r | The DATE value to insert into the output row. | 
Referenced by setNull().
| 
 | inline | 
Adds a DATE value to the indicated column of the output row.
| idx | the column index | 
| r | the DATE value to insert | 
| 
 | inline | 
Adds a FLOAT value to the output row.
| r | The FLOAT value to insert into the output row. | 
Referenced by setNull().
| 
 | inline | 
Adds a FLOAT value to the indicated column of the output row.
| idx | the column index | 
| r | the FLOAT value to insert | 
| 
 | inline | 
Adds an INTEGER value to the output row.
Setter methods
| r | The INTEGER value to insert into the output row. | 
Referenced by setNull().
| 
 | inline | 
Adds an INTEGER value to the indicated column of the output row.
| idx | the column index | 
| r | the INTEGER value to insert | 
| 
 | inline | 
Adds an INTERVAL value to the output row.
| r | The INTERVAL value to insert into the output row. | 
Referenced by setNull().
| 
 | inline | 
Adds an INTERVAL value to the indicated column of the output row.
| idx | the column index | 
| r | the INTERVAL value to insert | 
| 
 | 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. | 
Referenced by setNull().
| 
 | inline | 
Adds an INTERVAL YEAR TO MONTH value to the indicated column of the output row.
| idx | the column index | 
| r | the INTERVAL YEAR TO MONTH value to insert | 
| 
 | inline | 
Set the column to null.
| idx | The column number in the row to set to null | 
| enforceNotNullProperty | if true, raise an error if the target field has the canBeNullproperty set to false. | 
Referenced by Vertica::PartitionWriter::setNull().
| 
 | inline | 
Adds a TIME value to the output row.
| r | The TIME value to insert into the output row. | 
Referenced by setNull().
| 
 | inline | 
Adds an TIME value to the indicated column of the output row.
| idx | the column index | 
| r | the TIME value to insert | 
| 
 | inline | 
Adds a TIMESTAMP value to the output row.
| r | The TIMESTAMP value to insert into the output row. | 
Referenced by setNull().
| 
 | inline | 
Adds an TIMESTAMP value to the indicated column of the output row.
| idx | the column index | 
| r | the TIMESTAMP value to insert | 
| 
 | inline | 
Adds a TIMESTAMP WITH TIMEZONE value to the output row.
| r | The TIMESTAMP WITH TIMEZONE value to insert into the output row. | 
Referenced by setNull().
| 
 | inline | 
Adds an TIMESTAMP WITH TIMEZONE value to the indicated column of the output row.
| idx | the column index | 
| r | the TIMESTAMP WITH TIMEZONE value to insert | 
| 
 | inline | 
Adds a TIME WITH TIMEZONE value to the output row.
| r | The TIME WITH TIMEZONE value to insert into the output row. | 
Referenced by setNull().
| 
 | inline | 
Adds an TIME WITH TIMEZONE value to the indicated column of the output row.
| idx | the column index | 
| r | the TIME WITH TIMEZONE value to insert |