MetaPropertyItem Class - 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

MetaPropertyItem Class

The IMetaPropertyItem interface contains the basic functionality of the CMetaPropertyDesc class. The main difference is that instead of many, different "Set" functions for the many different data types possible, this uses a "Value" property of type VARIANT to cover all different types except string. The string type is covered by the ValueString and StringLiteral properties.

 

Property

Type

Description

PropertyID

Long

The property ID.

Name

BSTR

The property name.

ValueString

BSTR

The value of a binary property is returned as a hex string. (Read only.)

StringLiteral

BSTR

The value of the property when it is a string and it is to be sent to Teradata "as is", that is, not quoted in the SQL statement. For example, the Teradata keyword "date" should be set using this property. If you were to use the Value property (using VT_BSTR), it would be quoted and the string "date" appears as the value, not an actual date.

Value

VARIANT

The value of the property. Should be used for all property types other than string. The MDS engine will figure out the type based on the defined property type.

Variant Type

VariantType

Returns the VARIANT type of the property. (Read only.)

get_PropertyID

Purpose:

Gets the relative property ID.

Syntax:

HRESULT get_PropertyID(
[out, retval] long *pVal);

put_PropertyID

Purpose:

Sets the relative property ID.

Syntax:

HRESULT put_PropertyID(
[in] long newVal);

get_Name

Purpose:

Gets the property name.

Syntax:

HRESULT get_Name(
[out, retval] BSTR *pVal);

put_Name

Purpose:

Sets the property name.

Syntax:

HRESULT put_Name(
[in] BSTR newVal);

get_ValueString

Purpose:

Returns a hex string representation of a binary property value. For example, a property of type SQL_BYTE with a value of 0x1003ABDF would be returned by this call as the string “1003ABDF”

Syntax:

HRESULT get_ValueString(
[out, retval] BSTR *pVal);

get_Value

Purpose:

Gets the property value.

Syntax:

HRESULT get_Value(
[out, retval] VARIANT *pVal);

put_Value

Purpose:

Sets the property value.

Syntax:

HRESULT put_Value(
[in] VARIANT newVal);

get_IsNull

Purpose:

Gets the IsNull property for the property item, which is a direct reflection of the NULL value of the column in the database true if the property value is NULL, false if it is not. (Each property of a class translates to a column for the table that represents that class.)

Syntax:

HRESULT get_IsNull(
[out, retval] VARIANT_BOOL *pVal);

put_IsNull

Purpose:

Sets the IsNull property for the property item, which is a direct reflection of the NULL value of the column in the database true if the property value is NULL, false if it is not. (Each property of a class translates to a column for the table that represents that class.)

Syntax:

HRESULT put_IsNull(
[in] VARIANT_BOOL newVal);

put_StringLiteral

Purpose:

Sets the value as a string "literal", indicating to the MDS engine not to quote this string when it is sent to Teradata.

Syntax:

HRESULT put_StringLiteral(
[in] BSTR newVal);

get_VariantType

Purpose:

Returns the VARIANT type of the property. See“AIM Classes” on page 373 for VariantType enumeration values.

Syntax:

HRESULT get_VariantType(
[out, retval] VariantType *pVal);