VerticaType

class vertica_sdk.VerticaType

Stores column type metadata.

getArrayBound(self)
getElementType(self)

Returns the element type for this array type. Throws an exception on non-arrays.

getFieldName(self, idx)

Returns the name of the field at position idx for this row type. Throws an exception for non-rows.

getFieldType(self, idx)

Returns the field type at position idx for this row type. Throws an exception for non-rows.

getIntervalPrecision(self)

Returns the precision of this INTERVAL type.

No type checking is applied. Results for non-interval types are unspecified.

getIntervalRange(self)

Returns the range of this INTERVAL type as an int.

No type checking is applied. Results for non-interval types are unspecified.

getMaxSize(self)

Returns the maximum size, in bytes, of a data element of this type.

getNumFields(self)

Returns the number of fields in this ROW type. Throws an exception for non-rows.

getNumericFractional(self)

Returns the number of fractional digits (i.e. digits right of the decimal point) of this NUMERIC type.

No type checking is applied. Results for non-numeric types are unspecified.

getNumericIntegral(self)

Returns the number of integral digits (i.e. digits left of the decimal point) of this NUMERIC type.

No type checking is applied. Results for non-numeric types are unspecified.

getNumericPrecision(self)

Returns the precision of this NUMERIC type.

No type checking is applied. Results for non-numeric types are unspecified.

getNumericScale(self)

Returns the scale of this NUMERIC type.

No type checking is applied. Results for non-numeric types are unspecified.

getNumericWordCount(self)

Returns the number of words needed in memory to represent a value of this NUMERIC type.

No type checking is applied. Results for non-numeric types are unspecified.

getPrettyPrintStr(self)

Returns a human-readable string representing this type (including typemod).

getStringLength(self, check_type=True)

Returns the maximum length of an element of this string data type.

Raises an error if the type is not a string type.

getTimePrecision(self)

Returns the precision of this TIME type.

No type checking is applied. Results for non-time types are unspecified.

getTimestampPrecision(self)

Returns the precision of this TIMESTAMP type.

No type checking is applied. Results for non-timestamp types are unspecified.

getTypeMod(self)

Returns the typemod of this type.

getTypeOid(self)

Returns the OID of this type.

getTypeStr(self)

Returns a string representing the base data type that this type represents.

isArrayType(self)

Returns True if this is any array type (1D or complex), False otherwise.

isBinary(self)

Returns True if this type is BINARY and False otherwise.

isBool(self)

Returns True if this type is BOOLEAN and False otherwise.

isChar(self)

Returns True if this type is CHAR and False otherwise.

isComplexArrayType(self)

Returns True if this is a complex array type, False otherwise.

isComplexRowType(self)

Returns True if this is a complex row type, False otherwise.

isDate(self)

Returns True if this type is DATE and False otherwise.

isFloat(self)

Returns True if this type is FLOAT and False otherwise.

isInt(self)

Returns True if this type is INTEGER and False otherwise.

isInterval(self)

Returns True if this type is INTERVAL and False otherwise.

isIntervalYM(self)

Returns True if this type is INTERVAL YEAR TO MONTH and False otherwise.

isLongVarbinary(self)

Returns True if this type is LONG VARBINARY and False otherwise.

isLongVarchar(self)

Returns True if this type is LONG VARCHAR and False otherwise.

isNumeric(self)

Returns True if this type is NUMERIC and False otherwise.

isStringType(self)

Returns True if this is any string type, e.g. CHAR, VARCHAR, BINARY, VARBINARY.

isTime(self)

Returns True if this type is TIME and False otherwise.

isTimeTz(self)

Returns True if this type is TIME WITH TIMEZONE (TIMETZ) and False otherwise.

isTimestamp(self)

Returns True if this type is TIMESTAMP and False otherwise.

isTimestampTz(self)

Returns True if this type is TIMESTAMP WITH TIMEZONE (TIMESTAMPTZ) and False otherwise.

isUUID(self)

Returns True if this type is UUID and False otherwise.

isVarbinary(self)

Returns True if this type is VARBINARY and False otherwise.

isVarchar(self)

Returns True if this type is VARCHAR and False otherwise.