C++ SDK Documentation  11.0.0
Vertica::ExecutorParamWriter Class Reference

An ExecutorParamWriter is a ParamWriter whose scope is limited to a single executor node - it will never be serialized for transfer to a different node. As a result, any object which is allocated from a Vertica memory pool (i.e. a ServerInterface's allocator object) can have its address saved in the ExecutorParamWriter (see setPointer()), and be safely retrieved later on (see getPointer()) from a different API call in the same query. More...

Inheritance diagram for Vertica::ExecutorParamWriter:
Inheritance graph
Collaboration diagram for Vertica::ExecutorParamWriter:
Collaboration graph

Public Member Functions

 ExecutorParamWriter (VTAllocator *allocator=NULL)
 
void clearParameter (std::string fieldName)
 
VStringgetLongStringRef (std::string fieldName)
 Allocates a new VString object to use as output. Sets it to be a 32mb LONG type by default. More...
 
VNumeric & getNumericRef (std::string fieldName)
 Allocate a new VNumeric object to use as output. More...
 
template<class T >
T * getPointer (std::string fieldName) const
 
VStringgetStringRef (std::string fieldName)
 Allocates a new VString object to use as output. More...
 
VUuidgetUuidRef (std::string fieldName)
 Allocate a new VUuid object to use as output. More...
 
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 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...
 
template<class T >
void setPointer (std::string fieldName, T *ptr)
 
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...
 

Detailed Description

An ExecutorParamWriter is a ParamWriter whose scope is limited to a single executor node - it will never be serialized for transfer to a different node. As a result, any object which is allocated from a Vertica memory pool (i.e. a ServerInterface's allocator object) can have its address saved in the ExecutorParamWriter (see setPointer()), and be safely retrieved later on (see getPointer()) from a different API call in the same query.

Member Function Documentation

VString& Vertica::ParamWriter::getLongStringRef ( std::string  fieldName)
inlineinherited

Allocates a new VString object to use as output. Sets it to be a 32mb LONG type by default.

Returns
A new VString object to hold output. This object automatically added to the output row.
VNumeric& Vertica::ParamWriter::getNumericRef ( std::string  fieldName)
inlineinherited

Allocate a new VNumeric object to use as output.

Returns
A new VNumeric object to hold output. This object automatically added to the output row.
VString& Vertica::ParamWriter::getStringRef ( std::string  fieldName)
inlineinherited

Allocates a new VString object to use as output.

Returns
A new VString object to hold output. This object automatically added to the output row.
VUuid& Vertica::ParamWriter::getUuidRef ( std::string  fieldName)
inlineinherited

Allocate a new VUuid object to use as output.

Returns
A new VUuid object to hold output. This object automatically added to the output row.
void Vertica::ParamWriter::setAllocator ( VTAllocator allocator)
inlineinherited

Sets the allocator to be used to allocate variable size param values such as VString. Given allocator live longer than this ParamWriter.

Parameters
allocatorUsed to allocate param values.
void Vertica::ParamWriter::setBool ( std::string  fieldName,
vbool  r 
)
inlineinherited

Adds a BOOLEAN value to the output row.

Parameters
rThe BOOLEAN value to insert into the output row.
void Vertica::ParamWriter::setDate ( std::string  fieldName,
DateADT  r 
)
inlineinherited

Adds a BOOLEAN value to the output row.

Parameters
rThe BOOLEAN value to insert into the output row.
void Vertica::ParamWriter::setFloat ( std::string  fieldName,
vfloat  r 
)
inlineinherited

Adds a FLOAT value to the output row.

Parameters
rThe FLOAT value to insert into the output row.
void Vertica::ParamWriter::setInt ( std::string  fieldName,
vint  r 
)
inlineinherited

Adds an INTEGER value to the output row.

Setter methods

Parameters
rThe INTEGER value to insert into the output row.
void Vertica::ParamWriter::setInterval ( std::string  fieldName,
Interval  r,
int32  precision,
int32  range 
)
inlineinherited

Adds an INTERVAL value to the output row.

Parameters
rThe INTERVAL value to insert into the output row.
void Vertica::ParamWriter::setIntervalYM ( std::string  fieldName,
IntervalYM  r,
int32  range 
)
inlineinherited

Adds an INTERVAL YEAR TO MONTH value to the output row.

Parameters
rThe INTERVAL YEAR TO MONTH value to insert into the output row.
void Vertica::ParamWriter::setTime ( std::string  fieldName,
TimeADT  r,
int32  precision 
)
inlineinherited

Adds a TIME value to the output row.

Parameters
rThe TIME value to insert into the output row.
void Vertica::ParamWriter::setTimestamp ( std::string  fieldName,
Timestamp  r,
int32  precision 
)
inlineinherited

Adds a TIMESTAMP value to the output row.

Parameters
rThe TIMESTAMP value to insert into the output row.
void Vertica::ParamWriter::setTimestampTz ( std::string  fieldName,
TimestampTz  r,
int32  precision 
)
inlineinherited

Adds a TIMESTAMP WITH TIMEZONE value to the output row.

Parameters
rThe TIMESTAMP WITH TIMEZONE value to insert into the output row.
void Vertica::ParamWriter::setTimeTz ( std::string  fieldName,
TimeTzADT  r,
int32  precision 
)
inlineinherited

Adds a TIME WITH TIMEZONE value to the output row.

Parameters
rThe TIME WITH TIMEZONE value to insert into the output row.