Functions to Get the Property Value - Teradata Meta Data Services

Teradata Meta Data Services Programmer Guide

Product
Teradata Meta Data Services
Release Number
15.00
Language
English (United States)
Last Update
2018-09-28
Product Category
Teradata Tools and Utilities

Functions to Get the Property Value

These functions return the property value of the specified type. An error is returned if the property is not of the type requested

bool IsNull() const;

Returns true if the Property value is NULL, otherwise returns false.

bool IsBinaryAString() const;

Returns true if the value was set with the SetBinaryString function. Returns false if the value was set with the SetBinary function or was read from the MDS repository. If true, the value is a hex string for example “3030303030633034” for the hex value 0x00c4.

HRESULT GetBinary(void* buf, int &bufsz);

Caller must provide a pointer <buf> to a buffer large enough to hold the return value. Copies the binary buffer to <buf> and sets <bufsz> to the number of bytes in the buffer for a binary property. Returns <bufsz> = 0 if the property value is NULL.

HRESULT GetBinaryAsString(String &val);

Returns a string containing the value of a binary buffer printed as hexadecimal or an empty string if the property value is NULL.

HRESULT GetBool(short &val)

Returns the value of a (short) Boolean property or 0 if the property value is NULL.

HRESULT GetChar(char &val);

Returns the value of a char property or 0 if the property value is NULL.

HRESULT GetDate(double &val)

Returns the value of a floating-point date property 0.0 if the property value is NULL.

HRESULT GetDbl(double &val)

Returns the value of a double property or 0.0 if the property value is NULL. Equivalent to GetDouble.

HRESULT GetDouble(double &val)

Returns the value of a double property or 0.0 if the property value is NULL. Equivalent to GetDbl.

HRESULT GetFloat(float &val)

Returns the value of a floating-point property or 0.0 if the property value is NULL.

HRESULT GetInt(int &val)

Returns the value of an integer property or 0 if the property value is NULL. Equivalent to GetLong.

HRESULT GetLong(long &val)

Returns the value of a long property or 0 if the property value is NULL. Equivalent to GetInt.

HRESULT GetShort(short &val)

Returns the value of a short property or 0 if the property value is NULL.

HRESULT GetString(String &val);

Returns the value of a string property or an empty string if the property value is NULL.

HRESULT GetUChar(unsigned char &val)

Returns the value of an unsigned char property or 0 if the property value is NULL.

VARIANT GetValue(void);

GetValue returns the property value and type in a Windows VARIANT structure. This function is used to support the CMetaCOM APIs and will only be available on Windows platforms. When the caller is done with the VARIANT that is returned, they should clear it using the VariantClear function provided by Windows to free any string or array pointers it may contain.

const unsigned short GetVarType(void) const;

GetVarType returns the numeric value for the Variant Type for the current property.

 

Variant Type

Numeric Equivalent of Variant Type

VT_I2

2

VT_I4

3

VT_R8

5

VT_DATE

7

VT_BSTR

8

VT_BOOL

11

VT_UI1

17

VT_ARRAY|VT_UI1

8209