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

Provides write access to a set of named parameters. This class extends ParamReader to add type-specific methods to write values. More...

Inheritance diagram for Vertica::ParamWriter:
Inheritance graph
Collaboration diagram for Vertica::ParamWriter:
Collaboration graph

Public Member Functions

 ParamWriter (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...
 
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...
 
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...
 

Friends

class VerticaBlockSerializer
 

Detailed Description

Provides write access to a set of named parameters. This class extends ParamReader to add type-specific methods to write values.

Member Function Documentation

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

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)
inline

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)
inline

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)
inline

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)
inline

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 
)
inline

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 
)
inline

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 
)
inline

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 
)
inline

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 
)
inline

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 
)
inline

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 
)
inline

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 
)
inline

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 
)
inline

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 
)
inline

Adds a TIME WITH TIMEZONE value to the output row.

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