C++ SDK Documentation  24.2.0
Vertica::Fields Class Reference
Inheritance diagram for Vertica::Fields:
Inheritance graph
Collaboration diagram for Vertica::Fields:
Collaboration graph

Classes

struct  Properties
 

Public Member Functions

FieldsaddArrayType (const Field &element, const std::string &fieldName="", int maxElems=-1, const Properties &props=Properties())
 
FieldsaddBinary (int32 len, const std::string &fieldName="")
 Adds a column of type BINARY. More...
 
FieldsaddBinary (int32 len, const std::string &fieldName, const Properties &props)
 
FieldsaddBool (const std::string &fieldName="")
 Adds a column of type BOOLEAN. More...
 
FieldsaddBool (const std::string &fieldName, const Properties &props)
 
FieldsaddChar (int32 len, const std::string &fieldName="")
 Adds a column of type CHAR. More...
 
FieldsaddChar (int32 len, const std::string &fieldName, const Properties &props)
 
FieldsaddDate (const std::string &fieldName="")
 Adds a column of type DATE. More...
 
FieldsaddDate (const std::string &fieldName, const Properties &props)
 
FieldsaddFloat (const std::string &fieldName="")
 Adds a column of type FLOAT. More...
 
FieldsaddFloat (const std::string &fieldName, const Properties &props)
 
FieldsaddInt (const std::string &fieldName="")
 Adds a column of type INTEGER. More...
 
FieldsaddInt (const std::string &fieldName, const Properties &props)
 
FieldsaddInterval (int32 precision, int32 range, const std::string &fieldName="")
 Adds a column of type INTERVAL/INTERVAL DAY TO SECOND. More...
 
FieldsaddInterval (int32 precision, int32 range, const std::string &fieldName, const Properties &props)
 
FieldsaddIntervalYM (int32 range, const std::string &fieldName="")
 Adds a column of type INTERVAL YEAR TO MONTH. More...
 
FieldsaddIntervalYM (int32 range, const std::string &fieldName, const Properties &props)
 
FieldsaddLongVarbinary (int32 len, const std::string &fieldName="")
 Adds a column of type LONG VARBINARY. More...
 
FieldsaddLongVarbinary (int32 len, const std::string &fieldName, const Properties &props)
 
FieldsaddLongVarchar (int32 len, const std::string &fieldName="")
 Adds a column of type LONG VARCHAR. More...
 
FieldsaddLongVarchar (int32 len, const std::string &fieldName, const Properties &props)
 
FieldsaddNumeric (int32 precision, int32 scale, const std::string &fieldName="")
 Adds a column of type NUMERIC. More...
 
FieldsaddNumeric (int32 precision, int32 scale, const std::string &fieldName, const Properties &props)
 
FieldsaddRowType (const Fields &rowfields, const std::string &fieldName="")
 Adds a column of complex row type, with the provided fields. More...
 
FieldsaddRowType (const Fields &rowfields, const std::string &fieldName, const Properties &props)
 
FieldsaddTime (int32 precision, const std::string &fieldName="")
 Adds a column of type TIME. More...
 
FieldsaddTime (int32 precision, const std::string &fieldName, const Properties &props)
 
FieldsaddTimestamp (int32 precision, const std::string &fieldName="")
 Adds a column of type TIMESTAMP. More...
 
FieldsaddTimestamp (int32 precision, const std::string &fieldName, const Properties &props)
 
FieldsaddTimestampTz (int32 precision, const std::string &fieldName="")
 Adds a column of type TIMESTAMP WITH TIMEZONE. More...
 
FieldsaddTimestampTz (int32 precision, const std::string &fieldName, const Properties &props)
 
FieldsaddTimeTz (int32 precision, const std::string &fieldName="")
 Adds a column of type TIME WITH TIMEZONE. More...
 
FieldsaddTimeTz (int32 precision, const std::string &fieldName, const Properties &props)
 
FieldsaddUserDefinedType (const char *typeName, int32 len, const std::string &fieldName="")
 Adds a column of a user-defined type. More...
 
FieldsaddUserDefinedType (const char *typeName, int32 len, const std::string &fieldName, const Properties &props)
 
FieldsaddUuid (const std::string &fieldName="")
 Adds a column of type UUID. More...
 
FieldsaddUuid (const std::string &fieldName, const Properties &props)
 
FieldsaddVarbinary (int32 len, const std::string &fieldName="")
 Adds a column of type VARBINARY. More...
 
FieldsaddVarbinary (int32 len, const std::string &fieldName, const Properties &props)
 
FieldsaddVarchar (int32 len, const std::string &fieldName="")
 Adds a column of type VARCHAR. More...
 
FieldsaddVarchar (int32 len, const std::string &fieldName, const Properties &props)
 

Protected Member Functions

void validateStringLengthOrThrow (int32 len, const char *typeStr, int32 maxLength)
 
void validateUDTypeLengthOrThrow (Oid udTypeOid, const char *typeName, int32 len)
 

Member Function Documentation

◆ addBinary()

Fields & Vertica::Fields::addBinary ( int32  len,
const std::string &  fieldName = "" 
)

Adds a column of type BINARY.

Parameters
lenThe length of the binary string.
fieldNameThe name for the output column.

◆ addBool()

Fields & Vertica::Fields::addBool ( const std::string &  fieldName = "")

Adds a column of type BOOLEAN.

Parameters
fieldNameThe name for the output column.

◆ addChar()

Fields & Vertica::Fields::addChar ( int32  len,
const std::string &  fieldName = "" 
)

Adds a column of type CHAR.

Parameters
lenThe length of the string.
fieldNameThe name for the output column.

◆ addDate()

Fields & Vertica::Fields::addDate ( const std::string &  fieldName = "")

Adds a column of type DATE.

Parameters
fieldNameThe name for the output column.

◆ addFloat()

Fields & Vertica::Fields::addFloat ( const std::string &  fieldName = "")

Adds a column of type FLOAT.

Parameters
fieldNameThe name for the output column.

◆ addInt()

Fields & Vertica::Fields::addInt ( const std::string &  fieldName = "")

Adds a column of type INTEGER.

Parameters
fieldNameThe name for the output column.

◆ addInterval()

Fields & Vertica::Fields::addInterval ( int32  precision,
int32  range,
const std::string &  fieldName = "" 
)

Adds a column of type INTERVAL/INTERVAL DAY TO SECOND.

Parameters
precisionThe precision for the interval.
rangeThe range for the interval.
fieldNameThe name for the output column.

◆ addIntervalYM()

Fields & Vertica::Fields::addIntervalYM ( int32  range,
const std::string &  fieldName = "" 
)

Adds a column of type INTERVAL YEAR TO MONTH.

Parameters
rangeThe range for the interval.
fieldNameThe name for the output column.

◆ addLongVarbinary()

Fields & Vertica::Fields::addLongVarbinary ( int32  len,
const std::string &  fieldName = "" 
)

Adds a column of type LONG VARBINARY.

Parameters
lenThe length of the binary string.
fieldNameThe name for the output column.

◆ addLongVarchar()

Fields & Vertica::Fields::addLongVarchar ( int32  len,
const std::string &  fieldName = "" 
)

Adds a column of type LONG VARCHAR.

Parameters
lenThe length of the string.
fieldNameThe name for the output column.

◆ addNumeric()

Fields & Vertica::Fields::addNumeric ( int32  precision,
int32  scale,
const std::string &  fieldName = "" 
)

Adds a column of type NUMERIC.

Parameters
precisionThe precision for the numeric value.
scaleThe scale for the numeric value.
fieldNameThe name for the output column.

◆ addRowType()

Fields & Vertica::Fields::addRowType ( const Fields rowfields,
const std::string &  fieldName = "" 
)

Adds a column of complex row type, with the provided fields.

Parameters
rowfieldsthe fields of the complex row type
fieldNamethe name of the added field

Referenced by Vertica::SizedColumnTypes::addRowType().

◆ addTime()

Fields & Vertica::Fields::addTime ( int32  precision,
const std::string &  fieldName = "" 
)

Adds a column of type TIME.

Parameters
precisionThe precision for the time.
fieldNameThe name for the output column.

◆ addTimestamp()

Fields & Vertica::Fields::addTimestamp ( int32  precision,
const std::string &  fieldName = "" 
)

Adds a column of type TIMESTAMP.

Parameters
precisionThe precision for the timestamp.
fieldNameThe name for the output column.

◆ addTimestampTz()

Fields & Vertica::Fields::addTimestampTz ( int32  precision,
const std::string &  fieldName = "" 
)

Adds a column of type TIMESTAMP WITH TIMEZONE.

Parameters
precisionThe precision for the timestamp.
fieldNameThe name for the output column.

◆ addTimeTz()

Fields & Vertica::Fields::addTimeTz ( int32  precision,
const std::string &  fieldName = "" 
)

Adds a column of type TIME WITH TIMEZONE.

Parameters
precisionThe precision for the time.
fieldNameThe name for the output column.

◆ addUserDefinedType()

Fields & Vertica::Fields::addUserDefinedType ( const char *  typeName,
int32  len,
const std::string &  fieldName = "" 
)

Adds a column of a user-defined type.

Parameters
typeNamethe name of the type
lenthe length of the type field, in bytes
fieldNamethe name of the field
fieldNameThe name for the output column.

◆ addUuid()

Fields & Vertica::Fields::addUuid ( const std::string &  fieldName = "")

Adds a column of type UUID.

Parameters
fieldNameThe name for the output column.

◆ addVarbinary()

Fields & Vertica::Fields::addVarbinary ( int32  len,
const std::string &  fieldName = "" 
)

Adds a column of type VARBINARY.

Parameters
lenThe length of the binary string.
fieldNameThe name for the output column.

◆ addVarchar()

Fields & Vertica::Fields::addVarchar ( int32  len,
const std::string &  fieldName = "" 
)

Adds a column of type VARCHAR.

Parameters
lenThe length of the string.
fieldNameThe name for the output column.