GetClassObjectVersions - 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

GetClassObjectVersions

Purpose

GetClassObjectVersions returns all versions of the objects (list of CMetaObjects) in the specified class.

Description

If strObjName is not specified (NULL), all objects in the class are returned.

If strObjName is specified, only the objects of the specified name in the class are returned. The name search is not case sensitive.

Specifying an empty string (“”) for strObjName returns objects in the class with no name.

If strLabel is specified, only the versions that also have the label will be returned.

Requirements

The internally unique or globally unique class ID must be specified.

The objects in the list returned by GetClassObjectVersions are in ascending sort order of the object names, and within each name are sorted in descending order of the version number. Use GetClassObjectsVersionsByProperty to specify properties to sort the list by.

Syntax

HRESULT GetClassObjectVersions(
vector<CMetaObject> &objectList,
const GUID &gClassID, 
const OBJECTID_t lClassID = NULLLOID, 
LPCTSTR strObjName = NULL,
LPCTSTR strLabel = NULL,
const bool WithLock = false);
 

Argument

In/Out

Description

objectList

In/Out

Reference to the list of CMetaObjects that will hold the objects returned. The list is cleared before adding the return collection.

gClassID

In

Class GUID. Can be set to NULLGUID if gClassID is set.

lClassID

In
(Optional)

Class internal ID. Optional if gClassID is set.

strObjName

In
(Optional)

Specific name of the objects in the class being returned.

strLabel

In

Label to be used as a filter on the returned objects; only versions with the label are returned

WithLock

In

WithLock=true keeps the IClassID table locked for WRITE. Use within an explicit transaction. Set WithLock to true when one of the class objects will subsequently be updated within the transaction. This prevents deadlocks caused by Teradata promotional locks.